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.
Files changed (178) hide show
  1. package/CapacitorPluginIhealth.podspec +35 -0
  2. package/README.md +214 -0
  3. package/android/build.gradle +58 -0
  4. package/android/src/main/AndroidManifest.xml +2 -0
  5. package/android/src/main/java/com/managemyhealth/plugins/ihealth/ihealth.java +11 -0
  6. package/android/src/main/java/com/managemyhealth/plugins/ihealth/ihealthPlugin.java +22 -0
  7. package/android/src/main/res/.gitkeep +0 -0
  8. package/dist/docs.json +450 -0
  9. package/dist/esm/definitions.d.ts +29 -0
  10. package/dist/esm/definitions.js +2 -0
  11. package/dist/esm/definitions.js.map +1 -0
  12. package/dist/esm/index.d.ts +4 -0
  13. package/dist/esm/index.js +7 -0
  14. package/dist/esm/index.js.map +1 -0
  15. package/dist/esm/web.d.ts +37 -0
  16. package/dist/esm/web.js +42 -0
  17. package/dist/esm/web.js.map +1 -0
  18. package/dist/plugin.cjs.js +58 -0
  19. package/dist/plugin.cjs.js.map +1 -0
  20. package/dist/plugin.js +61 -0
  21. package/dist/plugin.js.map +1 -0
  22. package/ios/Plugin/Info.plist +24 -0
  23. package/ios/Plugin/Plugin-Bridging-Header.h +35 -0
  24. package/ios/Plugin/iHealthSDKHeaders/ABI.h +82 -0
  25. package/ios/Plugin/iHealthSDKHeaders/ABIController.h +28 -0
  26. package/ios/Plugin/iHealthSDKHeaders/ABPM.h +144 -0
  27. package/ios/Plugin/iHealthSDKHeaders/ABPMController.h +25 -0
  28. package/ios/Plugin/iHealthSDKHeaders/AM3.h +188 -0
  29. package/ios/Plugin/iHealthSDKHeaders/AM3Controller.h +29 -0
  30. package/ios/Plugin/iHealthSDKHeaders/AM3SController_V2.h +29 -0
  31. package/ios/Plugin/iHealthSDKHeaders/AM3S_V2.h +227 -0
  32. package/ios/Plugin/iHealthSDKHeaders/AM4.h +223 -0
  33. package/ios/Plugin/iHealthSDKHeaders/AM4Controller.h +31 -0
  34. package/ios/Plugin/iHealthSDKHeaders/AM5.h +335 -0
  35. package/ios/Plugin/iHealthSDKHeaders/AM5Controller.h +30 -0
  36. package/ios/Plugin/iHealthSDKHeaders/AM5Header.h +20 -0
  37. package/ios/Plugin/iHealthSDKHeaders/AMHeader.h +27 -0
  38. package/ios/Plugin/iHealthSDKHeaders/AMMacroFile.h +1171 -0
  39. package/ios/Plugin/iHealthSDKHeaders/BG1.h +53 -0
  40. package/ios/Plugin/iHealthSDKHeaders/BG1Controller.h +46 -0
  41. package/ios/Plugin/iHealthSDKHeaders/BG1S.h +64 -0
  42. package/ios/Plugin/iHealthSDKHeaders/BG1SController.h +25 -0
  43. package/ios/Plugin/iHealthSDKHeaders/BG3.h +83 -0
  44. package/ios/Plugin/iHealthSDKHeaders/BG3Controller.h +28 -0
  45. package/ios/Plugin/iHealthSDKHeaders/BG5.h +158 -0
  46. package/ios/Plugin/iHealthSDKHeaders/BG5Controller.h +28 -0
  47. package/ios/Plugin/iHealthSDKHeaders/BG5S.h +294 -0
  48. package/ios/Plugin/iHealthSDKHeaders/BG5SController.h +29 -0
  49. package/ios/Plugin/iHealthSDKHeaders/BGController.h +32 -0
  50. package/ios/Plugin/iHealthSDKHeaders/BGDevice.h +42 -0
  51. package/ios/Plugin/iHealthSDKHeaders/BGHeader.h +23 -0
  52. package/ios/Plugin/iHealthSDKHeaders/BGMacroFile.h +507 -0
  53. package/ios/Plugin/iHealthSDKHeaders/BP3.h +77 -0
  54. package/ios/Plugin/iHealthSDKHeaders/BP3Controller.h +27 -0
  55. package/ios/Plugin/iHealthSDKHeaders/BP3L.h +58 -0
  56. package/ios/Plugin/iHealthSDKHeaders/BP3LController.h +30 -0
  57. package/ios/Plugin/iHealthSDKHeaders/BP5.h +32 -0
  58. package/ios/Plugin/iHealthSDKHeaders/BP5C.h +131 -0
  59. package/ios/Plugin/iHealthSDKHeaders/BP5CController.h +25 -0
  60. package/ios/Plugin/iHealthSDKHeaders/BP5Controller.h +25 -0
  61. package/ios/Plugin/iHealthSDKHeaders/BP5S.h +97 -0
  62. package/ios/Plugin/iHealthSDKHeaders/BP5SController.h +27 -0
  63. package/ios/Plugin/iHealthSDKHeaders/BP5SRW.h +101 -0
  64. package/ios/Plugin/iHealthSDKHeaders/BP5SRWController.h +26 -0
  65. package/ios/Plugin/iHealthSDKHeaders/BP7.h +141 -0
  66. package/ios/Plugin/iHealthSDKHeaders/BP7Controller.h +25 -0
  67. package/ios/Plugin/iHealthSDKHeaders/BP7S.h +106 -0
  68. package/ios/Plugin/iHealthSDKHeaders/BP7SController.h +32 -0
  69. package/ios/Plugin/iHealthSDKHeaders/BPAV10Device.h +15 -0
  70. package/ios/Plugin/iHealthSDKHeaders/BPBTLEDevice.h +17 -0
  71. package/ios/Plugin/iHealthSDKHeaders/BPBV10Device.h +20 -0
  72. package/ios/Plugin/iHealthSDKHeaders/BPContinua.h +56 -0
  73. package/ios/Plugin/iHealthSDKHeaders/BPContinuaController.h +30 -0
  74. package/ios/Plugin/iHealthSDKHeaders/BPController.h +40 -0
  75. package/ios/Plugin/iHealthSDKHeaders/BPDevice.h +131 -0
  76. package/ios/Plugin/iHealthSDKHeaders/BPHeader.h +54 -0
  77. package/ios/Plugin/iHealthSDKHeaders/BPLoopMeasureSettingModel.h +120 -0
  78. package/ios/Plugin/iHealthSDKHeaders/BPM1AE.h +80 -0
  79. package/ios/Plugin/iHealthSDKHeaders/BPMacroFile.h +247 -0
  80. package/ios/Plugin/iHealthSDKHeaders/BPV24Device.h +16 -0
  81. package/ios/Plugin/iHealthSDKHeaders/BPV25Device.h +17 -0
  82. package/ios/Plugin/iHealthSDKHeaders/ConnectDeviceController.h +27 -0
  83. package/ios/Plugin/iHealthSDKHeaders/DFUController.h +160 -0
  84. package/ios/Plugin/iHealthSDKHeaders/DFUDeviceFirmwareInfo.h +56 -0
  85. package/ios/Plugin/iHealthSDKHeaders/DFUHeader.h +19 -0
  86. package/ios/Plugin/iHealthSDKHeaders/DFUMacro.h +264 -0
  87. package/ios/Plugin/iHealthSDKHeaders/DFUServerFirmwareInfo.h +48 -0
  88. package/ios/Plugin/iHealthSDKHeaders/ECG3.h +94 -0
  89. package/ios/Plugin/iHealthSDKHeaders/ECG3Controller.h +30 -0
  90. package/ios/Plugin/iHealthSDKHeaders/ECG3USB.h +145 -0
  91. package/ios/Plugin/iHealthSDKHeaders/ECG3USBController.h +31 -0
  92. package/ios/Plugin/iHealthSDKHeaders/ECGHeader.h +20 -0
  93. package/ios/Plugin/iHealthSDKHeaders/ECGMacroFile.h +84 -0
  94. package/ios/Plugin/iHealthSDKHeaders/HFSmartLink.h +88 -0
  95. package/ios/Plugin/iHealthSDKHeaders/HFSmartLinkDeviceInfo.h +14 -0
  96. package/ios/Plugin/iHealthSDKHeaders/HS2.h +64 -0
  97. package/ios/Plugin/iHealthSDKHeaders/HS2Controller.h +25 -0
  98. package/ios/Plugin/iHealthSDKHeaders/HS2S.h +399 -0
  99. package/ios/Plugin/iHealthSDKHeaders/HS2SController.h +27 -0
  100. package/ios/Plugin/iHealthSDKHeaders/HS3.h +63 -0
  101. package/ios/Plugin/iHealthSDKHeaders/HS3Controller.h +32 -0
  102. package/ios/Plugin/iHealthSDKHeaders/HS4.h +64 -0
  103. package/ios/Plugin/iHealthSDKHeaders/HS4Controller.h +26 -0
  104. package/ios/Plugin/iHealthSDKHeaders/HS5.h +141 -0
  105. package/ios/Plugin/iHealthSDKHeaders/HS5Controller.h +38 -0
  106. package/ios/Plugin/iHealthSDKHeaders/HSHeader.h +25 -0
  107. package/ios/Plugin/iHealthSDKHeaders/HSMacroFile.h +709 -0
  108. package/ios/Plugin/iHealthSDKHeaders/HealthHeader.h +67 -0
  109. package/ios/Plugin/iHealthSDKHeaders/HealthUser.h +126 -0
  110. package/ios/Plugin/iHealthSDKHeaders/IDOBindEnum.h +49 -0
  111. package/ios/Plugin/iHealthSDKHeaders/IDOBlueDataResponse.h +66 -0
  112. package/ios/Plugin/iHealthSDKHeaders/IDOBlueEnum.h +213 -0
  113. package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothBaseModel.h +112 -0
  114. package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothEngine.h +283 -0
  115. package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothManager.h +166 -0
  116. package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothServices.h +75 -0
  117. package/ios/Plugin/iHealthSDKHeaders/IDOCalculateBluetoothModel.h +263 -0
  118. package/ios/Plugin/iHealthSDKHeaders/IDOCommonMacro.h +89 -0
  119. package/ios/Plugin/iHealthSDKHeaders/IDODataExchangeModel.h +128 -0
  120. package/ios/Plugin/iHealthSDKHeaders/IDODataMigrationManager.h +79 -0
  121. package/ios/Plugin/iHealthSDKHeaders/IDOErrorCodeToStr.h +19 -0
  122. package/ios/Plugin/iHealthSDKHeaders/IDOFoundationCommand.h +1178 -0
  123. package/ios/Plugin/iHealthSDKHeaders/IDOGetInfoBluetoothModel.h +1924 -0
  124. package/ios/Plugin/iHealthSDKHeaders/IDOLogEnum.h +165 -0
  125. package/ios/Plugin/iHealthSDKHeaders/IDOPeripheralModel.h +59 -0
  126. package/ios/Plugin/iHealthSDKHeaders/IDORecordDeviceLog.h +56 -0
  127. package/ios/Plugin/iHealthSDKHeaders/IDOSetInfoBluetoothModel.h +1760 -0
  128. package/ios/Plugin/iHealthSDKHeaders/IDOSyncActivityDataModel.h +207 -0
  129. package/ios/Plugin/iHealthSDKHeaders/IDOSyncBpDataModel.h +191 -0
  130. package/ios/Plugin/iHealthSDKHeaders/IDOSyncEnum.h +316 -0
  131. package/ios/Plugin/iHealthSDKHeaders/IDOSyncGpsDataModel.h +133 -0
  132. package/ios/Plugin/iHealthSDKHeaders/IDOSyncHeartRateDataModel.h +442 -0
  133. package/ios/Plugin/iHealthSDKHeaders/IDOSyncManager.h +161 -0
  134. package/ios/Plugin/iHealthSDKHeaders/IDOSyncPressureDataModel.h +158 -0
  135. package/ios/Plugin/iHealthSDKHeaders/IDOSyncSleepDataModel.h +224 -0
  136. package/ios/Plugin/iHealthSDKHeaders/IDOSyncSpo2DataModel.h +175 -0
  137. package/ios/Plugin/iHealthSDKHeaders/IDOSyncSportDataModel.h +221 -0
  138. package/ios/Plugin/iHealthSDKHeaders/IDOSyncSwimDataModel.h +188 -0
  139. package/ios/Plugin/iHealthSDKHeaders/IDOTranEnum.h +93 -0
  140. package/ios/Plugin/iHealthSDKHeaders/IDOTransferFileManager.h +116 -0
  141. package/ios/Plugin/iHealthSDKHeaders/IDOWatchDialInfoModel.h +95 -0
  142. package/ios/Plugin/iHealthSDKHeaders/IDOWatchDialManager.h +75 -0
  143. package/ios/Plugin/iHealthSDKHeaders/IDOWeightBluetoothModel.h +124 -0
  144. package/ios/Plugin/iHealthSDKHeaders/IHSDKCloudUser.h +104 -0
  145. package/ios/Plugin/iHealthSDKHeaders/KN550BT.h +115 -0
  146. package/ios/Plugin/iHealthSDKHeaders/KN550BTController.h +32 -0
  147. package/ios/Plugin/iHealthSDKHeaders/ManageDeviceController.h +34 -0
  148. package/ios/Plugin/iHealthSDKHeaders/NT13B.h +33 -0
  149. package/ios/Plugin/iHealthSDKHeaders/NT13BController.h +28 -0
  150. package/ios/Plugin/iHealthSDKHeaders/NT13BHeader.h +16 -0
  151. package/ios/Plugin/iHealthSDKHeaders/NT13BMacroFile.h +34 -0
  152. package/ios/Plugin/iHealthSDKHeaders/PO1.h +82 -0
  153. package/ios/Plugin/iHealthSDKHeaders/PO1Controller.h +29 -0
  154. package/ios/Plugin/iHealthSDKHeaders/PO3.h +96 -0
  155. package/ios/Plugin/iHealthSDKHeaders/PO3Controller.h +29 -0
  156. package/ios/Plugin/iHealthSDKHeaders/POHeader.h +20 -0
  157. package/ios/Plugin/iHealthSDKHeaders/POMacroFile.h +142 -0
  158. package/ios/Plugin/iHealthSDKHeaders/PT3SBT.h +167 -0
  159. package/ios/Plugin/iHealthSDKHeaders/PT3SBTController.h +27 -0
  160. package/ios/Plugin/iHealthSDKHeaders/PT3SBTMacroFile.h +92 -0
  161. package/ios/Plugin/iHealthSDKHeaders/SDKFlowUpdateDevice.h +196 -0
  162. package/ios/Plugin/iHealthSDKHeaders/SDKInfo.h +30 -0
  163. package/ios/Plugin/iHealthSDKHeaders/SDKUpdateDevice.h +235 -0
  164. package/ios/Plugin/iHealthSDKHeaders/ScanDeviceController.h +47 -0
  165. package/ios/Plugin/iHealthSDKHeaders/THV3.h +104 -0
  166. package/ios/Plugin/iHealthSDKHeaders/THV3Controller.h +30 -0
  167. package/ios/Plugin/iHealthSDKHeaders/THV3Macro.h +17 -0
  168. package/ios/Plugin/iHealthSDKHeaders/TS28B.h +26 -0
  169. package/ios/Plugin/iHealthSDKHeaders/TS28BController.h +142 -0
  170. package/ios/Plugin/iHealthSDKHeaders/TS28BHeader.h +15 -0
  171. package/ios/Plugin/iHealthSDKHeaders/iHealthHS6.h +174 -0
  172. package/ios/Plugin/ihealth.swift +8 -0
  173. package/ios/Plugin/ihealthPlugin.h +10 -0
  174. package/ios/Plugin/ihealthPlugin.m +16 -0
  175. package/ios/Plugin/ihealthPlugin.swift +1502 -0
  176. package/ios/Plugin/libiHealthSDK2.7.8.a +0 -0
  177. package/ios/Plugin/test.m +9 -0
  178. package/package.json +78 -0
