UNPKG

klf-200-api

Version:

This module provides a wrapper to the socket API of a Velux KLF-200 interface. You will need at least firmware 0.2.0.0.71 on your KLF interface for this library to work.

19 lines 764 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GW_PASSWORD_ENTER_REQ = void 0; const common_js_1 = require("./common.js"); class GW_PASSWORD_ENTER_REQ extends common_js_1.GW_FRAME_REQ { constructor(password) { super(common_js_1.C_MAX_PWD_LENGTH); this.Password = password; } set Password(newPassword) { const buffer = Buffer.from(newPassword, "utf8"); if (buffer.byteLength > common_js_1.C_MAX_PWD_LENGTH) throw new Error("Password must not exceed 32 characters length."); this.Data.fill(0, this.offset); buffer.copy(this.Data, this.offset); } } exports.GW_PASSWORD_ENTER_REQ = GW_PASSWORD_ENTER_REQ; //# sourceMappingURL=GW_PASSWORD_ENTER_REQ.js.map