@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.
@@ -1,6 +1,7 @@
1
1
  import { MyPersonalInfo, MyDeviceInfo, MyAutomaticHRMonitoring, MySedentaryReminderV4 } from './models';
2
2
  /**
3
- * 数据转成固件指令,调用对应方法返回对应指令,发送这个指令给固件;dataParsingWithData方法固件解析成对象形式返回
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
- * @param 蓝牙返回原始数据
34
- * @returns 解析后的数据
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
- * @param {number} mode 0-读最近的睡眠详细数据 2-继续上次读的位置下一段数据 99-删除睡眠数据
50
- * @return {*} {number[]} detailed sleep data
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
- *获得HRV测试数据
57
- * @param {number} mode 0-读最近的详细数据 2-继续上次读的位置下一段数据 99-删除数据
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
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * ppi数据
65
- * @param {number} mode
66
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * hrv测试数据
72
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * 设置Hrv测试时长
78
- * @param {number} time
79
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {number} progress
98
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {number} mode 表⽰是从最新的位置开始读取(最多50组数据) 2:表⽰接着读取(当数据总数⼤于50的时候) 0x99:表⽰删除所有运动数据
111
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {number} mode 0-表⽰是从最新的位置开始读取(最多50组数据) 2-表⽰接着读取(当数据总数⼤于50的时候) 99-表⽰删除所有运动数据
118
- * @param {string} time yyyy-MM-dd HH:mm:ss
119
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {number} mode 0-读最近的睡眠详细数据 2-继续上次读的位置下一段数据 99-删除睡眠数据
126
- * @param {string} time yyyy-MM-dd HH:mm:ss
127
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {number} mode 0-读最近的详细数据 2-继续上次读的位置下一段数据 99-删除数据
135
- * @param {string} time yyyy-MM-dd HH:mm:ss
136
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {number} mode 0-读最近的详细数据 2-继续上次读的位置下一段数据 99-删除数据
143
- * @param {string} time yyyy-MM-dd HH:mm:ss
144
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {number} mode 0-读最近的详细数据 2-继续上次读的位置下一段数据 99-删除数据
151
- * @param {string} time yyyy-MM-dd HH:mm:ss
152
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {number} activityMode 运动模式类型
159
- * @param {number} WorkMode 1:开始 2:暂停, 3:继续, 4结束。5 查询状态
160
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * 发送运动模式心跳包(配合"EnterActivityMode"使用)
165
- * 当手环是通过APP进入多运动模式后,APP必须每隔1秒发送一个数据给手环,否则手环会退出多运动模式
166
- * @param {number} distance 距离,浮点数。单位是KM。
167
- * @param {number} space 配速度,MM:分钟,SS秒钟
168
- * @param {number} rssi APPGPS信号强度。范围是:123
169
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {boolean} enable 1:启动实时计步,0:关闭实时计步
176
- * @param {boolean} tempEnable 1:开启实时温度 0:关闭实时温度
177
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {MyPersonalInfo} info
190
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * 获取设备mac地址
215
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @return {*} {number[]} 指令包,给固件发生指令
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 设备名称(最多14ASCII字符)
234
- * @return {*} {number[]} 指令包(7字节)
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
- * @param {Date} dateTime
246
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @return {*} {number[]}
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
- * @param {MyDeviceInfo} deviceBaseParameter
259
- * @return {*} {number[]}
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
- * @param {number} dataType 测试类型 0x01,HRV 0x02,心率测量 0x03,血氧测量
266
- * @param {boolean} open 1开启测量 0 关闭测量
267
- * @return {*} {number[]} 指令包,给固件发生指令
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 表盘模式(0, 1, 2... 根据设备定义)
274
- * @return {*} {number[]} 指令包(7字节)
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
- * @param {MyAutomaticHRMonitoring} autoHeart
281
- * @return {*} {number[]} 指令包,给固件发生指令
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、读取心率设置时间 2、读取设置血氧时间 4、读取HRV设置时间段
288
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {number} mode 0:表⽰是从最新的位置开始读取(最多50组数据) 2:表⽰接着读取(当数据总数⼤于50的时候) 0x99:表⽰删除所有GPS数据
295
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {number} mode 0-读最近的详细数据 2-继续上次读的位置下一段数据 99-删除数据
302
- * @param {string} time yyyy-MM-dd HH:mm:ss
303
- * @return {*} {number[]} 指令包,给固件发生指令
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-读最近的详细数据 2-继续上次读的位置下一段数据 99-删除数据
310
- * @param {string} time yyyy-MM-dd HH:mm:ss
311
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {number} mode 0-读最近的详细数据 2-继续上次读的位置下一段数据 99-删除数据
318
- * @param {string} time yyyy-MM-dd HH:mm:ss
319
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {number} mode 0-读最近的详细数据 2-继续上次读的位置下一段数据 99-删除数据
326
- * @param {string} time yyyy-MM-dd HH:mm:ss
327
- * @return {*} {number[]}
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 步数目标 (int, 4 bytes, Big-Endian)
333
- * @param targetExecutionTime 目标完成时间(分钟)(int, 2 bytes)
334
- * @param distance 距离目标(千米)(int, 2 bytes)
335
- * @param calorie 卡路里目标 (int, 2 bytes)
336
- * @param sleepTime 睡眠时间目标(分钟)(int, 2 bytes)
337
- * @returns number[] 指令字节数组(16字节,含CRC
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
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @returns Uint8Array 指令包(7字节),用于发送 BLE 请求
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
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {any[]} arrayClockAlarm
368
- * @return {*} {number[][]}
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
- * @return {*} {number[]} 指令包,给固件发生指令
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
- * @param {MySedentaryReminderV4} reminder
381
- * @return {*} {number[]} 指令包,给固件发生指令
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;