stanag4609helper
A STANAG 4609 helper library (for node and browsers)
Functionality:
convert601ToDetailedJson
Convert json packet (MISB601 standard) into human readable json packet with detailed information.
Supported sub standards:
- MISB 102
- MISB 1204
- MISB 903
- MISB 806
Getting started
Clone this repository and install its dependencies:
git clone https://github.com/impleotv/stanag4609helper
cd stanag4609helper
npm install
npm run build
builds the library to dist
, generating three files:
-
dist/stanag4609helper.cjs.js
A CommonJS bundle, suitable for use in Node.js, thatrequire
s the external dependency. This corresponds to the"main"
field in package.json -
dist/stanag4609helper.esm.js
an ES module bundle, suitable for use in other people's libraries and applications, thatimport
s the external dependency. This corresponds to the"module"
field in package.json -
dist/stanag4609helper.umd.js
a UMD build, suitable for use in any environment (including the browser, as a<script>
tag), that includes the external dependency. This corresponds to the"browser"
field in package.json
npm run dev
builds the library, then keeps rebuilding it whenever the source files change using rollup-watch.
npm test
builds the library, then tests it.
Note. The output is uglyfied, if needed remove the terser plugin from the rollup configuration file.
Usage
import convert601ToDetailedJson from 'stanag4609helper';
// Load a test json array with packets
const file601Pckts = JSON.parse(fs.readFileSync('./data/sample601Pckt.json'));
file601Pckts.forEach(pckt => {
const hrNoTags = convert601ToDetailedJson(pckt, false);
console.log(hrNoTags);
const hrWithTags = convert601ToDetailedJson(pckt, true);
console.log(hrWithTags);
});
License
IMPLEOTV SYSTEMS LTD.