@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,152 +1,125 @@
1
1
  /**
2
- * 周信息
2
+ * Week information
3
3
  */
4
4
  export interface MyWeeksV4 {
5
- /** 是否周日启用 */
5
+ /** Whether Sunday is enabled */
6
6
  sunday: boolean;
7
- /** 是否周一启用 */
7
+ /** Whether Monday is enabled */
8
8
  monday: boolean;
9
- /** 是否周二启用 */
9
+ /** Whether Tuesday is enabled */
10
10
  tuesday: boolean;
11
- /** 是否周三启用 */
11
+ /** Whether Wednesday is enabled */
12
12
  wednesday: boolean;
13
- /** 是否周四启用 */
13
+ /** Whether Thursday is enabled */
14
14
  thursday: boolean;
15
- /** 是否周五启用 */
15
+ /** Whether Friday is enabled */
16
16
  friday: boolean;
17
- /** 是否周六启用 */
17
+ /** Whether Saturday is enabled */
18
18
  saturday: boolean;
19
19
  }
20
20
  /**
21
- * 个人信息
21
+ * Personal information
22
22
  */
23
23
  export interface MyPersonalInfo {
24
- /** 性别,0 = 女,1 = */
24
+ /** Gender, 0 = female, 1 = male */
25
25
  sex: number;
26
- /** 年龄,单位岁 */
26
+ /** Age in years */
27
27
  age: number;
28
- /** 身高,单位厘米 */
28
+ /** Height in centimeters */
29
29
  height: number;
30
- /** 体重,单位公斤 */
30
+ /** Weight in kilograms */
31
31
  weight: number;
32
- /** 步长,可选,单位厘米 */
32
+ /** Step length (optional), in centimeters */
33
33
  stepLength?: number;
34
34
  }
35
35
  /**
36
- * 设备详情
36
+ * Device details
37
37
  */
38
38
  export interface MyDeviceInfo {
39
- /** 距离单位,true = 公里,false = 英里 */
39
+ /** Distance unit, true = kilometers, false = miles */
40
40
  distanceUnit: boolean;
41
- /** 是否使用 12 小时制,true = 12 小时制,false = 24 小时制 */
41
+ /** Whether using 12-hour format, true = 12-hour, false = 24-hour */
42
42
  is12Hour: boolean;
43
- /** 举手亮屏开关,true = 开启,false = 关闭 */
43
+ /** Hand-up screen light switch, true = on, false = off */
44
44
  handUpLightScreenSwitch: boolean;
45
- /** 温度单位,true = 华氏度,false = 摄氏度 */
45
+ /** Temperature unit, true = Fahrenheit, false = Celsius */
46
46
  fahrenheit: boolean;
47
- /** 夜间模式,true = 开启,false = 关闭 */
47
+ /** Night mode, true = on, false = off */
48
48
  nightMode: boolean;
49
- /** 基础心率 */
49
+ /** Base heart rate */
50
50
  baseHeart: number;
51
- /** 屏幕亮度 (0-100) */
51
+ /** Screen brightness (0-100) */
52
52
  screenBrightness: number;
53
- /** 表盘索引 */
53
+ /** Dial index */
54
54
  indexDial: number;
55
- /** 语言设置,例如 0 = 中文,1 = 英文 */
55
+ /** Language setting, e.g., 0 = Chinese, 1 = English */
56
56
  languages: number;
57
57
  }
58
58
  /**
59
- * 自动心率监测配置
59
+ * Automatic heart rate monitoring configuration
60
60
  *
61
- * 用于定义用户在一周内自动心率监测的时间段、周期和类型。
61
+ * Defines the time periods, cycles, and types for automatic heart rate monitoring in a week.
62
62
  */
