lebai_sdk 0.2.1 → 0.2.3

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/lebai_sdk.d.ts CHANGED
@@ -12,6 +12,15 @@ export function connect(ip: string, simu: boolean): Promise<Robot>;
12
12
  */
13
13
  export function discover_devices(time: number): Promise<any>;
14
14
  /**
15
+ * @param {any} ms
16
+ * @returns {Promise<void>}
17
+ */
18
+ export function sleep_ms(ms: any): Promise<void>;
19
+ /**
20
+ * @returns {any}
21
+ */
22
+ export function timestamp(): any;
23
+ /**
15
24
  * @returns {string}
16
25
  */
17
26
  export function version(): string;
@@ -526,6 +535,10 @@ export class Robot {
526
535
  */
527
536
  get_robot_state(): Promise<any>;
528
537
  /**
538
+ * @returns {Promise<any>}
539
+ */
540
+ get_phy_data(): Promise<any>;
541
+ /**
529
542
  * @param {string} name
530
543
  * @param {string | undefined} [dir]
531
544
  * @returns {Promise<any>}
package/lebai_sdk_bg.js CHANGED
@@ -24,7 +24,11 @@ function takeObject(idx) {
24
24
  return ret;
25
25
  }
26
26
 
27
- let WASM_VECTOR_LEN = 0;
27
+ const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
28
+
29
+ let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
30
+
31
+ cachedTextDecoder.decode();
28
32
 
29
33
  let cachedUint8Memory0 = null;
30
34
 
@@ -35,6 +39,22 @@ function getUint8Memory0() {
35
39
  return cachedUint8Memory0;
36
40
  }
37
41
 
42
+ function getStringFromWasm0(ptr, len) {
43
+ ptr = ptr >>> 0;
44
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
45
+ }
46
+
47
+ function addHeapObject(obj) {
48
+ if (heap_next === heap.length) heap.push(heap.length + 1);
49
+ const idx = heap_next;
50
+ heap_next = heap[idx];
51
+
52
+ heap[idx] = obj;
53
+ return idx;
54
+ }
55
+
56
+ let WASM_VECTOR_LEN = 0;
57
+
38
58
  const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
39
59
 
40
60
  let cachedTextEncoder = new lTextEncoder('utf-8');
@@ -103,26 +123,6 @@ function getInt32Memory0() {
103
123
  return cachedInt32Memory0;
104
124
  }
105
125
 
106
- function addHeapObject(obj) {
107
- if (heap_next === heap.length) heap.push(heap.length + 1);
108
- const idx = heap_next;
109
- heap_next = heap[idx];
110
-
111
- heap[idx] = obj;
112
- return idx;
113
- }
114
-
115
- const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
116
-
117
- let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
118
-
119
- cachedTextDecoder.decode();
120
-
121
- function getStringFromWasm0(ptr, len) {
122
- ptr = ptr >>> 0;
123
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
124
- }
125
-
126
126
  let cachedFloat64Memory0 = null;
127
127
 
128
128
  function getFloat64Memory0() {
@@ -230,20 +230,20 @@ function makeMutClosure(arg0, arg1, dtor, f) {
230
230
 
231
231
  return real;
232
232
  }
233
- function __wbg_adapter_48(arg0, arg1, arg2) {
234
- wasm.wasm_bindgen__convert__closures__invoke1_mut__ha058cea286b456c0(arg0, arg1, addHeapObject(arg2));
233
+ function __wbg_adapter_50(arg0, arg1, arg2) {
234
+ wasm.wasm_bindgen__convert__closures__invoke1_mut__h39f6c5e0caad03ff(arg0, arg1, addHeapObject(arg2));
235
235
  }
236
236
 
237
- function __wbg_adapter_53(arg0, arg1) {
238
- wasm.wasm_bindgen__convert__closures__invoke0_mut__h13c1a8ec7e32e4a9(arg0, arg1);
237
+ function __wbg_adapter_57(arg0, arg1) {
238
+ wasm.wasm_bindgen__convert__closures__invoke0_mut__h76085e88dce8648a(arg0, arg1);
239
239
  }
240
240
 
241
- function __wbg_adapter_58(arg0, arg1, arg2) {
242
- wasm.wasm_bindgen__convert__closures__invoke1_mut__ha115c950321e3dff(arg0, arg1, addHeapObject(arg2));
241
+ function __wbg_adapter_60(arg0, arg1, arg2) {
242
+ wasm.wasm_bindgen__convert__closures__invoke1_mut__h4b729089db212974(arg0, arg1, addHeapObject(arg2));
243
243
  }
244
244
 
245
- function __wbg_adapter_61(arg0, arg1) {
246
- wasm.wasm_bindgen__convert__closures__invoke0_mut__h2729bc9fd6ad6c60(arg0, arg1);
245
+ function __wbg_adapter_63(arg0, arg1) {
246
+ wasm.wasm_bindgen__convert__closures__invoke0_mut__ha850d9f91d6e6a3b(arg0, arg1);
247
247
  }
248
248
 
249
249
  let cachedUint32Memory0 = null;
@@ -282,6 +282,34 @@ export function discover_devices(time) {
282
282
  return takeObject(ret);
283
283
  }
284
284
 
285
+ /**
286
+ * @param {any} ms
287
+ * @returns {Promise<void>}
288
+ */
289
+ export function sleep_ms(ms) {
290
+ const ret = wasm.sleep_ms(addHeapObject(ms));
291
+ return takeObject(ret);
292
+ }
293
+
294
+ /**
295
+ * @returns {any}
296
+ */
297
+ export function timestamp() {
298
+ try {
299
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
300
+ wasm.timestamp(retptr);
301
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
302
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
303
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
304
+ if (r2) {
305
+ throw takeObject(r1);
306
+ }
307
+ return takeObject(r0);
308
+ } finally {
309
+ wasm.__wbindgen_add_to_stack_pointer(16);
310
+ }
311
+ }
312
+
285
313
  /**
286
314
  * @returns {string}
287
315
  */
@@ -322,8 +350,8 @@ function getArrayU8FromWasm0(ptr, len) {
322
350
  ptr = ptr >>> 0;
323
351
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
324
352
  }
325
- function __wbg_adapter_246(arg0, arg1, arg2, arg3) {
326
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h1c52eb2f9f0daf09(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
353
+ function __wbg_adapter_251(arg0, arg1, arg2, arg3) {
354
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h92bdcc50b96f9003(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
327
355
  }
328
356
 
329
357
  /**
@@ -1201,6 +1229,13 @@ export class Robot {
1201
1229
  return takeObject(ret);
1202
1230
  }
1203
1231
  /**
1232
+ * @returns {Promise<any>}
1233
+ */
1234
+ get_phy_data() {
1235
+ const ret = wasm.robot_get_phy_data(this.__wbg_ptr);
1236
+ return takeObject(ret);
1237
+ }
1238
+ /**
1204
1239
  * @param {string} name
1205
1240
  * @param {string | undefined} [dir]
1206
1241
  * @returns {Promise<any>}
@@ -1281,6 +1316,11 @@ export function __wbindgen_object_drop_ref(arg0) {
1281
1316
  takeObject(arg0);
1282
1317
  };
1283
1318
 
1319
+ export function __wbindgen_string_new(arg0, arg1) {
1320
+ const ret = getStringFromWasm0(arg0, arg1);
1321
+ return addHeapObject(ret);
1322
+ };
1323
+
1284
1324
  export function __wbindgen_string_get(arg0, arg1) {
1285
1325
  const obj = getObject(arg1);
1286
1326
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -1295,8 +1335,8 @@ export function __wbindgen_number_new(arg0) {
1295
1335
  return addHeapObject(ret);
1296
1336
  };
1297
1337
 
1298
- export function __wbindgen_string_new(arg0, arg1) {
1299
- const ret = getStringFromWasm0(arg0, arg1);
1338
+ export function __wbg_robotsubscription_new(arg0) {
1339
+ const ret = RobotSubscription.__wrap(arg0);
1300
1340
  return addHeapObject(ret);
1301
1341
  };
1302
1342
 
@@ -1305,8 +1345,25 @@ export function __wbg_robot_new(arg0) {
1305
1345
  return addHeapObject(ret);
1306
1346
  };
1307
1347
 
1308
- export function __wbg_robotsubscription_new(arg0) {
1309
- const ret = RobotSubscription.__wrap(arg0);
1348
+ export function __wbindgen_boolean_get(arg0) {
1349
+ const v = getObject(arg0);
1350
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
1351
+ return ret;
1352
+ };
1353
+
1354
+ export function __wbindgen_is_object(arg0) {
1355
+ const val = getObject(arg0);
1356
+ const ret = typeof(val) === 'object' && val !== null;
1357
+ return ret;
1358
+ };
1359
+
1360
+ export function __wbindgen_as_number(arg0) {
1361
+ const ret = +getObject(arg0);
1362
+ return ret;
1363
+ };
1364
+
1365
+ export function __wbindgen_object_clone_ref(arg0) {
1366
+ const ret = getObject(arg0);
1310
1367
  return addHeapObject(ret);
1311
1368
  };
1312
1369
 
@@ -1325,12 +1382,6 @@ export function __wbindgen_error_new(arg0, arg1) {
1325
1382
  return addHeapObject(ret);
1326
1383
  };
1327
1384
 
1328
- export function __wbindgen_is_object(arg0) {
1329
- const val = getObject(arg0);
1330
- const ret = typeof(val) === 'object' && val !== null;
1331
- return ret;
1332
- };
1333
-
1334
1385
  export function __wbindgen_is_undefined(arg0) {
1335
1386
  const ret = getObject(arg0) === undefined;
1336
1387
  return ret;
@@ -1348,12 +1399,6 @@ export function __wbindgen_number_get(arg0, arg1) {
1348
1399
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
1349
1400
  };
1350
1401
 
1351
- export function __wbindgen_boolean_get(arg0) {
1352
- const v = getObject(arg0);
1353
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
1354
- return ret;
1355
- };
1356
-
1357
1402
  export function __wbindgen_is_bigint(arg0) {
1358
1403
  const ret = typeof(getObject(arg0)) === 'bigint';
1359
1404
  return ret;
@@ -1374,11 +1419,6 @@ export function __wbindgen_bigint_from_u64(arg0) {
1374
1419
  return addHeapObject(ret);
1375
1420
  };
1376
1421
 
1377
- export function __wbindgen_object_clone_ref(arg0) {
1378
- const ret = getObject(arg0);
1379
- return addHeapObject(ret);
1380
- };
1381
-
1382
1422
  export function __wbindgen_is_string(arg0) {
1383
1423
  const ret = typeof(getObject(arg0)) === 'string';
1384
1424
  return ret;
@@ -1484,12 +1524,12 @@ export function __wbindgen_jsval_loose_eq(arg0, arg1) {
1484
1524
  return ret;
1485
1525
  };
1486
1526
 
1487
- export function __wbg_getwithrefkey_3b3c46ba20582127(arg0, arg1) {
1527
+ export function __wbg_getwithrefkey_4a92a5eca60879b9(arg0, arg1) {
1488
1528
  const ret = getObject(arg0)[getObject(arg1)];
1489
1529
  return addHeapObject(ret);
1490
1530
  };
1491
1531
 
1492
- export function __wbg_set_8761474ad72b9bf1(arg0, arg1, arg2) {
1532
+ export function __wbg_set_9182712abebf82ef(arg0, arg1, arg2) {
1493
1533
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1494
1534
  };
1495
1535
 
@@ -1641,7 +1681,7 @@ export function __wbg_new_60f57089c7563e81(arg0, arg1) {
1641
1681
  const a = state0.a;
1642
1682
  state0.a = 0;
1643
1683
  try {
1644
- return __wbg_adapter_246(a, state0.b, arg0, arg1);
1684
+ return __wbg_adapter_251(a, state0.b, arg0, arg1);
1645
1685
  } finally {
1646
1686
  state0.a = a;
1647
1687
  }
@@ -1722,33 +1762,33 @@ export function __wbindgen_memory() {
1722
1762
  return addHeapObject(ret);
1723
1763
  };
1724
1764
 
1725
- export function __wbindgen_closure_wrapper1703(arg0, arg1, arg2) {
1726
- const ret = makeMutClosure(arg0, arg1, 684, __wbg_adapter_48);
1765
+ export function __wbindgen_closure_wrapper1755(arg0, arg1, arg2) {
1766
+ const ret = makeMutClosure(arg0, arg1, 727, __wbg_adapter_50);
1727
1767
  return addHeapObject(ret);
1728
1768
  };
1729
1769
 
1730
- export function __wbindgen_closure_wrapper1705(arg0, arg1, arg2) {
1731
- const ret = makeMutClosure(arg0, arg1, 684, __wbg_adapter_48);
1770
+ export function __wbindgen_closure_wrapper1757(arg0, arg1, arg2) {
1771
+ const ret = makeMutClosure(arg0, arg1, 727, __wbg_adapter_50);
1732
1772
  return addHeapObject(ret);
1733
1773
  };
1734
1774
 
1735
- export function __wbindgen_closure_wrapper1707(arg0, arg1, arg2) {
1736
- const ret = makeMutClosure(arg0, arg1, 684, __wbg_adapter_53);
1775
+ export function __wbindgen_closure_wrapper1759(arg0, arg1, arg2) {
1776
+ const ret = makeMutClosure(arg0, arg1, 727, __wbg_adapter_50);
1737
1777
  return addHeapObject(ret);
1738
1778
  };
1739
1779
 
1740
- export function __wbindgen_closure_wrapper1709(arg0, arg1, arg2) {
1741
- const ret = makeMutClosure(arg0, arg1, 684, __wbg_adapter_48);
1780
+ export function __wbindgen_closure_wrapper1761(arg0, arg1, arg2) {
1781
+ const ret = makeMutClosure(arg0, arg1, 727, __wbg_adapter_57);
1742
1782
  return addHeapObject(ret);
1743
1783
  };
1744
1784
 
1745
- export function __wbindgen_closure_wrapper2442(arg0, arg1, arg2) {
1746
- const ret = makeMutClosure(arg0, arg1, 794, __wbg_adapter_58);
1785
+ export function __wbindgen_closure_wrapper2500(arg0, arg1, arg2) {
1786
+ const ret = makeMutClosure(arg0, arg1, 833, __wbg_adapter_60);
1747
1787
  return addHeapObject(ret);
1748
1788
  };
1749
1789
 
1750
- export function __wbindgen_closure_wrapper2491(arg0, arg1, arg2) {
1751
- const ret = makeMutClosure(arg0, arg1, 813, __wbg_adapter_61);
1790
+ export function __wbindgen_closure_wrapper2554(arg0, arg1, arg2) {
1791
+ const ret = makeMutClosure(arg0, arg1, 849, __wbg_adapter_63);
1752
1792
  return addHeapObject(ret);
1753
1793
  };
1754
1794
 
package/lebai_sdk_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "rise0chen<rise0chen@163.com>"
5
5
  ],
6
6
  "description": "lebai_sdk",
7
- "version": "0.2.1",
7
+ "version": "0.2.3",
8
8
  "license": "SEE LICENSE IN LICENSE",
9
9
  "repository": {
10
10
  "type": "git",