zwave-js 9.2.1 → 9.3.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/Controller.d.ts +2 -2
- package/build/Controller.d.ts.map +1 -1
- package/build/Controller.js +1 -1
- package/build/Controller.js.map +1 -1
- package/build/Driver.d.ts +3 -4
- package/build/Driver.d.ts.map +1 -1
- package/build/Driver.js +6 -7
- package/build/Driver.js.map +1 -1
- package/build/Utils.d.ts +2 -0
- package/build/Utils.d.ts.map +1 -1
- package/build/Utils.js +5 -1
- package/build/Utils.js.map +1 -1
- package/build/lib/commandclass/AlarmSensorCC.d.ts +6 -5
- package/build/lib/commandclass/AlarmSensorCC.d.ts.map +1 -1
- package/build/lib/commandclass/AlarmSensorCC.js +23 -23
- package/build/lib/commandclass/AlarmSensorCC.js.map +1 -1
- package/build/lib/commandclass/AssociationCC.d.ts +12 -11
- package/build/lib/commandclass/AssociationCC.d.ts.map +1 -1
- package/build/lib/commandclass/AssociationCC.js +47 -41
- package/build/lib/commandclass/AssociationCC.js.map +1 -1
- package/build/lib/commandclass/AssociationGroupInfoCC.d.ts +15 -14
- package/build/lib/commandclass/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/lib/commandclass/AssociationGroupInfoCC.js +56 -51
- package/build/lib/commandclass/AssociationGroupInfoCC.js.map +1 -1
- package/build/lib/commandclass/BarrierOperatorCC.d.ts +9 -8
- package/build/lib/commandclass/BarrierOperatorCC.d.ts.map +1 -1
- package/build/lib/commandclass/BarrierOperatorCC.js +28 -28
- package/build/lib/commandclass/BarrierOperatorCC.js.map +1 -1
- package/build/lib/commandclass/BasicCC.d.ts +5 -4
- package/build/lib/commandclass/BasicCC.d.ts.map +1 -1
- package/build/lib/commandclass/BasicCC.js +18 -18
- package/build/lib/commandclass/BasicCC.js.map +1 -1
- package/build/lib/commandclass/BatteryCC.d.ts +5 -4
- package/build/lib/commandclass/BatteryCC.d.ts.map +1 -1
- package/build/lib/commandclass/BatteryCC.js +17 -17
- package/build/lib/commandclass/BatteryCC.js.map +1 -1
- package/build/lib/commandclass/BinarySensorCC.d.ts +6 -5
- package/build/lib/commandclass/BinarySensorCC.d.ts.map +1 -1
- package/build/lib/commandclass/BinarySensorCC.js +24 -24
- package/build/lib/commandclass/BinarySensorCC.js.map +1 -1
- package/build/lib/commandclass/BinarySwitchCC.d.ts +5 -4
- package/build/lib/commandclass/BinarySwitchCC.d.ts.map +1 -1
- package/build/lib/commandclass/BinarySwitchCC.js +15 -15
- package/build/lib/commandclass/BinarySwitchCC.js.map +1 -1
- package/build/lib/commandclass/CRC16CC.d.ts +3 -3
- package/build/lib/commandclass/CRC16CC.d.ts.map +1 -1
- package/build/lib/commandclass/CRC16CC.js +5 -5
- package/build/lib/commandclass/CRC16CC.js.map +1 -1
- package/build/lib/commandclass/CentralSceneCC.d.ts +6 -5
- package/build/lib/commandclass/CentralSceneCC.d.ts.map +1 -1
- package/build/lib/commandclass/CentralSceneCC.js +23 -25
- package/build/lib/commandclass/CentralSceneCC.js.map +1 -1
- package/build/lib/commandclass/ClimateControlScheduleCC.d.ts +7 -7
- package/build/lib/commandclass/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/lib/commandclass/ClimateControlScheduleCC.js +12 -12
- package/build/lib/commandclass/ClimateControlScheduleCC.js.map +1 -1
- package/build/lib/commandclass/ClockCC.d.ts +5 -4
- package/build/lib/commandclass/ClockCC.d.ts.map +1 -1
- package/build/lib/commandclass/ClockCC.js +15 -15
- package/build/lib/commandclass/ClockCC.js.map +1 -1
- package/build/lib/commandclass/ColorSwitchCC.d.ts +10 -9
- package/build/lib/commandclass/ColorSwitchCC.d.ts.map +1 -1
- package/build/lib/commandclass/ColorSwitchCC.js +29 -29
- package/build/lib/commandclass/ColorSwitchCC.js.map +1 -1
- package/build/lib/commandclass/CommandClass.d.ts +17 -10
- package/build/lib/commandclass/CommandClass.d.ts.map +1 -1
- package/build/lib/commandclass/CommandClass.js +53 -27
- package/build/lib/commandclass/CommandClass.js.map +1 -1
- package/build/lib/commandclass/ConfigurationCC.d.ts +16 -15
- package/build/lib/commandclass/ConfigurationCC.d.ts.map +1 -1
- package/build/lib/commandclass/ConfigurationCC.js +66 -59
- package/build/lib/commandclass/ConfigurationCC.js.map +1 -1
- package/build/lib/commandclass/DoorLockCC.d.ts +8 -7
- package/build/lib/commandclass/DoorLockCC.d.ts.map +1 -1
- package/build/lib/commandclass/DoorLockCC.js +27 -27
- package/build/lib/commandclass/DoorLockCC.js.map +1 -1
- package/build/lib/commandclass/DoorLockLoggingCC.d.ts +6 -5
- package/build/lib/commandclass/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/lib/commandclass/DoorLockLoggingCC.js +18 -18
- package/build/lib/commandclass/DoorLockLoggingCC.js.map +1 -1
- package/build/lib/commandclass/EntryControlCC.d.ts +8 -7
- package/build/lib/commandclass/EntryControlCC.d.ts.map +1 -1
- package/build/lib/commandclass/EntryControlCC.js +27 -27
- package/build/lib/commandclass/EntryControlCC.js.map +1 -1
- package/build/lib/commandclass/FirmwareUpdateMetaDataCC.d.ts +11 -11
- package/build/lib/commandclass/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/lib/commandclass/FirmwareUpdateMetaDataCC.js +20 -20
- package/build/lib/commandclass/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/lib/commandclass/HumidityControlModeCC.d.ts +6 -5
- package/build/lib/commandclass/HumidityControlModeCC.d.ts.map +1 -1
- package/build/lib/commandclass/HumidityControlModeCC.js +22 -22
- package/build/lib/commandclass/HumidityControlModeCC.js.map +1 -1
- package/build/lib/commandclass/HumidityControlOperatingStateCC.d.ts +4 -3
- package/build/lib/commandclass/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/lib/commandclass/HumidityControlOperatingStateCC.js +13 -13
- package/build/lib/commandclass/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/lib/commandclass/HumidityControlSetpointCC.d.ts +11 -10
- package/build/lib/commandclass/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/lib/commandclass/HumidityControlSetpointCC.js +46 -46
- package/build/lib/commandclass/HumidityControlSetpointCC.js.map +1 -1
- package/build/lib/commandclass/IndicatorCC.d.ts +9 -8
- package/build/lib/commandclass/IndicatorCC.d.ts.map +1 -1
- package/build/lib/commandclass/IndicatorCC.js +37 -37
- package/build/lib/commandclass/IndicatorCC.js.map +1 -1
- package/build/lib/commandclass/IrrigationCC.d.ts +18 -17
- package/build/lib/commandclass/IrrigationCC.d.ts.map +1 -1
- package/build/lib/commandclass/IrrigationCC.js +51 -51
- package/build/lib/commandclass/IrrigationCC.js.map +1 -1
- package/build/lib/commandclass/LanguageCC.d.ts +5 -4
- package/build/lib/commandclass/LanguageCC.d.ts.map +1 -1
- package/build/lib/commandclass/LanguageCC.js +15 -15
- package/build/lib/commandclass/LanguageCC.js.map +1 -1
- package/build/lib/commandclass/LockCC.d.ts +5 -4
- package/build/lib/commandclass/LockCC.d.ts.map +1 -1
- package/build/lib/commandclass/LockCC.js +15 -15
- package/build/lib/commandclass/LockCC.js.map +1 -1
- package/build/lib/commandclass/ManufacturerProprietaryCC.d.ts +11 -3
- package/build/lib/commandclass/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/lib/commandclass/ManufacturerProprietaryCC.js +44 -18
- package/build/lib/commandclass/ManufacturerProprietaryCC.js.map +1 -1
- package/build/lib/commandclass/ManufacturerSpecificCC.d.ts +5 -4
- package/build/lib/commandclass/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/lib/commandclass/ManufacturerSpecificCC.js +15 -15
- package/build/lib/commandclass/ManufacturerSpecificCC.js.map +1 -1
- package/build/lib/commandclass/MeterCC.d.ts +8 -7
- package/build/lib/commandclass/MeterCC.d.ts.map +1 -1
- package/build/lib/commandclass/MeterCC.js +49 -41
- package/build/lib/commandclass/MeterCC.js.map +1 -1
- package/build/lib/commandclass/MultiChannelAssociationCC.d.ts +12 -11
- package/build/lib/commandclass/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/lib/commandclass/MultiChannelAssociationCC.js +45 -43
- package/build/lib/commandclass/MultiChannelAssociationCC.js.map +1 -1
- package/build/lib/commandclass/MultiChannelCC.d.ts +15 -14
- package/build/lib/commandclass/MultiChannelCC.d.ts.map +1 -1
- package/build/lib/commandclass/MultiChannelCC.js +61 -61
- package/build/lib/commandclass/MultiChannelCC.js.map +1 -1
- package/build/lib/commandclass/MultiCommandCC.d.ts +3 -3
- package/build/lib/commandclass/MultiCommandCC.d.ts.map +1 -1
- package/build/lib/commandclass/MultiCommandCC.js +5 -5
- package/build/lib/commandclass/MultiCommandCC.js.map +1 -1
- package/build/lib/commandclass/MultilevelSensorCC.d.ts +8 -7
- package/build/lib/commandclass/MultilevelSensorCC.d.ts.map +1 -1
- package/build/lib/commandclass/MultilevelSensorCC.js +50 -50
- package/build/lib/commandclass/MultilevelSensorCC.js.map +1 -1
- package/build/lib/commandclass/MultilevelSwitchCC.d.ts +8 -7
- package/build/lib/commandclass/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/lib/commandclass/MultilevelSwitchCC.js +31 -31
- package/build/lib/commandclass/MultilevelSwitchCC.js.map +1 -1
- package/build/lib/commandclass/NoOperationCC.d.ts +1 -1
- package/build/lib/commandclass/NoOperationCC.d.ts.map +1 -1
- package/build/lib/commandclass/NoOperationCC.js +2 -2
- package/build/lib/commandclass/NoOperationCC.js.map +1 -1
- package/build/lib/commandclass/NodeNamingCC.d.ts +7 -6
- package/build/lib/commandclass/NodeNamingCC.d.ts.map +1 -1
- package/build/lib/commandclass/NodeNamingCC.js +21 -21
- package/build/lib/commandclass/NodeNamingCC.js.map +1 -1
- package/build/lib/commandclass/NotificationCC.d.ts +10 -9
- package/build/lib/commandclass/NotificationCC.d.ts.map +1 -1
- package/build/lib/commandclass/NotificationCC.js +54 -54
- package/build/lib/commandclass/NotificationCC.js.map +1 -1
- package/build/lib/commandclass/PowerlevelCC.d.ts +5 -5
- package/build/lib/commandclass/PowerlevelCC.d.ts.map +1 -1
- package/build/lib/commandclass/PowerlevelCC.js +9 -9
- package/build/lib/commandclass/PowerlevelCC.js.map +1 -1
- package/build/lib/commandclass/ProtectionCC.d.ts +10 -9
- package/build/lib/commandclass/ProtectionCC.d.ts.map +1 -1
- package/build/lib/commandclass/ProtectionCC.js +33 -33
- package/build/lib/commandclass/ProtectionCC.js.map +1 -1
- package/build/lib/commandclass/SceneActivationCC.d.ts +2 -2
- package/build/lib/commandclass/SceneActivationCC.d.ts.map +1 -1
- package/build/lib/commandclass/SceneActivationCC.js +2 -2
- package/build/lib/commandclass/SceneActivationCC.js.map +1 -1
- package/build/lib/commandclass/SceneActuatorConfigurationCC.d.ts +5 -4
- package/build/lib/commandclass/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/lib/commandclass/SceneActuatorConfigurationCC.js +9 -9
- package/build/lib/commandclass/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/lib/commandclass/SceneControllerConfigurationCC.d.ts +7 -6
- package/build/lib/commandclass/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/lib/commandclass/SceneControllerConfigurationCC.js +32 -28
- package/build/lib/commandclass/SceneControllerConfigurationCC.js.map +1 -1
- package/build/lib/commandclass/Security2CC.d.ts +17 -26
- package/build/lib/commandclass/Security2CC.d.ts.map +1 -1
- package/build/lib/commandclass/Security2CC.js +68 -68
- package/build/lib/commandclass/Security2CC.js.map +1 -1
- package/build/lib/commandclass/SecurityCC.d.ts +11 -14
- package/build/lib/commandclass/SecurityCC.d.ts.map +1 -1
- package/build/lib/commandclass/SecurityCC.js +41 -41
- package/build/lib/commandclass/SecurityCC.js.map +1 -1
- package/build/lib/commandclass/SoundSwitchCC.d.ts +9 -8
- package/build/lib/commandclass/SoundSwitchCC.d.ts.map +1 -1
- package/build/lib/commandclass/SoundSwitchCC.js +27 -27
- package/build/lib/commandclass/SoundSwitchCC.js.map +1 -1
- package/build/lib/commandclass/SupervisionCC.d.ts +4 -4
- package/build/lib/commandclass/SupervisionCC.d.ts.map +1 -1
- package/build/lib/commandclass/SupervisionCC.js +9 -9
- package/build/lib/commandclass/SupervisionCC.js.map +1 -1
- package/build/lib/commandclass/ThermostatFanModeCC.d.ts +6 -5
- package/build/lib/commandclass/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/lib/commandclass/ThermostatFanModeCC.js +22 -22
- package/build/lib/commandclass/ThermostatFanModeCC.js.map +1 -1
- package/build/lib/commandclass/ThermostatFanStateCC.d.ts +4 -3
- package/build/lib/commandclass/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/lib/commandclass/ThermostatFanStateCC.js +13 -13
- package/build/lib/commandclass/ThermostatFanStateCC.js.map +1 -1
- package/build/lib/commandclass/ThermostatModeCC.d.ts +6 -5
- package/build/lib/commandclass/ThermostatModeCC.d.ts.map +1 -1
- package/build/lib/commandclass/ThermostatModeCC.js +22 -22
- package/build/lib/commandclass/ThermostatModeCC.js.map +1 -1
- package/build/lib/commandclass/ThermostatOperatingStateCC.d.ts +4 -3
- package/build/lib/commandclass/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/lib/commandclass/ThermostatOperatingStateCC.js +13 -13
- package/build/lib/commandclass/ThermostatOperatingStateCC.js.map +1 -1
- package/build/lib/commandclass/ThermostatSetbackCC.d.ts +5 -4
- package/build/lib/commandclass/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/lib/commandclass/ThermostatSetbackCC.js +15 -15
- package/build/lib/commandclass/ThermostatSetbackCC.js.map +1 -1
- package/build/lib/commandclass/ThermostatSetpointCC.d.ts +10 -9
- package/build/lib/commandclass/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/lib/commandclass/ThermostatSetpointCC.js +48 -48
- package/build/lib/commandclass/ThermostatSetpointCC.js.map +1 -1
- package/build/lib/commandclass/TimeCC.d.ts +6 -5
- package/build/lib/commandclass/TimeCC.d.ts.map +1 -1
- package/build/lib/commandclass/TimeCC.js +15 -15
- package/build/lib/commandclass/TimeCC.js.map +1 -1
- package/build/lib/commandclass/TimeParametersCC.d.ts +4 -3
- package/build/lib/commandclass/TimeParametersCC.d.ts.map +1 -1
- package/build/lib/commandclass/TimeParametersCC.js +11 -11
- package/build/lib/commandclass/TimeParametersCC.js.map +1 -1
- package/build/lib/commandclass/TransportServiceCC.d.ts +7 -7
- package/build/lib/commandclass/TransportServiceCC.d.ts.map +1 -1
- package/build/lib/commandclass/TransportServiceCC.js +12 -12
- package/build/lib/commandclass/TransportServiceCC.js.map +1 -1
- package/build/lib/commandclass/UserCodeCC.d.ts +17 -16
- package/build/lib/commandclass/UserCodeCC.d.ts.map +1 -1
- package/build/lib/commandclass/UserCodeCC.js +58 -58
- package/build/lib/commandclass/UserCodeCC.js.map +1 -1
- package/build/lib/commandclass/VersionCC.d.ts +7 -6
- package/build/lib/commandclass/VersionCC.d.ts.map +1 -1
- package/build/lib/commandclass/VersionCC.js +28 -28
- package/build/lib/commandclass/VersionCC.js.map +1 -1
- package/build/lib/commandclass/WakeUpCC.d.ts +5 -5
- package/build/lib/commandclass/WakeUpCC.d.ts.map +1 -1
- package/build/lib/commandclass/WakeUpCC.js +24 -28
- package/build/lib/commandclass/WakeUpCC.js.map +1 -1
- package/build/lib/commandclass/ZWavePlusCC.d.ts +20 -14
- package/build/lib/commandclass/ZWavePlusCC.d.ts.map +1 -1
- package/build/lib/commandclass/ZWavePlusCC.js +119 -41
- package/build/lib/commandclass/ZWavePlusCC.js.map +1 -1
- package/build/lib/commandclass/manufacturerProprietary/Fibaro.d.ts +8 -7
- package/build/lib/commandclass/manufacturerProprietary/Fibaro.d.ts.map +1 -1
- package/build/lib/commandclass/manufacturerProprietary/Fibaro.js +21 -21
- package/build/lib/commandclass/manufacturerProprietary/Fibaro.js.map +1 -1
- package/build/lib/controller/Controller.d.ts +21 -14
- package/build/lib/controller/Controller.d.ts.map +1 -1
- package/build/lib/controller/Controller.js +129 -140
- package/build/lib/controller/Controller.js.map +1 -1
- package/build/lib/controller/Inclusion.d.ts +1 -1
- package/build/lib/controller/Inclusion.d.ts.map +1 -1
- package/build/lib/controller/MockControllerBehaviors.d.ts +4 -0
- package/build/lib/controller/MockControllerBehaviors.d.ts.map +1 -0
- package/build/lib/controller/MockControllerBehaviors.js +161 -0
- package/build/lib/controller/MockControllerBehaviors.js.map +1 -0
- package/build/lib/controller/NodeInformationFrame.d.ts +9 -0
- package/build/lib/controller/NodeInformationFrame.d.ts.map +1 -0
- package/build/lib/controller/NodeInformationFrame.js +53 -0
- package/build/lib/controller/NodeInformationFrame.js.map +1 -0
- package/build/lib/controller/ZWaveChipTypes.d.ts +10 -0
- package/build/lib/controller/ZWaveChipTypes.d.ts.map +1 -0
- package/build/lib/controller/ZWaveChipTypes.js +32 -0
- package/build/lib/controller/ZWaveChipTypes.js.map +1 -0
- package/build/lib/controller/utils.d.ts +3 -0
- package/build/lib/controller/utils.d.ts.map +1 -0
- package/build/lib/controller/utils.js +40 -0
- package/build/lib/controller/utils.js.map +1 -0
- package/build/lib/driver/CommandQueueMachine.d.ts +1 -1
- package/build/lib/driver/CommandQueueMachine.d.ts.map +1 -1
- package/build/lib/driver/CommandQueueMachine.js.map +1 -1
- package/build/lib/driver/Driver.d.ts +7 -4
- package/build/lib/driver/Driver.d.ts.map +1 -1
- package/build/lib/driver/Driver.js +89 -67
- package/build/lib/driver/Driver.js.map +1 -1
- package/build/lib/driver/DriverMock.d.ts +13 -0
- package/build/lib/driver/DriverMock.d.ts.map +1 -0
- package/build/lib/driver/DriverMock.js +53 -0
- package/build/lib/driver/DriverMock.js.map +1 -0
- package/build/lib/driver/MessageGenerators.d.ts +1 -1
- package/build/lib/driver/MessageGenerators.d.ts.map +1 -1
- package/build/lib/driver/MessageGenerators.js.map +1 -1
- package/build/lib/driver/NetworkCache.d.ts +1 -1
- package/build/lib/driver/NetworkCache.d.ts.map +1 -1
- package/build/lib/driver/NetworkCache.js +80 -38
- package/build/lib/driver/NetworkCache.js.map +1 -1
- package/build/lib/driver/SendThreadMachine.d.ts +2 -2
- package/build/lib/driver/SendThreadMachine.d.ts.map +1 -1
- package/build/lib/driver/SendThreadMachine.js +4 -4
- package/build/lib/driver/SendThreadMachine.js.map +1 -1
- package/build/lib/driver/SerialAPICommandMachine.d.ts +1 -1
- package/build/lib/driver/SerialAPICommandMachine.d.ts.map +1 -1
- package/build/lib/driver/SerialAPICommandMachine.js +6 -7
- package/build/lib/driver/SerialAPICommandMachine.js.map +1 -1
- package/build/lib/driver/StateMachineShared.d.ts +1 -1
- package/build/lib/driver/StateMachineShared.d.ts.map +1 -1
- package/build/lib/driver/StateMachineShared.js.map +1 -1
- package/build/lib/driver/Transaction.d.ts +2 -2
- package/build/lib/driver/Transaction.d.ts.map +1 -1
- package/build/lib/driver/Transaction.js +5 -5
- package/build/lib/driver/Transaction.js.map +1 -1
- package/build/lib/driver/TransactionMachine.d.ts +1 -1
- package/build/lib/driver/TransactionMachine.d.ts.map +1 -1
- package/build/lib/driver/TransactionMachine.js.map +1 -1
- package/build/lib/driver/ZWaveOptions.d.ts +1 -1
- package/build/lib/driver/ZWaveOptions.d.ts.map +1 -1
- package/build/lib/log/Driver.d.ts +1 -1
- package/build/lib/log/Driver.d.ts.map +1 -1
- package/build/lib/log/Driver.js +4 -4
- package/build/lib/log/Driver.js.map +1 -1
- package/build/lib/node/Endpoint.d.ts +3 -2
- package/build/lib/node/Endpoint.d.ts.map +1 -1
- package/build/lib/node/Endpoint.js +32 -31
- package/build/lib/node/Endpoint.js.map +1 -1
- package/build/lib/node/Node.d.ts +4 -13
- package/build/lib/node/Node.d.ts.map +1 -1
- package/build/lib/node/Node.js +64 -150
- package/build/lib/node/Node.js.map +1 -1
- package/build/lib/node/_Types.d.ts +2 -30
- package/build/lib/node/_Types.d.ts.map +1 -1
- package/build/lib/node/_Types.js +3 -33
- package/build/lib/node/_Types.js.map +1 -1
- package/build/lib/node/utils.d.ts +28 -0
- package/build/lib/node/utils.d.ts.map +1 -0
- package/build/lib/node/utils.js +187 -0
- package/build/lib/node/utils.js.map +1 -0
- package/build/lib/serialapi/_Types.d.ts +1 -14
- package/build/lib/serialapi/_Types.d.ts.map +1 -1
- package/build/lib/serialapi/_Types.js +2 -15
- package/build/lib/serialapi/_Types.js.map +1 -1
- package/build/lib/serialapi/application/ApplicationCommandRequest.d.ts +4 -3
- package/build/lib/serialapi/application/ApplicationCommandRequest.d.ts.map +1 -1
- package/build/lib/serialapi/application/ApplicationCommandRequest.js +15 -14
- package/build/lib/serialapi/application/ApplicationCommandRequest.js.map +1 -1
- package/build/lib/serialapi/application/ApplicationUpdateRequest.d.ts +6 -6
- package/build/lib/serialapi/application/ApplicationUpdateRequest.d.ts.map +1 -1
- package/build/lib/serialapi/application/ApplicationUpdateRequest.js +10 -11
- package/build/lib/serialapi/application/ApplicationUpdateRequest.js.map +1 -1
- package/build/lib/serialapi/application/BridgeApplicationCommandRequest.d.ts +4 -3
- package/build/lib/serialapi/application/BridgeApplicationCommandRequest.d.ts.map +1 -1
- package/build/lib/serialapi/application/BridgeApplicationCommandRequest.js +14 -9
- package/build/lib/serialapi/application/BridgeApplicationCommandRequest.js.map +1 -1
- package/build/lib/serialapi/application/SerialAPIStartedRequest.d.ts +23 -11
- package/build/lib/serialapi/application/SerialAPIStartedRequest.d.ts.map +1 -1
- package/build/lib/serialapi/application/SerialAPIStartedRequest.js +59 -36
- package/build/lib/serialapi/application/SerialAPIStartedRequest.js.map +1 -1
- package/build/lib/serialapi/capability/GetControllerCapabilitiesMessages.d.ts +17 -11
- package/build/lib/serialapi/capability/GetControllerCapabilitiesMessages.d.ts.map +1 -1
- package/build/lib/serialapi/capability/GetControllerCapabilitiesMessages.js +40 -34
- package/build/lib/serialapi/capability/GetControllerCapabilitiesMessages.js.map +1 -1
- package/build/lib/serialapi/capability/GetControllerVersionMessages.d.ts +11 -9
- package/build/lib/serialapi/capability/GetControllerVersionMessages.d.ts.map +1 -1
- package/build/lib/serialapi/capability/GetControllerVersionMessages.js +24 -24
- package/build/lib/serialapi/capability/GetControllerVersionMessages.js.map +1 -1
- package/build/lib/serialapi/capability/GetProtocolVersionMessages.d.ts +3 -3
- package/build/lib/serialapi/capability/GetProtocolVersionMessages.d.ts.map +1 -1
- package/build/lib/serialapi/capability/GetProtocolVersionMessages.js +9 -10
- package/build/lib/serialapi/capability/GetProtocolVersionMessages.js.map +1 -1
- package/build/lib/serialapi/capability/GetSerialApiCapabilitiesMessages.d.ts +17 -16
- package/build/lib/serialapi/capability/GetSerialApiCapabilitiesMessages.d.ts.map +1 -1
- package/build/lib/serialapi/capability/GetSerialApiCapabilitiesMessages.js +39 -42
- package/build/lib/serialapi/capability/GetSerialApiCapabilitiesMessages.js.map +1 -1
- package/build/lib/serialapi/capability/GetSerialApiInitDataMessages.d.ts +26 -14
- package/build/lib/serialapi/capability/GetSerialApiInitDataMessages.d.ts.map +1 -1
- package/build/lib/serialapi/capability/GetSerialApiInitDataMessages.js +138 -51
- package/build/lib/serialapi/capability/GetSerialApiInitDataMessages.js.map +1 -1
- package/build/lib/serialapi/capability/HardResetRequest.d.ts +12 -2
- package/build/lib/serialapi/capability/HardResetRequest.d.ts.map +1 -1
- package/build/lib/serialapi/capability/HardResetRequest.js +41 -11
- package/build/lib/serialapi/capability/HardResetRequest.js.map +1 -1
- package/build/lib/serialapi/capability/SerialAPISetupMessages.d.ts +22 -22
- package/build/lib/serialapi/capability/SerialAPISetupMessages.d.ts.map +1 -1
- package/build/lib/serialapi/capability/SerialAPISetupMessages.js +50 -51
- package/build/lib/serialapi/capability/SerialAPISetupMessages.js.map +1 -1
- package/build/lib/serialapi/capability/SetApplicationNodeInformationRequest.d.ts +22 -0
- package/build/lib/serialapi/capability/SetApplicationNodeInformationRequest.d.ts.map +1 -0
- package/build/lib/serialapi/capability/SetApplicationNodeInformationRequest.js +60 -0
- package/build/lib/serialapi/capability/SetApplicationNodeInformationRequest.js.map +1 -0
- package/build/lib/serialapi/memory/GetControllerIdMessages.d.ts +13 -9
- package/build/lib/serialapi/memory/GetControllerIdMessages.d.ts.map +1 -1
- package/build/lib/serialapi/memory/GetControllerIdMessages.js +31 -23
- package/build/lib/serialapi/memory/GetControllerIdMessages.js.map +1 -1
- package/build/lib/serialapi/misc/GetBackgroundRSSIMessages.d.ts +3 -3
- package/build/lib/serialapi/misc/GetBackgroundRSSIMessages.d.ts.map +1 -1
- package/build/lib/serialapi/misc/GetBackgroundRSSIMessages.js +9 -10
- package/build/lib/serialapi/misc/GetBackgroundRSSIMessages.js.map +1 -1
- package/build/lib/serialapi/misc/SetRFReceiveModeMessages.d.ts +5 -5
- package/build/lib/serialapi/misc/SetRFReceiveModeMessages.d.ts.map +1 -1
- package/build/lib/serialapi/misc/SetRFReceiveModeMessages.js +12 -13
- package/build/lib/serialapi/misc/SetRFReceiveModeMessages.js.map +1 -1
- package/build/lib/serialapi/misc/SetSerialApiTimeoutsMessages.d.ts +4 -4
- package/build/lib/serialapi/misc/SetSerialApiTimeoutsMessages.d.ts.map +1 -1
- package/build/lib/serialapi/misc/SetSerialApiTimeoutsMessages.js +11 -12
- package/build/lib/serialapi/misc/SetSerialApiTimeoutsMessages.js.map +1 -1
- package/build/lib/serialapi/misc/SoftResetRequest.d.ts +1 -1
- package/build/lib/serialapi/misc/SoftResetRequest.d.ts.map +1 -1
- package/build/lib/serialapi/misc/SoftResetRequest.js +4 -5
- package/build/lib/serialapi/misc/SoftResetRequest.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/AddNodeToNetworkRequest.d.ts +8 -8
- package/build/lib/serialapi/network-mgmt/AddNodeToNetworkRequest.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/AddNodeToNetworkRequest.js +17 -18
- package/build/lib/serialapi/network-mgmt/AddNodeToNetworkRequest.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/AssignReturnRouteMessages.d.ts +7 -8
- package/build/lib/serialapi/network-mgmt/AssignReturnRouteMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/AssignReturnRouteMessages.js +19 -20
- package/build/lib/serialapi/network-mgmt/AssignReturnRouteMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/AssignSUCReturnRouteMessages.d.ts +7 -8
- package/build/lib/serialapi/network-mgmt/AssignSUCReturnRouteMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/AssignSUCReturnRouteMessages.js +19 -20
- package/build/lib/serialapi/network-mgmt/AssignSUCReturnRouteMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/DeleteReturnRouteMessages.d.ts +7 -8
- package/build/lib/serialapi/network-mgmt/DeleteReturnRouteMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/DeleteReturnRouteMessages.js +19 -20
- package/build/lib/serialapi/network-mgmt/DeleteReturnRouteMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/DeleteSUCReturnRouteMessages.d.ts +7 -8
- package/build/lib/serialapi/network-mgmt/DeleteSUCReturnRouteMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/DeleteSUCReturnRouteMessages.js +19 -20
- package/build/lib/serialapi/network-mgmt/DeleteSUCReturnRouteMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/GetNodeProtocolInfoMessages.d.ts +20 -18
- package/build/lib/serialapi/network-mgmt/GetNodeProtocolInfoMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/GetNodeProtocolInfoMessages.js +72 -26
- package/build/lib/serialapi/network-mgmt/GetNodeProtocolInfoMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/GetRoutingInfoMessages.d.ts +4 -4
- package/build/lib/serialapi/network-mgmt/GetRoutingInfoMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/GetRoutingInfoMessages.js +11 -12
- package/build/lib/serialapi/network-mgmt/GetRoutingInfoMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/GetSUCNodeIdMessages.d.ts +9 -7
- package/build/lib/serialapi/network-mgmt/GetSUCNodeIdMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/GetSUCNodeIdMessages.js +18 -19
- package/build/lib/serialapi/network-mgmt/GetSUCNodeIdMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/IsFailedNodeMessages.d.ts +4 -4
- package/build/lib/serialapi/network-mgmt/IsFailedNodeMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/IsFailedNodeMessages.js +11 -12
- package/build/lib/serialapi/network-mgmt/IsFailedNodeMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/RemoveFailedNodeMessages.d.ts +7 -7
- package/build/lib/serialapi/network-mgmt/RemoveFailedNodeMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/RemoveFailedNodeMessages.js +18 -19
- package/build/lib/serialapi/network-mgmt/RemoveFailedNodeMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/RemoveNodeFromNetworkRequest.d.ts +6 -6
- package/build/lib/serialapi/network-mgmt/RemoveNodeFromNetworkRequest.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/RemoveNodeFromNetworkRequest.js +13 -14
- package/build/lib/serialapi/network-mgmt/RemoveNodeFromNetworkRequest.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/ReplaceFailedNodeRequest.d.ts +7 -7
- package/build/lib/serialapi/network-mgmt/ReplaceFailedNodeRequest.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/ReplaceFailedNodeRequest.js +17 -18
- package/build/lib/serialapi/network-mgmt/ReplaceFailedNodeRequest.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/RequestNodeInfoMessages.d.ts +5 -6
- package/build/lib/serialapi/network-mgmt/RequestNodeInfoMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/RequestNodeInfoMessages.js +12 -13
- package/build/lib/serialapi/network-mgmt/RequestNodeInfoMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/RequestNodeNeighborUpdateMessages.d.ts +6 -6
- package/build/lib/serialapi/network-mgmt/RequestNodeNeighborUpdateMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/RequestNodeNeighborUpdateMessages.js +14 -15
- package/build/lib/serialapi/network-mgmt/RequestNodeNeighborUpdateMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/SetSUCNodeIDMessages.d.ts +7 -7
- package/build/lib/serialapi/network-mgmt/SetSUCNodeIDMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/SetSUCNodeIDMessages.js +21 -22
- package/build/lib/serialapi/network-mgmt/SetSUCNodeIDMessages.js.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMReadLongBufferMessages.d.ts +4 -4
- package/build/lib/serialapi/nvm/ExtNVMReadLongBufferMessages.d.ts.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMReadLongBufferMessages.js +12 -13
- package/build/lib/serialapi/nvm/ExtNVMReadLongBufferMessages.js.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMReadLongByteMessages.d.ts +4 -4
- package/build/lib/serialapi/nvm/ExtNVMReadLongByteMessages.d.ts.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMReadLongByteMessages.js +12 -13
- package/build/lib/serialapi/nvm/ExtNVMReadLongByteMessages.js.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMWriteLongBufferMessages.d.ts +4 -4
- package/build/lib/serialapi/nvm/ExtNVMWriteLongBufferMessages.d.ts.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMWriteLongBufferMessages.js +12 -13
- package/build/lib/serialapi/nvm/ExtNVMWriteLongBufferMessages.js.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMWriteLongByteMessages.d.ts +4 -4
- package/build/lib/serialapi/nvm/ExtNVMWriteLongByteMessages.d.ts.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMWriteLongByteMessages.js +12 -13
- package/build/lib/serialapi/nvm/ExtNVMWriteLongByteMessages.js.map +1 -1
- package/build/lib/serialapi/nvm/GetNVMIdMessages.d.ts +3 -3
- package/build/lib/serialapi/nvm/GetNVMIdMessages.d.ts.map +1 -1
- package/build/lib/serialapi/nvm/GetNVMIdMessages.js +9 -10
- package/build/lib/serialapi/nvm/GetNVMIdMessages.js.map +1 -1
- package/build/lib/serialapi/nvm/NVMOperationsMessages.d.ts +8 -8
- package/build/lib/serialapi/nvm/NVMOperationsMessages.d.ts.map +1 -1
- package/build/lib/serialapi/nvm/NVMOperationsMessages.js +19 -20
- package/build/lib/serialapi/nvm/NVMOperationsMessages.js.map +1 -1
- package/build/lib/serialapi/transport/SendDataBridgeMessages.d.ts +13 -11
- package/build/lib/serialapi/transport/SendDataBridgeMessages.d.ts.map +1 -1
- package/build/lib/serialapi/transport/SendDataBridgeMessages.js +48 -44
- package/build/lib/serialapi/transport/SendDataBridgeMessages.js.map +1 -1
- package/build/lib/serialapi/transport/SendDataMessages.d.ts +13 -11
- package/build/lib/serialapi/transport/SendDataMessages.d.ts.map +1 -1
- package/build/lib/serialapi/transport/SendDataMessages.js +49 -43
- package/build/lib/serialapi/transport/SendDataMessages.js.map +1 -1
- package/build/lib/telemetry/deviceConfig.d.ts.map +1 -1
- package/build/lib/telemetry/deviceConfig.js +2 -3
- package/build/lib/telemetry/deviceConfig.js.map +1 -1
- package/package.json +9 -8
- package/build/lib/driver/FileSystem.d.ts +0 -11
- package/build/lib/driver/FileSystem.d.ts.map +0 -1
- package/build/lib/driver/FileSystem.js +0 -3
- package/build/lib/driver/FileSystem.js.map +0 -1
- package/build/lib/log/Controller.d.ts +0 -68
- package/build/lib/log/Controller.d.ts.map +0 -1
- package/build/lib/log/Controller.js +0 -221
- package/build/lib/log/Controller.js.map +0 -1
- package/build/lib/message/Constants.d.ts +0 -150
- package/build/lib/message/Constants.d.ts.map +0 -1
- package/build/lib/message/Constants.js +0 -176
- package/build/lib/message/Constants.js.map +0 -1
- package/build/lib/message/Message.d.ts +0 -172
- package/build/lib/message/Message.d.ts.map +0 -1
- package/build/lib/message/Message.js +0 -465
- package/build/lib/message/Message.js.map +0 -1
- package/build/lib/message/SuccessIndicator.d.ts +0 -16
- package/build/lib/message/SuccessIndicator.d.ts.map +0 -1
- package/build/lib/message/SuccessIndicator.js +0 -12
- package/build/lib/message/SuccessIndicator.js.map +0 -1
- package/build/lib/node/INodeQuery.d.ts +0 -7
- package/build/lib/node/INodeQuery.d.ts.map +0 -1
- package/build/lib/node/INodeQuery.js +0 -9
- package/build/lib/node/INodeQuery.js.map +0 -1
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { MessageOrCCLogEntry } from "@zwave-js/core";
|
|
3
|
-
import type { JSONObject } from "@zwave-js/shared/safe";
|
|
4
|
-
import type { Driver } from "../driver/Driver";
|
|
5
|
-
import type { ZWaveNode } from "../node/Node";
|
|
6
|
-
import { FunctionType, MessagePriority, MessageType } from "./Constants";
|
|
7
|
-
declare type Constructable<T extends Message> = new (driver: Driver, options?: MessageOptions) => T;
|
|
8
|
-
export interface MessageDeserializationOptions {
|
|
9
|
-
data: Buffer;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Tests whether the given message constructor options contain a buffer for deserialization
|
|
13
|
-
*/
|
|
14
|
-
export declare function gotDeserializationOptions(options: Record<any, any> | undefined): options is MessageDeserializationOptions;
|
|
15
|
-
export interface MessageBaseOptions {
|
|
16
|
-
callbackId?: number;
|
|
17
|
-
}
|
|
18
|
-
export interface MessageCreationOptions extends MessageBaseOptions {
|
|
19
|
-
type?: MessageType;
|
|
20
|
-
functionType?: FunctionType;
|
|
21
|
-
expectedResponse?: FunctionType | typeof Message | ResponsePredicate;
|
|
22
|
-
expectedCallback?: FunctionType | typeof Message | ResponsePredicate;
|
|
23
|
-
payload?: Buffer;
|
|
24
|
-
}
|
|
25
|
-
export declare type MessageOptions = MessageCreationOptions | MessageDeserializationOptions;
|
|
26
|
-
/**
|
|
27
|
-
* Represents a Z-Wave message for communication with the serial interface
|
|
28
|
-
*/
|
|
29
|
-
export declare class Message {
|
|
30
|
-
protected driver: Driver;
|
|
31
|
-
constructor(driver: Driver, options?: MessageOptions);
|
|
32
|
-
type: MessageType;
|
|
33
|
-
functionType: FunctionType;
|
|
34
|
-
expectedResponse: FunctionType | typeof Message | ResponsePredicate | undefined;
|
|
35
|
-
expectedCallback: FunctionType | typeof Message | ResponsePredicate | undefined;
|
|
36
|
-
payload: Buffer;
|
|
37
|
-
private _callbackId;
|
|
38
|
-
/**
|
|
39
|
-
* Used to map requests to responses.
|
|
40
|
-
*
|
|
41
|
-
* WARNING: Accessing this property will generate a new callback ID if this message had none.
|
|
42
|
-
* If you want to compare the callback ID, use `hasCallbackId()` beforehand to check if the callback ID is already defined.
|
|
43
|
-
*/
|
|
44
|
-
get callbackId(): number;
|
|
45
|
-
set callbackId(v: number | undefined);
|
|
46
|
-
/**
|
|
47
|
-
* Tests whether this message's callback ID is defined
|
|
48
|
-
*/
|
|
49
|
-
hasCallbackId(): boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Tests whether this message needs a callback ID to match its response
|
|
52
|
-
*/
|
|
53
|
-
needsCallbackId(): boolean;
|
|
54
|
-
/** Returns the callback timeout for this message in case the default settings do not apply. */
|
|
55
|
-
getCallbackTimeout(): number | undefined;
|
|
56
|
-
/** Serializes this message into a Buffer */
|
|
57
|
-
serialize(): Buffer;
|
|
58
|
-
/** Returns the number of bytes the first message in the buffer occupies */
|
|
59
|
-
static getMessageLength(data: Buffer): number;
|
|
60
|
-
/**
|
|
61
|
-
* Checks if there's enough data in the buffer to deserialize
|
|
62
|
-
*/
|
|
63
|
-
static isComplete(data?: Buffer): boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Retrieves the correct constructor for the next message in the given Buffer.
|
|
66
|
-
* It is assumed that the buffer has been checked beforehand
|
|
67
|
-
*/
|
|
68
|
-
static getConstructor(data: Buffer): Constructable<Message>;
|
|
69
|
-
/** Creates an instance of the message that is serialized in the given buffer */
|
|
70
|
-
static from(driver: Driver, data: Buffer): Message;
|
|
71
|
-
/** Returns the slice of data which represents the message payload */
|
|
72
|
-
static extractPayload(data: Buffer): Buffer;
|
|
73
|
-
/** Generates a representation of this Message for the log */
|
|
74
|
-
toLogEntry(): MessageOrCCLogEntry;
|
|
75
|
-
/** Generates the JSON representation of this Message */
|
|
76
|
-
toJSON(): JSONObject;
|
|
77
|
-
private toJSONInternal;
|
|
78
|
-
protected toJSONInherited(props: JSONObject): JSONObject;
|
|
79
|
-
private testMessage;
|
|
80
|
-
/** Tests whether this message expects a response from the controller */
|
|
81
|
-
expectsResponse(): boolean;
|
|
82
|
-
/** Tests whether this message expects a callback from the controller */
|
|
83
|
-
expectsCallback(): boolean;
|
|
84
|
-
/** Tests whether this message expects an update from the target node to finalize the transaction */
|
|
85
|
-
expectsNodeUpdate(): boolean;
|
|
86
|
-
/** Checks if a message is an expected response for this message */
|
|
87
|
-
isExpectedResponse(msg: Message): boolean;
|
|
88
|
-
/** Checks if a message is an expected callback for this message */
|
|
89
|
-
isExpectedCallback(msg: Message): boolean;
|
|
90
|
-
/** Checks if a message is an expected node update for this message */
|
|
91
|
-
isExpectedNodeUpdate(msg: Message): boolean;
|
|
92
|
-
/** Finds the ID of the target or source node in a message, if it contains that information */
|
|
93
|
-
getNodeId(): number | undefined;
|
|
94
|
-
/**
|
|
95
|
-
* Returns the node this message is linked to or undefined
|
|
96
|
-
*/
|
|
97
|
-
getNodeUnsafe(): ZWaveNode | undefined;
|
|
98
|
-
private _transmissionTimestamp;
|
|
99
|
-
/** The timestamp when this message was (last) transmitted (in nanoseconds) */
|
|
100
|
-
get transmissionTimestamp(): number | undefined;
|
|
101
|
-
/** Marks this message as sent and sets the transmission timestamp */
|
|
102
|
-
markAsSent(): void;
|
|
103
|
-
private _completedTimestamp;
|
|
104
|
-
get completedTimestamp(): number | undefined;
|
|
105
|
-
/** Marks this message as completed and sets the corresponding timestamp */
|
|
106
|
-
markAsCompleted(): void;
|
|
107
|
-
/** Returns the round trip time of this message from transmission until completion. */
|
|
108
|
-
get rtt(): number | undefined;
|
|
109
|
-
}
|
|
110
|
-
export declare type ResponseRole = "unexpected" | "confirmation" | "final" | "fatal_controller" | "fatal_node";
|
|
111
|
-
/**
|
|
112
|
-
* A predicate function to test if a received message matches to the sent message
|
|
113
|
-
*/
|
|
114
|
-
export declare type ResponsePredicate<TSent extends Message = Message> = (sentMessage: TSent, receivedMessage: Message) => boolean;
|
|
115
|
-
/**
|
|
116
|
-
* Defines the message and function type associated with a Z-Wave message
|
|
117
|
-
*/
|
|
118
|
-
export declare function messageTypes(messageType: MessageType, functionType: FunctionType): ClassDecorator;
|
|
119
|
-
/**
|
|
120
|
-
* Retrieves the message type defined for a Z-Wave message class
|
|
121
|
-
*/
|
|
122
|
-
export declare function getMessageType<T extends Message>(messageClass: T): MessageType | undefined;
|
|
123
|
-
/**
|
|
124
|
-
* Retrieves the message type defined for a Z-Wave message class
|
|
125
|
-
*/
|
|
126
|
-
export declare function getMessageTypeStatic<T extends Constructable<Message>>(classConstructor: T): MessageType | undefined;
|
|
127
|
-
/**
|
|
128
|
-
* Retrieves the function type defined for a Z-Wave message class
|
|
129
|
-
*/
|
|
130
|
-
export declare function getFunctionType<T extends Message>(messageClass: T): FunctionType | undefined;
|
|
131
|
-
/**
|
|
132
|
-
* Retrieves the function type defined for a Z-Wave message class
|
|
133
|
-
*/
|
|
134
|
-
export declare function getFunctionTypeStatic<T extends Constructable<Message>>(classConstructor: T): FunctionType | undefined;
|
|
135
|
-
/**
|
|
136
|
-
* Defines the expected response function type or message class for a Z-Wave message
|
|
137
|
-
*/
|
|
138
|
-
export declare function expectedResponse(typeOrPredicate: FunctionType | typeof Message | ResponsePredicate): ClassDecorator;
|
|
139
|
-
/**
|
|
140
|
-
* Retrieves the expected response function type or message class defined for a Z-Wave message class
|
|
141
|
-
*/
|
|
142
|
-
export declare function getExpectedResponse<T extends Message>(messageClass: T): FunctionType | typeof Message | ResponsePredicate | undefined;
|
|
143
|
-
/**
|
|
144
|
-
* Retrieves the function type defined for a Z-Wave message class
|
|
145
|
-
*/
|
|
146
|
-
export declare function getExpectedResponseStatic<T extends Constructable<Message>>(classConstructor: T): FunctionType | typeof Message | ResponsePredicate | undefined;
|
|
147
|
-
/**
|
|
148
|
-
* Defines the expected callback function type or message class for a Z-Wave message
|
|
149
|
-
*/
|
|
150
|
-
export declare function expectedCallback<TSent extends Message>(typeOrPredicate: FunctionType | typeof Message | ResponsePredicate<TSent>): ClassDecorator;
|
|
151
|
-
/**
|
|
152
|
-
* Retrieves the expected callback function type or message class defined for a Z-Wave message class
|
|
153
|
-
*/
|
|
154
|
-
export declare function getExpectedCallback<T extends Message>(messageClass: T): FunctionType | typeof Message | ResponsePredicate | undefined;
|
|
155
|
-
/**
|
|
156
|
-
* Retrieves the function type defined for a Z-Wave message class
|
|
157
|
-
*/
|
|
158
|
-
export declare function getExpectedCallbackStatic<T extends Constructable<Message>>(classConstructor: T): FunctionType | typeof Message | ResponsePredicate | undefined;
|
|
159
|
-
/**
|
|
160
|
-
* Defines the default priority associated with a Z-Wave message
|
|
161
|
-
*/
|
|
162
|
-
export declare function priority(prio: MessagePriority): ClassDecorator;
|
|
163
|
-
/**
|
|
164
|
-
* Retrieves the default priority defined for a Z-Wave message class
|
|
165
|
-
*/
|
|
166
|
-
export declare function getDefaultPriority<T extends Message>(messageClass: T): MessagePriority | undefined;
|
|
167
|
-
/**
|
|
168
|
-
* Retrieves the default priority defined for a Z-Wave message class
|
|
169
|
-
*/
|
|
170
|
-
export declare function getDefaultPriorityStatic<T extends Constructable<Message>>(classConstructor: T): MessagePriority | undefined;
|
|
171
|
-
export {};
|
|
172
|
-
//# sourceMappingURL=Message.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/lib/message/Message.ts"],"names":[],"mappings":";AAEA,OAAO,EAGN,mBAAmB,EAGnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD,OAAO,KAAK,EAAE,MAAM,EAAE,MA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
|
1
|
-
"use strict";
|
|
2
|
-
/// <reference types="reflect-metadata" />
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getDefaultPriorityStatic = exports.getDefaultPriority = exports.priority = exports.getExpectedCallbackStatic = exports.getExpectedCallback = exports.expectedCallback = exports.getExpectedResponseStatic = exports.getExpectedResponse = exports.expectedResponse = exports.getFunctionTypeStatic = exports.getFunctionType = exports.getMessageTypeStatic = exports.getMessageType = exports.messageTypes = exports.Message = exports.gotDeserializationOptions = void 0;
|
|
5
|
-
const core_1 = require("@zwave-js/core");
|
|
6
|
-
const safe_1 = require("@zwave-js/serial/safe");
|
|
7
|
-
const safe_2 = require("@zwave-js/shared/safe");
|
|
8
|
-
const objects_1 = require("alcalzone-shared/objects");
|
|
9
|
-
const ICommandClassContainer_1 = require("../commandclass/ICommandClassContainer");
|
|
10
|
-
const INodeQuery_1 = require("../node/INodeQuery");
|
|
11
|
-
const Constants_1 = require("./Constants");
|
|
12
|
-
/**
|
|
13
|
-
* Tests whether the given message constructor options contain a buffer for deserialization
|
|
14
|
-
*/
|
|
15
|
-
function gotDeserializationOptions(options) {
|
|
16
|
-
return options != undefined && Buffer.isBuffer(options.data);
|
|
17
|
-
}
|
|
18
|
-
exports.gotDeserializationOptions = gotDeserializationOptions;
|
|
19
|
-
/**
|
|
20
|
-
* Represents a Z-Wave message for communication with the serial interface
|
|
21
|
-
*/
|
|
22
|
-
class Message {
|
|
23
|
-
constructor(driver, options = {}) {
|
|
24
|
-
var _a, _b;
|
|
25
|
-
this.driver = driver;
|
|
26
|
-
// decide which implementation we follow
|
|
27
|
-
if (gotDeserializationOptions(options)) {
|
|
28
|
-
// #1: deserialize from payload
|
|
29
|
-
const payload = options.data;
|
|
30
|
-
// SOF, length, type, commandId and checksum must be present
|
|
31
|
-
if (!payload.length || payload.length < 5) {
|
|
32
|
-
throw new core_1.ZWaveError("Could not deserialize the message because it was truncated", core_1.ZWaveErrorCodes.PacketFormat_Truncated);
|
|
33
|
-
}
|
|
34
|
-
// the packet has to start with SOF
|
|
35
|
-
if (payload[0] !== safe_1.MessageHeaders.SOF) {
|
|
36
|
-
throw new core_1.ZWaveError("Could not deserialize the message because it does not start with SOF", core_1.ZWaveErrorCodes.PacketFormat_Invalid);
|
|
37
|
-
}
|
|
38
|
-
// check the length again, this time with the transmitted length
|
|
39
|
-
const messageLength = Message.getMessageLength(payload);
|
|
40
|
-
if (payload.length < messageLength) {
|
|
41
|
-
throw new core_1.ZWaveError("Could not deserialize the message because it was truncated", core_1.ZWaveErrorCodes.PacketFormat_Truncated);
|
|
42
|
-
}
|
|
43
|
-
// check the checksum
|
|
44
|
-
const expectedChecksum = computeChecksum(payload.slice(0, messageLength));
|
|
45
|
-
if (payload[messageLength - 1] !== expectedChecksum) {
|
|
46
|
-
throw new core_1.ZWaveError("Could not deserialize the message because the checksum didn't match", core_1.ZWaveErrorCodes.PacketFormat_Checksum);
|
|
47
|
-
}
|
|
48
|
-
this.type = payload[2];
|
|
49
|
-
this.functionType = payload[3];
|
|
50
|
-
const payloadLength = messageLength - 5;
|
|
51
|
-
this.payload = payload.slice(4, 4 + payloadLength);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
// Try to determine the message type
|
|
55
|
-
if (options.type == undefined)
|
|
56
|
-
options.type = getMessageType(this);
|
|
57
|
-
if (options.type == undefined) {
|
|
58
|
-
throw new core_1.ZWaveError("A message must have a given or predefined message type", core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
59
|
-
}
|
|
60
|
-
this.type = options.type;
|
|
61
|
-
if (options.functionType == undefined)
|
|
62
|
-
options.functionType = getFunctionType(this);
|
|
63
|
-
if (options.functionType == undefined) {
|
|
64
|
-
throw new core_1.ZWaveError("A message must have a given or predefined function type", core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
65
|
-
}
|
|
66
|
-
this.functionType = options.functionType;
|
|
67
|
-
// Fall back to decorated response/callback types if none is given
|
|
68
|
-
this.expectedResponse =
|
|
69
|
-
(_a = options.expectedResponse) !== null && _a !== void 0 ? _a : getExpectedResponse(this);
|
|
70
|
-
this.expectedCallback =
|
|
71
|
-
(_b = options.expectedCallback) !== null && _b !== void 0 ? _b : getExpectedCallback(this);
|
|
72
|
-
this._callbackId = options.callbackId;
|
|
73
|
-
this.payload = options.payload || Buffer.allocUnsafe(0);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Used to map requests to responses.
|
|
78
|
-
*
|
|
79
|
-
* WARNING: Accessing this property will generate a new callback ID if this message had none.
|
|
80
|
-
* If you want to compare the callback ID, use `hasCallbackId()` beforehand to check if the callback ID is already defined.
|
|
81
|
-
*/
|
|
82
|
-
get callbackId() {
|
|
83
|
-
if (this._callbackId == undefined) {
|
|
84
|
-
this._callbackId = this.driver.getNextCallbackId();
|
|
85
|
-
}
|
|
86
|
-
return this._callbackId;
|
|
87
|
-
}
|
|
88
|
-
set callbackId(v) {
|
|
89
|
-
this._callbackId = v;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Tests whether this message's callback ID is defined
|
|
93
|
-
*/
|
|
94
|
-
hasCallbackId() {
|
|
95
|
-
return this._callbackId != undefined;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Tests whether this message needs a callback ID to match its response
|
|
99
|
-
*/
|
|
100
|
-
needsCallbackId() {
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
/** Returns the callback timeout for this message in case the default settings do not apply. */
|
|
104
|
-
getCallbackTimeout() {
|
|
105
|
-
// Use default timeout by default
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
/** Serializes this message into a Buffer */
|
|
109
|
-
serialize() {
|
|
110
|
-
const ret = Buffer.allocUnsafe(this.payload.length + 5);
|
|
111
|
-
ret[0] = safe_1.MessageHeaders.SOF;
|
|
112
|
-
// length of the following data, including the checksum
|
|
113
|
-
ret[1] = this.payload.length + 3;
|
|
114
|
-
// write the remaining data
|
|
115
|
-
ret[2] = this.type;
|
|
116
|
-
ret[3] = this.functionType;
|
|
117
|
-
this.payload.copy(ret, 4);
|
|
118
|
-
// followed by the checksum
|
|
119
|
-
ret[ret.length - 1] = computeChecksum(ret);
|
|
120
|
-
return ret;
|
|
121
|
-
}
|
|
122
|
-
/** Returns the number of bytes the first message in the buffer occupies */
|
|
123
|
-
static getMessageLength(data) {
|
|
124
|
-
const remainingLength = data[1];
|
|
125
|
-
return remainingLength + 2;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Checks if there's enough data in the buffer to deserialize
|
|
129
|
-
*/
|
|
130
|
-
static isComplete(data) {
|
|
131
|
-
if (!data || !data.length || data.length < 5)
|
|
132
|
-
return false; // not yet
|
|
133
|
-
const messageLength = Message.getMessageLength(data);
|
|
134
|
-
if (data.length < messageLength)
|
|
135
|
-
return false; // not yet
|
|
136
|
-
return true; // probably, but the checksum may be wrong
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Retrieves the correct constructor for the next message in the given Buffer.
|
|
140
|
-
* It is assumed that the buffer has been checked beforehand
|
|
141
|
-
*/
|
|
142
|
-
static getConstructor(data) {
|
|
143
|
-
return getMessageConstructor(data[2], data[3]) || Message;
|
|
144
|
-
}
|
|
145
|
-
/** Creates an instance of the message that is serialized in the given buffer */
|
|
146
|
-
static from(driver, data) {
|
|
147
|
-
const Constructor = Message.getConstructor(data);
|
|
148
|
-
const ret = new Constructor(driver, { data });
|
|
149
|
-
return ret;
|
|
150
|
-
}
|
|
151
|
-
/** Returns the slice of data which represents the message payload */
|
|
152
|
-
static extractPayload(data) {
|
|
153
|
-
const messageLength = Message.getMessageLength(data);
|
|
154
|
-
const payloadLength = messageLength - 5;
|
|
155
|
-
return data.slice(4, 4 + payloadLength);
|
|
156
|
-
}
|
|
157
|
-
/** Generates a representation of this Message for the log */
|
|
158
|
-
toLogEntry() {
|
|
159
|
-
const tags = [
|
|
160
|
-
this.type === Constants_1.MessageType.Request ? "REQ" : "RES",
|
|
161
|
-
Constants_1.FunctionType[this.functionType],
|
|
162
|
-
];
|
|
163
|
-
const nodeId = this.getNodeId();
|
|
164
|
-
if (nodeId)
|
|
165
|
-
tags.unshift((0, core_1.getNodeTag)(nodeId));
|
|
166
|
-
return {
|
|
167
|
-
tags,
|
|
168
|
-
message: this.payload.length > 0
|
|
169
|
-
? { payload: `0x${this.payload.toString("hex")}` }
|
|
170
|
-
: undefined,
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
/** Generates the JSON representation of this Message */
|
|
174
|
-
toJSON() {
|
|
175
|
-
return this.toJSONInternal();
|
|
176
|
-
}
|
|
177
|
-
toJSONInternal() {
|
|
178
|
-
const ret = {
|
|
179
|
-
name: this.constructor.name,
|
|
180
|
-
type: Constants_1.MessageType[this.type],
|
|
181
|
-
functionType: Constants_1.FunctionType[this.functionType] || (0, safe_2.num2hex)(this.functionType),
|
|
182
|
-
};
|
|
183
|
-
if (this.expectedResponse != null)
|
|
184
|
-
ret.expectedResponse = Constants_1.FunctionType[this.functionType];
|
|
185
|
-
ret.payload = this.payload.toString("hex");
|
|
186
|
-
return ret;
|
|
187
|
-
}
|
|
188
|
-
toJSONInherited(props) {
|
|
189
|
-
const ret = this.toJSONInternal();
|
|
190
|
-
delete ret.payload;
|
|
191
|
-
for (const [key, value] of (0, objects_1.entries)(props)) {
|
|
192
|
-
if (value !== undefined)
|
|
193
|
-
ret[key] = value;
|
|
194
|
-
}
|
|
195
|
-
return ret;
|
|
196
|
-
}
|
|
197
|
-
testMessage(msg, predicate) {
|
|
198
|
-
if (predicate == undefined)
|
|
199
|
-
return false;
|
|
200
|
-
if (typeof predicate === "number") {
|
|
201
|
-
return msg.functionType === predicate;
|
|
202
|
-
}
|
|
203
|
-
if ((0, safe_2.staticExtends)(predicate, Message)) {
|
|
204
|
-
// predicate is a Message constructor
|
|
205
|
-
return msg instanceof predicate;
|
|
206
|
-
}
|
|
207
|
-
else {
|
|
208
|
-
// predicate is a ResponsePredicate
|
|
209
|
-
return predicate(this, msg);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
/** Tests whether this message expects a response from the controller */
|
|
213
|
-
expectsResponse() {
|
|
214
|
-
return !!this.expectedResponse;
|
|
215
|
-
}
|
|
216
|
-
/** Tests whether this message expects a callback from the controller */
|
|
217
|
-
expectsCallback() {
|
|
218
|
-
// A message expects a callback...
|
|
219
|
-
return (
|
|
220
|
-
// ...when it has a callback id that is not 0 (no callback)
|
|
221
|
-
((this.hasCallbackId() && this.callbackId !== 0) ||
|
|
222
|
-
// or the message type does not need a callback id to match the response
|
|
223
|
-
!this.needsCallbackId()) &&
|
|
224
|
-
// and the expected callback is defined
|
|
225
|
-
!!this.expectedCallback);
|
|
226
|
-
}
|
|
227
|
-
/** Tests whether this message expects an update from the target node to finalize the transaction */
|
|
228
|
-
expectsNodeUpdate() {
|
|
229
|
-
// Most messages don't expect an update by default
|
|
230
|
-
return false;
|
|
231
|
-
}
|
|
232
|
-
/** Checks if a message is an expected response for this message */
|
|
233
|
-
isExpectedResponse(msg) {
|
|
234
|
-
return (msg.type === Constants_1.MessageType.Response &&
|
|
235
|
-
this.testMessage(msg, this.expectedResponse));
|
|
236
|
-
}
|
|
237
|
-
/** Checks if a message is an expected callback for this message */
|
|
238
|
-
isExpectedCallback(msg) {
|
|
239
|
-
if (msg.type !== Constants_1.MessageType.Request)
|
|
240
|
-
return false;
|
|
241
|
-
// If a received request included a callback id, enforce that the response contains the same
|
|
242
|
-
if (this.hasCallbackId() &&
|
|
243
|
-
(!msg.hasCallbackId() || this._callbackId !== msg._callbackId)) {
|
|
244
|
-
return false;
|
|
245
|
-
}
|
|
246
|
-
return this.testMessage(msg, this.expectedCallback);
|
|
247
|
-
}
|
|
248
|
-
/** Checks if a message is an expected node update for this message */
|
|
249
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
250
|
-
isExpectedNodeUpdate(msg) {
|
|
251
|
-
// Most messages don't expect an update by default
|
|
252
|
-
return false;
|
|
253
|
-
}
|
|
254
|
-
/** Finds the ID of the target or source node in a message, if it contains that information */
|
|
255
|
-
getNodeId() {
|
|
256
|
-
if ((0, INodeQuery_1.isNodeQuery)(this))
|
|
257
|
-
return this.nodeId;
|
|
258
|
-
if ((0, ICommandClassContainer_1.isCommandClassContainer)(this) && this.command.isSinglecast()) {
|
|
259
|
-
return this.command.nodeId;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Returns the node this message is linked to or undefined
|
|
264
|
-
*/
|
|
265
|
-
getNodeUnsafe() {
|
|
266
|
-
const nodeId = this.getNodeId();
|
|
267
|
-
if (nodeId != undefined)
|
|
268
|
-
return this.driver.controller.nodes.get(nodeId);
|
|
269
|
-
}
|
|
270
|
-
/** The timestamp when this message was (last) transmitted (in nanoseconds) */
|
|
271
|
-
get transmissionTimestamp() {
|
|
272
|
-
return this._transmissionTimestamp;
|
|
273
|
-
}
|
|
274
|
-
/** Marks this message as sent and sets the transmission timestamp */
|
|
275
|
-
markAsSent() {
|
|
276
|
-
this._transmissionTimestamp = (0, core_1.highResTimestamp)();
|
|
277
|
-
this._completedTimestamp = undefined;
|
|
278
|
-
}
|
|
279
|
-
get completedTimestamp() {
|
|
280
|
-
return this._completedTimestamp;
|
|
281
|
-
}
|
|
282
|
-
/** Marks this message as completed and sets the corresponding timestamp */
|
|
283
|
-
markAsCompleted() {
|
|
284
|
-
this._completedTimestamp = (0, core_1.highResTimestamp)();
|
|
285
|
-
}
|
|
286
|
-
/** Returns the round trip time of this message from transmission until completion. */
|
|
287
|
-
get rtt() {
|
|
288
|
-
if (this._transmissionTimestamp == undefined)
|
|
289
|
-
return undefined;
|
|
290
|
-
if (this._completedTimestamp == undefined)
|
|
291
|
-
return undefined;
|
|
292
|
-
return this._completedTimestamp - this._transmissionTimestamp;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
exports.Message = Message;
|
|
296
|
-
/** Computes the checksum for a serialized message as defined in the Z-Wave specs */
|
|
297
|
-
function computeChecksum(message) {
|
|
298
|
-
let ret = 0xff;
|
|
299
|
-
// exclude SOF and checksum byte from the computation
|
|
300
|
-
for (let i = 1; i < message.length - 1; i++) {
|
|
301
|
-
ret ^= message[i];
|
|
302
|
-
}
|
|
303
|
-
return ret;
|
|
304
|
-
}
|
|
305
|
-
// =======================
|
|
306
|
-
// use decorators to link function types to message classes
|
|
307
|
-
const METADATA_messageTypes = Symbol("messageTypes");
|
|
308
|
-
const METADATA_messageTypeMap = Symbol("messageTypeMap");
|
|
309
|
-
const METADATA_expectedResponse = Symbol("expectedResponse");
|
|
310
|
-
const METADATA_expectedCallback = Symbol("expectedCallback");
|
|
311
|
-
const METADATA_priority = Symbol("priority");
|
|
312
|
-
function getMessageTypeMapKey(messageType, functionType) {
|
|
313
|
-
return JSON.stringify({ messageType, functionType });
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Defines the message and function type associated with a Z-Wave message
|
|
317
|
-
*/
|
|
318
|
-
function messageTypes(messageType, functionType) {
|
|
319
|
-
return (messageClass) => {
|
|
320
|
-
Reflect.defineMetadata(METADATA_messageTypes, { messageType, functionType }, messageClass);
|
|
321
|
-
// also store a map in the Message metadata for lookup.
|
|
322
|
-
const map = (Reflect.getMetadata(METADATA_messageTypeMap, Message) || new Map());
|
|
323
|
-
map.set(getMessageTypeMapKey(messageType, functionType), messageClass);
|
|
324
|
-
Reflect.defineMetadata(METADATA_messageTypeMap, map, Message);
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
exports.messageTypes = messageTypes;
|
|
328
|
-
/**
|
|
329
|
-
* Retrieves the message type defined for a Z-Wave message class
|
|
330
|
-
*/
|
|
331
|
-
function getMessageType(messageClass) {
|
|
332
|
-
// get the class constructor
|
|
333
|
-
const constr = messageClass.constructor;
|
|
334
|
-
// retrieve the current metadata
|
|
335
|
-
const meta = Reflect.getMetadata(METADATA_messageTypes, constr);
|
|
336
|
-
return meta === null || meta === void 0 ? void 0 : meta.messageType;
|
|
337
|
-
}
|
|
338
|
-
exports.getMessageType = getMessageType;
|
|
339
|
-
/**
|
|
340
|
-
* Retrieves the message type defined for a Z-Wave message class
|
|
341
|
-
*/
|
|
342
|
-
function getMessageTypeStatic(classConstructor) {
|
|
343
|
-
// retrieve the current metadata
|
|
344
|
-
const meta = Reflect.getMetadata(METADATA_messageTypes, classConstructor);
|
|
345
|
-
return meta === null || meta === void 0 ? void 0 : meta.messageType;
|
|
346
|
-
}
|
|
347
|
-
exports.getMessageTypeStatic = getMessageTypeStatic;
|
|
348
|
-
/**
|
|
349
|
-
* Retrieves the function type defined for a Z-Wave message class
|
|
350
|
-
*/
|
|
351
|
-
function getFunctionType(messageClass) {
|
|
352
|
-
// get the class constructor
|
|
353
|
-
const constr = messageClass.constructor;
|
|
354
|
-
// retrieve the current metadata
|
|
355
|
-
const meta = Reflect.getMetadata(METADATA_messageTypes, constr);
|
|
356
|
-
return meta === null || meta === void 0 ? void 0 : meta.functionType;
|
|
357
|
-
}
|
|
358
|
-
exports.getFunctionType = getFunctionType;
|
|
359
|
-
/**
|
|
360
|
-
* Retrieves the function type defined for a Z-Wave message class
|
|
361
|
-
*/
|
|
362
|
-
function getFunctionTypeStatic(classConstructor) {
|
|
363
|
-
// retrieve the current metadata
|
|
364
|
-
const meta = Reflect.getMetadata(METADATA_messageTypes, classConstructor);
|
|
365
|
-
return meta === null || meta === void 0 ? void 0 : meta.functionType;
|
|
366
|
-
}
|
|
367
|
-
exports.getFunctionTypeStatic = getFunctionTypeStatic;
|
|
368
|
-
/**
|
|
369
|
-
* Looks up the message constructor for a given message type and function type
|
|
370
|
-
*/
|
|
371
|
-
function getMessageConstructor(messageType, functionType) {
|
|
372
|
-
// Retrieve the constructor map from the Message class
|
|
373
|
-
const functionTypeMap = Reflect.getMetadata(METADATA_messageTypeMap, Message);
|
|
374
|
-
if (functionTypeMap != null) {
|
|
375
|
-
return functionTypeMap.get(getMessageTypeMapKey(messageType, functionType));
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* Defines the expected response function type or message class for a Z-Wave message
|
|
380
|
-
*/
|
|
381
|
-
function expectedResponse(typeOrPredicate) {
|
|
382
|
-
return (messageClass) => {
|
|
383
|
-
Reflect.defineMetadata(METADATA_expectedResponse, typeOrPredicate, messageClass);
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
exports.expectedResponse = expectedResponse;
|
|
387
|
-
/**
|
|
388
|
-
* Retrieves the expected response function type or message class defined for a Z-Wave message class
|
|
389
|
-
*/
|
|
390
|
-
function getExpectedResponse(messageClass) {
|
|
391
|
-
// get the class constructor
|
|
392
|
-
const constr = messageClass.constructor;
|
|
393
|
-
// retrieve the current metadata
|
|
394
|
-
const ret = Reflect.getMetadata(METADATA_expectedResponse, constr);
|
|
395
|
-
return ret;
|
|
396
|
-
}
|
|
397
|
-
exports.getExpectedResponse = getExpectedResponse;
|
|
398
|
-
/**
|
|
399
|
-
* Retrieves the function type defined for a Z-Wave message class
|
|
400
|
-
*/
|
|
401
|
-
function getExpectedResponseStatic(classConstructor) {
|
|
402
|
-
// retrieve the current metadata
|
|
403
|
-
const ret = Reflect.getMetadata(METADATA_expectedResponse, classConstructor);
|
|
404
|
-
return ret;
|
|
405
|
-
}
|
|
406
|
-
exports.getExpectedResponseStatic = getExpectedResponseStatic;
|
|
407
|
-
/**
|
|
408
|
-
* Defines the expected callback function type or message class for a Z-Wave message
|
|
409
|
-
*/
|
|
410
|
-
function expectedCallback(typeOrPredicate) {
|
|
411
|
-
return (messageClass) => {
|
|
412
|
-
Reflect.defineMetadata(METADATA_expectedCallback, typeOrPredicate, messageClass);
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
exports.expectedCallback = expectedCallback;
|
|
416
|
-
/**
|
|
417
|
-
* Retrieves the expected callback function type or message class defined for a Z-Wave message class
|
|
418
|
-
*/
|
|
419
|
-
function getExpectedCallback(messageClass) {
|
|
420
|
-
// get the class constructor
|
|
421
|
-
const constr = messageClass.constructor;
|
|
422
|
-
// retrieve the current metadata
|
|
423
|
-
const ret = Reflect.getMetadata(METADATA_expectedCallback, constr);
|
|
424
|
-
return ret;
|
|
425
|
-
}
|
|
426
|
-
exports.getExpectedCallback = getExpectedCallback;
|
|
427
|
-
/**
|
|
428
|
-
* Retrieves the function type defined for a Z-Wave message class
|
|
429
|
-
*/
|
|
430
|
-
function getExpectedCallbackStatic(classConstructor) {
|
|
431
|
-
// retrieve the current metadata
|
|
432
|
-
const ret = Reflect.getMetadata(METADATA_expectedCallback, classConstructor);
|
|
433
|
-
return ret;
|
|
434
|
-
}
|
|
435
|
-
exports.getExpectedCallbackStatic = getExpectedCallbackStatic;
|
|
436
|
-
/**
|
|
437
|
-
* Defines the default priority associated with a Z-Wave message
|
|
438
|
-
*/
|
|
439
|
-
function priority(prio) {
|
|
440
|
-
return (messageClass) => {
|
|
441
|
-
Reflect.defineMetadata(METADATA_priority, prio, messageClass);
|
|
442
|
-
};
|
|
443
|
-
}
|
|
444
|
-
exports.priority = priority;
|
|
445
|
-
/**
|
|
446
|
-
* Retrieves the default priority defined for a Z-Wave message class
|
|
447
|
-
*/
|
|
448
|
-
function getDefaultPriority(messageClass) {
|
|
449
|
-
// get the class constructor
|
|
450
|
-
const constr = messageClass.constructor;
|
|
451
|
-
// retrieve the current metadata
|
|
452
|
-
const ret = Reflect.getMetadata(METADATA_priority, constr);
|
|
453
|
-
return ret;
|
|
454
|
-
}
|
|
455
|
-
exports.getDefaultPriority = getDefaultPriority;
|
|
456
|
-
/**
|
|
457
|
-
* Retrieves the default priority defined for a Z-Wave message class
|
|
458
|
-
*/
|
|
459
|
-
function getDefaultPriorityStatic(classConstructor) {
|
|
460
|
-
// retrieve the current metadata
|
|
461
|
-
const ret = Reflect.getMetadata(METADATA_priority, classConstructor);
|
|
462
|
-
return ret;
|
|
463
|
-
}
|
|
464
|
-
exports.getDefaultPriorityStatic = getDefaultPriorityStatic;
|
|
465
|
-
//# sourceMappingURL=Message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