summaryrefslogtreecommitdiff
path: root/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG5.h
diff options
context:
space:
mode:
authorhc <haocheng.xie@respiree.com>2026-04-13 15:17:52 +0800
committerhc <haocheng.xie@respiree.com>2026-04-13 15:17:52 +0800
commitd6d9a09d505d11148599a95a5be3e1351edbe0ac (patch)
treea5f5891983d1ff207e99f683a5e151519cef4980 /libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG5.h
parente4fb9966e762852bf17f21c8406501d42fae0b61 (diff)
Local iHealth SDK, device detail screen, iOS event fixes
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG5.h')
-rw-r--r--libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG5.h158
1 files changed, 158 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG5.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG5.h
new file mode 100644
index 0000000..79d6a58
--- /dev/null
+++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG5.h
@@ -0,0 +1,158 @@
1//
2// BG5.h
3// testShareCommunication
4//
5// Created by daiqingquan on 14-1-16.
6// Copyright (c) 2014年 my. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import "BGMacroFile.h"
11
12
13/**
14 BG5
15 */
16@interface BG5 : BGDevice
17
18/**
19 Set Time
20 @param disposeBGSetTime The block return YES means set success, NO means set fail.
21 @param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
22 @note Time is local time
23 */
24-(void)commandBGSetTime:(DisposeBGSetTime)disposeBGSetTime
25 DisposeBGErrorBlock:(DisposeBGErrorBlock)disposeBGErrorBlock;
26
27/**
28 * Set Unit displayed in BG5's screen
29 * @param unitState The block return YES means set success, NO means set fail.
30 * @param disposeBGSetUnitResult YES:success NO:fail
31 * @param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
32 */
33-(void)commandBGSetUnit:(BGUnit )unitState
34 DisposeSetUnitResult:(DisposeBGSetUnit)disposeBGSetUnitResult
35 DisposeBGErrorBlock:(DisposeBGErrorBlock)disposeBGErrorBlock;
36
37/**
38 * Query battery remaining energy
39 * @param disposeBatteryBlock A block to return the device battery remaining energy percentage, ‘80’ stands for 80%. 255 means device in charging.
40 * @param disposeErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
41 */
42-(void)commandQueryBattery:(DisposeBGBatteryBlock)disposeBatteryBlock
43 DisposeErrorBlock:(DisposeBGErrorBlock)disposeErrorBlock;
44
45/**
46 Tranfer offline history records.
47 For BG5 V3.0, after calling this method, you should call commandDeleteMemorryData: method. Otherwise, the measure date may be wrong.
48
49 @param disposeBGDataCount The number of the records in the meter memory.
50 @param disposeBGHistoryData The offline history records detail, result means result, date means the measurement time.
51 @param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
52 */
53-(void)commandTransferMemorryData:(DisposeBGDataCount)disposeBGDataCount
54 DisposeBGHistoryData:(DisposeBGHistoryData)disposeBGHistoryData
55 DisposeBGErrorBlock:(DisposeBGErrorBlock)disposeBGErrorBlock;
56
57/**
58 Delete offline history records
59
60 @param DisposeBGDeleteData deleteOk YES or NO
61 @param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
62 */
63-(void)commandDeleteMemorryData:(DisposeBGDeleteData)DisposeBGDeleteData
64 DisposeBGErrorBlock:(DisposeBGErrorBlock)disposeBGErrorBlock;
65
66/**
67 * Send code with type (Note: After you got the CTL test results, you need to send the blood Code again.)
68 * @param testType Set the measure test type,@1 is Blood Test,@2 is CTL Test.
69 * @param codeType Set the code type,@1 is GOD,@2 is GDH.
70 * @param encodeString The code String gets by scanning the QR code. Only used when codetype is GOD
71 * @param date The strip expired date. support Jan 1,2000 to Dec 31, 2099. If other value, return BG5Error_InputParametersError.
72 * @param num the number of remaining strips,ranging from 1-255.
73 * @param disposeBGSendCodeBlock YES means success, NO means fail.
74 * @param disposeBGStartModel The boot mode of the BG meter, BGOpenMode_Strip means booting the meter by sliding the strip, BGOpenMode_Hand means booting the meter by pressing the on/off button. commandCreateBGtestStripInBlock should be called after recieving BGOpenMode_Strip, commandCreateBGtestModel should be called after recieving BGOpenMode_Hand.
75 * @param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
76 */
77-(void)commandSendBGCodeWithMeasureType:(BGMeasureMode)testType
78 CodeType:(BGCodeMode)codeType
79 CodeString:(NSString*)encodeString
80 validDate:(NSDate*)date
81 remainNum:(NSNumber*)num
82 DisposeBGSendCodeBlock:(DisposeBGSendCodeBlock)disposeBGSendCodeBlock
83 DisposeBGStartModel:(DisposeBGStartModel)disposeBGStartModel
84 DisposeBGErrorBlock:(DisposeBGErrorBlock)disposeBGErrorBlock;
85
86/**
87 * Read the information of the strip from the BG meter
88 * @param disposeBGCodeDic This block returns the information of the strip, Strips means the number of strips which has been used, Date means expired date.
89 * @param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
90 */
91-(void)commandReadBGCodeDic:(DisposeBGCodeDic)disposeBGCodeDic
92 DisposeBGErrorBlock:(DisposeBGErrorBlock)disposeBGErrorBlock;
93
94/**
95 *Send BottleID to the BG meter
96 *@param bottleID bottleID, 4 bytes,0x00000000-0xFFFFFFFF
97 *@param disposeBGSendBottleIDBlock The block return YES means set success, NO means set fail.
98 *@param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
99 */
100-(void)commandSendBottleID:(long long)bottleID
101DisposeBGSendBottleIDBlock:(DisposeBGSendBottleIDBlock)disposeBGSendBottleIDBlock
102 DisposeBGErrorBlock:(DisposeBGErrorBlock)disposeBGErrorBlock;
103
104/**
105 * Get the bottleID stored in the BG meter
106 * @param disposeBGBottleID This block returns the ID which is stored in the BG meter, to verify if the strip that has been used is from the same bottle of the registered one. if not match, the app will notify the user need scan the new bottle; If match, the app can get the number of used strips and expire date.
107 * @param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
108 */
109
110-(void)commandBGGetBottleID:(DisposeBGBottleID)disposeBGBottleID
111 DisposeBGErrorBlock:(DisposeBGErrorBlock)disposeBGErrorBlock;
112
113/**
114 Strip-Sliding booting mode
115
116 @param disposeBGStripInBlock This block returns yes means strip slides in.
117 @param disposeBGBloodBlock This block returns yes means the blood drop has beed sensed from the strip.
118 @param disposeBGResultBlock This block returns the measurement by the unit of mg/dL, range from 20-600.
119 @param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
120
121 */
122-(void)commandCreateBGtestStripInBlock:(DisposeBGStripInBlock)disposeBGStripInBlock
123 DisposeBGBloodBlock:(DisposeBGBloodBlock)disposeBGBloodBlock
124 DisposeBGResultBlock:(DisposeBGResultBlock)disposeBGResultBlock
125 DisposeBGErrorBlock:(DisposeBGErrorBlock)disposeBGErrorBlock;
126
127
128/**
129 * Button-pressing booting mode
130 * @param testMode Set the measurement mode,must be the same as the testType in send code method, BGMeasureMode_Blood means blood measurement mode, BGMeasureMode_NoBlood means control solution measurement mode.
131 * @param disposeBGStripInBlock This block returns yes means strip slides in.
132 * @param disposeBGBloodBlock This block returns yes means the blood drop has beed sensed from the strip.
133 * @param disposeBGResultBlock This block returns the measurement by the unit of mg/dL, range from 20-600.
134 * @param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
135 */
136-(void)commandCreateBGtestModel:(BGMeasureMode)testMode
137 DisposeBGStripInBlock:(DisposeBGStripInBlock)disposeBGStripInBlock
138 DisposeBGBloodBlock:(DisposeBGBloodBlock)disposeBGBloodBlock
139 DisposeBGResultBlock:(DisposeBGResultBlock)disposeBGResultBlock
140 DisposeBGErrorBlock:(DisposeBGErrorBlock)disposeBGErrorBlock;
141
142/**
143 * Keep the connection to enable enough time for operation such as scan code, insert strip and drop blood.
144 * @param disposeBG5KeepConnectBlock A block returns the result of the keeping connection order,'YES' means setting success,'NO' means fail.
145 * @param disposeErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
146 */
147-(void)commandKeepConnect:(DisposeBG5KeepConnectBlock)disposeBG5KeepConnectBlock
148 DisposeErrorBlock:(DisposeBGErrorBlock)disposeErrorBlock;
149
150/**
151 Analyze code include bottleID,DueDate and the number of strips. Only Available for GOD Code
152
153 @param encodeString The code String gets by scanning the QR code.
154 @return return a dictionary contains keys such as @"BottleID",@"StripNum",@"DueDate"; return nil if input parameter is GDH code or code is invalid.
155 */
156-(NSDictionary *)codeStripStrAnalysis:(NSString *)encodeString;
157
158@end