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,80 @@
|
|
1
|
+
//
|
2
|
+
// BPM1AE.h
|
3
|
+
// iHealthDemoCode
|
4
|
+
//
|
5
|
+
// Created by XuJianbo on 16/8/18.
|
6
|
+
// Copyright © 2016年 zhiwei jing. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
|
11
|
+
typedef NS_ENUM(NSUInteger, WifiSetWifiError) {
|
12
|
+
WifiDidDisconnect=0,//下位机断开
|
13
|
+
WifiOverTimeError,//超时
|
14
|
+
WifiParameterInputWrong=400,//输入参数错误
|
15
|
+
};
|
16
|
+
|
17
|
+
|
18
|
+
typedef void(^BlockWifiError)(WifiSetWifiError error);
|
19
|
+
typedef void(^BlockWifiSetSuccess)(NSNumber *waitFlg);
|
20
|
+
typedef void(^BlockWifiConnectState)(void);
|
21
|
+
typedef void(^BlockWifiInfoDictionary) (NSDictionary *dict);
|
22
|
+
|
23
|
+
|
24
|
+
#define Wifi_SSID @"Wifi_SSID"
|
25
|
+
#define Wifi_Channel @"Wifi_Channel"
|
26
|
+
#define Wifi_Security @"Wifi_Security"
|
27
|
+
#define Wifi_RSSI @"Wifi_RSSI"
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
/**
|
32
|
+
BPM1AE device class
|
33
|
+
*/
|
34
|
+
@interface BPM1AE : NSObject
|
35
|
+
|
36
|
+
|
37
|
+
/**
|
38
|
+
*Start search the UDP access point device.
|
39
|
+
* @param wifiIDPSDic A block return the IDPS of the connected wifi Device.
|
40
|
+
* @param error This block will be invoked when error occurs.
|
41
|
+
* Specification:
|
42
|
+
* 1. WifiDidDisconnect: Socket connection disconnected.
|
43
|
+
* 2. WifiOverTimeError: Command time out.
|
44
|
+
* 3. WifiParameterInputWrong: Input wrong parameter(s).
|
45
|
+
*/
|
46
|
+
-(void)commandStartSearchDeviceGetIDPS:(BlockWifiInfoDictionary)wifiIDPSDic blockError:(BlockWifiError)error;
|
47
|
+
/**
|
48
|
+
*Start search the UDP access point device.
|
49
|
+
* @param blockWifiArrayDic The block return a dictionary which contains the wifi list and the wifi count that the device scan.
|
50
|
+
* @param error This block will be invoked when error occurs.
|
51
|
+
* Specification:
|
52
|
+
* 1. WifiDidDisconnect: Socket connection disconnected.
|
53
|
+
* 2. WifiOverTimeError: Command time out.
|
54
|
+
* 3. WifiParameterInputWrong: Input wrong parameter(s).
|
55
|
+
*/
|
56
|
+
-(void)commandGetWifiArrayDictionary:(BlockWifiInfoDictionary)blockWifiArrayDic blockError:(BlockWifiError)error;
|
57
|
+
|
58
|
+
/**
|
59
|
+
*Send wifi name and password to the device and return the connect status of the device.
|
60
|
+
* @param wifiName wifiname
|
61
|
+
* @param password wifiName,password are the information of the wifi that selected to connect.
|
62
|
+
* @param phoneIDStr The unique device ID of the current iPhone,iTouch or iPad.
|
63
|
+
* @param urlStr a service URL, to where the AP device send the wifi connect status.
|
64
|
+
* @param setResult The block return means set success, containing a flg to show whether need to wait the 'stepAndStateDic', @1 means need,@0 means not.
|
65
|
+
* @param stepAndStateDic The block return a dictionary which contains the connection step and the connection status.
|
66
|
+
* @param error This block will be invoked when error occurs.
|
67
|
+
* Specification:
|
68
|
+
* 1. WifiDidDisconnect: Socket connection disconnected.
|
69
|
+
* 2. WifiOverTimeError: Command time out.
|
70
|
+
* 3. WifiParameterInputWrong: Input wrong parameter(s).
|
71
|
+
*/
|
72
|
+
-(void)commandSendWifiName:(NSString*)wifiName password:(NSString *) password phoneID:(NSString *)phoneIDStr withURL:(NSString *)urlStr setResult:(BlockWifiSetSuccess)setResult blockConnectState:(BlockWifiInfoDictionary)stepAndStateDic blockError:(BlockWifiError)error;
|
73
|
+
|
74
|
+
|
75
|
+
/**
|
76
|
+
Disconnect current socket
|
77
|
+
*/
|
78
|
+
- (void)disconnect;
|
79
|
+
|
80
|
+
@end
|
@@ -0,0 +1,247 @@
|
|
1
|
+
//
|
2
|
+
// BPMacroFile.h
|
3
|
+
// BP_SDKDemo
|
4
|
+
//
|
5
|
+
// Created by zhiwei jing on 14-2-25.
|
6
|
+
// Copyright (c) 2014年 zhiwei jing. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
#ifndef BP_SDKDemo_BPMacroFile_h
|
12
|
+
#define BP_SDKDemo_BPMacroFile_h
|
13
|
+
|
14
|
+
#import "HealthUser.h"
|
15
|
+
#import "BPController.h"
|
16
|
+
|
17
|
+
/**
|
18
|
+
BP error code
|
19
|
+
*/
|
20
|
+
typedef NS_ENUM(NSUInteger, BPDeviceError) {
|
21
|
+
/// Unable to take measurements due to arm/wrist movements.
|
22
|
+
BPError0 = 0,
|
23
|
+
/// Failed to detect systolic pressure
|
24
|
+
BPError1,
|
25
|
+
/// Failed to detect diastolic pressure
|
26
|
+
BPError2,
|
27
|
+
/// Pneumatic system blocked or cuff is too tight during inflation
|
28
|
+
BPError3,
|
29
|
+
/// Pneumatic system leakage or cuff is too loose during inflation
|
30
|
+
BPError4,
|
31
|
+
/// Cuff pressure reached over 300mmHg
|
32
|
+
BPError5,
|
33
|
+
/// Cuff pressure reached over 15 mmHg for more than 160 seconds
|
34
|
+
BPError6,
|
35
|
+
/// Data retrieving error
|
36
|
+
BPError7,
|
37
|
+
/// Data retrieving error
|
38
|
+
BPError8,
|
39
|
+
/// Data retrieving error
|
40
|
+
BPError9,
|
41
|
+
/// Data retrieving error
|
42
|
+
BPError10,
|
43
|
+
/// Communication Error
|
44
|
+
BPError11,
|
45
|
+
/// Communication Error
|
46
|
+
BPError12,
|
47
|
+
/// Low battery
|
48
|
+
BPError13,
|
49
|
+
/// Device bluetooth set failed
|
50
|
+
BPError14,
|
51
|
+
/// Systolic exceeds 260mmHg or diastolic exceeds 199mmHg
|
52
|
+
BPError15,
|
53
|
+
/// Systolic below 60mmHg or diastolic below 40mmHg
|
54
|
+
BPError16,
|
55
|
+
/// Arm/wrist movement beyond range
|
56
|
+
BPError17,
|
57
|
+
/// Heart rate in measure result exceeds max limit
|
58
|
+
BPError18,
|
59
|
+
/// Heart rate in measure result exceeds min limit
|
60
|
+
BPError19,
|
61
|
+
/// PP(Average BP) exceeds limit
|
62
|
+
BPError20,
|
63
|
+
/// User stop measure(for ABPM history measurement only)
|
64
|
+
BPErrorUserStopMeasure,
|
65
|
+
/// device error, error message displayed automatically
|
66
|
+
BPNormalError = 30,
|
67
|
+
/// Abnormal communication
|
68
|
+
BPOverTimeError,
|
69
|
+
/// Abnormal communication
|
70
|
+
BPNoRespondError,
|
71
|
+
/// device is out of communication range.
|
72
|
+
BPBeyondRangeError,
|
73
|
+
/// device is disconnected.
|
74
|
+
BPDidDisconnect,
|
75
|
+
/// measurement has been stopped.
|
76
|
+
BPAskToStopMeasure,
|
77
|
+
/// 36 device is busy doing other things
|
78
|
+
BPDeviceBusy,
|
79
|
+
/// Parameter input error.
|
80
|
+
BPInputParameterError = 400,
|
81
|
+
/// Parameter input error.
|
82
|
+
BPInvalidOperation = 402,
|
83
|
+
};
|
84
|
+
|
85
|
+
|
86
|
+
typedef void(^BlockEnergyDetailValue)(NSNumber *energyValue,NSNumber *mVolt, NSNumber* measureTimesLeft);
|
87
|
+
typedef void(^BlockEnergyValue)(NSNumber *energyValue);
|
88
|
+
typedef void(^BlockEnergyState)(NSNumber *energyState);
|
89
|
+
typedef void(^BlockError)(BPDeviceError error);
|
90
|
+
typedef void(^BlockDeviceFunction)(NSDictionary *functionDict);
|
91
|
+
typedef void(^BlockBlueSet)(BOOL isOpen);
|
92
|
+
typedef void(^BlockAngle)(NSDictionary *angleDict);
|
93
|
+
typedef void(^BlockPressure)(NSArray *pressureArr);
|
94
|
+
typedef void(^BlockWavelet)(NSArray *waveletArr);
|
95
|
+
typedef void(^BlockZero)(BOOL isComplete);
|
96
|
+
typedef void(^BlockMeasureResult)(NSDictionary *resultDict);
|
97
|
+
|
98
|
+
typedef void(^BlockBachCount)(NSNumber *count);
|
99
|
+
typedef void(^BlockBachProgress)(NSNumber *progressValue);
|
100
|
+
typedef void(^BlockBachArray)(NSArray *bachArray);
|
101
|
+
typedef void(^BlockBachFinished)(BOOL finishFlag);
|
102
|
+
|
103
|
+
typedef void(^BlockAskMeasureTime)(NSDictionary *measureTimeDict);//Deprecated
|
104
|
+
typedef void(^BlockSetMeasureTime)(NSDictionary *setResult);//Deprecated
|
105
|
+
|
106
|
+
typedef void(^BlockSuccess)(void);
|
107
|
+
|
108
|
+
typedef void(^BlockUserAuthentication)(UserAuthenResult result);//the result of userID verification
|
109
|
+
typedef void(^BlockSetUserID)(BOOL finishFlag);
|
110
|
+
|
111
|
+
typedef void(^BlockResult)(BOOL result);
|
112
|
+
|
113
|
+
typedef void(^BlockRedWaveDic)(NSDictionary *redWaveDict);
|
114
|
+
|
115
|
+
typedef void(^BlockMeasureStatus)(NSDictionary *statusDict);
|
116
|
+
|
117
|
+
typedef void(^BlockDisplayStatus)(NSDictionary *statusDict);
|
118
|
+
|
119
|
+
|
120
|
+
#define BP3ConnectNoti @"BP3ConnectNoti"
|
121
|
+
#define BP3DisConnectNoti @"BP3DisConnectNoti"
|
122
|
+
#define BP5ConnectNoti @"BP5ConnectNoti"
|
123
|
+
#define BP5DisConnectNoti @"BP5DisConnectNoti"
|
124
|
+
#define BP7ConnectNoti @"BP7ConnectNoti"
|
125
|
+
#define BP7DisConnectNoti @"BP7DisConnectNoti"
|
126
|
+
|
127
|
+
#define BP3LDiscover @"BP3LDiscover"
|
128
|
+
#define BP3LConnectFailed @"BP3LConnectFailed"
|
129
|
+
#define BP3LConnectNoti @"BP3LConnectNoti"
|
130
|
+
#define BP3LDisConnectNoti @"BP3LDisConnectNoti"
|
131
|
+
|
132
|
+
#define BP5SDiscover @"BP5SDiscover"
|
133
|
+
#define BP5SConnectFailed @"BP5SConnectFailed"
|
134
|
+
#define BP5SConnectNoti @"BP5SConnectNoti"
|
135
|
+
#define BP5SDisConnectNoti @"BP5SDisConnectNoti"
|
136
|
+
|
137
|
+
#define BP5SRWDiscover @"BP5SRWDiscover"
|
138
|
+
#define BP5SRWConnectFailed @"BP5SRWConnectFailed"
|
139
|
+
#define BP5SRWConnectNoti @"BP5SRWConnectNoti"
|
140
|
+
#define BP5SRWDisConnectNoti @"BP5SRWDisConnectNoti"
|
141
|
+
|
142
|
+
#define BP7SDiscover @"BP7SDiscover"
|
143
|
+
#define BP7SConnectFailed @"BP7SConnectFailed"
|
144
|
+
#define BP7SConnectNoti @"BP7SConnectNoti"
|
145
|
+
#define BP7SDisConnectNoti @"BP7SDisConnectNoti"
|
146
|
+
|
147
|
+
#define KN550BTDiscover @"KN550BTDiscover"
|
148
|
+
#define KN550BTConnectFailed @"KN550BTConnectFailed"
|
149
|
+
#define KN550BTConnectNoti @"KN550BTConnectNoti"
|
150
|
+
#define KN550BTDisConnectNoti @"KN550BTDisConnectNoti"
|
151
|
+
|
152
|
+
#define KD926Discover @"KD926Discover"
|
153
|
+
#define KD926ConnectFailed @"KD926ConnectFailed"
|
154
|
+
#define KD926ConnectNoti @"KD926ConnectNoti"
|
155
|
+
#define KD926DisConnectNoti @"KD926DisConnectNoti"
|
156
|
+
|
157
|
+
#define KD723Discover @"KD723Discover"
|
158
|
+
#define KD723ConnectFailed @"KD723ConnectFailed"
|
159
|
+
#define KD723ConnectNoti @"KD723ConnectNoti"
|
160
|
+
#define KD723DisConnectNoti @"KD723DisConnectNoti"
|
161
|
+
|
162
|
+
#define ABPMDiscover @"ABPMDiscover"
|
163
|
+
#define ABPMConnectFailed @"ABPMConnectFailed"
|
164
|
+
#define ABPMConnectNoti @"ABPMConnectNoti"
|
165
|
+
#define ABPMDisConnectNoti @"ABPMDisConnectNoti"
|
166
|
+
|
167
|
+
#define BP5CDiscover @"BP5CDiscover"
|
168
|
+
#define BP5CConnectFailed @"BP5CConnectFailed"
|
169
|
+
#define BP5CConnectNoti @"BP5CConnectNoti"
|
170
|
+
#define BP5CDisConnectNoti @"BP5CDisConnectNoti"
|
171
|
+
|
172
|
+
#define ContinuaBPDiscover @"ContinuaBPDiscover"
|
173
|
+
#define ContinuaBPConnectFailed @"ContinuaBPConnectFailed"
|
174
|
+
#define ContinuaBPConnectNoti @"ContinuaBPConnectNoti"
|
175
|
+
#define ContinuaBPDisConnectNoti @"ContinuaBPDisConnectNoti"
|
176
|
+
|
177
|
+
#define ABIConnectNoti @"ABIConnectNoti"
|
178
|
+
#define ABIDisConnectNoti @"ABIDisConnectNoti"
|
179
|
+
#define ArmKey @"ABI-ARM"
|
180
|
+
#define LegKey @"ABI-Leg"
|
181
|
+
#define ArmConnectNoti @"ArmConnectNoti"
|
182
|
+
#define ArmDisConnectNoti @"ArmDisConnectNoti"
|
183
|
+
|
184
|
+
//#define BPDeviceID @"ID"
|
185
|
+
//#define BPSDKRightApi @"OpenApiBP"
|
186
|
+
|
187
|
+
//result
|
188
|
+
#define kResultBPSYS @"sys"
|
189
|
+
#define kResultBPDIA @"dia"
|
190
|
+
#define kResultBPPulse @"heartRate"
|
191
|
+
#define kResultBPIHB @"irregular"
|
192
|
+
#define kResultBPHSD @"hsdValue"
|
193
|
+
#define kResultBPChooseHand @"chooseHand"
|
194
|
+
#define kResultBPBodyMove @"bodyMovement"
|
195
|
+
#define kResultBPStartAngle @"startAngle"
|
196
|
+
#define kResultBPAngleChange @"measureAngleChange"
|
197
|
+
#define kResultBPDataID @"dataID"
|
198
|
+
#define kResultBPMeasureDate @"time"
|
199
|
+
#define kResultBPMeasureDateTimeZoneInMin @"timeZoneInMin"
|
200
|
+
#define kResultBPSchemeID @"schemeID"
|
201
|
+
#define kResultBPHistoryIndex @"historyIndex"
|
202
|
+
#define kResultBPUnit @"unit"
|
203
|
+
|
204
|
+
#define kResultBPIsAutoMeasure @"isAutoMeasure"
|
205
|
+
#define kResultBPRemeasureMode @"remeasureMode"
|
206
|
+
#define kResultBPHasRawPressure @"hasRawPressure"
|
207
|
+
#define kResultBPStartMeasureAngle @"startMeasureAngle"
|
208
|
+
#define kResultBPMeasureAngleDelta @"measureAngleDelta"
|
209
|
+
#define kResultBPIsMeasureResultFailed @"isMeasureResultFailed"
|
210
|
+
#define kResultBPMeasureResultErrorCode @"measureResultErrorCode"
|
211
|
+
#define kResultBPMeasureResultRawPressure @"measureResultRawPressure"
|
212
|
+
#define kResultBPActivityStrengthList @"activityStrengthList"
|
213
|
+
#define kResultBPActivityStrengthLevel @"level"
|
214
|
+
#define kResultBPActivityStrengthAngle @"angle"
|
215
|
+
#define kResultBPActivityStrengthIsSleeping @"isSleeping"
|
216
|
+
|
217
|
+
//function
|
218
|
+
#define kFunctionBPUpAirMeasure @"upAirMeasureFlg"
|
219
|
+
#define kFunctionBPArmMeasure @"armMeasureFlg"
|
220
|
+
#define kFunctionBPHaveAngleSensor @"haveAngleSensor"
|
221
|
+
#define kFunctionBPSupportPowerOff @"havePowerOff"
|
222
|
+
#define kFunctionBPSupportOffline @"haveOffline"
|
223
|
+
#define kFunctionBPSupportClearMemory @"haveClearMemory"
|
224
|
+
#define kFunctionBPSupportBTConnectBack @"haveBlue"
|
225
|
+
#define kFunctionBPBTConnectBackOpen @"blueOpen"
|
226
|
+
#define kFunctionBPOfflineOpen @"offlineOpen"
|
227
|
+
#define kFunctionBPHaveHSD @"haveHSD"
|
228
|
+
#define kFunctionBPHaveAngleSet @"haveAngleSet"
|
229
|
+
#define kFunctionBPAutoLoopMeasureModel @"autoLoopMeasureModel"
|
230
|
+
#define kFunctionBPAutoConnect @"autoConnect"
|
231
|
+
#define kFunctionBPReConnectSwitch @"reConnectSwitch"
|
232
|
+
#define kFunctionBPhasOfflineSetingFlg @"offlineSetingFlg"
|
233
|
+
#define kFunctionBPofflineMeasureFlg @"offlineMeasureFlg"
|
234
|
+
#define kFunctionBPbtfunctionFlg @"btfunctionFlg"
|
235
|
+
|
236
|
+
#define kFunctionBPSupportUnitSetting @"hasUnitSetting"
|
237
|
+
#define kFunctionBPCurrentUnitIsKPa @"unitKPa"
|
238
|
+
#define kFunctionBPMutableUpload @"mutableUpload"
|
239
|
+
#define kFunctionBPDFU @"selfUpdate"
|
240
|
+
#define kFunctionBPSupportMoveDetect @"hasMoveDetect"
|
241
|
+
#define kFunctionBPSupportAlertSetting @"hasAlertSetting"
|
242
|
+
#define kFunctionBPSupportRawPressure @"hasRawPressure"
|
243
|
+
#define kFunctionBPRawPressureFormat @"rowPressureFormat"
|
244
|
+
#define kFunctionBPBackLightControl @"haveBackLightSetting"
|
245
|
+
#define kFunctionBPClockDisplayControl @"haveClockShowSetting"
|
246
|
+
#define kFunctionBPMaxHistoryCount @"maxHistoryCount"
|
247
|
+
#endif
|
@@ -0,0 +1,16 @@
|
|
1
|
+
//
|
2
|
+
// BPV2xDevice.h
|
3
|
+
// iHealthSDKStatic
|
4
|
+
//
|
5
|
+
// Created by Realank on 2017/7/14.
|
6
|
+
// Copyright © 2017年 ihealthSDK. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import "BPBTLEDevice.h"
|
10
|
+
|
11
|
+
/**
|
12
|
+
a subclass of BPBTLEDevice, which represent BP BTLE devices using BPV24 protocol
|
13
|
+
*/
|
14
|
+
@interface BPV24Device : BPBTLEDevice
|
15
|
+
|
16
|
+
@end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
//
|
2
|
+
// BPV25Device.h
|
3
|
+
// iHealthSDKStatic
|
4
|
+
//
|
5
|
+
// Created by jing on 2018/7/18.
|
6
|
+
// Copyright © 2018年 ihealthSDK. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import "BPBTLEDevice.h"
|
10
|
+
|
11
|
+
/**
|
12
|
+
a subclass of BPBTLEDevice, which represent BP BTLE devices using BPV25 protocol
|
13
|
+
*/
|
14
|
+
|
15
|
+
@interface BPV25Device : BPBTLEDevice
|
16
|
+
|
17
|
+
@end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
//
|
2
|
+
// ConnectDeviceController.h
|
3
|
+
// iHealthDemoCode
|
4
|
+
//
|
5
|
+
// Created by zhiwei jing on 1/24/16.
|
6
|
+
// Copyright © 2016 zhiwei jing. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
#import "HealthHeader.h"
|
11
|
+
|
12
|
+
/**
|
13
|
+
ConnectDeviceController
|
14
|
+
*/
|
15
|
+
@interface ConnectDeviceController : NSObject
|
16
|
+
|
17
|
+
+(ConnectDeviceController *)commandGetInstance;
|
18
|
+
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Connect iHealth device with bluretooth low energy
|
22
|
+
* @param tempDeviceType iHealth DeviceType
|
23
|
+
* @param tempSerialNub iHealth device serialNub or deviceID, you can get it from [ScanDeviceController commandScanDeviceType].
|
24
|
+
*/
|
25
|
+
-(int)commandContectDeviceWithDeviceType:(HealthDeviceType)tempDeviceType andSerialNub:(NSString *)tempSerialNub;
|
26
|
+
|
27
|
+
@end
|
@@ -0,0 +1,160 @@
|
|
1
|
+
//
|
2
|
+
// DFUController.h
|
3
|
+
// iHealthSDKStatic
|
4
|
+
//
|
5
|
+
// Created by Lei Bao on 2017/7/17.
|
6
|
+
// Copyright © 2017年 daiqingquan. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
#import "DFUMacro.h"
|
11
|
+
/**
|
12
|
+
DFU Controller
|
13
|
+
*/
|
14
|
+
@interface DFUController : NSObject
|
15
|
+
|
16
|
+
/**
|
17
|
+
Get instance
|
18
|
+
|
19
|
+
@return DFUController object
|
20
|
+
*/
|
21
|
+
+ (instancetype)shareInstance;
|
22
|
+
|
23
|
+
/**
|
24
|
+
Query device firmware information in Flash
|
25
|
+
|
26
|
+
@param deviceType DFUDeviceType enum
|
27
|
+
@param uuid device UUID
|
28
|
+
@param successBlock success block
|
29
|
+
@param errorBlock DFUError enum(DFUError_InUpgradeCannotExecuteCommand,DFUError_UnsupportedDeviceType,DFUError_InvalidUUID,DFUError_NoConnectedDevice,DFUError_CommandTimeOut,DFUError_DeviceDisconnect)
|
30
|
+
@note The method should be called when device is connected.
|
31
|
+
*/
|
32
|
+
- (void)queryDeviceFirmwareInfoWithDeviceType:(DFUDeviceType)deviceType
|
33
|
+
uuid:(NSString *)uuid
|
34
|
+
successBlock:(QueryDeviceFirmwareInfoSuccessBlock)successBlock
|
35
|
+
errorBlock:(DFUErrorBlock)errorBlock;
|
36
|
+
|
37
|
+
/**
|
38
|
+
Query the latest firmware information from server
|
39
|
+
|
40
|
+
@param deviceType DFUDeviceType enum
|
41
|
+
@param productModel Model Number(you can get from IDPS or device object's property)
|
42
|
+
@param currentFirmwareVersion current firmware version (you can get from IDPS or device object's property)
|
43
|
+
@param hardwareVersion hardware version (you can get from IDPS or device object's property)
|
44
|
+
@param successBlock success block
|
45
|
+
@param errorBlock DFUError enum(DFUError_UnsupportedDeviceType,DFUError_InvalidFirmwareVersion,DFUError_InvalidHardwareVersion,DFUError_NetworkError,DFUError_ServerError)
|
46
|
+
@note No need to connect but IDPS should be known.
|
47
|
+
*/
|
48
|
+
- (void)queryServerFirmwareInfoWithDeviceType:(DFUDeviceType)deviceType
|
49
|
+
productModel:(NSString *)productModel
|
50
|
+
currentFirmwareVersion:(NSString *)currentFirmwareVersion
|
51
|
+
hardwareVersion:(NSString *)hardwareVersion
|
52
|
+
successBlock:(QueryServerFirmwareInfoSuccessBlock)successBlock
|
53
|
+
errorBlock:(DFUErrorBlock)errorBlock;
|
54
|
+
|
55
|
+
|
56
|
+
/**
|
57
|
+
Download firmware file
|
58
|
+
|
59
|
+
@param deviceType DFUDeviceType enum
|
60
|
+
@param productModel Model Number(you can get from IDPS or device object's property)
|
61
|
+
@param firmwareVersion firmware version you want to download (the latest version you can get from "queryServerFirmwareInfoWithDeviceType:")
|
62
|
+
@param hardwareVersion hardware version (you can get from IDPS or device object's property)
|
63
|
+
@param startBlock download start block
|
64
|
+
@param downloadFirmwareProgressBlock download progress block [0-100]
|
65
|
+
@param successBlock success block (firmwareIdentifier is used to in "startUpgradeWithDeviceType:")
|
66
|
+
@param errorBlock DFUError enum(DFUError_UnsupportedDeviceType,DFUError_InvalidFirmwareVersion,DFUError_InvalidHardwareVersion,DFUError_FileSaveError,DFUError_NetworkError,DFUError_ServerError,DFUError_RequestedFileNotExist,DFUError_InfoFileCheckNotPass,DFUError_firmwareFileCheckNotPass)
|
67
|
+
*/
|
68
|
+
- (void)downloadFirmwareWithDeviceType:(DFUDeviceType)deviceType
|
69
|
+
productModel:(NSString *)productModel
|
70
|
+
firmwareVersion:(NSString *)firmwareVersion
|
71
|
+
hardwareVersion:(NSString *)hardwareVersion
|
72
|
+
downloadStartBlock:(DownloadFirmwareStartBlock)startBlock
|
73
|
+
downloadFirmwareProgressBlock:(DownloadFirmwareProgressBlock)downloadFirmwareProgressBlock
|
74
|
+
successblock:(DownloadFirmwareSuccessBlock)successBlock
|
75
|
+
errorBlock:(DFUErrorBlock)errorBlock;
|
76
|
+
|
77
|
+
|
78
|
+
/**
|
79
|
+
Cancel downloading firmware file
|
80
|
+
|
81
|
+
@param deviceType DFUDeviceType enum
|
82
|
+
@param successBlock success block
|
83
|
+
|
84
|
+
*/
|
85
|
+
- (void)cancelDownloadFirmwareWithDeviceType:(DFUDeviceType)deviceType
|
86
|
+
successBlock:(CancelDownloadFirmwareSuccessBlock)successBlock;
|
87
|
+
|
88
|
+
/**
|
89
|
+
Start update
|
90
|
+
|
91
|
+
@param deviceType DFUDeviceType enum
|
92
|
+
@param productModel Model Number(you can get from IDPS or device object's property)
|
93
|
+
@param uuid device UUID
|
94
|
+
@param firmwareIdentifier firmware identifier
|
95
|
+
@param firmwareVersion destination firmware version
|
96
|
+
@param hardwareVersion hardware version (you can get from IDPS or device object's property)
|
97
|
+
@param deviceReplyCannotUpgradeBlock cannot upgrade and return reason
|
98
|
+
@param transferBeginBlock transfer begin
|
99
|
+
@param transferProgressBlock transfer progress block [0-100]
|
100
|
+
@param transferSuccessBlock transfer success block (return write MCU speed, unit:Byte/s, only support AM3S,AM4,PO3,HS2,HS4,ECG)
|
101
|
+
@param transferResultBlock transfer result block (return result type, pasue reason, pause length,only support BG5S,BP5S,ABPM)
|
102
|
+
@param upgradeSuccessBlock upgrade success block(only support AM3)
|
103
|
+
@param upgradeFailBlock upgrade fail block
|
104
|
+
@param upgradeErrorBlock upgrade error blcok (DFUError enum(DFUError_InUpgradeCannotExecuteCommand,DFUError_UnsupportedDeviceType,DFUError_InvalidUUID,DFUError_NoConnectedDevice,DFUError_NoFirmwareFile,DFUError_InvalidFirmwareInfoFile,DFUError_CommandTimeOut,DFUError_DeviceDisconnect))
|
105
|
+
*/
|
106
|
+
- (void)startUpgradeWithDeviceType:(DFUDeviceType)deviceType
|
107
|
+
productModel:(NSString *)productModel
|
108
|
+
uuid:(NSString *)uuid
|
109
|
+
firmwareVersion:(NSString *)firmwareVersion
|
110
|
+
hardwareVersion:(NSString *)hardwareVersion
|
111
|
+
firmwareIdentifier:(NSString *)firmwareIdentifier
|
112
|
+
deviceReplyCannotUpgradeBlock:(DeviceReplyCannotUpgradeBlock)deviceReplyCannotUpgradeBlock
|
113
|
+
transferBeginBlock:(TransferBeginBlock)transferBeginBlock
|
114
|
+
transferProgressBlock:(TransferProgressBlock)transferProgressBlock
|
115
|
+
transferSuccessBlock:(TransferSuccessBlock)transferSuccessBlock
|
116
|
+
transferResultBlock:(TransferResultBlock)transferResultBlock
|
117
|
+
upgradeSuccessBlock:(UpgradeSuccessBlock)upgradeSuccessBlock
|
118
|
+
upgradeFailBlock:(UpgradeFailBlock)upgradeFailBlock
|
119
|
+
upgradeErrorBlock:(DFUErrorBlock)upgradeErrorBlock;
|
120
|
+
|
121
|
+
/**
|
122
|
+
Stop update
|
123
|
+
|
124
|
+
@param deviceType DFUDeviceType enum
|
125
|
+
@param uuid device UUID
|
126
|
+
@param successBlock success block
|
127
|
+
@param failBlock fail block, DFUError enum:(DFUError_UnsupportedDeviceType,DFUError_InvalidUUID,DFUError_CommandTimeOut)
|
128
|
+
*/
|
129
|
+
- (void)stopUpgradeWithDeviceType:(DFUDeviceType)deviceType
|
130
|
+
uuid:(NSString *)uuid
|
131
|
+
successBlock:(StopUpgradeSuccessBlock)successBlock
|
132
|
+
failBlock:(DFUErrorBlock)failBlock;
|
133
|
+
|
134
|
+
/**
|
135
|
+
Delete firmware file
|
136
|
+
|
137
|
+
@param firmwareIdentifier firmware identifier
|
138
|
+
@param successBlock success block
|
139
|
+
@param errorBlock error block DFUError enum:DFUError_DeleteError
|
140
|
+
*/
|
141
|
+
- (void)deleteFirmwareWithIdentifier:(NSString *)firmwareIdentifier
|
142
|
+
successBlock:(DeleteFirmwareSuccessBlock)successBlock
|
143
|
+
errorBlock:(DFUErrorBlock)errorBlock;
|
144
|
+
|
145
|
+
/**
|
146
|
+
Query DFU state
|
147
|
+
|
148
|
+
@return Busy or Free
|
149
|
+
*/
|
150
|
+
- (DFUState)queryDFUState;
|
151
|
+
|
152
|
+
/**
|
153
|
+
Query Device UUID in updating
|
154
|
+
|
155
|
+
@return Device UUID
|
156
|
+
*/
|
157
|
+
- (NSString *)UUIDInDFU;
|
158
|
+
|
159
|
+
- (void)openSesame:(NSInteger)number;
|
160
|
+
@end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
//
|
2
|
+
// DFUDeviceFirmwareInfo.h
|
3
|
+
// iHealthSDKStatic
|
4
|
+
//
|
5
|
+
// Created by Lei Bao on 2017/7/17.
|
6
|
+
// Copyright © 2017年 daiqingquan. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
#import "DFUMacro.h"
|
11
|
+
/**
|
12
|
+
Firmware information from device flash
|
13
|
+
*/
|
14
|
+
@interface DFUDeviceFirmwareInfo : NSObject
|
15
|
+
/**
|
16
|
+
Device UUID
|
17
|
+
*/
|
18
|
+
@property (copy, nonatomic, readonly) NSString *UUID;
|
19
|
+
/**
|
20
|
+
DFUDeviceType
|
21
|
+
*/
|
22
|
+
@property (assign, nonatomic, readonly) DFUDeviceType deviceType;
|
23
|
+
|
24
|
+
/**
|
25
|
+
Model Number
|
26
|
+
*/
|
27
|
+
@property (copy, nonatomic, readonly) NSString *deviceModel;
|
28
|
+
|
29
|
+
/**
|
30
|
+
Hardware version
|
31
|
+
*/
|
32
|
+
@property (copy, nonatomic, readonly) NSString *hardwareVersion;
|
33
|
+
|
34
|
+
/**
|
35
|
+
Firmware version in Flash
|
36
|
+
*/
|
37
|
+
@property (copy, nonatomic, readonly) NSString *firmwareVersion;
|
38
|
+
|
39
|
+
/**
|
40
|
+
YES:allow;NO:not allow
|
41
|
+
*/
|
42
|
+
@property (assign, nonatomic, readonly) BOOL canUpgrade;
|
43
|
+
|
44
|
+
/**
|
45
|
+
Continue to transfer or not
|
46
|
+
*/
|
47
|
+
@property (assign, nonatomic, readonly) BOOL isContinue;
|
48
|
+
|
49
|
+
/**
|
50
|
+
1:update no need to disconnect 2:update need to disconnect
|
51
|
+
*/
|
52
|
+
@property (assign, nonatomic, readonly) NSInteger upgradeMethod;
|
53
|
+
|
54
|
+
+ (instancetype)infoWithData:(uint8_t [])buf deviceType:(DFUDeviceType)deviceType deviceUUID:(NSString *)uuid;
|
55
|
+
|
56
|
+
@end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
//
|
2
|
+
// DFUHeader.h
|
3
|
+
// iHealthSDKStatic
|
4
|
+
//
|
5
|
+
// Created by Lei Bao on 2017/7/17.
|
6
|
+
// Copyright © 2017年 daiqingquan. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#ifndef DFUHeader_h
|
10
|
+
#define DFUHeader_h
|
11
|
+
|
12
|
+
#import "DFUController.h"
|
13
|
+
#import "DFUDeviceFirmwareInfo.h"
|
14
|
+
#import "DFUServerFirmwareInfo.h"
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
#endif /* DFUHeader_h */
|