@zwave-js/cc 13.10.1 → 14.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cc/AlarmSensorCC.d.ts +31 -20
- package/build/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/cc/AlarmSensorCC.js +106 -87
- package/build/cc/AlarmSensorCC.js.map +1 -1
- package/build/cc/AssociationCC.d.ts +38 -32
- package/build/cc/AssociationCC.d.ts.map +1 -1
- package/build/cc/AssociationCC.js +193 -176
- package/build/cc/AssociationCC.js.map +1 -1
- package/build/cc/AssociationGroupInfoCC.d.ts +42 -36
- package/build/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/cc/AssociationGroupInfoCC.js +218 -200
- package/build/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/cc/BarrierOperatorCC.d.ts +41 -24
- package/build/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/cc/BarrierOperatorCC.js +143 -109
- package/build/cc/BarrierOperatorCC.js.map +1 -1
- package/build/cc/BasicCC.d.ts +22 -23
- package/build/cc/BasicCC.d.ts.map +1 -1
- package/build/cc/BasicCC.js +83 -77
- package/build/cc/BasicCC.js.map +1 -1
- package/build/cc/BatteryCC.d.ts +22 -14
- package/build/cc/BatteryCC.d.ts.map +1 -1
- package/build/cc/BatteryCC.js +116 -87
- package/build/cc/BatteryCC.js.map +1 -1
- package/build/cc/BinarySensorCC.d.ts +22 -19
- package/build/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/cc/BinarySensorCC.js +103 -93
- package/build/cc/BinarySensorCC.js.map +1 -1
- package/build/cc/BinarySwitchCC.d.ts +20 -20
- package/build/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/cc/BinarySwitchCC.js +71 -59
- package/build/cc/BinarySwitchCC.js.map +1 -1
- package/build/cc/CRC16CC.d.ts +9 -9
- package/build/cc/CRC16CC.d.ts.map +1 -1
- package/build/cc/CRC16CC.js +36 -36
- package/build/cc/CRC16CC.js.map +1 -1
- package/build/cc/CentralSceneCC.d.ts +34 -16
- package/build/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/cc/CentralSceneCC.js +116 -79
- package/build/cc/CentralSceneCC.js.map +1 -1
- package/build/cc/ClimateControlScheduleCC.d.ts +38 -21
- package/build/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/cc/ClimateControlScheduleCC.js +113 -81
- package/build/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/cc/ClockCC.d.ts +18 -11
- package/build/cc/ClockCC.d.ts.map +1 -1
- package/build/cc/ClockCC.js +57 -43
- package/build/cc/ClockCC.js.map +1 -1
- package/build/cc/ColorSwitchCC.d.ts +37 -33
- package/build/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/cc/ColorSwitchCC.js +216 -189
- package/build/cc/ColorSwitchCC.js.map +1 -1
- package/build/cc/ConfigurationCC.d.ts +89 -74
- package/build/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/cc/ConfigurationCC.js +541 -485
- package/build/cc/ConfigurationCC.js.map +1 -1
- package/build/cc/DeviceResetLocallyCC.d.ts +3 -3
- package/build/cc/DeviceResetLocallyCC.d.ts.map +1 -1
- package/build/cc/DeviceResetLocallyCC.js +14 -14
- package/build/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/cc/DoorLockCC.d.ts +66 -27
- package/build/cc/DoorLockCC.d.ts.map +1 -1
- package/build/cc/DoorLockCC.js +288 -197
- package/build/cc/DoorLockCC.js.map +1 -1
- package/build/cc/DoorLockLoggingCC.d.ts +23 -13
- package/build/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/cc/DoorLockLoggingCC.js +81 -63
- package/build/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/cc/EnergyProductionCC.d.ts +16 -14
- package/build/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/cc/EnergyProductionCC.js +58 -52
- package/build/cc/EnergyProductionCC.js.map +1 -1
- package/build/cc/EntryControlCC.d.ts +44 -18
- package/build/cc/EntryControlCC.d.ts.map +1 -1
- package/build/cc/EntryControlCC.js +163 -112
- package/build/cc/EntryControlCC.js.map +1 -1
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts +69 -34
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/cc/FirmwareUpdateMetaDataCC.js +311 -245
- package/build/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/cc/HumidityControlModeCC.d.ts +24 -16
- package/build/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/cc/HumidityControlModeCC.js +80 -65
- package/build/cc/HumidityControlModeCC.js.map +1 -1
- package/build/cc/HumidityControlOperatingStateCC.d.ts +11 -7
- package/build/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/cc/HumidityControlOperatingStateCC.js +31 -22
- package/build/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/cc/HumidityControlSetpointCC.d.ts +68 -49
- package/build/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/cc/HumidityControlSetpointCC.js +203 -181
- package/build/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/cc/InclusionControllerCC.d.ts +13 -11
- package/build/cc/InclusionControllerCC.d.ts.map +1 -1
- package/build/cc/InclusionControllerCC.js +49 -42
- package/build/cc/InclusionControllerCC.js.map +1 -1
- package/build/cc/IndicatorCC.d.ts +46 -39
- package/build/cc/IndicatorCC.d.ts.map +1 -1
- package/build/cc/IndicatorCC.js +298 -277
- package/build/cc/IndicatorCC.js.map +1 -1
- package/build/cc/IrrigationCC.d.ts +127 -57
- package/build/cc/IrrigationCC.d.ts.map +1 -1
- package/build/cc/IrrigationCC.js +496 -352
- package/build/cc/IrrigationCC.js.map +1 -1
- package/build/cc/LanguageCC.d.ts +17 -11
- package/build/cc/LanguageCC.d.ts.map +1 -1
- package/build/cc/LanguageCC.js +54 -44
- package/build/cc/LanguageCC.js.map +1 -1
- package/build/cc/LockCC.d.ts +16 -11
- package/build/cc/LockCC.d.ts.map +1 -1
- package/build/cc/LockCC.js +48 -38
- package/build/cc/LockCC.js.map +1 -1
- package/build/cc/ManufacturerProprietaryCC.d.ts +12 -11
- package/build/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/cc/ManufacturerProprietaryCC.js +45 -50
- package/build/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/cc/ManufacturerSpecificCC.d.ts +20 -13
- package/build/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/cc/ManufacturerSpecificCC.js +79 -63
- package/build/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/cc/MeterCC.d.ts +30 -26
- package/build/cc/MeterCC.d.ts.map +1 -1
- package/build/cc/MeterCC.js +236 -204
- package/build/cc/MeterCC.js.map +1 -1
- package/build/cc/MultiChannelAssociationCC.d.ts +31 -26
- package/build/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/cc/MultiChannelAssociationCC.js +177 -168
- package/build/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/cc/MultiChannelCC.d.ts +70 -49
- package/build/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/cc/MultiChannelCC.js +377 -318
- package/build/cc/MultiChannelCC.js.map +1 -1
- package/build/cc/MultiCommandCC.d.ts +9 -9
- package/build/cc/MultiCommandCC.d.ts.map +1 -1
- package/build/cc/MultiCommandCC.js +35 -36
- package/build/cc/MultiCommandCC.js.map +1 -1
- package/build/cc/MultilevelSensorCC.d.ts +38 -33
- package/build/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/cc/MultilevelSensorCC.js +172 -152
- package/build/cc/MultilevelSensorCC.js.map +1 -1
- package/build/cc/MultilevelSwitchCC.d.ts +29 -25
- package/build/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/cc/MultilevelSwitchCC.js +147 -127
- package/build/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/cc/NoOperationCC.d.ts +0 -8
- package/build/cc/NoOperationCC.d.ts.map +1 -1
- package/build/cc/NoOperationCC.js +2 -11
- package/build/cc/NoOperationCC.js.map +1 -1
- package/build/cc/NodeNamingCC.d.ts +27 -17
- package/build/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/cc/NodeNamingCC.js +86 -69
- package/build/cc/NodeNamingCC.js.map +1 -1
- package/build/cc/NotificationCC.d.ts +46 -43
- package/build/cc/NotificationCC.d.ts.map +1 -1
- package/build/cc/NotificationCC.js +317 -303
- package/build/cc/NotificationCC.js.map +1 -1
- package/build/cc/PowerlevelCC.d.ts +22 -18
- package/build/cc/PowerlevelCC.d.ts.map +1 -1
- package/build/cc/PowerlevelCC.js +125 -95
- package/build/cc/PowerlevelCC.js.map +1 -1
- package/build/cc/ProtectionCC.d.ts +49 -26
- package/build/cc/ProtectionCC.d.ts.map +1 -1
- package/build/cc/ProtectionCC.js +172 -126
- package/build/cc/ProtectionCC.js.map +1 -1
- package/build/cc/SceneActivationCC.d.ts +8 -7
- package/build/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/cc/SceneActivationCC.js +28 -23
- package/build/cc/SceneActivationCC.js.map +1 -1
- package/build/cc/SceneActuatorConfigurationCC.d.ts +23 -15
- package/build/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/cc/SceneActuatorConfigurationCC.js +79 -62
- package/build/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/cc/SceneControllerConfigurationCC.d.ts +25 -17
- package/build/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/cc/SceneControllerConfigurationCC.js +92 -78
- package/build/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/cc/ScheduleEntryLockCC.d.ts +86 -72
- package/build/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/cc/ScheduleEntryLockCC.js +607 -455
- package/build/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/cc/Security2CC.d.ts +78 -87
- package/build/cc/Security2CC.d.ts.map +1 -1
- package/build/cc/Security2CC.js +798 -765
- package/build/cc/Security2CC.js.map +1 -1
- package/build/cc/SecurityCC.d.ts +47 -42
- package/build/cc/SecurityCC.d.ts.map +1 -1
- package/build/cc/SecurityCC.js +240 -218
- package/build/cc/SecurityCC.js.map +1 -1
- package/build/cc/SoundSwitchCC.d.ts +36 -29
- package/build/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/cc/SoundSwitchCC.js +180 -157
- package/build/cc/SoundSwitchCC.js.map +1 -1
- package/build/cc/SupervisionCC.d.ts +17 -14
- package/build/cc/SupervisionCC.d.ts.map +1 -1
- package/build/cc/SupervisionCC.js +86 -66
- package/build/cc/SupervisionCC.js.map +1 -1
- package/build/cc/ThermostatFanModeCC.d.ts +25 -15
- package/build/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/cc/ThermostatFanModeCC.js +79 -60
- package/build/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/cc/ThermostatFanStateCC.d.ts +11 -7
- package/build/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/cc/ThermostatFanStateCC.js +31 -22
- package/build/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/cc/ThermostatModeCC.d.ts +24 -21
- package/build/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/cc/ThermostatModeCC.js +106 -90
- package/build/cc/ThermostatModeCC.js.map +1 -1
- package/build/cc/ThermostatOperatingStateCC.d.ts +11 -7
- package/build/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/cc/ThermostatOperatingStateCC.js +31 -22
- package/build/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/cc/ThermostatSetbackCC.d.ts +14 -13
- package/build/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/cc/ThermostatSetbackCC.js +64 -57
- package/build/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/cc/ThermostatSetpointCC.d.ts +38 -57
- package/build/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/cc/ThermostatSetpointCC.js +200 -264
- package/build/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/cc/TimeCC.d.ts +24 -20
- package/build/cc/TimeCC.d.ts.map +1 -1
- package/build/cc/TimeCC.js +119 -108
- package/build/cc/TimeCC.js.map +1 -1
- package/build/cc/TimeParametersCC.d.ts +18 -14
- package/build/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/cc/TimeParametersCC.js +77 -69
- package/build/cc/TimeParametersCC.js.map +1 -1
- package/build/cc/TransportServiceCC.d.ts +29 -32
- package/build/cc/TransportServiceCC.d.ts.map +1 -1
- package/build/cc/TransportServiceCC.js +159 -161
- package/build/cc/TransportServiceCC.js.map +1 -1
- package/build/cc/UserCodeCC.d.ts +83 -66
- package/build/cc/UserCodeCC.d.ts.map +1 -1
- package/build/cc/UserCodeCC.js +449 -402
- package/build/cc/UserCodeCC.js.map +1 -1
- package/build/cc/VersionCC.d.ts +36 -20
- package/build/cc/VersionCC.d.ts.map +1 -1
- package/build/cc/VersionCC.js +190 -149
- package/build/cc/VersionCC.js.map +1 -1
- package/build/cc/WakeUpCC.d.ts +27 -13
- package/build/cc/WakeUpCC.d.ts.map +1 -1
- package/build/cc/WakeUpCC.js +105 -77
- package/build/cc/WakeUpCC.js.map +1 -1
- package/build/cc/WindowCoveringCC.d.ts +39 -27
- package/build/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/cc/WindowCoveringCC.js +169 -137
- package/build/cc/WindowCoveringCC.js.map +1 -1
- package/build/cc/ZWavePlusCC.d.ts +8 -7
- package/build/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/cc/ZWavePlusCC.js +44 -37
- package/build/cc/ZWavePlusCC.js.map +1 -1
- package/build/cc/ZWaveProtocolCC.d.ts +111 -84
- package/build/cc/ZWaveProtocolCC.d.ts.map +1 -1
- package/build/cc/ZWaveProtocolCC.js +583 -508
- package/build/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/cc/index.d.ts +37 -34
- package/build/cc/index.d.ts.map +1 -1
- package/build/cc/index.js +6 -7
- package/build/cc/index.js.map +1 -1
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts +29 -24
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/cc/manufacturerProprietary/FibaroCC.js +109 -112
- package/build/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/index.d.ts +0 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build/lib/API.d.ts +21 -18
- package/build/lib/API.d.ts.map +1 -1
- package/build/lib/API.js +25 -49
- package/build/lib/API.js.map +1 -1
- package/build/lib/CommandClass.d.ts +51 -89
- package/build/lib/CommandClass.d.ts.map +1 -1
- package/build/lib/CommandClass.js +177 -249
- package/build/lib/CommandClass.js.map +1 -1
- package/build/lib/EncapsulatingCommandClass.d.ts +1 -15
- package/build/lib/EncapsulatingCommandClass.d.ts.map +1 -1
- package/build/lib/EncapsulatingCommandClass.js.map +1 -1
- package/build/lib/ICommandClassContainer.d.ts +1 -8
- package/build/lib/ICommandClassContainer.d.ts.map +1 -1
- package/build/lib/ICommandClassContainer.js +0 -8
- package/build/lib/ICommandClassContainer.js.map +1 -1
- package/build/lib/Values.d.ts +3 -3
- package/build/lib/Values.d.ts.map +1 -1
- package/build/lib/_Types.d.ts.map +1 -1
- package/build/lib/_Types.js +1 -0
- package/build/lib/_Types.js.map +1 -1
- package/build/lib/utils.d.ts +14 -13
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +94 -92
- package/build/lib/utils.js.map +1 -1
- package/package.json +4 -5
|
@@ -5,6 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
+
var ZWaveProtocolCCNodeInformationFrame_1, ZWaveProtocolCCAssignIDs_1, ZWaveProtocolCCFindNodesInRange_1, ZWaveProtocolCCRangeInfo_1, ZWaveProtocolCCCommandComplete_1, ZWaveProtocolCCTransferPresentation_1, ZWaveProtocolCCTransferNodeInformation_1, ZWaveProtocolCCTransferRangeInformation_1, ZWaveProtocolCCTransferEnd_1, ZWaveProtocolCCAssignReturnRoute_1, ZWaveProtocolCCNewNodeRegistered_1, ZWaveProtocolCCNewRangeRegistered_1, ZWaveProtocolCCTransferNewPrimaryControllerComplete_1, ZWaveProtocolCCSUCNodeID_1, ZWaveProtocolCCSetSUC_1, ZWaveProtocolCCSetSUCAck_1, ZWaveProtocolCCStaticRouteRequest_1, ZWaveProtocolCCLost_1, ZWaveProtocolCCAcceptLost_1, ZWaveProtocolCCNOPPower_1, ZWaveProtocolCCReservedIDs_1, ZWaveProtocolCCReserveNodeIDs_1, ZWaveProtocolCCNodesExistReply_1, ZWaveProtocolCCNodesExist_1, ZWaveProtocolCCSetNWIMode_1, ZWaveProtocolCCAssignReturnRoutePriority_1, ZWaveProtocolCCSmartStartIncludedNodeInformation_1;
|
|
8
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
10
|
exports.ZWaveProtocolCCSmartStartInclusionRequest = exports.ZWaveProtocolCCSmartStartPrime = exports.ZWaveProtocolCCSmartStartIncludedNodeInformation = exports.ZWaveProtocolCCAssignSUCReturnRoutePriority = exports.ZWaveProtocolCCAssignReturnRoutePriority = exports.ZWaveProtocolCCExcludeRequest = exports.ZWaveProtocolCCSetNWIMode = exports.ZWaveProtocolCCNodesExist = exports.ZWaveProtocolCCNodesExistReply = exports.ZWaveProtocolCCReserveNodeIDs = exports.ZWaveProtocolCCReservedIDs = exports.ZWaveProtocolCCNOPPower = exports.ZWaveProtocolCCAcceptLost = exports.ZWaveProtocolCCLost = exports.ZWaveProtocolCCStaticRouteRequest = exports.ZWaveProtocolCCAssignSUCReturnRoute = exports.ZWaveProtocolCCSetSUCAck = exports.ZWaveProtocolCCSetSUC = exports.ZWaveProtocolCCSUCNodeID = exports.ZWaveProtocolCCAutomaticControllerUpdateStart = exports.ZWaveProtocolCCTransferNewPrimaryControllerComplete = exports.ZWaveProtocolCCNewRangeRegistered = exports.ZWaveProtocolCCNewNodeRegistered = exports.ZWaveProtocolCCAssignReturnRoute = exports.ZWaveProtocolCCTransferEnd = exports.ZWaveProtocolCCTransferRangeInformation = exports.ZWaveProtocolCCTransferNodeInformation = exports.ZWaveProtocolCCTransferPresentation = exports.ZWaveProtocolCCCommandComplete = exports.ZWaveProtocolCCGetNodesInRange = exports.ZWaveProtocolCCRangeInfo = exports.ZWaveProtocolCCFindNodesInRange = exports.ZWaveProtocolCCAssignIDs = exports.ZWaveProtocolCCRequestNodeInformationFrame = exports.ZWaveProtocolCCNodeInformationFrame = exports.ZWaveProtocolCC = void 0;
|
|
10
11
|
const core_1 = require("@zwave-js/core");
|
|
@@ -38,29 +39,29 @@ exports.ZWaveProtocolCC = ZWaveProtocolCC = __decorate([
|
|
|
38
39
|
(0, CommandClassDecorators_1.commandClass)(core_1.CommandClasses["Z-Wave Protocol"]),
|
|
39
40
|
(0, CommandClassDecorators_1.implementedVersion)(1)
|
|
40
41
|
], ZWaveProtocolCC);
|
|
41
|
-
let ZWaveProtocolCCNodeInformationFrame = class ZWaveProtocolCCNodeInformationFrame extends ZWaveProtocolCC {
|
|
42
|
-
constructor(
|
|
43
|
-
super(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
this.
|
|
52
|
-
this.
|
|
53
|
-
this.
|
|
54
|
-
this.
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
42
|
+
let ZWaveProtocolCCNodeInformationFrame = ZWaveProtocolCCNodeInformationFrame_1 = class ZWaveProtocolCCNodeInformationFrame extends ZWaveProtocolCC {
|
|
43
|
+
constructor(options) {
|
|
44
|
+
super(options);
|
|
45
|
+
this.basicDeviceClass = options.basicDeviceClass;
|
|
46
|
+
this.genericDeviceClass = options.genericDeviceClass;
|
|
47
|
+
this.specificDeviceClass = options.specificDeviceClass;
|
|
48
|
+
this.isListening = options.isListening;
|
|
49
|
+
this.isFrequentListening = options.isFrequentListening;
|
|
50
|
+
this.isRouting = options.isRouting;
|
|
51
|
+
this.supportedDataRates = options.supportedDataRates;
|
|
52
|
+
this.protocolVersion = options.protocolVersion;
|
|
53
|
+
this.optionalFunctionality = options.optionalFunctionality;
|
|
54
|
+
this.nodeType = options.nodeType;
|
|
55
|
+
this.supportsSecurity = options.supportsSecurity;
|
|
56
|
+
this.supportsBeaming = options.supportsBeaming;
|
|
57
|
+
this.supportedCCs = options.supportedCCs;
|
|
58
|
+
}
|
|
59
|
+
static from(raw, ctx) {
|
|
60
|
+
const nif = (0, core_1.parseNodeInformationFrame)(raw.payload);
|
|
61
|
+
return new ZWaveProtocolCCNodeInformationFrame_1({
|
|
62
|
+
nodeId: ctx.sourceNodeId,
|
|
63
|
+
...nif,
|
|
64
|
+
});
|
|
64
65
|
}
|
|
65
66
|
basicDeviceClass;
|
|
66
67
|
genericDeviceClass;
|
|
@@ -75,13 +76,13 @@ let ZWaveProtocolCCNodeInformationFrame = class ZWaveProtocolCCNodeInformationFr
|
|
|
75
76
|
supportsSecurity;
|
|
76
77
|
supportsBeaming;
|
|
77
78
|
supportedCCs;
|
|
78
|
-
serialize() {
|
|
79
|
+
serialize(ctx) {
|
|
79
80
|
this.payload = (0, core_1.encodeNodeInformationFrame)(this);
|
|
80
|
-
return super.serialize();
|
|
81
|
+
return super.serialize(ctx);
|
|
81
82
|
}
|
|
82
83
|
};
|
|
83
84
|
exports.ZWaveProtocolCCNodeInformationFrame = ZWaveProtocolCCNodeInformationFrame;
|
|
84
|
-
exports.ZWaveProtocolCCNodeInformationFrame = ZWaveProtocolCCNodeInformationFrame = __decorate([
|
|
85
|
+
exports.ZWaveProtocolCCNodeInformationFrame = ZWaveProtocolCCNodeInformationFrame = ZWaveProtocolCCNodeInformationFrame_1 = __decorate([
|
|
85
86
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.NodeInformationFrame)
|
|
86
87
|
], ZWaveProtocolCCNodeInformationFrame);
|
|
87
88
|
let ZWaveProtocolCCRequestNodeInformationFrame = class ZWaveProtocolCCRequestNodeInformationFrame extends ZWaveProtocolCC {
|
|
@@ -91,75 +92,84 @@ exports.ZWaveProtocolCCRequestNodeInformationFrame = ZWaveProtocolCCRequestNodeI
|
|
|
91
92
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.RequestNodeInformationFrame),
|
|
92
93
|
(0, CommandClassDecorators_1.expectedCCResponse)(ZWaveProtocolCCNodeInformationFrame)
|
|
93
94
|
], ZWaveProtocolCCRequestNodeInformationFrame);
|
|
94
|
-
let ZWaveProtocolCCAssignIDs = class ZWaveProtocolCCAssignIDs extends ZWaveProtocolCC {
|
|
95
|
-
constructor(
|
|
96
|
-
super(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
95
|
+
let ZWaveProtocolCCAssignIDs = ZWaveProtocolCCAssignIDs_1 = class ZWaveProtocolCCAssignIDs extends ZWaveProtocolCC {
|
|
96
|
+
constructor(options) {
|
|
97
|
+
super(options);
|
|
98
|
+
this.assignedNodeId = options.assignedNodeId;
|
|
99
|
+
this.homeId = options.homeId;
|
|
100
|
+
}
|
|
101
|
+
static from(raw, ctx) {
|
|
102
|
+
(0, core_1.validatePayload)(raw.payload.length >= 5);
|
|
103
|
+
const assignedNodeId = raw.payload[0];
|
|
104
|
+
const homeId = raw.payload.readUInt32BE(1);
|
|
105
|
+
return new ZWaveProtocolCCAssignIDs_1({
|
|
106
|
+
nodeId: ctx.sourceNodeId,
|
|
107
|
+
assignedNodeId,
|
|
108
|
+
homeId,
|
|
109
|
+
});
|
|
106
110
|
}
|
|
107
111
|
assignedNodeId;
|
|
108
112
|
homeId;
|
|
109
|
-
serialize() {
|
|
113
|
+
serialize(ctx) {
|
|
110
114
|
this.payload = Buffer.allocUnsafe(5);
|
|
111
115
|
this.payload[0] = this.assignedNodeId;
|
|
112
116
|
this.payload.writeUInt32BE(this.homeId, 1);
|
|
113
|
-
return super.serialize();
|
|
117
|
+
return super.serialize(ctx);
|
|
114
118
|
}
|
|
115
119
|
};
|
|
116
120
|
exports.ZWaveProtocolCCAssignIDs = ZWaveProtocolCCAssignIDs;
|
|
117
|
-
exports.ZWaveProtocolCCAssignIDs = ZWaveProtocolCCAssignIDs = __decorate([
|
|
121
|
+
exports.ZWaveProtocolCCAssignIDs = ZWaveProtocolCCAssignIDs = ZWaveProtocolCCAssignIDs_1 = __decorate([
|
|
118
122
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.AssignIDs)
|
|
119
123
|
], ZWaveProtocolCCAssignIDs);
|
|
120
|
-
let ZWaveProtocolCCFindNodesInRange = class ZWaveProtocolCCFindNodesInRange extends ZWaveProtocolCC {
|
|
121
|
-
constructor(
|
|
122
|
-
super(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
core_1.validatePayload.fail("Invalid payload length");
|
|
142
|
-
}
|
|
124
|
+
let ZWaveProtocolCCFindNodesInRange = ZWaveProtocolCCFindNodesInRange_1 = class ZWaveProtocolCCFindNodesInRange extends ZWaveProtocolCC {
|
|
125
|
+
constructor(options) {
|
|
126
|
+
super(options);
|
|
127
|
+
this.candidateNodeIds = options.candidateNodeIds;
|
|
128
|
+
this.wakeUpTime = options.wakeUpTime;
|
|
129
|
+
this.dataRate = options.dataRate ?? core_1.ZWaveDataRate["9k6"];
|
|
130
|
+
}
|
|
131
|
+
static from(raw, ctx) {
|
|
132
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
133
|
+
const speedPresent = raw.payload[0] & 0b1000_0000;
|
|
134
|
+
const bitmaskLength = raw.payload[0] & 0b0001_1111;
|
|
135
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1 + bitmaskLength);
|
|
136
|
+
const candidateNodeIds = (0, core_1.parseBitMask)(raw.payload.subarray(1, 1 + bitmaskLength));
|
|
137
|
+
const rest = raw.payload.subarray(1 + bitmaskLength);
|
|
138
|
+
let dataRate;
|
|
139
|
+
let wakeUpTime;
|
|
140
|
+
if (speedPresent) {
|
|
141
|
+
(0, core_1.validatePayload)(rest.length >= 1);
|
|
142
|
+
if (rest.length === 1) {
|
|
143
|
+
dataRate = rest[0] & 0b111;
|
|
144
|
+
wakeUpTime = _Types_1.WakeUpTime.None;
|
|
143
145
|
}
|
|
144
|
-
else if (rest.length
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
else if (rest.length === 2) {
|
|
147
|
+
wakeUpTime = (0, _Types_1.parseWakeUpTime)(rest[0]);
|
|
148
|
+
dataRate = rest[1] & 0b111;
|
|
147
149
|
}
|
|
148
150
|
else {
|
|
149
|
-
|
|
150
|
-
this.dataRate = core_1.ZWaveDataRate["9k6"];
|
|
151
|
+
core_1.validatePayload.fail("Invalid payload length");
|
|
151
152
|
}
|
|
152
153
|
}
|
|
154
|
+
else if (rest.length >= 1) {
|
|
155
|
+
wakeUpTime = (0, _Types_1.parseWakeUpTime)(rest[0]);
|
|
156
|
+
dataRate = core_1.ZWaveDataRate["9k6"];
|
|
157
|
+
}
|
|
153
158
|
else {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
this.dataRate = options.dataRate ?? core_1.ZWaveDataRate["9k6"];
|
|
159
|
+
wakeUpTime = _Types_1.WakeUpTime.None;
|
|
160
|
+
dataRate = core_1.ZWaveDataRate["9k6"];
|
|
157
161
|
}
|
|
162
|
+
return new ZWaveProtocolCCFindNodesInRange_1({
|
|
163
|
+
nodeId: ctx.sourceNodeId,
|
|
164
|
+
candidateNodeIds,
|
|
165
|
+
dataRate,
|
|
166
|
+
wakeUpTime,
|
|
167
|
+
});
|
|
158
168
|
}
|
|
159
169
|
candidateNodeIds;
|
|
160
170
|
wakeUpTime;
|
|
161
171
|
dataRate;
|
|
162
|
-
serialize() {
|
|
172
|
+
serialize(ctx) {
|
|
163
173
|
const nodesBitmask = (0, core_1.encodeBitMask)(this.candidateNodeIds, core_1.MAX_NODES);
|
|
164
174
|
const speedAndLength = 0b1000_0000 | nodesBitmask.length;
|
|
165
175
|
this.payload = Buffer.concat([
|
|
@@ -167,33 +177,37 @@ let ZWaveProtocolCCFindNodesInRange = class ZWaveProtocolCCFindNodesInRange exte
|
|
|
167
177
|
nodesBitmask,
|
|
168
178
|
Buffer.from([this.wakeUpTime, this.dataRate]),
|
|
169
179
|
]);
|
|
170
|
-
return super.serialize();
|
|
180
|
+
return super.serialize(ctx);
|
|
171
181
|
}
|
|
172
182
|
};
|
|
173
183
|
exports.ZWaveProtocolCCFindNodesInRange = ZWaveProtocolCCFindNodesInRange;
|
|
174
|
-
exports.ZWaveProtocolCCFindNodesInRange = ZWaveProtocolCCFindNodesInRange = __decorate([
|
|
184
|
+
exports.ZWaveProtocolCCFindNodesInRange = ZWaveProtocolCCFindNodesInRange = ZWaveProtocolCCFindNodesInRange_1 = __decorate([
|
|
175
185
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.FindNodesInRange)
|
|
176
186
|
], ZWaveProtocolCCFindNodesInRange);
|
|
177
|
-
let ZWaveProtocolCCRangeInfo = class ZWaveProtocolCCRangeInfo extends ZWaveProtocolCC {
|
|
178
|
-
constructor(
|
|
179
|
-
super(
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
this.wakeUpTime = options.wakeUpTime;
|
|
187
|
+
let ZWaveProtocolCCRangeInfo = ZWaveProtocolCCRangeInfo_1 = class ZWaveProtocolCCRangeInfo extends ZWaveProtocolCC {
|
|
188
|
+
constructor(options) {
|
|
189
|
+
super(options);
|
|
190
|
+
this.neighborNodeIds = options.neighborNodeIds;
|
|
191
|
+
this.wakeUpTime = options.wakeUpTime;
|
|
192
|
+
}
|
|
193
|
+
static from(raw, ctx) {
|
|
194
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
195
|
+
const bitmaskLength = raw.payload[0] & 0b0001_1111;
|
|
196
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1 + bitmaskLength);
|
|
197
|
+
const neighborNodeIds = (0, core_1.parseBitMask)(raw.payload.subarray(1, 1 + bitmaskLength));
|
|
198
|
+
let wakeUpTime;
|
|
199
|
+
if (raw.payload.length >= 2 + bitmaskLength) {
|
|
200
|
+
wakeUpTime = (0, _Types_1.parseWakeUpTime)(raw.payload[1 + bitmaskLength]);
|
|
192
201
|
}
|
|
202
|
+
return new ZWaveProtocolCCRangeInfo_1({
|
|
203
|
+
nodeId: ctx.sourceNodeId,
|
|
204
|
+
neighborNodeIds,
|
|
205
|
+
wakeUpTime,
|
|
206
|
+
});
|
|
193
207
|
}
|
|
194
208
|
neighborNodeIds;
|
|
195
209
|
wakeUpTime;
|
|
196
|
-
serialize() {
|
|
210
|
+
serialize(ctx) {
|
|
197
211
|
const nodesBitmask = (0, core_1.encodeBitMask)(this.neighborNodeIds, core_1.MAX_NODES);
|
|
198
212
|
this.payload = Buffer.concat([
|
|
199
213
|
Buffer.from([nodesBitmask.length]),
|
|
@@ -202,11 +216,11 @@ let ZWaveProtocolCCRangeInfo = class ZWaveProtocolCCRangeInfo extends ZWaveProto
|
|
|
202
216
|
? Buffer.from([this.wakeUpTime])
|
|
203
217
|
: Buffer.alloc(0),
|
|
204
218
|
]);
|
|
205
|
-
return super.serialize();
|
|
219
|
+
return super.serialize(ctx);
|
|
206
220
|
}
|
|
207
221
|
};
|
|
208
222
|
exports.ZWaveProtocolCCRangeInfo = ZWaveProtocolCCRangeInfo;
|
|
209
|
-
exports.ZWaveProtocolCCRangeInfo = ZWaveProtocolCCRangeInfo = __decorate([
|
|
223
|
+
exports.ZWaveProtocolCCRangeInfo = ZWaveProtocolCCRangeInfo = ZWaveProtocolCCRangeInfo_1 = __decorate([
|
|
210
224
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.RangeInfo)
|
|
211
225
|
], ZWaveProtocolCCRangeInfo);
|
|
212
226
|
let ZWaveProtocolCCGetNodesInRange = class ZWaveProtocolCCGetNodesInRange extends ZWaveProtocolCC {
|
|
@@ -216,89 +230,97 @@ exports.ZWaveProtocolCCGetNodesInRange = ZWaveProtocolCCGetNodesInRange = __deco
|
|
|
216
230
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.GetNodesInRange),
|
|
217
231
|
(0, CommandClassDecorators_1.expectedCCResponse)(ZWaveProtocolCCRangeInfo)
|
|
218
232
|
], ZWaveProtocolCCGetNodesInRange);
|
|
219
|
-
let ZWaveProtocolCCCommandComplete = class ZWaveProtocolCCCommandComplete extends ZWaveProtocolCC {
|
|
220
|
-
constructor(
|
|
221
|
-
super(
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
233
|
+
let ZWaveProtocolCCCommandComplete = ZWaveProtocolCCCommandComplete_1 = class ZWaveProtocolCCCommandComplete extends ZWaveProtocolCC {
|
|
234
|
+
constructor(options) {
|
|
235
|
+
super(options);
|
|
236
|
+
this.sequenceNumber = options.sequenceNumber;
|
|
237
|
+
}
|
|
238
|
+
static from(raw, ctx) {
|
|
239
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
240
|
+
const sequenceNumber = raw.payload[0];
|
|
241
|
+
return new ZWaveProtocolCCCommandComplete_1({
|
|
242
|
+
nodeId: ctx.sourceNodeId,
|
|
243
|
+
sequenceNumber,
|
|
244
|
+
});
|
|
229
245
|
}
|
|
230
246
|
sequenceNumber;
|
|
231
|
-
serialize() {
|
|
247
|
+
serialize(ctx) {
|
|
232
248
|
this.payload = Buffer.from([this.sequenceNumber]);
|
|
233
|
-
return super.serialize();
|
|
249
|
+
return super.serialize(ctx);
|
|
234
250
|
}
|
|
235
251
|
};
|
|
236
252
|
exports.ZWaveProtocolCCCommandComplete = ZWaveProtocolCCCommandComplete;
|
|
237
|
-
exports.ZWaveProtocolCCCommandComplete = ZWaveProtocolCCCommandComplete = __decorate([
|
|
253
|
+
exports.ZWaveProtocolCCCommandComplete = ZWaveProtocolCCCommandComplete = ZWaveProtocolCCCommandComplete_1 = __decorate([
|
|
238
254
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.CommandComplete)
|
|
239
255
|
], ZWaveProtocolCCCommandComplete);
|
|
240
|
-
let ZWaveProtocolCCTransferPresentation = class ZWaveProtocolCCTransferPresentation extends ZWaveProtocolCC {
|
|
241
|
-
constructor(
|
|
242
|
-
super(
|
|
243
|
-
if (
|
|
244
|
-
|
|
245
|
-
const option = this.payload[0];
|
|
246
|
-
this.supportsNWI = !!(option & 0b0001);
|
|
247
|
-
this.excludeNode = !!(option & 0b0010);
|
|
248
|
-
this.includeNode = !!(option & 0b0100);
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
251
|
-
if (options.includeNode && options.excludeNode) {
|
|
252
|
-
throw new core_1.ZWaveError(`${this.constructor.name}: the includeNode and excludeNode options cannot both be true`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
253
|
-
}
|
|
254
|
-
this.supportsNWI = options.supportsNWI;
|
|
255
|
-
this.includeNode = options.includeNode;
|
|
256
|
-
this.excludeNode = options.excludeNode;
|
|
256
|
+
let ZWaveProtocolCCTransferPresentation = ZWaveProtocolCCTransferPresentation_1 = class ZWaveProtocolCCTransferPresentation extends ZWaveProtocolCC {
|
|
257
|
+
constructor(options) {
|
|
258
|
+
super(options);
|
|
259
|
+
if (options.includeNode && options.excludeNode) {
|
|
260
|
+
throw new core_1.ZWaveError(`${this.constructor.name}: the includeNode and excludeNode options cannot both be true`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
257
261
|
}
|
|
262
|
+
this.supportsNWI = options.supportsNWI;
|
|
263
|
+
this.includeNode = options.includeNode;
|
|
264
|
+
this.excludeNode = options.excludeNode;
|
|
265
|
+
}
|
|
266
|
+
static from(raw, ctx) {
|
|
267
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
268
|
+
const option = raw.payload[0];
|
|
269
|
+
const supportsNWI = !!(option & 0b0001);
|
|
270
|
+
const excludeNode = !!(option & 0b0010);
|
|
271
|
+
const includeNode = !!(option & 0b0100);
|
|
272
|
+
return new ZWaveProtocolCCTransferPresentation_1({
|
|
273
|
+
nodeId: ctx.sourceNodeId,
|
|
274
|
+
supportsNWI,
|
|
275
|
+
excludeNode,
|
|
276
|
+
includeNode,
|
|
277
|
+
});
|
|
258
278
|
}
|
|
259
279
|
supportsNWI;
|
|
260
280
|
includeNode;
|
|
261
281
|
excludeNode;
|
|
262
|
-
serialize() {
|
|
282
|
+
serialize(ctx) {
|
|
263
283
|
this.payload = Buffer.from([
|
|
264
284
|
(this.supportsNWI ? 0b0001 : 0)
|
|
265
285
|
| (this.excludeNode ? 0b0010 : 0)
|
|
266
286
|
| (this.includeNode ? 0b0100 : 0),
|
|
267
287
|
]);
|
|
268
|
-
return super.serialize();
|
|
288
|
+
return super.serialize(ctx);
|
|
269
289
|
}
|
|
270
290
|
};
|
|
271
291
|
exports.ZWaveProtocolCCTransferPresentation = ZWaveProtocolCCTransferPresentation;
|
|
272
|
-
exports.ZWaveProtocolCCTransferPresentation = ZWaveProtocolCCTransferPresentation = __decorate([
|
|
292
|
+
exports.ZWaveProtocolCCTransferPresentation = ZWaveProtocolCCTransferPresentation = ZWaveProtocolCCTransferPresentation_1 = __decorate([
|
|
273
293
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.TransferPresentation)
|
|
274
294
|
], ZWaveProtocolCCTransferPresentation);
|
|
275
|
-
let ZWaveProtocolCCTransferNodeInformation = class ZWaveProtocolCCTransferNodeInformation extends ZWaveProtocolCC {
|
|
276
|
-
constructor(
|
|
277
|
-
super(
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
this.
|
|
291
|
-
this.
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
295
|
+
let ZWaveProtocolCCTransferNodeInformation = ZWaveProtocolCCTransferNodeInformation_1 = class ZWaveProtocolCCTransferNodeInformation extends ZWaveProtocolCC {
|
|
296
|
+
constructor(options) {
|
|
297
|
+
super(options);
|
|
298
|
+
this.sequenceNumber = options.sequenceNumber;
|
|
299
|
+
this.sourceNodeId = options.sourceNodeId;
|
|
300
|
+
this.basicDeviceClass = options.basicDeviceClass;
|
|
301
|
+
this.genericDeviceClass = options.genericDeviceClass;
|
|
302
|
+
this.specificDeviceClass = options.specificDeviceClass;
|
|
303
|
+
this.isListening = options.isListening;
|
|
304
|
+
this.isFrequentListening = options.isFrequentListening;
|
|
305
|
+
this.isRouting = options.isRouting;
|
|
306
|
+
this.supportedDataRates = options.supportedDataRates;
|
|
307
|
+
this.protocolVersion = options.protocolVersion;
|
|
308
|
+
this.optionalFunctionality = options.optionalFunctionality;
|
|
309
|
+
this.nodeType = options.nodeType;
|
|
310
|
+
this.supportsSecurity = options.supportsSecurity;
|
|
311
|
+
this.supportsBeaming = options.supportsBeaming;
|
|
312
|
+
}
|
|
313
|
+
static from(raw, ctx) {
|
|
314
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
315
|
+
const sequenceNumber = raw.payload[0];
|
|
316
|
+
const sourceNodeId = raw.payload[1];
|
|
317
|
+
const { info } = (0, core_1.parseNodeProtocolInfoAndDeviceClass)(raw.payload.subarray(2));
|
|
318
|
+
return new ZWaveProtocolCCTransferNodeInformation_1({
|
|
319
|
+
nodeId: ctx.sourceNodeId,
|
|
320
|
+
sequenceNumber,
|
|
321
|
+
sourceNodeId,
|
|
322
|
+
...info,
|
|
323
|
+
});
|
|
302
324
|
}
|
|
303
325
|
sequenceNumber;
|
|
304
326
|
sourceNodeId;
|
|
@@ -314,39 +336,43 @@ let ZWaveProtocolCCTransferNodeInformation = class ZWaveProtocolCCTransferNodeIn
|
|
|
314
336
|
nodeType;
|
|
315
337
|
supportsSecurity;
|
|
316
338
|
supportsBeaming;
|
|
317
|
-
serialize() {
|
|
339
|
+
serialize(ctx) {
|
|
318
340
|
this.payload = Buffer.concat([
|
|
319
341
|
Buffer.from([this.sequenceNumber, this.sourceNodeId]),
|
|
320
342
|
(0, core_1.encodeNodeProtocolInfoAndDeviceClass)(this),
|
|
321
343
|
]);
|
|
322
|
-
return super.serialize();
|
|
344
|
+
return super.serialize(ctx);
|
|
323
345
|
}
|
|
324
346
|
};
|
|
325
347
|
exports.ZWaveProtocolCCTransferNodeInformation = ZWaveProtocolCCTransferNodeInformation;
|
|
326
|
-
exports.ZWaveProtocolCCTransferNodeInformation = ZWaveProtocolCCTransferNodeInformation = __decorate([
|
|
348
|
+
exports.ZWaveProtocolCCTransferNodeInformation = ZWaveProtocolCCTransferNodeInformation = ZWaveProtocolCCTransferNodeInformation_1 = __decorate([
|
|
327
349
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.TransferNodeInformation)
|
|
328
350
|
], ZWaveProtocolCCTransferNodeInformation);
|
|
329
|
-
let ZWaveProtocolCCTransferRangeInformation = class ZWaveProtocolCCTransferRangeInformation extends ZWaveProtocolCC {
|
|
330
|
-
constructor(
|
|
331
|
-
super(
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
351
|
+
let ZWaveProtocolCCTransferRangeInformation = ZWaveProtocolCCTransferRangeInformation_1 = class ZWaveProtocolCCTransferRangeInformation extends ZWaveProtocolCC {
|
|
352
|
+
constructor(options) {
|
|
353
|
+
super(options);
|
|
354
|
+
this.sequenceNumber = options.sequenceNumber;
|
|
355
|
+
this.testedNodeId = options.testedNodeId;
|
|
356
|
+
this.neighborNodeIds = options.neighborNodeIds;
|
|
357
|
+
}
|
|
358
|
+
static from(raw, ctx) {
|
|
359
|
+
(0, core_1.validatePayload)(raw.payload.length >= 3);
|
|
360
|
+
const sequenceNumber = raw.payload[0];
|
|
361
|
+
const testedNodeId = raw.payload[1];
|
|
362
|
+
const bitmaskLength = raw.payload[2];
|
|
363
|
+
(0, core_1.validatePayload)(raw.payload.length >= 3 + bitmaskLength);
|
|
364
|
+
const neighborNodeIds = (0, core_1.parseBitMask)(raw.payload.subarray(3, 3 + bitmaskLength));
|
|
365
|
+
return new ZWaveProtocolCCTransferRangeInformation_1({
|
|
366
|
+
nodeId: ctx.sourceNodeId,
|
|
367
|
+
sequenceNumber,
|
|
368
|
+
testedNodeId,
|
|
369
|
+
neighborNodeIds,
|
|
370
|
+
});
|
|
345
371
|
}
|
|
346
372
|
sequenceNumber;
|
|
347
373
|
testedNodeId;
|
|
348
374
|
neighborNodeIds;
|
|
349
|
-
serialize() {
|
|
375
|
+
serialize(ctx) {
|
|
350
376
|
const nodesBitmask = (0, core_1.encodeBitMask)(this.neighborNodeIds, core_1.MAX_NODES);
|
|
351
377
|
this.payload = Buffer.concat([
|
|
352
378
|
Buffer.from([
|
|
@@ -356,64 +382,72 @@ let ZWaveProtocolCCTransferRangeInformation = class ZWaveProtocolCCTransferRange
|
|
|
356
382
|
]),
|
|
357
383
|
nodesBitmask,
|
|
358
384
|
]);
|
|
359
|
-
return super.serialize();
|
|
385
|
+
return super.serialize(ctx);
|
|
360
386
|
}
|
|
361
387
|
};
|
|
362
388
|
exports.ZWaveProtocolCCTransferRangeInformation = ZWaveProtocolCCTransferRangeInformation;
|
|
363
|
-
exports.ZWaveProtocolCCTransferRangeInformation = ZWaveProtocolCCTransferRangeInformation = __decorate([
|
|
389
|
+
exports.ZWaveProtocolCCTransferRangeInformation = ZWaveProtocolCCTransferRangeInformation = ZWaveProtocolCCTransferRangeInformation_1 = __decorate([
|
|
364
390
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.TransferRangeInformation)
|
|
365
391
|
], ZWaveProtocolCCTransferRangeInformation);
|
|
366
|
-
let ZWaveProtocolCCTransferEnd = class ZWaveProtocolCCTransferEnd extends ZWaveProtocolCC {
|
|
367
|
-
constructor(
|
|
368
|
-
super(
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
392
|
+
let ZWaveProtocolCCTransferEnd = ZWaveProtocolCCTransferEnd_1 = class ZWaveProtocolCCTransferEnd extends ZWaveProtocolCC {
|
|
393
|
+
constructor(options) {
|
|
394
|
+
super(options);
|
|
395
|
+
this.status = options.status;
|
|
396
|
+
}
|
|
397
|
+
static from(raw, ctx) {
|
|
398
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
399
|
+
const status = raw.payload[0];
|
|
400
|
+
return new ZWaveProtocolCCTransferEnd_1({
|
|
401
|
+
nodeId: ctx.sourceNodeId,
|
|
402
|
+
status,
|
|
403
|
+
});
|
|
376
404
|
}
|
|
377
405
|
status;
|
|
378
|
-
serialize() {
|
|
406
|
+
serialize(ctx) {
|
|
379
407
|
this.payload = Buffer.from([this.status]);
|
|
380
|
-
return super.serialize();
|
|
408
|
+
return super.serialize(ctx);
|
|
381
409
|
}
|
|
382
410
|
};
|
|
383
411
|
exports.ZWaveProtocolCCTransferEnd = ZWaveProtocolCCTransferEnd;
|
|
384
|
-
exports.ZWaveProtocolCCTransferEnd = ZWaveProtocolCCTransferEnd = __decorate([
|
|
412
|
+
exports.ZWaveProtocolCCTransferEnd = ZWaveProtocolCCTransferEnd = ZWaveProtocolCCTransferEnd_1 = __decorate([
|
|
385
413
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.TransferEnd)
|
|
386
414
|
], ZWaveProtocolCCTransferEnd);
|
|
387
|
-
let ZWaveProtocolCCAssignReturnRoute = class ZWaveProtocolCCAssignReturnRoute extends ZWaveProtocolCC {
|
|
388
|
-
constructor(
|
|
389
|
-
super(
|
|
390
|
-
if (
|
|
391
|
-
|
|
392
|
-
this.destinationNodeId = this.payload[0];
|
|
393
|
-
this.routeIndex = this.payload[1] >>> 4;
|
|
394
|
-
const numRepeaters = this.payload[1] & 0b1111;
|
|
395
|
-
this.repeaters = [...this.payload.subarray(2, 2 + numRepeaters)];
|
|
396
|
-
const speedAndWakeup = this.payload[2 + numRepeaters];
|
|
397
|
-
this.destinationSpeed = bitmask2DataRate((speedAndWakeup >>> 3) & 0b111);
|
|
398
|
-
this.destinationWakeUp = (speedAndWakeup >>> 1) & 0b11;
|
|
399
|
-
}
|
|
400
|
-
else {
|
|
401
|
-
if (options.repeaters.length > core_1.MAX_REPEATERS) {
|
|
402
|
-
throw new core_1.ZWaveError(`${this.constructor.name}: too many repeaters`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
403
|
-
}
|
|
404
|
-
this.destinationNodeId = options.destinationNodeId;
|
|
405
|
-
this.routeIndex = options.routeIndex;
|
|
406
|
-
this.repeaters = options.repeaters;
|
|
407
|
-
this.destinationWakeUp = options.destinationWakeUp;
|
|
408
|
-
this.destinationSpeed = options.destinationSpeed;
|
|
415
|
+
let ZWaveProtocolCCAssignReturnRoute = ZWaveProtocolCCAssignReturnRoute_1 = class ZWaveProtocolCCAssignReturnRoute extends ZWaveProtocolCC {
|
|
416
|
+
constructor(options) {
|
|
417
|
+
super(options);
|
|
418
|
+
if (options.repeaters.length > core_1.MAX_REPEATERS) {
|
|
419
|
+
throw new core_1.ZWaveError(`${this.constructor.name}: too many repeaters`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
409
420
|
}
|
|
421
|
+
this.destinationNodeId = options.destinationNodeId;
|
|
422
|
+
this.routeIndex = options.routeIndex;
|
|
423
|
+
this.repeaters = options.repeaters;
|
|
424
|
+
this.destinationWakeUp = options.destinationWakeUp;
|
|
425
|
+
this.destinationSpeed = options.destinationSpeed;
|
|
426
|
+
}
|
|
427
|
+
static from(raw, ctx) {
|
|
428
|
+
(0, core_1.validatePayload)(raw.payload.length >= 7);
|
|
429
|
+
const destinationNodeId = raw.payload[0];
|
|
430
|
+
const routeIndex = raw.payload[1] >>> 4;
|
|
431
|
+
const numRepeaters = raw.payload[1] & 0b1111;
|
|
432
|
+
const repeaters = [...raw.payload.subarray(2, 2 + numRepeaters)];
|
|
433
|
+
const speedAndWakeup = raw.payload[2 + numRepeaters];
|
|
434
|
+
const destinationSpeed = bitmask2DataRate((speedAndWakeup >>> 3) & 0b111);
|
|
435
|
+
const destinationWakeUp = (speedAndWakeup >>> 1) & 0b11;
|
|
436
|
+
return new ZWaveProtocolCCAssignReturnRoute_1({
|
|
437
|
+
nodeId: ctx.sourceNodeId,
|
|
438
|
+
destinationNodeId,
|
|
439
|
+
routeIndex,
|
|
440
|
+
repeaters,
|
|
441
|
+
destinationSpeed,
|
|
442
|
+
destinationWakeUp,
|
|
443
|
+
});
|
|
410
444
|
}
|
|
411
445
|
destinationNodeId;
|
|
412
446
|
routeIndex;
|
|
413
447
|
repeaters;
|
|
414
448
|
destinationWakeUp;
|
|
415
449
|
destinationSpeed;
|
|
416
|
-
serialize() {
|
|
450
|
+
serialize(ctx) {
|
|
417
451
|
const routeByte = (this.routeIndex << 4) | this.repeaters.length;
|
|
418
452
|
const speedMask = dataRate2Bitmask(this.destinationSpeed);
|
|
419
453
|
const speedByte = (speedMask << 3) | (this.destinationWakeUp << 1);
|
|
@@ -423,39 +457,40 @@ let ZWaveProtocolCCAssignReturnRoute = class ZWaveProtocolCCAssignReturnRoute ex
|
|
|
423
457
|
...this.repeaters,
|
|
424
458
|
speedByte,
|
|
425
459
|
]);
|
|
426
|
-
return super.serialize();
|
|
460
|
+
return super.serialize(ctx);
|
|
427
461
|
}
|
|
428
462
|
};
|
|
429
463
|
exports.ZWaveProtocolCCAssignReturnRoute = ZWaveProtocolCCAssignReturnRoute;
|
|
430
|
-
exports.ZWaveProtocolCCAssignReturnRoute = ZWaveProtocolCCAssignReturnRoute = __decorate([
|
|
464
|
+
exports.ZWaveProtocolCCAssignReturnRoute = ZWaveProtocolCCAssignReturnRoute = ZWaveProtocolCCAssignReturnRoute_1 = __decorate([
|
|
431
465
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.AssignReturnRoute)
|
|
432
466
|
], ZWaveProtocolCCAssignReturnRoute);
|
|
433
|
-
let ZWaveProtocolCCNewNodeRegistered = class ZWaveProtocolCCNewNodeRegistered extends ZWaveProtocolCC {
|
|
434
|
-
constructor(
|
|
435
|
-
super(
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
this.
|
|
447
|
-
this.
|
|
448
|
-
this.
|
|
449
|
-
this.
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
467
|
+
let ZWaveProtocolCCNewNodeRegistered = ZWaveProtocolCCNewNodeRegistered_1 = class ZWaveProtocolCCNewNodeRegistered extends ZWaveProtocolCC {
|
|
468
|
+
constructor(options) {
|
|
469
|
+
super(options);
|
|
470
|
+
this.newNodeId = options.newNodeId;
|
|
471
|
+
this.basicDeviceClass = options.basicDeviceClass;
|
|
472
|
+
this.genericDeviceClass = options.genericDeviceClass;
|
|
473
|
+
this.specificDeviceClass = options.specificDeviceClass;
|
|
474
|
+
this.isListening = options.isListening;
|
|
475
|
+
this.isFrequentListening = options.isFrequentListening;
|
|
476
|
+
this.isRouting = options.isRouting;
|
|
477
|
+
this.supportedDataRates = options.supportedDataRates;
|
|
478
|
+
this.protocolVersion = options.protocolVersion;
|
|
479
|
+
this.optionalFunctionality = options.optionalFunctionality;
|
|
480
|
+
this.nodeType = options.nodeType;
|
|
481
|
+
this.supportsSecurity = options.supportsSecurity;
|
|
482
|
+
this.supportsBeaming = options.supportsBeaming;
|
|
483
|
+
this.supportedCCs = options.supportedCCs;
|
|
484
|
+
}
|
|
485
|
+
static from(raw, ctx) {
|
|
486
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
487
|
+
const newNodeId = raw.payload[0];
|
|
488
|
+
const nif = (0, core_1.parseNodeInformationFrame)(raw.payload.subarray(1));
|
|
489
|
+
return new ZWaveProtocolCCNewNodeRegistered_1({
|
|
490
|
+
nodeId: ctx.sourceNodeId,
|
|
491
|
+
newNodeId,
|
|
492
|
+
...nif,
|
|
493
|
+
});
|
|
459
494
|
}
|
|
460
495
|
newNodeId;
|
|
461
496
|
basicDeviceClass;
|
|
@@ -471,68 +506,73 @@ let ZWaveProtocolCCNewNodeRegistered = class ZWaveProtocolCCNewNodeRegistered ex
|
|
|
471
506
|
supportsSecurity;
|
|
472
507
|
supportsBeaming;
|
|
473
508
|
supportedCCs;
|
|
474
|
-
serialize() {
|
|
509
|
+
serialize(ctx) {
|
|
475
510
|
this.payload = Buffer.concat([
|
|
476
511
|
Buffer.from([this.newNodeId]),
|
|
477
512
|
(0, core_1.encodeNodeInformationFrame)(this),
|
|
478
513
|
]);
|
|
479
|
-
return super.serialize();
|
|
514
|
+
return super.serialize(ctx);
|
|
480
515
|
}
|
|
481
516
|
};
|
|
482
517
|
exports.ZWaveProtocolCCNewNodeRegistered = ZWaveProtocolCCNewNodeRegistered;
|
|
483
|
-
exports.ZWaveProtocolCCNewNodeRegistered = ZWaveProtocolCCNewNodeRegistered = __decorate([
|
|
518
|
+
exports.ZWaveProtocolCCNewNodeRegistered = ZWaveProtocolCCNewNodeRegistered = ZWaveProtocolCCNewNodeRegistered_1 = __decorate([
|
|
484
519
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.NewNodeRegistered)
|
|
485
520
|
], ZWaveProtocolCCNewNodeRegistered);
|
|
486
|
-
let ZWaveProtocolCCNewRangeRegistered = class ZWaveProtocolCCNewRangeRegistered extends ZWaveProtocolCC {
|
|
487
|
-
constructor(
|
|
488
|
-
super(
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
521
|
+
let ZWaveProtocolCCNewRangeRegistered = ZWaveProtocolCCNewRangeRegistered_1 = class ZWaveProtocolCCNewRangeRegistered extends ZWaveProtocolCC {
|
|
522
|
+
constructor(options) {
|
|
523
|
+
super(options);
|
|
524
|
+
this.testedNodeId = options.testedNodeId;
|
|
525
|
+
this.neighborNodeIds = options.neighborNodeIds;
|
|
526
|
+
}
|
|
527
|
+
static from(raw, ctx) {
|
|
528
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
529
|
+
const testedNodeId = raw.payload[0];
|
|
530
|
+
const numNeighbors = raw.payload[1];
|
|
531
|
+
const neighborNodeIds = [
|
|
532
|
+
...raw.payload.subarray(2, 2 + numNeighbors),
|
|
533
|
+
];
|
|
534
|
+
return new ZWaveProtocolCCNewRangeRegistered_1({
|
|
535
|
+
nodeId: ctx.sourceNodeId,
|
|
536
|
+
testedNodeId,
|
|
537
|
+
neighborNodeIds,
|
|
538
|
+
});
|
|
501
539
|
}
|
|
502
540
|
testedNodeId;
|
|
503
541
|
neighborNodeIds;
|
|
504
|
-
serialize() {
|
|
542
|
+
serialize(ctx) {
|
|
505
543
|
const nodesBitmask = (0, core_1.encodeBitMask)(this.neighborNodeIds, core_1.MAX_NODES);
|
|
506
544
|
this.payload = Buffer.concat([
|
|
507
545
|
Buffer.from([this.testedNodeId, nodesBitmask.length]),
|
|
508
546
|
nodesBitmask,
|
|
509
547
|
]);
|
|
510
|
-
return super.serialize();
|
|
548
|
+
return super.serialize(ctx);
|
|
511
549
|
}
|
|
512
550
|
};
|
|
513
551
|
exports.ZWaveProtocolCCNewRangeRegistered = ZWaveProtocolCCNewRangeRegistered;
|
|
514
|
-
exports.ZWaveProtocolCCNewRangeRegistered = ZWaveProtocolCCNewRangeRegistered = __decorate([
|
|
552
|
+
exports.ZWaveProtocolCCNewRangeRegistered = ZWaveProtocolCCNewRangeRegistered = ZWaveProtocolCCNewRangeRegistered_1 = __decorate([
|
|
515
553
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.NewRangeRegistered)
|
|
516
554
|
], ZWaveProtocolCCNewRangeRegistered);
|
|
517
|
-
let ZWaveProtocolCCTransferNewPrimaryControllerComplete = class ZWaveProtocolCCTransferNewPrimaryControllerComplete extends ZWaveProtocolCC {
|
|
518
|
-
constructor(
|
|
519
|
-
super(
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
555
|
+
let ZWaveProtocolCCTransferNewPrimaryControllerComplete = ZWaveProtocolCCTransferNewPrimaryControllerComplete_1 = class ZWaveProtocolCCTransferNewPrimaryControllerComplete extends ZWaveProtocolCC {
|
|
556
|
+
constructor(options) {
|
|
557
|
+
super(options);
|
|
558
|
+
this.genericDeviceClass = options.genericDeviceClass;
|
|
559
|
+
}
|
|
560
|
+
static from(raw, ctx) {
|
|
561
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
562
|
+
const genericDeviceClass = raw.payload[0];
|
|
563
|
+
return new ZWaveProtocolCCTransferNewPrimaryControllerComplete_1({
|
|
564
|
+
nodeId: ctx.sourceNodeId,
|
|
565
|
+
genericDeviceClass,
|
|
566
|
+
});
|
|
527
567
|
}
|
|
528
568
|
genericDeviceClass;
|
|
529
|
-
serialize() {
|
|
569
|
+
serialize(ctx) {
|
|
530
570
|
this.payload = Buffer.from([this.genericDeviceClass]);
|
|
531
|
-
return super.serialize();
|
|
571
|
+
return super.serialize(ctx);
|
|
532
572
|
}
|
|
533
573
|
};
|
|
534
574
|
exports.ZWaveProtocolCCTransferNewPrimaryControllerComplete = ZWaveProtocolCCTransferNewPrimaryControllerComplete;
|
|
535
|
-
exports.ZWaveProtocolCCTransferNewPrimaryControllerComplete = ZWaveProtocolCCTransferNewPrimaryControllerComplete = __decorate([
|
|
575
|
+
exports.ZWaveProtocolCCTransferNewPrimaryControllerComplete = ZWaveProtocolCCTransferNewPrimaryControllerComplete = ZWaveProtocolCCTransferNewPrimaryControllerComplete_1 = __decorate([
|
|
536
576
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.TransferNewPrimaryControllerComplete)
|
|
537
577
|
], ZWaveProtocolCCTransferNewPrimaryControllerComplete);
|
|
538
578
|
let ZWaveProtocolCCAutomaticControllerUpdateStart = class ZWaveProtocolCCAutomaticControllerUpdateStart extends ZWaveProtocolCC {
|
|
@@ -541,80 +581,88 @@ exports.ZWaveProtocolCCAutomaticControllerUpdateStart = ZWaveProtocolCCAutomatic
|
|
|
541
581
|
exports.ZWaveProtocolCCAutomaticControllerUpdateStart = ZWaveProtocolCCAutomaticControllerUpdateStart = __decorate([
|
|
542
582
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.AutomaticControllerUpdateStart)
|
|
543
583
|
], ZWaveProtocolCCAutomaticControllerUpdateStart);
|
|
544
|
-
let ZWaveProtocolCCSUCNodeID = class ZWaveProtocolCCSUCNodeID extends ZWaveProtocolCC {
|
|
545
|
-
constructor(
|
|
546
|
-
super(
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
584
|
+
let ZWaveProtocolCCSUCNodeID = ZWaveProtocolCCSUCNodeID_1 = class ZWaveProtocolCCSUCNodeID extends ZWaveProtocolCC {
|
|
585
|
+
constructor(options) {
|
|
586
|
+
super(options);
|
|
587
|
+
this.sucNodeId = options.sucNodeId;
|
|
588
|
+
this.isSIS = options.isSIS;
|
|
589
|
+
}
|
|
590
|
+
static from(raw, ctx) {
|
|
591
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
592
|
+
const sucNodeId = raw.payload[0];
|
|
593
|
+
const capabilities = raw.payload[1] ?? 0;
|
|
594
|
+
const isSIS = !!(capabilities & 0b1);
|
|
595
|
+
return new ZWaveProtocolCCSUCNodeID_1({
|
|
596
|
+
nodeId: ctx.sourceNodeId,
|
|
597
|
+
sucNodeId,
|
|
598
|
+
isSIS,
|
|
599
|
+
});
|
|
557
600
|
}
|
|
558
601
|
sucNodeId;
|
|
559
602
|
isSIS;
|
|
560
|
-
serialize() {
|
|
603
|
+
serialize(ctx) {
|
|
561
604
|
this.payload = Buffer.from([this.sucNodeId, this.isSIS ? 0b1 : 0]);
|
|
562
|
-
return super.serialize();
|
|
605
|
+
return super.serialize(ctx);
|
|
563
606
|
}
|
|
564
607
|
};
|
|
565
608
|
exports.ZWaveProtocolCCSUCNodeID = ZWaveProtocolCCSUCNodeID;
|
|
566
|
-
exports.ZWaveProtocolCCSUCNodeID = ZWaveProtocolCCSUCNodeID = __decorate([
|
|
609
|
+
exports.ZWaveProtocolCCSUCNodeID = ZWaveProtocolCCSUCNodeID = ZWaveProtocolCCSUCNodeID_1 = __decorate([
|
|
567
610
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.SUCNodeID)
|
|
568
611
|
], ZWaveProtocolCCSUCNodeID);
|
|
569
|
-
let ZWaveProtocolCCSetSUC = class ZWaveProtocolCCSetSUC extends ZWaveProtocolCC {
|
|
570
|
-
constructor(
|
|
571
|
-
super(
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
612
|
+
let ZWaveProtocolCCSetSUC = ZWaveProtocolCCSetSUC_1 = class ZWaveProtocolCCSetSUC extends ZWaveProtocolCC {
|
|
613
|
+
constructor(options) {
|
|
614
|
+
super(options);
|
|
615
|
+
this.enableSIS = options.enableSIS;
|
|
616
|
+
}
|
|
617
|
+
static from(raw, ctx) {
|
|
618
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
619
|
+
// Byte 0 must be 0x01 or ignored
|
|
620
|
+
const capabilities = raw.payload[1] ?? 0;
|
|
621
|
+
const enableSIS = !!(capabilities & 0b1);
|
|
622
|
+
return new ZWaveProtocolCCSetSUC_1({
|
|
623
|
+
nodeId: ctx.sourceNodeId,
|
|
624
|
+
enableSIS,
|
|
625
|
+
});
|
|
581
626
|
}
|
|
582
627
|
enableSIS;
|
|
583
|
-
serialize() {
|
|
628
|
+
serialize(ctx) {
|
|
584
629
|
this.payload = Buffer.from([0x01, this.enableSIS ? 0b1 : 0]);
|
|
585
|
-
return super.serialize();
|
|
630
|
+
return super.serialize(ctx);
|
|
586
631
|
}
|
|
587
632
|
};
|
|
588
633
|
exports.ZWaveProtocolCCSetSUC = ZWaveProtocolCCSetSUC;
|
|
589
|
-
exports.ZWaveProtocolCCSetSUC = ZWaveProtocolCCSetSUC = __decorate([
|
|
634
|
+
exports.ZWaveProtocolCCSetSUC = ZWaveProtocolCCSetSUC = ZWaveProtocolCCSetSUC_1 = __decorate([
|
|
590
635
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.SetSUC)
|
|
591
636
|
], ZWaveProtocolCCSetSUC);
|
|
592
|
-
let ZWaveProtocolCCSetSUCAck = class ZWaveProtocolCCSetSUCAck extends ZWaveProtocolCC {
|
|
593
|
-
constructor(
|
|
594
|
-
super(
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
637
|
+
let ZWaveProtocolCCSetSUCAck = ZWaveProtocolCCSetSUCAck_1 = class ZWaveProtocolCCSetSUCAck extends ZWaveProtocolCC {
|
|
638
|
+
constructor(options) {
|
|
639
|
+
super(options);
|
|
640
|
+
this.accepted = options.accepted;
|
|
641
|
+
this.isSIS = options.isSIS;
|
|
642
|
+
}
|
|
643
|
+
static from(raw, ctx) {
|
|
644
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
645
|
+
const accepted = raw.payload[0] === 0x01;
|
|
646
|
+
const capabilities = raw.payload[1] ?? 0;
|
|
647
|
+
const isSIS = !!(capabilities & 0b1);
|
|
648
|
+
return new ZWaveProtocolCCSetSUCAck_1({
|
|
649
|
+
nodeId: ctx.sourceNodeId,
|
|
650
|
+
accepted,
|
|
651
|
+
isSIS,
|
|
652
|
+
});
|
|
605
653
|
}
|
|
606
654
|
accepted;
|
|
607
655
|
isSIS;
|
|
608
|
-
serialize() {
|
|
656
|
+
serialize(ctx) {
|
|
609
657
|
this.payload = Buffer.from([
|
|
610
658
|
this.accepted ? 0x01 : 0x00,
|
|
611
659
|
this.isSIS ? 0b1 : 0,
|
|
612
660
|
]);
|
|
613
|
-
return super.serialize();
|
|
661
|
+
return super.serialize(ctx);
|
|
614
662
|
}
|
|
615
663
|
};
|
|
616
664
|
exports.ZWaveProtocolCCSetSUCAck = ZWaveProtocolCCSetSUCAck;
|
|
617
|
-
exports.ZWaveProtocolCCSetSUCAck = ZWaveProtocolCCSetSUCAck = __decorate([
|
|
665
|
+
exports.ZWaveProtocolCCSetSUCAck = ZWaveProtocolCCSetSUCAck = ZWaveProtocolCCSetSUCAck_1 = __decorate([
|
|
618
666
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.SetSUCAck)
|
|
619
667
|
], ZWaveProtocolCCSetSUCAck);
|
|
620
668
|
let ZWaveProtocolCCAssignSUCReturnRoute = class ZWaveProtocolCCAssignSUCReturnRoute extends ZWaveProtocolCCAssignReturnRoute {
|
|
@@ -623,263 +671,285 @@ exports.ZWaveProtocolCCAssignSUCReturnRoute = ZWaveProtocolCCAssignSUCReturnRout
|
|
|
623
671
|
exports.ZWaveProtocolCCAssignSUCReturnRoute = ZWaveProtocolCCAssignSUCReturnRoute = __decorate([
|
|
624
672
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.AssignSUCReturnRoute)
|
|
625
673
|
], ZWaveProtocolCCAssignSUCReturnRoute);
|
|
626
|
-
let ZWaveProtocolCCStaticRouteRequest = class ZWaveProtocolCCStaticRouteRequest extends ZWaveProtocolCC {
|
|
627
|
-
constructor(
|
|
628
|
-
super(
|
|
629
|
-
if ((
|
|
630
|
-
|
|
631
|
-
this.nodeIds = [...this.payload.subarray(0, 5)].filter((id) => id > 0 && id <= core_1.MAX_NODES);
|
|
632
|
-
}
|
|
633
|
-
else {
|
|
634
|
-
if (options.nodeIds.some((n) => n < 1 || n > core_1.MAX_NODES)) {
|
|
635
|
-
throw new core_1.ZWaveError(`All node IDs must be between 1 and ${core_1.MAX_NODES}!`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
636
|
-
}
|
|
637
|
-
this.nodeIds = options.nodeIds;
|
|
674
|
+
let ZWaveProtocolCCStaticRouteRequest = ZWaveProtocolCCStaticRouteRequest_1 = class ZWaveProtocolCCStaticRouteRequest extends ZWaveProtocolCC {
|
|
675
|
+
constructor(options) {
|
|
676
|
+
super(options);
|
|
677
|
+
if (options.nodeIds.some((n) => n < 1 || n > core_1.MAX_NODES)) {
|
|
678
|
+
throw new core_1.ZWaveError(`All node IDs must be between 1 and ${core_1.MAX_NODES}!`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
638
679
|
}
|
|
680
|
+
this.nodeIds = options.nodeIds;
|
|
681
|
+
}
|
|
682
|
+
static from(raw, ctx) {
|
|
683
|
+
(0, core_1.validatePayload)(raw.payload.length >= 5);
|
|
684
|
+
const nodeIds = [...raw.payload.subarray(0, 5)].filter((id) => id > 0 && id <= core_1.MAX_NODES);
|
|
685
|
+
return new ZWaveProtocolCCStaticRouteRequest_1({
|
|
686
|
+
nodeId: ctx.sourceNodeId,
|
|
687
|
+
nodeIds,
|
|
688
|
+
});
|
|
639
689
|
}
|
|
640
690
|
nodeIds;
|
|
641
|
-
serialize() {
|
|
691
|
+
serialize(ctx) {
|
|
642
692
|
this.payload = Buffer.alloc(5, 0);
|
|
643
693
|
for (let i = 0; i < this.nodeIds.length && i < 5; i++) {
|
|
644
694
|
this.payload[i] = this.nodeIds[i];
|
|
645
695
|
}
|
|
646
|
-
return super.serialize();
|
|
696
|
+
return super.serialize(ctx);
|
|
647
697
|
}
|
|
648
698
|
};
|
|
649
699
|
exports.ZWaveProtocolCCStaticRouteRequest = ZWaveProtocolCCStaticRouteRequest;
|
|
650
|
-
exports.ZWaveProtocolCCStaticRouteRequest = ZWaveProtocolCCStaticRouteRequest = __decorate([
|
|
700
|
+
exports.ZWaveProtocolCCStaticRouteRequest = ZWaveProtocolCCStaticRouteRequest = ZWaveProtocolCCStaticRouteRequest_1 = __decorate([
|
|
651
701
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.StaticRouteRequest)
|
|
652
702
|
], ZWaveProtocolCCStaticRouteRequest);
|
|
653
|
-
let ZWaveProtocolCCLost = class ZWaveProtocolCCLost extends ZWaveProtocolCC {
|
|
654
|
-
constructor(
|
|
655
|
-
super(
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
703
|
+
let ZWaveProtocolCCLost = ZWaveProtocolCCLost_1 = class ZWaveProtocolCCLost extends ZWaveProtocolCC {
|
|
704
|
+
constructor(options) {
|
|
705
|
+
super(options);
|
|
706
|
+
this.lostNodeId = options.lostNodeId;
|
|
707
|
+
}
|
|
708
|
+
static from(raw, ctx) {
|
|
709
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
710
|
+
const lostNodeId = raw.payload[0];
|
|
711
|
+
return new ZWaveProtocolCCLost_1({
|
|
712
|
+
nodeId: ctx.sourceNodeId,
|
|
713
|
+
lostNodeId,
|
|
714
|
+
});
|
|
663
715
|
}
|
|
664
716
|
lostNodeId;
|
|
665
|
-
serialize() {
|
|
717
|
+
serialize(ctx) {
|
|
666
718
|
this.payload = Buffer.from([this.lostNodeId]);
|
|
667
|
-
return super.serialize();
|
|
719
|
+
return super.serialize(ctx);
|
|
668
720
|
}
|
|
669
721
|
};
|
|
670
722
|
exports.ZWaveProtocolCCLost = ZWaveProtocolCCLost;
|
|
671
|
-
exports.ZWaveProtocolCCLost = ZWaveProtocolCCLost = __decorate([
|
|
723
|
+
exports.ZWaveProtocolCCLost = ZWaveProtocolCCLost = ZWaveProtocolCCLost_1 = __decorate([
|
|
672
724
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.Lost)
|
|
673
725
|
], ZWaveProtocolCCLost);
|
|
674
|
-
let ZWaveProtocolCCAcceptLost = class ZWaveProtocolCCAcceptLost extends ZWaveProtocolCC {
|
|
675
|
-
constructor(
|
|
676
|
-
super(
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
726
|
+
let ZWaveProtocolCCAcceptLost = ZWaveProtocolCCAcceptLost_1 = class ZWaveProtocolCCAcceptLost extends ZWaveProtocolCC {
|
|
727
|
+
constructor(options) {
|
|
728
|
+
super(options);
|
|
729
|
+
this.accepted = options.accepted;
|
|
730
|
+
}
|
|
731
|
+
static from(raw, ctx) {
|
|
732
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
733
|
+
(0, core_1.validatePayload)(raw.payload[0] === 0x04 || raw.payload[0] === 0x05);
|
|
734
|
+
const accepted = raw.payload[0] === 0x05;
|
|
735
|
+
return new ZWaveProtocolCCAcceptLost_1({
|
|
736
|
+
nodeId: ctx.sourceNodeId,
|
|
737
|
+
accepted,
|
|
738
|
+
});
|
|
685
739
|
}
|
|
686
740
|
accepted;
|
|
687
|
-
serialize() {
|
|
741
|
+
serialize(ctx) {
|
|
688
742
|
this.payload = Buffer.from([this.accepted ? 0x05 : 0x04]);
|
|
689
|
-
return super.serialize();
|
|
743
|
+
return super.serialize(ctx);
|
|
690
744
|
}
|
|
691
745
|
};
|
|
692
746
|
exports.ZWaveProtocolCCAcceptLost = ZWaveProtocolCCAcceptLost;
|
|
693
|
-
exports.ZWaveProtocolCCAcceptLost = ZWaveProtocolCCAcceptLost = __decorate([
|
|
747
|
+
exports.ZWaveProtocolCCAcceptLost = ZWaveProtocolCCAcceptLost = ZWaveProtocolCCAcceptLost_1 = __decorate([
|
|
694
748
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.AcceptLost)
|
|
695
749
|
], ZWaveProtocolCCAcceptLost);
|
|
696
|
-
let ZWaveProtocolCCNOPPower = class ZWaveProtocolCCNOPPower extends ZWaveProtocolCC {
|
|
697
|
-
constructor(
|
|
698
|
-
super(
|
|
699
|
-
if (
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
750
|
+
let ZWaveProtocolCCNOPPower = ZWaveProtocolCCNOPPower_1 = class ZWaveProtocolCCNOPPower extends ZWaveProtocolCC {
|
|
751
|
+
constructor(options) {
|
|
752
|
+
super(options);
|
|
753
|
+
if (options.powerDampening < 0 || options.powerDampening > 14) {
|
|
754
|
+
throw new core_1.ZWaveError(`${this.constructor.name}: power dampening must be between 0 and 14 dBm!`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
755
|
+
}
|
|
756
|
+
this.powerDampening = options.powerDampening;
|
|
757
|
+
}
|
|
758
|
+
static from(raw, ctx) {
|
|
759
|
+
let powerDampening;
|
|
760
|
+
if (raw.payload.length >= 2) {
|
|
761
|
+
// Ignore byte 0
|
|
762
|
+
powerDampening = raw.payload[1];
|
|
763
|
+
}
|
|
764
|
+
else if (raw.payload.length === 1) {
|
|
765
|
+
powerDampening = [
|
|
766
|
+
0xf0,
|
|
767
|
+
0xc8,
|
|
768
|
+
0xa7,
|
|
769
|
+
0x91,
|
|
770
|
+
0x77,
|
|
771
|
+
0x67,
|
|
772
|
+
0x60,
|
|
773
|
+
0x46,
|
|
774
|
+
0x38,
|
|
775
|
+
0x35,
|
|
776
|
+
0x32,
|
|
777
|
+
0x30,
|
|
778
|
+
0x24,
|
|
779
|
+
0x22,
|
|
780
|
+
0x20,
|
|
781
|
+
].indexOf(raw.payload[0]);
|
|
782
|
+
if (powerDampening === -1)
|
|
783
|
+
powerDampening = 0;
|
|
728
784
|
}
|
|
729
785
|
else {
|
|
730
|
-
|
|
731
|
-
throw new core_1.ZWaveError(`${this.constructor.name}: power dampening must be between 0 and 14 dBm!`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
732
|
-
}
|
|
733
|
-
this.powerDampening = options.powerDampening;
|
|
786
|
+
core_1.validatePayload.fail("Invalid payload length!");
|
|
734
787
|
}
|
|
788
|
+
return new ZWaveProtocolCCNOPPower_1({
|
|
789
|
+
nodeId: ctx.sourceNodeId,
|
|
790
|
+
powerDampening,
|
|
791
|
+
});
|
|
735
792
|
}
|
|
736
793
|
// Power dampening in (negative) dBm. A value of 2 means -2 dBm.
|
|
737
794
|
powerDampening;
|
|
738
|
-
serialize() {
|
|
795
|
+
serialize(ctx) {
|
|
739
796
|
this.payload = Buffer.from([0, this.powerDampening]);
|
|
740
|
-
return super.serialize();
|
|
797
|
+
return super.serialize(ctx);
|
|
741
798
|
}
|
|
742
799
|
};
|
|
743
800
|
exports.ZWaveProtocolCCNOPPower = ZWaveProtocolCCNOPPower;
|
|
744
|
-
exports.ZWaveProtocolCCNOPPower = ZWaveProtocolCCNOPPower = __decorate([
|
|
801
|
+
exports.ZWaveProtocolCCNOPPower = ZWaveProtocolCCNOPPower = ZWaveProtocolCCNOPPower_1 = __decorate([
|
|
745
802
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.NOPPower)
|
|
746
803
|
], ZWaveProtocolCCNOPPower);
|
|
747
|
-
let ZWaveProtocolCCReservedIDs = class ZWaveProtocolCCReservedIDs extends ZWaveProtocolCC {
|
|
748
|
-
constructor(
|
|
749
|
-
super(
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
804
|
+
let ZWaveProtocolCCReservedIDs = ZWaveProtocolCCReservedIDs_1 = class ZWaveProtocolCCReservedIDs extends ZWaveProtocolCC {
|
|
805
|
+
constructor(options) {
|
|
806
|
+
super(options);
|
|
807
|
+
this.reservedNodeIDs = options.reservedNodeIDs;
|
|
808
|
+
}
|
|
809
|
+
static from(raw, ctx) {
|
|
810
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
811
|
+
const numNodeIDs = raw.payload[0];
|
|
812
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1 + numNodeIDs);
|
|
813
|
+
const reservedNodeIDs = [
|
|
814
|
+
...raw.payload.subarray(1, 1 + numNodeIDs),
|
|
815
|
+
];
|
|
816
|
+
return new ZWaveProtocolCCReservedIDs_1({
|
|
817
|
+
nodeId: ctx.sourceNodeId,
|
|
818
|
+
reservedNodeIDs,
|
|
819
|
+
});
|
|
761
820
|
}
|
|
762
821
|
reservedNodeIDs;
|
|
763
|
-
serialize() {
|
|
822
|
+
serialize(ctx) {
|
|
764
823
|
this.payload = Buffer.from([
|
|
765
824
|
this.reservedNodeIDs.length,
|
|
766
825
|
...this.reservedNodeIDs,
|
|
767
826
|
]);
|
|
768
|
-
return super.serialize();
|
|
827
|
+
return super.serialize(ctx);
|
|
769
828
|
}
|
|
770
829
|
};
|
|
771
830
|
exports.ZWaveProtocolCCReservedIDs = ZWaveProtocolCCReservedIDs;
|
|
772
|
-
exports.ZWaveProtocolCCReservedIDs = ZWaveProtocolCCReservedIDs = __decorate([
|
|
831
|
+
exports.ZWaveProtocolCCReservedIDs = ZWaveProtocolCCReservedIDs = ZWaveProtocolCCReservedIDs_1 = __decorate([
|
|
773
832
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.ReservedIDs)
|
|
774
833
|
], ZWaveProtocolCCReservedIDs);
|
|
775
|
-
let ZWaveProtocolCCReserveNodeIDs = class ZWaveProtocolCCReserveNodeIDs extends ZWaveProtocolCC {
|
|
776
|
-
constructor(
|
|
777
|
-
super(
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
834
|
+
let ZWaveProtocolCCReserveNodeIDs = ZWaveProtocolCCReserveNodeIDs_1 = class ZWaveProtocolCCReserveNodeIDs extends ZWaveProtocolCC {
|
|
835
|
+
constructor(options) {
|
|
836
|
+
super(options);
|
|
837
|
+
this.numNodeIDs = options.numNodeIDs;
|
|
838
|
+
}
|
|
839
|
+
static from(raw, ctx) {
|
|
840
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
841
|
+
const numNodeIDs = raw.payload[0];
|
|
842
|
+
return new ZWaveProtocolCCReserveNodeIDs_1({
|
|
843
|
+
nodeId: ctx.sourceNodeId,
|
|
844
|
+
numNodeIDs,
|
|
845
|
+
});
|
|
785
846
|
}
|
|
786
847
|
numNodeIDs;
|
|
787
|
-
serialize() {
|
|
848
|
+
serialize(ctx) {
|
|
788
849
|
this.payload = Buffer.from([this.numNodeIDs]);
|
|
789
|
-
return super.serialize();
|
|
850
|
+
return super.serialize(ctx);
|
|
790
851
|
}
|
|
791
852
|
};
|
|
792
853
|
exports.ZWaveProtocolCCReserveNodeIDs = ZWaveProtocolCCReserveNodeIDs;
|
|
793
|
-
exports.ZWaveProtocolCCReserveNodeIDs = ZWaveProtocolCCReserveNodeIDs = __decorate([
|
|
854
|
+
exports.ZWaveProtocolCCReserveNodeIDs = ZWaveProtocolCCReserveNodeIDs = ZWaveProtocolCCReserveNodeIDs_1 = __decorate([
|
|
794
855
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.ReserveNodeIDs),
|
|
795
856
|
(0, CommandClassDecorators_1.expectedCCResponse)(ZWaveProtocolCCReservedIDs)
|
|
796
857
|
], ZWaveProtocolCCReserveNodeIDs);
|
|
797
|
-
let ZWaveProtocolCCNodesExistReply = class ZWaveProtocolCCNodesExistReply extends ZWaveProtocolCC {
|
|
798
|
-
constructor(
|
|
799
|
-
super(
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
858
|
+
let ZWaveProtocolCCNodesExistReply = ZWaveProtocolCCNodesExistReply_1 = class ZWaveProtocolCCNodesExistReply extends ZWaveProtocolCC {
|
|
859
|
+
constructor(options) {
|
|
860
|
+
super(options);
|
|
861
|
+
this.nodeMaskType = options.nodeMaskType;
|
|
862
|
+
this.nodeListUpdated = options.nodeListUpdated;
|
|
863
|
+
}
|
|
864
|
+
static from(raw, ctx) {
|
|
865
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
866
|
+
const nodeMaskType = raw.payload[0];
|
|
867
|
+
const nodeListUpdated = raw.payload[1] === 0x01;
|
|
868
|
+
return new ZWaveProtocolCCNodesExistReply_1({
|
|
869
|
+
nodeId: ctx.sourceNodeId,
|
|
870
|
+
nodeMaskType,
|
|
871
|
+
nodeListUpdated,
|
|
872
|
+
});
|
|
809
873
|
}
|
|
810
874
|
nodeMaskType;
|
|
811
875
|
nodeListUpdated;
|
|
812
|
-
serialize() {
|
|
876
|
+
serialize(ctx) {
|
|
813
877
|
this.payload = Buffer.from([
|
|
814
878
|
this.nodeMaskType,
|
|
815
879
|
this.nodeListUpdated ? 0x01 : 0x00,
|
|
816
880
|
]);
|
|
817
|
-
return super.serialize();
|
|
881
|
+
return super.serialize(ctx);
|
|
818
882
|
}
|
|
819
883
|
};
|
|
820
884
|
exports.ZWaveProtocolCCNodesExistReply = ZWaveProtocolCCNodesExistReply;
|
|
821
|
-
exports.ZWaveProtocolCCNodesExistReply = ZWaveProtocolCCNodesExistReply = __decorate([
|
|
885
|
+
exports.ZWaveProtocolCCNodesExistReply = ZWaveProtocolCCNodesExistReply = ZWaveProtocolCCNodesExistReply_1 = __decorate([
|
|
822
886
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.NodesExistReply)
|
|
823
887
|
], ZWaveProtocolCCNodesExistReply);
|
|
824
888
|
function testResponseForZWaveProtocolNodesExist(sent, received) {
|
|
825
889
|
return received.nodeMaskType === sent.nodeMaskType;
|
|
826
890
|
}
|
|
827
|
-
let ZWaveProtocolCCNodesExist = class ZWaveProtocolCCNodesExist extends ZWaveProtocolCC {
|
|
828
|
-
constructor(
|
|
829
|
-
super(
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
891
|
+
let ZWaveProtocolCCNodesExist = ZWaveProtocolCCNodesExist_1 = class ZWaveProtocolCCNodesExist extends ZWaveProtocolCC {
|
|
892
|
+
constructor(options) {
|
|
893
|
+
super(options);
|
|
894
|
+
this.nodeMaskType = options.nodeMaskType;
|
|
895
|
+
this.nodeIDs = options.nodeIDs;
|
|
896
|
+
}
|
|
897
|
+
static from(raw, ctx) {
|
|
898
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
899
|
+
const nodeMaskType = raw.payload[0];
|
|
900
|
+
const numNodeIDs = raw.payload[1];
|
|
901
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2 + numNodeIDs);
|
|
902
|
+
const nodeIDs = [...raw.payload.subarray(2, 2 + numNodeIDs)];
|
|
903
|
+
return new ZWaveProtocolCCNodesExist_1({
|
|
904
|
+
nodeId: ctx.sourceNodeId,
|
|
905
|
+
nodeMaskType,
|
|
906
|
+
nodeIDs,
|
|
907
|
+
});
|
|
841
908
|
}
|
|
842
909
|
nodeMaskType;
|
|
843
910
|
nodeIDs;
|
|
844
|
-
serialize() {
|
|
911
|
+
serialize(ctx) {
|
|
845
912
|
this.payload = Buffer.from([
|
|
846
913
|
this.nodeMaskType,
|
|
847
914
|
this.nodeIDs.length,
|
|
848
915
|
...this.nodeIDs,
|
|
849
916
|
]);
|
|
850
|
-
return super.serialize();
|
|
917
|
+
return super.serialize(ctx);
|
|
851
918
|
}
|
|
852
919
|
};
|
|
853
920
|
exports.ZWaveProtocolCCNodesExist = ZWaveProtocolCCNodesExist;
|
|
854
|
-
exports.ZWaveProtocolCCNodesExist = ZWaveProtocolCCNodesExist = __decorate([
|
|
921
|
+
exports.ZWaveProtocolCCNodesExist = ZWaveProtocolCCNodesExist = ZWaveProtocolCCNodesExist_1 = __decorate([
|
|
855
922
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.NodesExist),
|
|
856
923
|
(0, CommandClassDecorators_1.expectedCCResponse)(ZWaveProtocolCCNodesExistReply, testResponseForZWaveProtocolNodesExist)
|
|
857
924
|
], ZWaveProtocolCCNodesExist);
|
|
858
|
-
let ZWaveProtocolCCSetNWIMode = class ZWaveProtocolCCSetNWIMode extends ZWaveProtocolCC {
|
|
859
|
-
constructor(
|
|
860
|
-
super(
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
925
|
+
let ZWaveProtocolCCSetNWIMode = ZWaveProtocolCCSetNWIMode_1 = class ZWaveProtocolCCSetNWIMode extends ZWaveProtocolCC {
|
|
926
|
+
constructor(options) {
|
|
927
|
+
super(options);
|
|
928
|
+
this.enabled = options.enabled;
|
|
929
|
+
this.timeoutMinutes = options.timeoutMinutes;
|
|
930
|
+
}
|
|
931
|
+
static from(raw, ctx) {
|
|
932
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
933
|
+
const enabled = raw.payload[0] === 0x01;
|
|
934
|
+
const timeoutMinutes = raw.payload[1] || undefined;
|
|
935
|
+
return new ZWaveProtocolCCSetNWIMode_1({
|
|
936
|
+
nodeId: ctx.sourceNodeId,
|
|
937
|
+
enabled,
|
|
938
|
+
timeoutMinutes,
|
|
939
|
+
});
|
|
870
940
|
}
|
|
871
941
|
enabled;
|
|
872
942
|
timeoutMinutes;
|
|
873
|
-
serialize() {
|
|
943
|
+
serialize(ctx) {
|
|
874
944
|
this.payload = Buffer.from([
|
|
875
945
|
this.enabled ? 0x01 : 0x00,
|
|
876
946
|
this.timeoutMinutes ?? 0x00,
|
|
877
947
|
]);
|
|
878
|
-
return super.serialize();
|
|
948
|
+
return super.serialize(ctx);
|
|
879
949
|
}
|
|
880
950
|
};
|
|
881
951
|
exports.ZWaveProtocolCCSetNWIMode = ZWaveProtocolCCSetNWIMode;
|
|
882
|
-
exports.ZWaveProtocolCCSetNWIMode = ZWaveProtocolCCSetNWIMode = __decorate([
|
|
952
|
+
exports.ZWaveProtocolCCSetNWIMode = ZWaveProtocolCCSetNWIMode = ZWaveProtocolCCSetNWIMode_1 = __decorate([
|
|
883
953
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.SetNWIMode)
|
|
884
954
|
], ZWaveProtocolCCSetNWIMode);
|
|
885
955
|
let ZWaveProtocolCCExcludeRequest = class ZWaveProtocolCCExcludeRequest extends ZWaveProtocolCCNodeInformationFrame {
|
|
@@ -888,28 +958,31 @@ exports.ZWaveProtocolCCExcludeRequest = ZWaveProtocolCCExcludeRequest;
|
|
|
888
958
|
exports.ZWaveProtocolCCExcludeRequest = ZWaveProtocolCCExcludeRequest = __decorate([
|
|
889
959
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.ExcludeRequest)
|
|
890
960
|
], ZWaveProtocolCCExcludeRequest);
|
|
891
|
-
let ZWaveProtocolCCAssignReturnRoutePriority = class ZWaveProtocolCCAssignReturnRoutePriority extends ZWaveProtocolCC {
|
|
892
|
-
constructor(
|
|
893
|
-
super(
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
961
|
+
let ZWaveProtocolCCAssignReturnRoutePriority = ZWaveProtocolCCAssignReturnRoutePriority_1 = class ZWaveProtocolCCAssignReturnRoutePriority extends ZWaveProtocolCC {
|
|
962
|
+
constructor(options) {
|
|
963
|
+
super(options);
|
|
964
|
+
this.targetNodeId = options.targetNodeId;
|
|
965
|
+
this.routeNumber = options.routeNumber;
|
|
966
|
+
}
|
|
967
|
+
static from(raw, ctx) {
|
|
968
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
969
|
+
const targetNodeId = raw.payload[0];
|
|
970
|
+
const routeNumber = raw.payload[1];
|
|
971
|
+
return new ZWaveProtocolCCAssignReturnRoutePriority_1({
|
|
972
|
+
nodeId: ctx.sourceNodeId,
|
|
973
|
+
targetNodeId,
|
|
974
|
+
routeNumber,
|
|
975
|
+
});
|
|
903
976
|
}
|
|
904
977
|
targetNodeId;
|
|
905
978
|
routeNumber;
|
|
906
|
-
serialize() {
|
|
979
|
+
serialize(ctx) {
|
|
907
980
|
this.payload = Buffer.from([this.targetNodeId, this.routeNumber]);
|
|
908
|
-
return super.serialize();
|
|
981
|
+
return super.serialize(ctx);
|
|
909
982
|
}
|
|
910
983
|
};
|
|
911
984
|
exports.ZWaveProtocolCCAssignReturnRoutePriority = ZWaveProtocolCCAssignReturnRoutePriority;
|
|
912
|
-
exports.ZWaveProtocolCCAssignReturnRoutePriority = ZWaveProtocolCCAssignReturnRoutePriority = __decorate([
|
|
985
|
+
exports.ZWaveProtocolCCAssignReturnRoutePriority = ZWaveProtocolCCAssignReturnRoutePriority = ZWaveProtocolCCAssignReturnRoutePriority_1 = __decorate([
|
|
913
986
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.AssignReturnRoutePriority)
|
|
914
987
|
], ZWaveProtocolCCAssignReturnRoutePriority);
|
|
915
988
|
let ZWaveProtocolCCAssignSUCReturnRoutePriority = class ZWaveProtocolCCAssignSUCReturnRoutePriority extends ZWaveProtocolCCAssignReturnRoutePriority {
|
|
@@ -918,28 +991,30 @@ exports.ZWaveProtocolCCAssignSUCReturnRoutePriority = ZWaveProtocolCCAssignSUCRe
|
|
|
918
991
|
exports.ZWaveProtocolCCAssignSUCReturnRoutePriority = ZWaveProtocolCCAssignSUCReturnRoutePriority = __decorate([
|
|
919
992
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.AssignSUCReturnRoutePriority)
|
|
920
993
|
], ZWaveProtocolCCAssignSUCReturnRoutePriority);
|
|
921
|
-
let ZWaveProtocolCCSmartStartIncludedNodeInformation = class ZWaveProtocolCCSmartStartIncludedNodeInformation extends ZWaveProtocolCC {
|
|
922
|
-
constructor(
|
|
923
|
-
super(
|
|
924
|
-
if (
|
|
925
|
-
|
|
926
|
-
this.nwiHomeId = this.payload.subarray(0, 4);
|
|
927
|
-
}
|
|
928
|
-
else {
|
|
929
|
-
if (options.nwiHomeId.length !== 4) {
|
|
930
|
-
throw new core_1.ZWaveError(`nwiHomeId must have length 4`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
931
|
-
}
|
|
932
|
-
this.nwiHomeId = options.nwiHomeId;
|
|
994
|
+
let ZWaveProtocolCCSmartStartIncludedNodeInformation = ZWaveProtocolCCSmartStartIncludedNodeInformation_1 = class ZWaveProtocolCCSmartStartIncludedNodeInformation extends ZWaveProtocolCC {
|
|
995
|
+
constructor(options) {
|
|
996
|
+
super(options);
|
|
997
|
+
if (options.nwiHomeId.length !== 4) {
|
|
998
|
+
throw new core_1.ZWaveError(`nwiHomeId must have length 4`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
933
999
|
}
|
|
1000
|
+
this.nwiHomeId = options.nwiHomeId;
|
|
1001
|
+
}
|
|
1002
|
+
static from(raw, ctx) {
|
|
1003
|
+
(0, core_1.validatePayload)(raw.payload.length >= 4);
|
|
1004
|
+
const nwiHomeId = raw.payload.subarray(0, 4);
|
|
1005
|
+
return new ZWaveProtocolCCSmartStartIncludedNodeInformation_1({
|
|
1006
|
+
nodeId: ctx.sourceNodeId,
|
|
1007
|
+
nwiHomeId,
|
|
1008
|
+
});
|
|
934
1009
|
}
|
|
935
1010
|
nwiHomeId;
|
|
936
|
-
serialize() {
|
|
1011
|
+
serialize(ctx) {
|
|
937
1012
|
this.payload = Buffer.from(this.nwiHomeId);
|
|
938
|
-
return super.serialize();
|
|
1013
|
+
return super.serialize(ctx);
|
|
939
1014
|
}
|
|
940
1015
|
};
|
|
941
1016
|
exports.ZWaveProtocolCCSmartStartIncludedNodeInformation = ZWaveProtocolCCSmartStartIncludedNodeInformation;
|
|
942
|
-
exports.ZWaveProtocolCCSmartStartIncludedNodeInformation = ZWaveProtocolCCSmartStartIncludedNodeInformation = __decorate([
|
|
1017
|
+
exports.ZWaveProtocolCCSmartStartIncludedNodeInformation = ZWaveProtocolCCSmartStartIncludedNodeInformation = ZWaveProtocolCCSmartStartIncludedNodeInformation_1 = __decorate([
|
|
943
1018
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ZWaveProtocolCommand.SmartStartIncludedNodeInformation)
|
|
944
1019
|
], ZWaveProtocolCCSmartStartIncludedNodeInformation);
|
|
945
1020
|
let ZWaveProtocolCCSmartStartPrime = class ZWaveProtocolCCSmartStartPrime extends ZWaveProtocolCCNodeInformationFrame {
|