63
63
  export interface MyAutomaticHRMonitoring {
64
64
  /**
65
- * 是否开启监测
66
- * - 0 = 关闭
67
- * - 1 = 开启
65
+ * Whether monitoring is enabled
66
+ * - 0 = off
67
+ * - 1 = on
68
68
  */
69
69
  open: number;
70
- /**
71
- * 开始监测的小时数(0-23)
72
- */
70
+ /** Start hour of monitoring (0-23) */
73
71
  startHour: number;
74
- /**
75
- * 开始监测的分钟数(0-59)
76
- */
72
+ /** Start minute of monitoring (0-59) */
77
73
  startMinute: number;
78
- /**
79
- * 结束监测的小时数(0-23)
80
- */
74
+ /** End hour of monitoring (0-23) */
81
75
  endHour: number;
82
- /**
83
- * 结束监测的分钟数(0-59)
84
- */
76
+ /** End minute of monitoring (0-59) */
85
77
  endMinute: number;
86
78
  /**
87
- * 星期设置(按位表示)
88
- * - 1 = 周一
89
- * - 2 = 周二
90
- * - 4 = 周三
91
- * - 8 = 周四
92
- * - 16 = 周五
93
- * - 32 = 周六
94
- * - 64 = 周日
79
+ * Week configuration (bitmask)
80
+ * - 1 = Monday
81
+ * - 2 = Tuesday
82
+ * - 4 = Wednesday
83
+ * - 8 = Thursday
84
+ * - 16 = Friday
85
+ * - 32 = Saturday
86
+ * - 64 = Sunday
95
87
  *
96
- * 可组合,例如:`1 + 2 + 4 = 7` 表示周一到周三
88
+ * Can be combined, e.g., `1 + 2 + 4 = 7` means Monday to Wednesday
97
89
  */
98
90
  week: number;
99
- /**
100
- * 采样时间间隔(秒)
101
- */
91
+ /** Sampling interval in seconds */
102
92
  time: number;
103
- /**
104
- * 1、设置心率 2、设置血氧 4、设置HRV
105
- */
93
+ /** 1 = heart rate, 2 = SpO2, 4 = HRV */
106
94
  type: number;
107
95
  }
108
96
  /**
109
- * 久坐提醒配置(V4
97
+ * Sedentary reminder configuration (V4)
110
98
  *
111
- * 用于定义用户在一天内的久坐提醒时间段、周期和规则。
99
+ * Defines the time periods, cycles, and rules for sedentary reminders in a day.
112
100
  */
113
101
  export interface MySedentaryReminderV4 {
114
- /**
115
- * 开始提醒的小时数(0–23)
116
- */
102
+ /** Start hour of reminder (0–23) */
117
103
  startTime_Hour: number;
118
- /**
119
- * 开始提醒的分钟数(0–59)
120
- */
104
+ /** Start minute of reminder (0–59) */
121
105
  startTime_Minutes: number;
122
- /**
123
- * 结束提醒的小时数(0–23)
124
- */
106
+ /** End hour of reminder (0–23) */
125
107
  endTime_Hour: number;
126
- /**
127
- * 结束提醒的分钟数(0–59)
128
- */
108
+ /** End minute of reminder (0–59) */
129
109
  endTime_Minutes: number;
130
- /**
131
- * 一周中的提醒天数配置
132
- *
133
- */
110
+ /** Weekdays configuration for reminders */
134
111
  weeks: MyWeeksV4;
135
- /**
136
- * 提醒间隔时间(分钟)
137
- */
112
+ /** Reminder interval time in minutes */
138
113
  intervalTime: number;
139
- /**
140
- * 最低步数门槛
141
- *
142
- * 如果在间隔时间内步数少于此值,则触发久坐提醒。
114
+ /** Minimum step threshold
115
+ * If steps within the interval are below this value, the sedentary reminder is triggered.
143
116
  */
144
117
  leastSteps: number;
145
118
  /**
146
- * 提醒模式
147
- * - 0 = 震动
148
- * - 1 = 声音
149
- * - 2 = 混合提醒
119
+ * Reminder mode
120
+ * - 0 = vibration
121
+ * - 1 = sound
122
+ * - 2 = mixed
150
123
  */
151
124
  mode: number;
152
125
  }
@@ -1,45 +1,117 @@
1
1
  /**
2
- * 数据解析类,传入蓝牙数据返回以字典对象返回
2
+ * Byte operation utility class Data parsing class.
3
+ * Takes Bluetooth data as input and returns it as a dictionary object.
3
4
  */
