zwave-js 9.2.1 → 9.3.0

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