@moshenguo/ms-data-sdk 0.1.6 → 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 +205 -205
- package/build/sdk/bleSDK.d.ts +266 -226
- package/build/sdk/models.d.ts +58 -85
- package/build/sdk/resolveUtil.d.ts +133 -57
- package/dist/index.esm.js +1 -1
- package/dist/index.min.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/BleSDK.html +181 -191
- package/docs/classes/ResolveUtil.html +81 -53
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +2 -2
- package/docs/interfaces/MyAutomaticHRMonitoring.html +22 -22
- package/docs/interfaces/MyDeviceInfo.html +12 -12
- package/docs/interfaces/MyPersonalInfo.html +8 -8
- package/docs/interfaces/MySedentaryReminderV4.html +16 -16
- package/docs/interfaces/MyWeeksV4.html +10 -10
- package/docs/modules.html +1 -1
- package/docs/variables/BleConst.html +94 -94
- package/docs/variables/DeviceKey.html +113 -113
- package/package.json +1 -1
- package/build/sdk/constants.d.ts +0 -9
package/build/sdk/bleSDK.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MyPersonalInfo, MyDeviceInfo, MyAutomaticHRMonitoring, MySedentaryReminderV4 } from './models';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
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.
|
|
4
5
|
*/
|
|
5
6
|
export declare class BleSDK {
|
|
6
7
|
static DATA_READ_START: number;
|
|
@@ -29,209 +30,231 @@ export declare class BleSDK {
|
|
|
29
30
|
private static crcDynamicValue;
|
|
30
31
|
private static getBcdValue;
|
|
31
32
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
* Data parsing method
|
|
34
|
+
* @param rawData The raw data returned from Bluetooth
|
|
35
|
+
* @returns The parsed data
|
|
36
|
+
*/
|
|
36
37
|
static dataParsingWithData(value: number[]): {
|
|
37
38
|
[key: string]: any;
|
|
38
39
|
};
|
|
39
40
|
/**
|
|
40
|
-
*
|
|
41
|
-
* @param ppgMode
|
|
41
|
+
* Blood Glucose
|
|
42
|
+
* @param ppgMode 1: start measurement
|
|
42
43
|
* @param ppgStatus
|
|
43
44
|
* @returns
|
|
44
45
|
*/
|
|
45
46
|
static bloodsugarWithMode(ppgMode: number, ppgStatus: number): number[];
|
|
46
47
|
/**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
+
*/
|
|
52
55
|
static getDetailSleepDataWithMode(mode: number): number[];
|
|
53
56
|
private static insertDateValue;
|
|
54
57
|
/**
|
|
55
58
|
*
|
|
56
|
-
|
|
57
|
-
* @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
|
|
58
63
|
* @param {string} time yyyy-MM-dd HH:mm:ss
|
|
59
|
-
|
|
64
|
+
* @return {*} {number[]} command packet, to be sent to the firmware
|
|
60
65
|
*/
|
|
61
66
|
static getHRVDataWithMode(mode: number, time: string): number[];
|
|
62
67
|
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
+
*/
|
|
68
76
|
static getPPIDDataWithMode(mode: number): number[];
|
|
69
77
|
/**
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
78
|
+
*
|
|
79
|
+
* HRV test data
|
|
80
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
81
|
+
*/
|
|
74
82
|
static getHrvTestTime(): number[];
|
|
75
83
|
/**
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
+
*/
|
|
81
89
|
static setHrvTestTime(time: number): number[];
|
|
82
90
|
/**
|
|
83
91
|
*
|
|
84
|
-
*
|
|
85
|
-
|
|
92
|
+
* Disconnect Bluetooth
|
|
93
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
86
94
|
*/
|
|
87
95
|
static closeBlueDevice(): number[];
|
|
88
96
|
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
*
|
|
98
|
+
* Start blood sugar measurement
|
|
99
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
100
|
+
*/
|
|
93
101
|
static startBloodSugar(): number[];
|
|
94
102
|
/**
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
103
|
+
*
|
|
104
|
+
* Set blood sugar measurement progress
|
|
105
|
+
* @param {number} progress
|
|
106
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
107
|
+
*/
|
|
100
108
|
static progressBloodSugar(progress: number): number[];
|
|
101
109
|
/**
|
|
102
110
|
*
|
|
103
|
-
*
|
|
104
|
-
|
|
111
|
+
* Stop blood sugar measurement
|
|
112
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
105
113
|
*/
|
|
106
114
|
static endBloodSugar(): number[];
|
|
107
115
|
/**
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
+
*/
|
|
113
123
|
static getTotalActivityDataWithMode(mode: number): number[];
|
|
114
124
|
/**
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
|
+
*/
|
|
121
133
|
static getTotalActivityDataWithModeForTime(mode: number, time: string): number[];
|
|
122
134
|
/**
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
+
*/
|
|
129
143
|
static getDetailSleepDataWithModeForTime(mode: number, time: string): number[];
|
|
130
144
|
/**
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
+
*/
|
|
138
153
|
static getDetailActivityDataWithModeForTime(mode: number, time: string): number[];
|
|
139
154
|
/**
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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
|
+
*/
|
|
146
163
|
static getTemperature_historyDataWithMode(mode: number, time: string): number[];
|
|
147
164
|
/**
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
+
*/
|
|
154
173
|
static getAxillaryTemperatureDataWithMode(mode: number, time: string): number[];
|
|
155
174
|
/**
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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
|
+
*/
|
|
162
181
|
static enterActivityMode(activityMode: number, WorkMode: number): number[];
|
|
163
182
|
/**
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
* @param {number} distance
|
|
167
|
-
* @param {number}
|
|
168
|
-
* @param {number} rssi
|
|
169
|
-
|
|
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
|
|
170
189
|
*/
|
|
171
190
|
static sendHeartPackage(distance: number, space: number, rssi: number): number[];
|
|
172
191
|
/**
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
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
|
+
*/
|
|
179
198
|
static realTimeStep(enable: boolean, tempEnable: boolean): number[];
|
|
180
199
|
/**
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
200
|
+
*
|
|
201
|
+
* Stop real-time step counting
|
|
202
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
203
|
+
*/
|
|
185
204
|
static stopGo(): number[];
|
|
186
205
|
/**
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
206
|
+
* Set personal information
|
|
207
|
+
*
|
|
208
|
+
* @param {MyPersonalInfo} info
|
|
209
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
210
|
+
*/
|
|
192
211
|
static setPersonalInfo(info: MyPersonalInfo): number[];
|
|
193
212
|
/**
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
213
|
+
*
|
|
214
|
+
* Get personal information
|
|
215
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
216
|
+
*/
|
|
198
217
|
static getPersonalInfo(): number[];
|
|
199
|
-
static enterOTA(): number[];
|
|
200
218
|
/**
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* @return {*} {number[]} 指令包,给固件发生指令
|
|
219
|
+
* Entering dfu mode
|
|
220
|
+
* @returns
|
|
204
221
|
*/
|
|
222
|
+
static enterOTA(): number[];
|
|
223
|
+
/**
|
|
224
|
+
*
|
|
225
|
+
* Get device firmware version
|
|
226
|
+
* @return {*} {number[]} Command packet to send to the device firmware
|
|
227
|
+
*/
|
|
205
228
|
static getDeviceVersion(): number[];
|
|
206
229
|
/**
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
230
|
+
*
|
|
231
|
+
* Restore factory settings
|
|
232
|
+
* @return {*} {number[]} Command packet to send to the device firmware
|
|
233
|
+
*/
|
|
211
234
|
static reset(): number[];
|
|
212
235
|
/**
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
236
|
+
*
|
|
237
|
+
* Get device MAC address
|
|
238
|
+
* @return {*} {number[]} Command packet to send to the device firmware
|
|
239
|
+
*/
|
|
217
240
|
static getDeviceMacAddress(): number[];
|
|
218
241
|
/**
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
242
|
+
*
|
|
243
|
+
* Get device battery level
|
|
244
|
+
* @return {*} {number[]} Command packet to send to the device firmware
|
|
245
|
+
*/
|
|
223
246
|
static getDeviceBatteryLevel(): number[];
|
|
224
247
|
/**
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
248
|
+
*
|
|
249
|
+
* Reboot the device
|
|
250
|
+
* @return {*} {number[]} Command packet to send to the device firmware
|
|
251
|
+
*/
|
|
229
252
|
static mcuReset(): number[];
|
|
230
253
|
/**
|
|
231
|
-
*
|
|
254
|
+
* Set the device name
|
|
232
255
|
*
|
|
233
|
-
* @param {string} deviceName
|
|
234
|
-
* @return {*}
|
|
256
|
+
* @param {string} deviceName Device name (up to 14 ASCII characters)
|
|
257
|
+
* @return {*} {number[]} Command packet (7 bytes)
|
|
235
258
|
*/
|
|
236
259
|
static setDeviceName(deviceName: string): number[];
|
|
237
260
|
/**
|
|
@@ -240,146 +263,163 @@ export declare class BleSDK {
|
|
|
240
263
|
*/
|
|
241
264
|
static getDeviceName(): number[];
|
|
242
265
|
/**
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
266
|
+
*
|
|
267
|
+
* Set the device time
|
|
268
|
+
* @param {Date} dateTime
|
|
269
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
270
|
+
*/
|
|
248
271
|
static setDeviceTime(dateTime: Date): number[];
|
|
249
272
|
/**
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
273
|
+
*
|
|
274
|
+
* Get the device time
|
|
275
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
276
|
+
*/
|
|
254
277
|
static getDeviceTime(): number[];
|
|
255
278
|
/**
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
279
|
+
*
|
|
280
|
+
* Set device information
|
|
281
|
+
* @param {MyDeviceInfo} deviceBaseParameter
|
|
282
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
283
|
+
*/
|
|
261
284
|
static setDeviceInfo(deviceBaseParameter: MyDeviceInfo): number[];
|
|
262
285
|
/**
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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
|
+
*/
|
|
269
292
|
static healthMeasurementWithDataType(dataType: number, open: boolean): number[];
|
|
270
293
|
/**
|
|
271
294
|
*
|
|
272
|
-
*
|
|
273
|
-
* @param {number} mode
|
|
274
|
-
* @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)
|
|
275
298
|
*/
|
|
276
299
|
static setBraceletdial(mode: number): number[];
|
|
277
300
|
/**
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
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
|
+
*/
|
|
283
306
|
static setAutomaticHRMonitoring(autoHeart: MyAutomaticHRMonitoring): number[];
|
|
284
307
|
/**
|
|
285
308
|
*
|
|
286
|
-
*
|
|
287
|
-
* @param {number} type 1
|
|
288
|
-
|
|
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
|
|
289
312
|
*/
|
|
290
313
|
static getAutomaticHRMonitoring(type: number): number[];
|
|
291
314
|
/**
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
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
|
+
*/
|
|
297
322
|
static getActivityModeDataWithMode(mode: number): number[];
|
|
298
323
|
/**
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
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
|
+
*/
|
|
305
332
|
static getStaticHRWithMode(mode: number, time: string): number[];
|
|
306
333
|
/**
|
|
307
334
|
*
|
|
308
|
-
*
|
|
309
|
-
* @param {number} mode 0
|
|
310
|
-
*
|
|
311
|
-
|
|
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
|
|
312
341
|
*/
|
|
313
342
|
static getDynamicHRWithMode(mode: number, time: string): number[];
|
|
314
343
|
/**
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
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
|
+
*/
|
|
321
352
|
static getBloodOxygen(mode: number, time: string): number[];
|
|
322
353
|
/**
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
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
|
+
*/
|
|
329
362
|
static getAutoBloodOxygen(mode: number, time: string): number[];
|
|
330
363
|
/**
|
|
331
|
-
*
|
|
332
|
-
* @param stepGoal
|
|
333
|
-
* @param targetExecutionTime
|
|
334
|
-
* @param distance
|
|
335
|
-
* @param calorie
|
|
336
|
-
* @param sleepTime
|
|
337
|
-
* @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)
|
|
338
371
|
*/
|
|
339
372
|
static setStepGoal(stepGoal: number, targetExecutionTime: number, distance: number, calorie: number, sleepTime: number): number[];
|
|
340
373
|
/**
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
374
|
+
*
|
|
375
|
+
* Read step goal
|
|
376
|
+
* @return {*} {number[]} Command byte array to send to the device
|
|
377
|
+
*/
|
|
345
378
|
static GetStepGoal(): number[];
|
|
346
379
|
/**
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
380
|
+
* Get basic parameters of the wristband (device information)
|
|
381
|
+
* @returns Uint8Array Command packet (7 bytes) for sending via BLE
|
|
382
|
+
*/
|
|
350
383
|
static getDeviceInfo(): number[];
|
|
351
384
|
static sendHex(data: number[], isCrc: boolean): number[];
|
|
352
385
|
/**
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
386
|
+
*
|
|
387
|
+
* Get alarm clocks
|
|
388
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
389
|
+
*/
|
|
357
390
|
static getAlarmClock(): number[];
|
|
358
391
|
/**
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
392
|
+
*
|
|
393
|
+
* Delete all alarms
|
|
394
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
395
|
+
*/
|
|
363
396
|
static deleteAllAlarmClock(): number[];
|
|
364
397
|
/**
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
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
|
+
*/
|
|
370
409
|
static setAlarmClock(arrayClockAlarm: any[]): number[][];
|
|
371
410
|
/**
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
411
|
+
*
|
|
412
|
+
* Get sedentary reminder settings
|
|
413
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
414
|
+
*/
|
|
376
415
|
static getSedentaryReminder(): number[];
|
|
377
416
|
/**
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
417
|
+
*
|
|
418
|
+
* Set sedentary reminder
|
|
419
|
+
*
|
|
420
|
+
* @param {MySedentaryReminderV4} reminder
|
|
421
|
+
* @return {*} {number[]} Command packet to send to the firmware
|
|
422
|
+
*/
|
|
383
423
|
static setSedentaryReminder(reminder: MySedentaryReminderV4): number[];
|
|
384
424
|
}
|
|
385
425
|
export default BleSDK;
|