m-bus-parser-wasm-pack 0.0.1 → 0.0.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.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* @param {string}
|
|
4
|
+
* @param {string} data
|
|
5
|
+
* @param {string} format
|
|
5
6
|
* @returns {string}
|
|
6
7
|
*/
|
|
7
|
-
export function m_bus_parse(
|
|
8
|
+
export function m_bus_parse(data: string, format: string): string;
|
|
@@ -91,25 +91,28 @@ function getStringFromWasm0(ptr, len) {
|
|
|
91
91
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* @param {string}
|
|
94
|
+
* @param {string} data
|
|
95
|
+
* @param {string} format
|
|
95
96
|
* @returns {string}
|
|
96
97
|
*/
|
|
97
|
-
export function m_bus_parse(
|
|
98
|
-
let
|
|
99
|
-
let
|
|
98
|
+
export function m_bus_parse(data, format) {
|
|
99
|
+
let deferred3_0;
|
|
100
|
+
let deferred3_1;
|
|
100
101
|
try {
|
|
101
102
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
102
|
-
const ptr0 = passStringToWasm0(
|
|
103
|
+
const ptr0 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
103
104
|
const len0 = WASM_VECTOR_LEN;
|
|
104
|
-
|
|
105
|
+
const ptr1 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
106
|
+
const len1 = WASM_VECTOR_LEN;
|
|
107
|
+
wasm.m_bus_parse(retptr, ptr0, len0, ptr1, len1);
|
|
105
108
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
106
109
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
deferred3_0 = r0;
|
|
111
|
+
deferred3_1 = r1;
|
|
109
112
|
return getStringFromWasm0(r0, r1);
|
|
110
113
|
} finally {
|
|
111
114
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
112
|
-
wasm.__wbindgen_free(
|
|
115
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
113
116
|
}
|
|
114
117
|
}
|
|
115
118
|
|
|
Binary file
|