lebai_sdk 0.1.14 → 0.1.15

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
@@ -271,6 +271,14 @@ export class Robot {
271
271
  */
272
272
  start_task(scene: string, params?: any, dir?: string, is_parallel?: boolean, loop_to?: number): Promise<number>;
273
273
  /**
274
+ * @returns {Promise<any>}
275
+ */
276
+ get_task_list(): Promise<any>;
277
+ /**
278
+ * @returns {Promise<number | undefined>}
279
+ */
280
+ get_main_task_id(): Promise<number | undefined>;
281
+ /**
274
282
  * @param {number | undefined} id
275
283
  * @returns {Promise<string>}
276
284
  */
@@ -281,6 +289,21 @@ export class Robot {
281
289
  */
282
290
  get_task_state(id?: number): Promise<string>;
283
291
  /**
292
+ * @param {number | undefined} id
293
+ * @returns {Promise<void>}
294
+ */
295
+ cancel_task(id?: number): Promise<void>;
296
+ /**
297
+ * @param {number | undefined} id
298
+ * @returns {Promise<void>}
299
+ */
300
+ pause_task(id?: number): Promise<void>;
301
+ /**
302
+ * @param {number | undefined} id
303
+ * @returns {Promise<void>}
304
+ */
305
+ resume_task(id?: number): Promise<void>;
306
+ /**
284
307
  * @param {string} device
285
308
  * @param {number} timeout
286
309
  * @returns {Promise<void>}
package/lebai_sdk_bg.js CHANGED
@@ -8,10 +8,19 @@ const heap = new Array(128).fill(undefined);
8
8
 
9
9
  heap.push(undefined, null, true, false);
10
10
 
11
- function getObject(idx) { return heap[idx]; }
12
-
13
11
  let heap_next = heap.length;
14
12
 
13
+ function addHeapObject(obj) {
14
+ if (heap_next === heap.length) heap.push(heap.length + 1);
15
+ const idx = heap_next;
16
+ heap_next = heap[idx];
17
+
18
+ heap[idx] = obj;
19
+ return idx;
20
+ }
21
+
22
+ function getObject(idx) { return heap[idx]; }
23
+
15
24
  function dropObject(idx) {
16
25
  if (idx < 132) return;
17
26
  heap[idx] = heap_next;
@@ -24,20 +33,7 @@ function takeObject(idx) {
24
33
  return ret;
25
34
  }
26
35
 
27
- function addHeapObject(obj) {
28
- if (heap_next === heap.length) heap.push(heap.length + 1);
29
- const idx = heap_next;
30
- heap_next = heap[idx];
31
-
32
- heap[idx] = obj;
33
- return idx;
34
- }
35
-
36
- const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
37
-
38
- let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
39
-
40
- cachedTextDecoder.decode();
36
+ let WASM_VECTOR_LEN = 0;
41
37
 
42
38
  let cachedUint8Memory0 = null;
43
39
 
@@ -48,13 +44,6 @@ function getUint8Memory0() {
48
44
  return cachedUint8Memory0;
49
45
  }
50
46
 
51
- function getStringFromWasm0(ptr, len) {
52
- ptr = ptr >>> 0;
53
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
54
- }
55
-
56
- let WASM_VECTOR_LEN = 0;
57
-
58
47
  const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
59
48
 
60
49
  let cachedTextEncoder = new lTextEncoder('utf-8');
@@ -123,6 +112,17 @@ function getInt32Memory0() {
123
112
  return cachedInt32Memory0;
124
113
  }
125
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() {
@@ -231,19 +231,19 @@ function makeMutClosure(arg0, arg1, dtor, f) {
231
231
  return real;
232
232
  }
233
233
  function __wbg_adapter_48(arg0, arg1, arg2) {
234
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h27e381c749d61c08(arg0, arg1, addHeapObject(arg2));
234
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h13f7d1ed76369391(arg0, arg1, addHeapObject(arg2));
235
235
  }
236
236
 
237
- function __wbg_adapter_51(arg0, arg1) {
238
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8b6bda0df7f357e6(arg0, arg1);
237
+ function __wbg_adapter_53(arg0, arg1) {
238
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h449ab864e507fca8(arg0, arg1);
239
239
  }
240
240
 
241
241
  function __wbg_adapter_58(arg0, arg1, arg2) {
242
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h44e91d37c0c4620b(arg0, arg1, addHeapObject(arg2));
242
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h61dcfe8467004f4a(arg0, arg1, addHeapObject(arg2));
243
243
  }
244
244
 
245
245
  function __wbg_adapter_61(arg0, arg1) {
246
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h18d3ed00ea62e483(arg0, arg1);
246
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf4a29d40d1827e55(arg0, arg1);
247
247
  }
248
248
 
249
249
  let cachedUint32Memory0 = null;
@@ -322,8 +322,8 @@ function getArrayU8FromWasm0(ptr, len) {
322
322
  ptr = ptr >>> 0;
323
323
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
324
324
  }
325
- function __wbg_adapter_229(arg0, arg1, arg2, arg3) {
326
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h39e9730626d21c64(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
325
+ function __wbg_adapter_234(arg0, arg1, arg2, arg3) {
326
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h174c72652431fca0(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
327
327
  }
328
328
 
329
329
  /**
@@ -738,6 +738,20 @@ export class Robot {
738
738
  return takeObject(ret);
739
739
  }
740
740
  /**
741
+ * @returns {Promise<any>}
742
+ */
743
+ get_task_list() {
744
+ const ret = wasm.robot_get_task_list(this.__wbg_ptr);
745
+ return takeObject(ret);
746
+ }
747
+ /**
748
+ * @returns {Promise<number | undefined>}
749
+ */
750
+ get_main_task_id() {
751
+ const ret = wasm.robot_get_main_task_id(this.__wbg_ptr);
752
+ return takeObject(ret);
753
+ }
754
+ /**
741
755
  * @param {number | undefined} id
742
756
  * @returns {Promise<string>}
743
757
  */
@@ -754,6 +768,30 @@ export class Robot {
754
768
  return takeObject(ret);
755
769
  }
756
770
  /**
771
+ * @param {number | undefined} id
772
+ * @returns {Promise<void>}
773
+ */
774
+ cancel_task(id) {
775
+ const ret = wasm.robot_cancel_task(this.__wbg_ptr, !isLikeNone(id), isLikeNone(id) ? 0 : id);
776
+ return takeObject(ret);
777
+ }
778
+ /**
779
+ * @param {number | undefined} id
780
+ * @returns {Promise<void>}
781
+ */
782
+ pause_task(id) {
783
+ const ret = wasm.robot_pause_task(this.__wbg_ptr, !isLikeNone(id), isLikeNone(id) ? 0 : id);
784
+ return takeObject(ret);
785
+ }
786
+ /**
787
+ * @param {number | undefined} id
788
+ * @returns {Promise<void>}
789
+ */
790
+ resume_task(id) {
791
+ const ret = wasm.robot_resume_task(this.__wbg_ptr, !isLikeNone(id), isLikeNone(id) ? 0 : id);
792
+ return takeObject(ret);
793
+ }
794
+ /**
757
795
  * @param {string} device
758
796
  * @param {number} timeout
759
797
  * @returns {Promise<void>}
@@ -1181,17 +1219,26 @@ export class RobotSubscription {
1181
1219
  }
1182
1220
  }
1183
1221
 
1222
+ export function __wbindgen_number_new(arg0) {
1223
+ const ret = arg0;
1224
+ return addHeapObject(ret);
1225
+ };
1226
+
1184
1227
  export function __wbindgen_object_drop_ref(arg0) {
1185
1228
  takeObject(arg0);
1186
1229
  };
1187
1230
 
1188
- export function __wbg_robotsubscription_new(arg0) {
1189
- const ret = RobotSubscription.__wrap(arg0);
1190
- return addHeapObject(ret);
1231
+ export function __wbindgen_string_get(arg0, arg1) {
1232
+ const obj = getObject(arg1);
1233
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1234
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1235
+ var len1 = WASM_VECTOR_LEN;
1236
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1237
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1191
1238
  };
1192
1239
 
1193
- export function __wbindgen_number_new(arg0) {
1194
- const ret = arg0;
1240
+ export function __wbg_robot_new(arg0) {
1241
+ const ret = Robot.__wrap(arg0);
1195
1242
  return addHeapObject(ret);
1196
1243
  };
1197
1244
 
@@ -1200,20 +1247,11 @@ export function __wbindgen_string_new(arg0, arg1) {
1200
1247
  return addHeapObject(ret);
1201
1248
  };
1202
1249
 
1203
- export function __wbg_robot_new(arg0) {
1204
- const ret = Robot.__wrap(arg0);
1250
+ export function __wbg_robotsubscription_new(arg0) {
1251
+ const ret = RobotSubscription.__wrap(arg0);
1205
1252
  return addHeapObject(ret);
1206
1253
  };
1207
1254
 
1208
- export function __wbindgen_string_get(arg0, arg1) {
1209
- const obj = getObject(arg1);
1210
- const ret = typeof(obj) === 'string' ? obj : undefined;
1211
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1212
- var len1 = WASM_VECTOR_LEN;
1213
- getInt32Memory0()[arg0 / 4 + 1] = len1;
1214
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1215
- };
1216
-
1217
1255
  export function __wbindgen_is_object(arg0) {
1218
1256
  const val = getObject(arg0);
1219
1257
  const ret = typeof(val) === 'object' && val !== null;
@@ -1248,16 +1286,6 @@ export function __wbindgen_number_get(arg0, arg1) {
1248
1286
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
1249
1287
  };
1250
1288
 
1251
- export function __wbindgen_is_undefined(arg0) {
1252
- const ret = getObject(arg0) === undefined;
1253
- return ret;
1254
- };
1255
-
1256
- export function __wbindgen_in(arg0, arg1) {
1257
- const ret = getObject(arg0) in getObject(arg1);
1258
- return ret;
1259
- };
1260
-
1261
1289
  export function __wbindgen_is_bigint(arg0) {
1262
1290
  const ret = typeof(getObject(arg0)) === 'bigint';
1263
1291
  return ret;
@@ -1278,6 +1306,16 @@ export function __wbindgen_bigint_from_u64(arg0) {
1278
1306
  return addHeapObject(ret);
1279
1307
  };
1280
1308
 
1309
+ export function __wbindgen_in(arg0, arg1) {
1310
+ const ret = getObject(arg0) in getObject(arg1);
1311
+ return ret;
1312
+ };
1313
+
1314
+ export function __wbindgen_is_undefined(arg0) {
1315
+ const ret = getObject(arg0) === undefined;
1316
+ return ret;
1317
+ };
1318
+
1281
1319
  export function __wbindgen_is_string(arg0) {
1282
1320
  const ret = typeof(getObject(arg0)) === 'string';
1283
1321
  return ret;
@@ -1511,7 +1549,7 @@ export function __wbg_new_43f1b47c28813cbd(arg0, arg1) {
1511
1549
  const a = state0.a;
1512
1550
  state0.a = 0;
1513
1551
  try {
1514
- return __wbg_adapter_229(a, state0.b, arg0, arg1);
1552
+ return __wbg_adapter_234(a, state0.b, arg0, arg1);
1515
1553
  } finally {
1516
1554
  state0.a = a;
1517
1555
  }
@@ -1592,33 +1630,33 @@ export function __wbindgen_memory() {
1592
1630
  return addHeapObject(ret);
1593
1631
  };
1594
1632
 
1595
- export function __wbindgen_closure_wrapper1569(arg0, arg1, arg2) {
1596
- const ret = makeMutClosure(arg0, arg1, 617, __wbg_adapter_48);
1633
+ export function __wbindgen_closure_wrapper1602(arg0, arg1, arg2) {
1634
+ const ret = makeMutClosure(arg0, arg1, 640, __wbg_adapter_48);
1597
1635
  return addHeapObject(ret);
1598
1636
  };
1599
1637
 
1600
- export function __wbindgen_closure_wrapper1571(arg0, arg1, arg2) {
1601
- const ret = makeMutClosure(arg0, arg1, 617, __wbg_adapter_51);
1638
+ export function __wbindgen_closure_wrapper1604(arg0, arg1, arg2) {
1639
+ const ret = makeMutClosure(arg0, arg1, 640, __wbg_adapter_48);
1602
1640
  return addHeapObject(ret);
1603
1641
  };
1604
1642
 
1605
- export function __wbindgen_closure_wrapper1573(arg0, arg1, arg2) {
1606
- const ret = makeMutClosure(arg0, arg1, 617, __wbg_adapter_48);
1643
+ export function __wbindgen_closure_wrapper1606(arg0, arg1, arg2) {
1644
+ const ret = makeMutClosure(arg0, arg1, 640, __wbg_adapter_53);
1607
1645
  return addHeapObject(ret);
1608
1646
  };
1609
1647
 
1610
- export function __wbindgen_closure_wrapper1575(arg0, arg1, arg2) {
1611
- const ret = makeMutClosure(arg0, arg1, 617, __wbg_adapter_48);
1648
+ export function __wbindgen_closure_wrapper1608(arg0, arg1, arg2) {
1649
+ const ret = makeMutClosure(arg0, arg1, 640, __wbg_adapter_48);
1612
1650
  return addHeapObject(ret);
1613
1651
  };
1614
1652
 
1615
- export function __wbindgen_closure_wrapper2320(arg0, arg1, arg2) {
1616
- const ret = makeMutClosure(arg0, arg1, 733, __wbg_adapter_58);
1653
+ export function __wbindgen_closure_wrapper2354(arg0, arg1, arg2) {
1654
+ const ret = makeMutClosure(arg0, arg1, 756, __wbg_adapter_58);
1617
1655
  return addHeapObject(ret);
1618
1656
  };
1619
1657
 
1620
- export function __wbindgen_closure_wrapper2372(arg0, arg1, arg2) {
1621
- const ret = makeMutClosure(arg0, arg1, 757, __wbg_adapter_61);
1658
+ export function __wbindgen_closure_wrapper2406(arg0, arg1, arg2) {
1659
+ const ret = makeMutClosure(arg0, arg1, 780, __wbg_adapter_61);
1622
1660
  return addHeapObject(ret);
1623
1661
  };
1624
1662
 
package/lebai_sdk_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lebai_sdk",
3
3
  "description": "lebai_sdk",
4
- "version": "0.1.14",
4
+ "version": "0.1.15",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
7
7
  "type": "git",