4
5
  export declare class ResolveUtil {
5
- static crcValue(value: number[]): void;
6
6
  private static hexByte2Int;
7
7
  private static bcd2String;
8
8
  static intList2String(bytes: number[]): string;
9
9
  static intList3String(bytes: number[]): string;
10
+ /**
11
+ * Device time parser
12
+ * @param value - The raw value from the device
13
+ * @returns The parsed device time
14
+ */
10
15
  static setMacSuccessful(): {
11
16
  [key: string]: any;
12
17
  };
13
18
  private static intBitToDouble;
19
+ /**
20
+ * Get device time
21
+ * @param value - The raw value from the device
22
+ * @returns The parsed device time
23
+ */
14
24
  static getDeviceTime(value: number[]): any;
15
25
  private static int2Ascll;
26
+ /**
27
+ * Parse GPS time
28
+ * @param value - The raw GPS data
29
+ * @returns The parsed GPS time
30
+ */
16
31
  static getGpsTime(value: number[]): string;
32
+ /**
33
+ * Parse user information
34
+ * @param value - The raw user data
35
+ * @returns The parsed user information
36
+ */
17
37
  static getUserInfo(value: number[]): any;
38
+ /**
39
+ * Parse device information
40
+ * @param value - Raw data from the device
41
+ * @returns Parsed device information
42
+ */
18
43
  static getDeviceInfo(value: number[]): any;
44
+ /**
45
+ * Parse real-time step information
46
+ * @param value - Raw data from the device
47
+ * @returns Parsed real-time step data
48
+ */
19
49
  static getActivityData(value: number[]): any;
50
+ /**
51
+ * Parse step goal information
52
+ * @param value - Raw data from the device
53
+ * @returns Parsed step goal data
54
+ */
20
55
  static getGoal(value: number[]): any;
56
+ /**
57
+ * Device Power Analysis
58
+ * @param value
59
+ * @returns
60
+ */
21
61
  static getDeviceBattery(value: number[]): any;
62
+ /**
63
+ * Device MAC Address Resolution
64
+ * @param value
65
+ * @returns
66
+ */
22
67
  static getDeviceAddress(value: number[]): any;
68
+ /**
69
+ * Device Version Number Parsing
70
+ * @param value
71
+ * @returns
72
+ */
23
73
  static getDeviceVersion(value: number[]): any;
74
+ /**
75
+ * Restore factory settings
76
+ * @returns
77
+ */
24
78
  static reset(): any;
79
+ /**
80
+ * MCU Software Reset Instruction
81
+ * @returns
82
+ */
25
83
  static mcuReset(): any;
84
+ /**
85
+ * Third-Party Reminder Command
86
+ * @returns
87
+ */
26
88
  static notify(): any;
89
+ /**
90
+ * Device Name Resolution
91
+ * @param value
92
+ * @returns
93
+ */
27
94
  static getDeviceName(value: number[]): any;
95
+ /**
96
+ * Analysis of Automatic Heart Rate Measurement Time Intervals
97
+ * @param value
98
+ * @returns
99
+ */
28
100
  static getAutoHeart(value: number[]): any;
29
101
  /**
30
- * 周解析工具
102
+ * Weekly Analysis Tool
31
103
  * @param ar
32
- * @returns 字节数据
104
+ * @returns Byte data
33
105
  */
34
106
  static getWeekInt(ar: number[]): number;
35
107
  /**
36
- * 字节转字符串
108
+ * Byte to string
37
109
  * @param b
38
110
  * @returns
39
111
  */
40
112
  static getByteString(b: number): string;
41
113
  /**
42
- * 字节数组解析
114
+ * Byte Array Parsing
43
115
  * @param b
44
116
  * @returns
45
117
  */
@@ -56,94 +128,98 @@ export declare class ResolveUtil {
56
128
  */
57
129
  private static _bcd2String;
58
130
  /**
59
- * 久坐提醒
131
+ * Sedentary Reminder
132
+ * @param value
133
+ * @returns
60
134
  */
61
135
  static getActivityAlarm(value: number[]): any;
62
136
  /**
63
- * 总运动数据解析
137
+ * Analysis of Overall Movement Data
138
+ * @param value
139
+ * @returns
64
140
  */
65
141
  static getTotalStepData(value: number[]): object;
66
142
  /**
67
- * 详细运动数据解析
143
+ * Detailed Analysis of Sports Data
68
144
  * @param value
69
145
  * @returns
70
146
  */
71
147
  static getDetailData(value: number[]): any;
72
148
  /**
73
- * 睡眠数据解析
149
+ * Sleep Data Analysis
74
150
  * @param value
75
151
  * @returns
76
152
  */
77
153
  static getSleepData(value: number[]): any;
78
154
  /**
79
- * 自动血氧数据解析
155
+ * Automated Blood Oxygen Data Analysis
80
156
  * @param value
81
157
  * @returns
82
158
  */
83
159
  static getAutoBloodOxygen(value: number[]): any;
84
160
  /**
85
- * 历史血氧数据解析(与自动血氧逻辑一致,复用代码)
161
+ * Historical Blood Oxygen Data Analysis (Consistent with automatic blood oxygen logic, reusing code)
86
162
  * @param value
87
163
  * @returns
88
164
  */
89
165
  static getBloodoxygen(value: number[]): any;
90
166
  /**
91
- * 历史心率数据解析
167
+ * Historical Heart Rate Data Analysis
92
168
  * @param value
93
169
  * @returns
94
170
  */
95
171
  static getHeartData(value: number[]): any;
96
172
  /**
97
- * 单次历史心率数据解析
173
+ * Single-Session Historical Heart Rate Data Analysis
98
174
  * @param value
99
175
  * @returns
100
176
  */
101
177
  static getOnceHeartData(value: number[]): any;
102
178
  /**
103
- * HRV测试数据解析
179
+ * HRV Test Data Analysis HRV Test Data Analysis
104
180
  * @param value
105
181
  * @returns
106
182
  */
107
183
  static getHrvTestData(value: number[]): any;
108
184
  /**
109
- * 闹钟数据解析
185
+ * Alarm Clock Data Analysis
110
186
  * @param value
111
187
  * @returns
112
188
  */
113
189
  static getClockData(value: number[]): any;
114
190
  /**
115
- * 腋下温度数据解析
191
+ * Analysis of Axillary Temperature Data
116
192
  * @param value
117
193
  * @returns
118
194
  */
119
195
  static getTempDataer(value: number[]): any;
120
196
  /**
121
- * 二维码相关功能
197
+ * QR Code-Related Functions
122
198
  * @param value
123
199
  * @param flag
124
200
  * @returns
125
201
  */
126
202
  static getQrCode(value: number[], flag: boolean): any;
127
203
  /**
128
- * 温度历史数据解析
204
+ * Analysis of Historical Temperature Data
129
205
  * @param value
130
206
  * @returns
131
207
  */
132
208
  static getTempData(value: number[]): any;
133
209
  /**
134
- * 运动模式数据解析
210
+ * Analysis of Sports Mode Data
135
211
  * @param value
136
212
  * @returns
137
213
  */
138
214
  static getExerciseData(value: number[]): any;
139
215
  /**
140
- * 活动运动数据解析
216
+ * Activity and Exercise Data Analysis
141
217
  * @param value
142
218
  * @returns
143
219
  */
144
220
  static getActivityExerciseData(value: number[]): any;
145
221
  /**
146
- * 设置时间成功响应
222
+ * Time setting successful response
147
223
  * @param value
148
224
  * @returns
149
225
  */
@@ -159,167 +235,167 @@ export declare class ResolveUtil {
159
235
  private static getFloat;
160
236
  private static getInt;
161
237
  /**
162
- * 设置成功响应
238
+ * Setup successful response
163
239
  * @param dataType
164
240
  * @returns
165
241
  */
166
242
  static setMethodSuccessful(dataType: string): any;
167
243
  /**
168
- * ECG数据解析
244
+ * ECG Data Analysis
169
245
  * @param value
170
246
  * @returns
171
247
  */
172
248
  static getEcgHistoryData(value: number[]): any;
173
249
  private static getEcgDataString;
174
250
  /**
175
- * ECG数据解析
251
+ * ECG Data Analysis
176
252
  * @param value
177
253
  * @returns
178
254
  */
179
255
  static ecgData(value: number[]): any;
180
256
  /**
181
- * PPG数据解析
257
+ * PPG Data Analysis
182
258
  * @param value
183
259
  * @returns
184
260
  */
185
261
  static ppgData(value: number[]): any;
186
262
  /**
187
- * ECG结果解析
263
+ * ECG Interpretation ECG Interpretation
188
264
  * @param value
189
265
  * @returns
190
266
  */
191
267
  static ecgResult(value: number[]): any;
192
268
  /**
193
- * 进入ECG模式
269
+ * Enter ECG mode
194
270
  * @param value
195
271
  * @returns
196
272
  */
197
273
  static enterEcg(value: number[]): any;
198
274
  /**
199
- * 测量类型处理
200
- * @param flag 开启测量 true:实时测量血糖返回
201
- * @param value 固件返回数据
202
- * @returns
203
- */
275
+ * Measurement type handling
276
+ * @param flag Enable measurement. true: real-time blood glucose measurement returns
277
+ * @param value Data returned by the firmware
278
+ * @returns
279
+ */
204
280
  static measurementWithType(flag: boolean, value: number[]): any;
205
281
  /**
206
- * 手环表盘设置
207
- * @param isruning
208
- * @param value
209
- * @returns
210
- */
282
+ * Smartband watch face settings
283
+ * @param isRunning
284
+ * @param value
285
+ * @returns
286
+ */
211
287
  static braceletdial(isruning: boolean, value: number[]): any;
212
288
  /**
213
- * 获取运动模式
289
+ * Get Exercise Mode
214
290
  * @param value
215
291
  * @returns
216
292
  */
217
293
  static getSportMode(value: number[]): any;
218
294
  /**
219
- * GPS控制命令解析
295
+ * GPS Control Command Parsing
220
296
  * @param value
221
297
  * @returns
222
298
  */
223
299
  static gPSControlCommand(value: number[]): any;
224
300
  /**
225
- * 设置社交距离
301
+ * Set social distancing
226
302
  * @param value
227
303
  * @returns
228
304
  */
229
305
  static setSocial(value: number[]): any;
230
306
  /**
231
- * ECG质量数据
307
+ * ECG Quality Data
232
308
  * @param value
233
309
  * @returns
234
310
  */
235
311
  static ecgQuality(value: number[]): any;
236
312
  /**
237
- * 进入照片模式返回
313
+ * Enter Photo Mode Return
238
314
  * @param value
239
315
  * @returns
240
316
  */
241
317
  static enterPhotoModeback(value: number[]): any;
242
318
  /**
243
- * 设置新设备信息
319
+ * Set up new device information
244
320
  * @param value
245
321
  * @returns
246
322
  */
247
323
  static setNewDeviceInfo(value: number[]): any;
248
324
  /**
249
- * 获取新设备信息
325
+ * Retrieve new device information
250
326
  * @param value
251
327
  * @returns
252
328
  */
253
329
  static getNewDeviceInfo(value: number[]): any;
254
330
  /**
255
- * 更新闹钟成功
331
+ * Alarm updated successfully
256
332
  * @param value
257
333
  * @returns
258
334
  */
259
335
  static updateClockSuccessful(value: number[]): any;
260
336
  /**
261
- * 设置血糖状态
337
+ * Set Blood Glucose Status
262
338
  * @param value
263
339
  * @returns
264
340
  */
265
341
  static setBoolSugarStatus(value: number[]): any;
266
342
  /**
267
- * 设置血糖值
343
+ * Set blood glucose level Set blood glucose levels
268
344
  * @param value
269
345
  * @returns
270
346
  */
271
347
  static setBoolSugarValue(value: number[]): any;
272
348
  /**
273
- * 设置方法错误
349
+ * Incorrect setup method
274
350
  * @param dataType
275
351
  * @returns
276
352
  */
277
353
  static setMethodError(dataType: string): any;
278
354
  /**
279
- * 读取怀孕周期数据
355
+ * Read pregnancy cycle data
280
356
  * @param value
281
357
  * @returns
282
358
  */
283
359
  static readPregnancyCycle(value: number[]): any;
284
360
  /**
285
- * 女性健康数据解析
361
+ * Analysis of Women's Health Data
286
362
  * @param value
287
363
  * @returns
288
364
  */
289
365
  static readWomenHealth(value: number[]): any;
290
366
  /**
291
- * 温度校正值解析
367
+ *Analysis of Temperature Correction Values
292
368
  * @param value
293
369
  * @returns
294
370
  */
295
371
  static getTemperatureCorrectionValue(value: number[]): any;
296
372
  private static byteArrayToInt;
297
373
  /**
298
- * 获取历史GPS数据
374
+ * Retrieve historical GPS data
299
375
  * @param value
300
376
  * @returns
301
377
  */
302
378
  static getHistoryGpsData(value: number[]): any;
303
379
  /**
304
- * PPI测试数据解析
380
+ * PPI Test Data Analysis
305
381
  * @param value
306
382
  * @returns
307
383
  */
308
384
  static getPPITestData(value: number[]): any;
309
385
  /**
310
- * 获取HRV测量时间数据
386
+ * Acquire HRV measurement time data
311
387
  * @param value
312
388
  * @returns
313
389
  */
314
390
  static getHrvTimeData(value: number[]): any;
315
391
  /**
316
- * 断开蓝牙连接
392
+ * Disconnect Bluetooth
317
393
  * @param value
318
394
  * @returns
319
395
  */
320
396
  static closeDevices(value: number[]): any;
321
397
  /**
322
- * 脱手检测状态上报
398
+ * Detach Detection Status Reporting
323
399
  * @param value
324
400
  * @returns
325
401
  */