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.

23 lines 733 B
"use strict"; import { GW_FRAME_CFM } from "./common.js"; import { CommandStatus } from "./GW_COMMAND.js"; export class GW_COMMAND_SEND_CFM extends GW_FRAME_CFM { SessionID; CommandStatus; constructor(Data) { super(Data); this.SessionID = this.Data.readUInt16BE(0); this.CommandStatus = this.Data.readUInt8(2); } getError() { switch (this.CommandStatus) { case CommandStatus.CommandAccepted: return "No error."; case CommandStatus.CommandRejected: return "Command rejected."; default: return `Unknown error ${this.CommandStatus}.`; } } } //# sourceMappingURL=GW_COMMAND_SEND_CFM.js.map