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.

24 lines 776 B
"use strict"; import { GW_COMMON_STATUS, GW_FRAME_CFM } from "./common.js"; export class GW_GET_GROUP_INFORMATION_CFM extends GW_FRAME_CFM { GroupID; Status; constructor(Data) { super(Data); this.Status = this.Data.readUInt8(0); this.GroupID = this.Data.readUInt8(1); } getError() { switch (this.Status) { case GW_COMMON_STATUS.SUCCESS: throw new Error("No error."); case GW_COMMON_STATUS.ERROR: return "Request failed."; case GW_COMMON_STATUS.INVALID_NODE_ID: return "Invalid group ID."; default: return `Unknown error ${this.Status}.`; } } } //# sourceMappingURL=GW_GET_GROUP_INFORMATION_CFM.js.map