UNPKG

knxultimate

Version:

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

64 lines 1.61 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const KnxLog_1 = require("../KnxLog"); const logger = (0, KnxLog_1.module)('DPT238'); const config = { id: 'DPT238', formatAPDU: (value) => { const apdu_data = Buffer.alloc(1); apdu_data[0] = value; logger.debug(`input value = ${value} apdu_data = ${apdu_data}`); return apdu_data; }, fromBuffer: (buf) => { if (buf.length !== 1) { logger.error('Buffer should be 1 byte long, got', buf.length); return null; } const ret = buf[0]; return ret; }, basetype: { bitlength: 8, range: [,], valuetype: 'basic', desc: '1-byte', }, subtypes: { 102: { name: 'HVAC_Mode', desc: '', unit: '', scalar_range: [,], range: [,], }, '003': { desc: 'Angle', name: 'Angle degrees', unit: '°', scalar_range: [0, 360], }, '004': { desc: 'Percent_U8', name: 'Percent', unit: '%', }, '005': { desc: 'DecimalFactor', name: 'Ratio', unit: 'ratio', }, '006': { desc: 'Tariff', name: 'Tariff', unit: 'tariff', }, '010': { desc: 'Value_1_Ucount', name: 'Counter pulses', unit: 'pulses', }, }, }; exports.default = config; //# sourceMappingURL=dpt238.js.map