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,53 @@
|
|
1
|
+
//
|
2
|
+
// BG1.h
|
3
|
+
// iHealthSDKStatic
|
4
|
+
//
|
5
|
+
// Created by soso on 2017/8/25.
|
6
|
+
// Copyright © 2017年 ihealth. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
#import "BGMacroFile.h"
|
11
|
+
|
12
|
+
/**
|
13
|
+
BG1
|
14
|
+
*/
|
15
|
+
@interface BG1 : NSObject
|
16
|
+
@property (strong, nonatomic) NSString *mac;
|
17
|
+
@property (strong, nonatomic) NSString *firmwareVersion;
|
18
|
+
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Start connect BG1 and get the connection status.
|
22
|
+
* @param BG1Model the BG1 type.
|
23
|
+
* @param discover This block returns means blood glucose meter plugged in.
|
24
|
+
* @param IDPSInfo This block returns the IDPS of the meter, this will be operated for the first time when the app talks to the meter.
|
25
|
+
* @param connect This block returns the connection status, the connection of the BG meter is regular , the measurement could be processed.
|
26
|
+
* @param error block returns error codes,please refer to error codes list in BGMacroFile.
|
27
|
+
* @Notice Notice: Using this method should be placed kNotificationNameNeedAudioPermission callback
|
28
|
+
*/
|
29
|
+
- (void)commandBG1DeviceModel:(NSNumber *)BG1Model withDiscoverBlock:(DisposeBG1DiscoverBlock)discover withDiscoverBlock:(DisposeBG1IDPSBlock)IDPSInfo withConnectBlock:(DisposeBG1ConnectBlock)connect withErrorBlock:(DisposeBG1ErrorBlock)error;
|
30
|
+
|
31
|
+
|
32
|
+
/**
|
33
|
+
* Establish connection and start BG measurement.(New)
|
34
|
+
* @param measureMode Set the measure test type,BGMeasureMode_Blood is Blood Test,BGMeasureMode_NoBlood is CTL Test.
|
35
|
+
* @param codeMode Set the code type,BGCodeMode_GOD is GOD,BGCodeMode_GDH is GDH.
|
36
|
+
* @param codeString The code String gets by scanning the QR code.
|
37
|
+
* @param sendCodeResult If the QR code is accepted, yes means accepted, no means deny.
|
38
|
+
* @param stripIn The strips slide into the BG meter.
|
39
|
+
* @param blood The blood drop has beed sensed from the strip.
|
40
|
+
* @param measureResult Returns the measurement by the unit of mg/dL, range from 20-600.
|
41
|
+
* @param stripOut The strip has been pulled out.
|
42
|
+
* @param error This block returns error codes,please refer to error codes list in BGMacroFile.
|
43
|
+
*/
|
44
|
+
- (void)commandBG1MeasureMode:(BGMeasureMode)measureMode withCodeMode:(BGCodeMode)codeMode withCodeString:(NSString *)codeString withSendCodeResultBlock:(DisposeBG1SendCodeResultBlock)sendCodeResult withStripInBlock:(DisposeBGStripInBlock)stripIn withBloodBlock:(DisposeBGBloodBlock)blood withResultBlock:(DisposeBGResultBlock)measureResult withStripOutBlock:(DisposeBGStripOutBlock)stripOut withErrorBlock:(DisposeBG1ErrorBlock)error;
|
45
|
+
|
46
|
+
/**
|
47
|
+
Analyze code include bottleID,DueDate and the number of strips. Only Available for GOD Code
|
48
|
+
|
49
|
+
@param encodeString The code String gets by scanning the QR code.
|
50
|
+
@return return a dictionary contains keys such as @"BottleID",@"StripNum",@"DueDate"; return nil if input parameter is GDH code or code is invalid.
|
51
|
+
*/
|
52
|
+
-(NSDictionary *)codeStripStrAnalysis:(NSString *)encodeString;
|
53
|
+
@end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
//
|
2
|
+
// BG1Controller.h
|
3
|
+
// iHealthBG
|
4
|
+
//
|
5
|
+
// Created by xujianbo on 14-10-08.
|
6
|
+
// Copyright (c) 2014年 andon. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
@class BG1;
|
11
|
+
|
12
|
+
/**
|
13
|
+
BG1Controller
|
14
|
+
*/
|
15
|
+
@interface BG1Controller : NSObject
|
16
|
+
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Initialization for BG1Controller Instance.
|
20
|
+
*/
|
21
|
+
+(BG1Controller *)shareBG1Controller;
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Initialization for BG1 (connected BG via sound jack)
|
25
|
+
* When the application detects a headphone device, it sends a notification named kNotificationNameAudioDeviceInsert. When you receive kNotificationNameAudioDeviceInsert notification, you need to adjust the system volume to its maximum. After the device is disconnected, you receive a notification with the name kNotificationNameBG1DidDisConnect.
|
26
|
+
*/
|
27
|
+
-(void)initBGAudioModule;
|
28
|
+
|
29
|
+
/**
|
30
|
+
* Get current BG1 Instance
|
31
|
+
* The methold needs to be called when the BG1 has been triggered.
|
32
|
+
*/
|
33
|
+
-(BG1 *)getCurrentBG1Instance;
|
34
|
+
|
35
|
+
|
36
|
+
/**
|
37
|
+
* Stop audio module for BG1 (connected BG via sound jack)
|
38
|
+
* Call this method When the app need stop BG1 communication.
|
39
|
+
After call this method ,the app should set BG1 Disconnected status.
|
40
|
+
*/
|
41
|
+
-(void)stopBGAudioModule;
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
@end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
//
|
2
|
+
// BG1S.h
|
3
|
+
// iHealthSDKStatic
|
4
|
+
//
|
5
|
+
// Created by jing on 2019/5/8.
|
6
|
+
// Copyright © 2019 ihealthSDK. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
#import "BGMacroFile.h"
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
12
|
+
|
13
|
+
@interface BG1S : NSObject
|
14
|
+
@property (strong, nonatomic) NSString *serialNumber;
|
15
|
+
@property (strong, nonatomic) NSString *currentUUID;
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Get device battary
|
19
|
+
* @param function A block to return the function and states that the device supports.
|
20
|
+
* @param disposeBGErrorBlock A block to refer ‘error’ in ‘Establish measurement connection’ in BG1S.
|
21
|
+
*/
|
22
|
+
-(void)commandFunction:(BlockBG1SDeviceFunction)function DisposeBGErrorBlock:(BlockBG1SError)disposeBGErrorBlock;
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Button-pressing booting mode
|
26
|
+
* @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.
|
27
|
+
* @param disposeBGStripInBlock This block returns yes means strip slides in.
|
28
|
+
* @param disposeBGBloodBlock This block returns yes means the blood drop has beed sensed from the strip.
|
29
|
+
* @param disposeBGResultBlock This block returns the measurement by the unit of mg/dL, range from 20-600.
|
30
|
+
* @param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
|
31
|
+
*/
|
32
|
+
-(void)commandCreateBG1STestModel:(BGMeasureMode)testMode
|
33
|
+
DisposeBGStripInBlock:(DisposeBG1SStripInBlock)disposeBGStripInBlock
|
34
|
+
DisposeBGBloodBlock:(DisposeBGBloodBlock)disposeBGBloodBlock
|
35
|
+
DisposeBGResultBlock:(DisposeBGResultBlock)disposeBGResultBlock
|
36
|
+
DisposeBGErrorBlock:(BlockBG1SError)disposeBGErrorBlock;
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Read the information of the strip from the BG meter
|
40
|
+
* @param disposeBGCodeDic This block returns the information of the strip, Strips means the number of strips which has been used, Date means expired date.
|
41
|
+
* @param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
|
42
|
+
*/
|
43
|
+
-(void)commandReadBGCodeDic:(DisposeBGCodeDic)disposeBGCodeDic
|
44
|
+
DisposeBGErrorBlock:(BlockBG1SError)disposeBGErrorBlock;
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Send code
|
48
|
+
|
49
|
+
* @param encodeString The code String gets by scanning the QR code. Only used when codetype is GOD
|
50
|
+
|
51
|
+
* @param disposeBGSendCodeBlock YES means success, NO means fail.
|
52
|
+
|
53
|
+
* @param disposeBGErrorBlock This block returns error codes,please refer to error codes list in BGMacroFile.
|
54
|
+
*/
|
55
|
+
-(void)commandSendBGCodeWithCodeString:(NSString*)encodeString DisposeBGSendCodeBlock:(DisposeBGSendCodeBlock)disposeBGSendCodeBlock DisposeBGErrorBlock:(BlockBG1SError)disposeBGErrorBlock;
|
56
|
+
/**
|
57
|
+
* Disconnect current device
|
58
|
+
*/
|
59
|
+
-(void)commandDisconnectDevice;
|
60
|
+
|
61
|
+
|
62
|
+
@end
|
63
|
+
|
64
|
+
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,25 @@
|
|
1
|
+
//
|
2
|
+
// BG1SController.h
|
3
|
+
// iHealthSDKStatic
|
4
|
+
//
|
5
|
+
// Created by jing on 2019/5/8.
|
6
|
+
// Copyright © 2019 ihealthSDK. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
12
|
+
|
13
|
+
@interface BG1SController : NSObject
|
14
|
+
/**
|
15
|
+
* Initialize BG1S controller class
|
16
|
+
*/
|
17
|
+
+(BG1SController *)shareIHBG1SController;
|
18
|
+
|
19
|
+
/**
|
20
|
+
* Get all BG1S instance,use hsInstance to call BG related communication methods.
|
21
|
+
*/
|
22
|
+
-(NSArray *)getAllCurrentBG1SInstace;
|
23
|
+
@end
|
24
|
+
|
25
|
+
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,83 @@
|
|
1
|
+
//
|
2
|
+
// BG3.h
|
3
|
+
// iHealthBG
|
4
|
+
//
|
5
|
+
// Created by daiqingquan on 14-2-20.
|
6
|
+
// Copyright (c) 2014年 andon. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
#import "BGMacroFile.h"
|
11
|
+
|
12
|
+
|
13
|
+
/**
|
14
|
+
DisposeAuthenticationBlock
|
15
|
+
|
16
|
+
@param result UserAuthenResult
|
17
|
+
*/
|
18
|
+
typedef void (^DisposeAuthenticationBlock)(UserAuthenResult result);//the result of userID verification
|
19
|
+
|
20
|
+
|
21
|
+
/**
|
22
|
+
BG3
|
23
|
+
*/
|
24
|
+
@interface BG3 : NSObject{
|
25
|
+
|
26
|
+
uint8_t allCodeBuf[170];
|
27
|
+
uint8_t allCTLCodeBuf[170];
|
28
|
+
|
29
|
+
DisposeBGErrorBlock _disposeBGErrorBlock;
|
30
|
+
DisposeBGStripInBlock _disposeBGStripInBlock;
|
31
|
+
DisposeBGStripOutBlock _disposeBGStripOutBlock;
|
32
|
+
DisposeBGBloodBlock _disposeBGBloodBlock;
|
33
|
+
DisposeBGResultBlock _disposeBGResultBlock;
|
34
|
+
DisposeBGSendCodeBlock _disposeBGSendCodeBlock;
|
35
|
+
DisposeAuthenticationBlock _disposeAuthenticationBlock;
|
36
|
+
|
37
|
+
NSString *thirdUserID;
|
38
|
+
|
39
|
+
NSString *clientSDKUserName;
|
40
|
+
NSString *clientSDKID;
|
41
|
+
NSString *clientSDKSecret;
|
42
|
+
|
43
|
+
BGMeasureMode clientTestMode;
|
44
|
+
}
|
45
|
+
|
46
|
+
@property (strong, nonatomic) NSString *currentUUID;
|
47
|
+
///‘serialNumber’ is for separating different device when multiple device have been connected.
|
48
|
+
@property (strong, nonatomic) NSString *serialNumber;
|
49
|
+
|
50
|
+
|
51
|
+
/**
|
52
|
+
* Start measure
|
53
|
+
* @param testMode The 'testMode' send measurement mode, BGMeasureMode_Blood means blood measurement mode, BGMeasureMode_NoBlood means control solution measurement mode.
|
54
|
+
* @param encodeString Get the code information by scanning the QR code.
|
55
|
+
* @param userID The only user label, is indicated by form of email address.
|
56
|
+
* @param clientID 'clientID' and 'clientSecret' are the only user label, will be achieved after the register of SDK application. Please contact louie@ihealthlabs.com for the registration.
|
57
|
+
* @param clientSecret 'clientID' and 'clientSecret' are the only user label, will be achieved after the register of SDK application. Please contact louie@ihealthlabs.com for the registration.
|
58
|
+
* @param disposeAuthenticationBlock This block returns results after the verification of userID,clientID,clientSecret.
|
59
|
+
* Results:
|
60
|
+
* a) UserAuthen_RegisterSuccess, new register successes.
|
61
|
+
* b) UserAuthen_LoginSuccess, user logs in successfully.
|
62
|
+
* c) UserAuthen_CombinedSuccess, user has been recognised as iHealth user, the measurement via SDK could be activated, the result data belongs to the user.
|
63
|
+
* d) UserAuthen_TrySuccess, network error, the measurement is only for testing, SDK is not fully functional.
|
64
|
+
* e) UserAuthen_InvalidateUserInfo, the verification of userID/clientID/clientSecret failed.
|
65
|
+
* f) UserAuthen_SDKInvalidateRight, the application has not been authorised.
|
66
|
+
* g) UserAuthen_UserInvalidateRight, the user has not been authorised.
|
67
|
+
* h) UserAuthen_InternetError, network error, verification failed.
|
68
|
+
* -- PS:
|
69
|
+
* 1. the measurement via SDK is functional in the case from a) to d).
|
70
|
+
* 2. the measurement via SDK will be determined in the case from e) to h), please contact iHealth support team, louie@ihealthlabs.com
|
71
|
+
* 3. “iHealth Disclaimer” will pop up and need to be proved by the user when SDK is activated for the first time.
|
72
|
+
* 4. if iHealth SDK has been using without internet, there is only 10-day try out because the SDK can not be certified.
|
73
|
+
* @param disposeBGSendCodeBlock disposeBGSendCodeBlock
|
74
|
+
* @param disposeBGStripInBlock The block returns yes means strip slides in.
|
75
|
+
* @param disposeBGBloodBlock The block returns yes means the blood drop has beed sensed from the strip
|
76
|
+
* @param disposeBGResultBlock block returns the measurement by the unit of mg/dL, range from 20-600.
|
77
|
+
* @param disposeBGErrorBlock A block to return error codes.
|
78
|
+
*/
|
79
|
+
-(void)commandCreateBG3TestModel:(BGMeasureMode)testMode CodeString:(NSString *)encodeString UserID:(NSString*)userID clientID:(NSString *)clientID clientSecret:(NSString *)clientSecret Authentication:(DisposeAuthenticationBlock)disposeAuthenticationBlock DisposeBGSendCodeBlock:(DisposeBGSendCodeBlock)disposeBGSendCodeBlock DisposeBGStripInBlock:(DisposeBGStripInBlock)disposeBGStripInBlock DisposeBGBloodBlock:(DisposeBGBloodBlock)disposeBGBloodBlock DisposeBGResultBlock:(DisposeBGResultBlock)disposeBGResultBlock DisposeBGErrorBlock:(DisposeBGErrorBlock)disposeBGErrorBlock;
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
@end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
//
|
2
|
+
// BG3Controller.h
|
3
|
+
// iHealthBG
|
4
|
+
//
|
5
|
+
// Created by daiqingquan on 14-2-20.
|
6
|
+
// Copyright (c) 2014年 andon. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
#import "BG3.h"
|
11
|
+
|
12
|
+
/**
|
13
|
+
BG3Controller
|
14
|
+
*/
|
15
|
+
@interface BG3Controller : NSObject
|
16
|
+
|
17
|
+
/**
|
18
|
+
*Initialization for BG3 (wireless BG via Bluetooth)
|
19
|
+
*/
|
20
|
+
+(BG3Controller *)shareIHBg3Controller;
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Get all BG3 Instance
|
24
|
+
* The methold needs to be called when the BG3 has been triggered. When the app detected the glucose meter, the notification with the name of DeviceAuthenSuccess will be sent. After the device disconnected, the notification with the name of DeviceAuthenSuccess will be received.
|
25
|
+
*/
|
26
|
+
-(BG3 *)getCurrentBG3Instace;
|
27
|
+
|
28
|
+
@end
|
@@ -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
|
101
|
+
DisposeBGSendBottleIDBlock:(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
|
@@ -0,0 +1,28 @@
|
|
1
|
+
//
|
2
|
+
// BG5Controller.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
|
+
BG5Controller
|
14
|
+
*/
|
15
|
+
@interface BG5Controller : BGController
|
16
|
+
|
17
|
+
/**
|
18
|
+
*Initialization for BG5 (wireless BG via Bluetooth)
|
19
|
+
*/
|
20
|
+
+(BG5Controller *)shareIHBg5Controller;
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Get all BG5 Instance
|
24
|
+
* The methold needs to be called when the BG5 has been triggered. When the app detected the glucose meter, the notification with the name of BG5ConnectNoti will be sent. After the device disconnected, the notification with the name of BG5DisConnectNoti will be received.
|
25
|
+
*/
|
26
|
+
-(NSArray *)getAllCurrentBG5Instace;
|
27
|
+
|
28
|
+
@end
|