lebai_sdk 0.1.14 → 0.1.16
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 +23 -0
- package/lebai_sdk_bg.js +109 -71
- package/lebai_sdk_bg.wasm +0 -0
- package/package.json +1 -1
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
@@ -24,20 +24,7 @@ function takeObject(idx) {
|
|
24
24
|
return ret;
|
25
25
|
}
|
26
26
|
|
27
|
-
|
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();
|
27
|
+
let WASM_VECTOR_LEN = 0;
|
41
28
|
|
42
29
|
let cachedUint8Memory0 = null;
|
43
30
|
|
@@ -48,13 +35,6 @@ function getUint8Memory0() {
|
|
48
35
|
return cachedUint8Memory0;
|
49
36
|
}
|
50
37
|
|
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
38
|
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
59
39
|
|
60
40
|
let cachedTextEncoder = new lTextEncoder('utf-8');
|
@@ -123,6 +103,26 @@ function getInt32Memory0() {
|
|
123
103
|
return cachedInt32Memory0;
|
124
104
|
}
|
125
105
|
|
106
|
+
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
107
|
+
|
108
|
+
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
109
|
+
|
110
|
+
cachedTextDecoder.decode();
|
111
|
+
|
112
|
+
function getStringFromWasm0(ptr, len) {
|
113
|
+
ptr = ptr >>> 0;
|
114
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
115
|
+
}
|
116
|
+
|
117
|
+
function addHeapObject(obj) {
|
118
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
119
|
+
const idx = heap_next;
|
120
|
+
heap_next = heap[idx];
|
121
|
+
|
122
|
+
heap[idx] = obj;
|
123
|
+
return idx;
|
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.
|
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
|
238
|
-
wasm.
|
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.
|
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.
|
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
|
326
|
-
wasm.
|
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>}
|
@@ -1185,18 +1223,22 @@ export function __wbindgen_object_drop_ref(arg0) {
|
|
1185
1223
|
takeObject(arg0);
|
1186
1224
|
};
|
1187
1225
|
|
1188
|
-
export function
|
1189
|
-
const
|
1190
|
-
|
1226
|
+
export function __wbindgen_string_get(arg0, arg1) {
|
1227
|
+
const obj = getObject(arg1);
|
1228
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
1229
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1230
|
+
var len1 = WASM_VECTOR_LEN;
|
1231
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
1232
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
1191
1233
|
};
|
1192
1234
|
|
1193
|
-
export function
|
1194
|
-
const ret = arg0;
|
1235
|
+
export function __wbindgen_string_new(arg0, arg1) {
|
1236
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
1195
1237
|
return addHeapObject(ret);
|
1196
1238
|
};
|
1197
1239
|
|
1198
|
-
export function
|
1199
|
-
const ret =
|
1240
|
+
export function __wbindgen_number_new(arg0) {
|
1241
|
+
const ret = arg0;
|
1200
1242
|
return addHeapObject(ret);
|
1201
1243
|
};
|
1202
1244
|
|
@@ -1205,13 +1247,9 @@ export function __wbg_robot_new(arg0) {
|
|
1205
1247
|
return addHeapObject(ret);
|
1206
1248
|
};
|
1207
1249
|
|
1208
|
-
export function
|
1209
|
-
const
|
1210
|
-
|
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;
|
1250
|
+
export function __wbg_robotsubscription_new(arg0) {
|
1251
|
+
const ret = RobotSubscription.__wrap(arg0);
|
1252
|
+
return addHeapObject(ret);
|
1215
1253
|
};
|
1216
1254
|
|
1217
1255
|
export function __wbindgen_is_object(arg0) {
|
@@ -1220,6 +1258,12 @@ export function __wbindgen_is_object(arg0) {
|
|
1220
1258
|
return ret;
|
1221
1259
|
};
|
1222
1260
|
|
1261
|
+
export function __wbindgen_boolean_get(arg0) {
|
1262
|
+
const v = getObject(arg0);
|
1263
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
1264
|
+
return ret;
|
1265
|
+
};
|
1266
|
+
|
1223
1267
|
export function __wbindgen_cb_drop(arg0) {
|
1224
1268
|
const obj = takeObject(arg0).original;
|
1225
1269
|
if (obj.cnt-- == 1) {
|
@@ -1235,12 +1279,6 @@ export function __wbindgen_error_new(arg0, arg1) {
|
|
1235
1279
|
return addHeapObject(ret);
|
1236
1280
|
};
|
1237
1281
|
|
1238
|
-
export function __wbindgen_boolean_get(arg0) {
|
1239
|
-
const v = getObject(arg0);
|
1240
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
1241
|
-
return ret;
|
1242
|
-
};
|
1243
|
-
|
1244
1282
|
export function __wbindgen_number_get(arg0, arg1) {
|
1245
1283
|
const obj = getObject(arg1);
|
1246
1284
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
@@ -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
|
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
|
1596
|
-
const ret = makeMutClosure(arg0, arg1,
|
1633
|
+
export function __wbindgen_closure_wrapper1609(arg0, arg1, arg2) {
|
1634
|
+
const ret = makeMutClosure(arg0, arg1, 638, __wbg_adapter_48);
|
1597
1635
|
return addHeapObject(ret);
|
1598
1636
|
};
|
1599
1637
|
|
1600
|
-
export function
|
1601
|
-
const ret = makeMutClosure(arg0, arg1,
|
1638
|
+
export function __wbindgen_closure_wrapper1611(arg0, arg1, arg2) {
|
1639
|
+
const ret = makeMutClosure(arg0, arg1, 638, __wbg_adapter_48);
|
1602
1640
|
return addHeapObject(ret);
|
1603
1641
|
};
|
1604
1642
|
|
1605
|
-
export function
|
1606
|
-
const ret = makeMutClosure(arg0, arg1,
|
1643
|
+
export function __wbindgen_closure_wrapper1613(arg0, arg1, arg2) {
|
1644
|
+
const ret = makeMutClosure(arg0, arg1, 638, __wbg_adapter_53);
|
1607
1645
|
return addHeapObject(ret);
|
1608
1646
|
};
|
1609
1647
|
|
1610
|
-
export function
|
1611
|
-
const ret = makeMutClosure(arg0, arg1,
|
1648
|
+
export function __wbindgen_closure_wrapper1615(arg0, arg1, arg2) {
|
1649
|
+
const ret = makeMutClosure(arg0, arg1, 638, __wbg_adapter_48);
|
1612
1650
|
return addHeapObject(ret);
|
1613
1651
|
};
|
1614
1652
|
|
1615
|
-
export function
|
1616
|
-
const ret = makeMutClosure(arg0, arg1,
|
1653
|
+
export function __wbindgen_closure_wrapper2361(arg0, arg1, arg2) {
|
1654
|
+
const ret = makeMutClosure(arg0, arg1, 754, __wbg_adapter_58);
|
1617
1655
|
return addHeapObject(ret);
|
1618
1656
|
};
|
1619
1657
|
|
1620
|
-
export function
|
1621
|
-
const ret = makeMutClosure(arg0, arg1,
|
1658
|
+
export function __wbindgen_closure_wrapper2413(arg0, arg1, arg2) {
|
1659
|
+
const ret = makeMutClosure(arg0, arg1, 778, __wbg_adapter_61);
|
1622
1660
|
return addHeapObject(ret);
|
1623
1661
|
};
|
1624
1662
|
|
package/lebai_sdk_bg.wasm
CHANGED
Binary file
|