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,175 @@
1
+ //
2
+ // IDOSyncSpo2DataModel.h
3
+ // IDOBluetoothInternal
4
+ //
5
+ // Created by 何东阳 on 2019/8/6.
6
+ // Copyright © 2019 何东阳. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #if __has_include(<IDOBluetoothInternal/IDOBluetoothInternal.h>)
11
+ #elif __has_include(<IDOBlueProtocol/IDOBlueProtocol.h>)
12
+ #else
13
+ #import "IDOBluetoothBaseModel.h"
14
+ #endif
15
+
16
+ @interface IDOSyncBloodOxygenItemInfoBluetoothModel : IDOBluetoothBaseModel
17
+
18
+ /**
19
+ 日期 time interval since 1970 (如:1444361933) | Date time interval since 1970 (eg 14442361933)
20
+ */
21
+ @property (nonatomic,copy) NSString * dateStr;
22
+
23
+ /**
24
+ 子时间偏移量 (秒钟) | Subtime offset (second)
25
+ */
26
+ @property (nonatomic,assign) NSUInteger offset;
27
+
28
+ /**
29
+ 血氧值 | Blood oxygen value 0 ~ 255
30
+ */
31
+ @property (nonatomic,assign) NSInteger spo2Val;
32
+
33
+ /**
34
+ 序列号 | Serial number
35
+ */
36
+ @property (nonatomic,assign) NSInteger serialNumber;
37
+
38
+ @end
39
+
40
+ @interface IDOSyncBloodOxygenDataInfoBluetoothModel : IDOBluetoothBaseModel
41
+
42
+ /**
43
+ 年份 | Year
44
+ */
45
+ @property (nonatomic,assign) NSInteger year;
46
+
47
+ /**
48
+ 月份 | Month
49
+ */
50
+ @property (nonatomic,assign) NSInteger month;
51
+
52
+ /**
53
+ 日期 | Date
54
+ */
55
+ @property (nonatomic,assign) NSInteger day;
56
+
57
+ /**
58
+ 日期 精确到日期 date interval since 1970 (如:1444361933) | Date time interval since 1970 (eg 14442361933)
59
+ */
60
+ @property (nonatomic,copy) NSString * dateStr;
61
+
62
+ /**
63
+ 总时间偏移量 (秒钟) | Total time offset (second)
64
+ */
65
+ @property (nonatomic,assign) NSUInteger minuteOffset;
66
+
67
+ /**
68
+ 血氧数据包量 | Blood pressure data package
69
+ */
70
+ @property (nonatomic,assign) NSInteger itemsCount;
71
+
72
+ /**
73
+ * 血氧集合 只有定义好的查询方法才能转成model集合,自定义的查询方法无法直接转成model集合,需要再查询itemModel赋给当前属性
74
+ * blood oxygen collection Only defined query methods can be converted into model collections. Custom query methods cannot be directly converted
75
+ * into model collections. You need to query itemModel to assign current attributes.
76
+ */
77
+ @property (nonatomic,copy) NSArray <IDOSyncBloodOxygenItemInfoBluetoothModel *>* bloodOxygens;
78
+
79
+ /**
80
+ 平均血氧 | Average blood oxygen
81
+ */
82
+ @property (nonatomic,assign) NSInteger avgBloodOxygen;
83
+
84
+ /**
85
+ 最大血氧 | Maximum blood oxygen
86
+ */
87
+ @property (nonatomic,assign) NSInteger maxBloodOxygen;
88
+
89
+ /**
90
+ 最小血氧 | Most blood oxygen
91
+ */
92
+ @property (nonatomic,assign) NSInteger minBloodOxygen;
93
+
94
+ @end
95
+
96
+
97
+ @interface IDOSyncSpo2DataModel : NSObject
98
+ /**
99
+ * @brief 查询当前设备某年12个月所有数据 (如果查询当月无数据,会创建空的数据对象,大于当月的数据不累加)
100
+ * Query all data of the current device for 12 months in a certain year (If there is no data in the query month, an empty data object will be created,
101
+ * and the data larger than the current month will not be accumulated)
102
+ * @param year 年 (如 : 2018) | Year (eg: 2018)
103
+ * @param macAddr mac 地址 | mac address
104
+ * @param isQuery 是否查询items | is query items
105
+ * @return 一年12个月的血氧数据集合,其中IDOSyncBloodOxygenDataInfoBluetoothModel对象是一天总血氧数据模型
106
+ * Blood oxygen data collection for 12 months a year, where the IDOSyncBloodOxygenDataInfoBluetoothModel object is the total blood oxygen data model for the day
107
+ */
108
+ + (NSArray <NSArray<__kindof IDOSyncBloodOxygenDataInfoBluetoothModel *>*> *)queryOneYearBloodOxygenWithYear:(NSInteger)year
109
+ macAddr:(NSString *)macAddr
110
+ isQueryItems:(BOOL)isQuery;
111
+
112
+ /**
113
+ * @brief 查询当前设备某月份的所有数据 (如果查询当天无数据,会创建空的数据对象,大于当天的数据不累加)
114
+ * Query all data of the current device for a certain month (If there is no data on the query day, an empty data object will be created,
115
+ * which is larger than the data of the day)
116
+ * @param year 年 (如 : 2018) | Year (eg: 2018)
117
+ * @param month 月 (如 : 9) | Month (eg: 9)
118
+ * @param macAddr mac 地址 | mac address
119
+ * @param dates 当前查询月份的所有日期集合的指针 (格式 :[10/01...10/31])
120
+ * Pointer to all date collections for the current query month (format: [10/01...10/31])
121
+ * @param isQuery 是否查询items | is query items
122
+ * @return 一个月的血氧数据集合,其中IDOSyncBloodOxygenDataInfoBluetoothModel对象是一天总血氧数据模型
123
+ * A one-month blood oxygen data collection, where the IDOSyncHrDataInfoBluetoothModel object is the total blood oxygen data model for the day
124
+ */
125
+ + (NSArray <__kindof IDOSyncBloodOxygenDataInfoBluetoothModel *>*)queryOneMonthBloodOxygenWithYear:(NSInteger)year
126
+ month:(NSInteger)month
127
+ macAddr:(NSString *)macAddr
128
+ datesOfMonth:(NSArray <NSString *>**)dates
129
+ isQueryItems:(BOOL)isQuery;
130
+
131
+ /**
132
+ * @brief 查询当前设备某周的所有数据 (如果查询当天无数据,会创建空的数据对象,大于当天的数据不累加)
133
+ * Query all data of the current device for a certain week (If there is no data on the day of the query, an empty data object will be created,
134
+ * and the data larger than the current day will not be accumulated)
135
+ * @param weekIndex 周的查询索引 (0 : 当周, 1 : 上一周, 2 : 上两周 ...) | Week's query index (0: week, 1 : last week, 2 : last two weeks...)
136
+ * @param weekStartDay 星期的开始日 (0 : 星期日, 1 : 星期一, 2 : 星期二 ...) | Start of the week (0: Sunday, 1 : Monday, 2 : Tuesday ...)
137
+ * @param macAddr mac 地址 | mac address
138
+ * @param dates 当前查询周的所有日期集合的指针 (格式 :[10/01...10/07])
139
+ * Pointer to all date collections for the current query week (format: [10/01...10/07])
140
+ * @param isQuery 是否查询items | is query items
141
+ * @return 一周的血氧数据集合,其中IDOSyncBloodOxygenDataInfoBluetoothModel对象是一天总血氧数据模型
142
+ * A week's blood oxygen data collection, where the IDOSyncBloodOxygenDataInfoBluetoothModel object is the total blood oxygen data model for the day
143
+ */
144
+ + (NSArray <__kindof IDOSyncBloodOxygenDataInfoBluetoothModel *>*)queryOneWeekBloodOxygenWithWeekIndex:(NSInteger)weekIndex
145
+ weekStartDay:(NSInteger)weekStartDay
146
+ macAddr:(NSString *)macAddr
147
+ datesOfWeek:(NSArray <NSString *>**)dates
148
+ isQueryItems:(BOOL)isQuery;
149
+
150
+ /**
151
+ * @brief 查询当前设备某天血氧数据并有详情数据
152
+ * Query current blood oxygen data of the current device and have detailed data
153
+ * @param macAddr mac 地址 | mac address
154
+ * @param year 年份 | year
155
+ * @param month 月份 | month
156
+ * @param day 日期 | day
157
+ * @return 一天血氧数据的集合和详情数据结合 | Collection of day blood oxygen data and details data
158
+ */
159
+ + (NSArray <__kindof IDOSyncBloodOxygenDataInfoBluetoothModel *>*)queryOneDayBloodOxygenDetailWithMac:(NSString *)macAddr
160
+ year:(NSInteger)year
161
+ month:(NSInteger)month
162
+ day:(NSInteger)day;
163
+
164
+ /**
165
+ * @brief 查询所有血氧数据,血氧包个数大于0
166
+ * Query all blood oxygen data The number of blood oxygen packets is greater than 0
167
+ * @param macAddr mac地址 | mac address
168
+ * @return 所有血氧数据的集合和详情数据(不包括当天数据)
169
+ * Collection of all blood oxygen data and details data
170
+ */
171
+ + (NSArray <__kindof IDOSyncBloodOxygenDataInfoBluetoothModel *>*)queryAllBloodOxygensWithMac:(NSString *)macAddr;
172
+
173
+
174
+ @end
175
+
@@ -0,0 +1,221 @@
1
+ //
2
+ // IDOSyncSportDataModel.h
3
+ // IDOBluetoothInternal
4
+ //
5
+ // Created by 何东阳 on 2019/8/6.
6
+ // Copyright © 2019 何东阳. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #if __has_include(<IDOBluetoothInternal/IDOBluetoothInternal.h>)
11
+ #elif __has_include(<IDOBlueProtocol/IDOBlueProtocol.h>)
12
+ #else
13
+ #import "IDOBluetoothBaseModel.h"
14
+ #endif
15
+
16
+ @interface IDOSyncSportDataItemInfoBluetoothModel : IDOBluetoothBaseModel
17
+
18
+ /**
19
+ 运动模式 | Sports mode (unit: number of steps)
20
+ */
21
+ @property (nonatomic,assign) NSInteger mode;
22
+
23
+ /**
24
+ 运动步数 | Number of steps
25
+ */
26
+ @property (nonatomic,assign) NSInteger sportCount;
27
+
28
+ /**
29
+ 活跃时间 (秒) | Active time (seconds)
30
+ */
31
+ @property (nonatomic,assign) NSInteger activeTime;
32
+
33
+ /**
34
+ 卡路里(大卡) | Calories (unit: big card)
35
+ */
36
+ @property (nonatomic,assign) NSInteger calories;
37
+
38
+ /**
39
+ 运动距离(米) | Sport distance (unit: m)
40
+ */
41
+ @property (nonatomic,assign) NSInteger distance;
42
+
43
+ /**
44
+ 运动时间日期 精确到日期 | Sports time and date
45
+ */
46
+ @property (nonatomic,copy) NSString * dateStr;
47
+
48
+ /**
49
+ 序列号 | Serial number
50
+ */
51
+ @property (nonatomic,assign) NSInteger serialNumber;
52
+
53
+ @end
54
+
55
+ @interface IDOSyncSportDataInfoBluetoothModel : IDOBluetoothBaseModel
56
+
57
+ /**
58
+ 运动数据包数量 | Number of sports packets
59
+ */
60
+ @property (nonatomic,assign) NSInteger itemsCount;
61
+
62
+ /**
63
+ 年份 | Year
64
+ */
65
+ @property (nonatomic,assign) NSInteger year;
66
+
67
+ /**
68
+ 月份 | Month
69
+ */
70
+ @property (nonatomic,assign) NSInteger month;
71
+
72
+ /**
73
+ 日期 | Date
74
+ */
75
+ @property (nonatomic,assign) NSInteger day;
76
+
77
+ /**
78
+ 时间戳 精确到日期 date interval since 1970 (如:1444361933) | Timestamp date interval since 1970 (eg: 14443361933)
79
+ */
80
+ @property (nonatomic,copy) NSString * dateStr;
81
+
82
+ /**
83
+ * 运动数据集合 只有定义好的查询方法才能转成model集合,自定义的查询方法无法直接转成model集合,需要再查询itemModel赋给当前属性
84
+ * Motion data collection Only defined query methods can be converted into model collections. Custom query methods cannot be directly
85
+ * converted into model collections. You need to query itemModel to assign current attributes.
86
+ */
87
+ @property (nonatomic,copy) NSArray <IDOSyncSportDataItemInfoBluetoothModel *>* sportItems;
88
+
89
+ /**
90
+ 运动总步数(单位 :步数) | Total number of steps in sports (unit: number of steps)
91
+ */
92
+ @property (nonatomic,assign) NSInteger totalStep;
93
+
94
+ /**
95
+ 运动总消耗卡路里(单位 :大卡) | Total calories burned by exercise (unit: big card)
96
+ */
97
+ @property (nonatomic,assign) NSInteger totalCalories;
98
+
99
+ /**
100
+ 运动总距离(单位 :米) | Total distance of movement (unit: m)
101
+ */
102
+ @property (nonatomic,assign) NSInteger totalDistances;
103
+
104
+ /**
105
+ 运动总时长 (秒) | Total length of exercise (seconds)
106
+ */
107
+ @property (nonatomic,assign) NSInteger totalActiveTime;
108
+
109
+ /**
110
+ 开始偏移量 | Start offset
111
+ */
112
+ @property (nonatomic,assign) NSInteger minuteOffset;
113
+
114
+ /**
115
+ 产生数据间隔 | Generate data interval
116
+ */
117
+ @property (nonatomic,assign) NSInteger perMinute;
118
+
119
+ /**
120
+ 目标运动数量 | Number of target sports
121
+ */
122
+ @property (nonatomic,assign) NSInteger goalSportData;
123
+
124
+ /**
125
+ 一天步数items个数 | one day total items count
126
+ */
127
+ @property (nonatomic,assign) NSInteger totalCount;
128
+
129
+ /**
130
+ 只有用于 Donha app | Only for the Donha app
131
+ 关键字 0:无效;1:超;2:浪;3:稳;4:慢;5:懒;6:香;7:安;8:困;9:燃;10:暖;11:动;12:佛;13:秀;14:拼;15:惯;16:凉;
132
+ */
133
+ @property (nonatomic,assign) NSInteger keyWord;
134
+
135
+ @end
136
+
137
+
138
+ @interface IDOSyncSportDataModel : NSObject
139
+ /**
140
+ * @brief 查询当前设备某年12个月所有数据 (如果查询当月无数据,会创建空的数据对象,大于当月的数据不累加)
141
+ * Query all data of the current device for 12 months in a certain year (If there is no data in the current month, an empty data object will be created,
142
+ * and the data larger than the current month will not be accumulated)
143
+ * @param year 年 (如 : 2018) | Year (eg: 2018)
144
+ * @param macAddr mac 地址 | mac address
145
+ * @param isQuery 是否查询items | is query items
146
+ * @return 一年12个月的运动数据集合,其中IDOSyncSportDataInfoBluetoothModel对象是一天总运动数据模型
147
+ * A 12-month sports data collection, where the IDOSyncSportDataInfoBluetoothModel object is a total day motion data model
148
+ */
149
+ + (NSArray <NSArray <__kindof IDOSyncSportDataInfoBluetoothModel *> *>*)queryOneYearSportsWithYear:(NSInteger)year
150
+ macAddr:(NSString *)macAddr
151
+ isQueryItems:(BOOL)isQuery;
152
+
153
+ /**
154
+ * @brief 查询当前设备某月份的所有数据 (如果查询当天无数据,会创建空的数据对象,大于当天的数据不累加)
155
+ * Query all data of the current device for a certain month (If there is no data on the query day, an empty data object will be created,
156
+ * which is larger than the data of the day)
157
+ * @param year 年 (如 : 2018) | Year (eg: 2018)
158
+ * @param month 月 (如 : 9) | Month (eg: 9)
159
+ * @param macAddr mac 地址 | mac address
160
+ * @param dates 当前查询月份的所有日期集合的指针 (格式 :[10/01...10/31])
161
+ * Pointer to all date collections for the current query month (format: [10/01...10/31])
162
+ * @param isQuery 是否查询items | is query items
163
+ * @return 一个月的运动数据集合,其中IDOSyncSportDataInfoBluetoothModel对象是一天总运动数据模型
164
+ * One month of motion data collection, where the IDOSyncSportDataInfoBluetoothModel object is the total day motion data model
165
+ */
166
+ + (NSArray <__kindof IDOSyncSportDataInfoBluetoothModel *>*)queryOneMonthSportsWithYear:(NSInteger)year
167
+ month:(NSInteger)month
168
+ macAddr:(NSString *)macAddr
169
+ datesOfMonth:(NSArray <NSString *>**)dates
170
+ isQueryItems:(BOOL)isQuery;
171
+
172
+ /**
173
+ * @brief 查询当前设备某周的所有数据 (如果查询当天无数据,会创建空的数据对象,大于当天的数据不累加)
174
+ * Query all data of the current device for a certain week (If there is no data on the day of the query, an empty data object will be created,
175
+ * and the data larger than the current day will not be accumulated)
176
+ * @param weekIndex 周的查询索引 (0 : 当周, 1 : 上一周, 2 : 上两周 ...) | Week's query index (0: week, 1 : last week, 2 : last two weeks...)
177
+ * @param weekStartDay 星期的开始日 (0 : 星期日, 1 : 星期一, 2 : 星期二 ...) | Start of the week (0: Sunday, 1 : Monday, 2 : Tuesday ...)
178
+ * @param macAddr mac 地址 | mac address
179
+ * @param dates 当前查询周的所有日期集合的指针 (格式 :[10/01...10/07])
180
+ * Pointer to all date collections for the current query week (format: [10/01...10/07])
181
+ * @param isQuery 是否查询items | is query items
182
+ * @return 一周的运动数据集合,其中IDOSyncSportDataInfoBluetoothModel对象是一天总运动数据模型
183
+ * A week of motion data collection, where the IDOSyncSportDataInfoBluetoothModel object is the total day motion data model
184
+ */
185
+ + (NSArray <__kindof IDOSyncSportDataInfoBluetoothModel *>*)queryOneWeekSportsWithWeekIndex:(NSInteger)weekIndex
186
+ weekStartDay:(NSInteger)weekStartDay
187
+ macAddr:(NSString *)macAddr
188
+ datesOfWeek:(NSArray <NSString *>**)dates
189
+ isQueryItems:(BOOL)isQuery;
190
+
191
+
192
+ /**
193
+ * @brief 查询当前设备某天运动据并有详情数据 | Query the current device's mobile data and have detailed data
194
+ * @param macAddr mac 地址 | mac address
195
+ * @param year 年份 | year
196
+ * @param month 月份 | month
197
+ * @param day 日期 | day
198
+ * @return 一天运动数据的集合和详情数据集合 | Collection of daily exercise data and detailed data
199
+ */
200
+ + (NSArray <__kindof IDOSyncSportDataInfoBluetoothModel *>*)queryOneDaySportDetailWithMac:(NSString *)macAddr
201
+ year:(NSInteger)year
202
+ month:(NSInteger)month
203
+ day:(NSInteger)day;
204
+
205
+ /**
206
+ * @brief 查询所有运动数据 步数大于0 | Query all motion data Steps greater than 0
207
+ * @param macAddr mac 地址 | mac address
208
+ * @return 所有运动数据的集合 | Collection of all the motion data
209
+ */
210
+ + (NSArray <__kindof IDOSyncSportDataInfoBluetoothModel *>*)queryAllSportsWithMac:(NSString *)macAddr;
211
+
212
+ /**
213
+ * @brief 查询所有运动数据 步数大于0 只包含总步数和日期时间戳
214
+ * Query all motion data Steps greater than 0 ; Contains only the total number of steps and the date and time stamp
215
+ * @param macAddr mac 地址 | mac address
216
+ * @return 所有运动数据的集合 | Collection of all the motion data
217
+ */
218
+ + (NSArray <__kindof IDOSyncSportDataInfoBluetoothModel *>*)queryAllContractedSportsWithMac:(NSString *)macAddr;
219
+
220
+ @end
221
+
@@ -0,0 +1,188 @@
1
+ //
2
+ // IDOSyncSwimDataModel.h
3
+ // IDOBluetoothInternal
4
+ //
5
+ // Created by 何东阳 on 2019/8/6.
6
+ // Copyright © 2019 何东阳. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ #if __has_include(<IDOBluetoothInternal/IDOBluetoothInternal.h>)
12
+ #elif __has_include(<IDOBlueProtocol/IDOBlueProtocol.h>)
13
+ #else
14
+ #import "IDOBluetoothBaseModel.h"
15
+ #endif
16
+
17
+ @interface IDOSyncSwimItemDataInfoBluetoothModel : IDOBluetoothBaseModel
18
+ /**
19
+ 开始时间 精确到秒 | start time interval since 1970 (eg 14442361933)
20
+ */
21
+ @property (nonatomic,copy) NSString * timeStr;
22
+
23
+ /**
24
+ 持续时间 (单位:秒) | duration (unit:second)
25
+ */
26
+ @property (nonatomic,assign) NSInteger duration;
27
+
28
+ /**
29
+ 划水次数 | strokes number
30
+ */
31
+ @property (nonatomic,assign) NSInteger strokesNumber;
32
+
33
+ /**
34
+ 评分 | swolf
35
+ */
36
+ @property (nonatomic,assign) NSInteger swolf;
37
+
38
+ /**
39
+ 序列号 | Serial number
40
+ */
41
+ @property (nonatomic,assign) NSInteger serialNumber;
42
+
43
+ /**
44
+ * 每一趟的泳姿 | swimming posture
45
+ * 0x00 : 混合泳; 0x01 : 自由泳; 0x02 : 蛙泳; 0x03 : 仰泳; 0x04 : 蝶泳;
46
+ * 0x00: medley; 0x01: freestyle; 0x02: breaststroke; 0x03: backstroke; 0x04: butterfly stroke;
47
+ */
48
+ @property (nonatomic,assign) NSInteger swimmingPosture;
49
+
50
+ /**
51
+ 每一趟的距离 (单位:米) | distance (unit:m)
52
+ */
53
+ @property (nonatomic,assign) NSInteger distance;
54
+
55
+ @end
56
+
57
+ @interface IDOSyncSwimmingDataInfoBluetoothModel : IDOBluetoothBaseModel
58
+ /**
59
+ 年份 | Year
60
+ */
61
+ @property (nonatomic,assign) NSInteger year;
62
+
63
+ /**
64
+ 月份 | Month
65
+ */
66
+ @property (nonatomic,assign) NSInteger month;
67
+
68
+ /**
69
+ 日期 | Date
70
+ */
71
+ @property (nonatomic,assign) NSInteger day;
72
+
73
+ /**
74
+ 时 | hour
75
+ */
76
+ @property (nonatomic,assign) NSInteger hour;
77
+
78
+ /**
79
+ 分 | minutes
80
+ */
81
+ @property (nonatomic,assign) NSInteger minute;
82
+
83
+ /**
84
+ 秒 | seconds
85
+ */
86
+ @property (nonatomic,assign) NSInteger second;
87
+
88
+ /**
89
+ 日期 精确到日期 date interval since 1970 (如:1444361933) | Date time interval since 1970 (eg 14442361933)
90
+ */
91
+ @property (nonatomic,copy) NSString * dateStr;
92
+
93
+ /**
94
+ 开始时间 精确到秒 | start time interval since 1970 (eg 14442361933)
95
+ */
96
+ @property (nonatomic,copy) NSString * timeStr;
97
+
98
+ /**
99
+ 游泳类型 0x00:无效,0x01:室内游泳,0x02:开阔水域游泳 | 0x00:invalid,0x01:Indoor swimming,0x02:Open water swimming
100
+ */
101
+ @property (nonatomic,assign) NSInteger type;
102
+
103
+ /**
104
+ 卡路里(单 位:大卡) | Calories (Unit: Big Card)
105
+ */
106
+ @property (nonatomic,assign) NSInteger calories;
107
+
108
+ /**
109
+ 距离(单位: 米) | Distance (in meters)
110
+ */
111
+ @property (nonatomic,assign) NSInteger distance;
112
+
113
+ /**
114
+ 游泳趟数 | Swimming train number
115
+ */
116
+ @property (nonatomic,assign) NSInteger trips;
117
+
118
+ /**
119
+ 平均 swolf | average swolf
120
+ */
121
+ @property (nonatomic,assign) NSInteger averageSwolf;
122
+
123
+ /**
124
+ 总划水次数 | total strokes number
125
+ */
126
+ @property (nonatomic,assign) NSInteger totalStrokesNumber;
127
+
128
+ /**
129
+ * 主泳姿 | swimming posture
130
+ * 0x00 : 混合泳; 0x01 : 自由泳; 0x02 : 蛙泳; 0x03 : 仰泳; 0x04 : 蝶泳;
131
+ * 0x00: medley; 0x01: freestyle; 0x02: breaststroke; 0x03: backstroke; 0x04: butterfly stroke;
132
+ */
133
+ @property (nonatomic,assign) NSInteger swimmingPosture;
134
+
135
+ /**
136
+ 泳池距离 (单位:cm) | pool distance (unit:cm)
137
+ */
138
+ @property (nonatomic,assign) NSInteger poolDistance;
139
+
140
+ /**
141
+ 游泳数据包量 | swimming data package
142
+ */
143
+ @property (nonatomic,assign) NSInteger itemsCount;
144
+
145
+ /**
146
+ * @brief 游泳集合 只有定义好的查询方法才能转成model集合,自定义的查询方法无法直接转成model集合,需要再查询itemModel赋给当前属性
147
+ * swimming collection Only defined query methods can be converted into model collections. Custom query methods cannot be directly converted
148
+ * into model collections. You need to query itemModel to assign current attributes.
149
+ */
150
+ @property (nonatomic,copy) NSArray <IDOSyncSwimItemDataInfoBluetoothModel *>* swimmingItems;
151
+
152
+ /**
153
+ 用户确认的距离 | confirm distance
154
+ */
155
+ @property (nonatomic,assign) NSInteger confirmDistance;
156
+
157
+ /**
158
+ 游泳持续时长 单位:分钟 | duration unit:minute
159
+ */
160
+ @property (nonatomic,assign) NSInteger duration;
161
+
162
+ @end
163
+
164
+
165
+ @interface IDOSyncSwimDataModel : NSObject
166
+ /**
167
+ * @brief 当前设备根据游泳开始时间查询某个游泳详情
168
+ * The current device queries an swim details based on the event start time
169
+ * @param macAddr mac地址 | Mac address
170
+ * @param timeStr 游泳开始时间 | swim start time
171
+ * @return model IDOSyncSwimmingDataInfoBluetoothModel
172
+ */
173
+ + (__kindof IDOSyncSwimmingDataInfoBluetoothModel *)querySwimDataWithTimeStr:(NSString *)timeStr
174
+ macAddr:(NSString *)macAddr;
175
+
176
+ /**
177
+ * @brief 当前设备查询一天所有游泳数据
178
+ * The current device queries an swim details based on the event start time
179
+ * @param macAddr mac地址 | Mac address
180
+ * @param dateStr 日期时间戳 | Date time stamp
181
+ * @param isQuery 是否查询items | is query items
182
+ * @return 一天游泳数据的集合 | Collection of day swim data
183
+ */
184
+ + (NSArray <__kindof IDOSyncSwimmingDataInfoBluetoothModel *>*)querySwimDataWithDateStr:(NSString *)dateStr
185
+ macAddr:(NSString *)macAddr
186
+ isQueryItems:(BOOL)isQuery;
187
+
188
+ @end
@@ -0,0 +1,93 @@
1
+ //
2
+ // IDOTranEnum.h
3
+ // IDOBluetoothInternal
4
+ //
5
+ // Created by 何东阳 on 2019/8/7.
6
+ // Copyright © 2019 何东阳. All rights reserved.
7
+ //
8
+
9
+ #ifndef IDOTranEnum_h
10
+ #define IDOTranEnum_h
11
+
12
+ /**
13
+ 压缩类型 | compression type
14
+ */
15
+ typedef NS_ENUM(NSInteger, IDO_DATA_TRAN_COMPRESSION_TYPE) {
16
+ /**
17
+ 不适用压缩 | no use
18
+ */
19
+ IDO_DATA_TRAN_COMPRESSION_NO_USE_TYPE = 0,
20
+ /**
21
+ zlib压缩 | zlib
22
+ */
23
+ IDO_DATA_TRAN_COMPRESSION_ZLIB_TYPE = 1,
24
+ /**
25
+ fastlz压缩 | fastlz
26
+ */
27
+ IDO_DATA_TRAN_COMPRESSION_FASTLZ_TYPE = 2,
28
+
29
+ };
30
+
31
+ /**
32
+ 文件传输类型 | file transfer type
33
+ */
34
+ typedef NS_ENUM(NSInteger, IDO_DATA_FILE_TRAN_TYPE) {
35
+ /**
36
+ AGPS 文件 | AGPS file type
37
+ */
38
+ IDO_DATA_FILE_TRAN_AGPS_TYPE = 1,
39
+ /**
40
+ 表盘 文件 | dial file type
41
+ */
42
+ IDO_DATA_FILE_TRAN_DIAL_TYPE = 2,
43
+ /**
44
+ 字库 文件 | word file type
45
+ */
46
+ IDO_DATA_FILE_TRAN_WORD_TYPE = 3,
47
+ /**
48
+ 图片文件 | photo file type
49
+ */
50
+ IDO_DATA_FILE_TRAN_PHOTO_TYPE = 4
51
+ };
52
+
53
+ /**
54
+ 文件传输状态 | file transfer state type
55
+ */
56
+ typedef NS_ENUM(NSInteger, IDO_DATA_FILE_TRAN_STATE_TYPE) {
57
+ /**
58
+ 文件传输初始值 | transmission init
59
+ */
60
+ IDO_DATA_FILE_TRAN_INIT_TYPE = 0,
61
+ /**
62
+ 文件开始传输 | start transmission
63
+ */
64
+ IDO_DATA_FILE_TRAN_START_TYPE = 1,
65
+ /**
66
+ 文件传输中 | transmissioning
67
+ */
68
+ IDO_DATA_FILE_TRAN_ING_TYPE = 2,
69
+ /**
70
+ 文件传输成功 | transmission success
71
+ */
72
+ IDO_DATA_FILE_TRAN_SUCCESS_TYPE = 3,
73
+ /**
74
+ 文件传输失败 | transmission failed
75
+ */
76
+ IDO_DATA_FILE_TRAN_FAILED_TYPE = 4,
77
+ /**
78
+ 文件开始写入 | start write
79
+ */
80
+ IDO_DATA_FILE_WRITE_TYPE = 5,
81
+ /**
82
+ 文件写入成功 | write success
83
+ */
84
+ IDO_DATA_FILE_WRITE_SUCCESS_TYPE = 6,
85
+ /**
86
+ 文件写入失败 | write failed
87
+ */
88
+ IDO_DATA_FILE_WRITE_FAILED_TYPE = 7,
89
+
90
+ };
91
+
92
+
93
+ #endif /* IDOTranEnum_h */