zigbee-herdsman-zigate
Version:
An open source ZigBee gateway solution with node.js.
148 lines • 6.6 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ZiGateMessage = void 0;
const constants_1 = require("./constants");
exports.ZiGateMessage = {
[]: {
response: [
{ name: 'timestampUTC', parameterType: 'UINT32' },
]
},
[]: {
response: [
{ name: 'shortAddress', parameterType: 'UINT16BE' },
{ name: 'ieee', parameterType: 'IEEEADDR' },
{ name: 'MACcapability', parameterType: 'MACCAPABILITY' },
// MAC capability
// Bit 0 – Alternate PAN Coordinator
// Bit 1 – Device Type
// Bit 2 – Power source
// Bit 3 – Receiver On when Idle
// Bit 4,5 – Reserved
// Bit 6 – Security capability
// Bit 7 – Allocate Address
{ name: 'rejoin', parameterType: 'UINT8' },
]
},
[]: {
response: [
{ name: 'status', parameterType: 'UINT8' },
// 0 = Success
// 1 = Incorrect parameters
// 2 = Unhandled command
// 3 = Command failed
// eslint-disable-next-line max-len
// 4 = Busy (Node is carrying out a lengthy operation and is currently unable to handle the incoming command)
// 5 = Stack already started (no new configuration accepted)
// 128 – 244 = Failed (ZigBee event codes)
// Packet Type: The value of the initiating command request.
{ name: 'sequence', parameterType: 'UINT8' },
{ name: 'packetType', parameterType: 'UINT16BE' },
{ name: 'rawError', parameterType: 'BUFFER' },
]
},
[]: {
response: [
{ name: 'status', parameterType: 'UINT8' },
]
},
[]: {
response: [
{ name: 'status', parameterType: 'UINT8' },
{ name: 'profileID', parameterType: 'UINT16BE' },
{ name: 'clusterID', parameterType: 'UINT16BE' },
{ name: 'sourceEndpoint', parameterType: 'UINT8' },
{ name: 'destinationEndpoint', parameterType: 'UINT8' },
{ name: 'sourceAddressMode', parameterType: 'UINT8' },
{ name: 'sourceAddress', parameterType: 'ADDRESS_WITH_TYPE_DEPENDENCY' },
// <source address: uint16_t or uint64_t>
{ name: 'destinationAddressMode', parameterType: 'UINT8' },
// <destination address mode: uint8_t>
{ name: 'destinationAddress', parameterType: 'ADDRESS_WITH_TYPE_DEPENDENCY' },
// <destination address: uint16_t or uint64_t>
// {name: 'payloadSize', parameterType:'UINT8'}, // <payload size : uint8_t>
{ name: 'payload', parameterType: 'BUFFER_RAW' },
]
},
[]: {
response: [
{ name: 'status', parameterType: 'UINT8' },
// {name: 'sourceEndpoint', parameterType:'UINT8'}, // <source endpoint: uint8_t>
// {name: 'destinationAddressMode', parameterType:'UINT8'},
// // <destination address mode: uint8_t>
{ name: 'destinationAddress', parameterType: 'UINT16BE' },
{ name: 'destinationEndpoint', parameterType: 'UINT8' },
{ name: 'clusterID', parameterType: 'UINT16BE' },
// // <destination address: uint16_t or uint64_t>
{ name: 'seqNumber', parameterType: 'UINT8' },
]
},
[]: {
response: [
{ name: 'shortAddress', parameterType: 'UINT16BE' },
{ name: 'extendedAddress', parameterType: 'IEEEADDR' },
{ name: 'PANID', parameterType: 'UINT16BE' },
{ name: 'ExtPANID', parameterType: 'IEEEADDR' },
{ name: 'Channel', parameterType: 'UINT8' },
]
},
[]: {
response: [
{ name: 'majorVersion', parameterType: 'UINT16BE' },
{ name: 'installerVersion', parameterType: 'UINT16BE' },
]
},
[]: {
response: [
{ name: 'status', parameterType: 'UINT8' },
// Status:
// 0 = Joined existing network
// 1 = Formed new network
// 128 – 244 = Failed (ZigBee event codes)
{ name: 'shortAddress', parameterType: 'UINT16BE' },
{ name: 'extendedAddress', parameterType: 'IEEEADDR' },
{ name: 'channel', parameterType: 'UINT8' },
]
},
[]: {
response: [
{ name: 'extendedAddress', parameterType: 'IEEEADDR' },
{ name: 'rejoin', parameterType: 'UINT8' },
]
},
[]: {
response: [
{ name: 'status', parameterType: 'UINT8' },
{ name: 'nwkStatus', parameterType: 'UINT8' },
]
},
[]: {
response: [
{ name: 'status', parameterType: 'UINT8' },
{ name: 'sourceEndpoint', parameterType: 'UINT8' },
{ name: 'destinationEndpoint', parameterType: 'UINT8' },
{ name: 'destinationAddressMode', parameterType: 'UINT8' },
{ name: 'destinationAddress', parameterType: 'ADDRESS_WITH_TYPE_DEPENDENCY' },
// <destination address: uint64_t>
{ name: 'seqNumber', parameterType: 'UINT8' },
]
},
[]: {
response: [
{ name: 'sequence', parameterType: 'UINT8' },
{ name: 'status', parameterType: 'UINT8' },
{ name: 'nwkAddr', parameterType: 'UINT16' },
{ name: 'endpointCount', parameterType: 'UINT8' },
{ name: 'endpoints', parameterType: 'LIST_UINT8' },
]
},
[]: {
response: [
{ name: 'sourceEndpoint', parameterType: 'UINT8' },
{ name: 'profile ID', parameterType: 'UINT8' },
{ name: 'clusterID', parameterType: 'UINT16' },
{ name: 'attributeList', parameterType: 'LIST_UINT16BE' },
]
},
};
//# sourceMappingURL=messageType.js.map