summaryrefslogtreecommitdiff
path: root/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/PT3SBT.h
blob: 5364d897fa77a5aaa6d7bce1c748f6bc42d23c79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
//
//  PT3SBT.h
//  iHealthSDKStatic
//
//  Created by user on 2020/9/7.
//  Copyright © 2020 ihealthSDK. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "PT3SBTMacroFile.h"
NS_ASSUME_NONNULL_BEGIN

@interface PT3SBT : NSObject

@property (strong, nonatomic) NSString *serialNumber;
@property (strong, nonatomic) NSString *currentUUID;

/**
 * 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)
 * @param function  A block to return the function and states that the device supports.
 * {
     MAC = D379D238F6B3;
     accessoryName = PT;
     firmwareVersion = "1.1.0";
     hardwareVersion = "1.0.0";
     manufaturer = iHealth;
     modelNumber = PT3SBT;
     protocol = "com.jiuan.PT3SBT";
 }
 * @param disposeErrorBlock  A block to refer ‘error’ in ‘Establish measurement connection’ in PT3SBT.
 */
-(void)commandFunction:(DisposePT3SBTDeviceFunctionBlock)function DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock;

/**
 *Get  Battery

 * @param battery  [Range:0~100]%
 * @param disposeErrorBlock error code
 */
-(void)commandGetPT3SBTBattery:(DisposePT3SBTBatteryBlock)battery DiaposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock;


/**
 * Set Unit
 * @param unitState
 * /// Degrees Celsius
    PT3SBTTemperatureUnit_C=1,
    /// Fahrenheit
    PT3SBTTemperatureUnit_F,
 * @param disposeSetUnitResult YES:success NO:fail
 * @param disposeErrorBlock This block returns error codes,please refer to error codes list in PT3SBTMacroFile.
 */
-(void)commandPT3SBTSetUnit:(PT3SBTTemperatureUnit)unitState
   DisposeSetUnitResult:(DisposePT3SBTSetUnit)disposeSetUnitResult
    DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock;

/**
 * Get Unit
 * @param disposeGetUnitResult  PT3SBTTemperatureUnit
 * @param disposeErrorBlock This block returns error codes,please refer to error codes list in PT3SBTMacroFile.
 */
-(void)commandPT3SBTGetUnit:(DisposePT3SBTGetUnit)disposeGetUnitResult
    DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock;

/**
 * Get memory data count
 * @param disposeMemoryCount  count
 * @param disposeErrorBlock This block returns error codes,please refer to error codes list in PT3SBTMacroFile.
 */
-(void)commandPT3SBTGetMemoryCount:(DisposePT3SBTGetMemoryCount)disposeMemoryCount
    DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock;

/**
 Tranfer offline history records.
 For PT3SBT, after calling this method, you should call commandDeleteMemorryData: method. Otherwise, the measure date may be wrong.
 [
 {
     Distance = 1783;
     TS = 1600064558;
     Tamb = 274;
     Tbody = 3520;
     Tex = 268;
     Tobj = 273;
     Vbat = 282;
 }
]
 @param disposeMemoryData The offline history records detail, result means result, date means the measurement time.
 @param disposeErrorBlock This block returns error codes,please refer to error codes list in PT3SBTMacroFile.
 */
-(void)commandGetMemorryData:(DisposePT3SBTMemoryData)disposeMemoryData
              DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock;

/**
 Delete offline history records

 @param disposeDeleteData  YES or NO
 @param disposeErrorBlock This block returns error codes,please refer to error codes list in PT3SBTMacroFile.
 */
-(void)commandDeleteMemorryData:(DisposePT3SBTDeleteData)disposeDeleteData
            DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock;

/**
 Measure data  Notification

  PT3SBTNotificationGetResult
 
 You need to listen to this message to get real-time measurements
 
 Content of measurement results:
 {
     Distance = 1663;
     Tamb = 275;
     Tbody = 3521;
     Tex = 269;
     Tobj = 274;
     Vbat = 281;
 }
*/

/**
 PT3SBT unit  change  Notification

  PT3SBTNotificationDeviceUnitChange
 
 If the PT3SBT unit changes, you will receive this notification
 
   /// Degrees Celsius
    PT3SBTTemperatureUnit_C=1,
    /// Fahrenheit
    PT3SBTTemperatureUnit_F,
 
 Content of PT3SBTNotificationDeviceUnitChange  results:
 {
     unit=1;
 }
*/

/**
 Get Device Info

 @param disposeDeviceInfo   device info
 {
     "Amb16_OBJ37_Temp" = 4209;
     "Amb25_ByCb2" = 2459;
     "Amb25_NtcR25" = 10028;
     "Check_AmbTemp" = 2438;
     "Corr16_AmbTemp" = 1807;
     "Corr25_AmbTemp" = 2484;
     "Corr_k1_Value" = 10336;
     "Corr_k2_Value" = 9896;
     "Distance_CorrValue" = 284;
     Version = 1112;
     VersionDate = 200904;
 }
 @param disposeErrorBlock This block returns error codes,please refer to error codes list in PT3SBTMacroFile.
 */
-(void)commandGetDeviceInfo:(DisposePT3SBTDeviceInfo)disposeDeviceInfo
            DisposeErrorBlock:(DisposePT3SBTErrorBlock)disposeErrorBlock;

/**
 * Disconnect current device
 */
-(void)commandDisconnectDevice;

@end

NS_ASSUME_NONNULL_END