@zwave-js/cc 14.0.0-beta.4 → 14.0.0-beta.5
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 AssociationGroupInfoCC_1, AssociationGroupInfoCCNameReport_1, AssociationGroupInfoCCNameGet_1, AssociationGroupInfoCCInfoReport_1, AssociationGroupInfoCCInfoGet_1, AssociationGroupInfoCCCommandListReport_1, AssociationGroupInfoCCCommandListGet_1;
|
|
8
35
|
function __assertType(argName, typeName, boundHasError) {
|
|
9
36
|
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
10
37
|
if (boundHasError()) {
|
|
@@ -183,7 +210,7 @@ import { Bytes } from "@zwave-js/shared/safe";
|
|
|
183
210
|
import { cpp2js, getEnumMemberName, num2hex } from "@zwave-js/shared/safe";
|
|
184
211
|
import { CCAPI, PhysicalCCAPI } from "../lib/API.js";
|
|
185
212
|
import { CommandClass, } from "../lib/CommandClass.js";
|
|
186
|
-
import { API, CCCommand,
|
|
213
|
+
import { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, } from "../lib/CommandClassDecorators.js";
|
|
187
214
|
import { V } from "../lib/Values.js";
|
|
188
215
|
import { AssociationGroupInfoCommand, AssociationGroupInfoProfile, } from "../lib/_Types.js";
|
|
189
216
|
import { AssociationCC } from "./AssociationCC.js";
|
|
@@ -202,568 +229,661 @@ export const AssociationGroupInfoCCValues = Object.freeze({
|
|
|
202
229
|
}),
|
|
203
230
|
});
|
|
204
231
|
// @noSetValueAPI This CC only has get-type commands
|
|
205
|
-
let AssociationGroupInfoCCAPI =
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
220
|
-
this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.NameGet);
|
|
221
|
-
const cc = new AssociationGroupInfoCCNameGet({
|
|
222
|
-
nodeId: this.endpoint.nodeId,
|
|
223
|
-
endpointIndex: this.endpoint.index,
|
|
224
|
-
groupId,
|
|
225
|
-
});
|
|
226
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
227
|
-
if (response)
|
|
228
|
-
return response.name;
|
|
229
|
-
}
|
|
230
|
-
async reportGroupName(groupId, name) {
|
|
231
|
-
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
232
|
-
__assertType("name", "string", __assertType__string.bind(void 0, name));
|
|
233
|
-
this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.NameReport);
|
|
234
|
-
const cc = new AssociationGroupInfoCCNameReport({
|
|
235
|
-
nodeId: this.endpoint.nodeId,
|
|
236
|
-
endpointIndex: this.endpoint.index,
|
|
237
|
-
groupId,
|
|
238
|
-
name,
|
|
239
|
-
});
|
|
240
|
-
await this.host.sendCommand(cc, this.commandOptions);
|
|
241
|
-
}
|
|
242
|
-
async getGroupInfo(groupId, refreshCache = false) {
|
|
243
|
-
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
244
|
-
__assertType("refreshCache", "(optional) boolean", __assertType__optional_boolean.bind(void 0, refreshCache));
|
|
245
|
-
this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.InfoGet);
|
|
246
|
-
const cc = new AssociationGroupInfoCCInfoGet({
|
|
247
|
-
nodeId: this.endpoint.nodeId,
|
|
248
|
-
endpointIndex: this.endpoint.index,
|
|
249
|
-
groupId,
|
|
250
|
-
refreshCache,
|
|
251
|
-
});
|
|
252
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
253
|
-
// SDS13782 says: If List Mode is set to 0, the Group Count field MUST be set to 1.
|
|
254
|
-
// But that's not always the case. Apparently some endpoints return 0 groups
|
|
255
|
-
// although they support AGI CC
|
|
256
|
-
if (response && response.groups.length > 0) {
|
|
257
|
-
const { groupId: _, ...info } = response.groups[0];
|
|
258
|
-
return {
|
|
259
|
-
hasDynamicInfo: response.hasDynamicInfo,
|
|
260
|
-
...info,
|
|
261
|
-
};
|
|
232
|
+
let AssociationGroupInfoCCAPI = (() => {
|
|
233
|
+
let _classDecorators = [API(CommandClasses["Association Group Information"])];
|
|
234
|
+
let _classDescriptor;
|
|
235
|
+
let _classExtraInitializers = [];
|
|
236
|
+
let _classThis;
|
|
237
|
+
let _classSuper = PhysicalCCAPI;
|
|
238
|
+
var AssociationGroupInfoCCAPI = class extends _classSuper {
|
|
239
|
+
static { _classThis = this; }
|
|
240
|
+
static {
|
|
241
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
242
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
243
|
+
AssociationGroupInfoCCAPI = _classThis = _classDescriptor.value;
|
|
244
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
245
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
262
246
|
}
|
|
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
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
247
|
+
supportsCommand(cmd) {
|
|
248
|
+
switch (cmd) {
|
|
249
|
+
case AssociationGroupInfoCommand.NameGet:
|
|
250
|
+
case AssociationGroupInfoCommand.NameReport:
|
|
251
|
+
case AssociationGroupInfoCommand.InfoGet:
|
|
252
|
+
case AssociationGroupInfoCommand.InfoReport:
|
|
253
|
+
case AssociationGroupInfoCommand.CommandListGet:
|
|
254
|
+
case AssociationGroupInfoCommand.CommandListReport:
|
|
255
|
+
return true; // This is mandatory
|
|
256
|
+
}
|
|
257
|
+
return super.supportsCommand(cmd);
|
|
258
|
+
}
|
|
259
|
+
async getGroupName(groupId) {
|
|
260
|
+
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
261
|
+
this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.NameGet);
|
|
262
|
+
const cc = new AssociationGroupInfoCCNameGet({
|
|
263
|
+
nodeId: this.endpoint.nodeId,
|
|
264
|
+
endpointIndex: this.endpoint.index,
|
|
265
|
+
groupId,
|
|
266
|
+
});
|
|
267
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
268
|
+
if (response)
|
|
269
|
+
return response.name;
|
|
270
|
+
}
|
|
271
|
+
async reportGroupName(groupId, name) {
|
|
272
|
+
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
273
|
+
__assertType("name", "string", __assertType__string.bind(void 0, name));
|
|
274
|
+
this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.NameReport);
|
|
275
|
+
const cc = new AssociationGroupInfoCCNameReport({
|
|
276
|
+
nodeId: this.endpoint.nodeId,
|
|
277
|
+
endpointIndex: this.endpoint.index,
|
|
278
|
+
groupId,
|
|
279
|
+
name,
|
|
280
|
+
});
|
|
281
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
282
|
+
}
|
|
283
|
+
async getGroupInfo(groupId, refreshCache = false) {
|
|
284
|
+
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
285
|
+
__assertType("refreshCache", "(optional) boolean", __assertType__optional_boolean.bind(void 0, refreshCache));
|
|
286
|
+
this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.InfoGet);
|
|
287
|
+
const cc = new AssociationGroupInfoCCInfoGet({
|
|
288
|
+
nodeId: this.endpoint.nodeId,
|
|
289
|
+
endpointIndex: this.endpoint.index,
|
|
290
|
+
groupId,
|
|
291
|
+
refreshCache,
|
|
292
|
+
});
|
|
293
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
294
|
+
// SDS13782 says: If List Mode is set to 0, the Group Count field MUST be set to 1.
|
|
295
|
+
// But that's not always the case. Apparently some endpoints return 0 groups
|
|
296
|
+
// although they support AGI CC
|
|
297
|
+
if (response && response.groups.length > 0) {
|
|
298
|
+
const { groupId: _, ...info } = response.groups[0];
|
|
299
|
+
return {
|
|
300
|
+
hasDynamicInfo: response.hasDynamicInfo,
|
|
301
|
+
...info,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
async reportGroupInfo(options) {
|
|
306
|
+
__assertType("options", "AssociationGroupInfoCCInfoReportOptions", __assertType__AssociationGroupInfoCCInfoReportOptions.bind(void 0, options));
|
|
307
|
+
this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.InfoReport);
|
|
308
|
+
const cc = new AssociationGroupInfoCCInfoReport({
|
|
309
|
+
nodeId: this.endpoint.nodeId,
|
|
310
|
+
endpointIndex: this.endpoint.index,
|
|
311
|
+
...options,
|
|
312
|
+
});
|
|
313
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
314
|
+
}
|
|
315
|
+
async getCommands(groupId, allowCache = true) {
|
|
316
|
+
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
317
|
+
__assertType("allowCache", "(optional) boolean", __assertType__optional_boolean.bind(void 0, allowCache));
|
|
318
|
+
this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.CommandListGet);
|
|
319
|
+
const cc = new AssociationGroupInfoCCCommandListGet({
|
|
320
|
+
nodeId: this.endpoint.nodeId,
|
|
321
|
+
endpointIndex: this.endpoint.index,
|
|
322
|
+
groupId,
|
|
323
|
+
allowCache,
|
|
324
|
+
});
|
|
325
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
326
|
+
if (response)
|
|
327
|
+
return response.commands;
|
|
328
|
+
}
|
|
329
|
+
async reportCommands(groupId, commands) {
|
|
330
|
+
__assertType("groupId", "number", __assertType__number.bind(void 0, groupId));
|
|
331
|
+
__assertType("commands", undefined, __assertType___0_1_2.bind(void 0, commands));
|
|
332
|
+
this.assertSupportsCommand(AssociationGroupInfoCommand, AssociationGroupInfoCommand.CommandListReport);
|
|
333
|
+
const cc = new AssociationGroupInfoCCCommandListReport({
|
|
334
|
+
nodeId: this.endpoint.nodeId,
|
|
335
|
+
endpointIndex: this.endpoint.index,
|
|
336
|
+
groupId,
|
|
337
|
+
commands,
|
|
338
|
+
});
|
|
339
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
return AssociationGroupInfoCCAPI = _classThis;
|
|
343
|
+
})();
|
|
304
344
|
export { AssociationGroupInfoCCAPI };
|
|
305
|
-
let AssociationGroupInfoCC =
|
|
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
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
345
|
+
let AssociationGroupInfoCC = (() => {
|
|
346
|
+
let _classDecorators = [commandClass(CommandClasses["Association Group Information"]), implementedVersion(3), ccValues(AssociationGroupInfoCCValues)];
|
|
347
|
+
let _classDescriptor;
|
|
348
|
+
let _classExtraInitializers = [];
|
|
349
|
+
let _classThis;
|
|
350
|
+
let _classSuper = CommandClass;
|
|
351
|
+
var AssociationGroupInfoCC = class extends _classSuper {
|
|
352
|
+
static { _classThis = this; }
|
|
353
|
+
static {
|
|
354
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
355
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
356
|
+
AssociationGroupInfoCC = _classThis = _classDescriptor.value;
|
|
357
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
358
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
359
|
+
}
|
|
360
|
+
determineRequiredCCInterviews() {
|
|
361
|
+
// AssociationCC must be interviewed after Z-Wave+ if that is supported
|
|
362
|
+
return [
|
|
363
|
+
...super.determineRequiredCCInterviews(),
|
|
364
|
+
CommandClasses.Association,
|
|
365
|
+
CommandClasses["Multi Channel Association"],
|
|
366
|
+
];
|
|
367
|
+
}
|
|
368
|
+
/** Returns the name of an association group */
|
|
369
|
+
static getGroupNameCached(ctx, endpoint, groupId) {
|
|
370
|
+
return ctx
|
|
371
|
+
.getValueDB(endpoint.nodeId)
|
|
372
|
+
.getValue(AssociationGroupInfoCCValues.groupName(groupId).endpoint(endpoint.index));
|
|
373
|
+
}
|
|
374
|
+
/** Returns the association profile for an association group */
|
|
375
|
+
static getGroupProfileCached(ctx, endpoint, groupId) {
|
|
376
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(AssociationGroupInfoCCValues.groupInfo(groupId).endpoint(endpoint.index))
|
|
377
|
+
?.profile;
|
|
378
|
+
}
|
|
379
|
+
/** Returns the dictionary of all commands issued by the given association group */
|
|
380
|
+
static getIssuedCommandsCached(ctx, endpoint, groupId) {
|
|
381
|
+
return ctx
|
|
382
|
+
.getValueDB(endpoint.nodeId)
|
|
383
|
+
.getValue(AssociationGroupInfoCCValues.commands(groupId).endpoint(endpoint.index));
|
|
384
|
+
}
|
|
385
|
+
static findGroupsForIssuedCommand(ctx, endpoint, ccId, command) {
|
|
386
|
+
const ret = [];
|
|
387
|
+
const associationGroupCount = this.getAssociationGroupCountCached(ctx, endpoint);
|
|
388
|
+
for (let groupId = 1; groupId <= associationGroupCount; groupId++) {
|
|
389
|
+
// Scan the issued commands of all groups if there's a match
|
|
390
|
+
const issuedCommands = this.getIssuedCommandsCached(ctx, endpoint, groupId);
|
|
391
|
+
if (!issuedCommands)
|
|
392
|
+
continue;
|
|
393
|
+
if (issuedCommands.has(ccId)
|
|
394
|
+
&& issuedCommands.get(ccId).includes(command)) {
|
|
395
|
+
ret.push(groupId);
|
|
396
|
+
continue;
|
|
397
|
+
}
|
|
343
398
|
}
|
|
399
|
+
return ret;
|
|
344
400
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
const endpoint = this.getEndpoint(ctx);
|
|
363
|
-
const api = CCAPI.create(CommandClasses["Association Group Information"], ctx, endpoint).withOptions({ priority: MessagePriority.NodeQuery });
|
|
364
|
-
ctx.logNode(node.id, {
|
|
365
|
-
endpoint: this.endpointIndex,
|
|
366
|
-
message: `Interviewing ${this.ccName}...`,
|
|
367
|
-
direction: "none",
|
|
368
|
-
});
|
|
369
|
-
const associationGroupCount = AssociationGroupInfoCC_1
|
|
370
|
-
.getAssociationGroupCountCached(ctx, endpoint);
|
|
371
|
-
for (let groupId = 1; groupId <= associationGroupCount; groupId++) {
|
|
372
|
-
// First get the group's name
|
|
401
|
+
static getAssociationGroupCountCached(ctx, endpoint) {
|
|
402
|
+
// The association group count is either determined by the
|
|
403
|
+
// Association CC or the Multi Channel Association CC
|
|
404
|
+
return (
|
|
405
|
+
// First query the Multi Channel Association CC
|
|
406
|
+
// And fall back to 0
|
|
407
|
+
(endpoint.supportsCC(CommandClasses["Multi Channel Association"])
|
|
408
|
+
&& MultiChannelAssociationCC.getGroupCountCached(ctx, endpoint))
|
|
409
|
+
// Then the Association CC
|
|
410
|
+
|| (endpoint.supportsCC(CommandClasses.Association)
|
|
411
|
+
&& AssociationCC.getGroupCountCached(ctx, endpoint))
|
|
412
|
+
|| 0);
|
|
413
|
+
}
|
|
414
|
+
async interview(ctx) {
|
|
415
|
+
const node = this.getNode(ctx);
|
|
416
|
+
const endpoint = this.getEndpoint(ctx);
|
|
417
|
+
const api = CCAPI.create(CommandClasses["Association Group Information"], ctx, endpoint).withOptions({ priority: MessagePriority.NodeQuery });
|
|
373
418
|
ctx.logNode(node.id, {
|
|
374
419
|
endpoint: this.endpointIndex,
|
|
375
|
-
message: `
|
|
376
|
-
direction: "
|
|
420
|
+
message: `Interviewing ${this.ccName}...`,
|
|
421
|
+
direction: "none",
|
|
377
422
|
});
|
|
378
|
-
const
|
|
379
|
-
|
|
380
|
-
|
|
423
|
+
const associationGroupCount = AssociationGroupInfoCC
|
|
424
|
+
.getAssociationGroupCountCached(ctx, endpoint);
|
|
425
|
+
for (let groupId = 1; groupId <= associationGroupCount; groupId++) {
|
|
426
|
+
// First get the group's name
|
|
427
|
+
ctx.logNode(node.id, {
|
|
428
|
+
endpoint: this.endpointIndex,
|
|
429
|
+
message: `Association group #${groupId}: Querying name...`,
|
|
430
|
+
direction: "outbound",
|
|
431
|
+
});
|
|
432
|
+
const name = await api.getGroupName(groupId);
|
|
433
|
+
if (name) {
|
|
434
|
+
const logMessage = `Association group #${groupId} has name "${name}"`;
|
|
435
|
+
ctx.logNode(node.id, {
|
|
436
|
+
endpoint: this.endpointIndex,
|
|
437
|
+
message: logMessage,
|
|
438
|
+
direction: "inbound",
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
// Then the command list
|
|
381
442
|
ctx.logNode(node.id, {
|
|
382
443
|
endpoint: this.endpointIndex,
|
|
383
|
-
message:
|
|
384
|
-
direction: "
|
|
444
|
+
message: `Association group #${groupId}: Querying command list...`,
|
|
445
|
+
direction: "outbound",
|
|
385
446
|
});
|
|
447
|
+
await api.getCommands(groupId);
|
|
448
|
+
// Not sure how to log this
|
|
386
449
|
}
|
|
387
|
-
//
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
direction: "outbound",
|
|
392
|
-
});
|
|
393
|
-
await api.getCommands(groupId);
|
|
394
|
-
// Not sure how to log this
|
|
450
|
+
// Finally query each group for its information
|
|
451
|
+
await this.refreshValues(ctx);
|
|
452
|
+
// Remember that the interview is complete
|
|
453
|
+
this.setInterviewComplete(ctx, true);
|
|
395
454
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
const associationGroupCount = AssociationGroupInfoCC_1
|
|
407
|
-
.getAssociationGroupCountCached(ctx, endpoint);
|
|
408
|
-
const hasDynamicInfo = this.getValue(ctx, AssociationGroupInfoCCValues.hasDynamicInfo);
|
|
409
|
-
for (let groupId = 1; groupId <= associationGroupCount; groupId++) {
|
|
410
|
-
// Then its information
|
|
411
|
-
ctx.logNode(node.id, {
|
|
412
|
-
endpoint: this.endpointIndex,
|
|
413
|
-
message: `Association group #${groupId}: Querying info...`,
|
|
414
|
-
direction: "outbound",
|
|
415
|
-
});
|
|
416
|
-
const info = await api.getGroupInfo(groupId, !!hasDynamicInfo);
|
|
417
|
-
if (info) {
|
|
418
|
-
const logMessage = `Received info for association group #${groupId}:
|
|
419
|
-
info is dynamic: ${info.hasDynamicInfo}
|
|
420
|
-
profile: ${getEnumMemberName(AssociationGroupInfoProfile, info.profile)}`;
|
|
455
|
+
async refreshValues(ctx) {
|
|
456
|
+
const node = this.getNode(ctx);
|
|
457
|
+
const endpoint = this.getEndpoint(ctx);
|
|
458
|
+
const api = CCAPI.create(CommandClasses["Association Group Information"], ctx, endpoint).withOptions({ priority: MessagePriority.NodeQuery });
|
|
459
|
+
// Query the information for each group (this is the only thing that could be dynamic)
|
|
460
|
+
const associationGroupCount = AssociationGroupInfoCC
|
|
461
|
+
.getAssociationGroupCountCached(ctx, endpoint);
|
|
462
|
+
const hasDynamicInfo = this.getValue(ctx, AssociationGroupInfoCCValues.hasDynamicInfo);
|
|
463
|
+
for (let groupId = 1; groupId <= associationGroupCount; groupId++) {
|
|
464
|
+
// Then its information
|
|
421
465
|
ctx.logNode(node.id, {
|
|
422
466
|
endpoint: this.endpointIndex,
|
|
423
|
-
message:
|
|
424
|
-
direction: "
|
|
467
|
+
message: `Association group #${groupId}: Querying info...`,
|
|
468
|
+
direction: "outbound",
|
|
425
469
|
});
|
|
470
|
+
const info = await api.getGroupInfo(groupId, !!hasDynamicInfo);
|
|
471
|
+
if (info) {
|
|
472
|
+
const logMessage = `Received info for association group #${groupId}:
|
|
473
|
+
info is dynamic: ${info.hasDynamicInfo}
|
|
474
|
+
profile: ${getEnumMemberName(AssociationGroupInfoProfile, info.profile)}`;
|
|
475
|
+
ctx.logNode(node.id, {
|
|
476
|
+
endpoint: this.endpointIndex,
|
|
477
|
+
message: logMessage,
|
|
478
|
+
direction: "inbound",
|
|
479
|
+
});
|
|
480
|
+
}
|
|
426
481
|
}
|
|
427
482
|
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
commandClass(CommandClasses["Association Group Information"]),
|
|
432
|
-
implementedVersion(3),
|
|
433
|
-
ccValues(AssociationGroupInfoCCValues)
|
|
434
|
-
], AssociationGroupInfoCC);
|
|
483
|
+
};
|
|
484
|
+
return AssociationGroupInfoCC = _classThis;
|
|
485
|
+
})();
|
|
435
486
|
export { AssociationGroupInfoCC };
|
|
436
|
-
let AssociationGroupInfoCCNameReport =
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
487
|
+
let AssociationGroupInfoCCNameReport = (() => {
|
|
488
|
+
let _classDecorators = [CCCommand(AssociationGroupInfoCommand.NameReport)];
|
|
489
|
+
let _classDescriptor;
|
|
490
|
+
let _classExtraInitializers = [];
|
|
491
|
+
let _classThis;
|
|
492
|
+
let _classSuper = AssociationGroupInfoCC;
|
|
493
|
+
var AssociationGroupInfoCCNameReport = class extends _classSuper {
|
|
494
|
+
static { _classThis = this; }
|
|
495
|
+
static {
|
|
496
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
497
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
498
|
+
AssociationGroupInfoCCNameReport = _classThis = _classDescriptor.value;
|
|
499
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
500
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
501
|
+
}
|
|
502
|
+
constructor(options) {
|
|
503
|
+
super(options);
|
|
504
|
+
this.groupId = options.groupId;
|
|
505
|
+
this.name = options.name;
|
|
506
|
+
}
|
|
507
|
+
static from(raw, ctx) {
|
|
508
|
+
validatePayload(raw.payload.length >= 2);
|
|
509
|
+
const groupId = raw.payload[0];
|
|
510
|
+
const nameLength = raw.payload[1];
|
|
511
|
+
validatePayload(raw.payload.length >= 2 + nameLength);
|
|
512
|
+
// The specs don't allow 0-terminated string, but some devices use them
|
|
513
|
+
// So we need to cut them off
|
|
514
|
+
const name = cpp2js(raw.payload.subarray(2, 2 + nameLength).toString("utf8"));
|
|
515
|
+
return new this({
|
|
516
|
+
nodeId: ctx.sourceNodeId,
|
|
517
|
+
groupId,
|
|
518
|
+
name,
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
groupId;
|
|
522
|
+
name;
|
|
523
|
+
persistValues(ctx) {
|
|
524
|
+
if (!super.persistValues(ctx))
|
|
525
|
+
return false;
|
|
526
|
+
const valueDB = this.getValueDB(ctx);
|
|
527
|
+
valueDB.setValue(AssociationGroupInfoCCValues.groupName(this.groupId).endpoint(this.endpointIndex), this.name);
|
|
528
|
+
return true;
|
|
529
|
+
}
|
|
530
|
+
serialize(ctx) {
|
|
531
|
+
this.payload = Bytes.concat([
|
|
532
|
+
Bytes.from([this.groupId, this.name.length]),
|
|
533
|
+
Bytes.from(this.name, "utf8"),
|
|
534
|
+
]);
|
|
535
|
+
return super.serialize(ctx);
|
|
536
|
+
}
|
|
537
|
+
toLogEntry(ctx) {
|
|
538
|
+
return {
|
|
539
|
+
...super.toLogEntry(ctx),
|
|
540
|
+
message: {
|
|
541
|
+
"group id": this.groupId,
|
|
542
|
+
name: this.name,
|
|
543
|
+
},
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
return AssociationGroupInfoCCNameReport = _classThis;
|
|
548
|
+
})();
|
|
485
549
|
export { AssociationGroupInfoCCNameReport };
|
|
486
|
-
let AssociationGroupInfoCCNameGet =
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
550
|
+
let AssociationGroupInfoCCNameGet = (() => {
|
|
551
|
+
let _classDecorators = [CCCommand(AssociationGroupInfoCommand.NameGet), expectedCCResponse(AssociationGroupInfoCCNameReport)];
|
|
552
|
+
let _classDescriptor;
|
|
553
|
+
let _classExtraInitializers = [];
|
|
554
|
+
let _classThis;
|
|
555
|
+
let _classSuper = AssociationGroupInfoCC;
|
|
556
|
+
var AssociationGroupInfoCCNameGet = class extends _classSuper {
|
|
557
|
+
static { _classThis = this; }
|
|
558
|
+
static {
|
|
559
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
560
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
561
|
+
AssociationGroupInfoCCNameGet = _classThis = _classDescriptor.value;
|
|
562
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
563
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
564
|
+
}
|
|
565
|
+
constructor(options) {
|
|
566
|
+
super(options);
|
|
567
|
+
this.groupId = options.groupId;
|
|
568
|
+
}
|
|
569
|
+
static from(raw, ctx) {
|
|
570
|
+
validatePayload(raw.payload.length >= 1);
|
|
571
|
+
const groupId = raw.payload[0];
|
|
572
|
+
return new this({
|
|
573
|
+
nodeId: ctx.sourceNodeId,
|
|
574
|
+
groupId,
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
groupId;
|
|
578
|
+
serialize(ctx) {
|
|
579
|
+
this.payload = Bytes.from([this.groupId]);
|
|
580
|
+
return super.serialize(ctx);
|
|
581
|
+
}
|
|
582
|
+
toLogEntry(ctx) {
|
|
583
|
+
return {
|
|
584
|
+
...super.toLogEntry(ctx),
|
|
585
|
+
message: { "group id": this.groupId },
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
return AssociationGroupInfoCCNameGet = _classThis;
|
|
590
|
+
})();
|
|
515
591
|
export { AssociationGroupInfoCCNameGet };
|
|
516
|
-
let AssociationGroupInfoCCInfoReport =
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
592
|
+
let AssociationGroupInfoCCInfoReport = (() => {
|
|
593
|
+
let _classDecorators = [CCCommand(AssociationGroupInfoCommand.InfoReport), ccValueProperty("hasDynamicInfo", AssociationGroupInfoCCValues.hasDynamicInfo)];
|
|
594
|
+
let _classDescriptor;
|
|
595
|
+
let _classExtraInitializers = [];
|
|
596
|
+
let _classThis;
|
|
597
|
+
let _classSuper = AssociationGroupInfoCC;
|
|
598
|
+
var AssociationGroupInfoCCInfoReport = class extends _classSuper {
|
|
599
|
+
static { _classThis = this; }
|
|
600
|
+
static {
|
|
601
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
602
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
603
|
+
AssociationGroupInfoCCInfoReport = _classThis = _classDescriptor.value;
|
|
604
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
605
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
606
|
+
}
|
|
607
|
+
constructor(options) {
|
|
608
|
+
super(options);
|
|
609
|
+
this.isListMode = options.isListMode;
|
|
610
|
+
this.hasDynamicInfo = options.hasDynamicInfo;
|
|
611
|
+
this.groups = options.groups;
|
|
612
|
+
}
|
|
613
|
+
static from(raw, ctx) {
|
|
614
|
+
validatePayload(raw.payload.length >= 1);
|
|
615
|
+
const isListMode = !!(raw.payload[0] & 0b1000_0000);
|
|
616
|
+
const hasDynamicInfo = !!(raw.payload[0] & 0b0100_0000);
|
|
617
|
+
const groupCount = raw.payload[0] & 0b0011_1111;
|
|
618
|
+
// each group requires 7 bytes of payload
|
|
619
|
+
validatePayload(raw.payload.length >= 1 + groupCount * 7);
|
|
620
|
+
const groups = [];
|
|
621
|
+
for (let i = 0; i < groupCount; i++) {
|
|
622
|
+
const offset = 1 + i * 7;
|
|
623
|
+
// Parse the payload
|
|
624
|
+
const groupBytes = raw.payload.subarray(offset, offset + 7);
|
|
625
|
+
const groupId = groupBytes[0];
|
|
626
|
+
const mode = 0; // groupBytes[1];
|
|
627
|
+
const profile = groupBytes.readUInt16BE(2);
|
|
628
|
+
const eventCode = 0; // groupBytes.readUInt16BE(5);
|
|
629
|
+
groups.push({ groupId, mode, profile, eventCode });
|
|
630
|
+
}
|
|
631
|
+
return new this({
|
|
632
|
+
nodeId: ctx.sourceNodeId,
|
|
633
|
+
isListMode,
|
|
634
|
+
hasDynamicInfo,
|
|
635
|
+
groups,
|
|
560
636
|
});
|
|
561
637
|
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
638
|
+
isListMode;
|
|
639
|
+
hasDynamicInfo;
|
|
640
|
+
groups;
|
|
641
|
+
persistValues(ctx) {
|
|
642
|
+
if (!super.persistValues(ctx))
|
|
643
|
+
return false;
|
|
644
|
+
for (const group of this.groups) {
|
|
645
|
+
const { groupId, mode, profile, eventCode } = group;
|
|
646
|
+
this.setValue(ctx, AssociationGroupInfoCCValues.groupInfo(groupId), {
|
|
647
|
+
mode,
|
|
648
|
+
profile,
|
|
649
|
+
eventCode,
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
return true;
|
|
653
|
+
}
|
|
654
|
+
serialize(ctx) {
|
|
655
|
+
this.payload = Bytes.alloc(1 + this.groups.length * 7, 0);
|
|
656
|
+
this.payload[0] = (this.isListMode ? 0b1000_0000 : 0)
|
|
657
|
+
| (this.hasDynamicInfo ? 0b0100_0000 : 0)
|
|
658
|
+
| (this.groups.length & 0b0011_1111);
|
|
659
|
+
for (let i = 0; i < this.groups.length; i++) {
|
|
660
|
+
const offset = 1 + i * 7;
|
|
661
|
+
this.payload[offset] = this.groups[i].groupId;
|
|
662
|
+
this.payload.writeUInt16BE(this.groups[i].profile, offset + 2);
|
|
663
|
+
// The remaining bytes are zero
|
|
664
|
+
}
|
|
665
|
+
return super.serialize(ctx);
|
|
666
|
+
}
|
|
667
|
+
toLogEntry(ctx) {
|
|
668
|
+
return {
|
|
669
|
+
...super.toLogEntry(ctx),
|
|
670
|
+
message: {
|
|
671
|
+
"is list mode": this.isListMode,
|
|
672
|
+
"has dynamic info": this.hasDynamicInfo,
|
|
673
|
+
groups: `${this.groups
|
|
674
|
+
.map((g) => `
|
|
585
675
|
· Group #${g.groupId}
|
|
586
676
|
mode: ${g.mode}
|
|
587
677
|
profile: ${g.profile}
|
|
588
678
|
event code: ${g.eventCode}`)
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
};
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
], AssociationGroupInfoCCInfoReport.prototype, "hasDynamicInfo", void 0);
|
|
597
|
-
AssociationGroupInfoCCInfoReport = AssociationGroupInfoCCInfoReport_1 = __decorate([
|
|
598
|
-
CCCommand(AssociationGroupInfoCommand.InfoReport)
|
|
599
|
-
], AssociationGroupInfoCCInfoReport);
|
|
679
|
+
.join("")}`,
|
|
680
|
+
},
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
};
|
|
684
|
+
return AssociationGroupInfoCCInfoReport = _classThis;
|
|
685
|
+
})();
|
|
600
686
|
export { AssociationGroupInfoCCInfoReport };
|
|
601
|
-
let AssociationGroupInfoCCInfoGet =
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
687
|
+
let AssociationGroupInfoCCInfoGet = (() => {
|
|
688
|
+
let _classDecorators = [CCCommand(AssociationGroupInfoCommand.InfoGet), expectedCCResponse(AssociationGroupInfoCCInfoReport)];
|
|
689
|
+
let _classDescriptor;
|
|
690
|
+
let _classExtraInitializers = [];
|
|
691
|
+
let _classThis;
|
|
692
|
+
let _classSuper = AssociationGroupInfoCC;
|
|
693
|
+
var AssociationGroupInfoCCInfoGet = class extends _classSuper {
|
|
694
|
+
static { _classThis = this; }
|
|
695
|
+
static {
|
|
696
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
697
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
698
|
+
AssociationGroupInfoCCInfoGet = _classThis = _classDescriptor.value;
|
|
699
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
700
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
701
|
+
}
|
|
702
|
+
constructor(options) {
|
|
703
|
+
super(options);
|
|
704
|
+
this.refreshCache = options.refreshCache;
|
|
705
|
+
if ("listMode" in options)
|
|
706
|
+
this.listMode = options.listMode;
|
|
707
|
+
if ("groupId" in options)
|
|
708
|
+
this.groupId = options.groupId;
|
|
709
|
+
}
|
|
710
|
+
static from(raw, ctx) {
|
|
711
|
+
validatePayload(raw.payload.length >= 2);
|
|
712
|
+
const optionByte = raw.payload[0];
|
|
713
|
+
const refreshCache = !!(optionByte & 0b1000_0000);
|
|
714
|
+
const listMode = !!(optionByte & 0b0100_0000);
|
|
715
|
+
let groupId;
|
|
716
|
+
if (!listMode) {
|
|
717
|
+
groupId = raw.payload[1];
|
|
718
|
+
}
|
|
719
|
+
return new this({
|
|
720
|
+
nodeId: ctx.sourceNodeId,
|
|
721
|
+
refreshCache,
|
|
722
|
+
listMode,
|
|
723
|
+
groupId,
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
refreshCache;
|
|
727
|
+
listMode;
|
|
728
|
+
groupId;
|
|
729
|
+
serialize(ctx) {
|
|
730
|
+
const isListMode = this.listMode === true;
|
|
731
|
+
const optionByte = (this.refreshCache ? 0b1000_0000 : 0)
|
|
732
|
+
| (isListMode ? 0b0100_0000 : 0);
|
|
733
|
+
this.payload = Bytes.from([
|
|
734
|
+
optionByte,
|
|
735
|
+
isListMode ? 0 : this.groupId,
|
|
736
|
+
]);
|
|
737
|
+
return super.serialize(ctx);
|
|
738
|
+
}
|
|
739
|
+
toLogEntry(ctx) {
|
|
740
|
+
const message = {};
|
|
741
|
+
if (this.groupId != undefined) {
|
|
742
|
+
message["group id"] = this.groupId;
|
|
743
|
+
}
|
|
744
|
+
if (this.listMode != undefined) {
|
|
745
|
+
message["list mode"] = this.listMode;
|
|
746
|
+
}
|
|
747
|
+
message["refresh cache"] = this.refreshCache;
|
|
748
|
+
return {
|
|
749
|
+
...super.toLogEntry(ctx),
|
|
750
|
+
message,
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
return AssociationGroupInfoCCInfoGet = _classThis;
|
|
755
|
+
})();
|
|
658
756
|
export { AssociationGroupInfoCCInfoGet };
|
|
659
|
-
let AssociationGroupInfoCCCommandListReport =
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
commands
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
let offset = 2;
|
|
696
|
-
for (const [ccId, commands] of this.commands) {
|
|
697
|
-
for (const command of commands) {
|
|
698
|
-
offset += encodeCCId(ccId, this.payload, offset);
|
|
699
|
-
this.payload[offset] = command;
|
|
700
|
-
offset++;
|
|
757
|
+
let AssociationGroupInfoCCCommandListReport = (() => {
|
|
758
|
+
let _classDecorators = [CCCommand(AssociationGroupInfoCommand.CommandListReport), ccValueProperty("commands", AssociationGroupInfoCCValues.commands, (self) => [self.groupId])];
|
|
759
|
+
let _classDescriptor;
|
|
760
|
+
let _classExtraInitializers = [];
|
|
761
|
+
let _classThis;
|
|
762
|
+
let _classSuper = AssociationGroupInfoCC;
|
|
763
|
+
var AssociationGroupInfoCCCommandListReport = class extends _classSuper {
|
|
764
|
+
static { _classThis = this; }
|
|
765
|
+
static {
|
|
766
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
767
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
768
|
+
AssociationGroupInfoCCCommandListReport = _classThis = _classDescriptor.value;
|
|
769
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
770
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
771
|
+
}
|
|
772
|
+
constructor(options) {
|
|
773
|
+
super(options);
|
|
774
|
+
this.groupId = options.groupId;
|
|
775
|
+
this.commands = options.commands;
|
|
776
|
+
}
|
|
777
|
+
static from(raw, ctx) {
|
|
778
|
+
validatePayload(raw.payload.length >= 2);
|
|
779
|
+
const groupId = raw.payload[0];
|
|
780
|
+
const listLength = raw.payload[1];
|
|
781
|
+
validatePayload(raw.payload.length >= 2 + listLength);
|
|
782
|
+
const listBytes = raw.payload.subarray(2, 2 + listLength);
|
|
783
|
+
// Parse all CC ids and commands
|
|
784
|
+
let offset = 0;
|
|
785
|
+
const commands = new Map();
|
|
786
|
+
while (offset < listLength) {
|
|
787
|
+
const { ccId, bytesRead } = parseCCId(listBytes, offset);
|
|
788
|
+
const command = listBytes[offset + bytesRead];
|
|
789
|
+
if (!commands.has(ccId))
|
|
790
|
+
commands.set(ccId, []);
|
|
791
|
+
commands.get(ccId).push(command);
|
|
792
|
+
offset += bytesRead + 1;
|
|
701
793
|
}
|
|
794
|
+
return new this({
|
|
795
|
+
nodeId: ctx.sourceNodeId,
|
|
796
|
+
groupId,
|
|
797
|
+
commands,
|
|
798
|
+
});
|
|
702
799
|
}
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
800
|
+
groupId;
|
|
801
|
+
commands;
|
|
802
|
+
serialize(ctx) {
|
|
803
|
+
// To make it easier to encode possible extended CCs, we first
|
|
804
|
+
// allocate as much space as we may need, then trim it again
|
|
805
|
+
this.payload = new Bytes(2 + this.commands.size * 3);
|
|
806
|
+
this.payload[0] = this.groupId;
|
|
807
|
+
let offset = 2;
|
|
808
|
+
for (const [ccId, commands] of this.commands) {
|
|
809
|
+
for (const command of commands) {
|
|
810
|
+
offset += encodeCCId(ccId, this.payload, offset);
|
|
811
|
+
this.payload[offset] = command;
|
|
812
|
+
offset++;
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
this.payload[1] = offset - 2; // list length
|
|
816
|
+
return super.serialize(ctx);
|
|
817
|
+
}
|
|
818
|
+
toLogEntry(ctx) {
|
|
819
|
+
return {
|
|
820
|
+
...super.toLogEntry(ctx),
|
|
821
|
+
message: {
|
|
822
|
+
"group id": this.groupId,
|
|
823
|
+
commands: `${[...this.commands]
|
|
824
|
+
.map(([cc, cmds]) => {
|
|
825
|
+
return `\n· ${getCCName(cc)}: ${cmds
|
|
826
|
+
.map((cmd) => num2hex(cmd))
|
|
827
|
+
.join(", ")}`;
|
|
828
|
+
})
|
|
829
|
+
.join("")}`,
|
|
830
|
+
},
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
};
|
|
834
|
+
return AssociationGroupInfoCCCommandListReport = _classThis;
|
|
835
|
+
})();
|
|
728
836
|
export { AssociationGroupInfoCCCommandListReport };
|
|
729
|
-
let AssociationGroupInfoCCCommandListGet =
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
837
|
+
let AssociationGroupInfoCCCommandListGet = (() => {
|
|
838
|
+
let _classDecorators = [CCCommand(AssociationGroupInfoCommand.CommandListGet), expectedCCResponse(AssociationGroupInfoCCCommandListReport)];
|
|
839
|
+
let _classDescriptor;
|
|
840
|
+
let _classExtraInitializers = [];
|
|
841
|
+
let _classThis;
|
|
842
|
+
let _classSuper = AssociationGroupInfoCC;
|
|
843
|
+
var AssociationGroupInfoCCCommandListGet = class extends _classSuper {
|
|
844
|
+
static { _classThis = this; }
|
|
845
|
+
static {
|
|
846
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
847
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
848
|
+
AssociationGroupInfoCCCommandListGet = _classThis = _classDescriptor.value;
|
|
849
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
850
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
851
|
+
}
|
|
852
|
+
constructor(options) {
|
|
853
|
+
super(options);
|
|
854
|
+
this.allowCache = options.allowCache;
|
|
855
|
+
this.groupId = options.groupId;
|
|
856
|
+
}
|
|
857
|
+
static from(raw, ctx) {
|
|
858
|
+
validatePayload(raw.payload.length >= 2);
|
|
859
|
+
const allowCache = !!(raw.payload[0] & 0b1000_0000);
|
|
860
|
+
const groupId = raw.payload[1];
|
|
861
|
+
return new this({
|
|
862
|
+
nodeId: ctx.sourceNodeId,
|
|
863
|
+
allowCache,
|
|
864
|
+
groupId,
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
allowCache;
|
|
868
|
+
groupId;
|
|
869
|
+
serialize(ctx) {
|
|
870
|
+
this.payload = Bytes.from([
|
|
871
|
+
this.allowCache ? 0b1000_0000 : 0,
|
|
872
|
+
this.groupId,
|
|
873
|
+
]);
|
|
874
|
+
return super.serialize(ctx);
|
|
875
|
+
}
|
|
876
|
+
toLogEntry(ctx) {
|
|
877
|
+
return {
|
|
878
|
+
...super.toLogEntry(ctx),
|
|
879
|
+
message: {
|
|
880
|
+
"group id": this.groupId,
|
|
881
|
+
"allow cache": this.allowCache,
|
|
882
|
+
},
|
|
883
|
+
};
|
|
884
|
+
}
|
|
885
|
+
};
|
|
886
|
+
return AssociationGroupInfoCCCommandListGet = _classThis;
|
|
887
|
+
})();
|
|
768
888
|
export { AssociationGroupInfoCCCommandListGet };
|
|
769
889
|
//# sourceMappingURL=AssociationGroupInfoCC.js.map
|