diff options
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/PT3SBT.h')
| -rw-r--r-- | libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/PT3SBT.h | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/PT3SBT.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/PT3SBT.h new file mode 100644 index 0000000..5364d89 --- /dev/null +++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/PT3SBT.h | |||
| @@ -0,0 +1,167 @@ | |||
| 1 | // | ||
| 2 | // PT3SBT.h | ||
| 3 | // iHealthSDKStatic | ||
| 4 | // | ||
| 5 | // Created by user on 2020/9/7. | ||
| 6 | // Copyright © 2020 ihealthSDK. All rights reserved. | ||
| 7 | // | ||
| 8 | |||
| 9 | #import <Foundation/Foundation.h> | ||
| 10 | #import "PT3SBTMacroFile.h" | ||
| 11 | NS_ASSUME_NONNULL_BEGIN | ||
| 12 | |||
| 13 | @interface PT3SBT : NSObject | ||
| 14 | |||
| 15 | @property (strong, nonatomic) NSString *serialNumber; | ||
| 16 | @property (strong, nonatomic) NSString *currentUUID; | ||
| 17 | |||
| 18 | /** | ||
| 19 | * Get device IDPS (After the PT3SBT device is successfully connected, the interface must be called to synchronize the device time. Otherwise, the offline data measurement time error will be caused) | ||
| 20 | * @param function A block to return the function and states that the device supports. | ||
| 21 | * { | ||
| 22 | MAC = D379D238F6B3; | ||
| 23 | accessoryName = PT; | ||
| 24 | firmwareVersion = "1.1.0"; | ||
| 25 | hardwareVersion = "1.0.0"; | ||
| 26 | manufaturer = iHealth; | ||
| 27 | modelNumber = PT3SBT; | ||
| 28 | protocol = "com.jiuan.PT3SBT"; | ||
| 29 | } | ||
| 30 | * @param disposeErrorBlock A block to refer ‘error’ in ‘Establish measurement connection’ in PT3SBT. | ||
| 31 | */ | ||
| 32 | -(void)commandFunction:(DisposePT3SBTDeviceFunctionBlock)function DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock; | ||
| 33 | |||
| 34 | /** | ||
| 35 | *Get Battery | ||
| 36 | |||
| 37 | * @param battery [Range:0~100]% | ||
| 38 | * @param disposeErrorBlock error code | ||
| 39 | */ | ||
| 40 | -(void)commandGetPT3SBTBattery:(DisposePT3SBTBatteryBlock)battery DiaposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock; | ||
| 41 | |||
| 42 | |||
| 43 | /** | ||
| 44 | * Set Unit | ||
| 45 | * @param unitState | ||
| 46 | * /// Degrees Celsius | ||
| 47 | PT3SBTTemperatureUnit_C=1, | ||
| 48 | /// Fahrenheit | ||
| 49 | PT3SBTTemperatureUnit_F, | ||
| 50 | * @param disposeSetUnitResult YES:success NO:fail | ||
| 51 | * @param disposeErrorBlock This block returns error codes,please refer to error codes list in PT3SBTMacroFile. | ||
| 52 | */ | ||
| 53 | -(void)commandPT3SBTSetUnit:(PT3SBTTemperatureUnit)unitState | ||
| 54 | DisposeSetUnitResult:(DisposePT3SBTSetUnit)disposeSetUnitResult | ||
| 55 | DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock; | ||
| 56 | |||
| 57 | /** | ||
| 58 | * Get Unit | ||
| 59 | * @param disposeGetUnitResult PT3SBTTemperatureUnit | ||
| 60 | * @param disposeErrorBlock This block returns error codes,please refer to error codes list in PT3SBTMacroFile. | ||
| 61 | */ | ||
| 62 | -(void)commandPT3SBTGetUnit:(DisposePT3SBTGetUnit)disposeGetUnitResult | ||
| 63 | DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock; | ||
| 64 | |||
| 65 | /** | ||
| 66 | * Get memory data count | ||
| 67 | * @param disposeMemoryCount count | ||
| 68 | * @param disposeErrorBlock This block returns error codes,please refer to error codes list in PT3SBTMacroFile. | ||
| 69 | */ | ||
| 70 | -(void)commandPT3SBTGetMemoryCount:(DisposePT3SBTGetMemoryCount)disposeMemoryCount | ||
| 71 | DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock; | ||
| 72 | |||
| 73 | /** | ||
| 74 | Tranfer offline history records. | ||
| 75 | For PT3SBT, after calling this method, you should call commandDeleteMemorryData: method. Otherwise, the measure date may be wrong. | ||
| 76 | [ | ||
| 77 | { | ||
| 78 | Distance = 1783; | ||
| 79 | TS = 1600064558; | ||
| 80 | Tamb = 274; | ||
| 81 | Tbody = 3520; | ||
| 82 | Tex = 268; | ||
| 83 | Tobj = 273; | ||
| 84 | Vbat = 282; | ||
| 85 | } | ||
| 86 | ] | ||
| 87 | @param disposeMemoryData The offline history records detail, result means result, date means the measurement time. | ||
| 88 | @param disposeErrorBlock This block returns error codes,please refer to error codes list in PT3SBTMacroFile. | ||
| 89 | */ | ||
| 90 | -(void)commandGetMemorryData:(DisposePT3SBTMemoryData)disposeMemoryData | ||
| 91 | DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock; | ||
| 92 | |||
| 93 | /** | ||
| 94 | Delete offline history records | ||
| 95 | |||
| 96 | @param disposeDeleteData YES or NO | ||
| 97 | @param disposeErrorBlock This block returns error codes,please refer to error codes list in PT3SBTMacroFile. | ||
| 98 | */ | ||
| 99 | -(void)commandDeleteMemorryData:(DisposePT3SBTDeleteData)disposeDeleteData | ||
| 100 | DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock; | ||
| 101 | |||
| 102 | /** | ||
| 103 | Measure data Notification | ||
| 104 | |||
| 105 | PT3SBTNotificationGetResult | ||
| 106 | |||
| 107 | You need to listen to this message to get real-time measurements | ||
| 108 | |||
| 109 | Content of measurement results: | ||
| 110 | { | ||
| 111 | Distance = 1663; | ||
| 112 | Tamb = 275; | ||
| 113 | Tbody = 3521; | ||
| 114 | Tex = 269; | ||
| 115 | Tobj = 274; | ||
| 116 | Vbat = 281; | ||
| 117 | } | ||
| 118 | */ | ||
| 119 | |||
| 120 | /** | ||
| 121 | PT3SBT unit change Notification | ||
| 122 | |||
| 123 | PT3SBTNotificationDeviceUnitChange | ||
| 124 | |||
| 125 | If the PT3SBT unit changes, you will receive this notification | ||
| 126 | |||
| 127 | /// Degrees Celsius | ||
| 128 | PT3SBTTemperatureUnit_C=1, | ||
| 129 | /// Fahrenheit | ||
| 130 | PT3SBTTemperatureUnit_F, | ||
| 131 | |||
| 132 | Content of PT3SBTNotificationDeviceUnitChange results: | ||
| 133 | { | ||
| 134 | unit=1; | ||
| 135 | } | ||
| 136 | */ | ||
| 137 | |||
| 138 | /** | ||
| 139 | Get Device Info | ||
| 140 | |||
| 141 | @param disposeDeviceInfo device info | ||
| 142 | { | ||
| 143 | "Amb16_OBJ37_Temp" = 4209; | ||
| 144 | "Amb25_ByCb2" = 2459; | ||
| 145 | "Amb25_NtcR25" = 10028; | ||
| 146 | "Check_AmbTemp" = 2438; | ||
| 147 | "Corr16_AmbTemp" = 1807; | ||
| 148 | "Corr25_AmbTemp" = 2484; | ||
| 149 | "Corr_k1_Value" = 10336; | ||
| 150 | "Corr_k2_Value" = 9896; | ||
| 151 | "Distance_CorrValue" = 284; | ||
| 152 | Version = 1112; | ||
| 153 | VersionDate = 200904; | ||
| 154 | } | ||
| 155 | @param disposeErrorBlock This block returns error codes,please refer to error codes list in PT3SBTMacroFile. | ||
| 156 | */ | ||
| 157 | -(void)commandGetDeviceInfo:(DisposePT3SBTDeviceInfo)disposeDeviceInfo | ||
| 158 | DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock; | ||
| 159 | |||
| 160 | /** | ||
| 161 | * Disconnect current device | ||
| 162 | */ | ||
| 163 | -(void)commandDisconnectDevice; | ||
| 164 | |||
| 165 | @end | ||
| 166 | |||
| 167 | NS_ASSUME_NONNULL_END | ||