@@ -0,0 +1,106 @@
1
+ //
2
+ // BP7S.h
3
+ // testShareCommunication
4
+ //
5
+ // Created by my on 8/10/13.
6
+ // Copyright (c) 2013年 my. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "BPDevice.h"
11
+ #import <UIKit/UIKit.h>
12
+
13
+
14
+ /**
15
+ BP7S device class
16
+ */
17
+ @interface BP7S : BPDevice <BPBasicBTLEProtocol,BPOfflineDataTransferProtocol>
18
+
19
+ #pragma mark - Hypogenous query
20
+
21
+ /**
22
+ * Synchronize time and return the function and states that the device supports
23
+ * @param function A block to return the function and states that the device supports,judge if the device supports the function of up Air Measurement, arm Measurement, Angle Sensor, Angle Setting, HSD, Offline Memory, mutable Groups Upload, Self Upgrade. ‘True’ means yes or on, ‘False’ means no or off.
24
+ * @param error A block to refer ‘error’ in ‘Establish measurement connection’ in BP7S.
25
+ */
26
+ -(void)commandFunction:(BlockDeviceFunction)function errorBlock:(BlockError)error;
27
+
28
+ /**
29
+ * Query battery remaining energy.
30
+ * @param energyValue A block to return the device battery remaining energy percentage, ‘80’ stands for 80%.
31
+ * @param error A block to return the error in ‘Establish measurement connection’
32
+ */
33
+ -(void)commandEnergy:(BlockEnergyValue)energyValue errorBlock:(BlockError)error;
34
+
35
+
36
+ /**
37
+ * Upload offline data total Count.
38
+ * @param totalCount item quantity of total data.
39
+ * @param error A block to return the error.
40
+ */
41
+ -(void)commandTransferMemoryTotalCount:(BlockBachCount)totalCount errorBlock:(BlockError)error;
42
+
43
+ /**
44
+ * Upload offline data.
45
+ * @param totalCount item quantity of total data
46
+ * @param progress upload completion ratio , from 0.0 to 1.0 or 0%~100%, 100% means upload completed.
47
+ * @param uploadDataArray offline data set, including measurement time, systolic pressure, diastolic pressure, pulse rate, irregular judgment. corresponding KEYs are time, sys, dia, heartRate, irregular.
48
+ * @param error error codes.
49
+ * Specification:
50
+ * 1. BPError0 = 0: Unable to take measurements due to arm/wrist movements.
51
+ * 2. BPError1: Failed to detect systolic pressure.
52
+ * 3. BPError2: Failed to detect diastolic pressure.
53
+ * 4. BPError3: Pneumatic system blocked or cuff is too tight during inflation.
54
+ * 5. BPError4: Pneumatic system leakage or cuff is too loose during inflation.
55
+ * 6. BPError5: Cuff pressure reached over 300mmHg.
56
+ * 7. BPError6: Cuff pressure reached over 15 mmHg for more than 160 seconds.
57
+ * 8. BPError7: Data retrieving error.
58
+ * 9. BPError8: Data retrieving error.
59
+ * 10. BPError9: Data retrieving error.
60
+ * 11. BPError10: Data retrieving error.
61
+ * 12. BPError11: Communication Error.
62
+ * 13. BPError12: Communication Error.
63
+ * 14. BPError13: Low battery.
64
+ * 15. BPError14: Device bluetooth set failed.
65
+ * 16. BPError15: Systolic exceeds 260mmHg or diastolic exceeds 199mmHg.
66
+ * 17. BPError16: Systolic below 60mmHg or diastolic below 40mmHg.
67
+ * 18. BPError17: Arm/wrist movement beyond range.
68
+ * 19. BPNormalError=30: device error, error message displayed automatically.
69
+ * 20. BPOverTimeError: Abnormal communication.
70
+ * 21. BPNoRespondError: Abnormal communication.
71
+ * 22. BPBeyondRangeError: device is out of communication range.
72
+ * 23. BPDidDisconnect: device is disconnected.
73
+ * 24. BPAskToStopMeasure: measurement has been stopped.
74
+ * 25. BPInputParameterError=400: Parameter input error.
75
+ */
76
+ -(void)commandTransferMemoryDataWithTotalCount:(BlockBachCount)totalCount progress:(BlockBachProgress)progress dataArray:(BlockBachArray)uploadDataArray errorBlock:(BlockError)error;
77
+
78
+ /**
79
+ * Set units for the Device
80
+ * @param UnitName The unit name string that BP7S show result should use, must be @"mmHg" or @"kPa".
81
+ * @param setResult This block return means set success.
82
+ * @param error A block to return the error in set Unit communication.
83
+ */
84
+ -(void)commandSetUnit:(NSString *)UnitName disposeSetReslut:(BlockSuccess)setResult errorBlock:(BlockError)error;
85
+
86
+
87
+ /**
88
+ Set the effective angle range for left hand measurement and right hand measurement to the Device
89
+
90
+ @param angleInfo A dictionary set the max and mini effective angles for left hand measurement and right hand measurement,the angle values type is NSNumber, ranging from 0~90
91
+ with the four keys are:
92
+ @"highAngleForLeft", @"lowAngleForLeft", @"highAngleForRight", @"lowAngleForRight".
93
+ @param setResult This block return means set success.
94
+ @param error A block to return the error in set angles communication.
95
+ */
96
+ -(void)commandSetAngle:(NSDictionary *)angleInfo disposeSetReslut:(BlockSuccess)setResult errorBlock:(BlockError)error;
97
+
98
+ /**
99
+ * Disconnect current device
100
+ */
101
+ -(void)commandDisconnectDevice;
102
+
103
+
104
+
105
+
106
+ @end
@@ -0,0 +1,32 @@
1
+ //
2
+ // BP7SController.h
3
+ // testShareCommunication
4
+ //
5
+ // Created by my on 8/10/13.
6
+ // Copyright (c) 2013年 my. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "BPController.h"
11
+
12
+ /**
13
+ BP7S device controller class
14
+ */
15
+ @interface BP7SController : BPController{
16
+ NSMutableArray *BP7SDeviceArray;
17
+ }
18
+
19
+ /**
20
+ * Initialize BP7S controller class
21
+ */
22
+ +(BP7SController *)shareBP7SController;
23
+
24
+ /**
25
+ * Get all BP7S instance,Access control class instance after receiving BP7SConnectNoti, then use instance to call BP7S related communication methods.
26
+ */
27
+ -(NSArray *)getAllCurrentBP7SInstace;
28
+
29
+
30
+
31
+
32
+ @end
@@ -0,0 +1,15 @@
1
+ //
2
+ // BPAV10Device.h
3
+ // iHealthSDKStatic
4
+ //
5
+ // Created by Realank on 2017/7/24.
6
+ // Copyright © 2017年 ihealthSDK. All rights reserved.
7
+ //
8
+
9
+ #import "BPBTLEDevice.h"
10
+ /**
11
+ a subclass of BPBTLEDevice, which represent BP BTLE devices using BPAV10 protocol
12
+ */
13
+ @interface BPAV10Device : BPBTLEDevice
14
+
15
+ @end
@@ -0,0 +1,17 @@
1
+ //
2
+ // BPBTLEDevice.h
3
+ // iHealthSDKStatic
4
+ //
5
+ // Created by Realank on 2017/9/22.
6
+ // Copyright © 2017年 ihealthSDK. All rights reserved.
7
+ //
8
+
9
+ #import "BPDevice.h"
10
+
11
+
12
+ /**
13
+ a subclass of BP device, which represent BP BTLE devices
14
+ */
15
+ @interface BPBTLEDevice : BPDevice
16
+
17
+ @end
@@ -0,0 +1,20 @@
1
+ //
2
+ // BPBV10Device.h
3
+ // iHealthSDKStatic
4
+ //
5
+ // Created by Realank on 2017/9/26.
6
+ // Copyright © 2017年 ihealthSDK. All rights reserved.
7
+ //
8
+
9
+ #import "BPV24Device.h"
10
+ #import "BPLoopMeasureSettingModel.h"
11
+
12
+ typedef void(^BlockAskIDString)(NSString* IDString);
13
+ typedef void(^BlockAskLoopMeasureScheme)(BPLoopMeasureSettingResultModel* scheme);
14
+
15
+ /**
16
+ a subclass of BPBTLEDevice, which represent BP BTLE devices using BPBV10 protocol
17
+ */
18
+ @interface BPBV10Device : BPV24Device
19
+
20
+ @end
@@ -0,0 +1,56 @@
1
+ //
2
+ // BPContinua.h
3
+ // testShareCommunication
4
+ //
5
+ // Created by zhiwei jing on 13-10-22.
6
+ // Copyright (c) 2013年 my. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "UIKit/UIKit.h"
11
+ #import "BPDevice.h"
12
+
13
+ /**
14
+
15
+ BPContinua device class
16
+
17
+ */
18
+ @interface BPContinua : BPDevice
19
+
20
+
21
+ /**
22
+ * Upload offline data.
23
+ * @param uploadDataArray offline data set, including MAP, dataID, dia, heartRate, irregular, measureState, sys, time, unit, userId.
24
+ * @param completeBlock transfer memory complete
25
+ * @param error error codes.
26
+ * Specification:
27
+ */
28
+ -(void)commandTransferMemoryDataWithDataArray:(BlockBachArray)uploadDataArray complete:(BlockSuccess)completeBlock errorBlock:(BlockError)error;
29
+
30
+
31
+ /**
32
+ * Set the userID of memery data that need to upload
33
+ * @param userID The userID of memery data that want to upload.The userID is @1 or @2.
34
+ * @param setResult The result of setting userID,'YES'means success.
35
+ * @param error Error codes.
36
+ */
37
+ -(void)commandSetUploadUserID:(NSNumber *)userID setUserIDBlock:(BlockSetUserID)setResult errorBlock:(BlockError)error;
38
+
39
+ /**
40
+ * Synchronize time
41
+ */
42
+ -(void)commandSynchronizeTime;
43
+
44
+ /**
45
+ * Get Battery
46
+ * @param energyValue 0-100
47
+ * @param error Error codes.
48
+ */
49
+ -(void)commandGetBattery:(BlockEnergyValue)energyValue errorBlock:(BlockError)error;
50
+
51
+ /**
52
+ * Disconnect current device
53
+ */
54
+ -(void)commandDisconnectDevice;
55
+
56
+ @end
@@ -0,0 +1,30 @@
1
+ //
2
+ // BPContinuaController.h
3
+ // testShareCommunication
4
+ //
5
+ // Created by zhiwei jing on 13-10-22.
6
+ // Copyright (c) 2013年 my. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "BPContinua.h"
11
+ #import "BPController.h"
12
+
13
+ /**
14
+ BPContinua controller class
15
+ */
16
+ @interface BPContinuaController : BPController{
17
+
18
+ }
19
+
20
+ /**
21
+ * Initialize contina BP controller class
22
+ */
23
+ +(BPContinuaController *)sharedController;
24
+
25
+ /**
26
+ * Get all ContinuaBP instance,Access control class instance after receiving ContinuaBPConnectNoti, then use instance to call ContinuaBP related communication methods.
27
+ */
28
+ - (NSArray *)allConnectedInstance;
29
+
30
+ @end
@@ -0,0 +1,40 @@
1
+ //
2
+ // BPController.h
3
+ // iHealthDemoCode
4
+ //
5
+ // Created by Realank on 2017/1/4.
6
+ // Copyright © 2017年 ihealthSDK. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ /**
12
+ BP Base Controller
13
+ */
14
+ @interface BPController : NSObject{
15
+ //区分设备
16
+ NSString* deviceName;
17
+ NSString* deviceProtocol;
18
+ //发送通知
19
+ NSString* deviceConnectNotiName;
20
+ NSString* deviceDisconnectNotiName;
21
+ //创建实例
22
+ Class DeviceClass;
23
+ }
24
+
25
+
26
+ /**
27
+ Get BPController singleton instance
28
+
29
+ @return unique BPController instance
30
+ */
31
+ -(instancetype) initUniqueInstance;
32
+
33
+ /**
34
+ Get all BP instances,you can choose one instance to call BP related communication methods.
35
+
36
+ @return all connected BP instance
37
+ */
38
+ -(NSArray *)allConnectedInstance;
39
+
40
+ @end
@@ -0,0 +1,131 @@
1
+ //
2
+ // BPDevice.h
3
+ // iHealthDemoCode
4
+ //
5
+ // Created by Realank on 2017/1/4.
6
+ // Copyright © 2017年 ihealthSDK. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "BPMacroFile.h"
11
+
12
+
13
+ /**
14
+ a BP protocol related to realtime measure
15
+ */
16
+ @protocol BPRealtimeMeasureProtocol <NSObject>
17
+
18
+ /**
19
+ * Establish measurement connection and start BP measurement.
20
+ * @param blockZeroState Zeroing state
21
+ * @param pressure Pressure value in the process of measurement, the unit is ‘mmHg’.
22
+ * @param blockWaveletWithHeartbeat Wavelet data set including pulse rate
23
+ * @param blockWaveletWithoutHeartbeat Wavelet data set without pulse rate
24
+ * @param result result of the measurement, including systolic pressure, diastolic pressure, pulse rate and irregular judgment. Relevant key: time, sys, dia, heartRate, irregular. irregular will be 0 or 1.
25
+ * @param error Return error codes.
26
+ */
27
+ -(void)commandStartMeasureWithZeroingState:(BlockZero)blockZeroState pressure:(BlockPressure)pressure waveletWithHeartbeat:(BlockWavelet)blockWaveletWithHeartbeat waveletWithoutHeartbeat:(BlockWavelet)blockWaveletWithoutHeartbeat result:(BlockMeasureResult)result errorBlock:(BlockError)error;
28
+
29
+ /**
30
+ * stop measuring state of BP
31
+ * @param success The block return means measurement has been successfully stoped.
32
+ * @param error Return error codes.
33
+ */
34
+ -(void)stopBPMeassureSuccessBlock:(BlockSuccess)success errorBlock:(BlockError)error;
35
+
36
+ @end
37
+
38
+
39
+ /**
40
+ a BP protocol related to offline data transfer
41
+ */
42
+ @protocol BPOfflineDataTransferProtocol <NSObject>
43
+
44
+ /**
45
+ * Upload offline data.
46
+ * @param totalCount quantity of total history data
47
+ * @param progress upload completion ratio , from 0.0 to 1.0, 1.0 means upload completed.
48
+ * @param uploadDataArray offline data set, may including measurement time, systolic pressure, diastolic pressure, pulse rate, irregular judgment,scheme ID, body movement flag. corresponding KEYs are time, sys, dia, heartRate, irregular,schemeID,bodyMovementFlg.
49
+ * @param error Return error codes.
50
+ */
51
+ -(void)commandTransferMemoryDataWithTotalCount:(BlockBachCount)totalCount progress:(BlockBachProgress)progress dataArray:(BlockBachArray)uploadDataArray errorBlock:(BlockError)error;
52
+
53
+
54
+ /**
55
+ * Upload offline data total Count.
56
+ * @param totalCount quantity of total history data.
57
+ * @param error Return error codes.
58
+ */
59
+ -(void)commandTransferMemoryTotalCount:(BlockBachCount)totalCount errorBlock:(BlockError)error;
60
+
61
+ -(void)commandDeleteDataSuccessBlock:(BlockSuccess)success errorBlock:(BlockError)error;
62
+
63
+ @end
64
+
65
+
66
+ /**
67
+ a BP protocol related to basic function, such as get function, get energy
68
+ */
69
+ @protocol BPBasicProtocol <NSObject>
70
+
71
+ /**
72
+ * Synchronize time and judge if the device supports BT auto-connection, offline detection, and if the function on or off, corresponding KEY are haveBlue, haveOffline, blueOpen, offlineOpen. ‘True’ means yes or on, ‘False’ means no or off
73
+ * @param function A block to return the function and states that the device supports.
74
+ * @param error Return error codes.
75
+ */
76
+ -(void)commandFunction:(BlockDeviceFunction)function errorBlock:(BlockError)error;
77
+
78
+ /**
79
+ * Get battery remaining energy by percent
80
+ * @param energyValue A block to return the device battery remaining energy percentage, ‘80’ stands for 80%.
81
+ * @param error Return error codes.
82
+ */
83
+ -(void)commandEnergy:(BlockEnergyValue)energyValue errorBlock:(BlockError)error;
84
+
85
+ @end
86
+
87
+
88
+ /**
89
+ a BP protocol related to basic function and disconnect
90
+ */
91
+ @protocol BPBasicBTLEProtocol <BPBasicProtocol>
92
+
93
+ /**
94
+ * Disconnect current device
95
+ */
96
+ -(void)commandDisconnectDevice;
97
+
98
+ @end
99
+
100
+
101
+ /**
102
+ a BP protocol related to enable offline
103
+ */
104
+ @protocol BPEnableOfflineProtocol <BPBasicProtocol>
105
+
106
+ /**
107
+ * set up offline detection
108
+ * @param open True means on; False means off.
109
+ * @param successBlock A block to refer ‘set success’.
110
+ * @param errorBlock A block to refer ‘set failed’.
111
+ */
112
+ -(void)commandSetOffline:(BOOL)open success:(BlockSuccess)successBlock error:(BlockError)errorBlock;
113
+
114
+ @end
115
+
116
+
117
+ /**
118
+ BP device basic class
119
+ */
120
+ @interface BPDevice : NSObject
121
+
122
+ @property (copy, nonatomic) NSString *currentUUID;
123
+ ///‘serialNumber’ is for separating different device when multiple device have been connected.
124
+ @property (copy, nonatomic) NSString *serialNumber;
125
+ @property (copy, nonatomic) NSString *firmwareVersion;
126
+ @property (copy, nonatomic) NSString *hardwareVersion;
127
+ @property (copy, nonatomic) NSString *deviceName;
128
+ @property (copy, nonatomic) NSString *protocolString;
129
+ @property (copy, nonatomic) NSString *modelNumber;
130
+ @property (copy, nonatomic) NSNumber *isNew550BT;
131
+ @end
@@ -0,0 +1,54 @@
1
+ //
2
+ // BPHeader.h
3
+ // BP_SDKDemo
4
+ //
5
+ // Created by zhiwei jing on 14-2-28.
6
+ // Copyright (c) 2014年 zhiwei jing. All rights reserved.
7
+ //
8
+
9
+ #ifndef BP_SDKDemo_BPHeader_h
10
+ #define BP_SDKDemo_BPHeader_h
11
+
12
+ #import "BPController.h"
13
+ #import "BPDevice.h"
14
+
15
+ #import "BP5Controller.h"
16
+ #import "BP5.h"
17
+
18
+ #import "BP3.h"
19
+ #import "BP3Controller.h"
20
+
21
+ #import "BP3L.h"
22
+ #import "BP3LController.h"
23
+
24
+ #import "BP7Controller.h"
25
+ #import "BP7.h"
26
+
27
+ #import "BP7SController.h"
28
+ #import "BP7S.h"
29
+
30
+ #import "KN550BT.h"
31
+ #import "KN550BTController.h"
32
+
33
+ #import "BPMacroFile.h"
34
+ #import "HealthUser.h"
35
+
36
+ #import "ABI.h"
37
+ #import "ABIController.h"
38
+
39
+ #import "ABPM.h"
40
+ #import "ABPMController.h"
41
+
42
+ #import "BPContinua.h"
43
+ #import "BPContinuaController.h"
44
+
45
+ #import "BP5S.h"
46
+ #import "BP5SController.h"
47
+
48
+ #import "BP5SRW.h"
49
+ #import "BP5SRWController.h"
50
+
51
+ #import "BP5C.h"
52
+ #import "BP5CController.h"
53
+
54
+ #endif
@@ -0,0 +1,120 @@
1
+ //
2
+ // BPLoopMeasureSettingModel.h
3
+ // iHealthSDKStatic
4
+ //
5
+ // Created by Realank on 2017/9/27.
6
+ // Copyright © 2017年 ihealthSDK. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+
12
+ /**
13
+ ABPM loop remeasure method
14
+
15
+ - BPLoopRemeasureNO: don't remeasure
16
+ - BPLoopRemeasure90Sec: 90 seconds remeasure
17
+ - BPLoopRemeasure90Sec10Min: 90 seconds and 10 minutes remeasure
18
+ */
19
+ typedef NS_ENUM(NSUInteger, BPLoopRemeasureMethod) {
20
+ BPLoopRemeasureNO = 0x00,
21
+ BPLoopRemeasure90Sec = 0x01,
22
+ BPLoopRemeasure90Sec10Min = 0x03,
23
+ };
24
+
25
+
26
+ /**
27
+ ABPM loop measure time setting model
28
+ */
29
+ @interface BPLoopMeasureTimeSetting : NSObject
30
+ @property (nonatomic, assign) NSUInteger hour;
31
+ @property (nonatomic, assign) NSUInteger min;
32
+ @property (nonatomic, assign) NSUInteger measureIntervalInMin;
33
+ @property (nonatomic, assign) BOOL before5MinViberateAlert;
34
+ @property (nonatomic, assign) BOOL before5MinSoundAlert;
35
+ @property (nonatomic, assign) BOOL before30SecViberateAlert;
36
+ @property (nonatomic, assign) BOOL before30SecSoundAlert;
37
+ @property (nonatomic, assign) BPLoopRemeasureMethod remeasureMethods;
38
+
39
+ + (instancetype) modelWithHour:(NSUInteger)hour
40
+ min:(NSUInteger)min
41
+ measureIntervalInMin:(NSUInteger)measureIntervalInMin
42
+ before5MinViberateAlert:(BOOL)before5MinViberateAlert
43
+ before5MinSoundAlert:(BOOL)before5MinSoundAlert
44
+ before30SecViberateAlert:(BOOL)before30SecViberateAlert
45
+ before30SecSoundAlert:(BOOL)before30SecSoundAlert
46
+ remeasureMethod:(BPLoopRemeasureMethod)remeasureMethod;
47
+
48
+ +(instancetype) alloc __attribute__((unavailable("alloc not available, call sharedInstance instead")));
49
+ -(instancetype) init __attribute__((unavailable("init not available, call sharedInstance instead")));
50
+ +(instancetype) new __attribute__((unavailable("new not available, call sharedInstance instead")));
51
+
52
+ @end
53
+
54
+
55
+ /**
56
+ ABPM loop measure setting model
57
+ */
58
+ @interface BPLoopMeasureSettingModel : NSObject
59
+
60
+ @property (nonatomic, assign) BOOL isTakeMedicine;
61
+ @property (nonatomic, assign) uint8_t measureHours;
62
+ @property (nonatomic, strong) BPLoopMeasureTimeSetting* morningTimeSetting;
63
+ @property (nonatomic, strong) BPLoopMeasureTimeSetting* nightTimeSetting;
64
+ @property (nonatomic, strong) BPLoopMeasureTimeSetting* noonSleepTimeSetting;
65
+ @property (nonatomic, strong) BPLoopMeasureTimeSetting* noonWakeupTimeSetting;
66
+
67
+ + (instancetype)modelWithTakeMedicine:(BOOL)isTakeMedicine
68
+ measureHours:(uint8_t)measureHours
69
+ morningTimeSetting:(BPLoopMeasureTimeSetting*)morningTimeSetting
70
+ nightTimeSetting:(BPLoopMeasureTimeSetting*)nightTimeSetting
71
+ noonSleepTimeSetting:(BPLoopMeasureTimeSetting*)noonSleepTimeSetting
72
+ noonWakeupTimeSetting:(BPLoopMeasureTimeSetting*)noonWakeupTimeSetting;
73
+
74
+ +(instancetype) alloc __attribute__((unavailable("alloc not available, call sharedInstance instead")));
75
+ -(instancetype) init __attribute__((unavailable("init not available, call sharedInstance instead")));
76
+ +(instancetype) new __attribute__((unavailable("new not available, call sharedInstance instead")));
77
+
78
+
79
+ @end
80
+
81
+
82
+ /**
83
+ ABPM loop measure status
84
+
85
+ - BPLoopMeasureStateNoScheme: don't have scheme
86
+ - BPLoopMeasureStateSchemeUncompleted: scheme not completed
87
+ - BPLoopMeasureStateSchemeCompleted: scheme has been completed
88
+ */
89
+ typedef NS_ENUM(NSUInteger, BPLoopMeasureStatus) {
90
+ BPLoopMeasureStateNoScheme,
91
+ BPLoopMeasureStateSchemeUncompleted,
92
+ BPLoopMeasureStateSchemeCompleted,
93
+ };
94
+
95
+
96
+
97
+ /**
98
+ ABPM loop measure setting result model
99
+ */
100
+ @interface BPLoopMeasureSettingResultModel : BPLoopMeasureSettingModel
101
+
102
+ @property (nonatomic, assign) BPLoopMeasureStatus loopMeasureStatus;
103
+ @property (nonatomic, strong) NSDate* realStartDate;
104
+ @property (nonatomic, assign) NSInteger realStartDateTimeZoneInMin;
105
+
106
+ + (instancetype)modelWithLoopMeasureStatus:(BPLoopMeasureStatus)loopMeasureStatus
107
+ TakeMedicine:(BOOL)isTakeMedicine
108
+ measureHours:(uint8_t)measureHours
109
+ realStartDate:(NSDate*)realStartDate
110
+ realStartDateTimeZoneInMin:(NSInteger)realStartDateTimeZoneInMin
111
+ morningTimeSetting:(BPLoopMeasureTimeSetting*)morningTimeSetting
112
+ nightTimeSetting:(BPLoopMeasureTimeSetting*)nightTimeSetting
113
+ noonSleepTimeSetting:(BPLoopMeasureTimeSetting*)noonSleepTimeSetting
114
+ noonWakeupTimeSetting:(BPLoopMeasureTimeSetting*)noonWakeupTimeSetting;
115
+
116
+ +(instancetype) alloc __attribute__((unavailable("alloc not available, call sharedInstance instead")));
117
+ -(instancetype) init __attribute__((unavailable("init not available, call sharedInstance instead")));
118
+ +(instancetype) new __attribute__((unavailable("new not available, call sharedInstance instead")));
119
+
120
+ @end