ammc-wasm
v1.2.1
Published
AMMC wasm module
Downloads
16
Maintainers
Readme
AMM Converter WASM module
Converts AMB binary native format to JSON.
The P3 protocol is used in timing HW devices like AMBrc Decoder, MYLAPS RC4 / DR5 Decoder, AMBmx3 Decoder, TranX3 Decoder, ChipX/ProChip Decoder or BIB Decoder.
Example
Use to_json
to convert hex binary string into JSON array of PASSINGs from decoder
The lib is wasm module and can be used from JavaScript like this (or see .ts file)
Include ammc-wasm
in dependencies:
"ammc-wasm": "1.2.0",
Import and use to_json
API
import * as wasm from "ammc-wasm";
let decoded_json = wasm.to_json("8e02330043df000001000104490c01000304c6e548000408e8f067b2e17b04000502a7000602f500080200008104e80904008f");
For complete example see the simplest sample project with nodejs and expressjs https://bitbucket.org/skokys/p3lib-example
Other than PASSING messages from decoder are ignored for now. Contact me if you need to extend the lib coverage