@moshenguo/ms-data-sdk 0.1.5 → 0.1.7
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/build/sdk/bleConst.d.ts +212 -0
- package/build/sdk/bleSDK.d.ts +268 -225
- package/build/sdk/models.d.ts +78 -85
- package/build/sdk/resolveUtil.d.ts +311 -20
- package/dist/index.esm.js +1 -1
- package/dist/index.min.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/BleSDK.html +181 -190
- package/docs/classes/ResolveUtil.html +85 -15
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +2 -2
- package/docs/interfaces/MyAutomaticHRMonitoring.html +22 -22
- package/docs/interfaces/MyDeviceInfo.html +16 -6
- package/docs/interfaces/MyPersonalInfo.html +8 -2
- package/docs/interfaces/MySedentaryReminderV4.html +16 -16
- package/docs/interfaces/MyWeeksV4.html +14 -6
- package/docs/modules.html +1 -1
- package/docs/variables/BleConst.html +96 -1
- package/docs/variables/DeviceKey.html +113 -1
- package/package.json +1 -1
- package/build/sdk/constants.d.ts +0 -9
- package/docs/interfaces/MyAlarmClockV4.html +0 -9
package/build/sdk/bleSDK.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { MyPersonalInfo, MyDeviceInfo, MyAutomaticHRMonitoring, MySedentaryReminderV4 } from './models';
|
|
2
|
+
/**
|
|
3
|
+
* Convert data into firmware commands. Call the corresponding method to get the appropriate command, and send this command to the firmware.
|
|
4
|
+
* The `dataParsingWithData` method parses the firmware response into an object form.
|
|
5
|
+
*/
|
|
2
6
|
export declare class BleSDK {
|
|
3
7
|
static DATA_READ_START: number;
|
|
4
8
|
static DATA_READ_CONTINUE: number;
|
|
@@ -26,209 +30,231 @@ export declare class BleSDK {
|
|
|
26
30
|
private static crcDynamicValue;
|
|
27
31
|
private static getBcdValue;
|
|
28
32
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
* Data parsing method
|
|
34
|
+
* @param rawData The raw data returned from Bluetooth
|
|
35
|
+
* @returns The parsed data
|
|
36
|
+
*/
|
|
33
37
|
static dataParsingWithData(value: number[]): {
|
|
34
38
|
[key: string]: any;
|
|
35
39
|
};
|
|
36
40
|
/**
|
|
37
|
-
*
|
|
38
|
-
* @param ppgMode
|
|
41
|
+
* Blood Glucose
|
|
42
|
+
* @param ppgMode 1: start measurement
|
|
39
43
|
* @param ppgStatus
|
|
40
44
|
* @returns
|
|
41
45
|
*/
|
|
42
46
|
static bloodsugarWithMode(ppgMode: number, ppgStatus: number): number[];
|
|
43
47
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
*
|
|
49
|
+
* Get detailed sleep data
|
|
50
|
+
* @param {number} mode 0 - read the most recent detailed sleep data
|
|
51
|
+
* 2 - continue reading the next segment from the previous position
|
|
52
|
+
* 99 - delete sleep data
|
|
53
|
+
* @return {*} {number[]} detailed sleep data
|
|
54
|
+
*/
|
|
49
55
|
static getDetailSleepDataWithMode(mode: number): number[];
|
|
50
56
|
private static insertDateValue;
|
|
51
57
|
/**
|
|
52
58
|
*
|
|
53
|
-
|
|
54
|
-
* @param {number} mode 0
|
|
59
|
+
* Get HRV test data
|
|
60
|
+
* @param {number} mode 0 - read the most recent detailed data
|
|
61
|
+
* 2 - continue reading the next segment from the previous position
|
|
62
|
+
* 99 - delete data
|
|
55
63
|
* @param {string} time yyyy-MM-dd HH:mm:ss
|
|
56
|
-
|
|
64
|
+
* @return {*} {number[]} command packet, to be sent to the firmware
|
|
57
65
|
*/
|
|
58
66
|
static getHRVDataWithMode(mode: number, time: string): number[];
|
|
59
67
|
/**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
*
|
|
69
|
+
* PPI data
|
|
70
|
+
* @param {number} mode 99: Delete PPI data
|
|
71
|
+
* 0: Read the most recent PPI data
|
|
72
|
+
* 1: Read PPI data at a specified position
|
|
73
|
+
* 2: Continue reading the next segment from the last read position
|
|
74
|
+
* @return {*} {number[]} command packet, to be sent to the firmware
|
|
75
|
+
*/
|
|
65
76
|
static getPPIDDataWithMode(mode: number): number[];
|
|
66
77
|
/**
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
78
|
+
*
|
|
79
|
+
* HRV test data
|
|
80
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
81
|
+
*/
|
|
71
82
|
static getHrvTestTime(): number[];
|
|
72
83
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
84
|
+
*
|
|
85
|
+
* Set HRV test duration
|
|
86
|
+
* @param {number} time Duration of the HRV test
|
|
87
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
88
|
+
*/
|
|
78
89
|
static setHrvTestTime(time: number): number[];
|
|
79
90
|
/**
|
|
80
91
|
*
|
|
81
|
-
*
|
|
82
|
-
|
|
92
|
+
* Disconnect Bluetooth
|
|
93
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
83
94
|
*/
|
|
84
95
|
static closeBlueDevice(): number[];
|
|
85
96
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
97
|
+
*
|
|
98
|
+
* Start blood sugar measurement
|
|
99
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
100
|
+
*/
|
|
90
101
|
static startBloodSugar(): number[];
|
|
91
102
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
103
|
+
*
|
|
104
|
+
* Set blood sugar measurement progress
|
|
105
|
+
* @param {number} progress
|
|
106
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
107
|
+
*/
|
|
97
108
|
static progressBloodSugar(progress: number): number[];
|
|
98
109
|
/**
|
|
99
110
|
*
|
|
100
|
-
*
|
|
101
|
-
|
|
111
|
+
* Stop blood sugar measurement
|
|
112
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
102
113
|
*/
|
|
103
114
|
static endBloodSugar(): number[];
|
|
104
115
|
/**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
116
|
+
*
|
|
117
|
+
* Get total activity data for a specific day
|
|
118
|
+
* @param {number} mode Indicates reading from the latest position (up to 50 data sets),
|
|
119
|
+
* 2: continue reading from the last position (when total data > 50),
|
|
120
|
+
* 0x99: delete all activity data
|
|
121
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
122
|
+
*/
|
|
110
123
|
static getTotalActivityDataWithMode(mode: number): number[];
|
|
111
124
|
/**
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
125
|
+
*
|
|
126
|
+
* Get the latest total activity data for a specific date
|
|
127
|
+
* @param {number} mode 0 - read from the latest position (up to 50 data sets),
|
|
128
|
+
* 2 - continue reading from the last position (when total data > 50),
|
|
129
|
+
* 99 - delete all activity data
|
|
130
|
+
* @param {string} time Date string in format yyyy-MM-dd HH:mm:ss
|
|
131
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
132
|
+
*/
|
|
118
133
|
static getTotalActivityDataWithModeForTime(mode: number, time: string): number[];
|
|
119
134
|
/**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
135
|
+
*
|
|
136
|
+
* Get detailed sleep data
|
|
137
|
+
* @param {number} mode 0 - read the latest sleep data,
|
|
138
|
+
* 2 - continue from the last read position,
|
|
139
|
+
* 99 - delete sleep data
|
|
140
|
+
* @param {string} time Date string in format yyyy-MM-dd HH:mm:ss
|
|
141
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
142
|
+
*/
|
|
126
143
|
static getDetailSleepDataWithModeForTime(mode: number, time: string): number[];
|
|
127
144
|
/**
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
145
|
+
*
|
|
146
|
+
* Get detailed step data
|
|
147
|
+
* @param {number} mode 0 - read the latest detailed data,
|
|
148
|
+
* 2 - continue from the last read position,
|
|
149
|
+
* 99 - delete data
|
|
150
|
+
* @param {string} time Date string in format yyyy-MM-dd HH:mm:ss
|
|
151
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
152
|
+
*/
|
|
135
153
|
static getDetailActivityDataWithModeForTime(mode: number, time: string): number[];
|
|
136
154
|
/**
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
155
|
+
*
|
|
156
|
+
* Automatic temperature test data
|
|
157
|
+
* @param {number} mode 0 - read the latest detailed data,
|
|
158
|
+
* 2 - continue from the last read position,
|
|
159
|
+
* 99 - delete data
|
|
160
|
+
* @param {string} time Date string in format yyyy-MM-dd HH:mm:ss
|
|
161
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
162
|
+
*/
|
|
143
163
|
static getTemperature_historyDataWithMode(mode: number, time: string): number[];
|
|
144
164
|
/**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
165
|
+
*
|
|
166
|
+
* Manual temperature test data
|
|
167
|
+
* @param {number} mode 0 - read the latest detailed data,
|
|
168
|
+
* 2 - continue from the last read position,
|
|
169
|
+
* 99 - delete data
|
|
170
|
+
* @param {string} time Date string in format yyyy-MM-dd HH:mm:ss
|
|
171
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
172
|
+
*/
|
|
151
173
|
static getAxillaryTemperatureDataWithMode(mode: number, time: string): number[];
|
|
152
174
|
/**
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
175
|
+
*
|
|
176
|
+
* Activity mode control
|
|
177
|
+
* @param {number} activityMode Type of activity mode
|
|
178
|
+
* @param {number} workMode 1: Start, 2: Pause, 3: Continue, 4: Stop, 5: Query status
|
|
179
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
180
|
+
*/
|
|
159
181
|
static enterActivityMode(activityMode: number, WorkMode: number): number[];
|
|
160
182
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* @param {number} distance
|
|
164
|
-
* @param {number}
|
|
165
|
-
* @param {number} rssi
|
|
166
|
-
|
|
183
|
+
* Send heartbeat packet for activity mode (used with "EnterActivityMode")
|
|
184
|
+
* When the band enters multi-activity mode via the APP, the APP must send a data packet to the band every second, otherwise the band will exit multi-activity mode.
|
|
185
|
+
* @param {number} distance Distance in kilometers (floating point)
|
|
186
|
+
* @param {number} pace Pace, in minutes (MM) or seconds (SS)
|
|
187
|
+
* @param {number} rssi APP GPS signal strength. Possible values: 1, 2, 3
|
|
188
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
167
189
|
*/
|
|
168
190
|
static sendHeartPackage(distance: number, space: number, rssi: number): number[];
|
|
169
191
|
/**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
192
|
+
*
|
|
193
|
+
* Enable or disable real-time step counting mode
|
|
194
|
+
* @param {boolean} enable true: start real-time step counting, false: stop real-time step counting
|
|
195
|
+
* @param {boolean} tempEnable true: enable real-time temperature, false: disable real-time temperature
|
|
196
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
197
|
+
*/
|
|
176
198
|
static realTimeStep(enable: boolean, tempEnable: boolean): number[];
|
|
177
199
|
/**
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
200
|
+
*
|
|
201
|
+
* Stop real-time step counting
|
|
202
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
203
|
+
*/
|
|
182
204
|
static stopGo(): number[];
|
|
183
205
|
/**
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
206
|
+
* Set personal information
|
|
207
|
+
*
|
|
208
|
+
* @param {MyPersonalInfo} info
|
|
209
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
210
|
+
*/
|
|
189
211
|
static setPersonalInfo(info: MyPersonalInfo): number[];
|
|
190
212
|
/**
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
213
|
+
*
|
|
214
|
+
* Get personal information
|
|
215
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
216
|
+
*/
|
|
195
217
|
static getPersonalInfo(): number[];
|
|
196
|
-
static enterOTA(): number[];
|
|
197
218
|
/**
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
* @return {*} {number[]} 指令包,给固件发生指令
|
|
219
|
+
* Entering dfu mode
|
|
220
|
+
* @returns
|
|
201
221
|
*/
|
|
222
|
+
static enterOTA(): number[];
|
|
223
|
+
/**
|
|
224
|
+
*
|
|
225
|
+
* Get device firmware version
|
|
226
|
+
* @return {*} {number[]} Command packet to send to the device firmware
|
|
227
|
+
*/
|
|
202
228
|
static getDeviceVersion(): number[];
|
|
203
229
|
/**
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
230
|
+
*
|
|
231
|
+
* Restore factory settings
|
|
232
|
+
* @return {*} {number[]} Command packet to send to the device firmware
|
|
233
|
+
*/
|
|
208
234
|
static reset(): number[];
|
|
209
235
|
/**
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
236
|
+
*
|
|
237
|
+
* Get device MAC address
|
|
238
|
+
* @return {*} {number[]} Command packet to send to the device firmware
|
|
239
|
+
*/
|
|
214
240
|
static getDeviceMacAddress(): number[];
|
|
215
241
|
/**
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
242
|
+
*
|
|
243
|
+
* Get device battery level
|
|
244
|
+
* @return {*} {number[]} Command packet to send to the device firmware
|
|
245
|
+
*/
|
|
220
246
|
static getDeviceBatteryLevel(): number[];
|
|
221
247
|
/**
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
248
|
+
*
|
|
249
|
+
* Reboot the device
|
|
250
|
+
* @return {*} {number[]} Command packet to send to the device firmware
|
|
251
|
+
*/
|
|
226
252
|
static mcuReset(): number[];
|
|
227
253
|
/**
|
|
228
|
-
*
|
|
254
|
+
* Set the device name
|
|
229
255
|
*
|
|
230
|
-
* @param {string} deviceName
|
|
231
|
-
* @return {*}
|
|
256
|
+
* @param {string} deviceName Device name (up to 14 ASCII characters)
|
|
257
|
+
* @return {*} {number[]} Command packet (7 bytes)
|
|
232
258
|
*/
|
|
233
259
|
static setDeviceName(deviceName: string): number[];
|
|
234
260
|
/**
|
|
@@ -237,146 +263,163 @@ export declare class BleSDK {
|
|
|
237
263
|
*/
|
|
238
264
|
static getDeviceName(): number[];
|
|
239
265
|
/**
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
266
|
+
*
|
|
267
|
+
* Set the device time
|
|
268
|
+
* @param {Date} dateTime
|
|
269
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
270
|
+
*/
|
|
245
271
|
static setDeviceTime(dateTime: Date): number[];
|
|
246
272
|
/**
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
273
|
+
*
|
|
274
|
+
* Get the device time
|
|
275
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
276
|
+
*/
|
|
251
277
|
static getDeviceTime(): number[];
|
|
252
278
|
/**
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
279
|
+
*
|
|
280
|
+
* Set device information
|
|
281
|
+
* @param {MyDeviceInfo} deviceBaseParameter
|
|
282
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
283
|
+
*/
|
|
258
284
|
static setDeviceInfo(deviceBaseParameter: MyDeviceInfo): number[];
|
|
259
285
|
/**
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
286
|
+
* Health measurement control
|
|
287
|
+
*
|
|
288
|
+
* @param {number} dataType Measurement type: 0x01 - HRV, 0x02 - Heart rate, 0x03 - Blood oxygen
|
|
289
|
+
* @param {boolean} open 1 to start measurement, 0 to stop measurement
|
|
290
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
291
|
+
*/
|
|
266
292
|
static healthMeasurementWithDataType(dataType: number, open: boolean): number[];
|
|
267
293
|
/**
|
|
268
294
|
*
|
|
269
|
-
*
|
|
270
|
-
* @param {number} mode
|
|
271
|
-
* @return {*}
|
|
295
|
+
* Set the wristband dial mode
|
|
296
|
+
* @param {number} mode Dial mode (0, 1, 2... as defined by the device)
|
|
297
|
+
* @return {*} {number[]} Command packet (7 bytes)
|
|
272
298
|
*/
|
|
273
299
|
static setBraceletdial(mode: number): number[];
|
|
274
300
|
/**
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
301
|
+
*
|
|
302
|
+
* Read the automatic measurement time periods
|
|
303
|
+
* @param {number} type 1: Read heart rate time settings, 2: Read SpO2 time settings, 4: Read HRV time periods
|
|
304
|
+
* @return {*} {number[]} Command packet to send to the device
|
|
305
|
+
*/
|
|
280
306
|
static setAutomaticHRMonitoring(autoHeart: MyAutomaticHRMonitoring): number[];
|
|
281
307
|
/**
|
|
282
308
|
*
|
|
283
|
-
*
|
|
284
|
-
* @param {number} type 1
|
|
285
|
-
|
|
309
|
+
* Read automatic heart rate measurement periods
|
|
310
|
+
* @param {number} type 1: Read heart rate time settings, 2: Read SpO2 time settings, 4: Read HRV time period settings
|
|
311
|
+
* @return {*} {number[]} Command packet to send to the device
|
|
286
312
|
*/
|
|
287
313
|
static getAutomaticHRMonitoring(type: number): number[];
|
|
288
314
|
/**
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
315
|
+
*
|
|
316
|
+
* Get multi-sport mode data
|
|
317
|
+
* @param {number} mode 0: Start reading from the latest position (up to 50 records)
|
|
318
|
+
* 2: Continue reading from the previous position (when total records exceed 50)
|
|
319
|
+
* 0x99: Delete all GPS data
|
|
320
|
+
* @return {*} {number[]} Command packet to send to the device
|
|
321
|
+
*/
|
|
294
322
|
static getActivityModeDataWithMode(mode: number): number[];
|
|
295
323
|
/**
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
324
|
+
*
|
|
325
|
+
* Get single heart rate data (interval heart rate measurement)
|
|
326
|
+
* @param {number} mode 0: Read the most recent data
|
|
327
|
+
* 2: Continue reading from the previous position
|
|
328
|
+
* 99: Delete data
|
|
329
|
+
* @param {string} time Date and time in format yyyy-MM-dd HH:mm:ss
|
|
330
|
+
* @return {*} {number[]} Command packet to send to the device
|
|
331
|
+
*/
|
|
302
332
|
static getStaticHRWithMode(mode: number, time: string): number[];
|
|
303
333
|
/**
|
|
304
334
|
*
|
|
305
|
-
*
|
|
306
|
-
* @param {number} mode 0
|
|
307
|
-
*
|
|
308
|
-
|
|
335
|
+
* Get heart rate data
|
|
336
|
+
* @param {number} mode 0: Read the most recent data
|
|
337
|
+
* 2: Continue reading from the previous position
|
|
338
|
+
* 99: Delete data
|
|
339
|
+
* @param {string} time Date and time in format yyyy-MM-dd HH:mm:ss
|
|
340
|
+
* @return {*} {number[]} Command packet to send to the device
|
|
309
341
|
*/
|
|
310
342
|
static getDynamicHRWithMode(mode: number, time: string): number[];
|
|
311
343
|
/**
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
344
|
+
*
|
|
345
|
+
* Get blood oxygen (SpO2) data
|
|
346
|
+
* @param {number} mode 0: Read the most recent data
|
|
347
|
+
* 2: Continue reading from the previous position
|
|
348
|
+
* 99: Delete data
|
|
349
|
+
* @param {string} time Date and time in format yyyy-MM-dd HH:mm:ss
|
|
350
|
+
* @return {*} {number[]} Command packet to send to the device
|
|
351
|
+
*/
|
|
318
352
|
static getBloodOxygen(mode: number, time: string): number[];
|
|
319
353
|
/**
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
354
|
+
*
|
|
355
|
+
* Get blood oxygen (SpO2) data (automatic measurement)
|
|
356
|
+
* @param {number} mode 0: Read the most recent data
|
|
357
|
+
* 2: Continue reading from the previous position
|
|
358
|
+
* 99: Delete data
|
|
359
|
+
* @param {string} time Date and time in format yyyy-MM-dd HH:mm:ss
|
|
360
|
+
* @return {*} {number[]} Command packet to send to the device
|
|
361
|
+
*/
|
|
326
362
|
static getAutoBloodOxygen(mode: number, time: string): number[];
|
|
327
363
|
/**
|
|
328
|
-
*
|
|
329
|
-
* @param stepGoal
|
|
330
|
-
* @param targetExecutionTime
|
|
331
|
-
* @param distance
|
|
332
|
-
* @param calorie
|
|
333
|
-
* @param sleepTime
|
|
334
|
-
* @returns number[]
|
|
364
|
+
* Set step goal command
|
|
365
|
+
* @param stepGoal Step goal (int, 4 bytes, Big-Endian)
|
|
366
|
+
* @param targetExecutionTime Target completion time (minutes) (int, 2 bytes)
|
|
367
|
+
* @param distance Distance goal (kilometers) (int, 2 bytes)
|
|
368
|
+
* @param calorie Calorie goal (int, 2 bytes)
|
|
369
|
+
* @param sleepTime Sleep time goal (minutes) (int, 2 bytes)
|
|
370
|
+
* @returns number[] Command byte array (16 bytes, including CRC)
|
|
335
371
|
*/
|
|
336
372
|
static setStepGoal(stepGoal: number, targetExecutionTime: number, distance: number, calorie: number, sleepTime: number): number[];
|
|
337
373
|
/**
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
374
|
+
*
|
|
375
|
+
* Read step goal
|
|
376
|
+
* @return {*} {number[]} Command byte array to send to the device
|
|
377
|
+
*/
|
|
342
378
|
static GetStepGoal(): number[];
|
|
343
379
|
/**
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
380
|
+
* Get basic parameters of the wristband (device information)
|
|
381
|
+
* @returns Uint8Array Command packet (7 bytes) for sending via BLE
|
|
382
|
+
*/
|
|
347
383
|
static getDeviceInfo(): number[];
|
|
348
384
|
static sendHex(data: number[], isCrc: boolean): number[];
|
|
349
385
|
/**
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
386
|
+
*
|
|
387
|
+
* Get alarm clocks
|
|
388
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
389
|
+
*/
|
|
354
390
|
static getAlarmClock(): number[];
|
|
355
391
|
/**
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
392
|
+
*
|
|
393
|
+
* Delete all alarms
|
|
394
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
395
|
+
*/
|
|
360
396
|
static deleteAllAlarmClock(): number[];
|
|
361
397
|
/**
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
398
|
+
*
|
|
399
|
+
* Set all alarms
|
|
400
|
+
* @param {any[]} arrayClockAlarm Array of alarm configurations. Each element is an object with the following properties:
|
|
401
|
+
* - openOrClose: boolean, whether the alarm is enabled
|
|
402
|
+
* - clockType: number, type of alarm (1: standard alarm, 2: medication reminder, 3: water reminder)
|
|
403
|
+
* - clockTime: string, alarm time in HH:mm format
|
|
404
|
+
* - week: array or bitmask, indicates which weekdays the alarm is active
|
|
405
|
+
* - textLength: number, length of the display text
|
|
406
|
+
* - text: string, text to display for the alarm
|
|
407
|
+
* @return {*} {number[][]} Command packets to send to the firmware
|
|
408
|
+
*/
|
|
367
409
|
static setAlarmClock(arrayClockAlarm: any[]): number[][];
|
|
368
410
|
/**
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
411
|
+
*
|
|
412
|
+
* Get sedentary reminder settings
|
|
413
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
414
|
+
*/
|
|
373
415
|
static getSedentaryReminder(): number[];
|
|
374
416
|
/**
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
417
|
+
*
|
|
418
|
+
* Set sedentary reminder
|
|
419
|
+
*
|
|
420
|
+
* @param {MySedentaryReminderV4} reminder
|
|
421
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
422
|
+
*/
|
|
380
423
|
static setSedentaryReminder(reminder: MySedentaryReminderV4): number[];
|
|
381
424
|
}
|
|
382
425
|
export default BleSDK;
|