lebai_sdk 0.2.20 → 0.2.22

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
@@ -46,6 +46,11 @@ export class Robot {
46
46
  * @returns {Promise<RobotSubscription>}
47
47
  */
48
48
  subscribe(method: string, param?: string): Promise<RobotSubscription>;
49
+ /**
50
+ * @param {any} p
51
+ * @returns {Promise<number>}
52
+ */
53
+ measure_manipulation(p: any): Promise<number>;
49
54
  /**
50
55
  * @param {any} p
51
56
  * @returns {Promise<any>}
@@ -210,6 +215,19 @@ export class Robot {
210
215
  * @returns {Promise<void>}
211
216
  */
212
217
  end_teach_mode(): Promise<void>;
218
+ /**
219
+ * @param {any} device
220
+ * @param {number} pin
221
+ * @param {any} mode
222
+ * @returns {Promise<void>}
223
+ */
224
+ set_dio_mode(device: any, pin: number, mode: any): Promise<void>;
225
+ /**
226
+ * @param {any} device
227
+ * @param {number} pin
228
+ * @returns {Promise<any>}
229
+ */
230
+ get_dio_mode(device: any, pin: number): Promise<any>;
213
231
  /**
214
232
  * @param {any} device
215
233
  * @param {number} pin
package/lebai_sdk_bg.js CHANGED
@@ -4,11 +4,7 @@ export function __wbg_set_wasm(val) {
4
4
  }
5
5
 
6
6
 
7
- const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
8
-
9
- let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
10
-
11
- cachedTextDecoder.decode();
7
+ let WASM_VECTOR_LEN = 0;
12
8
 
13
9
  let cachedUint8ArrayMemory0 = null;
14
10
 
@@ -19,13 +15,6 @@ function getUint8ArrayMemory0() {
19
15
  return cachedUint8ArrayMemory0;
20
16
  }
21
17
 
22
- function getStringFromWasm0(ptr, len) {
23
- ptr = ptr >>> 0;
24
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
25
- }
26
-
27
- let WASM_VECTOR_LEN = 0;
28
-
29
18
  const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
30
19
 
31
20
  let cachedTextEncoder = new lTextEncoder('utf-8');
@@ -95,6 +84,17 @@ function getDataViewMemory0() {
95
84
  return cachedDataViewMemory0;
96
85
  }
97
86
 
87
+ const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
88
+
89
+ let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
90
+
91
+ cachedTextDecoder.decode();
92
+
93
+ function getStringFromWasm0(ptr, len) {
94
+ ptr = ptr >>> 0;
95
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
96
+ }
97
+
98
98
  function debugString(val) {
99
99
  // primitive types
100
100
  const type = typeof val;
@@ -191,19 +191,19 @@ function makeMutClosure(arg0, arg1, dtor, f) {
191
191
  return real;
192
192
  }
193
193
  function __wbg_adapter_52(arg0, arg1, arg2) {
194
- wasm.closure715_externref_shim(arg0, arg1, arg2);
194
+ wasm.closure741_externref_shim(arg0, arg1, arg2);
195
195
  }
196
196
 
197
197
  function __wbg_adapter_59(arg0, arg1) {
198
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb59d1f546bcac31(arg0, arg1);
198
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc1dfdd5a9b31566c(arg0, arg1);
199
199
  }
200
200
 
201
201
  function __wbg_adapter_62(arg0, arg1, arg2) {
202
- wasm.closure797_externref_shim(arg0, arg1, arg2);
202
+ wasm.closure826_externref_shim(arg0, arg1, arg2);
203
203
  }
204
204
 
205
205
  function __wbg_adapter_65(arg0, arg1) {
206
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h00e3e5994b15977d(arg0, arg1);
206
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1492670597d00f16(arg0, arg1);
207
207
  }
208
208
 
209
209
  function addToExternrefTable0(obj) {
@@ -310,8 +310,8 @@ function getArrayU8FromWasm0(ptr, len) {
310
310
  }
311
311
 
312
312
  function notDefined(what) { return () => { throw new Error(`${what} is not defined`); }; }
313
- function __wbg_adapter_268(arg0, arg1, arg2, arg3) {
314
- wasm.closure886_externref_shim(arg0, arg1, arg2, arg3);
313
+ function __wbg_adapter_271(arg0, arg1, arg2, arg3) {
314
+ wasm.closure915_externref_shim(arg0, arg1, arg2, arg3);
315
315
  }
316
316
 
317
317
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
@@ -381,6 +381,14 @@ export class Robot {
381
381
  const ret = wasm.robot_subscribe(this.__wbg_ptr, ptr0, len0, ptr1, len1);
382
382
  return ret;
383
383
  }
384
+ /**
385
+ * @param {any} p
386
+ * @returns {Promise<number>}
387
+ */
388
+ measure_manipulation(p) {
389
+ const ret = wasm.robot_measure_manipulation(this.__wbg_ptr, p);
390
+ return ret;
391
+ }
384
392
  /**
385
393
  * @param {any} p
386
394
  * @returns {Promise<any>}
@@ -639,6 +647,25 @@ export class Robot {
639
647
  const ret = wasm.robot_end_teach_mode(this.__wbg_ptr);
640
648
  return ret;
641
649
  }
650
+ /**
651
+ * @param {any} device
652
+ * @param {number} pin
653
+ * @param {any} mode
654
+ * @returns {Promise<void>}
655
+ */
656
+ set_dio_mode(device, pin, mode) {
657
+ const ret = wasm.robot_set_dio_mode(this.__wbg_ptr, device, pin, mode);
658
+ return ret;
659
+ }
660
+ /**
661
+ * @param {any} device
662
+ * @param {number} pin
663
+ * @returns {Promise<any>}
664
+ */
665
+ get_dio_mode(device, pin) {
666
+ const ret = wasm.robot_get_dio_mode(this.__wbg_ptr, device, pin);
667
+ return ret;
668
+ }
642
669
  /**
643
670
  * @param {any} device
644
671
  * @param {number} pin
@@ -1345,8 +1372,17 @@ export class RobotSubscription {
1345
1372
  }
1346
1373
  }
1347
1374
 
1348
- export function __wbindgen_string_new(arg0, arg1) {
1349
- const ret = getStringFromWasm0(arg0, arg1);
1375
+ export function __wbindgen_string_get(arg0, arg1) {
1376
+ const obj = arg1;
1377
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1378
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1379
+ var len1 = WASM_VECTOR_LEN;
1380
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1381
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1382
+ };
1383
+
1384
+ export function __wbindgen_number_new(arg0) {
1385
+ const ret = arg0;
1350
1386
  return ret;
1351
1387
  };
1352
1388
 
@@ -1355,20 +1391,11 @@ export function __wbg_robotsubscription_new(arg0) {
1355
1391
  return ret;
1356
1392
  };
1357
1393
 
1358
- export function __wbindgen_number_new(arg0) {
1359
- const ret = arg0;
1394
+ export function __wbindgen_string_new(arg0, arg1) {
1395
+ const ret = getStringFromWasm0(arg0, arg1);
1360
1396
  return ret;
1361
1397
  };
1362
1398
 
1363
- export function __wbindgen_string_get(arg0, arg1) {
1364
- const obj = arg1;
1365
- const ret = typeof(obj) === 'string' ? obj : undefined;
1366
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1367
- var len1 = WASM_VECTOR_LEN;
1368
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1369
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1370
- };
1371
-
1372
1399
  export function __wbg_robot_new(arg0) {
1373
1400
  const ret = Robot.__wrap(arg0);
1374
1401
  return ret;
@@ -1392,18 +1419,8 @@ export function __wbindgen_number_get(arg0, arg1) {
1392
1419
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1393
1420
  };
1394
1421
 
1395
- export function __wbindgen_cb_drop(arg0) {
1396
- const obj = arg0.original;
1397
- if (obj.cnt-- == 1) {
1398
- obj.a = 0;
1399
- return true;
1400
- }
1401
- const ret = false;
1402
- return ret;
1403
- };
1404
-
1405
- export function __wbindgen_is_bigint(arg0) {
1406
- const ret = typeof(arg0) === 'bigint';
1422
+ export function __wbindgen_as_number(arg0) {
1423
+ const ret = +arg0;
1407
1424
  return ret;
1408
1425
  };
1409
1426
 
@@ -1413,6 +1430,11 @@ export function __wbindgen_is_object(arg0) {
1413
1430
  return ret;
1414
1431
  };
1415
1432
 
1433
+ export function __wbindgen_is_bigint(arg0) {
1434
+ const ret = typeof(arg0) === 'bigint';
1435
+ return ret;
1436
+ };
1437
+
1416
1438
  export function __wbindgen_in(arg0, arg1) {
1417
1439
  const ret = arg0 in arg1;
1418
1440
  return ret;
@@ -1438,8 +1460,13 @@ export function __wbindgen_is_undefined(arg0) {
1438
1460
  return ret;
1439
1461
  };
1440
1462
 
1441
- export function __wbindgen_as_number(arg0) {
1442
- const ret = +arg0;
1463
+ export function __wbindgen_cb_drop(arg0) {
1464
+ const obj = arg0.original;
1465
+ if (obj.cnt-- == 1) {
1466
+ obj.a = 0;
1467
+ return true;
1468
+ }
1469
+ const ret = false;
1443
1470
  return ret;
1444
1471
  };
1445
1472
 
@@ -1723,7 +1750,7 @@ export function __wbg_new_1073970097e5a420(arg0, arg1) {
1723
1750
  const a = state0.a;
1724
1751
  state0.a = 0;
1725
1752
  try {
1726
- return __wbg_adapter_268(a, state0.b, arg0, arg1);
1753
+ return __wbg_adapter_271(a, state0.b, arg0, arg1);
1727
1754
  } finally {
1728
1755
  state0.a = a;
1729
1756
  }
@@ -1799,33 +1826,33 @@ export function __wbindgen_memory() {
1799
1826
  return ret;
1800
1827
  };
1801
1828
 
1802
- export function __wbindgen_closure_wrapper1831(arg0, arg1, arg2) {
1803
- const ret = makeMutClosure(arg0, arg1, 716, __wbg_adapter_52);
1829
+ export function __wbindgen_closure_wrapper1889(arg0, arg1, arg2) {
1830
+ const ret = makeMutClosure(arg0, arg1, 742, __wbg_adapter_52);
1804
1831
  return ret;
1805
1832
  };
1806
1833
 
1807
- export function __wbindgen_closure_wrapper1833(arg0, arg1, arg2) {
1808
- const ret = makeMutClosure(arg0, arg1, 716, __wbg_adapter_52);
1834
+ export function __wbindgen_closure_wrapper1891(arg0, arg1, arg2) {
1835
+ const ret = makeMutClosure(arg0, arg1, 742, __wbg_adapter_52);
1809
1836
  return ret;
1810
1837
  };
1811
1838
 
1812
- export function __wbindgen_closure_wrapper1835(arg0, arg1, arg2) {
1813
- const ret = makeMutClosure(arg0, arg1, 716, __wbg_adapter_52);
1839
+ export function __wbindgen_closure_wrapper1893(arg0, arg1, arg2) {
1840
+ const ret = makeMutClosure(arg0, arg1, 742, __wbg_adapter_52);
1814
1841
  return ret;
1815
1842
  };
1816
1843
 
1817
- export function __wbindgen_closure_wrapper1837(arg0, arg1, arg2) {
1818
- const ret = makeMutClosure(arg0, arg1, 716, __wbg_adapter_59);
1844
+ export function __wbindgen_closure_wrapper1895(arg0, arg1, arg2) {
1845
+ const ret = makeMutClosure(arg0, arg1, 742, __wbg_adapter_59);
1819
1846
  return ret;
1820
1847
  };
1821
1848
 
1822
- export function __wbindgen_closure_wrapper2497(arg0, arg1, arg2) {
1823
- const ret = makeMutClosure(arg0, arg1, 798, __wbg_adapter_62);
1849
+ export function __wbindgen_closure_wrapper2538(arg0, arg1, arg2) {
1850
+ const ret = makeMutClosure(arg0, arg1, 827, __wbg_adapter_62);
1824
1851
  return ret;
1825
1852
  };
1826
1853
 
1827
- export function __wbindgen_closure_wrapper2528(arg0, arg1, arg2) {
1828
- const ret = makeMutClosure(arg0, arg1, 814, __wbg_adapter_65);
1854
+ export function __wbindgen_closure_wrapper2569(arg0, arg1, arg2) {
1855
+ const ret = makeMutClosure(arg0, arg1, 843, __wbg_adapter_65);
1829
1856
  return ret;
1830
1857
  };
1831
1858
 
package/lebai_sdk_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "rise0chen<rise0chen@163.com>"
6
6
  ],
7
7
  "description": "lebai_sdk",
8
- "version": "0.2.20",
8
+ "version": "0.2.22",
9
9
  "license": "SEE LICENSE IN LICENSE",
10
10
  "repository": {
11
11
  "type": "git",