lebai_sdk 0.2.0 → 0.2.2
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 +22 -1
- package/lebai_sdk_bg.js +141 -92
- package/lebai_sdk_bg.wasm +0 -0
- package/package.json +1 -1
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;
|
@@ -74,6 +83,14 @@ export class Robot {
|
|
74
83
|
load_frame(name: string, dir?: string): Promise<any>;
|
75
84
|
/**
|
76
85
|
* @returns {Promise<void>}
|
86
|
+
*/
|
87
|
+
pause_move(): Promise<void>;
|
88
|
+
/**
|
89
|
+
* @returns {Promise<void>}
|
90
|
+
*/
|
91
|
+
resume_move(): Promise<void>;
|
92
|
+
/**
|
93
|
+
* @returns {Promise<void>}
|
77
94
|
*/
|
78
95
|
stop_move(): Promise<void>;
|
79
96
|
/**
|
@@ -161,7 +178,7 @@ export class Robot {
|
|
161
178
|
/**
|
162
179
|
* @returns {Promise<void>}
|
163
180
|
*/
|
164
|
-
|
181
|
+
teach_mode(): Promise<void>;
|
165
182
|
/**
|
166
183
|
* @returns {Promise<void>}
|
167
184
|
*/
|
@@ -518,6 +535,10 @@ export class Robot {
|
|
518
535
|
*/
|
519
536
|
get_robot_state(): Promise<any>;
|
520
537
|
/**
|
538
|
+
* @returns {Promise<any>}
|
539
|
+
*/
|
540
|
+
get_phy_data(): Promise<any>;
|
541
|
+
/**
|
521
542
|
* @param {string} name
|
522
543
|
* @param {string | undefined} [dir]
|
523
544
|
* @returns {Promise<any>}
|
package/lebai_sdk_bg.js
CHANGED
@@ -4,14 +4,43 @@ 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();
|
12
|
+
|
13
|
+
let cachedUint8Memory0 = null;
|
14
|
+
|
15
|
+
function getUint8Memory0() {
|
16
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
17
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
18
|
+
}
|
19
|
+
return cachedUint8Memory0;
|
20
|
+
}
|
21
|
+
|
22
|
+
function getStringFromWasm0(ptr, len) {
|
23
|
+
ptr = ptr >>> 0;
|
24
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
25
|
+
}
|
26
|
+
|
7
27
|
const heap = new Array(128).fill(undefined);
|
8
28
|
|
9
29
|
heap.push(undefined, null, true, false);
|
10
30
|
|
11
|
-
function getObject(idx) { return heap[idx]; }
|
12
|
-
|
13
31
|
let heap_next = heap.length;
|
14
32
|
|
33
|
+
function addHeapObject(obj) {
|
34
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
35
|
+
const idx = heap_next;
|
36
|
+
heap_next = heap[idx];
|
37
|
+
|
38
|
+
heap[idx] = obj;
|
39
|
+
return idx;
|
40
|
+
}
|
41
|
+
|
42
|
+
function getObject(idx) { return heap[idx]; }
|
43
|
+
|
15
44
|
function dropObject(idx) {
|
16
45
|
if (idx < 132) return;
|
17
46
|
heap[idx] = heap_next;
|
@@ -26,15 +55,6 @@ function takeObject(idx) {
|
|
26
55
|
|
27
56
|
let WASM_VECTOR_LEN = 0;
|
28
57
|
|
29
|
-
let cachedUint8Memory0 = null;
|
30
|
-
|
31
|
-
function getUint8Memory0() {
|
32
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
33
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
34
|
-
}
|
35
|
-
return cachedUint8Memory0;
|
36
|
-
}
|
37
|
-
|
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() {
|
@@ -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.wasm_bindgen__convert__closures__invoke1_mut__ha058cea286b456c0(arg0, arg1, addHeapObject(arg2));
|
235
235
|
}
|
236
236
|
|
237
|
-
function
|
238
|
-
wasm.
|
237
|
+
function __wbg_adapter_53(arg0, arg1) {
|
238
|
+
wasm.wasm_bindgen__convert__closures__invoke0_mut__h13c1a8ec7e32e4a9(arg0, arg1);
|
239
239
|
}
|
240
240
|
|
241
241
|
function __wbg_adapter_58(arg0, arg1, arg2) {
|
242
|
-
wasm.
|
242
|
+
wasm.wasm_bindgen__convert__closures__invoke1_mut__ha115c950321e3dff(arg0, arg1, addHeapObject(arg2));
|
243
243
|
}
|
244
244
|
|
245
245
|
function __wbg_adapter_61(arg0, arg1) {
|
246
|
-
wasm.
|
246
|
+
wasm.wasm_bindgen__convert__closures__invoke0_mut__h2729bc9fd6ad6c60(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
|
326
|
-
wasm.
|
353
|
+
function __wbg_adapter_249(arg0, arg1, arg2, arg3) {
|
354
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h1c52eb2f9f0daf09(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
327
355
|
}
|
328
356
|
|
329
357
|
/**
|
@@ -448,6 +476,20 @@ export class Robot {
|
|
448
476
|
/**
|
449
477
|
* @returns {Promise<void>}
|
450
478
|
*/
|
479
|
+
pause_move() {
|
480
|
+
const ret = wasm.robot_pause_move(this.__wbg_ptr);
|
481
|
+
return takeObject(ret);
|
482
|
+
}
|
483
|
+
/**
|
484
|
+
* @returns {Promise<void>}
|
485
|
+
*/
|
486
|
+
resume_move() {
|
487
|
+
const ret = wasm.robot_resume_move(this.__wbg_ptr);
|
488
|
+
return takeObject(ret);
|
489
|
+
}
|
490
|
+
/**
|
491
|
+
* @returns {Promise<void>}
|
492
|
+
*/
|
451
493
|
stop_move() {
|
452
494
|
const ret = wasm.robot_stop_move(this.__wbg_ptr);
|
453
495
|
return takeObject(ret);
|
@@ -570,8 +612,8 @@ export class Robot {
|
|
570
612
|
/**
|
571
613
|
* @returns {Promise<void>}
|
572
614
|
*/
|
573
|
-
|
574
|
-
const ret = wasm.
|
615
|
+
teach_mode() {
|
616
|
+
const ret = wasm.robot_teach_mode(this.__wbg_ptr);
|
575
617
|
return takeObject(ret);
|
576
618
|
}
|
577
619
|
/**
|
@@ -1187,6 +1229,13 @@ export class Robot {
|
|
1187
1229
|
return takeObject(ret);
|
1188
1230
|
}
|
1189
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
|
+
/**
|
1190
1239
|
* @param {string} name
|
1191
1240
|
* @param {string | undefined} [dir]
|
1192
1241
|
* @returns {Promise<any>}
|
@@ -1263,10 +1312,20 @@ export class RobotSubscription {
|
|
1263
1312
|
}
|
1264
1313
|
}
|
1265
1314
|
|
1315
|
+
export function __wbindgen_string_new(arg0, arg1) {
|
1316
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
1317
|
+
return addHeapObject(ret);
|
1318
|
+
};
|
1319
|
+
|
1266
1320
|
export function __wbindgen_object_drop_ref(arg0) {
|
1267
1321
|
takeObject(arg0);
|
1268
1322
|
};
|
1269
1323
|
|
1324
|
+
export function __wbindgen_number_new(arg0) {
|
1325
|
+
const ret = arg0;
|
1326
|
+
return addHeapObject(ret);
|
1327
|
+
};
|
1328
|
+
|
1270
1329
|
export function __wbindgen_string_get(arg0, arg1) {
|
1271
1330
|
const obj = getObject(arg1);
|
1272
1331
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
@@ -1276,23 +1335,13 @@ export function __wbindgen_string_get(arg0, arg1) {
|
|
1276
1335
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
1277
1336
|
};
|
1278
1337
|
|
1279
|
-
export function __wbindgen_number_new(arg0) {
|
1280
|
-
const ret = arg0;
|
1281
|
-
return addHeapObject(ret);
|
1282
|
-
};
|
1283
|
-
|
1284
|
-
export function __wbg_robot_new(arg0) {
|
1285
|
-
const ret = Robot.__wrap(arg0);
|
1286
|
-
return addHeapObject(ret);
|
1287
|
-
};
|
1288
|
-
|
1289
1338
|
export function __wbg_robotsubscription_new(arg0) {
|
1290
1339
|
const ret = RobotSubscription.__wrap(arg0);
|
1291
1340
|
return addHeapObject(ret);
|
1292
1341
|
};
|
1293
1342
|
|
1294
|
-
export function
|
1295
|
-
const ret =
|
1343
|
+
export function __wbg_robot_new(arg0) {
|
1344
|
+
const ret = Robot.__wrap(arg0);
|
1296
1345
|
return addHeapObject(ret);
|
1297
1346
|
};
|
1298
1347
|
|
@@ -1302,24 +1351,26 @@ export function __wbindgen_is_object(arg0) {
|
|
1302
1351
|
return ret;
|
1303
1352
|
};
|
1304
1353
|
|
1305
|
-
export function
|
1306
|
-
const
|
1307
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
1354
|
+
export function __wbindgen_is_undefined(arg0) {
|
1355
|
+
const ret = getObject(arg0) === undefined;
|
1308
1356
|
return ret;
|
1309
1357
|
};
|
1310
1358
|
|
1311
|
-
export function
|
1312
|
-
const ret = getObject(arg0);
|
1313
|
-
return
|
1359
|
+
export function __wbindgen_in(arg0, arg1) {
|
1360
|
+
const ret = getObject(arg0) in getObject(arg1);
|
1361
|
+
return ret;
|
1314
1362
|
};
|
1315
1363
|
|
1316
|
-
export function
|
1317
|
-
const obj =
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1364
|
+
export function __wbindgen_number_get(arg0, arg1) {
|
1365
|
+
const obj = getObject(arg1);
|
1366
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
1367
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
1368
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
1369
|
+
};
|
1370
|
+
|
1371
|
+
export function __wbindgen_boolean_get(arg0) {
|
1372
|
+
const v = getObject(arg0);
|
1373
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
1323
1374
|
return ret;
|
1324
1375
|
};
|
1325
1376
|
|
@@ -1343,20 +1394,13 @@ export function __wbindgen_bigint_from_u64(arg0) {
|
|
1343
1394
|
return addHeapObject(ret);
|
1344
1395
|
};
|
1345
1396
|
|
1346
|
-
export function
|
1347
|
-
const obj =
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
}
|
1352
|
-
|
1353
|
-
export function __wbindgen_in(arg0, arg1) {
|
1354
|
-
const ret = getObject(arg0) in getObject(arg1);
|
1355
|
-
return ret;
|
1356
|
-
};
|
1357
|
-
|
1358
|
-
export function __wbindgen_is_undefined(arg0) {
|
1359
|
-
const ret = getObject(arg0) === undefined;
|
1397
|
+
export function __wbindgen_cb_drop(arg0) {
|
1398
|
+
const obj = takeObject(arg0).original;
|
1399
|
+
if (obj.cnt-- == 1) {
|
1400
|
+
obj.a = 0;
|
1401
|
+
return true;
|
1402
|
+
}
|
1403
|
+
const ret = false;
|
1360
1404
|
return ret;
|
1361
1405
|
};
|
1362
1406
|
|
@@ -1365,6 +1409,11 @@ export function __wbindgen_error_new(arg0, arg1) {
|
|
1365
1409
|
return addHeapObject(ret);
|
1366
1410
|
};
|
1367
1411
|
|
1412
|
+
export function __wbindgen_object_clone_ref(arg0) {
|
1413
|
+
const ret = getObject(arg0);
|
1414
|
+
return addHeapObject(ret);
|
1415
|
+
};
|
1416
|
+
|
1368
1417
|
export function __wbindgen_is_string(arg0) {
|
1369
1418
|
const ret = typeof(getObject(arg0)) === 'string';
|
1370
1419
|
return ret;
|
@@ -1627,7 +1676,7 @@ export function __wbg_new_60f57089c7563e81(arg0, arg1) {
|
|
1627
1676
|
const a = state0.a;
|
1628
1677
|
state0.a = 0;
|
1629
1678
|
try {
|
1630
|
-
return
|
1679
|
+
return __wbg_adapter_249(a, state0.b, arg0, arg1);
|
1631
1680
|
} finally {
|
1632
1681
|
state0.a = a;
|
1633
1682
|
}
|
@@ -1708,33 +1757,33 @@ export function __wbindgen_memory() {
|
|
1708
1757
|
return addHeapObject(ret);
|
1709
1758
|
};
|
1710
1759
|
|
1711
|
-
export function
|
1712
|
-
const ret = makeMutClosure(arg0, arg1,
|
1760
|
+
export function __wbindgen_closure_wrapper1731(arg0, arg1, arg2) {
|
1761
|
+
const ret = makeMutClosure(arg0, arg1, 701, __wbg_adapter_48);
|
1713
1762
|
return addHeapObject(ret);
|
1714
1763
|
};
|
1715
1764
|
|
1716
|
-
export function
|
1717
|
-
const ret = makeMutClosure(arg0, arg1,
|
1765
|
+
export function __wbindgen_closure_wrapper1733(arg0, arg1, arg2) {
|
1766
|
+
const ret = makeMutClosure(arg0, arg1, 701, __wbg_adapter_48);
|
1718
1767
|
return addHeapObject(ret);
|
1719
1768
|
};
|
1720
1769
|
|
1721
|
-
export function
|
1722
|
-
const ret = makeMutClosure(arg0, arg1,
|
1770
|
+
export function __wbindgen_closure_wrapper1735(arg0, arg1, arg2) {
|
1771
|
+
const ret = makeMutClosure(arg0, arg1, 701, __wbg_adapter_53);
|
1723
1772
|
return addHeapObject(ret);
|
1724
1773
|
};
|
1725
1774
|
|
1726
|
-
export function
|
1727
|
-
const ret = makeMutClosure(arg0, arg1,
|
1775
|
+
export function __wbindgen_closure_wrapper1737(arg0, arg1, arg2) {
|
1776
|
+
const ret = makeMutClosure(arg0, arg1, 701, __wbg_adapter_48);
|
1728
1777
|
return addHeapObject(ret);
|
1729
1778
|
};
|
1730
1779
|
|
1731
|
-
export function
|
1732
|
-
const ret = makeMutClosure(arg0, arg1,
|
1780
|
+
export function __wbindgen_closure_wrapper2471(arg0, arg1, arg2) {
|
1781
|
+
const ret = makeMutClosure(arg0, arg1, 811, __wbg_adapter_58);
|
1733
1782
|
return addHeapObject(ret);
|
1734
1783
|
};
|
1735
1784
|
|
1736
|
-
export function
|
1737
|
-
const ret = makeMutClosure(arg0, arg1,
|
1785
|
+
export function __wbindgen_closure_wrapper2520(arg0, arg1, arg2) {
|
1786
|
+
const ret = makeMutClosure(arg0, arg1, 830, __wbg_adapter_61);
|
1738
1787
|
return addHeapObject(ret);
|
1739
1788
|
};
|
1740
1789
|
|
package/lebai_sdk_bg.wasm
CHANGED
Binary file
|