@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
|
@@ -36,13 +36,45 @@ var import_safe3 = require("@zwave-js/shared/safe");
|
|
|
36
36
|
var import_CommandClass = require("../lib/CommandClass.js");
|
|
37
37
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
38
38
|
var import_Types = require("../lib/_Types.js");
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
40
|
+
function accept(f) {
|
|
41
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
42
|
+
return f;
|
|
43
|
+
}
|
|
44
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
45
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
46
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
47
|
+
var _, done = false;
|
|
48
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
49
|
+
var context = {};
|
|
50
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
51
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
52
|
+
context.addInitializer = function(f) {
|
|
53
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
54
|
+
extraInitializers.push(accept(f || null));
|
|
55
|
+
};
|
|
56
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
57
|
+
if (kind === "accessor") {
|
|
58
|
+
if (result === void 0) continue;
|
|
59
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
60
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
61
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
62
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
63
|
+
} else if (_ = accept(result)) {
|
|
64
|
+
if (kind === "field") initializers.unshift(_);
|
|
65
|
+
else descriptor[key] = _;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
69
|
+
done = true;
|
|
70
|
+
};
|
|
71
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
72
|
+
var useValue = arguments.length > 2;
|
|
73
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
74
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
75
|
+
}
|
|
76
|
+
return useValue ? value : void 0;
|
|
44
77
|
};
|
|
45
|
-
var TransportServiceCCFirstSegment_1, TransportServiceCCSubsequentSegment_1, TransportServiceCCSegmentRequest_1, TransportServiceCCSegmentComplete_1, TransportServiceCCSegmentWait_1;
|
|
46
78
|
const MAX_SEGMENT_SIZE = 39;
|
|
47
79
|
const RELAXED_TIMING_THRESHOLD = 2;
|
|
48
80
|
const TransportServiceTimeouts = {
|
|
@@ -59,335 +91,421 @@ const TransportServiceTimeouts = {
|
|
|
59
91
|
/** Waiting time between segments when sending more than {@link RELAXED_TIMING_THRESHOLD} segments at data rate R3 */
|
|
60
92
|
relaxedTimingDelayR3: 15
|
|
61
93
|
};
|
|
62
|
-
let TransportServiceCC =
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
94
|
+
let TransportServiceCC = (() => {
|
|
95
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Transport Service"]), (0, import_CommandClassDecorators.implementedVersion)(2)];
|
|
96
|
+
let _classDescriptor;
|
|
97
|
+
let _classExtraInitializers = [];
|
|
98
|
+
let _classThis;
|
|
99
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
100
|
+
var TransportServiceCC2 = class extends _classSuper {
|
|
101
|
+
static {
|
|
102
|
+
_classThis = this;
|
|
103
|
+
}
|
|
104
|
+
static {
|
|
105
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
106
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
107
|
+
TransportServiceCC2 = _classThis = _classDescriptor.value;
|
|
108
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
109
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
return TransportServiceCC2 = _classThis;
|
|
113
|
+
})();
|
|
68
114
|
function isTransportServiceEncapsulation(command) {
|
|
69
115
|
return command.ccId === import_safe.CommandClasses["Transport Service"] && (command.ccCommand === import_Types.TransportServiceCommand.FirstSegment || command.ccCommand === import_Types.TransportServiceCommand.SubsequentSegment);
|
|
70
116
|
}
|
|
71
|
-
let TransportServiceCCFirstSegment =
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
let TransportServiceCCFirstSegment = (() => {
|
|
118
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.TransportServiceCommand.FirstSegment)];
|
|
119
|
+
let _classDescriptor;
|
|
120
|
+
let _classExtraInitializers = [];
|
|
121
|
+
let _classThis;
|
|
122
|
+
let _classSuper = TransportServiceCC;
|
|
123
|
+
var TransportServiceCCFirstSegment2 = class extends _classSuper {
|
|
124
|
+
static {
|
|
125
|
+
_classThis = this;
|
|
126
|
+
}
|
|
127
|
+
static {
|
|
128
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
129
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
130
|
+
TransportServiceCCFirstSegment2 = _classThis = _classDescriptor.value;
|
|
131
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
132
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
133
|
+
}
|
|
134
|
+
constructor(options) {
|
|
135
|
+
super(options);
|
|
136
|
+
this.datagramSize = options.datagramSize;
|
|
137
|
+
this.sessionId = options.sessionId;
|
|
138
|
+
this.headerExtension = options.headerExtension;
|
|
139
|
+
this.partialDatagram = options.partialDatagram;
|
|
140
|
+
}
|
|
141
|
+
static from(raw, ctx) {
|
|
142
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 6);
|
|
143
|
+
const headerBuffer = import_safe2.Bytes.from([
|
|
144
|
+
import_safe.CommandClasses["Transport Service"],
|
|
145
|
+
import_Types.TransportServiceCommand.FirstSegment | raw.payload[0]
|
|
146
|
+
]);
|
|
147
|
+
const ccBuffer = raw.payload.subarray(1, -2);
|
|
148
|
+
let expectedCRC = (0, import_safe.CRC16_CCITT)(headerBuffer);
|
|
149
|
+
expectedCRC = (0, import_safe.CRC16_CCITT)(ccBuffer, expectedCRC);
|
|
150
|
+
const actualCRC = raw.payload.readUInt16BE(raw.payload.length - 2);
|
|
151
|
+
(0, import_safe.validatePayload)(expectedCRC === actualCRC);
|
|
152
|
+
const datagramSize = raw.payload.readUInt16BE(0);
|
|
153
|
+
const sessionId = raw.payload[2] >>> 4;
|
|
154
|
+
let payloadOffset = 3;
|
|
155
|
+
const hasHeaderExtension = !!(raw.payload[2] & 8);
|
|
156
|
+
let headerExtension;
|
|
157
|
+
if (hasHeaderExtension) {
|
|
158
|
+
const extLength = raw.payload[3];
|
|
159
|
+
headerExtension = raw.payload.subarray(4, 4 + extLength);
|
|
160
|
+
payloadOffset += 1 + extLength;
|
|
161
|
+
}
|
|
162
|
+
const partialDatagram = raw.payload.subarray(payloadOffset, -2);
|
|
163
|
+
(0, import_safe.validatePayload)(partialDatagram.length <= MAX_SEGMENT_SIZE);
|
|
164
|
+
return new this({
|
|
165
|
+
nodeId: ctx.sourceNodeId,
|
|
166
|
+
datagramSize,
|
|
167
|
+
sessionId,
|
|
168
|
+
headerExtension,
|
|
169
|
+
partialDatagram
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
datagramSize;
|
|
173
|
+
sessionId;
|
|
174
|
+
headerExtension;
|
|
175
|
+
partialDatagram;
|
|
176
|
+
encapsulated;
|
|
177
|
+
serialize(ctx) {
|
|
178
|
+
this.ccCommand = this.ccCommand & 248 | this.datagramSize >>> 8 & 7;
|
|
179
|
+
const ext = !!this.headerExtension && this.headerExtension.length >= 1;
|
|
180
|
+
this.payload = import_safe2.Bytes.from([
|
|
181
|
+
this.datagramSize & 255,
|
|
182
|
+
(this.sessionId & 15) << 4 | (ext ? 8 : 0)
|
|
183
|
+
]);
|
|
184
|
+
if (ext) {
|
|
185
|
+
this.payload = import_safe2.Bytes.concat([
|
|
186
|
+
this.payload,
|
|
187
|
+
import_safe2.Bytes.from([this.headerExtension.length]),
|
|
188
|
+
this.headerExtension
|
|
189
|
+
]);
|
|
190
|
+
}
|
|
123
191
|
this.payload = import_safe2.Bytes.concat([
|
|
124
192
|
this.payload,
|
|
125
|
-
|
|
126
|
-
|
|
193
|
+
this.partialDatagram,
|
|
194
|
+
import_safe2.Bytes.alloc(2, 0)
|
|
195
|
+
// checksum
|
|
127
196
|
]);
|
|
197
|
+
const headerBuffer = import_safe2.Bytes.from([this.ccId, this.ccCommand]);
|
|
198
|
+
let crc = (0, import_safe.CRC16_CCITT)(headerBuffer);
|
|
199
|
+
crc = (0, import_safe.CRC16_CCITT)(this.payload.subarray(0, -2), crc);
|
|
200
|
+
this.payload.writeUInt16BE(crc, this.payload.length - 2);
|
|
201
|
+
return super.serialize(ctx);
|
|
128
202
|
}
|
|
129
|
-
|
|
130
|
-
this.payload,
|
|
131
|
-
this.partialDatagram,
|
|
132
|
-
import_safe2.Bytes.alloc(2, 0)
|
|
133
|
-
// checksum
|
|
134
|
-
]);
|
|
135
|
-
const headerBuffer = import_safe2.Bytes.from([this.ccId, this.ccCommand]);
|
|
136
|
-
let crc = (0, import_safe.CRC16_CCITT)(headerBuffer);
|
|
137
|
-
crc = (0, import_safe.CRC16_CCITT)(this.payload.subarray(0, -2), crc);
|
|
138
|
-
this.payload.writeUInt16BE(crc, this.payload.length - 2);
|
|
139
|
-
return super.serialize(ctx);
|
|
140
|
-
}
|
|
141
|
-
expectMoreMessages() {
|
|
142
|
-
return true;
|
|
143
|
-
}
|
|
144
|
-
getPartialCCSessionId() {
|
|
145
|
-
return { ccCommand: void 0, sessionId: this.sessionId };
|
|
146
|
-
}
|
|
147
|
-
computeEncapsulationOverhead() {
|
|
148
|
-
return super.computeEncapsulationOverhead() + 4 + (this.headerExtension?.length ? 1 + this.headerExtension.length : 0);
|
|
149
|
-
}
|
|
150
|
-
toLogEntry(ctx) {
|
|
151
|
-
return {
|
|
152
|
-
...super.toLogEntry(ctx),
|
|
153
|
-
message: {
|
|
154
|
-
"session ID": this.sessionId,
|
|
155
|
-
"datagram size": this.datagramSize,
|
|
156
|
-
"byte range": `0...${this.partialDatagram.length - 1}`,
|
|
157
|
-
payload: (0, import_safe3.buffer2hex)(this.partialDatagram)
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
TransportServiceCCFirstSegment = TransportServiceCCFirstSegment_1 = __decorate([
|
|
163
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.TransportServiceCommand.FirstSegment)
|
|
164
|
-
// @expectedCCResponse(TransportServiceCCReport)
|
|
165
|
-
], TransportServiceCCFirstSegment);
|
|
166
|
-
let TransportServiceCCSubsequentSegment = TransportServiceCCSubsequentSegment_1 = class TransportServiceCCSubsequentSegment2 extends TransportServiceCC {
|
|
167
|
-
constructor(options) {
|
|
168
|
-
super(options);
|
|
169
|
-
this.datagramSize = options.datagramSize;
|
|
170
|
-
this.datagramOffset = options.datagramOffset;
|
|
171
|
-
this.sessionId = options.sessionId;
|
|
172
|
-
this.headerExtension = options.headerExtension;
|
|
173
|
-
this.partialDatagram = options.partialDatagram;
|
|
174
|
-
}
|
|
175
|
-
static from(raw, ctx) {
|
|
176
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 7);
|
|
177
|
-
const headerBuffer = import_safe2.Bytes.from([
|
|
178
|
-
import_safe.CommandClasses["Transport Service"],
|
|
179
|
-
import_Types.TransportServiceCommand.SubsequentSegment | raw.payload[0]
|
|
180
|
-
]);
|
|
181
|
-
const ccBuffer = raw.payload.subarray(1, -2);
|
|
182
|
-
let expectedCRC = (0, import_safe.CRC16_CCITT)(headerBuffer);
|
|
183
|
-
expectedCRC = (0, import_safe.CRC16_CCITT)(ccBuffer, expectedCRC);
|
|
184
|
-
const actualCRC = raw.payload.readUInt16BE(raw.payload.length - 2);
|
|
185
|
-
(0, import_safe.validatePayload)(expectedCRC === actualCRC);
|
|
186
|
-
const datagramSize = raw.payload.readUInt16BE(0);
|
|
187
|
-
const sessionId = raw.payload[2] >>> 4;
|
|
188
|
-
const datagramOffset = ((raw.payload[2] & 7) << 8) + raw.payload[3];
|
|
189
|
-
let payloadOffset = 4;
|
|
190
|
-
const hasHeaderExtension = !!(raw.payload[2] & 8);
|
|
191
|
-
let headerExtension;
|
|
192
|
-
if (hasHeaderExtension) {
|
|
193
|
-
const extLength = raw.payload[4];
|
|
194
|
-
headerExtension = raw.payload.subarray(5, 5 + extLength);
|
|
195
|
-
payloadOffset += 1 + extLength;
|
|
196
|
-
}
|
|
197
|
-
const partialDatagram = raw.payload.subarray(payloadOffset, -2);
|
|
198
|
-
(0, import_safe.validatePayload)(partialDatagram.length <= MAX_SEGMENT_SIZE);
|
|
199
|
-
return new TransportServiceCCSubsequentSegment_1({
|
|
200
|
-
nodeId: ctx.sourceNodeId,
|
|
201
|
-
datagramSize,
|
|
202
|
-
sessionId,
|
|
203
|
-
datagramOffset,
|
|
204
|
-
headerExtension,
|
|
205
|
-
partialDatagram
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
datagramSize;
|
|
209
|
-
datagramOffset;
|
|
210
|
-
sessionId;
|
|
211
|
-
headerExtension;
|
|
212
|
-
partialDatagram;
|
|
213
|
-
// This can only be received
|
|
214
|
-
_encapsulated;
|
|
215
|
-
get encapsulated() {
|
|
216
|
-
return this._encapsulated;
|
|
217
|
-
}
|
|
218
|
-
expectMoreMessages(session) {
|
|
219
|
-
if (!(session[0] instanceof TransportServiceCCFirstSegment)) {
|
|
203
|
+
expectMoreMessages() {
|
|
220
204
|
return true;
|
|
221
205
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
206
|
+
getPartialCCSessionId() {
|
|
207
|
+
return { ccCommand: void 0, sessionId: this.sessionId };
|
|
208
|
+
}
|
|
209
|
+
computeEncapsulationOverhead() {
|
|
210
|
+
return super.computeEncapsulationOverhead() + 4 + (this.headerExtension?.length ? 1 + this.headerExtension.length : 0);
|
|
211
|
+
}
|
|
212
|
+
toLogEntry(ctx) {
|
|
213
|
+
return {
|
|
214
|
+
...super.toLogEntry(ctx),
|
|
215
|
+
message: {
|
|
216
|
+
"session ID": this.sessionId,
|
|
217
|
+
"datagram size": this.datagramSize,
|
|
218
|
+
"byte range": `0...${this.partialDatagram.length - 1}`,
|
|
219
|
+
payload: (0, import_safe3.buffer2hex)(this.partialDatagram)
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
return TransportServiceCCFirstSegment2 = _classThis;
|
|
225
|
+
})();
|
|
226
|
+
let TransportServiceCCSubsequentSegment = (() => {
|
|
227
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.TransportServiceCommand.SubsequentSegment)];
|
|
228
|
+
let _classDescriptor;
|
|
229
|
+
let _classExtraInitializers = [];
|
|
230
|
+
let _classThis;
|
|
231
|
+
let _classSuper = TransportServiceCC;
|
|
232
|
+
var TransportServiceCCSubsequentSegment2 = class extends _classSuper {
|
|
233
|
+
static {
|
|
234
|
+
_classThis = this;
|
|
235
|
+
}
|
|
236
|
+
static {
|
|
237
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
238
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
239
|
+
TransportServiceCCSubsequentSegment2 = _classThis = _classDescriptor.value;
|
|
240
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
241
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
242
|
+
}
|
|
243
|
+
constructor(options) {
|
|
244
|
+
super(options);
|
|
245
|
+
this.datagramSize = options.datagramSize;
|
|
246
|
+
this.datagramOffset = options.datagramOffset;
|
|
247
|
+
this.sessionId = options.sessionId;
|
|
248
|
+
this.headerExtension = options.headerExtension;
|
|
249
|
+
this.partialDatagram = options.partialDatagram;
|
|
250
|
+
}
|
|
251
|
+
static from(raw, ctx) {
|
|
252
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 7);
|
|
253
|
+
const headerBuffer = import_safe2.Bytes.from([
|
|
254
|
+
import_safe.CommandClasses["Transport Service"],
|
|
255
|
+
import_Types.TransportServiceCommand.SubsequentSegment | raw.payload[0]
|
|
256
|
+
]);
|
|
257
|
+
const ccBuffer = raw.payload.subarray(1, -2);
|
|
258
|
+
let expectedCRC = (0, import_safe.CRC16_CCITT)(headerBuffer);
|
|
259
|
+
expectedCRC = (0, import_safe.CRC16_CCITT)(ccBuffer, expectedCRC);
|
|
260
|
+
const actualCRC = raw.payload.readUInt16BE(raw.payload.length - 2);
|
|
261
|
+
(0, import_safe.validatePayload)(expectedCRC === actualCRC);
|
|
262
|
+
const datagramSize = raw.payload.readUInt16BE(0);
|
|
263
|
+
const sessionId = raw.payload[2] >>> 4;
|
|
264
|
+
const datagramOffset = ((raw.payload[2] & 7) << 8) + raw.payload[3];
|
|
265
|
+
let payloadOffset = 4;
|
|
266
|
+
const hasHeaderExtension = !!(raw.payload[2] & 8);
|
|
267
|
+
let headerExtension;
|
|
268
|
+
if (hasHeaderExtension) {
|
|
269
|
+
const extLength = raw.payload[4];
|
|
270
|
+
headerExtension = raw.payload.subarray(5, 5 + extLength);
|
|
271
|
+
payloadOffset += 1 + extLength;
|
|
228
272
|
}
|
|
273
|
+
const partialDatagram = raw.payload.subarray(payloadOffset, -2);
|
|
274
|
+
(0, import_safe.validatePayload)(partialDatagram.length <= MAX_SEGMENT_SIZE);
|
|
275
|
+
return new this({
|
|
276
|
+
nodeId: ctx.sourceNodeId,
|
|
277
|
+
datagramSize,
|
|
278
|
+
sessionId,
|
|
279
|
+
datagramOffset,
|
|
280
|
+
headerExtension,
|
|
281
|
+
partialDatagram
|
|
282
|
+
});
|
|
229
283
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
284
|
+
datagramSize;
|
|
285
|
+
datagramOffset;
|
|
286
|
+
sessionId;
|
|
287
|
+
headerExtension;
|
|
288
|
+
partialDatagram;
|
|
289
|
+
// This can only be received
|
|
290
|
+
_encapsulated;
|
|
291
|
+
get encapsulated() {
|
|
292
|
+
return this._encapsulated;
|
|
293
|
+
}
|
|
294
|
+
expectMoreMessages(session) {
|
|
295
|
+
if (!(session[0] instanceof TransportServiceCCFirstSegment)) {
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
const datagramSize = session[0].datagramSize;
|
|
299
|
+
const receivedBytes = new Array(datagramSize).fill(false);
|
|
300
|
+
for (const segment of [...session, this]) {
|
|
301
|
+
const offset = segment instanceof TransportServiceCCFirstSegment ? 0 : segment.datagramOffset;
|
|
302
|
+
for (let i = offset; i <= offset + segment.partialDatagram.length; i++) {
|
|
303
|
+
receivedBytes[i] = true;
|
|
304
|
+
}
|
|
241
305
|
}
|
|
242
|
-
|
|
306
|
+
return receivedBytes.includes(false);
|
|
243
307
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
308
|
+
getPartialCCSessionId() {
|
|
309
|
+
return { ccCommand: void 0, sessionId: this.sessionId };
|
|
310
|
+
}
|
|
311
|
+
mergePartialCCs(partials, ctx) {
|
|
312
|
+
const datagram = new import_safe2.Bytes(this.datagramSize);
|
|
313
|
+
for (const partial of [...partials, this]) {
|
|
314
|
+
const offset = partial instanceof TransportServiceCCFirstSegment ? 0 : partial.datagramOffset;
|
|
315
|
+
if (offset + partial.partialDatagram.length > datagram.length) {
|
|
316
|
+
throw new import_safe.ZWaveError(`The partial datagram offset and length in a segment are not compatible to the communicated datagram length`, import_safe.ZWaveErrorCodes.PacketFormat_InvalidPayload);
|
|
317
|
+
}
|
|
318
|
+
datagram.set(partial.partialDatagram, offset);
|
|
319
|
+
}
|
|
320
|
+
this._encapsulated = import_CommandClass.CommandClass.parse(datagram, ctx);
|
|
321
|
+
this._encapsulated.encapsulatingCC = this;
|
|
322
|
+
}
|
|
323
|
+
serialize(ctx) {
|
|
324
|
+
this.ccCommand = this.ccCommand & 248 | this.datagramSize >>> 8 & 7;
|
|
325
|
+
const ext = !!this.headerExtension && this.headerExtension.length >= 1;
|
|
326
|
+
this.payload = import_safe2.Bytes.from([
|
|
327
|
+
this.datagramSize & 255,
|
|
328
|
+
(this.sessionId & 15) << 4 | (ext ? 8 : 0) | this.datagramOffset >>> 8 & 7,
|
|
329
|
+
this.datagramOffset & 255
|
|
330
|
+
]);
|
|
331
|
+
if (ext) {
|
|
332
|
+
this.payload = import_safe2.Bytes.concat([
|
|
333
|
+
this.payload,
|
|
334
|
+
import_safe2.Bytes.from([this.headerExtension.length]),
|
|
335
|
+
this.headerExtension
|
|
336
|
+
]);
|
|
337
|
+
}
|
|
256
338
|
this.payload = import_safe2.Bytes.concat([
|
|
257
339
|
this.payload,
|
|
258
|
-
|
|
259
|
-
|
|
340
|
+
this.partialDatagram,
|
|
341
|
+
import_safe2.Bytes.alloc(2, 0)
|
|
342
|
+
// checksum
|
|
260
343
|
]);
|
|
344
|
+
const headerBuffer = import_safe2.Bytes.from([this.ccId, this.ccCommand]);
|
|
345
|
+
let crc = (0, import_safe.CRC16_CCITT)(headerBuffer);
|
|
346
|
+
crc = (0, import_safe.CRC16_CCITT)(this.payload.subarray(0, -2), crc);
|
|
347
|
+
this.payload.writeUInt16BE(crc, this.payload.length - 2);
|
|
348
|
+
return super.serialize(ctx);
|
|
261
349
|
}
|
|
262
|
-
|
|
263
|
-
this.
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
...super.toLogEntry(ctx),
|
|
280
|
-
message: {
|
|
281
|
-
"session ID": this.sessionId,
|
|
282
|
-
"datagram size": this.datagramSize,
|
|
283
|
-
"byte range": `${this.datagramOffset}...${this.datagramOffset + this.partialDatagram.length - 1}`,
|
|
284
|
-
payload: (0, import_safe3.buffer2hex)(this.partialDatagram)
|
|
285
|
-
}
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
|
-
TransportServiceCCSubsequentSegment = TransportServiceCCSubsequentSegment_1 = __decorate([
|
|
290
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.TransportServiceCommand.SubsequentSegment)
|
|
291
|
-
// @expectedCCResponse(TransportServiceCCReport)
|
|
292
|
-
], TransportServiceCCSubsequentSegment);
|
|
350
|
+
computeEncapsulationOverhead() {
|
|
351
|
+
return super.computeEncapsulationOverhead() + 5 + (this.headerExtension?.length ? 1 + this.headerExtension.length : 0);
|
|
352
|
+
}
|
|
353
|
+
toLogEntry(ctx) {
|
|
354
|
+
return {
|
|
355
|
+
...super.toLogEntry(ctx),
|
|
356
|
+
message: {
|
|
357
|
+
"session ID": this.sessionId,
|
|
358
|
+
"datagram size": this.datagramSize,
|
|
359
|
+
"byte range": `${this.datagramOffset}...${this.datagramOffset + this.partialDatagram.length - 1}`,
|
|
360
|
+
payload: (0, import_safe3.buffer2hex)(this.partialDatagram)
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
return TransportServiceCCSubsequentSegment2 = _classThis;
|
|
366
|
+
})();
|
|
293
367
|
function testResponseForSegmentRequest(sent, received) {
|
|
294
368
|
return sent.datagramOffset === 0 && received instanceof TransportServiceCCFirstSegment && received.sessionId === sent.sessionId || sent.datagramOffset > 0 && received instanceof TransportServiceCCSubsequentSegment && sent.datagramOffset === received.datagramOffset && received.sessionId === sent.sessionId;
|
|
295
369
|
}
|
|
296
|
-
let TransportServiceCCSegmentRequest =
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
]
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
370
|
+
let TransportServiceCCSegmentRequest = (() => {
|
|
371
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.TransportServiceCommand.SegmentRequest), (0, import_CommandClassDecorators.expectedCCResponse)(TransportServiceCC, testResponseForSegmentRequest)];
|
|
372
|
+
let _classDescriptor;
|
|
373
|
+
let _classExtraInitializers = [];
|
|
374
|
+
let _classThis;
|
|
375
|
+
let _classSuper = TransportServiceCC;
|
|
376
|
+
var TransportServiceCCSegmentRequest2 = class extends _classSuper {
|
|
377
|
+
static {
|
|
378
|
+
_classThis = this;
|
|
379
|
+
}
|
|
380
|
+
static {
|
|
381
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
382
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
383
|
+
TransportServiceCCSegmentRequest2 = _classThis = _classDescriptor.value;
|
|
384
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
385
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
386
|
+
}
|
|
387
|
+
constructor(options) {
|
|
388
|
+
super(options);
|
|
389
|
+
this.sessionId = options.sessionId;
|
|
390
|
+
this.datagramOffset = options.datagramOffset;
|
|
391
|
+
}
|
|
392
|
+
static from(raw, ctx) {
|
|
393
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 3);
|
|
394
|
+
const sessionId = raw.payload[1] >>> 4;
|
|
395
|
+
const datagramOffset = ((raw.payload[1] & 7) << 8) + raw.payload[2];
|
|
396
|
+
return new this({
|
|
397
|
+
nodeId: ctx.sourceNodeId,
|
|
398
|
+
sessionId,
|
|
399
|
+
datagramOffset
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
sessionId;
|
|
403
|
+
datagramOffset;
|
|
404
|
+
serialize(ctx) {
|
|
405
|
+
this.payload = import_safe2.Bytes.from([
|
|
406
|
+
(this.sessionId & 15) << 4 | this.datagramOffset >>> 8 & 7,
|
|
407
|
+
this.datagramOffset & 255
|
|
408
|
+
]);
|
|
409
|
+
return super.serialize(ctx);
|
|
410
|
+
}
|
|
411
|
+
toLogEntry(ctx) {
|
|
412
|
+
return {
|
|
413
|
+
...super.toLogEntry(ctx),
|
|
414
|
+
message: {
|
|
415
|
+
"session ID": this.sessionId,
|
|
416
|
+
offset: this.datagramOffset
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
return TransportServiceCCSegmentRequest2 = _classThis;
|
|
422
|
+
})();
|
|
423
|
+
let TransportServiceCCSegmentComplete = (() => {
|
|
424
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.TransportServiceCommand.SegmentComplete)];
|
|
425
|
+
let _classDescriptor;
|
|
426
|
+
let _classExtraInitializers = [];
|
|
427
|
+
let _classThis;
|
|
428
|
+
let _classSuper = TransportServiceCC;
|
|
429
|
+
var TransportServiceCCSegmentComplete2 = class extends _classSuper {
|
|
430
|
+
static {
|
|
431
|
+
_classThis = this;
|
|
432
|
+
}
|
|
433
|
+
static {
|
|
434
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
435
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
436
|
+
TransportServiceCCSegmentComplete2 = _classThis = _classDescriptor.value;
|
|
437
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
438
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
439
|
+
}
|
|
440
|
+
constructor(options) {
|
|
441
|
+
super(options);
|
|
442
|
+
this.sessionId = options.sessionId;
|
|
443
|
+
}
|
|
444
|
+
static from(raw, ctx) {
|
|
445
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
446
|
+
const sessionId = raw.payload[1] >>> 4;
|
|
447
|
+
return new this({
|
|
448
|
+
nodeId: ctx.sourceNodeId,
|
|
449
|
+
sessionId
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
sessionId;
|
|
453
|
+
serialize(ctx) {
|
|
454
|
+
this.payload = import_safe2.Bytes.from([(this.sessionId & 15) << 4]);
|
|
455
|
+
return super.serialize(ctx);
|
|
456
|
+
}
|
|
457
|
+
toLogEntry(ctx) {
|
|
458
|
+
return {
|
|
459
|
+
...super.toLogEntry(ctx),
|
|
460
|
+
message: { "session ID": this.sessionId }
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
return TransportServiceCCSegmentComplete2 = _classThis;
|
|
465
|
+
})();
|
|
466
|
+
let TransportServiceCCSegmentWait = (() => {
|
|
467
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.TransportServiceCommand.SegmentWait)];
|
|
468
|
+
let _classDescriptor;
|
|
469
|
+
let _classExtraInitializers = [];
|
|
470
|
+
let _classThis;
|
|
471
|
+
let _classSuper = TransportServiceCC;
|
|
472
|
+
var TransportServiceCCSegmentWait2 = class extends _classSuper {
|
|
473
|
+
static {
|
|
474
|
+
_classThis = this;
|
|
475
|
+
}
|
|
476
|
+
static {
|
|
477
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
478
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
479
|
+
TransportServiceCCSegmentWait2 = _classThis = _classDescriptor.value;
|
|
480
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
481
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
482
|
+
}
|
|
483
|
+
constructor(options) {
|
|
484
|
+
super(options);
|
|
485
|
+
this.pendingSegments = options.pendingSegments;
|
|
486
|
+
}
|
|
487
|
+
static from(raw, ctx) {
|
|
488
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 2);
|
|
489
|
+
const pendingSegments = raw.payload[1];
|
|
490
|
+
return new this({
|
|
491
|
+
nodeId: ctx.sourceNodeId,
|
|
492
|
+
pendingSegments
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
pendingSegments;
|
|
496
|
+
serialize(ctx) {
|
|
497
|
+
this.payload = import_safe2.Bytes.from([this.pendingSegments]);
|
|
498
|
+
return super.serialize(ctx);
|
|
499
|
+
}
|
|
500
|
+
toLogEntry(ctx) {
|
|
501
|
+
return {
|
|
502
|
+
...super.toLogEntry(ctx),
|
|
503
|
+
message: { "pending segments": this.pendingSegments }
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
return TransportServiceCCSegmentWait2 = _classThis;
|
|
508
|
+
})();
|
|
391
509
|
// Annotate the CommonJS export names for ESM import in node:
|
|
392
510
|
0 && (module.exports = {
|
|
393
511
|
MAX_SEGMENT_SIZE,
|