capacitor-plugin-ihealth 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CapacitorPluginIhealth.podspec +35 -0
- package/README.md +214 -0
- package/android/build.gradle +58 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/managemyhealth/plugins/ihealth/ihealth.java +11 -0
- package/android/src/main/java/com/managemyhealth/plugins/ihealth/ihealthPlugin.java +22 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +450 -0
- package/dist/esm/definitions.d.ts +29 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +37 -0
- package/dist/esm/web.js +42 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +58 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +61 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/Plugin-Bridging-Header.h +35 -0
- package/ios/Plugin/iHealthSDKHeaders/ABI.h +82 -0
- package/ios/Plugin/iHealthSDKHeaders/ABIController.h +28 -0
- package/ios/Plugin/iHealthSDKHeaders/ABPM.h +144 -0
- package/ios/Plugin/iHealthSDKHeaders/ABPMController.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/AM3.h +188 -0
- package/ios/Plugin/iHealthSDKHeaders/AM3Controller.h +29 -0
- package/ios/Plugin/iHealthSDKHeaders/AM3SController_V2.h +29 -0
- package/ios/Plugin/iHealthSDKHeaders/AM3S_V2.h +227 -0
- package/ios/Plugin/iHealthSDKHeaders/AM4.h +223 -0
- package/ios/Plugin/iHealthSDKHeaders/AM4Controller.h +31 -0
- package/ios/Plugin/iHealthSDKHeaders/AM5.h +335 -0
- package/ios/Plugin/iHealthSDKHeaders/AM5Controller.h +30 -0
- package/ios/Plugin/iHealthSDKHeaders/AM5Header.h +20 -0
- package/ios/Plugin/iHealthSDKHeaders/AMHeader.h +27 -0
- package/ios/Plugin/iHealthSDKHeaders/AMMacroFile.h +1171 -0
- package/ios/Plugin/iHealthSDKHeaders/BG1.h +53 -0
- package/ios/Plugin/iHealthSDKHeaders/BG1Controller.h +46 -0
- package/ios/Plugin/iHealthSDKHeaders/BG1S.h +64 -0
- package/ios/Plugin/iHealthSDKHeaders/BG1SController.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/BG3.h +83 -0
- package/ios/Plugin/iHealthSDKHeaders/BG3Controller.h +28 -0
- package/ios/Plugin/iHealthSDKHeaders/BG5.h +158 -0
- package/ios/Plugin/iHealthSDKHeaders/BG5Controller.h +28 -0
- package/ios/Plugin/iHealthSDKHeaders/BG5S.h +294 -0
- package/ios/Plugin/iHealthSDKHeaders/BG5SController.h +29 -0
- package/ios/Plugin/iHealthSDKHeaders/BGController.h +32 -0
- package/ios/Plugin/iHealthSDKHeaders/BGDevice.h +42 -0
- package/ios/Plugin/iHealthSDKHeaders/BGHeader.h +23 -0
- package/ios/Plugin/iHealthSDKHeaders/BGMacroFile.h +507 -0
- package/ios/Plugin/iHealthSDKHeaders/BP3.h +77 -0
- package/ios/Plugin/iHealthSDKHeaders/BP3Controller.h +27 -0
- package/ios/Plugin/iHealthSDKHeaders/BP3L.h +58 -0
- package/ios/Plugin/iHealthSDKHeaders/BP3LController.h +30 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5.h +32 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5C.h +131 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5CController.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5Controller.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5S.h +97 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5SController.h +27 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5SRW.h +101 -0
- package/ios/Plugin/iHealthSDKHeaders/BP5SRWController.h +26 -0
- package/ios/Plugin/iHealthSDKHeaders/BP7.h +141 -0
- package/ios/Plugin/iHealthSDKHeaders/BP7Controller.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/BP7S.h +106 -0
- package/ios/Plugin/iHealthSDKHeaders/BP7SController.h +32 -0
- package/ios/Plugin/iHealthSDKHeaders/BPAV10Device.h +15 -0
- package/ios/Plugin/iHealthSDKHeaders/BPBTLEDevice.h +17 -0
- package/ios/Plugin/iHealthSDKHeaders/BPBV10Device.h +20 -0
- package/ios/Plugin/iHealthSDKHeaders/BPContinua.h +56 -0
- package/ios/Plugin/iHealthSDKHeaders/BPContinuaController.h +30 -0
- package/ios/Plugin/iHealthSDKHeaders/BPController.h +40 -0
- package/ios/Plugin/iHealthSDKHeaders/BPDevice.h +131 -0
- package/ios/Plugin/iHealthSDKHeaders/BPHeader.h +54 -0
- package/ios/Plugin/iHealthSDKHeaders/BPLoopMeasureSettingModel.h +120 -0
- package/ios/Plugin/iHealthSDKHeaders/BPM1AE.h +80 -0
- package/ios/Plugin/iHealthSDKHeaders/BPMacroFile.h +247 -0
- package/ios/Plugin/iHealthSDKHeaders/BPV24Device.h +16 -0
- package/ios/Plugin/iHealthSDKHeaders/BPV25Device.h +17 -0
- package/ios/Plugin/iHealthSDKHeaders/ConnectDeviceController.h +27 -0
- package/ios/Plugin/iHealthSDKHeaders/DFUController.h +160 -0
- package/ios/Plugin/iHealthSDKHeaders/DFUDeviceFirmwareInfo.h +56 -0
- package/ios/Plugin/iHealthSDKHeaders/DFUHeader.h +19 -0
- package/ios/Plugin/iHealthSDKHeaders/DFUMacro.h +264 -0
- package/ios/Plugin/iHealthSDKHeaders/DFUServerFirmwareInfo.h +48 -0
- package/ios/Plugin/iHealthSDKHeaders/ECG3.h +94 -0
- package/ios/Plugin/iHealthSDKHeaders/ECG3Controller.h +30 -0
- package/ios/Plugin/iHealthSDKHeaders/ECG3USB.h +145 -0
- package/ios/Plugin/iHealthSDKHeaders/ECG3USBController.h +31 -0
- package/ios/Plugin/iHealthSDKHeaders/ECGHeader.h +20 -0
- package/ios/Plugin/iHealthSDKHeaders/ECGMacroFile.h +84 -0
- package/ios/Plugin/iHealthSDKHeaders/HFSmartLink.h +88 -0
- package/ios/Plugin/iHealthSDKHeaders/HFSmartLinkDeviceInfo.h +14 -0
- package/ios/Plugin/iHealthSDKHeaders/HS2.h +64 -0
- package/ios/Plugin/iHealthSDKHeaders/HS2Controller.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/HS2S.h +399 -0
- package/ios/Plugin/iHealthSDKHeaders/HS2SController.h +27 -0
- package/ios/Plugin/iHealthSDKHeaders/HS3.h +63 -0
- package/ios/Plugin/iHealthSDKHeaders/HS3Controller.h +32 -0
- package/ios/Plugin/iHealthSDKHeaders/HS4.h +64 -0
- package/ios/Plugin/iHealthSDKHeaders/HS4Controller.h +26 -0
- package/ios/Plugin/iHealthSDKHeaders/HS5.h +141 -0
- package/ios/Plugin/iHealthSDKHeaders/HS5Controller.h +38 -0
- package/ios/Plugin/iHealthSDKHeaders/HSHeader.h +25 -0
- package/ios/Plugin/iHealthSDKHeaders/HSMacroFile.h +709 -0
- package/ios/Plugin/iHealthSDKHeaders/HealthHeader.h +67 -0
- package/ios/Plugin/iHealthSDKHeaders/HealthUser.h +126 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBindEnum.h +49 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBlueDataResponse.h +66 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBlueEnum.h +213 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothBaseModel.h +112 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothEngine.h +283 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothManager.h +166 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothServices.h +75 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOCalculateBluetoothModel.h +263 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOCommonMacro.h +89 -0
- package/ios/Plugin/iHealthSDKHeaders/IDODataExchangeModel.h +128 -0
- package/ios/Plugin/iHealthSDKHeaders/IDODataMigrationManager.h +79 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOErrorCodeToStr.h +19 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOFoundationCommand.h +1178 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOGetInfoBluetoothModel.h +1924 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOLogEnum.h +165 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOPeripheralModel.h +59 -0
- package/ios/Plugin/iHealthSDKHeaders/IDORecordDeviceLog.h +56 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSetInfoBluetoothModel.h +1760 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncActivityDataModel.h +207 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncBpDataModel.h +191 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncEnum.h +316 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncGpsDataModel.h +133 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncHeartRateDataModel.h +442 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncManager.h +161 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncPressureDataModel.h +158 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncSleepDataModel.h +224 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncSpo2DataModel.h +175 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncSportDataModel.h +221 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOSyncSwimDataModel.h +188 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOTranEnum.h +93 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOTransferFileManager.h +116 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOWatchDialInfoModel.h +95 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOWatchDialManager.h +75 -0
- package/ios/Plugin/iHealthSDKHeaders/IDOWeightBluetoothModel.h +124 -0
- package/ios/Plugin/iHealthSDKHeaders/IHSDKCloudUser.h +104 -0
- package/ios/Plugin/iHealthSDKHeaders/KN550BT.h +115 -0
- package/ios/Plugin/iHealthSDKHeaders/KN550BTController.h +32 -0
- package/ios/Plugin/iHealthSDKHeaders/ManageDeviceController.h +34 -0
- package/ios/Plugin/iHealthSDKHeaders/NT13B.h +33 -0
- package/ios/Plugin/iHealthSDKHeaders/NT13BController.h +28 -0
- package/ios/Plugin/iHealthSDKHeaders/NT13BHeader.h +16 -0
- package/ios/Plugin/iHealthSDKHeaders/NT13BMacroFile.h +34 -0
- package/ios/Plugin/iHealthSDKHeaders/PO1.h +82 -0
- package/ios/Plugin/iHealthSDKHeaders/PO1Controller.h +29 -0
- package/ios/Plugin/iHealthSDKHeaders/PO3.h +96 -0
- package/ios/Plugin/iHealthSDKHeaders/PO3Controller.h +29 -0
- package/ios/Plugin/iHealthSDKHeaders/POHeader.h +20 -0
- package/ios/Plugin/iHealthSDKHeaders/POMacroFile.h +142 -0
- package/ios/Plugin/iHealthSDKHeaders/PT3SBT.h +167 -0
- package/ios/Plugin/iHealthSDKHeaders/PT3SBTController.h +27 -0
- package/ios/Plugin/iHealthSDKHeaders/PT3SBTMacroFile.h +92 -0
- package/ios/Plugin/iHealthSDKHeaders/SDKFlowUpdateDevice.h +196 -0
- package/ios/Plugin/iHealthSDKHeaders/SDKInfo.h +30 -0
- package/ios/Plugin/iHealthSDKHeaders/SDKUpdateDevice.h +235 -0
- package/ios/Plugin/iHealthSDKHeaders/ScanDeviceController.h +47 -0
- package/ios/Plugin/iHealthSDKHeaders/THV3.h +104 -0
- package/ios/Plugin/iHealthSDKHeaders/THV3Controller.h +30 -0
- package/ios/Plugin/iHealthSDKHeaders/THV3Macro.h +17 -0
- package/ios/Plugin/iHealthSDKHeaders/TS28B.h +26 -0
- package/ios/Plugin/iHealthSDKHeaders/TS28BController.h +142 -0
- package/ios/Plugin/iHealthSDKHeaders/TS28BHeader.h +15 -0
- package/ios/Plugin/iHealthSDKHeaders/iHealthHS6.h +174 -0
- package/ios/Plugin/ihealth.swift +8 -0
- package/ios/Plugin/ihealthPlugin.h +10 -0
- package/ios/Plugin/ihealthPlugin.m +16 -0
- package/ios/Plugin/ihealthPlugin.swift +1502 -0
- package/ios/Plugin/libiHealthSDK2.7.8.a +0 -0
- package/ios/Plugin/test.m +9 -0
- package/package.json +78 -0
@@ -0,0 +1,161 @@
|
|
1
|
+
//
|
2
|
+
// IDOSyncManager.h
|
3
|
+
// VeryfitSDK
|
4
|
+
//
|
5
|
+
// Created by hedongyang on 2018/5/25.
|
6
|
+
// Copyright © 2018年 hedongyang. 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 "IDOSyncEnum.h"
|
14
|
+
#endif
|
15
|
+
|
16
|
+
@interface IDOSyncManager : NSObject
|
17
|
+
|
18
|
+
/**
|
19
|
+
* 当前连接设备是否正在同步,⚠️配置同步不纳入正在同步中,其他(步数、心率、血压、睡眠、血氧、压力、活动、gps、游泳)数据同步纳入其中
|
20
|
+
* Whether the currently connected device is synchronizing, ⚠️ configuration synchronization is not included in the synchronization,
|
21
|
+
* and other (step, heart rate, blood pressure, sleep, activity, gps、swim) data synchronization is included.
|
22
|
+
*/
|
23
|
+
@property (nonatomic,assign,readonly) BOOL isSyncHealthRun;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* 当前连接设备是否在同步配置信息
|
27
|
+
* Is the currently connected device synchronizing configuration information?
|
28
|
+
*/
|
29
|
+
@property (nonatomic,assign,readonly) BOOL isSyncConfigRun;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* 当前连接设备是否需要同步配置
|
33
|
+
* Does the current connected device require synchronization configuration?
|
34
|
+
*/
|
35
|
+
@property (nonatomic,assign,readonly) BOOL isNeedSyncConfig;
|
36
|
+
|
37
|
+
/**
|
38
|
+
* 设置需要同步的选项(同步配置、同步健康、同步活动、同步GPS)
|
39
|
+
* Set the options that need to be synchronized (sync config、sync health、sync activity、sync GPS)
|
40
|
+
*/
|
41
|
+
@property (nonatomic,assign) IDO_WANT_TO_SYNC_ITEM_TYPE wantToSyncType;
|
42
|
+
|
43
|
+
/**
|
44
|
+
* 同步的数据是否存入SDK数据库中,默认YES
|
45
|
+
* Whether the synchronized data is stored in the SDK database, the default is YES
|
46
|
+
*/
|
47
|
+
@property (nonatomic,assign) BOOL isSave;
|
48
|
+
|
49
|
+
/**
|
50
|
+
* 同步的数据超时时长,默认 60秒
|
51
|
+
* Synchronous data timeout duration, default 60 seconds
|
52
|
+
*/
|
53
|
+
@property (nonatomic,assign) NSInteger syncTimeout;
|
54
|
+
|
55
|
+
/**
|
56
|
+
* 同步配置日志回调
|
57
|
+
* Synchronize configuration log callback
|
58
|
+
*/
|
59
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncConfig)(void(^ _Nullable configLogCallback)(NSString * _Nullable logStr));
|
60
|
+
|
61
|
+
/**
|
62
|
+
* 同步健康心率数据回调
|
63
|
+
* Synchronize healthy heart rate data callback
|
64
|
+
*/
|
65
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncHeartRate)(void(^ _Nullable heartRateDataCallback)(NSString * _Nullable jsonStr));
|
66
|
+
|
67
|
+
/**
|
68
|
+
* 同步健康睡眠数据回调
|
69
|
+
* Synchronize healthy sleep data callback
|
70
|
+
*/
|
71
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncSleep)(void(^ _Nullable sleepDataCallback)(NSString * _Nullable jsonStr));
|
72
|
+
|
73
|
+
/**
|
74
|
+
* 同步健康步数数据回调
|
75
|
+
* Synchronize health step data callback
|
76
|
+
*/
|
77
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncSport)(void(^ _Nullable sportDataCallback)(NSString * _Nullable jsonStr));
|
78
|
+
|
79
|
+
/**
|
80
|
+
* 同步健康血压数据回调
|
81
|
+
* Synchronize healthy blood pressure data callback
|
82
|
+
*/
|
83
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncBp)(void(^ _Nullable bpDataCallback)(NSString * _Nullable jsonStr));
|
84
|
+
|
85
|
+
/**
|
86
|
+
* 同步活动数据回调
|
87
|
+
* Synchronize active data callbacks
|
88
|
+
*/
|
89
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncActivity)(void(^ _Nullable activityDataCallback)(NSString * _Nullable jsonStr));
|
90
|
+
|
91
|
+
/**
|
92
|
+
* 同步gps数据回调
|
93
|
+
* Synchronize GPS data callbacks
|
94
|
+
*/
|
95
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncGps)(void(^ _Nullable gpsDataCallback)(NSString * _Nullable jsonStr));
|
96
|
+
|
97
|
+
/**
|
98
|
+
* 同步游泳数据回调
|
99
|
+
* Synchronize swim data callback
|
100
|
+
*/
|
101
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncSwim)(void(^ _Nullable swimCallback)(NSString * _Nullable jsonStr));
|
102
|
+
|
103
|
+
/**
|
104
|
+
* 同步健康血氧数据回调
|
105
|
+
* Synchronize healthy blood oxygen data callback
|
106
|
+
*/
|
107
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncBloodOxygen)(void(^ _Nullable bloodOxygenDataCallback)(NSString * _Nullable jsonStr));
|
108
|
+
|
109
|
+
/**
|
110
|
+
* 同步压力数据回调
|
111
|
+
* Synchronize pressure data callback
|
112
|
+
*/
|
113
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncPressure)(void(^ _Nullable pressureCallback)(NSString * _Nullable jsonStr));
|
114
|
+
|
115
|
+
/**
|
116
|
+
* 同步统一进度回调
|
117
|
+
* Synchronize unified progress callback
|
118
|
+
*/
|
119
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncProgess)(void(^ _Nullable syncProgessCallback)(IDO_CURRENT_SYNC_TYPE type,float progress));
|
120
|
+
|
121
|
+
/**
|
122
|
+
* 同步完成回调
|
123
|
+
* Synchronize completes the callback
|
124
|
+
*/
|
125
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncComplete)(void(^ _Nullable syncCompleteCallback)(IDO_SYNC_COMPLETE_STATUS stateCode));
|
126
|
+
|
127
|
+
/**
|
128
|
+
* 同步失败回调 如: 超时、断线、OTA
|
129
|
+
* Synchronize failed callback eg: timeout, disconnect, OTA
|
130
|
+
*/
|
131
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^addSyncFailed)(void(^ _Nullable syncFailedCallback)(int errorCode));
|
132
|
+
|
133
|
+
/**
|
134
|
+
* 删除当天数据回调
|
135
|
+
* Delete current day data callback
|
136
|
+
*/
|
137
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^deleteCurrentDayData)(void(^ _Nullable deleteCallback)(BOOL success));
|
138
|
+
|
139
|
+
/**
|
140
|
+
* 强制执行或不执行同步配置
|
141
|
+
* Enforce or not enforce the synchronize configuration
|
142
|
+
*/
|
143
|
+
@property (nonatomic,copy,nullable) IDOSyncManager *_Nonnull(^mandatorySyncConfig)(BOOL isSync);
|
144
|
+
|
145
|
+
/**
|
146
|
+
* 初始化同步单例对象
|
147
|
+
* init sync manager
|
148
|
+
*/
|
149
|
+
IDOSyncManager * _Nonnull initSyncManager(void);
|
150
|
+
|
151
|
+
/**
|
152
|
+
开始同步 | Start sync
|
153
|
+
*/
|
154
|
+
+ (void)startSync;
|
155
|
+
|
156
|
+
/**
|
157
|
+
结束同步 | End sync
|
158
|
+
*/
|
159
|
+
+ (void)stopSync;
|
160
|
+
|
161
|
+
@end
|
@@ -0,0 +1,158 @@
|
|
1
|
+
//
|
2
|
+
// IDOSyncPressureDataModel.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 IDOSyncPressureItemInfoBluetoothModel : IDOBluetoothBaseModel
|
17
|
+
|
18
|
+
/**
|
19
|
+
日期 精确到日期 date interval since 1970 (如:1444361933) | Date time interval since 1970 (eg 14442361933)
|
20
|
+
*/
|
21
|
+
@property (nonatomic,copy) NSString * dateStr;
|
22
|
+
|
23
|
+
/**
|
24
|
+
子时间偏移量 (分钟) | Subtime offset (minutes)
|
25
|
+
*/
|
26
|
+
@property (nonatomic,assign) NSUInteger offset;
|
27
|
+
|
28
|
+
/**
|
29
|
+
压力值 | pressure value 0 ~ 255
|
30
|
+
*/
|
31
|
+
@property (nonatomic,assign) NSInteger pressureVal;
|
32
|
+
|
33
|
+
/**
|
34
|
+
序列号 | Serial number
|
35
|
+
*/
|
36
|
+
@property (nonatomic,assign) NSInteger serialNumber;
|
37
|
+
|
38
|
+
@end
|
39
|
+
|
40
|
+
@interface IDOSyncPressureDataInfoBluetoothModel : 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 (minutes)
|
64
|
+
*/
|
65
|
+
@property (nonatomic,assign) NSUInteger minuteOffset;
|
66
|
+
|
67
|
+
/**
|
68
|
+
压力数据包量 | Pressure data package
|
69
|
+
*/
|
70
|
+
@property (nonatomic,assign) NSInteger itemsCount;
|
71
|
+
|
72
|
+
/**
|
73
|
+
* @brief 压力集合 只有定义好的查询方法才能转成model集合,自定义的查询方法无法直接转成model集合,需要再查询itemModel赋给当前属性
|
74
|
+
* pressure 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 <IDOSyncPressureItemInfoBluetoothModel *>* pressures;
|
78
|
+
|
79
|
+
@end
|
80
|
+
|
81
|
+
@interface IDOSyncPressureDataModel : NSObject
|
82
|
+
/**
|
83
|
+
* @brief 查询当前设备某年12个月所有数据 (如果查询当月无数据,会创建空的数据对象,大于当月的数据不累加)
|
84
|
+
* 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,
|
85
|
+
* and the data larger than the current month will not be accumulated)
|
86
|
+
* @param year 年 (如 : 2018) | Year (eg: 2018)
|
87
|
+
* @param macAddr mac 地址 | mac address
|
88
|
+
* @param isQuery 是否查询items | is query items
|
89
|
+
* @return 一年12个月的压力数据集合,其中IDOSyncPressureDataInfoBluetoothModel对象是一天总血氧数据模型
|
90
|
+
* pressure data collection for 12 months a year, where the IDOSyncPressureDataInfoBluetoothModel object is the total pressure data model for the day
|
91
|
+
*/
|
92
|
+
+ (NSArray <NSArray<__kindof IDOSyncPressureDataInfoBluetoothModel *>*> *)queryOneYearPressureWithYear:(NSInteger)year
|
93
|
+
macAddr:(NSString *)macAddr
|
94
|
+
isQueryItems:(BOOL)isQuery;
|
95
|
+
|
96
|
+
/**
|
97
|
+
* @brief 查询当前设备某月份的所有数据 (如果查询当天无数据,会创建空的数据对象,大于当天的数据不累加)
|
98
|
+
* 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,
|
99
|
+
* which is larger than the data of the day)
|
100
|
+
* @param year 年 (如 : 2018) | Year (eg: 2018)
|
101
|
+
* @param month 月 (如 : 9) | Month (eg: 9)
|
102
|
+
* @param macAddr mac 地址 | mac address
|
103
|
+
* @param dates 当前查询月份的所有日期集合的指针 (格式 :[10/01...10/31])
|
104
|
+
* Pointer to all date collections for the current query month (format: [10/01...10/31])
|
105
|
+
* @param isQuery 是否查询items | is query items
|
106
|
+
* @return 一个月的压力数据集合,其中IDOSyncPressureDataInfoBluetoothModel对象是一天总压力数据模型
|
107
|
+
* A one-month pressure data collection, where the IDOSyncPressureDataInfoBluetoothModel object is the total pressure data model for the day
|
108
|
+
*/
|
109
|
+
+ (NSArray <__kindof IDOSyncPressureDataInfoBluetoothModel *>*)queryOneMonthPressureWithYear:(NSInteger)year
|
110
|
+
month:(NSInteger)month
|
111
|
+
macAddr:(NSString *)macAddr
|
112
|
+
datesOfMonth:(NSArray <NSString *>**)dates
|
113
|
+
isQueryItems:(BOOL)isQuery;
|
114
|
+
|
115
|
+
/**
|
116
|
+
* @brief 查询当前设备某周的所有数据 (如果查询当天无数据,会创建空的数据对象,大于当天的数据不累加)
|
117
|
+
* 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,
|
118
|
+
* and the data larger than the current day will not be accumulated)
|
119
|
+
* @param weekIndex 周的查询索引 (0 : 当周, 1 : 上一周, 2 : 上两周 ...) | Week's query index (0: week, 1 : last week, 2 : last two weeks...)
|
120
|
+
* @param weekStartDay 星期的开始日 (0 : 星期日, 1 : 星期一, 2 : 星期二 ...) | Start of the week (0: Sunday, 1 : Monday, 2 : Tuesday ...)
|
121
|
+
* @param macAddr mac 地址 | mac address
|
122
|
+
* @param dates 当前查询周的所有日期集合的指针 (格式 :[10/01...10/07])
|
123
|
+
* Pointer to all date collections for the current query week (format: [10/01...10/07])
|
124
|
+
* @param isQuery 是否查询items | is query items
|
125
|
+
* @return 一周的压力数据集合,其中IDOSyncPressureDataInfoBluetoothModel对象是一天总压力数据模型
|
126
|
+
* A week's pressure data collection, where the IDOSyncPressureDataInfoBluetoothModel object is the total pressure data model for the day
|
127
|
+
*/
|
128
|
+
+ (NSArray <__kindof IDOSyncPressureDataInfoBluetoothModel *>*)queryOneWeekPressureWithWeekIndex:(NSInteger)weekIndex
|
129
|
+
weekStartDay:(NSInteger)weekStartDay
|
130
|
+
macAddr:(NSString *)macAddr
|
131
|
+
datesOfWeek:(NSArray <NSString *>**)dates
|
132
|
+
isQueryItems:(BOOL)isQuery;
|
133
|
+
|
134
|
+
/**
|
135
|
+
* @brief 查询当前设备某天压力数据并有详情数据
|
136
|
+
* Query current pressure data of the current device and have detailed data
|
137
|
+
* @param macAddr mac 地址 | mac address
|
138
|
+
* @param year 年份 | year
|
139
|
+
* @param month 月份 | month
|
140
|
+
* @param day 日期 | day
|
141
|
+
* @return 一天压力数据的集合和详情数据集合 | Collection of day pressure data and details data
|
142
|
+
*/
|
143
|
+
+ (NSArray <__kindof IDOSyncPressureDataInfoBluetoothModel *>*)queryOneDayPressureDetailWithMac:(NSString *)macAddr
|
144
|
+
Year:(NSInteger)year
|
145
|
+
month:(NSInteger)month
|
146
|
+
day:(NSInteger)day;
|
147
|
+
|
148
|
+
/**
|
149
|
+
* @brief 查询所有压力数据,压力包个数大于0
|
150
|
+
* Query all pressure data The number of pressure packets is greater than 0
|
151
|
+
* @param macAddr mac地址 | mac address
|
152
|
+
* @return 所有压力数据的集合和详情数据(不包括当天数据)
|
153
|
+
* Collection of all pressure data and details data(Data for the day are not included)
|
154
|
+
*/
|
155
|
+
+ (NSArray <__kindof IDOSyncPressureDataInfoBluetoothModel *>*)queryAllPressuresWithMac:(NSString *)macAddr;
|
156
|
+
|
157
|
+
@end
|
158
|
+
|
@@ -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
|
+
|