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/HS5.h | |
| parent | e4fb9966e762852bf17f21c8406501d42fae0b61 (diff) | |
Local iHealth SDK, device detail screen, iOS event fixes
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/HS5.h')
| -rw-r--r-- | libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/HS5.h | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/HS5.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/HS5.h new file mode 100644 index 0000000..632ca4f --- /dev/null +++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/HS5.h | |||
| @@ -0,0 +1,141 @@ | |||
| 1 | // | ||
| 2 | // HS5.h | ||
| 3 | // testShareCommunication | ||
| 4 | // | ||
| 5 | // Created by zhiwei jing on 13-10-22. | ||
| 6 | // Copyright (c) 2013年 my. All rights reserved. | ||
| 7 | // | ||
| 8 | |||
| 9 | #import <Foundation/Foundation.h> | ||
| 10 | #import "HealthUser.h" | ||
| 11 | #import "HSMacroFile.h" | ||
| 12 | |||
| 13 | |||
| 14 | |||
| 15 | /** | ||
| 16 | HS5 | ||
| 17 | */ | ||
| 18 | @interface HS5 : NSObject | ||
| 19 | |||
| 20 | @property (retain, nonatomic) NSString *currentUUID; | ||
| 21 | @property (retain, nonatomic) NSString *deviceID; | ||
| 22 | @property (retain, nonatomic) NSString *firmwareVersion; | ||
| 23 | @property (retain, nonatomic) NSString *modelNumber; | ||
| 24 | |||
| 25 | |||
| 26 | |||
| 27 | /** | ||
| 28 | Establish memory and measurement connection | ||
| 29 | |||
| 30 | Import Parameters: | ||
| 31 | @param tempUser included properties: userAccount、clientID、clientSecret。 | ||
| 32 | userAccount: either email or mobile phone number (mobile phone number is not currently supported yet) | ||
| 33 | height: the height of a user (cm); | ||
| 34 | clientID & clientSecret: the only identification for users of the SDK, requires registration from iHealth administrator, please email: heguangming@ihealthlabs.com.cn for more information. | ||
| 35 | |||
| 36 | Return Parameters: | ||
| 37 | The measurement via SDK will be operated in the case of 1-3, and will be terminated if any of 4-8 occurs. The interface needs to be re-called after analyzing the return parameters. | ||
| 38 | Notice: when a new user registers via SDK, an ‘iHealth disclaimer’ will pop up automatically, and will require the user to agree in order to continue. SDK applications require an Internet connection; UserAuthen_TrySuccess is invalidate for HS5. | ||
| 39 | @param serialNub The only identification of a user,should be reserved in third party apps,provide to other Apps [Range:0~0xFFFFFFF] | ||
| 40 | @param MemorryUserListHS5Data Existing user info in HS5,including serialNub、Position of users. Related key: serialNumber、position | ||
| 41 | @param disposeErrorBlock error codes in transmission process: Errors in HS5 | ||
| 42 | */ | ||
| 43 | -(void)commandCreateUserManageConnectWithUser:(HealthUser *)tempUser currentUserSerialNub:(CurrentSerialNub)serialNub deviceUserList:(MemorryUserListHS5Data) MemorryUserListHS5Data Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock; | ||
| 44 | |||
| 45 | /** | ||
| 46 | * Create new user | ||
| 47 | * Use the function if the SerialNub of current user is not included in user list of HS5 and the user number is less than 20 | ||
| 48 | * Import parameters: | ||
| 49 | * @param tempUser - included properties: serialNub、age、birthday、height、isAthlete、sex。 | ||
| 50 | * serialNub: The only identification for user [Range:0~0x7FFFFFFF] | ||
| 51 | * age:user's age Range:7~99 | ||
| 52 | * birthday: User’s birthday, NSDate | ||
| 53 | * height: User’s height, (cm) Range:81~219 | ||
| 54 | * isAthlete: If user is an athelete, UserIsAthelete_No: no, UserIsAthelete_Yes: Yes | ||
| 55 | * sex: User’s sex, UserSex_Female: female, UserSex_Male: male | ||
| 56 | * @param tempPosition - Position of user, range: 0~19, pick from empty position that has never been occupied | ||
| 57 | * Return Parameters: | ||
| 58 | * @param disposeHS5Result - Success:Yes,Fail:No. | ||
| 59 | * @param disposeErrorBlock - error codes in transmission process: Errors in HS5 | ||
| 60 | */ | ||
| 61 | -(void)commandCreateUser:(HealthUser *)tempUser position:(uint8_t )tempPosition DisposeHS5Result:(DisposeHS5Result)disposeHS5Result Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock; | ||
| 62 | |||
| 63 | |||
| 64 | /** | ||
| 65 | * Edit User Info | ||
| 66 | * If the SerialNub of current user already exists in the user list of HS5, this will be used when user info is changed. | ||
| 67 | *Import Parameters: | ||
| 68 | * @param tempUser - included properties: serialNub、birthday、height、isAthlete、sex,instructions refer to “new user Api”. | ||
| 69 | *Return Parameters: | ||
| 70 | * @param disposeHS5Result - Success:Yes,Fail:No. | ||
| 71 | * @param disposeErrorBlock - error codes in transmission process: Errors in HS5 | ||
| 72 | */ | ||
| 73 | -(void)commandModifyUser:(HealthUser *)tempUser DisposeHS5Result:(DisposeHS5Result)disposeHS5Result Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock; | ||
| 74 | |||
| 75 | /** | ||
| 76 | * Delete Specified User | ||
| 77 | * This will be used deleting account in HS5. | ||
| 78 | *Import Parameters: | ||
| 79 | * @param tempUser - included properties: serialNub,instructions refer to “new user Api”. | ||
| 80 | *Return Parameters: | ||
| 81 | * @param disposeHS5Result - Success:Yes,Fail:No. | ||
| 82 | * @param disposeErrorBlock - error codes in transmission proces: Errors in HS5 | ||
| 83 | */ | ||
| 84 | -(void)commandDelteUser:(HealthUser *)tempUser DisposeHS5Result:(DisposeHS5Result)disposeHS5Result Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock; | ||
| 85 | |||
| 86 | |||
| 87 | |||
| 88 | |||
| 89 | /** | ||
| 90 | Create memory upload connection | ||
| 91 | Import Parameters: | ||
| 92 | @param tempUser included properties: serialNub [Range:0~0x7FFFFFFF],instructions refer to “new user Api”. | ||
| 93 | Return Parameters: | ||
| 94 | @param disposeHS5Result Success:Yes,Fail:No. | ||
| 95 | @param startTransmission Finish memory transmission. | ||
| 96 | @param progress Memory transmission progress,0.0~1.0. | ||
| 97 | @param memorryData Record data,More details and key refer Measure API. Additionally add time-measure property, related key: date.dataID | ||
| 98 | @param finishTransmission Finish Memory Transmission | ||
| 99 | @param disposeErrorBlock error codes in transmission process: Errors in HS5 | ||
| 100 | */ | ||
| 101 | -(void)commandCreateMemoryWithUser:(HealthUser *)tempUser uploadConnect: (DisposeHS5Result)disposeHS5Result TransferMemorryData:(StartHS5Transmission)startTransmission DisposeProgress:(DisposeHS5Progress)progress MemorryData:(MemorryHS5Data)memorryData FinishTransmission:(FinishHS5Transmission)finishTransmission Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock; | ||
| 102 | |||
| 103 | |||
| 104 | /** | ||
| 105 | * Establish Measurement Connection | ||
| 106 | * Import Parameters: | ||
| 107 | * @param tempUser - included properties: serialNub [Range:0~0x7FFFFFFF]、height,instructions refer to “new user Api”. | ||
| 108 | * Return Parameters: | ||
| 109 | * @param unStableHS5Weight - Current weight, (kg) [Value Range:0.0~150.0] | ||
| 110 | * @param stableHS5Weight - Stable weight, (kg) [Value Range:0.0~150.0] | ||
| 111 | * @param impedanceWeight - Weight by impedence, (kg)[Value Range:0.0~150.0] | ||
| 112 | * @param bodyCompositionMeasurements - body info, includes weight(kg) Range:0.0~150.0, fat content(%) Rnage:0.0~100.0, water content(%) Range:0.0~100.0, muscle content(%) Rnage:0.0~100.0, bone mass Range:0.0~25.5, visceral fat level Range:0~255, DCI(Kcal) Range:0~65535. keys: weight, weightFatValue, waterValue, muscleValue, skeletonValue, VFatLevelValue, DCIValue, dataID | ||
| 113 | * @param disposeErrorBlock - error codes in transmission process: Errors in HS5 | ||
| 114 | */ | ||
| 115 | |||
| 116 | -(void)commandCreateMeasureWithUser:(HealthUser *)tempUser unStableWeight:(UnStableHS5Weight)unStableHS5Weight MeasureWeight:(StableHS5Weight)stableHS5Weight ImpedanceType:(ImpedanceWeight)impedanceWeight BodyCompositionMeasurements:(BodyCompositionMeasurements)bodyCompositionMeasurements Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock; | ||
| 117 | |||
| 118 | |||
| 119 | |||
| 120 | |||
| 121 | /** | ||
| 122 | Stop Current Action and disconnect | ||
| 123 | Return Parameters: | ||
| 124 | @param disposeHS5Result Success:Yes,Fail:No. | ||
| 125 | @param disposeErrorBlock error codes in endCurrentConnect: Errors in HS5 | ||
| 126 | */ | ||
| 127 | -(void)commandEndCurrentConnect:(DisposeHS5Result)disposeHS5Result Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock; | ||
| 128 | /** | ||
| 129 | * Clean HS5 | ||
| 130 | * Explanation:Delete current Auten Device and then rebuild connection. | ||
| 131 | * Return Parameters: | ||
| 132 | * @param disposeHS5Result - Success:Yes,Fail:No. | ||
| 133 | * @param disposeErrorBlock - error codes in transmission process: Errors in HS5 | ||
| 134 | */ | ||
| 135 | -(void)commandcleanDeviceDisposeHS5Result:(DisposeHS5Result)disposeHS5Result Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock; | ||
| 136 | |||
| 137 | /** | ||
| 138 | * Rebuild UDP connection | ||
| 139 | */ | ||
| 140 | -(void)commandRebuildUdpLinker; | ||
| 141 | @end | ||
