Wrapper library for EtherCAT Slave Information (ESI) data structure parsed with Jsonix.
$ npm install ecatmod
const fs = require('fs');
const ecatmod = require('ecatmod');
const contents = fs.readFileSync('esi.xml', 'utf8');
const esi = ecatmod.unmarshalEsiString(contents);
ecatmod.applyToEsi(esi);
https://github.com/synapticon/ecatapi/tree/master/public/esi
$ git pull https://github.com/synapticon/ecatmod
$ cd ecatmod
$ npm run watch
Grunt command watches files for changes in src and specs directories and then runs linter and tests and builds documentation.
How to reformat and reindent profile JSON files:
$ npm -g install js-beautify
$ js-beautify --config .vscode/formatter.json -r src/profiles/SNCN.json