@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
|
@@ -29,13 +29,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
29
29
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
30
30
|
var import_ManufacturerSpecificCC = require("./ManufacturerSpecificCC.js");
|
|
31
31
|
var import_Decorators = require("./manufacturerProprietary/Decorators.js");
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
33
|
+
function accept(f) {
|
|
34
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
35
|
+
return f;
|
|
36
|
+
}
|
|
37
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
38
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
39
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
40
|
+
var _, done = false;
|
|
41
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
42
|
+
var context = {};
|
|
43
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
44
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
45
|
+
context.addInitializer = function(f) {
|
|
46
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
47
|
+
extraInitializers.push(accept(f || null));
|
|
48
|
+
};
|
|
49
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
50
|
+
if (kind === "accessor") {
|
|
51
|
+
if (result === void 0) continue;
|
|
52
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
53
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
54
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
55
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
56
|
+
} else if (_ = accept(result)) {
|
|
57
|
+
if (kind === "field") initializers.unshift(_);
|
|
58
|
+
else descriptor[key] = _;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
62
|
+
done = true;
|
|
63
|
+
};
|
|
64
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
65
|
+
var useValue = arguments.length > 2;
|
|
66
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
67
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
68
|
+
}
|
|
69
|
+
return useValue ? value : void 0;
|
|
37
70
|
};
|
|
38
|
-
var ManufacturerProprietaryCC_1;
|
|
39
71
|
function __assertType(argName, typeName, boundHasError) {
|
|
40
72
|
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
41
73
|
if (boundHasError()) {
|
|
@@ -62,145 +94,173 @@ const __assertType__optional_Uint8Array = ($o) => {
|
|
|
62
94
|
}
|
|
63
95
|
return optional__uint8array($o);
|
|
64
96
|
};
|
|
65
|
-
let ManufacturerProprietaryCCAPI =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
97
|
+
let ManufacturerProprietaryCCAPI = (() => {
|
|
98
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Manufacturer Proprietary"])];
|
|
99
|
+
let _classDescriptor;
|
|
100
|
+
let _classExtraInitializers = [];
|
|
101
|
+
let _classThis;
|
|
102
|
+
let _classSuper = import_API.CCAPI;
|
|
103
|
+
var ManufacturerProprietaryCCAPI2 = class extends _classSuper {
|
|
104
|
+
static {
|
|
105
|
+
_classThis = this;
|
|
106
|
+
}
|
|
107
|
+
static {
|
|
108
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
109
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
110
|
+
ManufacturerProprietaryCCAPI2 = _classThis = _classDescriptor.value;
|
|
111
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
112
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
113
|
+
}
|
|
114
|
+
constructor(host, endpoint) {
|
|
115
|
+
super(host, endpoint);
|
|
116
|
+
const manufacturerId = this.getValueDB().getValue(import_ManufacturerSpecificCC.ManufacturerSpecificCCValues.manufacturerId.id);
|
|
117
|
+
if (manufacturerId != void 0) {
|
|
118
|
+
const SpecificAPIConstructor = (0, import_Decorators.getManufacturerProprietaryAPI)(manufacturerId);
|
|
119
|
+
if (SpecificAPIConstructor != void 0 && new.target !== SpecificAPIConstructor) {
|
|
120
|
+
return new SpecificAPIConstructor(host, endpoint);
|
|
121
|
+
}
|
|
73
122
|
}
|
|
74
123
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
await this.host.sendCommand(cc, this.commandOptions);
|
|
86
|
-
}
|
|
87
|
-
async sendAndReceiveData(manufacturerId, data) {
|
|
88
|
-
__assertType("manufacturerId", "number", __assertType__number.bind(void 0, manufacturerId));
|
|
89
|
-
__assertType("data", "(optional) Uint8Array", __assertType__optional_Uint8Array.bind(void 0, data));
|
|
90
|
-
const cc = new ManufacturerProprietaryCC({
|
|
91
|
-
nodeId: this.endpoint.nodeId,
|
|
92
|
-
endpointIndex: this.endpoint.index,
|
|
93
|
-
manufacturerId,
|
|
94
|
-
unspecifiedExpectsResponse: true
|
|
95
|
-
});
|
|
96
|
-
cc.payload = data ? import_safe2.Bytes.view(data) : new import_safe2.Bytes();
|
|
97
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
98
|
-
if (response) {
|
|
99
|
-
return {
|
|
100
|
-
manufacturerId: response.manufacturerId,
|
|
101
|
-
data: response.payload
|
|
102
|
-
};
|
|
124
|
+
async sendData(manufacturerId, data) {
|
|
125
|
+
__assertType("manufacturerId", "number", __assertType__number.bind(void 0, manufacturerId));
|
|
126
|
+
__assertType("data", "(optional) Uint8Array", __assertType__optional_Uint8Array.bind(void 0, data));
|
|
127
|
+
const cc = new ManufacturerProprietaryCC({
|
|
128
|
+
nodeId: this.endpoint.nodeId,
|
|
129
|
+
endpointIndex: this.endpoint.index,
|
|
130
|
+
manufacturerId
|
|
131
|
+
});
|
|
132
|
+
cc.payload = data ? import_safe2.Bytes.view(data) : new import_safe2.Bytes();
|
|
133
|
+
await this.host.sendCommand(cc, this.commandOptions);
|
|
103
134
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
135
|
+
async sendAndReceiveData(manufacturerId, data) {
|
|
136
|
+
__assertType("manufacturerId", "number", __assertType__number.bind(void 0, manufacturerId));
|
|
137
|
+
__assertType("data", "(optional) Uint8Array", __assertType__optional_Uint8Array.bind(void 0, data));
|
|
138
|
+
const cc = new ManufacturerProprietaryCC({
|
|
139
|
+
nodeId: this.endpoint.nodeId,
|
|
140
|
+
endpointIndex: this.endpoint.index,
|
|
141
|
+
manufacturerId,
|
|
142
|
+
unspecifiedExpectsResponse: true
|
|
143
|
+
});
|
|
144
|
+
cc.payload = data ? import_safe2.Bytes.view(data) : new import_safe2.Bytes();
|
|
145
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
146
|
+
if (response) {
|
|
147
|
+
return {
|
|
148
|
+
manufacturerId: response.manufacturerId,
|
|
149
|
+
data: response.payload
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
return ManufacturerProprietaryCCAPI2 = _classThis;
|
|
155
|
+
})();
|
|
109
156
|
function getReponseForManufacturerProprietary(cc) {
|
|
110
157
|
return cc.unspecifiedExpectsResponse ? ManufacturerProprietaryCC : void 0;
|
|
111
158
|
}
|
|
112
159
|
function testResponseForManufacturerProprietaryRequest(sent, received) {
|
|
113
160
|
return sent.manufacturerId === received.manufacturerId;
|
|
114
161
|
}
|
|
115
|
-
let ManufacturerProprietaryCC =
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (this.manufacturerId == void 0) {
|
|
142
|
-
throw new import_safe.ZWaveError(`To use an instance of ManufacturerProprietaryCC, the manufacturer ID must be stored in the value DB`, import_safe.ZWaveErrorCodes.ManufacturerProprietaryCC_NoManufacturerId);
|
|
143
|
-
}
|
|
144
|
-
return this.manufacturerId;
|
|
145
|
-
}
|
|
146
|
-
serialize(ctx) {
|
|
147
|
-
const manufacturerId = this.getManufacturerIdOrThrow();
|
|
148
|
-
this.ccCommand = manufacturerId >>> 8 & 255;
|
|
149
|
-
this.payload = import_safe2.Bytes.concat([
|
|
150
|
-
import_safe2.Bytes.from([
|
|
151
|
-
// 2nd byte of manufacturerId
|
|
152
|
-
manufacturerId & 255
|
|
153
|
-
]),
|
|
154
|
-
this.payload
|
|
155
|
-
]);
|
|
156
|
-
return super.serialize(ctx);
|
|
157
|
-
}
|
|
158
|
-
createSpecificInstance() {
|
|
159
|
-
if (this.manufacturerId != void 0) {
|
|
160
|
-
const PCConstructor = (0, import_Decorators.getManufacturerProprietaryCCConstructor)(this.manufacturerId);
|
|
162
|
+
let ManufacturerProprietaryCC = (() => {
|
|
163
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Manufacturer Proprietary"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.expectedCCResponse)(getReponseForManufacturerProprietary, testResponseForManufacturerProprietaryRequest)];
|
|
164
|
+
let _classDescriptor;
|
|
165
|
+
let _classExtraInitializers = [];
|
|
166
|
+
let _classThis;
|
|
167
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
168
|
+
var ManufacturerProprietaryCC2 = class extends _classSuper {
|
|
169
|
+
static {
|
|
170
|
+
_classThis = this;
|
|
171
|
+
}
|
|
172
|
+
static {
|
|
173
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
174
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
175
|
+
ManufacturerProprietaryCC2 = _classThis = _classDescriptor.value;
|
|
176
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
177
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
178
|
+
}
|
|
179
|
+
constructor(options) {
|
|
180
|
+
super(options);
|
|
181
|
+
this.manufacturerId = options.manufacturerId ?? (0, import_Decorators.getManufacturerId)(this);
|
|
182
|
+
this.unspecifiedExpectsResponse = options.unspecifiedExpectsResponse;
|
|
183
|
+
}
|
|
184
|
+
static from(raw, ctx) {
|
|
185
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
186
|
+
const manufacturerId = raw.payload.readUInt16BE(0);
|
|
187
|
+
const PCConstructor = (0, import_Decorators.getManufacturerProprietaryCCConstructor)(manufacturerId);
|
|
161
188
|
if (PCConstructor) {
|
|
162
|
-
return
|
|
163
|
-
nodeId: this.nodeId,
|
|
164
|
-
endpoint: this.endpointIndex
|
|
165
|
-
});
|
|
189
|
+
return PCConstructor.from(raw.withPayload(raw.payload.subarray(2)), ctx);
|
|
166
190
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
const node = this.getNode(ctx);
|
|
171
|
-
this.manufacturerId = this.getValue(ctx, import_ManufacturerSpecificCC.ManufacturerSpecificCCValues.manufacturerId);
|
|
172
|
-
const pcInstance = this.createSpecificInstance();
|
|
173
|
-
if (pcInstance) {
|
|
174
|
-
await pcInstance.interview(ctx);
|
|
175
|
-
} else {
|
|
176
|
-
ctx.logNode(node.id, {
|
|
177
|
-
message: `${this.constructor.name}: skipping interview refresh because the matching proprietary CC is not implemented...`,
|
|
178
|
-
direction: "none"
|
|
191
|
+
return new ManufacturerProprietaryCC2({
|
|
192
|
+
nodeId: ctx.sourceNodeId,
|
|
193
|
+
manufacturerId
|
|
179
194
|
});
|
|
180
195
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
196
|
+
manufacturerId;
|
|
197
|
+
/**
|
|
198
|
+
* @internal
|
|
199
|
+
* This is used to indicate that an unspecified Manufacturer Proprietary CC instance expects a response.
|
|
200
|
+
* Subclasses should roll their own `@expectedCCResponse` instead.
|
|
201
|
+
*/
|
|
202
|
+
unspecifiedExpectsResponse;
|
|
203
|
+
getManufacturerIdOrThrow() {
|
|
204
|
+
if (this.manufacturerId == void 0) {
|
|
205
|
+
throw new import_safe.ZWaveError(`To use an instance of ManufacturerProprietaryCC, the manufacturer ID must be stored in the value DB`, import_safe.ZWaveErrorCodes.ManufacturerProprietaryCC_NoManufacturerId);
|
|
206
|
+
}
|
|
207
|
+
return this.manufacturerId;
|
|
208
|
+
}
|
|
209
|
+
serialize(ctx) {
|
|
210
|
+
const manufacturerId = this.getManufacturerIdOrThrow();
|
|
211
|
+
this.ccCommand = manufacturerId >>> 8 & 255;
|
|
212
|
+
this.payload = import_safe2.Bytes.concat([
|
|
213
|
+
import_safe2.Bytes.from([
|
|
214
|
+
// 2nd byte of manufacturerId
|
|
215
|
+
manufacturerId & 255
|
|
216
|
+
]),
|
|
217
|
+
this.payload
|
|
218
|
+
]);
|
|
219
|
+
return super.serialize(ctx);
|
|
220
|
+
}
|
|
221
|
+
createSpecificInstance() {
|
|
222
|
+
if (this.manufacturerId != void 0) {
|
|
223
|
+
const PCConstructor = (0, import_Decorators.getManufacturerProprietaryCCConstructor)(this.manufacturerId);
|
|
224
|
+
if (PCConstructor) {
|
|
225
|
+
return new PCConstructor({
|
|
226
|
+
nodeId: this.nodeId,
|
|
227
|
+
endpoint: this.endpointIndex
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
async interview(ctx) {
|
|
233
|
+
const node = this.getNode(ctx);
|
|
186
234
|
this.manufacturerId = this.getValue(ctx, import_ManufacturerSpecificCC.ManufacturerSpecificCCValues.manufacturerId);
|
|
235
|
+
const pcInstance = this.createSpecificInstance();
|
|
236
|
+
if (pcInstance) {
|
|
237
|
+
await pcInstance.interview(ctx);
|
|
238
|
+
} else {
|
|
239
|
+
ctx.logNode(node.id, {
|
|
240
|
+
message: `${this.constructor.name}: skipping interview refresh because the matching proprietary CC is not implemented...`,
|
|
241
|
+
direction: "none"
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
this.setInterviewComplete(ctx, true);
|
|
187
245
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
246
|
+
async refreshValues(ctx) {
|
|
247
|
+
const node = this.getNode(ctx);
|
|
248
|
+
if (this.manufacturerId == void 0) {
|
|
249
|
+
this.manufacturerId = this.getValue(ctx, import_ManufacturerSpecificCC.ManufacturerSpecificCCValues.manufacturerId);
|
|
250
|
+
}
|
|
251
|
+
const pcInstance = this.createSpecificInstance();
|
|
252
|
+
if (pcInstance) {
|
|
253
|
+
await pcInstance.refreshValues(ctx);
|
|
254
|
+
} else {
|
|
255
|
+
ctx.logNode(node.id, {
|
|
256
|
+
message: `${this.constructor.name}: skipping value refresh because the matching proprietary CC is not implemented...`,
|
|
257
|
+
direction: "none"
|
|
258
|
+
});
|
|
259
|
+
}
|
|
196
260
|
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Manufacturer Proprietary"]),
|
|
201
|
-
(0, import_CommandClassDecorators.implementedVersion)(1),
|
|
202
|
-
(0, import_CommandClassDecorators.expectedCCResponse)(getReponseForManufacturerProprietary, testResponseForManufacturerProprietaryRequest)
|
|
203
|
-
], ManufacturerProprietaryCC);
|
|
261
|
+
};
|
|
262
|
+
return ManufacturerProprietaryCC2 = _classThis;
|
|
263
|
+
})();
|
|
204
264
|
// Annotate the CommonJS export names for ESM import in node:
|
|
205
265
|
0 && (module.exports = {
|
|
206
266
|
ManufacturerProprietaryCC,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/ManufacturerProprietaryCC.ts"],
|
|
4
4
|
"sourcesContent": ["import {\n\tCommandClasses,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type { CCEncodingContext, CCParsingContext } from \"@zwave-js/host/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport { CCAPI, type CCAPIEndpoint, type CCAPIHost } from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\nimport { ManufacturerSpecificCCValues } from \"./ManufacturerSpecificCC.js\";\nimport {\n\tgetManufacturerId,\n\tgetManufacturerProprietaryAPI,\n\tgetManufacturerProprietaryCCConstructor,\n} from \"./manufacturerProprietary/Decorators.js\";\n\nexport type ManufacturerProprietaryCCConstructor<\n\tT extends typeof ManufacturerProprietaryCC =\n\t\ttypeof ManufacturerProprietaryCC,\n> = T & {\n\t// I don't like the any, but we need it to support half-implemented CCs (e.g. report classes)\n\tnew (options: any): InstanceType<T>;\n};\n\n@API(CommandClasses[\"Manufacturer Proprietary\"])\nexport class ManufacturerProprietaryCCAPI extends CCAPI {\n\tpublic constructor(\n\t\thost: CCAPIHost,\n\t\tendpoint: CCAPIEndpoint,\n\t) {\n\t\tsuper(host, endpoint);\n\n\t\t// Read the manufacturer ID from Manufacturer Specific CC\n\t\tconst manufacturerId = this.getValueDB().getValue<number>(\n\t\t\tManufacturerSpecificCCValues.manufacturerId.id,\n\t\t);\n\t\t// If possible, try to defer to a specific subclass of this API\n\t\tif (manufacturerId != undefined) {\n\t\t\tconst SpecificAPIConstructor = getManufacturerProprietaryAPI(\n\t\t\t\tmanufacturerId,\n\t\t\t);\n\t\t\tif (\n\t\t\t\tSpecificAPIConstructor != undefined\n\t\t\t\t&& new.target !== SpecificAPIConstructor\n\t\t\t) {\n\t\t\t\treturn new SpecificAPIConstructor(host, endpoint);\n\t\t\t}\n\t\t}\n\t}\n\n\t@validateArgs()\n\tpublic async sendData(\n\t\tmanufacturerId: number,\n\t\tdata?: Uint8Array,\n\t): Promise<void> {\n\t\tconst cc = new ManufacturerProprietaryCC({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tmanufacturerId,\n\t\t});\n\t\tcc.payload = data ? Bytes.view(data) : new Bytes();\n\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs()\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async sendAndReceiveData(manufacturerId: number, data?: Uint8Array) {\n\t\tconst cc = new ManufacturerProprietaryCC({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tmanufacturerId,\n\t\t\tunspecifiedExpectsResponse: true,\n\t\t});\n\t\tcc.payload = data ? Bytes.view(data) : new Bytes();\n\n\t\tconst response = await this.host.sendCommand<\n\t\t\tManufacturerProprietaryCC\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn {\n\t\t\t\tmanufacturerId: response.manufacturerId,\n\t\t\t\tdata: response.payload,\n\t\t\t};\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ManufacturerProprietaryCCOptions {\n\tmanufacturerId?: number;\n\tunspecifiedExpectsResponse?: boolean;\n}\n\nfunction getReponseForManufacturerProprietary(cc: ManufacturerProprietaryCC) {\n\treturn cc.unspecifiedExpectsResponse\n\t\t? ManufacturerProprietaryCC\n\t\t: undefined;\n}\n\nfunction testResponseForManufacturerProprietaryRequest(\n\tsent: ManufacturerProprietaryCC,\n\treceived: ManufacturerProprietaryCC,\n): boolean {\n\t// We expect a Manufacturer Proprietary response that has the same manufacturer ID as the request\n\treturn sent.manufacturerId === received.manufacturerId;\n}\n\n@commandClass(CommandClasses[\"Manufacturer Proprietary\"])\n@implementedVersion(1)\n@expectedCCResponse(\n\tgetReponseForManufacturerProprietary,\n\ttestResponseForManufacturerProprietaryRequest,\n)\nexport class ManufacturerProprietaryCC extends CommandClass {\n\tdeclare ccCommand: undefined;\n\n\tpublic constructor(\n\t\toptions: WithAddress<ManufacturerProprietaryCCOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.manufacturerId = options.manufacturerId\n\t\t\t?? getManufacturerId(this);\n\t\tthis.unspecifiedExpectsResponse = options.unspecifiedExpectsResponse;\n\n\t\t// To use this CC, a manufacturer ID must exist in the value DB\n\t\t// If it doesn't, the interview procedure will throw.\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ManufacturerProprietaryCC {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst manufacturerId = raw.payload.readUInt16BE(0);\n\t\t// Try to parse the proprietary command\n\t\tconst PCConstructor = getManufacturerProprietaryCCConstructor(\n\t\t\tmanufacturerId,\n\t\t);\n\t\tif (PCConstructor) {\n\t\t\treturn PCConstructor.from(\n\t\t\t\traw.withPayload(raw.payload.subarray(2)),\n\t\t\t\tctx,\n\t\t\t);\n\t\t}\n\n\t\treturn new ManufacturerProprietaryCC({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tmanufacturerId,\n\t\t});\n\t}\n\n\tpublic manufacturerId?: number;\n\n\t/**\n\t * @internal\n\t * This is used to indicate that an unspecified Manufacturer Proprietary CC instance expects a response.\n\t * Subclasses should roll their own `@expectedCCResponse` instead.\n\t */\n\tpublic readonly unspecifiedExpectsResponse?: boolean;\n\n\tprivate getManufacturerIdOrThrow(): number {\n\t\tif (this.manufacturerId == undefined) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`To use an instance of ManufacturerProprietaryCC, the manufacturer ID must be stored in the value DB`,\n\t\t\t\tZWaveErrorCodes.ManufacturerProprietaryCC_NoManufacturerId,\n\t\t\t);\n\t\t}\n\t\treturn this.manufacturerId;\n\t}\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tconst manufacturerId = this.getManufacturerIdOrThrow();\n\t\t// ManufacturerProprietaryCC has no CC command, so the first byte\n\t\t// is stored in ccCommand\n\t\t(this.ccCommand as unknown as number) = (manufacturerId >>> 8) & 0xff;\n\t\t// The 2nd byte is in the payload\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([\n\t\t\t\t// 2nd byte of manufacturerId\n\t\t\t\tmanufacturerId & 0xff,\n\t\t\t]),\n\t\t\tthis.payload,\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic createSpecificInstance(): ManufacturerProprietaryCC | undefined {\n\t\t// Try to defer to the correct subclass\n\t\tif (this.manufacturerId != undefined) {\n\t\t\tconst PCConstructor = getManufacturerProprietaryCCConstructor(\n\t\t\t\tthis.manufacturerId,\n\t\t\t);\n\t\t\tif (PCConstructor) {\n\t\t\t\treturn new PCConstructor({\n\t\t\t\t\tnodeId: this.nodeId,\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\n\t\t// Read the manufacturer ID from Manufacturer Specific CC\n\t\tthis.manufacturerId = this.getValue(\n\t\t\tctx,\n\t\t\tManufacturerSpecificCCValues.manufacturerId,\n\t\t)!;\n\t\tconst pcInstance = this.createSpecificInstance();\n\t\tif (pcInstance) {\n\t\t\tawait pcInstance.interview(ctx);\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage:\n\t\t\t\t\t`${this.constructor.name}: skipping interview refresh because the matching proprietary CC is not implemented...`,\n\t\t\t\tdirection: \"none\",\n\t\t\t});\n\t\t}\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\n\t\tif (this.manufacturerId == undefined) {\n\t\t\t// Read the manufacturer ID from Manufacturer Specific CC\n\t\t\tthis.manufacturerId = this.getValue(\n\t\t\t\tctx,\n\t\t\t\tManufacturerSpecificCCValues.manufacturerId,\n\t\t\t)!;\n\t\t}\n\t\tconst pcInstance = this.createSpecificInstance();\n\t\tif (pcInstance) {\n\t\t\tawait pcInstance.refreshValues(ctx);\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage:\n\t\t\t\t\t`${this.constructor.name}: skipping value refresh because the matching proprietary CC is not implemented...`,\n\t\t\t\tdirection: \"none\",\n\t\t\t});\n\t\t}\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAMO;AAEP,IAAAA,eAAsB;AAEtB,iBAA0D;AAC1D,0BAKO;AACP,oCAKO;AACP,oCAA6C;AAC7C,wBAIO
|
|
6
|
-
"names": ["import_safe", "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAMO;AAEP,IAAAA,eAAsB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