summaryrefslogtreecommitdiff
path: root/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOSyncHeartRateDataModel.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOSyncHeartRateDataModel.h')
-rwxr-xr-xlibs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOSyncHeartRateDataModel.h442
1 files changed, 442 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOSyncHeartRateDataModel.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOSyncHeartRateDataModel.h
new file mode 100755
index 0000000..c160915
--- /dev/null
+++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOSyncHeartRateDataModel.h
@@ -0,0 +1,442 @@
1//
2// IDOSyncHeartRateDataModel.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 IDOSyncHrDataItemInfoBluetoothModel : IDOBluetoothBaseModel
17
18/**
19 子时间偏移量 (单位:分钟) | Total time offset (unit: minute)
20 */
21@property (nonatomic,assign) NSInteger offset;
22
23/**
24 心率值 | Heart rate value
25 */
26@property (nonatomic,assign) NSInteger data;
27
28/**
29 时间戳 精确到日期 date interval since 1970 (如:1444361933) | Timestamp date interval since 1970 (eg: 14443361933)
30 */
31@property (nonatomic,copy) NSString * dateStr;
32
33/**
34 序列号 | Serial number
35 */
36@property (nonatomic,assign) NSInteger serialNumber;
37
38@end
39
40@interface IDOSyncHrDataInfoBluetoothModel : IDOBluetoothBaseModel
41
42/**
43 心率数据包数量 | Heart Rate Packets
44 */
45@property (nonatomic,assign) NSInteger itemsCount;
46
47/**
48 总时间偏移量 (单位:分钟) | Total time offset (unit: minute)
49 */
50@property (nonatomic,assign) NSUInteger minuteOffset;
51
52/**
53 静态心率 | Static heart rate
54 */
55@property (nonatomic,assign) NSUInteger silentHeartRate;
56
57/**
58 燃烧脂肪阀值 | Burning fat threshold
59 */
60@property (nonatomic,assign) NSUInteger burnFatThreshold;
61
62/**
63 肌肉锻炼阀值 | Muscle exercise threshold
64 */
65@property (nonatomic,assign) NSUInteger aerobicThreshold;
66
67/**
68 极限阀值 | Limit threshold
69 */
70@property (nonatomic,assign) NSUInteger limitThreshold;
71
72/**
73 脂肪燃烧时长 (单位 :分钟) | Fat burning time (unit: minute)
74 */
75@property (nonatomic,assign) NSUInteger burnFatMins;
76
77/**
78 肌肉锻炼时长 (单位 :分钟) | Muscle training time (unit: minute)
79 */
80@property (nonatomic,assign) NSUInteger aerobicMins;
81
82/**
83 极限运动时长 (单位 :分钟) | Extreme Sports Duration (Unit: Minutes)
84 */
85@property (nonatomic,assign) NSUInteger limitMins;
86
87/**
88 用户最大心率 | User maximum heart rate
89 */
90@property (nonatomic,assign) NSUInteger userMaxHr;
91
92/**
93 热身运动阈值 | warm up threshold
94 */
95@property (nonatomic,assign) NSUInteger warmUpThreshold;
96
97/**
98 热身运动时间 (单位 :分钟) | warm up mins
99 */
100@property (nonatomic,assign) NSUInteger warmUpMins;
101
102/**
103 无氧运动阈值 | anaerobic threshold
104 */
105@property (nonatomic,assign) NSUInteger anaerobicThreshold;
106
107/**
108 无氧运动时间 (单位 :分钟) | anaerobic mins
109 */
110@property (nonatomic,assign) NSUInteger anaerobicMins;
111
112/**
113 年份 | Year
114 */
115@property (nonatomic,assign) NSInteger year;
116
117/**
118 月份 | Month
119 */
120@property (nonatomic,assign) NSInteger month;
121
122/**
123 日期 | Date
124 */
125@property (nonatomic,assign) NSInteger day;
126
127/**
128 * 心率集合 只有定义好的查询方法才能转成model集合,自定义的查询方法无法直接转成model集合,需要再查询itemModel赋给当前属性
129 * Heart rate collection Only defined query methods can be converted into model collections. Custom query methods cannot be directly
130 * converted into model collections. You need to query itemModel to assign current attributes.
131 */
132@property (nonatomic,copy) NSArray <IDOSyncHrDataItemInfoBluetoothModel *>* heartRates;
133
134/**
135 时间戳 精确到日期 date interval since 1970 (如:1444361933) | Timestamp date interval since 1970 (eg: 14443361933)
136 */
137@property (nonatomic,copy) NSString * dateStr;
138
139@end
140
141@interface IDOSyncSecHrDataItemInfoBluetoothModel : IDOBluetoothBaseModel
142/**
143 子时间偏移量 (单位:秒钟) | Total time offset (unit: second)
144 */
145@property (nonatomic,assign) NSInteger offset;
146
147/**
148 心率值 | Heart rate value
149 */
150@property (nonatomic,assign) NSInteger hrValue;
151
152/**
153 时间戳 精确到日期 date interval since 1970 (如:1444361933) | Timestamp date interval since 1970 (eg: 14443361933)
154 */
155@property (nonatomic,copy) NSString * dateStr;
156
157/**
158 序列号 | Serial number
159 */
160@property (nonatomic,assign) NSInteger serialNumber;
161
162@end
163
164@interface IDOSyncSecHrDataInfoBluetoothModel : IDOBluetoothBaseModel
165/**
166 心率数据包数量 | Heart Rate Packets
167 */
168@property (nonatomic,assign) NSInteger itemsCount;
169
170/**
171 总时间偏移量 (单位:秒钟) | Total time offset (unit: second)
172 */
173@property (nonatomic,assign) NSUInteger secondOffset;
174
175/**
176 静态心率 | Static heart rate
177 */
178@property (nonatomic,assign) NSUInteger silentHeartRate;
179
180/**
181 燃烧脂肪阀值 | Burning fat threshold
182 */
183@property (nonatomic,assign) NSUInteger burnFatThreshold;
184
185/**
186 肌肉锻炼阀值 | Muscle exercise threshold
187 */
188@property (nonatomic,assign) NSUInteger aerobicThreshold;
189
190/**
191 极限阀值 | Limit threshold
192 */
193@property (nonatomic,assign) NSUInteger limitThreshold;
194
195/**
196 脂肪燃烧时长 (单位 :分钟) | Fat burning time (unit: minute)
197 */
198@property (nonatomic,assign) NSUInteger burnFatMins;
199
200/**
201 肌肉锻炼时长 (单位 :分钟) | Muscle training time (unit: minute)
202 */
203@property (nonatomic,assign) NSUInteger aerobicMins;
204
205/**
206 极限运动时长 (单位 :分钟) | Extreme Sports Duration (Unit: Minutes)
207 */
208@property (nonatomic,assign) NSUInteger limitMins;
209
210/**
211 用户最大心率 | User maximum heart rate
212 */
213@property (nonatomic,assign) NSUInteger userMaxHr;
214
215/**
216 热身运动阈值 | warm up threshold
217 */
218@property (nonatomic,assign) NSUInteger warmUpThreshold;
219
220/**
221 热身运动时间 (单位 :分钟) | warm up mins
222 */
223@property (nonatomic,assign) NSUInteger warmUpMins;
224
225/**
226 无氧运动阈值 | anaerobic threshold
227 */
228@property (nonatomic,assign) NSUInteger anaerobicThreshold;
229
230/**
231 无氧运动阈值 (单位 :分钟) | anaerobic mins
232 */
233@property (nonatomic,assign) NSUInteger anaerobicMins;
234
235/**
236 年份 | Year
237 */
238@property (nonatomic,assign) NSInteger year;
239
240/**
241 月份 | Month
242 */
243@property (nonatomic,assign) NSInteger month;
244
245/**
246 日期 | Date
247 */
248@property (nonatomic,assign) NSInteger day;
249
250/**
251 * 心率集合 只有定义好的查询方法才能转成model集合,自定义的查询方法无法直接转成model集合,需要再查询itemModel赋给当前属性
252 * Heart rate collection Only defined query methods can be converted into model collections. Custom query methods cannot be directly
253 * converted into model collections. You need to query itemModel to assign current attributes.
254 */
255@property (nonatomic,copy) NSArray <IDOSyncSecHrDataItemInfoBluetoothModel *>* heartRates;
256
257/**
258 * 5分钟间隔心率集合和总心率时长 | Heart rate set at 5-minute intervals and total heart rate duration
259 * @{@"total_offset":@(0),@"heart_rates":@[@{@"offset":@(0),@"value":@(0)}...]};
260 */
261@property (nonatomic,copy) NSDictionary * minutesHrDic;
262
263/**
264 时间戳 精确到日期 date interval since 1970 (如:1444361933) | Timestamp date interval since 1970 (eg: 14443361933)
265 */
266@property (nonatomic,copy) NSString * dateStr;
267
268@end
269
270
271@interface IDOSyncHeartRateDataModel : NSObject
272
273#pragma mark ======================== offset minunte ===============================
274/**
275 * @brief 查询当前设备某年12个月所有数据 (如果查询当月无数据,会创建空的数据对象,大于当月的数据不累加)
276 * 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,
277 * and the data larger than the current month will not be accumulated)
278 * @param year 年 (如 : 2018) | Year (eg: 2018)
279 * @param macAddr mac 地址 | mac address
280 * @param isQuery 是否查询items | is query items
281 * @return 一年12个月的心率数据集合,其中IDOSyncHrDataInfoBluetoothModel对象是一天总心率数据模型
282 * Heart rate data collection for 12 months a year, where the IDOSyncHrDataInfoBluetoothModel object is the total heart rate data model for the day
283 */
284+ (NSArray <NSArray<__kindof IDOSyncHrDataInfoBluetoothModel *>*> *)queryOneYearHearRatesWithYear:(NSInteger)year
285 macAddr:(NSString *)macAddr
286 isQueryItems:(BOOL)isQuery;
287
288/**
289 * @brief 查询当前设备某月份的所有数据 (如果查询当天无数据,会创建空的数据对象,大于当天的数据不累加)
290 * 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,
291 * which is larger than the data of the day)
292 * @param year 年 (如 : 2018) | Year (eg: 2018)
293 * @param month 月 (如 : 9) | Month (eg: 9)
294 * @param macAddr mac 地址 | mac address
295 * @param dates 当前查询月份的所有日期集合的指针 (格式 :[10/01...10/31])
296 * Pointer to all date collections for the current query month (format: [10/01...10/31])
297 * @param isQuery 是否查询items | is query items
298 * @return 一个月的心率数据集合,其中IDOSyncHrDataInfoBluetoothModel对象是一天总心率数据模型
299 * A one-month heart rate data collection, where the IDOSyncHrDataInfoBluetoothModel object is the total heart rate data model for the day
300 */
301+ (NSArray <__kindof IDOSyncHrDataInfoBluetoothModel *>*)queryOneMonthHearRatesWithYear:(NSInteger)year
302 month:(NSInteger)month
303 macAddr:(NSString *)macAddr
304 datesOfMonth:(NSArray <NSString *>**)dates
305 isQueryItems:(BOOL)isQuery;
306
307/**
308 * @brief 查询当前设备某周的所有数据 (如果查询当天无数据,会创建空的数据对象,大于当天的数据不累加)
309 * 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,
310 * and the data larger than the current day will not be accumulated)
311 * @param weekIndex 周的查询索引 (0 : 当周, 1 : 上一周, 2 : 上两周 ...) | Week's query index (0: week, 1 : last week, 2 : last two weeks...)
312 * @param weekStartDay 星期的开始日 (0 : 星期日, 1 : 星期一, 2 : 星期二 ...) | Start of the week (0: Sunday, 1 : Monday, 2 : Tuesday ...)
313 * @param macAddr mac 地址 | mac address
314 * @param dates 当前查询周的所有日期集合的指针 (格式 :[10/01...10/07])
315 * Pointer to all date collections for the current query week (format: [10/01...10/07])
316 * @param isQuery 是否查询items | is query items
317 * @return 一周的心率数据集合,其中IDOSyncHrDataInfoBluetoothModel对象是一天总心率数据模型
318 * A week's heart rate data collection, where the IDOSyncHrDataInfoBluetoothModel object is the total heart rate data model for the day
319 */
320+ (NSArray <__kindof IDOSyncHrDataInfoBluetoothModel *>*)queryOneWeekHearRatesWithWeekIndex:(NSInteger)weekIndex
321 weekStartDay:(NSInteger)weekStartDay
322 macAddr:(NSString *)macAddr
323 datesOfWeek:(NSArray <NSString *>**)dates
324 isQueryItems:(BOOL)isQuery;
325
326/**
327 * @brief 查询当前设备某天心率数据并有详情数据 | Query current heart rate data of the current device and have detailed data
328 * @param macAddr mac 地址 | mac address
329 * @param year 年份 | year
330 * @param month 月份 | month
331 * @param day 日期 | day
332 * @return 一天心率数据的集合和详情数据集合 | Collection of day heart rate data and details data
333 */
334+ (NSArray<__kindof IDOSyncHrDataInfoBluetoothModel *> *)queryOneDayHearRatesDetailWithMac:(NSString *)macAddr
335 year:(NSInteger)year
336 month:(NSInteger)month
337 day:(NSInteger)day;
338
339/**
340 * @brief 查询所有心率数据 心率包个数大于0 | Query all heart rate data The number of heart rate packets is greater than 0
341 * @param macAddr mac 地址 | mac address
342 * @return 所有心率数据的集合 | Collection of all heart rate data and details data
343 */
344+ (NSArray <__kindof IDOSyncHrDataInfoBluetoothModel *>*)queryAllHearRatesWithMac:(NSString *)macAddr;
345
346
347/**
348 * @brief 查询所有心率数据 心率包个数大于0 只包含静心心率和日期时间戳
349 * Query all heart rate data The number of heart rate packets is greater than 0
350 * Contains only meditation heart rate and date and time stamp
351 * @param macAddr mac 地址 | mac address
352 * @return 所有心率数据的集合 | Collection of all heart rate data
353 */
354+ (NSArray <__kindof IDOSyncHrDataInfoBluetoothModel *>*)queryAllContractedHearRatesWithMac:(NSString *)macAddr;
355
356#pragma mark ======================== offset second ===============================
357
358/**
359 * @brief 查询当前设备某年12个月所有数据 (如果查询当月无数据,会创建空的数据对象,大于当月的数据不累加)
360 * 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,
361 * and the data larger than the current month will not be accumulated)
362 * @param year 年 (如 : 2018) | Year (eg: 2018)
363 * @param macAddr mac 地址 | mac address
364 * @param isQuery 是否查询items | is query items
365 * @return 一年12个月的秒钟心率数据集合,其中IDOSyncSecHrDataInfoBluetoothModel对象是一天总心率数据模型
366 * second heart rate data collection for 12 months a year, where the IDOSyncSecHrDataInfoBluetoothModel object is the total heart rate data model for the day
367 */
368+ (NSArray <NSArray<__kindof IDOSyncSecHrDataInfoBluetoothModel *>*> *)queryOneYearSecHearRatesWithYear:(NSInteger)year
369 macAddr:(NSString *)macAddr
370 isQueryItems:(BOOL)isQuery;
371
372/**
373 * @brief 查询当前设备某月份的所有数据 (如果查询当天无数据,会创建空的数据对象,大于当天的数据不累加)
374 * 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,
375 * which is larger than the data of the day)
376 * @param year 年 (如 : 2018) | Year (eg: 2018)
377 * @param month 月 (如 : 9) | Month (eg: 9)
378 * @param macAddr mac 地址 | mac address
379 * @param dates 当前查询月份的所有日期集合的指针 (格式 :[10/01...10/31])
380 * Pointer to all date collections for the current query month (format: [10/01...10/31])
381 * @param isQuery 是否查询items | is query items
382 * @return 一个月的秒钟心率数据集合,其中IDOSyncSecHrDataInfoBluetoothModel对象是一天总心率数据模型
383 * one-month second heart rate data collection, where the IDOSyncSecHrDataInfoBluetoothModel object is the total heart rate data model for the day
384 */
385+ (NSArray <__kindof IDOSyncSecHrDataInfoBluetoothModel *>*)queryOneMonthSecHearRatesWithYear:(NSInteger)year
386 month:(NSInteger)month
387 macAddr:(NSString *)macAddr
388 datesOfMonth:(NSArray <NSString *>**)dates
389 isQueryItems:(BOOL)isQuery;
390
391/**
392 * @brief 查询当前设备某周的所有数据 (如果查询当天无数据,会创建空的数据对象,大于当天的数据不累加)
393 * 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,
394 * and the data larger than the current day will not be accumulated)
395 * @param weekIndex 周的查询索引 (0 : 当周, 1 : 上一周, 2 : 上两周 ...) | Week's query index (0: week, 1 : last week, 2 : last two weeks...)
396 * @param weekStartDay 星期的开始日 (0 : 星期日, 1 : 星期一, 2 : 星期二 ...) | Start of the week (0: Sunday, 1 : Monday, 2 : Tuesday ...)
397 * @param macAddr mac 地址 | mac address
398 * @param dates 当前查询周的所有日期集合的指针 (格式 :[10/01...10/07])
399 * Pointer to all date collections for the current query week (format: [10/01...10/07])
400 * @param isQuery 是否查询items | is query items
401 * @return 一周的秒钟心率数据集合,其中IDOSyncSecHrDataInfoBluetoothModel对象是一天总心率数据模型
402 * one week second heart rate data collection, where the IDOSyncSecHrDataInfoBluetoothModel object is the total heart rate data model for the day
403 */
404+ (NSArray <__kindof IDOSyncSecHrDataInfoBluetoothModel *>*)queryOneWeekSecHearRatesWithWeekIndex:(NSInteger)weekIndex
405 weekStartDay:(NSInteger)weekStartDay
406 macAddr:(NSString *)macAddr
407 datesOfWeek:(NSArray <NSString *>**)dates
408 isQueryItems:(BOOL)isQuery;
409
410/**
411 * @brief 查询当前设备某天秒钟心率数据并有详情数据 | Query current day second heart rate data of the current device and have detailed data
412 * @param macAddr mac 地址 | mac address
413 * @param year 年份 | year
414 * @param month 月份 | month
415 * @param day 日期 | day
416 * @param isQuery 是否查询items | is query items
417 * @return 一天秒钟心率数据的集合和详情数据集合 | Collection of day second heart rate data and details data
418 */
419+ (NSArray<__kindof IDOSyncSecHrDataInfoBluetoothModel *> *)queryOneDaySecHearRatesDetailWithMac:(NSString *)macAddr
420 year:(NSInteger)year
421 month:(NSInteger)month
422 day:(NSInteger)day
423 isQueryItems:(BOOL)isQuery;
424
425/**
426 * @brief 查询所有秒钟心率数据 心率包个数大于0 | Query all second heart rate data The number of heart rate packets is greater than 0
427 * @param macAddr mac 地址 | mac address
428 * @return 所有秒钟心率数据的集合 | Collection of all second heart rate data and details data
429 */
430+ (NSArray <__kindof IDOSyncSecHrDataInfoBluetoothModel *>*)queryAllSecHearRatesWithMac:(NSString *)macAddr;
431
432/**
433 * @brief 查询所有秒钟心率数据 心率包个数大于0 只包含静心心率和日期时间戳
434 * Query all second heart rate data The number of heart rate packets is greater than 0
435 * Contains only meditation heart rate and date and time stamp
436 * @param macAddr mac 地址 | mac address
437 * @return 所有心率数据的集合 | Collection of all heart rate data
438 */
439+ (NSArray <__kindof IDOSyncSecHrDataInfoBluetoothModel *>*)queryAllContractedSecHearRatesWithMac:(NSString *)macAddr;
440
441@end
442