capacitor-plugin-ihealth 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CapacitorPluginIhealth.podspec +35 -0
- package/README.md +214 -0
- package/android/build.gradle +58 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/managemyhealth/plugins/ihealth/ihealth.java +11 -0
- package/android/src/main/java/com/managemyhealth/plugins/ihealth/ihealthPlugin.java +22 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +450 -0
- package/dist/esm/definitions.d.ts +29 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +37 -0
- package/dist/esm/web.js +42 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +58 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +61 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/Plugin-Bridging-Header.h +35 -0
- package/ios/Plugin/iHealthSDKHeaders/ABI.h +82 -0
- package/ios/Plugin/iHealthSDKHeaders/ABIController.h +28 -0
- package/ios/Plugin/iHealthSDKHeaders/ABPM.h +144 -0
- package/ios/Plugin/iHealthSDKHeaders/ABPMController.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/AM3.h +188 -0
- package/ios/Plugin/iHealthSDKHeaders/AM3Controller.h +29 -0
- package/ios/Plugin/iHealthSDKHeaders/AM3SController_V2.h +29 -0
- package/ios/Plugin/iHealthSDKHeaders/AM3S_V2.h +227 -0
- package/ios/Plugin/iHealthSDKHeaders/AM4.h +223 -0
- package/ios/Plugin/iHealthSDKHeaders/AM4Controller.h +31 -0
- package/ios/Plugin/iHealthSDKHeaders/AM5.h +335 -0
- package/ios/Plugin/iHealthSDKHeaders/AM5Controller.h +30 -0
- package/ios/Plugin/iHealthSDKHeaders/AM5Header.h +20 -0
- package/ios/Plugin/iHealthSDKHeaders/AMHeader.h +27 -0
- package/ios/Plugin/iHealthSDKHeaders/AMMacroFile.h +1171 -0
- package/ios/Plugin/iHealthSDKHeaders/BG1.h +53 -0
- package/ios/Plugin/iHealthSDKHeaders/BG1Controller.h +46 -0
- package/ios/Plugin/iHealthSDKHeaders/BG1S.h +64 -0
- package/ios/Plugin/iHealthSDKHeaders/BG1SController.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/BG3.h +83 -0
- package/ios/Plugin/iHealthSDKHeaders/BG3Controller.h +28 -0
- package/ios/Plugin/iHealthSDKHeaders/BG5.h +158 -0
- package/ios/Plugin/iHealthSDKHeaders/BG5Controller.h +28 -0
- package/ios/Plugin/iHealthSDKHeaders/BG5S.h +294 -0
- package/ios/Plugin/iHealthSDKHeaders/BG5SController.h +29 -0
- package/ios/Plugin/iHealthSDKHeaders/BGController.h +32 -0
- package/ios/Plugin/iHealthSDKHeaders/BGDevice.h +42 -0
- package/ios/Plugin/iHealthSDKHeaders/BGHeader.h +23 -0
- package/ios/Plugin/iHealthSDKHeaders/BGMacroFile.h +507 -0
- package/ios/Plugin/iHealthSDKHeaders/BP3.h +77 -0
- package/ios/Plugin/iHealthSDKHeaders/BP3Controller.h +27 -0
- package/ios/Plugin/iHealthSDKHeaders/BP3L.h +58 -0
- package/ios/Plugin/iHealthSDKHeaders/BP3LController.h +30 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5.h +32 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5C.h +131 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5CController.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5Controller.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5S.h +97 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5SController.h +27 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5SRW.h +101 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5SRWController.h +26 -0
- package/ios/Plugin/iHealthSDKHeaders/BP7.h +141 -0
- package/ios/Plugin/iHealthSDKHeaders/BP7Controller.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/BP7S.h +106 -0
- package/ios/Plugin/iHealthSDKHeaders/BP7SController.h +32 -0
- package/ios/Plugin/iHealthSDKHeaders/BPAV10Device.h +15 -0
- package/ios/Plugin/iHealthSDKHeaders/BPBTLEDevice.h +17 -0
- package/ios/Plugin/iHealthSDKHeaders/BPBV10Device.h +20 -0
- package/ios/Plugin/iHealthSDKHeaders/BPContinua.h +56 -0
- package/ios/Plugin/iHealthSDKHeaders/BPContinuaController.h +30 -0
- package/ios/Plugin/iHealthSDKHeaders/BPController.h +40 -0
- package/ios/Plugin/iHealthSDKHeaders/BPDevice.h +131 -0
- package/ios/Plugin/iHealthSDKHeaders/BPHeader.h +54 -0
- package/ios/Plugin/iHealthSDKHeaders/BPLoopMeasureSettingModel.h +120 -0
- package/ios/Plugin/iHealthSDKHeaders/BPM1AE.h +80 -0
- package/ios/Plugin/iHealthSDKHeaders/BPMacroFile.h +247 -0
- package/ios/Plugin/iHealthSDKHeaders/BPV24Device.h +16 -0
- package/ios/Plugin/iHealthSDKHeaders/BPV25Device.h +17 -0
- package/ios/Plugin/iHealthSDKHeaders/ConnectDeviceController.h +27 -0
- package/ios/Plugin/iHealthSDKHeaders/DFUController.h +160 -0
- package/ios/Plugin/iHealthSDKHeaders/DFUDeviceFirmwareInfo.h +56 -0
- package/ios/Plugin/iHealthSDKHeaders/DFUHeader.h +19 -0
- package/ios/Plugin/iHealthSDKHeaders/DFUMacro.h +264 -0
- package/ios/Plugin/iHealthSDKHeaders/DFUServerFirmwareInfo.h +48 -0
- package/ios/Plugin/iHealthSDKHeaders/ECG3.h +94 -0
- package/ios/Plugin/iHealthSDKHeaders/ECG3Controller.h +30 -0
- package/ios/Plugin/iHealthSDKHeaders/ECG3USB.h +145 -0
- package/ios/Plugin/iHealthSDKHeaders/ECG3USBController.h +31 -0
- package/ios/Plugin/iHealthSDKHeaders/ECGHeader.h +20 -0
- package/ios/Plugin/iHealthSDKHeaders/ECGMacroFile.h +84 -0
- package/ios/Plugin/iHealthSDKHeaders/HFSmartLink.h +88 -0
- package/ios/Plugin/iHealthSDKHeaders/HFSmartLinkDeviceInfo.h +14 -0
- package/ios/Plugin/iHealthSDKHeaders/HS2.h +64 -0
- package/ios/Plugin/iHealthSDKHeaders/HS2Controller.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/HS2S.h +399 -0
- package/ios/Plugin/iHealthSDKHeaders/HS2SController.h +27 -0
- package/ios/Plugin/iHealthSDKHeaders/HS3.h +63 -0
- package/ios/Plugin/iHealthSDKHeaders/HS3Controller.h +32 -0
- package/ios/Plugin/iHealthSDKHeaders/HS4.h +64 -0
- package/ios/Plugin/iHealthSDKHeaders/HS4Controller.h +26 -0
- package/ios/Plugin/iHealthSDKHeaders/HS5.h +141 -0
- package/ios/Plugin/iHealthSDKHeaders/HS5Controller.h +38 -0
- package/ios/Plugin/iHealthSDKHeaders/HSHeader.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/HSMacroFile.h +709 -0
- package/ios/Plugin/iHealthSDKHeaders/HealthHeader.h +67 -0
- package/ios/Plugin/iHealthSDKHeaders/HealthUser.h +126 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBindEnum.h +49 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBlueDataResponse.h +66 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBlueEnum.h +213 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothBaseModel.h +112 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothEngine.h +283 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothManager.h +166 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothServices.h +75 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOCalculateBluetoothModel.h +263 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOCommonMacro.h +89 -0
- package/ios/Plugin/iHealthSDKHeaders/IDODataExchangeModel.h +128 -0
- package/ios/Plugin/iHealthSDKHeaders/IDODataMigrationManager.h +79 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOErrorCodeToStr.h +19 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOFoundationCommand.h +1178 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOGetInfoBluetoothModel.h +1924 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOLogEnum.h +165 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOPeripheralModel.h +59 -0
- package/ios/Plugin/iHealthSDKHeaders/IDORecordDeviceLog.h +56 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSetInfoBluetoothModel.h +1760 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncActivityDataModel.h +207 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncBpDataModel.h +191 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncEnum.h +316 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncGpsDataModel.h +133 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncHeartRateDataModel.h +442 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncManager.h +161 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncPressureDataModel.h +158 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncSleepDataModel.h +224 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncSpo2DataModel.h +175 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncSportDataModel.h +221 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncSwimDataModel.h +188 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOTranEnum.h +93 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOTransferFileManager.h +116 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOWatchDialInfoModel.h +95 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOWatchDialManager.h +75 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOWeightBluetoothModel.h +124 -0
- package/ios/Plugin/iHealthSDKHeaders/IHSDKCloudUser.h +104 -0
- package/ios/Plugin/iHealthSDKHeaders/KN550BT.h +115 -0
- package/ios/Plugin/iHealthSDKHeaders/KN550BTController.h +32 -0
- package/ios/Plugin/iHealthSDKHeaders/ManageDeviceController.h +34 -0
- package/ios/Plugin/iHealthSDKHeaders/NT13B.h +33 -0
- package/ios/Plugin/iHealthSDKHeaders/NT13BController.h +28 -0
- package/ios/Plugin/iHealthSDKHeaders/NT13BHeader.h +16 -0
- package/ios/Plugin/iHealthSDKHeaders/NT13BMacroFile.h +34 -0
- package/ios/Plugin/iHealthSDKHeaders/PO1.h +82 -0
- package/ios/Plugin/iHealthSDKHeaders/PO1Controller.h +29 -0
- package/ios/Plugin/iHealthSDKHeaders/PO3.h +96 -0
- package/ios/Plugin/iHealthSDKHeaders/PO3Controller.h +29 -0
- package/ios/Plugin/iHealthSDKHeaders/POHeader.h +20 -0
- package/ios/Plugin/iHealthSDKHeaders/POMacroFile.h +142 -0
- package/ios/Plugin/iHealthSDKHeaders/PT3SBT.h +167 -0
- package/ios/Plugin/iHealthSDKHeaders/PT3SBTController.h +27 -0
- package/ios/Plugin/iHealthSDKHeaders/PT3SBTMacroFile.h +92 -0
- package/ios/Plugin/iHealthSDKHeaders/SDKFlowUpdateDevice.h +196 -0
- package/ios/Plugin/iHealthSDKHeaders/SDKInfo.h +30 -0
- package/ios/Plugin/iHealthSDKHeaders/SDKUpdateDevice.h +235 -0
- package/ios/Plugin/iHealthSDKHeaders/ScanDeviceController.h +47 -0
- package/ios/Plugin/iHealthSDKHeaders/THV3.h +104 -0
- package/ios/Plugin/iHealthSDKHeaders/THV3Controller.h +30 -0
- package/ios/Plugin/iHealthSDKHeaders/THV3Macro.h +17 -0
- package/ios/Plugin/iHealthSDKHeaders/TS28B.h +26 -0
- package/ios/Plugin/iHealthSDKHeaders/TS28BController.h +142 -0
- package/ios/Plugin/iHealthSDKHeaders/TS28BHeader.h +15 -0
- package/ios/Plugin/iHealthSDKHeaders/iHealthHS6.h +174 -0
- package/ios/Plugin/ihealth.swift +8 -0
- package/ios/Plugin/ihealthPlugin.h +10 -0
- package/ios/Plugin/ihealthPlugin.m +16 -0
- package/ios/Plugin/ihealthPlugin.swift +1502 -0
- package/ios/Plugin/libiHealthSDK2.7.8.a +0 -0
- package/ios/Plugin/test.m +9 -0
- package/package.json +78 -0
@@ -0,0 +1,294 @@
|
|
1
|
+
//
|
2
|
+
// BG5S.h
|
3
|
+
// iHealthSDKStatic
|
4
|
+
//
|
5
|
+
// Created by Lei Bao on 2017/6/30.
|
6
|
+
// Copyright © 2017年 daiqingquan. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
#import "BGMacroFile.h"
|
11
|
+
|
12
|
+
// --------------- DELEGATE ---------------
|
13
|
+
@class BG5S;
|
14
|
+
|
15
|
+
/**
|
16
|
+
BG5SDelegate
|
17
|
+
*/
|
18
|
+
@protocol BG5SDelegate <NSObject>
|
19
|
+
@required
|
20
|
+
|
21
|
+
/**
|
22
|
+
Device sends an error
|
23
|
+
|
24
|
+
@param device active device
|
25
|
+
@param error error number
|
26
|
+
@param errorDescription error message
|
27
|
+
*/
|
28
|
+
- (void)device:(BG5S *)device occurError:(BG5SError)error errorDescription:(NSString *)errorDescription;
|
29
|
+
|
30
|
+
/**
|
31
|
+
Device sends strip state message
|
32
|
+
@note Only after startMeasure: method is called, does the device send strip state message.
|
33
|
+
If you insert strip before calling startMeasure: method, the device doesn't send strip state(Insert or Pull off) until startMeasure: method is called.
|
34
|
+
@param device active device
|
35
|
+
@param state BG5SStripState enum
|
36
|
+
*/
|
37
|
+
- (void)device:(BG5S *)device stripStateDidUpdate:(BG5SStripState)state;
|
38
|
+
|
39
|
+
/**
|
40
|
+
Device sends drop blood or ctl message
|
41
|
+
@note After reciving this message, you should not call any method until you recive result. If called, the method may be timeout.
|
42
|
+
@param device active device
|
43
|
+
*/
|
44
|
+
- (void)deviceDropBlood:(BG5S *)device;
|
45
|
+
|
46
|
+
/**
|
47
|
+
Device sends result
|
48
|
+
|
49
|
+
@param device active device
|
50
|
+
@param dataID data identifier (Only for SDK users)
|
51
|
+
@param result blood glucose value with mg/dL unit
|
52
|
+
*/
|
53
|
+
- (void)device:(BG5S *)device dataID:(NSString *)dataID measureReult:(NSInteger)result;
|
54
|
+
|
55
|
+
/**
|
56
|
+
Device sends charging state
|
57
|
+
@note Only state changes, is the message sent.
|
58
|
+
@param device active device
|
59
|
+
@param state BG5SChargeState object
|
60
|
+
*/
|
61
|
+
- (void)device:(BG5S *)device chargeStateDidUpdate:(BG5SChargeState)state;
|
62
|
+
@end
|
63
|
+
|
64
|
+
/**
|
65
|
+
state information of BG5S when call "queryStateInfoWithSuccess:"
|
66
|
+
*/
|
67
|
+
@interface BG5SStateInfo : NSObject
|
68
|
+
|
69
|
+
/**
|
70
|
+
0-100 means battery percent, 255 means charging
|
71
|
+
*/
|
72
|
+
@property (assign, nonatomic, readonly) NSInteger batteryValue;
|
73
|
+
|
74
|
+
/**
|
75
|
+
device date (UTC)
|
76
|
+
*/
|
77
|
+
@property (copy, nonatomic, readonly) NSDate *deviceDate;
|
78
|
+
|
79
|
+
/**
|
80
|
+
device timezon -12.00 to 14.00. Without setting, default timezone is 0.00
|
81
|
+
*/
|
82
|
+
@property (assign, nonatomic, readonly) float deviceTimeZone;
|
83
|
+
|
84
|
+
/**
|
85
|
+
quantity of strip used in measurement.range:[0,65535]. If value is 65535, there may be something wrong with BG5S. Because 65535 is very large number for true user.
|
86
|
+
*/
|
87
|
+
@property (assign, nonatomic, readonly) NSInteger stripUsedValue;
|
88
|
+
|
89
|
+
/**
|
90
|
+
quantity of record measuring without connecting to APP.range:[0,500]. If value is 65535, there may be something wrong with BG5S.
|
91
|
+
*/
|
92
|
+
@property (assign, nonatomic, readonly) NSInteger offlineDataQuantity;
|
93
|
+
|
94
|
+
/**
|
95
|
+
blood code version (0-255)
|
96
|
+
*/
|
97
|
+
@property (assign, nonatomic, readonly) NSInteger bloodCodeVersion;
|
98
|
+
|
99
|
+
/**
|
100
|
+
ctl code version (0-255)
|
101
|
+
*/
|
102
|
+
@property (assign, nonatomic, readonly) NSInteger ctlCodeVersion;
|
103
|
+
|
104
|
+
/**
|
105
|
+
measure unit (BGUnit_Unknown means that BG5S has never been set unit from App,BGUnit_mmolPL stands for mmol/L,BGUnit_mgPmL stands for mg/dL)
|
106
|
+
*/
|
107
|
+
@property (assign, nonatomic, readonly) BGUnit unit;
|
108
|
+
|
109
|
+
@end
|
110
|
+
|
111
|
+
/**
|
112
|
+
Offline data model of BG5S
|
113
|
+
*/
|
114
|
+
@interface BG5SRecordModel : NSObject
|
115
|
+
|
116
|
+
/**
|
117
|
+
Data ID (Only for SDK users)
|
118
|
+
*/
|
119
|
+
@property (copy, nonatomic, readonly) NSString *dataID;
|
120
|
+
|
121
|
+
/**
|
122
|
+
Measure Date (UTC)
|
123
|
+
*/
|
124
|
+
@property (copy, nonatomic, readonly) NSDate *measureDate;
|
125
|
+
|
126
|
+
/**
|
127
|
+
Time zone
|
128
|
+
*/
|
129
|
+
@property (assign, nonatomic, readonly) float timeZone;
|
130
|
+
|
131
|
+
/**
|
132
|
+
BG Value with mg/dL unit
|
133
|
+
*/
|
134
|
+
@property (assign, nonatomic, readonly) NSInteger value;
|
135
|
+
|
136
|
+
/**
|
137
|
+
Correct Flag, YES:can be corrected, NO:cannot be corrected
|
138
|
+
*/
|
139
|
+
@property (assign, nonatomic, readonly) BOOL canCorrect;
|
140
|
+
|
141
|
+
@end
|
142
|
+
|
143
|
+
/**
|
144
|
+
Modified offline data model of BG5S
|
145
|
+
*/
|
146
|
+
@interface BG5SRecordModifiedModel : NSObject
|
147
|
+
|
148
|
+
/**
|
149
|
+
Data ID (Only for SDK users)
|
150
|
+
*/
|
151
|
+
@property (copy, nonatomic) NSString *dataID;
|
152
|
+
|
153
|
+
/**
|
154
|
+
Measure Date (UTC)
|
155
|
+
*/
|
156
|
+
@property (copy, nonatomic) NSDate *measureDate;
|
157
|
+
|
158
|
+
/**
|
159
|
+
Time zone
|
160
|
+
*/
|
161
|
+
@property (assign, nonatomic,) float timeZone;
|
162
|
+
|
163
|
+
/**
|
164
|
+
BG Value with mg/dL unit
|
165
|
+
*/
|
166
|
+
@property (assign, nonatomic) NSInteger value;
|
167
|
+
|
168
|
+
@end
|
169
|
+
|
170
|
+
/**
|
171
|
+
BG5S
|
172
|
+
*/
|
173
|
+
@interface BG5S : BGDevice
|
174
|
+
|
175
|
+
@property (weak, nonatomic) id<BG5SDelegate> delegate;
|
176
|
+
|
177
|
+
/**
|
178
|
+
Query BG5S state information including battery value,device date, device timezone, strip used, quantity of offline data, blood code version, CTL code version, unit.
|
179
|
+
|
180
|
+
@param stateInfoBlock BG5SStateInfo object
|
181
|
+
@param errorBlock the block means fail. You can get error from this block
|
182
|
+
@note If analysis occurs error, BG5SStateInfo object maybe nil or some of its property are nil.
|
183
|
+
*/
|
184
|
+
- (void)queryStateInfoWithSuccess:(BG5SStateInfoBlock)stateInfoBlock
|
185
|
+
errorBlock:(BG5SSDKErrorBlock)errorBlock;
|
186
|
+
|
187
|
+
/**
|
188
|
+
Set time
|
189
|
+
|
190
|
+
@param date the date you want to set should be an UTC time. valid range:Jan. 1,2000 - Dec. 31,2099. If date is nil, use [NSdate date] and system time zone
|
191
|
+
@param timezone the timezone you want to set should be from -12.00 to 14.00; step length = 0.25
|
192
|
+
@param successBlock the block means success
|
193
|
+
@param errorBlock the block means fail. You can get error from this block
|
194
|
+
@note If date is out of reange, BG5SError_InputParametersError will be returned by block.
|
195
|
+
If date and timezone are invalid , use input parameters; otherwise use [NSdate date] and system time zone;
|
196
|
+
*/
|
197
|
+
- (void)setTimeWithDate:(NSDate *)date
|
198
|
+
timezone:(float)timezone
|
199
|
+
successBlock:(BG5SSuccessBlock)successBlock
|
200
|
+
errorBlock:(BG5SSDKErrorBlock)errorBlock;
|
201
|
+
|
202
|
+
/**
|
203
|
+
Set unit
|
204
|
+
|
205
|
+
@param unit the unit you want to set (BGUnit_mmolPL stands for mmol/L,BGUnit_mgPmL stands for mg/dL)
|
206
|
+
@param successBlock the block means success
|
207
|
+
@param errorBlock the block means fail. You can get error from this block
|
208
|
+
*/
|
209
|
+
- (void)setUnit:(BGUnit)unit
|
210
|
+
successBlock:(BG5SSuccessBlock)successBlock
|
211
|
+
errorBlock:(BG5SSDKErrorBlock)errorBlock;
|
212
|
+
|
213
|
+
/**
|
214
|
+
Delete strip used info (the quantity of strip used is set to 0)
|
215
|
+
|
216
|
+
@param successBlock the block means success
|
217
|
+
@param errorBlock the block means fail. You can get error from this block
|
218
|
+
*/
|
219
|
+
- (void)deleteStripUsedInfoWithSuccessBlock:(BG5SSuccessBlock)successBlock
|
220
|
+
errorBlock:(BG5SSDKErrorBlock)errorBlock;
|
221
|
+
|
222
|
+
/**
|
223
|
+
Query record data stored in BG5S
|
224
|
+
|
225
|
+
@param successBlock the block means success; if has record, return non-empty array (BG5SRecordModel object); if no record, return empty array
|
226
|
+
@param errorBlock the block means fail. You can get error from this block
|
227
|
+
*/
|
228
|
+
- (void)queryRecordWithSuccessBlock:(BG5SRecordBlock)successBlock
|
229
|
+
errorBlock:(BG5SSDKErrorBlock)errorBlock;
|
230
|
+
|
231
|
+
|
232
|
+
/**
|
233
|
+
Delete record data stored in BG5S
|
234
|
+
|
235
|
+
@param successBlock the block means success
|
236
|
+
@param errorBlock the block means fail. You can get error from this block
|
237
|
+
*/
|
238
|
+
- (void)deleteRecordWithSuccessBlock:(BG5SSuccessBlock)successBlock
|
239
|
+
errorBlock:(BG5SSDKErrorBlock)errorBlock;
|
240
|
+
|
241
|
+
/**
|
242
|
+
Start online measurement with specific measure mode.
|
243
|
+
|
244
|
+
@note If you don't call this method, BG5S use blood mode by default.
|
245
|
+
|
246
|
+
If CTL mode is sent, BG5S use CTL mode and BG5S can't be set to use blood mode until next connection.
|
247
|
+
@param measureMode Blood or CTL
|
248
|
+
@param successBlock the block means success
|
249
|
+
@param errorBlock the block means fail. You can get error from this block
|
250
|
+
*/
|
251
|
+
- (void)startMeasure:(BGMeasureMode)measureMode
|
252
|
+
withSuccessBlock:(BG5SSuccessBlock)successBlock
|
253
|
+
errorBlock:(BG5SSDKErrorBlock)errorBlock;
|
254
|
+
|
255
|
+
/**
|
256
|
+
Disconnect device
|
257
|
+
*/
|
258
|
+
- (void)disconnectDevice;
|
259
|
+
|
260
|
+
/**
|
261
|
+
Correct Measure Date if canCorrect is YES in BG5SRecordModel
|
262
|
+
|
263
|
+
@param array BG5SRecordModel objects
|
264
|
+
@param deviceDate This date should be read before set time method called.
|
265
|
+
@return BG5SRecordModifiedModel objects; return empty array means input parameters is wrong.
|
266
|
+
*/
|
267
|
+
- (NSArray *)processData:(NSArray<BG5SRecordModel*> *)array deviceDate:(NSDate *)deviceDate;
|
268
|
+
|
269
|
+
|
270
|
+
/**
|
271
|
+
|
272
|
+
Is offline measurement allowed
|
273
|
+
|
274
|
+
@param isOffline Is offline measurement allowed 0:allowed 1:Offline measurement is not allowed
|
275
|
+
@param successBlock the block means success
|
276
|
+
@param errorBlock the block means fail. You can get error from this block
|
277
|
+
*/
|
278
|
+
- (void)setIsOfflineMeasurementAllowed:(BOOL)isOffline
|
279
|
+
successBlock:(BG5SSuccessBlock)successBlock
|
280
|
+
errorBlock:(BG5SSDKErrorBlock)errorBlock;
|
281
|
+
|
282
|
+
|
283
|
+
- (void)setCodeWithMeasureMode:(BGMeasureMode)mode
|
284
|
+
resultBlock:(BG5SSetCodeResultBlock)resultBlock
|
285
|
+
errorBlock:(BG5SSDKErrorBlock)errorBlock;
|
286
|
+
|
287
|
+
- (void)readDeviceInfoWithSuccessBlock:(BG5SDeviceInfoBlock)deviceInfoBlock
|
288
|
+
errorBlock:(BG5SSDKErrorBlock)errorBlock;
|
289
|
+
|
290
|
+
- (void)commandCloseDeviceBLEWithSuccessBlock:(BG5SSuccessBlock)successBlock errorBlock:(BG5SSDKErrorBlock)errorBlock;
|
291
|
+
|
292
|
+
- (void)commandSetDeviceDisplay:(BOOL)isDisplay successBlock:(BG5SSuccessBlock)successBlock errorBlock:(BG5SSDKErrorBlock)errorBlock;
|
293
|
+
|
294
|
+
@end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
//
|
2
|
+
// BG5SController.h
|
3
|
+
// iHealthSDKStatic
|
4
|
+
//
|
5
|
+
// Created by Lei Bao on 2017/6/30.
|
6
|
+
// Copyright © 2017年 daiqingquan. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
#import "BGMacroFile.h"
|
11
|
+
|
12
|
+
/**
|
13
|
+
BG5SController
|
14
|
+
*/
|
15
|
+
@interface BG5SController : BGController
|
16
|
+
/**
|
17
|
+
Initialization method
|
18
|
+
|
19
|
+
@return BG5SController singleton
|
20
|
+
*/
|
21
|
+
+(BG5SController *)sharedController;
|
22
|
+
/**
|
23
|
+
Get all BG5S Instance
|
24
|
+
@note The method should be called when the BG5S has been connected.
|
25
|
+
@return BG5S object array
|
26
|
+
*/
|
27
|
+
-(NSArray *)getAllCurrentInstace;
|
28
|
+
|
29
|
+
@end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
//
|
2
|
+
// BGController.h
|
3
|
+
// iHealthDemoCode
|
4
|
+
//
|
5
|
+
// Created by Realank on 2017/1/4.
|
6
|
+
// Copyright © 2017年 zhiwei jing. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
|
11
|
+
/**
|
12
|
+
Base class of BG controller
|
13
|
+
*/
|
14
|
+
@interface BGController : NSObject{
|
15
|
+
//区分设备
|
16
|
+
NSString* deviceName;
|
17
|
+
NSNumber* bluetoothType;
|
18
|
+
//发送通知
|
19
|
+
NSString* deviceConnectNotiName;
|
20
|
+
NSString* deviceDisconnectNotiName;
|
21
|
+
//创建实例
|
22
|
+
Class DeviceClass;
|
23
|
+
}
|
24
|
+
|
25
|
+
-(instancetype) initUniqueInstance;
|
26
|
+
|
27
|
+
/**
|
28
|
+
* Get all BG3 instance,Access control class instance after receiving kNotificationNameBG3ConnectSuccess, then use instance to call BG3 related communication methods.
|
29
|
+
*/
|
30
|
+
-(NSArray *)allConnectedInstance;
|
31
|
+
|
32
|
+
@end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
//
|
2
|
+
// BGDevice.h
|
3
|
+
// iHealthDemoCode
|
4
|
+
//
|
5
|
+
// Created by Realank on 2017/1/4.
|
6
|
+
// Copyright © 2017年 zhiwei jing. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
|
11
|
+
/**
|
12
|
+
Base class of BG
|
13
|
+
*/
|
14
|
+
@interface BGDevice : NSObject
|
15
|
+
|
16
|
+
/**
|
17
|
+
UUID
|
18
|
+
*/
|
19
|
+
@property (copy, nonatomic) NSString *currentUUID;
|
20
|
+
/**
|
21
|
+
serial number or mac
|
22
|
+
*/
|
23
|
+
@property (copy, nonatomic) NSString *serialNumber;
|
24
|
+
/**
|
25
|
+
firmware version
|
26
|
+
*/
|
27
|
+
@property (copy, nonatomic) NSString *firmwareVersion;
|
28
|
+
/**
|
29
|
+
hardware version
|
30
|
+
*/
|
31
|
+
@property (copy, nonatomic) NSString *hardwareVersion;
|
32
|
+
/**
|
33
|
+
model number
|
34
|
+
*/
|
35
|
+
@property (copy, nonatomic) NSString *modelNumber;
|
36
|
+
|
37
|
+
/**
|
38
|
+
device type0:old device 1:new device
|
39
|
+
*/
|
40
|
+
@property (copy, nonatomic) NSNumber *deviceType;
|
41
|
+
|
42
|
+
@end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
//
|
2
|
+
// BGHeader.h
|
3
|
+
// BGDemoCode
|
4
|
+
//
|
5
|
+
// Created by zhiwei jing on 14-6-30.
|
6
|
+
// Copyright (c) 2014年 zhiwei jing. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#ifndef BGDemoCode_BGHeader_h
|
10
|
+
#define BGDemoCode_BGHeader_h
|
11
|
+
|
12
|
+
#import "BG1.h"
|
13
|
+
#import "BG1Controller.h"
|
14
|
+
#import "BGMacroFile.h"
|
15
|
+
#import "BG3.h"
|
16
|
+
#import "BG3Controller.h"
|
17
|
+
#import "BG5.h"
|
18
|
+
#import "BG5Controller.h"
|
19
|
+
#import "BG5S.h"
|
20
|
+
#import "BG5SController.h"
|
21
|
+
#import "BG1S.h"
|
22
|
+
#import "BG1SController.h"
|
23
|
+
#endif
|