diff options
| author | hc <haocheng.xie@respiree.com> | 2026-04-13 15:17:52 +0800 |
|---|---|---|
| committer | hc <haocheng.xie@respiree.com> | 2026-04-13 15:17:52 +0800 |
| commit | d6d9a09d505d11148599a95a5be3e1351edbe0ac (patch) | |
| tree | a5f5891983d1ff207e99f683a5e151519cef4980 /libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/AM3S_V2.h | |
| parent | e4fb9966e762852bf17f21c8406501d42fae0b61 (diff) | |
Local iHealth SDK, device detail screen, iOS event fixes
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/AM3S_V2.h')
| -rw-r--r-- | libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/AM3S_V2.h | 227 |
1 files changed, 227 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/AM3S_V2.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/AM3S_V2.h new file mode 100644 index 0000000..f3b2e58 --- /dev/null +++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/AM3S_V2.h | |||
| @@ -0,0 +1,227 @@ | |||
| 1 | // | ||
| 2 | // AM3S_V2.h | ||
| 3 | // iHealthDemoCode | ||
| 4 | // | ||
| 5 | // Created by user on 16/8/12. | ||
| 6 | // Copyright © 2016年 zhiwei jing. All rights reserved. | ||
| 7 | // | ||
| 8 | |||
| 9 | #import <Foundation/Foundation.h> | ||
| 10 | #import "AMMacroFile.h" | ||
| 11 | /** | ||
| 12 | AM3S_V2 | ||
| 13 | */ | ||
| 14 | @interface AM3S_V2 : NSObject | ||
| 15 | @property (strong, nonatomic) NSMutableString *am3SRandomString; | ||
| 16 | @property (strong, nonatomic) NSString *currentUUID; | ||
| 17 | @property (strong, nonatomic) NSString *serialNumber; | ||
| 18 | @property (strong, nonatomic) NSString *firmwareVersion; | ||
| 19 | |||
| 20 | |||
| 21 | |||
| 22 | /** | ||
| 23 | * Get device userID | ||
| 24 | * @param getDeviceUserIDBlock get userID | ||
| 25 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 26 | */ | ||
| 27 | -(void)commandAM3SGetDeviceUserID:(DisposeAM3SGetDeviceUserIDBlock)getDeviceUserIDBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 28 | |||
| 29 | |||
| 30 | |||
| 31 | /** | ||
| 32 | * Set RandomNumber | ||
| 33 | * @param setRandomNumberBlock randomNumber | ||
| 34 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 35 | */ | ||
| 36 | -(void)commandAM3SSetRandomNumber:(DisposeAM3SSetRandomNumberBlock)setRandomNumberBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 37 | |||
| 38 | |||
| 39 | /** | ||
| 40 | * Sync time | ||
| 41 | * @param syncTimeBlock True: Success, False: Failed. | ||
| 42 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 43 | */ | ||
| 44 | -(void)commandAM3SSyncTime:(DisposeAM3SSyncTimeBlock)syncTimeBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 45 | |||
| 46 | /** | ||
| 47 | * Set time format and nation | ||
| 48 | * @param timeFormatAndNation AM3STimeFormat_hh,AM3STimeFormat_HH,AM3STimeFormat_NoEuropeAndhh,AM3STimeFormat_EuropeAndhh,AM3STimeFormat_NoEuropeAndHH,AM3STimeFormat_EuropeAndHH, | ||
| 49 | * @param setTimeFormatBlock True: Success, False: Failed. | ||
| 50 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 51 | * @Notice Notice: Firmware version 1.0.0 and above supports AM3STimeFormat_NoEuropeAndhh,AM3STimeFormat_EuropeAndhh,AM3STimeFormat_NoEuropeAndHH,AM3STimeFormat_EuropeAndHH, | ||
| 52 | */ | ||
| 53 | -(void)commandAM3SSetTimeFormatAndNation:(AM3STimeFormatAndNation)timeFormatAndNation withFinishResult:(DisposeAM3STimeFormatAndNationSettingBlock)setTimeFormatBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 54 | |||
| 55 | /** | ||
| 56 | * Binding AM3S to user,Account binding requires an active internet connection. | ||
| 57 | * @param userID userID, ranging from 1 – 2147483647. | ||
| 58 | * @param finishResultBlock True: Success, False: Failed. | ||
| 59 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 60 | */ | ||
| 61 | -(void)commandAM3SSetUserID:(NSNumber*)userID withFinishResult:(DisposeAM3SSetDeviceUserIDBlock)finishResultBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 62 | |||
| 63 | /** | ||
| 64 | * AM3S initialization,Must be called the first time to ensure that the AM3S has correct user information, goals, time, battery checks, etc. | ||
| 65 | * @param user User information, needs to include the following:age(int)、height(cm,1-255)、weight(kg,1-255)、bmr(user basal metabolic)、sex(UserSex_Female or UserSex_Male)、activityLevel (activityLevel=1, Sedentary,spend most of day sitting.activityLevel=2, Active,spend a good part of day doing some physical activity.activityLevel=3, Very Active,spend most of day doing heavy physical activity.) | ||
| 66 | * @param unit AM3SKmUnit_mile or AM3SKmUnit_km | ||
| 67 | * @param activeGoalNumber User goal number of steps,ranging from 4 – 2147483647. Default is 10,000 | ||
| 68 | * @param setUserInfoFinishBlock True: Success, False: Failed. | ||
| 69 | * @param setBMRfinishResultBlock True: Success, False: Failed. | ||
| 70 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 71 | */ | ||
| 72 | |||
| 73 | -(void)commandAM3SSetUserInfo:(HealthUser *)user withUnit:(AM3SKmUnit)unit withActiveGoal:(NSNumber *)activeGoalNumber withSetUserInfoFinishResult:(DisposeAM3SSetUserInfoBlock)setUserInfoFinishBlock withSetBMR:(DisposeAM3SSetBMRBlock)setBMRfinishResultBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 74 | |||
| 75 | |||
| 76 | |||
| 77 | |||
| 78 | |||
| 79 | /** | ||
| 80 | * Upload AM3S data,Data type: 5 minutes of active data, total number of steps for the day, and total calories.Also includes the number of steps for the 5 minutes of motion data, total calories for the current time, calories of the steps, and total calories. | ||
| 81 | * @param activeTransmissionBlock activeTransmission: Start uploading motion data, including parameters:Start date,yyyy-MM-dd(ActiveHistoryDateYear,ActiveHistoryDateMonth,ActiveHistoryDateDay),ActiveStepSize:Length of each step,ActiveHistoryTotoalNum:Number of records. | ||
| 82 | * @param activeHistoryDataBlock active data,including the following parameters:AMDate、AMCalorie、AMstepNum、AMstepSize、dataID、Start. AMDate:Workout time,AMCalorie: Current time total calories,AMStepNum:Total number of steps,dataID:data ID,Start:represents the beginning of a movement. | ||
| 83 | * @param activeFinishTransmissionBlock Upload complete. | ||
| 84 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 85 | */ | ||
| 86 | -(void)commandAM3SStartSyncActiveData:(DisposeAM3SActiveStartTransmission)activeTransmissionBlock | ||
| 87 | withActiveHistoryData:(DisposeAM3SActiveHistoryData)activeHistoryDataBlock | ||
| 88 | withActiveFinishTransmission:(DisposeAM3SActiveFinishTransmission)activeFinishTransmissionBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 89 | /** | ||
| 90 | * Upload AM3S data,Data type: 5 minutes of sleep data | ||
| 91 | * @param sleepTransmissionBlock sleepTransmission:Start uploading sleep data,, including parameters:SleepHistoryDate、AM3SSleepHistoryTotoalNum.SleepHistoryDate:Sleep start time,yyyy-MM-dd HH:mm:ss(SleepHistoryDateYear,SleepHistoryDateMonth,SleepHistoryDateDay,SleepHistoryDateHour,SleepHistoryDateMinute,SleepHistoryDateSeconds).SleepHistoryTotoalNum: Number of records | ||
| 92 | * @param sleepHistoryDataBlock Sleep data, including the following parameters::AMDate、SleepData、dataID.AMDate:Sleep time, SleepData: Sleep grade, 0: awake, 1: light sleep, 2: deep sleep ,dataID: data ID. | ||
| 93 | * @param sleepFinishTransmissionBlock Upload complete. | ||
| 94 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 95 | */ | ||
| 96 | -(void)commandAM3SStartSyncSleepData:(DisposeAM3SSleepStartTransmission)sleepTransmissionBlock withSleepHistoryData:(DisposeAM3SSleepHistoryData)sleepHistoryDataBlock | ||
| 97 | withSleepFinishTransmission:(DisposeAM3SSleepFinishTransmission)sleepFinishTransmissionBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 98 | |||
| 99 | /** | ||
| 100 | * Upload AM3S data,Data type: Sync current active data | ||
| 101 | * @param currentActiveInfoBlock Total calories and steps for today, including parameters:Step、Calories、TotalCalories.Step:Number of steps taken today.Calories:Number of calories burned today.TotalCalories:Sum calories burned and bmr today. | ||
| 102 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 103 | */ | ||
| 104 | -(void)commandAM3SStartSyncCurrentActiveData:(DisposeAM3SGetCurrentActiveInfo)currentActiveInfoBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 105 | |||
| 106 | |||
| 107 | |||
| 108 | /** | ||
| 109 | * Upload AM3S report data. | ||
| 110 | * @param stageDataBlock Report data, including parameters:ReportStage_Work_out(1)、ReportStage_Sleep_summary(2).ReportStage_Work_out:Report Stage active,including parameters:Work_outCalories(Workout calories burned)、Work_outLengthNumber(Workout distance)、Work_outMeasureDate(Start time)、Work_outStepNumber(Workout number of steps)、Work_outTimeNumber(Length of workout)、dataID(data ID).ReportStage_Sleep_summary:Report Stage sleep,including parameters:Sleep_summaryMeasureDate(Sleep start time)、Sleep_summarySleepTime(Sleep duration)、Sleep_summarysleepAddMinute(Correct sleep duration length)、Sleep_summarysleepEfficiency(Sleep efficiency percentage, range is 0-100) | ||
| 111 | * @param stageDataFinishTransmissionBlock YES: Success,NO: Failed. | ||
| 112 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 113 | */ | ||
| 114 | -(void)commandAM3SStartSyncStageData:(DisposeAM3SStageMeasureDataBlock)stageDataBlock withStageDataFinishTransmission:(DisposeAM3SStageMeasureFinishBlock)stageDataFinishTransmissionBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 115 | |||
| 116 | |||
| 117 | /** | ||
| 118 | * Get totoal alarm infomation | ||
| 119 | * @param totoalAlarmInfoBlock Alarm array contains up to 3 alarms, each one needs the following parameters:AlarmId、Time、Week.AlarmId:1, 2, 3.Time:HH:mm.Week(Sun、Mon、Tue、Wed、Thu、Fri、Sat)True: On, False: Off | ||
| 120 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 121 | */ | ||
| 122 | -(void)commandAM3SGetTotoalAlarmInfo:(DisposeAM3STotoalAlarmData)totoalAlarmInfoBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 123 | |||
| 124 | /** | ||
| 125 | * Set alarm. | ||
| 126 | * @param alarmDic Alarm information, include parameters:AlarmId(1、2、3)、Time、IsRepeat、Switch、Week(Sun、Mon、Tue、Wed、Thu、Fri、Sat) | ||
| 127 | * @param finishResultBlock True: Alarm set successfully,False: Failed. | ||
| 128 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 129 | */ | ||
| 130 | -(void)commandAM3SSetAlarmDictionary:(NSDictionary *)alarmDic withFinishResult:(DisposeAM3SSetAlarmBlock)finishResultBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 131 | |||
| 132 | |||
| 133 | /** | ||
| 134 | * Delete alarm. | ||
| 135 | * @param alarmID alarmID:1, 2, 3. | ||
| 136 | * @param finishResultBlock True: Delete successful,False: Failed | ||
| 137 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 138 | */ | ||
| 139 | -(void)commandAM3SDeleteAlarmID:(NSNumber *)alarmID withFinishResult:(DisposeAM3SDeleteAlarmBlock)finishResultBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 140 | |||
| 141 | /** | ||
| 142 | * Get reminder. | ||
| 143 | * @param remindInfoBlock Array containing following parameters:ReminderID、Time、Switch.ReminderID:Reminder ID.Time:format HH:mm, time between reminders (HH*60+mm) minutes.Switch:Reminder on/off,True: On, False: Off. | ||
| 144 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 145 | */ | ||
| 146 | -(void)commandAM3SGetReminderInfo:(DisposeAM3SRemindInfoBlock)remindInfoBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 147 | |||
| 148 | /** | ||
| 149 | * Set reminders. | ||
| 150 | * @param reminderDic Array containing collowing parameters:Time、Switch。 | ||
| 151 | * @param finishResultBlock YES: Successfully set, NO: Failed. | ||
| 152 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 153 | */ | ||
| 154 | -(void)commandAM3SSetReminderDictionary:(NSDictionary *)reminderDic withFinishResult:(DisposeAM3SSetReminderBlock)finishResultBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 155 | |||
| 156 | |||
| 157 | |||
| 158 | /** | ||
| 159 | * Get device state infomation | ||
| 160 | * @param deviceStateInfoBlock AM status,State_wrist (AM3S being worn on the wrist),State_waist (AM3S worn with belt clip). | ||
| 161 | * @param batteryBlock AM battery percentage, from 0~100. | ||
| 162 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 163 | */ | ||
| 164 | -(void)commandAM3SGetDeviceStateInfo:(DisposeAM3SStateInfoBlock)deviceStateInfoBlock withBattery:(DisposeAM3SBatteryBlock)batteryBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 165 | |||
| 166 | /** | ||
| 167 | * Restore factory settings. | ||
| 168 | * @param resetDeviceBlock True: Success, False: Failed. | ||
| 169 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 170 | */ | ||
| 171 | -(void)commandAM3SResetDevice:(DisposeAM3SResetDeviceBlock)resetDeviceBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 172 | |||
| 173 | /** | ||
| 174 | * Disconnect AM3S connection. | ||
| 175 | * @param disconnectBlock True: Success,False: Failed. | ||
| 176 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 177 | */ | ||
| 178 | -(void)commandAM3SDisconnect:(DisposeAM3SDisconnectBlock)disconnectBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 179 | |||
| 180 | |||
| 181 | /** | ||
| 182 | * Get time format and nation | ||
| 183 | * @param timeAndNationBlock (AM3STimeFormat_hh,AM3STimeFormat_HH,AM3STimeFormat_NoEuropeAndhh,AM3STimeFormat_EuropeAndhh,AM3STimeFormat_NoEuropeAndHH,AM3STimeFormat_EuropeAndHH) | ||
| 184 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 185 | */ | ||
| 186 | -(void)commandAM3SGetTimeFormatAndNation:(DisposeAM3STimeFormatAndNationBlock)timeAndNationBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 187 | |||
| 188 | |||
| 189 | |||
| 190 | |||
| 191 | /** | ||
| 192 | * Get user infomation | ||
| 193 | * @param userInfoBlock including parameters:Age,Step,Height,Gender,Weight,Unit,goal(TotalStep1、TotalStep2、TotalStep3) | ||
| 194 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 195 | */ | ||
| 196 | -(void)commandAM3SGetUserInfo:(DisposeAM3SUserInfoBlock)userInfoBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 197 | |||
| 198 | |||
| 199 | |||
| 200 | /** | ||
| 201 | * Set BMR | ||
| 202 | * @param bmr ranging from 0 – 5000. | ||
| 203 | * @param finishResultBlock True: Delete successful,False: Failed | ||
| 204 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 205 | */ | ||
| 206 | -(void)commandAM3SSetBMR:(NSNumber *)bmr withFinishResult:(DisposeAM3SSetBMRBlock)finishResultBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 207 | |||
| 208 | |||
| 209 | |||
| 210 | |||
| 211 | |||
| 212 | /** | ||
| 213 | * Get Picture. | ||
| 214 | * @param pictureBlock Picture_one,Picture_two | ||
| 215 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 216 | */ | ||
| 217 | -(void)commandAM3SGetPicture:(DisposeAM3SGetPictureBlock)pictureBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 218 | |||
| 219 | /** | ||
| 220 | * Set Picture. | ||
| 221 | * @param pictures Picture_one,Picture_two | ||
| 222 | * @param finishResultBlock True: Success,False: Failed. | ||
| 223 | * @param errorBlock Communication error codes, see AM3S error descriptions. | ||
| 224 | */ | ||
| 225 | -(void)commandAM3SSetPicture:(AM3SPicture)pictures withFinishResult:(DisposeAM3SSetPictureBlock)finishResultBlock withErrorBlock:(DisposeAM3SErrorBlock)errorBlock; | ||
| 226 | |||
| 227 | @end | ||
