@zwave-js/cc 14.0.0-beta.4 → 14.0.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/cjs/cc/AlarmSensorCC.js +381 -266
- package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
- package/build/cjs/cc/AssociationCC.js +669 -503
- package/build/cjs/cc/AssociationCC.js.map +3 -3
- package/build/cjs/cc/AssociationGroupInfoCC.js +633 -492
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
- package/build/cjs/cc/BarrierOperatorCC.js +595 -429
- package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
- package/build/cjs/cc/BasicCC.js +354 -260
- package/build/cjs/cc/BasicCC.js.map +3 -3
- package/build/cjs/cc/BatteryCC.js +427 -345
- package/build/cjs/cc/BatteryCC.js.map +3 -3
- package/build/cjs/cc/BinarySensorCC.js +391 -276
- package/build/cjs/cc/BinarySensorCC.js.map +3 -3
- package/build/cjs/cc/BinarySwitchCC.js +347 -253
- package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
- package/build/cjs/cc/CRC16CC.js +160 -85
- package/build/cjs/cc/CRC16CC.js.map +3 -3
- package/build/cjs/cc/CentralSceneCC.js +459 -324
- package/build/cjs/cc/CentralSceneCC.js.map +3 -3
- package/build/cjs/cc/ClimateControlScheduleCC.js +459 -293
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
- package/build/cjs/cc/ClockCC.js +254 -150
- package/build/cjs/cc/ClockCC.js.map +3 -3
- package/build/cjs/cc/ColorSwitchCC.js +758 -610
- package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
- package/build/cjs/cc/ConfigurationCC.js +1700 -1453
- package/build/cjs/cc/ConfigurationCC.js.map +3 -3
- package/build/cjs/cc/DeviceResetLocallyCC.js +125 -49
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
- package/build/cjs/cc/DoorLockCC.js +904 -777
- package/build/cjs/cc/DoorLockCC.js.map +3 -3
- package/build/cjs/cc/DoorLockLoggingCC.js +321 -206
- package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
- package/build/cjs/cc/EnergyProductionCC.js +249 -160
- package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
- package/build/cjs/cc/EntryControlCC.js +619 -458
- package/build/cjs/cc/EntryControlCC.js.map +3 -3
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +898 -698
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
- package/build/cjs/cc/HailCC.js +57 -11
- package/build/cjs/cc/HailCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.js +359 -233
- package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +189 -103
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlSetpointCC.js +682 -495
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
- package/build/cjs/cc/InclusionControllerCC.js +205 -114
- package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
- package/build/cjs/cc/IndicatorCC.js +897 -736
- package/build/cjs/cc/IndicatorCC.js.map +3 -3
- package/build/cjs/cc/IrrigationCC.js +1651 -1405
- package/build/cjs/cc/IrrigationCC.js.map +3 -3
- package/build/cjs/cc/LanguageCC.js +268 -171
- package/build/cjs/cc/LanguageCC.js.map +3 -3
- package/build/cjs/cc/LockCC.js +254 -154
- package/build/cjs/cc/LockCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.js +189 -129
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.js +319 -213
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
- package/build/cjs/cc/MeterCC.js +827 -707
- package/build/cjs/cc/MeterCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelAssociationCC.js +612 -478
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelCC.js +1037 -819
- package/build/cjs/cc/MultiChannelCC.js.map +3 -3
- package/build/cjs/cc/MultiCommandCC.js +172 -97
- package/build/cjs/cc/MultiCommandCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSensorCC.js +589 -449
- package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSwitchCC.js +587 -439
- package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
- package/build/cjs/cc/NoOperationCC.js +89 -27
- package/build/cjs/cc/NoOperationCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.js +417 -277
- package/build/cjs/cc/NodeNamingCC.js.map +3 -3
- package/build/cjs/cc/NotificationCC.js +972 -818
- package/build/cjs/cc/NotificationCC.js.map +3 -3
- package/build/cjs/cc/PowerlevelCC.js +450 -303
- package/build/cjs/cc/PowerlevelCC.js.map +3 -3
- package/build/cjs/cc/ProtectionCC.js +686 -494
- package/build/cjs/cc/ProtectionCC.js.map +3 -3
- package/build/cjs/cc/SceneActivationCC.js +165 -97
- package/build/cjs/cc/SceneActivationCC.js.map +3 -3
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +346 -243
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
- package/build/cjs/cc/SceneControllerConfigurationCC.js +401 -298
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
- package/build/cjs/cc/ScheduleEntryLockCC.js +1552 -1272
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
- package/build/cjs/cc/Security2CC.js +1483 -1219
- package/build/cjs/cc/Security2CC.js.map +3 -3
- package/build/cjs/cc/SecurityCC.js +839 -619
- package/build/cjs/cc/SecurityCC.js.map +3 -3
- package/build/cjs/cc/SoundSwitchCC.js +707 -515
- package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
- package/build/cjs/cc/SupervisionCC.js +327 -237
- package/build/cjs/cc/SupervisionCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanModeCC.js +386 -263
- package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.js +192 -106
- package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatModeCC.js +425 -302
- package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatOperatingStateCC.js +188 -102
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.js +277 -173
- package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.js +645 -491
- package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
- package/build/cjs/cc/TimeCC.js +515 -353
- package/build/cjs/cc/TimeCC.js.map +3 -3
- package/build/cjs/cc/TimeParametersCC.js +302 -202
- package/build/cjs/cc/TimeParametersCC.js.map +3 -3
- package/build/cjs/cc/TransportServiceCC.js +433 -315
- package/build/cjs/cc/TransportServiceCC.js.map +3 -3
- package/build/cjs/cc/UserCodeCC.js +1385 -1102
- package/build/cjs/cc/UserCodeCC.js.map +3 -3
- package/build/cjs/cc/VersionCC.js +696 -562
- package/build/cjs/cc/VersionCC.js.map +3 -3
- package/build/cjs/cc/WakeUpCC.js +499 -346
- package/build/cjs/cc/WakeUpCC.js.map +3 -3
- package/build/cjs/cc/WindowCoveringCC.js +626 -478
- package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
- package/build/cjs/cc/ZWaveLongRangeCC.js +57 -10
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.js +233 -159
- package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
- package/build/cjs/cc/ZWaveProtocolCC.js +1515 -948
- package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
- package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +395 -274
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.d.ts +11 -15
- package/build/cjs/lib/CommandClassDecorators.js +19 -20
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.d.ts +1 -1
- package/build/cjs/lib/Security2/Extension.js +217 -126
- package/build/cjs/lib/Security2/Extension.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +389 -291
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +678 -537
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +659 -539
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +634 -493
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +380 -302
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +449 -384
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +395 -297
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +353 -274
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.js +162 -98
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +465 -351
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +454 -313
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.js +248 -159
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +802 -677
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +1899 -1687
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +124 -59
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +951 -849
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +316 -218
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +240 -164
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +629 -493
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +938 -769
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +51 -12
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +357 -250
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +182 -109
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +706 -546
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js +197 -119
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.js +973 -835
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +1697 -1496
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +266 -184
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +247 -162
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +192 -141
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +312 -223
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +896 -795
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +631 -518
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +1106 -921
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +166 -102
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +616 -497
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +621 -496
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +82 -29
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +413 -294
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +1097 -966
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +437 -311
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +704 -543
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +157 -100
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +357 -269
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +434 -346
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +1596 -1357
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.js +1633 -1406
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.js +876 -687
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +689 -526
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.js +349 -272
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +388 -284
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +184 -111
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +435 -331
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +180 -107
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +274 -185
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +674 -543
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.js +499 -360
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +296 -211
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +464 -363
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +1443 -1205
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +744 -635
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +494 -364
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +655 -530
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveLongRangeCC.js +51 -11
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +223 -162
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1443 -953
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +390 -286
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +11 -15
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +24 -24
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts +1 -1
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +207 -123
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,10 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
6
34
|
};
|
|
7
|
-
var NodeNamingAndLocationCCNameReport_1, NodeNamingAndLocationCCLocationReport_1;
|
|
8
35
|
function __assertType(argName, typeName, boundHasError) {
|
|
9
36
|
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
10
37
|
if (boundHasError()) {
|
|
@@ -21,7 +48,7 @@ import { CommandClasses, MessagePriority, ValueMetadata, ZWaveError, ZWaveErrorC
|
|
|
21
48
|
import { Bytes, stringToUint8ArrayUTF16BE, uint8ArrayToStringUTF16BE, } from "@zwave-js/shared/safe";
|
|
22
49
|
import { CCAPI, POLL_VALUE, PhysicalCCAPI, SET_VALUE, throwUnsupportedProperty, throwWrongValueType, } from "../lib/API.js";
|
|
23
50
|
import { CommandClass, } from "../lib/CommandClass.js";
|
|
24
|
-
import { API, CCCommand,
|
|
51
|
+
import { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from "../lib/CommandClassDecorators.js";
|
|
25
52
|
import { V } from "../lib/Values.js";
|
|
26
53
|
import { NodeNamingAndLocationCommand } from "../lib/_Types.js";
|
|
27
54
|
export const NodeNamingAndLocationCCValues = Object.freeze({
|
|
@@ -39,307 +66,399 @@ export const NodeNamingAndLocationCCValues = Object.freeze({
|
|
|
39
66
|
function isASCII(str) {
|
|
40
67
|
return /^[\x00-\x7F]*$/.test(str);
|
|
41
68
|
}
|
|
42
|
-
let NodeNamingAndLocationCCAPI =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
case
|
|
63
|
-
return
|
|
64
|
-
case "location":
|
|
65
|
-
return this.setLocation(value);
|
|
69
|
+
let NodeNamingAndLocationCCAPI = (() => {
|
|
70
|
+
let _classDecorators = [API(CommandClasses["Node Naming and Location"])];
|
|
71
|
+
let _classDescriptor;
|
|
72
|
+
let _classExtraInitializers = [];
|
|
73
|
+
let _classThis;
|
|
74
|
+
let _classSuper = PhysicalCCAPI;
|
|
75
|
+
var NodeNamingAndLocationCCAPI = class extends _classSuper {
|
|
76
|
+
static { _classThis = this; }
|
|
77
|
+
static {
|
|
78
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
79
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
80
|
+
NodeNamingAndLocationCCAPI = _classThis = _classDescriptor.value;
|
|
81
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
82
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
83
|
+
}
|
|
84
|
+
supportsCommand(cmd) {
|
|
85
|
+
switch (cmd) {
|
|
86
|
+
case NodeNamingAndLocationCommand.NameGet:
|
|
87
|
+
case NodeNamingAndLocationCommand.NameSet:
|
|
88
|
+
case NodeNamingAndLocationCommand.LocationGet:
|
|
89
|
+
case NodeNamingAndLocationCommand.LocationSet:
|
|
90
|
+
return true; // This is mandatory
|
|
66
91
|
}
|
|
67
|
-
return
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
switch (property) {
|
|
73
|
-
case "name":
|
|
74
|
-
return this.getName();
|
|
75
|
-
case "location":
|
|
76
|
-
return this.getLocation();
|
|
77
|
-
default:
|
|
92
|
+
return super.supportsCommand(cmd);
|
|
93
|
+
}
|
|
94
|
+
get [SET_VALUE]() {
|
|
95
|
+
return async function ({ property }, value) {
|
|
96
|
+
if (property !== "name" && property !== "location") {
|
|
78
97
|
throwUnsupportedProperty(this.ccId, property);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
98
|
+
}
|
|
99
|
+
if (typeof value !== "string") {
|
|
100
|
+
throwWrongValueType(this.ccId, property, "string", typeof value);
|
|
101
|
+
}
|
|
102
|
+
switch (property) {
|
|
103
|
+
case "name":
|
|
104
|
+
return this.setName(value);
|
|
105
|
+
case "location":
|
|
106
|
+
return this.setLocation(value);
|
|
107
|
+
}
|
|
108
|
+
return undefined;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
get [POLL_VALUE]() {
|
|
112
|
+
return async function ({ property }) {
|
|
113
|
+
switch (property) {
|
|
114
|
+
case "name":
|
|
115
|
+
return this.getName();
|
|
116
|
+
case "location":
|
|
117
|
+
return this.getLocation();
|
|
118
|
+
default:
|
|
119
|
+
throwUnsupportedProperty(this.ccId, property);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
async getName() {
|
|
124
|
+
this.assertSupportsCommand(NodeNamingAndLocationCommand, NodeNamingAndLocationCommand.NameGet);
|
|
125
|
+
const cc = new NodeNamingAndLocationCCNameGet({
|
|
126
|
+
nodeId: this.endpoint.nodeId,
|
|
127
|
+
endpointIndex: this.endpoint.index,
|
|
128
|
+
});
|
|
129
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
130
|
+
return response?.name;
|
|
131
|
+
}
|
|
132
|
+
async setName(name) {
|
|
133
|
+
__assertType("name", "string", __assertType__string.bind(void 0, name));
|
|
134
|
+
this.assertSupportsCommand(NodeNamingAndLocationCommand, NodeNamingAndLocationCommand.NameSet);
|
|
135
|
+
const cc = new NodeNamingAndLocationCCNameSet({
|
|
136
|
+
nodeId: this.endpoint.nodeId,
|
|
137
|
+
endpointIndex: this.endpoint.index,
|
|
138
|
+
name,
|
|
139
|
+
});
|
|
140
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
141
|
+
}
|
|
142
|
+
async getLocation() {
|
|
143
|
+
this.assertSupportsCommand(NodeNamingAndLocationCommand, NodeNamingAndLocationCommand.LocationGet);
|
|
144
|
+
const cc = new NodeNamingAndLocationCCLocationGet({
|
|
145
|
+
nodeId: this.endpoint.nodeId,
|
|
146
|
+
endpointIndex: this.endpoint.index,
|
|
147
|
+
});
|
|
148
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
149
|
+
return response?.location;
|
|
150
|
+
}
|
|
151
|
+
async setLocation(location) {
|
|
152
|
+
__assertType("location", "string", __assertType__string.bind(void 0, location));
|
|
153
|
+
this.assertSupportsCommand(NodeNamingAndLocationCommand, NodeNamingAndLocationCommand.LocationSet);
|
|
154
|
+
const cc = new NodeNamingAndLocationCCLocationSet({
|
|
155
|
+
nodeId: this.endpoint.nodeId,
|
|
156
|
+
endpointIndex: this.endpoint.index,
|
|
157
|
+
location,
|
|
158
|
+
});
|
|
159
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
return NodeNamingAndLocationCCAPI = _classThis;
|
|
163
|
+
})();
|
|
124
164
|
export { NodeNamingAndLocationCCAPI };
|
|
125
|
-
let NodeNamingAndLocationCC =
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
});
|
|
147
|
-
ctx.logNode(node.id, {
|
|
148
|
-
message: "retrieving node name...",
|
|
149
|
-
direction: "outbound",
|
|
150
|
-
});
|
|
151
|
-
const name = await api.getName();
|
|
152
|
-
if (name != undefined) {
|
|
165
|
+
let NodeNamingAndLocationCC = (() => {
|
|
166
|
+
let _classDecorators = [commandClass(CommandClasses["Node Naming and Location"]), implementedVersion(1), ccValues(NodeNamingAndLocationCCValues)];
|
|
167
|
+
let _classDescriptor;
|
|
168
|
+
let _classExtraInitializers = [];
|
|
169
|
+
let _classThis;
|
|
170
|
+
let _classSuper = CommandClass;
|
|
171
|
+
var NodeNamingAndLocationCC = class extends _classSuper {
|
|
172
|
+
static { _classThis = this; }
|
|
173
|
+
static {
|
|
174
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
175
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
176
|
+
NodeNamingAndLocationCC = _classThis = _classDescriptor.value;
|
|
177
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
178
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
179
|
+
}
|
|
180
|
+
skipEndpointInterview() {
|
|
181
|
+
// As the name says, this is for the node, not for endpoints
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
async interview(ctx) {
|
|
185
|
+
const node = this.getNode(ctx);
|
|
153
186
|
ctx.logNode(node.id, {
|
|
154
|
-
|
|
155
|
-
|
|
187
|
+
endpoint: this.endpointIndex,
|
|
188
|
+
message: `Interviewing ${this.ccName}...`,
|
|
189
|
+
direction: "none",
|
|
156
190
|
});
|
|
191
|
+
await this.refreshValues(ctx);
|
|
192
|
+
// Remember that the interview is complete
|
|
193
|
+
this.setInterviewComplete(ctx, true);
|
|
157
194
|
}
|
|
158
|
-
ctx
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
195
|
+
async refreshValues(ctx) {
|
|
196
|
+
const node = this.getNode(ctx);
|
|
197
|
+
const endpoint = this.getEndpoint(ctx);
|
|
198
|
+
const api = CCAPI.create(CommandClasses["Node Naming and Location"], ctx, endpoint).withOptions({
|
|
199
|
+
priority: MessagePriority.NodeQuery,
|
|
200
|
+
});
|
|
201
|
+
ctx.logNode(node.id, {
|
|
202
|
+
message: "retrieving node name...",
|
|
203
|
+
direction: "outbound",
|
|
204
|
+
});
|
|
205
|
+
const name = await api.getName();
|
|
206
|
+
if (name != undefined) {
|
|
207
|
+
ctx.logNode(node.id, {
|
|
208
|
+
message: `is named "${name}"`,
|
|
209
|
+
direction: "inbound",
|
|
210
|
+
});
|
|
211
|
+
}
|
|
164
212
|
ctx.logNode(node.id, {
|
|
165
|
-
message:
|
|
166
|
-
direction: "
|
|
213
|
+
message: "retrieving node location...",
|
|
214
|
+
direction: "outbound",
|
|
167
215
|
});
|
|
216
|
+
const location = await api.getLocation();
|
|
217
|
+
if (location != undefined) {
|
|
218
|
+
ctx.logNode(node.id, {
|
|
219
|
+
message: `received location: ${location}`,
|
|
220
|
+
direction: "inbound",
|
|
221
|
+
});
|
|
222
|
+
}
|
|
168
223
|
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
commandClass(CommandClasses["Node Naming and Location"]),
|
|
173
|
-
implementedVersion(1),
|
|
174
|
-
ccValues(NodeNamingAndLocationCCValues)
|
|
175
|
-
], NodeNamingAndLocationCC);
|
|
224
|
+
};
|
|
225
|
+
return NodeNamingAndLocationCC = _classThis;
|
|
226
|
+
})();
|
|
176
227
|
export { NodeNamingAndLocationCC };
|
|
177
|
-
let NodeNamingAndLocationCCNameSet =
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
228
|
+
let NodeNamingAndLocationCCNameSet = (() => {
|
|
229
|
+
let _classDecorators = [CCCommand(NodeNamingAndLocationCommand.NameSet), useSupervision()];
|
|
230
|
+
let _classDescriptor;
|
|
231
|
+
let _classExtraInitializers = [];
|
|
232
|
+
let _classThis;
|
|
233
|
+
let _classSuper = NodeNamingAndLocationCC;
|
|
234
|
+
var NodeNamingAndLocationCCNameSet = class extends _classSuper {
|
|
235
|
+
static { _classThis = this; }
|
|
236
|
+
static {
|
|
237
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
238
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
239
|
+
NodeNamingAndLocationCCNameSet = _classThis = _classDescriptor.value;
|
|
240
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
241
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
242
|
+
}
|
|
243
|
+
constructor(options) {
|
|
244
|
+
super(options);
|
|
245
|
+
this.name = options.name;
|
|
246
|
+
}
|
|
247
|
+
static from(_raw, _ctx) {
|
|
248
|
+
// TODO: Deserialize payload
|
|
249
|
+
throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
250
|
+
// return new NodeNamingAndLocationCCNameSet({
|
|
251
|
+
// nodeId: ctx.sourceNodeId,
|
|
252
|
+
// });
|
|
253
|
+
}
|
|
254
|
+
name;
|
|
255
|
+
serialize(ctx) {
|
|
256
|
+
const encoding = isASCII(this.name) ? "ascii" : "utf16le";
|
|
257
|
+
this.payload = new Bytes(1 + this.name.length * (encoding === "ascii" ? 1 : 2));
|
|
258
|
+
this.payload[0] = encoding === "ascii" ? 0x0 : 0x2;
|
|
259
|
+
let nameBuffer;
|
|
260
|
+
if (encoding === "utf16le") {
|
|
261
|
+
nameBuffer = stringToUint8ArrayUTF16BE(this.name);
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
nameBuffer = Bytes.from(this.name, "ascii");
|
|
265
|
+
}
|
|
266
|
+
// Copy at most 16 bytes
|
|
267
|
+
this.payload.set(nameBuffer.subarray(0, Math.min(16, nameBuffer.length)), 0);
|
|
268
|
+
return super.serialize(ctx);
|
|
269
|
+
}
|
|
270
|
+
toLogEntry(ctx) {
|
|
271
|
+
return {
|
|
272
|
+
...super.toLogEntry(ctx),
|
|
273
|
+
message: { name: this.name },
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
return NodeNamingAndLocationCCNameSet = _classThis;
|
|
278
|
+
})();
|
|
216
279
|
export { NodeNamingAndLocationCCNameSet };
|
|
217
|
-
let NodeNamingAndLocationCCNameReport =
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
280
|
+
let NodeNamingAndLocationCCNameReport = (() => {
|
|
281
|
+
let _classDecorators = [CCCommand(NodeNamingAndLocationCommand.NameReport), ccValueProperty("name", NodeNamingAndLocationCCValues.name)];
|
|
282
|
+
let _classDescriptor;
|
|
283
|
+
let _classExtraInitializers = [];
|
|
284
|
+
let _classThis;
|
|
285
|
+
let _classSuper = NodeNamingAndLocationCC;
|
|
286
|
+
var NodeNamingAndLocationCCNameReport = class extends _classSuper {
|
|
287
|
+
static { _classThis = this; }
|
|
288
|
+
static {
|
|
289
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
290
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
291
|
+
NodeNamingAndLocationCCNameReport = _classThis = _classDescriptor.value;
|
|
292
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
293
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
294
|
+
}
|
|
295
|
+
constructor(options) {
|
|
296
|
+
super(options);
|
|
297
|
+
this.name = options.name;
|
|
298
|
+
}
|
|
299
|
+
static from(raw, ctx) {
|
|
300
|
+
validatePayload(raw.payload.length >= 1);
|
|
301
|
+
const encoding = raw.payload[0] === 2 ? "utf16le" : "ascii";
|
|
302
|
+
const nameBuffer = raw.payload.subarray(1);
|
|
303
|
+
let name;
|
|
304
|
+
if (encoding === "utf16le") {
|
|
305
|
+
validatePayload(nameBuffer.length % 2 === 0);
|
|
306
|
+
name = uint8ArrayToStringUTF16BE(nameBuffer);
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
name = nameBuffer.toString("ascii");
|
|
310
|
+
}
|
|
311
|
+
return new this({
|
|
312
|
+
nodeId: ctx.sourceNodeId,
|
|
313
|
+
name,
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
name;
|
|
317
|
+
toLogEntry(ctx) {
|
|
318
|
+
return {
|
|
319
|
+
...super.toLogEntry(ctx),
|
|
320
|
+
message: { name: this.name },
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
return NodeNamingAndLocationCCNameReport = _classThis;
|
|
325
|
+
})();
|
|
253
326
|
export { NodeNamingAndLocationCCNameReport };
|
|
254
|
-
let NodeNamingAndLocationCCNameGet =
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
327
|
+
let NodeNamingAndLocationCCNameGet = (() => {
|
|
328
|
+
let _classDecorators = [CCCommand(NodeNamingAndLocationCommand.NameGet), expectedCCResponse(NodeNamingAndLocationCCNameReport)];
|
|
329
|
+
let _classDescriptor;
|
|
330
|
+
let _classExtraInitializers = [];
|
|
331
|
+
let _classThis;
|
|
332
|
+
let _classSuper = NodeNamingAndLocationCC;
|
|
333
|
+
var NodeNamingAndLocationCCNameGet = class extends _classSuper {
|
|
334
|
+
static { _classThis = this; }
|
|
335
|
+
static {
|
|
336
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
337
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
338
|
+
NodeNamingAndLocationCCNameGet = _classThis = _classDescriptor.value;
|
|
339
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
340
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
return NodeNamingAndLocationCCNameGet = _classThis;
|
|
344
|
+
})();
|
|
260
345
|
export { NodeNamingAndLocationCCNameGet };
|
|
261
|
-
let NodeNamingAndLocationCCLocationSet =
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
346
|
+
let NodeNamingAndLocationCCLocationSet = (() => {
|
|
347
|
+
let _classDecorators = [CCCommand(NodeNamingAndLocationCommand.LocationSet), useSupervision()];
|
|
348
|
+
let _classDescriptor;
|
|
349
|
+
let _classExtraInitializers = [];
|
|
350
|
+
let _classThis;
|
|
351
|
+
let _classSuper = NodeNamingAndLocationCC;
|
|
352
|
+
var NodeNamingAndLocationCCLocationSet = class extends _classSuper {
|
|
353
|
+
static { _classThis = this; }
|
|
354
|
+
static {
|
|
355
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
356
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
357
|
+
NodeNamingAndLocationCCLocationSet = _classThis = _classDescriptor.value;
|
|
358
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
359
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
360
|
+
}
|
|
361
|
+
constructor(options) {
|
|
362
|
+
super(options);
|
|
363
|
+
this.location = options.location;
|
|
364
|
+
}
|
|
365
|
+
static from(_raw, _ctx) {
|
|
366
|
+
// TODO: Deserialize payload
|
|
367
|
+
throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
368
|
+
// return new NodeNamingAndLocationCCLocationSet({
|
|
369
|
+
// nodeId: ctx.sourceNodeId,
|
|
370
|
+
// });
|
|
371
|
+
}
|
|
372
|
+
location;
|
|
373
|
+
serialize(ctx) {
|
|
374
|
+
const encoding = isASCII(this.location) ? "ascii" : "utf16le";
|
|
375
|
+
this.payload = new Bytes(1 + this.location.length * (encoding === "ascii" ? 1 : 2));
|
|
376
|
+
this.payload[0] = encoding === "ascii" ? 0x0 : 0x2;
|
|
377
|
+
let locationBuffer;
|
|
378
|
+
if (encoding === "utf16le") {
|
|
379
|
+
locationBuffer = stringToUint8ArrayUTF16BE(this.location);
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
locationBuffer = Bytes.from(this.location, "ascii");
|
|
383
|
+
}
|
|
384
|
+
// Copy at most 16 bytes
|
|
385
|
+
this.payload.set(locationBuffer.subarray(0, Math.min(16, locationBuffer.length)), 0);
|
|
386
|
+
return super.serialize(ctx);
|
|
387
|
+
}
|
|
388
|
+
toLogEntry(ctx) {
|
|
389
|
+
return {
|
|
390
|
+
...super.toLogEntry(ctx),
|
|
391
|
+
message: { location: this.location },
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
return NodeNamingAndLocationCCLocationSet = _classThis;
|
|
396
|
+
})();
|
|
300
397
|
export { NodeNamingAndLocationCCLocationSet };
|
|
301
|
-
let NodeNamingAndLocationCCLocationReport =
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
398
|
+
let NodeNamingAndLocationCCLocationReport = (() => {
|
|
399
|
+
let _classDecorators = [CCCommand(NodeNamingAndLocationCommand.LocationReport), ccValueProperty("location", NodeNamingAndLocationCCValues.location)];
|
|
400
|
+
let _classDescriptor;
|
|
401
|
+
let _classExtraInitializers = [];
|
|
402
|
+
let _classThis;
|
|
403
|
+
let _classSuper = NodeNamingAndLocationCC;
|
|
404
|
+
var NodeNamingAndLocationCCLocationReport = class extends _classSuper {
|
|
405
|
+
static { _classThis = this; }
|
|
406
|
+
static {
|
|
407
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
408
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
409
|
+
NodeNamingAndLocationCCLocationReport = _classThis = _classDescriptor.value;
|
|
410
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
411
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
412
|
+
}
|
|
413
|
+
constructor(options) {
|
|
414
|
+
super(options);
|
|
415
|
+
this.location = options.location;
|
|
416
|
+
}
|
|
417
|
+
static from(raw, ctx) {
|
|
418
|
+
validatePayload(raw.payload.length >= 1);
|
|
419
|
+
const encoding = raw.payload[0] === 2 ? "utf16le" : "ascii";
|
|
420
|
+
const locationBuffer = raw.payload.subarray(1);
|
|
421
|
+
let location;
|
|
422
|
+
if (encoding === "utf16le") {
|
|
423
|
+
validatePayload(locationBuffer.length % 2 === 0);
|
|
424
|
+
location = uint8ArrayToStringUTF16BE(locationBuffer);
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
location = locationBuffer.toString("ascii");
|
|
428
|
+
}
|
|
429
|
+
return new this({
|
|
430
|
+
nodeId: ctx.sourceNodeId,
|
|
431
|
+
location,
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
location;
|
|
435
|
+
toLogEntry(ctx) {
|
|
436
|
+
return {
|
|
437
|
+
...super.toLogEntry(ctx),
|
|
438
|
+
message: { location: this.location },
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
return NodeNamingAndLocationCCLocationReport = _classThis;
|
|
443
|
+
})();
|
|
337
444
|
export { NodeNamingAndLocationCCLocationReport };
|
|
338
|
-
let NodeNamingAndLocationCCLocationGet =
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
445
|
+
let NodeNamingAndLocationCCLocationGet = (() => {
|
|
446
|
+
let _classDecorators = [CCCommand(NodeNamingAndLocationCommand.LocationGet), expectedCCResponse(NodeNamingAndLocationCCLocationReport)];
|
|
447
|
+
let _classDescriptor;
|
|
448
|
+
let _classExtraInitializers = [];
|
|
449
|
+
let _classThis;
|
|
450
|
+
let _classSuper = NodeNamingAndLocationCC;
|
|
451
|
+
var NodeNamingAndLocationCCLocationGet = class extends _classSuper {
|
|
452
|
+
static { _classThis = this; }
|
|
453
|
+
static {
|
|
454
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
455
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
456
|
+
NodeNamingAndLocationCCLocationGet = _classThis = _classDescriptor.value;
|
|
457
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
458
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
return NodeNamingAndLocationCCLocationGet = _classThis;
|
|
462
|
+
})();
|
|
344
463
|
export { NodeNamingAndLocationCCLocationGet };
|
|
345
464
|
//# sourceMappingURL=NodeNamingCC.js.map
|