diff options
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOSyncSleepDataModel.h')
| -rwxr-xr-x | libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOSyncSleepDataModel.h | 224 |
1 files changed, 224 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOSyncSleepDataModel.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOSyncSleepDataModel.h new file mode 100755 index 0000000..608df6b --- /dev/null +++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IDOSyncSleepDataModel.h | |||
| @@ -0,0 +1,224 @@ | |||
| 1 | // | ||
| 2 | // IDOSyncSleepDataModel.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 IDOSyncSleepDataItemInfoBluetoothModel : IDOBluetoothBaseModel | ||
| 17 | |||
| 18 | /** | ||
| 19 | * 睡眠状态 睡眠状态(0x01: 醒着, 0x02:浅睡, 0x03:深睡) | ||
| 20 | * Sleep state Sleep state (0x01: awake, 0x02: light sleep, 0x03: deep sleep) | ||
| 21 | */ | ||
| 22 | @property (nonatomic,assign) NSInteger sleepStatus; | ||
| 23 | |||
| 24 | /** | ||
| 25 | 持续时间 | Duration | ||
| 26 | */ | ||
| 27 | @property (nonatomic,assign) NSInteger durations; | ||
| 28 | |||
| 29 | /** | ||
| 30 | 时间戳 精确到日期 date interval since 1970 (如:1444361933) | Timestamp date interval since 1970 (eg: 14443361933) | ||
| 31 | */ | ||
| 32 | @property (nonatomic,copy) NSString * dateStr; | ||
| 33 | |||
| 34 | /** | ||
| 35 | 时间戳 精确到分钟 start time interval since 1970 (如:1444361933) | Timestamp minute interval since 1970 (eg: 14443361933) | ||
| 36 | */ | ||
| 37 | @property (nonatomic,copy) NSString * startTimeStr; | ||
| 38 | |||
| 39 | /** | ||
| 40 | 序列号 | Serial number | ||
| 41 | */ | ||
| 42 | @property (nonatomic,assign) NSInteger serialNumber; | ||
| 43 | |||
| 44 | @end | ||
| 45 | |||
| 46 | @interface IDOSyncSleepDataInfoBluetoothModel : IDOBluetoothBaseModel | ||
| 47 | |||
| 48 | /** | ||
| 49 | 睡眠数据包数量 | Number of sleep packets | ||
| 50 | */ | ||
| 51 | @property (nonatomic,assign) NSInteger itemsCount; | ||
| 52 | |||
| 53 | /** | ||
| 54 | 睡眠结束时钟 | End of sleep clock | ||
| 55 | */ | ||
| 56 | @property (nonatomic,assign) NSInteger endHour; | ||
| 57 | |||
| 58 | /** | ||
| 59 | 睡眠结束分钟 | End of sleep minutes | ||
| 60 | */ | ||
| 61 | @property (nonatomic,assign) NSInteger endMinute; | ||
| 62 | |||
| 63 | /** | ||
| 64 | 总睡眠时长 (单位 :分钟) | Total sleep duration (unit: minute) | ||
| 65 | */ | ||
| 66 | @property (nonatomic,assign) NSInteger totalMinute; | ||
| 67 | |||
| 68 | /** | ||
| 69 | 浅睡眠次数 | Light sleep times | ||
| 70 | */ | ||
| 71 | @property (nonatomic,assign) NSInteger lightSleepCount; | ||
| 72 | |||
| 73 | /** | ||
| 74 | 深睡眠次数 | Deep sleep times | ||
| 75 | */ | ||
| 76 | @property (nonatomic,assign) NSInteger deepSleepCount; | ||
| 77 | |||
| 78 | /** | ||
| 79 | 醒来次数 | Wake up times | ||
| 80 | */ | ||
| 81 | @property (nonatomic,assign) NSInteger wakeCount; | ||
| 82 | |||
| 83 | /** | ||
| 84 | 醒来时长 | Wake up Duration | ||
| 85 | */ | ||
| 86 | @property (nonatomic,assign) NSInteger wakeMinute; | ||
| 87 | |||
| 88 | /** | ||
| 89 | 浅睡眠时长 | Light sleep duration | ||
| 90 | */ | ||
| 91 | @property (nonatomic,assign) NSInteger lightSleepMinute; | ||
| 92 | |||
| 93 | /** | ||
| 94 | 深睡眠时长 | Deep sleep duration | ||
| 95 | */ | ||
| 96 | @property (nonatomic,assign) NSInteger deepSleepMinute; | ||
| 97 | |||
| 98 | /** | ||
| 99 | 目标睡眠时长 (单位 : 分钟) | Target sleep duration (unit: minute) | ||
| 100 | */ | ||
| 101 | @property (nonatomic,assign) NSInteger goalSleepData; | ||
| 102 | |||
| 103 | /** | ||
| 104 | * 睡眠数据集合 只有定义好的查询方法才能转成model集合,自定义的查询方法无法直接转成model集合,需要再查询itemModel赋给当前属性 | ||
| 105 | * Sleep data collection Only defined query methods can be converted into model collections. Custom query methods cannot be directly converted | ||
| 106 | * into model collections. You need to query itemModel to assign current attributes. | ||
| 107 | */ | ||
| 108 | @property (nonatomic,copy) NSArray <IDOSyncSleepDataItemInfoBluetoothModel *> * sleepItems; | ||
| 109 | |||
| 110 | /** | ||
| 111 | 年份 | Year | ||
| 112 | */ | ||
| 113 | @property (nonatomic,assign) NSInteger year; | ||
| 114 | |||
| 115 | /** | ||
| 116 | 月份 | Month | ||
| 117 | */ | ||
| 118 | @property (nonatomic,assign) NSInteger month; | ||
| 119 | |||
| 120 | /** | ||
| 121 | 日期 | Date | ||
| 122 | */ | ||
| 123 | @property (nonatomic,assign) NSInteger day; | ||
| 124 | |||
| 125 | /** | ||
| 126 | 时间戳 精确到日期 date interval since 1970 (如:1444361933) | Timestamp date interval since 1970 (eg: 14443361933) | ||
| 127 | */ | ||
| 128 | @property (nonatomic,copy) NSString * dateStr; | ||
| 129 | |||
| 130 | /** | ||
| 131 | 时间戳 精确到分钟 start time interval since 1970 (如:1444361933) | Timestamp minute interval since 1970 (eg: 14443361933) | ||
| 132 | */ | ||
| 133 | @property (nonatomic,copy) NSString * startTimeStr; | ||
| 134 | |||
| 135 | /** | ||
| 136 | 睡眠评分 | sleep score (1-100) | ||
| 137 | */ | ||
| 138 | @property (nonatomic,assign) NSInteger sleepScore; | ||
| 139 | |||
| 140 | @end | ||
| 141 | |||
| 142 | @interface IDOSyncSleepDataModel : NSObject | ||
| 143 | /** | ||
| 144 | * @brief 查询当前设备某年12个月所有数据 (如果查询当月无数据,会创建空的数据对象,大于当月的数据不累加) | ||
| 145 | * 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, | ||
| 146 | * and the data larger than the current month will not be accumulated) | ||
| 147 | * @param year 年 (如 : 2018) | Year (eg: 2018) | ||
| 148 | * @param macAddr mac 地址 | mac address | ||
| 149 | * @param isQuery 是否查询items | is query items | ||
| 150 | * @return 一年12个月的睡眠数据集合,其中IDOSyncSleepDataInfoBluetoothModel对象是一天总睡眠数据模型 | ||
| 151 | * 12 months of sleep data collection, IDOSyncSleepDataInfoBluetoothModel object is the total day sleep data model | ||
| 152 | */ | ||
| 153 | + (NSArray <NSArray <__kindof IDOSyncSleepDataInfoBluetoothModel *>*>*)queryOneYearSleepsWithYear:(NSInteger)year | ||
| 154 | macAddr:(NSString *)macAddr | ||
| 155 | isQueryItems:(BOOL)isQuery; | ||
| 156 | |||
| 157 | /** | ||
| 158 | * @brief 查询当前设备某月份的所有数据 (如果查询当天无数据,会创建空的数据对象,大于当天的数据不累加) | ||
| 159 | * 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, | ||
| 160 | * which is larger than the data of the day) | ||
| 161 | * @param year 年 (如 : 2018) | year year (eg 2018) | ||
| 162 | * @param month 月 (如 : 9) | Month (eg: 9) | ||
| 163 | * @param macAddr mac 地址 | mac address | ||
| 164 | * @param dates 当前查询月份的所有日期集合的指针 (格式 :[10/01...10/31]) | ||
| 165 | * Pointer to all date collections for the current query month (format: [10/01...10/31]) | ||
| 166 | * @param isQuery 是否查询items | is query items | ||
| 167 | * @return 一个月的睡眠数据集合,其中IDOSyncSleepDataInfoBluetoothModel对象是一天总睡眠数据模型 | ||
| 168 | * A one-month sleep data collection, where the IDOSyncSleepDataInfoBluetoothModel object is the total day sleep data model | ||
| 169 | */ | ||
| 170 | + (NSArray <__kindof IDOSyncSleepDataInfoBluetoothModel *>*)queryOneMonthSleepsWithYear:(NSInteger)year | ||
| 171 | month:(NSInteger)month | ||
| 172 | macAddr:(NSString *)macAddr | ||
| 173 | datesOfMonth:(NSArray <NSString *>**)dates | ||
| 174 | isQueryItems:(BOOL)isQuery; | ||
| 175 | |||
| 176 | /** | ||
| 177 | * @brief 查询当前设备某周的所有数据 (如果查询当天无数据,会创建空的数据对象,大于当天的数据不累加) | ||
| 178 | * 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, | ||
| 179 | * and the data larger than the current day will not be accumulated) | ||
| 180 | * @param weekIndex 周的查询索引 (0 : 当周, 1 : 上一周, 2 : 上两周 ...) | Week's query index (0: week, 1 : last week, 2 : last two weeks...) | ||
| 181 | * @param weekStartDay 星期的开始日 (0 : 星期日, 1 : 星期一, 2 : 星期二 ...) | Start of the week (0: Sunday, 1 : Monday, 2 : Tuesday ...) | ||
| 182 | * @param macAddr mac 地址 | mac address | ||
| 183 | * @param dates 当前查询周的所有日期集合的指针 (格式 :[10/01...10/07]) | Pointer to all date collections for the current query week (format: [10/01...10/07]) | ||
| 184 | * @param isQuery 是否查询items | is query items | ||
| 185 | * @return 一周的睡眠数据集合,其中IDOSyncSleepDataInfoBluetoothModel对象是一天总睡眠数据模型 | ||
| 186 | * A week's sleep data collection, where the IDOSyncSleepDataInfoBluetoothModel object is the total day sleep data model | ||
| 187 | */ | ||
| 188 | + (NSArray <__kindof IDOSyncSleepDataInfoBluetoothModel *>*)queryOneWeekSleepsWithWeekIndex:(NSInteger)weekIndex | ||
| 189 | weekStartDay:(NSInteger)weekStartDay | ||
| 190 | macAddr:(NSString *)macAddr | ||
| 191 | datesOfWeek:(NSArray <NSString *>**)dates | ||
| 192 | isQueryItems:(BOOL)isQuery; | ||
| 193 | |||
| 194 | /** | ||
| 195 | * @brief 查询当前设备某天睡眠数据并有详情数据 | Query the current device's sleep data and have detailed data | ||
| 196 | * @param macAddr mac 地址 | mac address | ||
| 197 | * @param year 年份 | year | ||
| 198 | * @param month 月份 | month | ||
| 199 | * @param day 日期 | day | ||
| 200 | * @return 一天睡眠数据的集合和详情数据集合 | Collection of daily sleep data and detailed data | ||
| 201 | */ | ||
| 202 | + (NSArray <__kindof IDOSyncSleepDataInfoBluetoothModel *>*)queryOneDaySleepsDetailWithMac:(NSString *)macAddr | ||
| 203 | year:(NSInteger)year | ||
| 204 | month:(NSInteger)month | ||
| 205 | day:(NSInteger)day; | ||
| 206 | |||
| 207 | /** | ||
| 208 | * @brief 查询所有睡眠数据 睡眠时长大于0 | Query all sleep data Sleep duration is greater than 0 | ||
| 209 | * @param macAddr mac 地址 | mac address | ||
| 210 | * @return 所有睡眠数据的集合 | Collection and details of all sleep data | ||
| 211 | */ | ||
| 212 | + (NSArray <__kindof IDOSyncSleepDataInfoBluetoothModel *>*)queryAllSleepsWithMac:(NSString *)macAddr; | ||
| 213 | |||
| 214 | |||
| 215 | /** | ||
| 216 | * @brief 查询所有睡眠数据 睡眠时长大于0 只包含睡眠总时长和日期时间戳 | ||
| 217 | * Query all sleep data Sleep duration is greater than 0 Just the total amount of sleep and the date and timestamp | ||
| 218 | * @param macAddr mac 地址 | mac address | ||
| 219 | * @return 所有睡眠数据的集合 | Collection of all sleep data | ||
| 220 | */ | ||
| 221 | + (NSArray <__kindof IDOSyncSleepDataInfoBluetoothModel *>*)queryAllContractedSleepsWithMac:(NSString *)macAddr; | ||
| 222 | |||
| 223 | @end | ||
| 224 | |||
