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.
35 lines • 1.31 kB
JavaScript
"use strict";
import { GW_FRAME_CFM } from "./common.js";
export class SoftwareVersion {
CommandVersion;
MainVersion;
SubVersion;
BranchID;
Build;
MicroBuild;
constructor(CommandVersion, MainVersion, SubVersion, BranchID, Build, MicroBuild) {
this.CommandVersion = CommandVersion;
this.MainVersion = MainVersion;
this.SubVersion = SubVersion;
this.BranchID = BranchID;
this.Build = Build;
this.MicroBuild = MicroBuild;
}
toString() {
return `${this.CommandVersion.toString()}.${this.MainVersion.toString()}.${this.SubVersion.toString()}.${this.BranchID.toString()}.${this.Build.toString()}.${this.MicroBuild.toString()}`;
}
}
export class GW_GET_VERSION_CFM extends GW_FRAME_CFM {
SoftwareVersion;
HardwareVersion;
ProductGroup;
ProductType;
constructor(Data) {
super(Data);
this.SoftwareVersion = new SoftwareVersion(this.Data.readUInt8(0), this.Data.readUInt8(1), this.Data.readUInt8(2), this.Data.readUInt8(3), this.Data.readUInt8(4), this.Data.readUInt8(5));
this.HardwareVersion = this.Data.readUInt8(6);
this.ProductGroup = this.Data.readUInt8(7);
this.ProductType = this.Data.readUInt8(8);
}
}
//# sourceMappingURL=GW_GET_VERSION_CFM.js.map