UNPKG

knxultimate

Version:

KNX IP protocol implementation for Node. This is the ENGINE of Node-Red KNX-Ultimate node.

48 lines 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const config = { id: 'DPT29', formatAPDU(value) { if (typeof value === 'string') value = BigInt(value); const apdu_data = Buffer.allocUnsafe(8); apdu_data.writeBigInt64BE(value, 0); return apdu_data; }, fromBuffer(buf) { return buf.readBigInt64BE(0); }, basetype: { bitlength: 64, signedness: 'signed', valuetype: 'basic', desc: '8-byte V64 signed value', help: `// Send 8-byte signed value range: [-9223372036854775808, 9223372036854775807]. // REMEMBER to add "n" after a big integer number, or pass the number as string msg.payload = 9223372036854775808n; // numerical value with "n" at the end, representing a bigint msg.payload = "9223372036854775808"; // string value, that will be automatically converted into bigint return msg;`, }, subtypes: { '010': { use: 'G', desc: 'DPT_ActiveEnergy_64', name: 'Active energy V64 (Wh)', unit: 'Wh', }, '011': { use: 'G', desc: 'DPT_ApparantEnergy_V64', name: 'Apparant energy V64 (VAh)', unit: 'VAh', }, '012': { use: 'G', desc: 'DPT_ReactiveEnergy_V64', name: 'Reactive energy V64 (VARh)', unit: 'VARh', }, }, }; exports.default = config; //# sourceMappingURL=dpt29.js.map