zigbee-herdsman-zigate
Version:
An open source ZigBee gateway solution with node.js.
30 lines • 904 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ZGActiveEndpointMessage = void 0;
const message_1 = require("../message");
const debug_1 = require("../../debug");
const debug = debug_1.Debug('driver:messages');
class ZGActiveEndpointMessage {
constructor(payload) {
this.label = 'active-endpoint';
this.code = message_1.ZGMessageCode.ActiveEndpoint;
this.payload = this.fromBuffer(payload);
debug.log.extend(`${this.getLabel()}`)(this.payload);
}
getCode() {
return this.code;
}
getLabel() {
return this.label;
}
getPayload() {
return this.payload;
}
fromBuffer(payload) {
return {
shortAddress: payload.readUInt16BE(0).toString(16),
};
}
}
exports.ZGActiveEndpointMessage = ZGActiveEndpointMessage;
//# sourceMappingURL=active-endpoint.js.map