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.

25 lines 866 B
"use strict"; import { bitArrayToArray } from "../utils/BitArray.js"; import { GW_FRAME_CFM } from "./common.js"; export class GW_CS_ACTIVATE_CONFIGURATION_MODE_CFM extends GW_FRAME_CFM { ActivatedNodes; NoContactNodes; OtherErrorNodes; Status; constructor(Data) { super(Data); this.ActivatedNodes = bitArrayToArray(this.Data.subarray(0, 26)); this.NoContactNodes = bitArrayToArray(this.Data.subarray(26, 52)); this.OtherErrorNodes = bitArrayToArray(this.Data.subarray(52, 78)); this.Status = this.Data.readUInt8(78); } getError() { switch (this.Status) { case 0: throw new Error("No error."); default: return `Error code ${this.Status.toString()}.`; } } } //# sourceMappingURL=GW_CS_ACTIVATE_CONFIGURATION_MODE_CFM.js.map