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,263 @@
|
|
1
|
+
//
|
2
|
+
// IDOCalculateBluetoothModel.h
|
3
|
+
// IDOBluetooth
|
4
|
+
//
|
5
|
+
// Created by 何东阳 on 2018/10/16.
|
6
|
+
// Copyright © 2018年 apple. 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 "IDOSyncSpo2DataModel.h"
|
14
|
+
#import "IDOSyncBpDataModel.h"
|
15
|
+
#import "IDOSyncHeartRateDataModel.h"
|
16
|
+
#import "IDOSyncSleepDataModel.h"
|
17
|
+
#import "IDOSyncSportDataModel.h"
|
18
|
+
#endif
|
19
|
+
|
20
|
+
struct ido_blood_pressure_data
|
21
|
+
{
|
22
|
+
uint32_t sysBlood;
|
23
|
+
uint32_t diasBlood;
|
24
|
+
};
|
25
|
+
|
26
|
+
@interface IDOCalculateBluetoothModel : NSObject
|
27
|
+
|
28
|
+
@end
|
29
|
+
|
30
|
+
@interface IDOCalculateBloodOxygenBluetoothModel : NSObject
|
31
|
+
/**
|
32
|
+
平均血氧 | Average blood oxygen
|
33
|
+
*/
|
34
|
+
@property (nonatomic,assign) NSInteger avgBloodOxygen;
|
35
|
+
|
36
|
+
/**
|
37
|
+
最大血氧 | Maximum blood oxygen
|
38
|
+
*/
|
39
|
+
@property (nonatomic,assign) NSInteger maxBloodOxygen;
|
40
|
+
|
41
|
+
/**
|
42
|
+
最小血氧 | Most blood oxygen
|
43
|
+
*/
|
44
|
+
@property (nonatomic,assign) NSInteger minBloodOxygen;
|
45
|
+
|
46
|
+
/**
|
47
|
+
计算一天血氧平均值 | Calculate the average blood oxygen per day
|
48
|
+
*/
|
49
|
+
+ (__kindof IDOCalculateBloodOxygenBluetoothModel *)calculateOneDayBoDataWithHrModel:(__kindof IDOSyncBloodOxygenDataInfoBluetoothModel *)model;
|
50
|
+
/**
|
51
|
+
计算一周、一月血氧平均值 | Calculate the blood oxygen average for one week and one month
|
52
|
+
*/
|
53
|
+
+ (__kindof IDOCalculateBloodOxygenBluetoothModel *)calculateOneMonthOrWeekBoDataWithHrModels:(NSArray <__kindof IDOSyncBloodOxygenDataInfoBluetoothModel *>*)models;
|
54
|
+
/**
|
55
|
+
计算一年血氧平均值 | Calculate the annual blood oxygen average
|
56
|
+
*/
|
57
|
+
+ (__kindof IDOCalculateBloodOxygenBluetoothModel *)calculateOneYearBoDataWithHrModels:(NSArray <NSArray<__kindof IDOSyncBloodOxygenDataInfoBluetoothModel *>*> *)models;
|
58
|
+
|
59
|
+
@end
|
60
|
+
|
61
|
+
@interface IDOCalculateBpBluetoothModel : NSObject
|
62
|
+
|
63
|
+
/**
|
64
|
+
记录血压日期时间戳 | Record blood pressure date time stamp
|
65
|
+
*/
|
66
|
+
@property (nonatomic,copy) NSString * dateStr;
|
67
|
+
|
68
|
+
/**
|
69
|
+
最大血压值 struct | Maximum blood pressure value
|
70
|
+
*/
|
71
|
+
@property (nonatomic,assign) struct ido_blood_pressure_data maxBp;
|
72
|
+
|
73
|
+
/**
|
74
|
+
最小血压值 struct | Minimum blood pressure value
|
75
|
+
*/
|
76
|
+
@property (nonatomic,assign) struct ido_blood_pressure_data minBp;
|
77
|
+
|
78
|
+
/**
|
79
|
+
平均血压值 struct | Average blood pressure value
|
80
|
+
*/
|
81
|
+
@property (nonatomic,assign) struct ido_blood_pressure_data avgBp;
|
82
|
+
|
83
|
+
/**
|
84
|
+
最新血压值 struct | Latest blood pressure value
|
85
|
+
*/
|
86
|
+
@property (nonatomic,assign) struct ido_blood_pressure_data lastBp;
|
87
|
+
|
88
|
+
/**
|
89
|
+
计算一天血压平均值 | Calculate the average blood pressure per day
|
90
|
+
*/
|
91
|
+
+ (__kindof IDOCalculateBpBluetoothModel *)calculateOneDayBpDataWithBpModel:(__kindof IDOSyncBpDataInfoBluetoothModel *)model;
|
92
|
+
|
93
|
+
/**
|
94
|
+
计算一周、一月血压平均值 | Calculate the average blood pressure for one week and one month
|
95
|
+
*/
|
96
|
+
+ (__kindof IDOCalculateBpBluetoothModel *)calculateOneMonthOrWeekBpDataWithBpModels:(NSArray <__kindof IDOSyncBpDataInfoBluetoothModel *>*)models
|
97
|
+
allDayCalculateBpModels:(NSArray <__kindof IDOCalculateBpBluetoothModel *> **)calculateBpModels;
|
98
|
+
|
99
|
+
@end
|
100
|
+
|
101
|
+
|
102
|
+
@interface IDOCalculateHrBluetoothModel : NSObject
|
103
|
+
|
104
|
+
/**
|
105
|
+
平均心率 | Average heart rate
|
106
|
+
*/
|
107
|
+
@property (nonatomic,assign) NSInteger avgHr;
|
108
|
+
|
109
|
+
/**
|
110
|
+
最大心率 | Maximum heart rate
|
111
|
+
*/
|
112
|
+
@property (nonatomic,assign) NSInteger maxHr;
|
113
|
+
|
114
|
+
/**
|
115
|
+
最小心率 | Most careful rate
|
116
|
+
*/
|
117
|
+
@property (nonatomic,assign) NSInteger minHr;
|
118
|
+
|
119
|
+
/**
|
120
|
+
脂肪燃烧时长 (单位 :分钟) | Fat burning Duration (unit: minute)
|
121
|
+
*/
|
122
|
+
@property (nonatomic,assign) NSUInteger burnFatMins;
|
123
|
+
|
124
|
+
/**
|
125
|
+
肌肉锻炼时长 [有氧运动] (单位 :分钟) | Muscle training Duration (unit: minute)
|
126
|
+
*/
|
127
|
+
@property (nonatomic,assign) NSUInteger aerobicMins;
|
128
|
+
|
129
|
+
/**
|
130
|
+
极限运动时长 (单位 :分钟) | Extreme Sports Duration (unit: minutes)
|
131
|
+
*/
|
132
|
+
@property (nonatomic,assign) NSUInteger limitMins;
|
133
|
+
|
134
|
+
/**
|
135
|
+
热身运动时长 (单位 :分钟) | Warm up Duration (unit: minutes)
|
136
|
+
*/
|
137
|
+
@property (nonatomic,assign) NSUInteger warmUpMins;
|
138
|
+
|
139
|
+
/**
|
140
|
+
无氧运动时长 (单位 :分钟) | Anaerobic Duration (unit: minutes)
|
141
|
+
*/
|
142
|
+
@property (nonatomic,assign) NSUInteger anaerobicMins;
|
143
|
+
|
144
|
+
/**
|
145
|
+
* 计算一天心率平均值 | Calculate the average heart rate per day
|
146
|
+
* 只能传入 IDOSyncHrDataInfoBluetoothModel 和 IDOSyncSecHrDataInfoBluetoothModel 对象
|
147
|
+
* Only IDOSyncHrDataInfoBluetoothModel and IDOSyncSecHrDataInfoBluetoothModel object
|
148
|
+
*/
|
149
|
+
+ (__kindof IDOCalculateHrBluetoothModel *)calculateOneDayHrDataWithHrModel:(__kindof IDOBluetoothBaseModel *)model;
|
150
|
+
/**
|
151
|
+
* 计算一周、一月心率平均值 | Calculate the heart rate average for one week and one month
|
152
|
+
* 只能传入 IDOSyncHrDataInfoBluetoothModel 和 IDOSyncSecHrDataInfoBluetoothModel 对象
|
153
|
+
* Only IDOSyncHrDataInfoBluetoothModel and IDOSyncSecHrDataInfoBluetoothModel object
|
154
|
+
*/
|
155
|
+
+ (__kindof IDOCalculateHrBluetoothModel *)calculateOneMonthOrWeekHrDataWithHrModels:(NSArray <__kindof IDOBluetoothBaseModel *>*)models;
|
156
|
+
/**
|
157
|
+
* 计算一年心率平均值 | Calculate the annual heart rate average
|
158
|
+
* 只能传入 IDOSyncHrDataInfoBluetoothModel 和 IDOSyncSecHrDataInfoBluetoothModel 对象
|
159
|
+
* Only IDOSyncHrDataInfoBluetoothModel and IDOSyncSecHrDataInfoBluetoothModel object
|
160
|
+
*/
|
161
|
+
+ (__kindof IDOCalculateHrBluetoothModel *)calculateOneYearHrDataWithHrModels:(NSArray <NSArray<__kindof IDOBluetoothBaseModel *>*> *)models;
|
162
|
+
|
163
|
+
@end
|
164
|
+
|
165
|
+
@interface IDOCalculateSleepBluetoothModel : NSObject
|
166
|
+
|
167
|
+
/**
|
168
|
+
平均一天睡眠时长 (单位 :分钟) | Average one-day sleep duration (in minutes)
|
169
|
+
*/
|
170
|
+
@property (nonatomic,assign) NSInteger avgSleep;
|
171
|
+
|
172
|
+
/**
|
173
|
+
平均一天深睡眠时长 (单位 :分钟) | Average one-day deep sleep duration (unit: minute)
|
174
|
+
*/
|
175
|
+
@property (nonatomic,assign) NSInteger avgDeepSleep;
|
176
|
+
|
177
|
+
/**
|
178
|
+
平均一天浅睡眠时长 (单位 :分钟) | Average day light sleep duration (unit: minute)
|
179
|
+
*/
|
180
|
+
@property (nonatomic,assign) NSInteger avgLightSleep;
|
181
|
+
|
182
|
+
/**
|
183
|
+
平均一天醒来时长 (单位 :分钟) | Average wake-up time of one day (unit: minute)
|
184
|
+
*/
|
185
|
+
@property (nonatomic,assign) NSInteger avgWakeSleep;
|
186
|
+
|
187
|
+
/**
|
188
|
+
平均入睡时间点 (格式 :00:00) | Average sleep time (format: 00:00)
|
189
|
+
*/
|
190
|
+
@property (nonatomic,copy) NSString * sleepTime;
|
191
|
+
|
192
|
+
/**
|
193
|
+
平均醒来时间点(格式 :00:00) | Average wake-up time (format: 00:00)
|
194
|
+
*/
|
195
|
+
@property (nonatomic,copy) NSString * wakeTime;
|
196
|
+
|
197
|
+
/**
|
198
|
+
计算一天睡眠平均值 | Calculate the average daily sleep
|
199
|
+
*/
|
200
|
+
+ (__kindof IDOCalculateSleepBluetoothModel *)calculateOneDaySleepDataWithSleepModel:(__kindof IDOSyncSleepDataInfoBluetoothModel *)model;
|
201
|
+
|
202
|
+
/**
|
203
|
+
计算-周、一月睡眠平均值 | Calculation - Week, January sleep average
|
204
|
+
*/
|
205
|
+
+ (__kindof IDOCalculateSleepBluetoothModel *)calculateOneMonthOrWeekSleepDataWithSleepModels:(NSArray <__kindof IDOSyncSleepDataInfoBluetoothModel *>*)models;
|
206
|
+
|
207
|
+
/**
|
208
|
+
计算一年睡眠平均值 | Calculate the average sleep value for one year
|
209
|
+
*/
|
210
|
+
+ (__kindof IDOCalculateSleepBluetoothModel *)calculateOneYearSleepDataWithSleepModels:(NSArray <NSArray<__kindof IDOSyncSleepDataInfoBluetoothModel *>*> *)models;
|
211
|
+
|
212
|
+
@end
|
213
|
+
|
214
|
+
@interface IDOCalculateSportBluetoothModel : NSObject
|
215
|
+
|
216
|
+
/**
|
217
|
+
总运动里程(单位 :米) | Total mileage (in meters)
|
218
|
+
*/
|
219
|
+
@property (nonatomic,assign) NSInteger totalMileage;
|
220
|
+
|
221
|
+
/**
|
222
|
+
总步数 (单位 :步数) | Total steps (unit: steps)
|
223
|
+
*/
|
224
|
+
@property (nonatomic,assign) NSInteger totalStep;
|
225
|
+
|
226
|
+
/**
|
227
|
+
总卡路里 (单位 :大卡) | Total calories (unit: big card)
|
228
|
+
*/
|
229
|
+
@property (nonatomic,assign) NSInteger totalCalories;
|
230
|
+
|
231
|
+
/**
|
232
|
+
平均里程(单位 :米) | Average mileage (in meters)
|
233
|
+
*/
|
234
|
+
@property (nonatomic,assign) NSInteger avgMileage;
|
235
|
+
|
236
|
+
/**
|
237
|
+
平均步数(单位 :步数) | Average steps (unit: steps)
|
238
|
+
*/
|
239
|
+
@property (nonatomic,assign) NSInteger avgStep;
|
240
|
+
|
241
|
+
/**
|
242
|
+
平均卡路里(单位 :大卡) | Average calories (unit: big card)
|
243
|
+
*/
|
244
|
+
@property (nonatomic,assign) NSInteger avgCalories;
|
245
|
+
|
246
|
+
/**
|
247
|
+
计算一天步数平均值 | Calculate the average number of steps per day
|
248
|
+
*/
|
249
|
+
+ (__kindof IDOCalculateSportBluetoothModel *)calculateOneDaySportDataWithSportModel:(__kindof IDOSyncSportDataInfoBluetoothModel *)model;
|
250
|
+
|
251
|
+
/**
|
252
|
+
计算-周、一月步数平均值 | Calculation - Week, January Step Average
|
253
|
+
*/
|
254
|
+
+ (__kindof IDOCalculateSportBluetoothModel *)calculateOneMonthOrWeekSportDataWithSportModels:(NSArray <__kindof IDOSyncSportDataInfoBluetoothModel *>*)models;
|
255
|
+
|
256
|
+
/**
|
257
|
+
计算一年步数平均值 | Calculate the average number of steps in a year
|
258
|
+
*/
|
259
|
+
+ (__kindof IDOCalculateSportBluetoothModel *)calculateOneYearSportDataWithSportModels:(NSArray <NSArray<__kindof IDOSyncSportDataInfoBluetoothModel *>*> *)models;
|
260
|
+
|
261
|
+
@end
|
262
|
+
|
263
|
+
|
@@ -0,0 +1,89 @@
|
|
1
|
+
//
|
2
|
+
// IDOCommonMacro.h
|
3
|
+
// IDOBluetoothInternal
|
4
|
+
//
|
5
|
+
// Created by 何东阳 on 2019/7/8.
|
6
|
+
// Copyright © 2019 何东阳. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#ifndef IDOCommonMacro_h
|
10
|
+
#define IDOCommonMacro_h
|
11
|
+
|
12
|
+
#if __has_include(<IDOBluetoothInternal/IDOBluetoothInternal.h>)
|
13
|
+
#elif __has_include(<IDOBlueProtocol/IDOBlueProtocol.h>)
|
14
|
+
#else
|
15
|
+
#import "IDOBluetoothEngine.h"
|
16
|
+
#endif
|
17
|
+
|
18
|
+
/**
|
19
|
+
IDO 当前手环蓝牙引擎 | IDO current bracelet Bluetooth engine
|
20
|
+
*/
|
21
|
+
#define IDO_BLUE_ENGINE [IDOBluetoothEngine shareInstance]
|
22
|
+
|
23
|
+
/**
|
24
|
+
IDO 当前手环蓝牙功能列表 | IDO Current Bracelet Bluetooth Feature List
|
25
|
+
*/
|
26
|
+
#define __IDO_FUNCTABLE__ IDO_BLUE_ENGINE.managerEngine.funcTableModel
|
27
|
+
|
28
|
+
/**
|
29
|
+
IDO 当前蓝牙系统管理对象 | IDO Current Bluetooth System Management Object
|
30
|
+
*/
|
31
|
+
#define __IDO_MANAGER__ IDO_BLUE_ENGINE.managerEngine.centralManager
|
32
|
+
|
33
|
+
/**
|
34
|
+
IDO 当前外围设备对象 | IDO Current Peripheral Object
|
35
|
+
*/
|
36
|
+
#define __IDO_PERIPHERAL__ IDO_BLUE_ENGINE.managerEngine.peripheral
|
37
|
+
|
38
|
+
/**
|
39
|
+
IDO 当前外围设备是否连接 | IDO Current Peripheral is connected
|
40
|
+
*/
|
41
|
+
#define __IDO_CONNECTED__ IDO_BLUE_ENGINE.managerEngine.connected
|
42
|
+
|
43
|
+
/**
|
44
|
+
IDO 当前外围设备是否连接中 | IDO Current Peripheral is connecting
|
45
|
+
*/
|
46
|
+
#define __IDO_CONNECTING__ IDO_BLUE_ENGINE.managerEngine.connecting
|
47
|
+
|
48
|
+
/**
|
49
|
+
IDO 当前蓝牙管理中心是否开启 | IDO Current blue manager is powered on
|
50
|
+
*/
|
51
|
+
#define __IDO_POWERED_ON__ IDO_BLUE_ENGINE.managerEngine.poweredOn
|
52
|
+
|
53
|
+
/**
|
54
|
+
IDO 当前手环UUID | IDO Current Bracelet UUID
|
55
|
+
*/
|
56
|
+
#define __IDO_UUID__ IDO_BLUE_ENGINE.peripheralEngine.uuidStr
|
57
|
+
|
58
|
+
/**
|
59
|
+
IDO 当前手环MAC | IDO Current Bracelet MAC
|
60
|
+
*/
|
61
|
+
#define __IDO_MAC_ADDR__ IDO_BLUE_ENGINE.peripheralEngine.macAddr
|
62
|
+
|
63
|
+
/**
|
64
|
+
IDO 当前手环绑定状态 | IDO Current Bracelet Binding Status
|
65
|
+
*/
|
66
|
+
#define __IDO_BIND__ IDO_BLUE_ENGINE.peripheralEngine.isBind
|
67
|
+
|
68
|
+
/**
|
69
|
+
IDO 当前手环配对中状态 | IDO Current Bracelet pairing Status
|
70
|
+
*/
|
71
|
+
#define __IDO_PAIRING__ IDO_BLUE_ENGINE.peripheralEngine.isPairing
|
72
|
+
|
73
|
+
/**
|
74
|
+
IDO 用户ID | IDO User ID
|
75
|
+
*/
|
76
|
+
#define __IDO_USER_ID__ IDO_BLUE_ENGINE.userEngine.userId
|
77
|
+
|
78
|
+
/**
|
79
|
+
IDO 当前手环ota状态 | IDO current bracelet ota status
|
80
|
+
*/
|
81
|
+
#define __IDO_OTA__ IDO_BLUE_ENGINE.peripheralEngine.isOta
|
82
|
+
|
83
|
+
/**
|
84
|
+
IDO 当前手环名字 | IDO Current Bracelet Name
|
85
|
+
*/
|
86
|
+
#define __IDO_NAME__ IDO_BLUE_ENGINE.peripheralEngine.deviceName
|
87
|
+
|
88
|
+
|
89
|
+
#endif /* IDOCommonMacro_h */
|
@@ -0,0 +1,128 @@
|
|
1
|
+
//
|
2
|
+
// IDODataExchangeModel.h
|
3
|
+
// IDOBluetooth
|
4
|
+
//
|
5
|
+
// Created by apple on 2018/10/5.
|
6
|
+
// Copyright © 2018年 apple. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#if __has_include(<IDOBluetoothInternal/IDOBluetoothInternal.h>)
|
10
|
+
#elif __has_include(<IDOBlueProtocol/IDOBlueProtocol.h>)
|
11
|
+
#else
|
12
|
+
#import "IDOBluetoothBaseModel.h"
|
13
|
+
#endif
|
14
|
+
|
15
|
+
@interface IDODataExchangeModel : IDOBluetoothBaseModel
|
16
|
+
/**
|
17
|
+
日 | day
|
18
|
+
*/
|
19
|
+
@property (nonatomic,assign) NSInteger day;
|
20
|
+
/**
|
21
|
+
时 | hour
|
22
|
+
*/
|
23
|
+
@property (nonatomic,assign) NSInteger hour;
|
24
|
+
/**
|
25
|
+
分 | minute
|
26
|
+
*/
|
27
|
+
@property (nonatomic,assign) NSInteger minute;
|
28
|
+
/**
|
29
|
+
秒 | second
|
30
|
+
*/
|
31
|
+
@property (nonatomic,assign) NSInteger second;
|
32
|
+
/**
|
33
|
+
运动类型 | sport type
|
34
|
+
* 0:无,1:走路,2:跑步,3:骑行,4:徒步,5:游泳,6:爬山,7:羽毛球,8:其他,
|
35
|
+
* 9:健身,10:动感单车,11:椭圆机,12:跑步机,13:仰卧起坐,14:俯卧撑,15:哑铃,16:举重,
|
36
|
+
* 17:健身操,18:瑜伽,19:跳绳,20:乒乓球,21:篮球,22:足球 ,23:排球,24:网球,
|
37
|
+
* 25:高尔夫球,26:棒球,27:滑雪,28:轮滑,29:跳舞,48:户外跑步,49:室内跑步,50:户外骑行,51:室内骑行,
|
38
|
+
* 52:户外走路,53:室内走路,54:泳池游泳,55:开放水域游泳,56:椭圆机,57:划船机,58:高强度间歇训练法
|
39
|
+
* 0: none, 1: walk, 2: run, 3: ride, 4: hike, 5: swim, 6: climb, 7: badminton, 8: others,
|
40
|
+
* 9: fitness, 10: spinning, 11: elliptical, 12: treadmill, 13: sit-ups, 14: push-ups, 15: dumbbells, 16: weightlifting,
|
41
|
+
* 17: aerobics, 18: yoga, 19: jump rope, 20: table tennis, 21: basketball, 22: football, 23: volleyball, 24: tennis,
|
42
|
+
* 25: golf, 26: baseball, 27: skiing, 28: roller skating, 29: dancing,48: outdoor running, 49: indoor running, 50: outdoor cycling, 51: indoor cycling,
|
43
|
+
* 52: outdoor walking, 53: indoor walking, 54: pool swimming, 55: open water swimming, 56: elliptical machine, 57: rowing machine, 58: high-intensity interval training
|
44
|
+
*/
|
45
|
+
@property (nonatomic,assign) NSInteger sportType;
|
46
|
+
/**
|
47
|
+
目标类型 | target type
|
48
|
+
*/
|
49
|
+
@property (nonatomic,assign) NSInteger targetType;
|
50
|
+
/**
|
51
|
+
目标数值 | target value
|
52
|
+
*/
|
53
|
+
@property (nonatomic,assign) NSInteger targetValue;
|
54
|
+
/**
|
55
|
+
是否强制开始 | is mandatory start
|
56
|
+
*/
|
57
|
+
@property (nonatomic,assign) NSInteger forceStart;
|
58
|
+
/**
|
59
|
+
* 0:成功; 1:设备已经进入运动模式失败;2: 设备电量低失败;3:手环正在充电
|
60
|
+
* 0:success 1:into sport mode failed 2:Low power of equipment 3: the bracelet is charging
|
61
|
+
*/
|
62
|
+
@property (nonatomic,assign) NSInteger retCode;
|
63
|
+
/**
|
64
|
+
status:0:全部有效, 1:距离无效, 2: gps 信号弱 | status 0:all effective 1:distance invalid 2:gps signal weak
|
65
|
+
*/
|
66
|
+
@property (nonatomic,assign) NSInteger status;
|
67
|
+
/**
|
68
|
+
0:成功; 1:设备已经进入运动模式失败 | 0:success 1:into sport mode failed
|
69
|
+
*/
|
70
|
+
@property (nonatomic,assign) NSInteger errorCode;
|
71
|
+
/**
|
72
|
+
步数 (单位:步) | step
|
73
|
+
*/
|
74
|
+
@property (nonatomic,assign) NSInteger step;
|
75
|
+
/**
|
76
|
+
卡路里 (单位:J) | calories
|
77
|
+
*/
|
78
|
+
@property (nonatomic,assign) NSInteger calories;
|
79
|
+
/**
|
80
|
+
距离 (单位:米) | distance
|
81
|
+
*/
|
82
|
+
@property (nonatomic,assign) NSInteger distance;
|
83
|
+
/**
|
84
|
+
持续时间 (单位:分钟) | durations
|
85
|
+
*/
|
86
|
+
@property (nonatomic,assign) NSInteger durations;
|
87
|
+
/**
|
88
|
+
是否存储 | is save
|
89
|
+
*/
|
90
|
+
@property (nonatomic,assign) BOOL isSave;
|
91
|
+
/**
|
92
|
+
平均心率 | avg heart rate
|
93
|
+
*/
|
94
|
+
@property (nonatomic,assign) NSInteger avgHrValue;
|
95
|
+
/**
|
96
|
+
最大心率 | max heart rate
|
97
|
+
*/
|
98
|
+
@property (nonatomic,assign) NSInteger maxHrValue;
|
99
|
+
/**
|
100
|
+
脂肪燃烧时长 (分钟) | burn fat mins (mins)
|
101
|
+
*/
|
102
|
+
@property (nonatomic,assign) NSInteger burnFatMins;
|
103
|
+
/**
|
104
|
+
心肺锻炼时长(分钟) | cardiopulmonary exercise mins
|
105
|
+
*/
|
106
|
+
@property (nonatomic,assign) NSInteger aerobicMins;
|
107
|
+
/**
|
108
|
+
极限锻炼时长(分钟) | limit exercise mins
|
109
|
+
*/
|
110
|
+
@property (nonatomic,assign) NSInteger limitMins;
|
111
|
+
/**
|
112
|
+
当前心率 | current heart rate
|
113
|
+
*/
|
114
|
+
@property (nonatomic,assign) NSInteger curHrValue;
|
115
|
+
/**
|
116
|
+
心率间隔 | heart rate interval
|
117
|
+
*/
|
118
|
+
@property (nonatomic,assign) NSInteger intervalSecond;
|
119
|
+
/**
|
120
|
+
序列号 | heart rate value serial
|
121
|
+
*/
|
122
|
+
@property (nonatomic,assign) NSInteger hrValueSerial;
|
123
|
+
/**
|
124
|
+
心率数据 | heart rate data
|
125
|
+
*/
|
126
|
+
@property (nonatomic,copy) NSArray<NSNumber *> * hrValues;
|
127
|
+
|
128
|
+
@end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
//
|
2
|
+
// IDODataMigrationManager.h
|
3
|
+
// IDOBluetooth
|
4
|
+
//
|
5
|
+
// Created by 何东阳 on 2018/12/7.
|
6
|
+
// Copyright © 2018年 apple. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
|
11
|
+
@interface IDODataMigrationManager : NSObject
|
12
|
+
|
13
|
+
/**
|
14
|
+
* 删除本地数据迁移状态(用于本地数据库表删除数据使用) | Delete local data migration state (used for local database table deletion data)
|
15
|
+
*/
|
16
|
+
+ (BOOL)deleteDataMigrationState;
|
17
|
+
|
18
|
+
/**
|
19
|
+
* 是否需要数据迁移,只有需要迁移才会有下面迁移的启动和回调,新的项目不需要执行数据迁移,注意的问题数据迁移是在异步操作,⚠️在数据量大时比较耗时,尽量在执行完数据迁移再去执行其他工作.
|
20
|
+
* Whether data migration is required, only the migration and the callback of the following migration are required.
|
21
|
+
* New projects do not need to perform data migration, pay attention to the problem data migration is in asynchronous operation,
|
22
|
+
* ⚠️ It is time consuming when the amount of data is large, try to perform other tasks after performing data migration.
|
23
|
+
*/
|
24
|
+
+ (BOOL)isNeedMigration;
|
25
|
+
|
26
|
+
/**
|
27
|
+
* 判断当前是否在迁移数据
|
28
|
+
* Determine if data is currently being migrated.
|
29
|
+
*/
|
30
|
+
+ (BOOL)isMigrationRun;
|
31
|
+
|
32
|
+
/**
|
33
|
+
* 启动数据迁移
|
34
|
+
* Start data migration
|
35
|
+
*/
|
36
|
+
+ (void)dataMigrationStart;
|
37
|
+
|
38
|
+
/**
|
39
|
+
* 数据迁移进度 (0-1)
|
40
|
+
* progress (0-1)
|
41
|
+
*/
|
42
|
+
+ (void)dataMigrationProgressBlock:(void(^_Nullable)(float progress))callback;
|
43
|
+
|
44
|
+
/**
|
45
|
+
* 数据迁移完成 direNames 传入不能删除的目录名字集合,在Documents中其他的目录会在迁移完数据全部删除,
|
46
|
+
* ⚠️如果不传入目录集合,除了sdk新创建的目录不删除之外其他都会删除,所以根据开发需求自行传入目录名字集合
|
47
|
+
* Data migration is completed direNames is passed to the collection of directory names that cannot be deleted. In the other directories in Documents,
|
48
|
+
* all the data will be deleted after the migration.⚠️if you do not pass the directory collection, except for the newly created directory of sdk,
|
49
|
+
* it will be deleted,so you will pass the directory name collection according to the development requirements.
|
50
|
+
*/
|
51
|
+
+ (void)dataMigrationWithFileNames:(NSArray *_Nullable)names
|
52
|
+
completeBlock:(void(^_Nullable)(BOOL isSuccess))callback;
|
53
|
+
|
54
|
+
|
55
|
+
/**
|
56
|
+
* 启动数据库转换json文件 ⚠️ 在数据量大时比较耗时,尽量在执行完数据迁移再去执行其他工作.
|
57
|
+
* 1、若传入json文件路径存在,先把json文件数据同步到数据库中,然后合并的数据库再转成json文件;
|
58
|
+
* 2、若传入json文件路径为空,只把本地数据库转成json文件,并返回json文件压缩路径;
|
59
|
+
* 3、jsonDirePath 是从云端下载的健康json文件目录路径;
|
60
|
+
* start the database to convert the json file ⚠️ it is time consuming when the amount of data is large,try to perform other tasks after performing the data migration.
|
61
|
+
* 1. If the path to the json file exists, synchronize the json file data to the database, and then merge the database into a json file.
|
62
|
+
* 2. If the path to the json file is empty, only convert the local database to a json file and return the path to the json file zip.
|
63
|
+
* 3. jsonDirePath is the path to the healthy json file directory downloaded from the cloud.
|
64
|
+
*/
|
65
|
+
+ (void)dataToJsonFileStart:(NSString *_Nullable)jsonZipPath;
|
66
|
+
|
67
|
+
/**
|
68
|
+
数据转换json文件进度 (0-1) | Data conversion json file progress (0-1)
|
69
|
+
*/
|
70
|
+
+ (void)dataToJsonFileProgressBlock:(void(^_Nullable)(float progress))callback;
|
71
|
+
|
72
|
+
/**
|
73
|
+
数据转换json文件完成
|
74
|
+
zipPath 本地数据库转换json文件压缩路径
|
75
|
+
Data conversion json file completed newDirePath local database conversion json file zip path
|
76
|
+
*/
|
77
|
+
+ (void)dataToJsonFileCompleteBlock:(void(^_Nullable)(BOOL isSuccess,NSString * _Nullable zipPath))callback;
|
78
|
+
|
79
|
+
@end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
//
|
2
|
+
// IDOErrorCodeToStr.h
|
3
|
+
// VeryfitSDK
|
4
|
+
//
|
5
|
+
// Created by hedongyang on 2018/8/30.
|
6
|
+
// Copyright © 2018年 hedongyang. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <Foundation/Foundation.h>
|
10
|
+
|
11
|
+
@interface IDOErrorCodeToStr : NSObject
|
12
|
+
|
13
|
+
/**
|
14
|
+
* @brief 错误码转字符串 | Error code to string
|
15
|
+
* @param errorCode 错误码 | Error code
|
16
|
+
* @return 字符串 | string
|
17
|
+
*/
|
18
|
+
+ (NSString *)errorCodeToStr:(NSInteger)errorCode;
|
19
|
+
@end
|