Codecs Node.JS Modules
Within your codec, you can use some Node.JS modules that are convenient to ease your device integration, in addition to the Buffer interface. Two categories of modules are available in myDevices codec editor. The safe, and the unsafe ones, which require further approval by myDevices Team. You can find the list of those modules and version available below.
Safe Modules
Those modules are always available to be used.
- lodash: 4.17.21
- mathjs: 6.2.5
- moment: 2.29.4
- moment-timezone: 0.5.43
Unsafe modules
Those module can be allowed on a per codec basis by myDevices team.
- cbor: 9.0.2
- protobufjs: 7.2.5
- protocol-buffers: 5.0.0
- request: 2.88.2
Module usage
Simply use require
function at the beginning of your codec (either decoder.js or encoder.js file):
const mathjs = require("mathjs");
// the rest of your codec below ...