jooby-codec 2.8.2 → 2.10.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 (329) hide show
  1. package/dist/analog/Command.d.ts +1 -0
  2. package/dist/analog/Command.js +4 -0
  3. package/dist/analog/Command.js.map +1 -1
  4. package/dist/analog/message.d.ts +2 -0
  5. package/dist/analog/message.js +4 -0
  6. package/dist/analog/message.js.map +1 -1
  7. package/dist/obis-observer/Command.d.ts +1 -0
  8. package/dist/obis-observer/Command.js +7 -8
  9. package/dist/obis-observer/Command.js.map +1 -1
  10. package/dist/obis-observer/CommandBinaryBuffer.d.ts +7 -7
  11. package/dist/obis-observer/CommandBinaryBuffer.js +11 -11
  12. package/dist/obis-observer/CommandBinaryBuffer.js.map +1 -1
  13. package/dist/obis-observer/commands/downlink/AddMeterProfile.d.ts +16 -0
  14. package/dist/obis-observer/commands/downlink/AddMeterProfile.js +34 -0
  15. package/dist/obis-observer/commands/downlink/AddMeterProfile.js.map +1 -0
  16. package/dist/obis-observer/commands/downlink/AddObisProfile.d.ts +18 -0
  17. package/dist/obis-observer/commands/downlink/{AddShortNameProfile.js → AddObisProfile.js} +20 -17
  18. package/dist/obis-observer/commands/downlink/AddObisProfile.js.map +1 -0
  19. package/dist/obis-observer/commands/downlink/GetLorawanInfo.d.ts +2 -2
  20. package/dist/obis-observer/commands/downlink/GetLorawanInfo.js +6 -13
  21. package/dist/obis-observer/commands/downlink/GetLorawanInfo.js.map +1 -1
  22. package/dist/obis-observer/commands/downlink/GetLorawanState.d.ts +2 -2
  23. package/dist/obis-observer/commands/downlink/GetLorawanState.js +6 -13
  24. package/dist/obis-observer/commands/downlink/GetLorawanState.js.map +1 -1
  25. package/dist/obis-observer/commands/downlink/GetMeterArchiveProfile.d.ts +16 -0
  26. package/dist/obis-observer/commands/downlink/GetMeterArchiveProfile.js +34 -0
  27. package/dist/obis-observer/commands/downlink/GetMeterArchiveProfile.js.map +1 -0
  28. package/dist/obis-observer/commands/downlink/GetMeterArchiveState.d.ts +17 -0
  29. package/dist/obis-observer/commands/downlink/GetMeterArchiveState.js +35 -0
  30. package/dist/obis-observer/commands/downlink/GetMeterArchiveState.js.map +1 -0
  31. package/dist/obis-observer/commands/downlink/GetMeterDate.d.ts +16 -0
  32. package/dist/obis-observer/commands/downlink/GetMeterDate.js +33 -0
  33. package/dist/obis-observer/commands/downlink/GetMeterDate.js.map +1 -0
  34. package/dist/obis-observer/commands/downlink/GetMeterId.d.ts +16 -0
  35. package/dist/obis-observer/commands/downlink/{GetShortNameInfo.js → GetMeterId.js} +17 -17
  36. package/dist/obis-observer/commands/downlink/GetMeterId.js.map +1 -0
  37. package/dist/obis-observer/commands/downlink/GetMeterIdList.d.ts +16 -0
  38. package/dist/obis-observer/commands/downlink/GetMeterIdList.js +33 -0
  39. package/dist/obis-observer/commands/downlink/GetMeterIdList.js.map +1 -0
  40. package/dist/obis-observer/commands/downlink/GetMeterInfo.d.ts +16 -0
  41. package/dist/obis-observer/commands/downlink/GetMeterInfo.js +33 -0
  42. package/dist/obis-observer/commands/downlink/GetMeterInfo.js.map +1 -0
  43. package/dist/obis-observer/commands/downlink/GetMeterProfileIdList.d.ts +16 -0
  44. package/dist/obis-observer/commands/downlink/GetMeterProfileIdList.js +33 -0
  45. package/dist/obis-observer/commands/downlink/GetMeterProfileIdList.js.map +1 -0
  46. package/dist/obis-observer/commands/downlink/GetMeterReadoutState.d.ts +16 -0
  47. package/dist/obis-observer/commands/downlink/GetMeterReadoutState.js +33 -0
  48. package/dist/obis-observer/commands/downlink/GetMeterReadoutState.js.map +1 -0
  49. package/dist/obis-observer/commands/downlink/{GetContentByObis.d.ts → GetObisContent.d.ts} +2 -1
  50. package/dist/obis-observer/commands/downlink/{GetContentByObis.js → GetObisContent.js} +9 -6
  51. package/dist/obis-observer/commands/downlink/GetObisContent.js.map +1 -0
  52. package/dist/obis-observer/commands/downlink/GetObisContentById.d.ts +17 -0
  53. package/dist/obis-observer/commands/downlink/GetObisContentById.js +34 -0
  54. package/dist/obis-observer/commands/downlink/GetObisContentById.js.map +1 -0
  55. package/dist/obis-observer/commands/downlink/GetObisIdList.d.ts +17 -0
  56. package/dist/obis-observer/commands/downlink/{SetShortName.js → GetObisIdList.js} +15 -15
  57. package/dist/obis-observer/commands/downlink/GetObisIdList.js.map +1 -0
  58. package/dist/obis-observer/commands/downlink/GetObisInfo.d.ts +17 -0
  59. package/dist/obis-observer/commands/downlink/GetObisInfo.js +34 -0
  60. package/dist/obis-observer/commands/downlink/GetObisInfo.js.map +1 -0
  61. package/dist/obis-observer/commands/downlink/GetObisProfile.d.ts +17 -0
  62. package/dist/obis-observer/commands/downlink/GetObisProfile.js +35 -0
  63. package/dist/obis-observer/commands/downlink/GetObisProfile.js.map +1 -0
  64. package/dist/obis-observer/commands/downlink/{GetReadoutState.d.ts → GetObserverCapabilities.d.ts} +4 -4
  65. package/dist/obis-observer/commands/downlink/GetObserverCapabilities.js +32 -0
  66. package/dist/obis-observer/commands/downlink/GetObserverCapabilities.js.map +1 -0
  67. package/dist/obis-observer/commands/downlink/{GetDeviceInfo.d.ts → GetObserverInfo.d.ts} +4 -4
  68. package/dist/obis-observer/commands/downlink/GetObserverInfo.js +32 -0
  69. package/dist/obis-observer/commands/downlink/GetObserverInfo.js.map +1 -0
  70. package/dist/obis-observer/commands/downlink/{GetArchiveProfile.d.ts → GetObserverSingleMode.d.ts} +3 -3
  71. package/dist/obis-observer/commands/downlink/GetObserverSingleMode.js +32 -0
  72. package/dist/obis-observer/commands/downlink/GetObserverSingleMode.js.map +1 -0
  73. package/dist/obis-observer/commands/downlink/{GetDate.d.ts → GetObserverUptime.d.ts} +4 -4
  74. package/dist/obis-observer/commands/downlink/GetObserverUptime.js +32 -0
  75. package/dist/obis-observer/commands/downlink/GetObserverUptime.js.map +1 -0
  76. package/dist/obis-observer/commands/downlink/ReadMeterArchive.d.ts +19 -0
  77. package/dist/obis-observer/commands/downlink/ReadMeterArchive.js +61 -0
  78. package/dist/obis-observer/commands/downlink/ReadMeterArchive.js.map +1 -0
  79. package/dist/obis-observer/commands/downlink/Reboot.d.ts +2 -2
  80. package/dist/obis-observer/commands/downlink/Reboot.js +6 -12
  81. package/dist/obis-observer/commands/downlink/Reboot.js.map +1 -1
  82. package/dist/obis-observer/commands/downlink/RemoveMeter.d.ts +16 -0
  83. package/dist/obis-observer/commands/downlink/RemoveMeter.js +34 -0
  84. package/dist/obis-observer/commands/downlink/RemoveMeter.js.map +1 -0
  85. package/dist/obis-observer/commands/downlink/RemoveMeterProfile.d.ts +16 -0
  86. package/dist/obis-observer/commands/downlink/RemoveMeterProfile.js +34 -0
  87. package/dist/obis-observer/commands/downlink/RemoveMeterProfile.js.map +1 -0
  88. package/dist/obis-observer/commands/downlink/RemoveObisProfile.d.ts +17 -0
  89. package/dist/obis-observer/commands/downlink/RemoveObisProfile.js +35 -0
  90. package/dist/obis-observer/commands/downlink/RemoveObisProfile.js.map +1 -0
  91. package/dist/obis-observer/commands/downlink/SetLorawanActivationMethod.d.ts +16 -0
  92. package/dist/obis-observer/commands/downlink/SetLorawanActivationMethod.js +34 -0
  93. package/dist/obis-observer/commands/downlink/SetLorawanActivationMethod.js.map +1 -0
  94. package/dist/obis-observer/commands/downlink/SetMeterArchiveProfile.d.ts +18 -0
  95. package/dist/obis-observer/commands/downlink/SetMeterArchiveProfile.js +48 -0
  96. package/dist/obis-observer/commands/downlink/SetMeterArchiveProfile.js.map +1 -0
  97. package/dist/obis-observer/commands/downlink/SetObisId.d.ts +18 -0
  98. package/dist/obis-observer/commands/downlink/{GetShortNames.js → SetObisId.js} +19 -13
  99. package/dist/obis-observer/commands/downlink/SetObisId.js.map +1 -0
  100. package/dist/obis-observer/commands/downlink/SetObserverSingleMode.d.ts +16 -0
  101. package/dist/obis-observer/commands/downlink/SetObserverSingleMode.js +34 -0
  102. package/dist/obis-observer/commands/downlink/SetObserverSingleMode.js.map +1 -0
  103. package/dist/obis-observer/commands/downlink/SetSerialPort.d.ts +1 -1
  104. package/dist/obis-observer/commands/downlink/SetSerialPort.js +3 -3
  105. package/dist/obis-observer/commands/downlink/SetSerialPort.js.map +1 -1
  106. package/dist/obis-observer/commands/downlink/SetupMeter.d.ts +18 -0
  107. package/dist/obis-observer/commands/downlink/SetupMeter.js +50 -0
  108. package/dist/obis-observer/commands/downlink/SetupMeter.js.map +1 -0
  109. package/dist/obis-observer/commands/downlink/UpdateImageVerify.d.ts +2 -2
  110. package/dist/obis-observer/commands/downlink/UpdateImageVerify.js +6 -12
  111. package/dist/obis-observer/commands/downlink/UpdateImageVerify.js.map +1 -1
  112. package/dist/obis-observer/commands/downlink/UpdateImageWrite.d.ts +1 -1
  113. package/dist/obis-observer/commands/downlink/UpdateImageWrite.js +4 -6
  114. package/dist/obis-observer/commands/downlink/UpdateImageWrite.js.map +1 -1
  115. package/dist/obis-observer/commands/downlink/UpdateRun.d.ts +2 -2
  116. package/dist/obis-observer/commands/downlink/UpdateRun.js +6 -12
  117. package/dist/obis-observer/commands/downlink/UpdateRun.js.map +1 -1
  118. package/dist/obis-observer/commands/downlink/index.d.ts +28 -15
  119. package/dist/obis-observer/commands/downlink/index.js +28 -15
  120. package/dist/obis-observer/commands/downlink/index.js.map +1 -1
  121. package/dist/obis-observer/commands/uplink/AddMeterProfileResponse.d.ts +16 -0
  122. package/dist/obis-observer/commands/uplink/AddMeterProfileResponse.js +35 -0
  123. package/dist/obis-observer/commands/uplink/AddMeterProfileResponse.js.map +1 -0
  124. package/dist/obis-observer/commands/uplink/AddObisProfileResponse.d.ts +16 -0
  125. package/dist/obis-observer/commands/uplink/AddObisProfileResponse.js +35 -0
  126. package/dist/obis-observer/commands/uplink/AddObisProfileResponse.js.map +1 -0
  127. package/dist/obis-observer/commands/uplink/GetLorawanInfoResponse.d.ts +1 -1
  128. package/dist/obis-observer/commands/uplink/GetLorawanInfoResponse.js +3 -3
  129. package/dist/obis-observer/commands/uplink/GetLorawanInfoResponse.js.map +1 -1
  130. package/dist/obis-observer/commands/uplink/GetLorawanStateResponse.d.ts +1 -1
  131. package/dist/obis-observer/commands/uplink/GetLorawanStateResponse.js +23 -26
  132. package/dist/obis-observer/commands/uplink/GetLorawanStateResponse.js.map +1 -1
  133. package/dist/obis-observer/commands/uplink/{GetArchiveProfileResponse.d.ts → GetMeterArchiveProfileResponse.d.ts} +1 -1
  134. package/dist/obis-observer/commands/uplink/{GetArchiveProfileResponse.js → GetMeterArchiveProfileResponse.js} +4 -4
  135. package/dist/obis-observer/commands/uplink/GetMeterArchiveProfileResponse.js.map +1 -0
  136. package/dist/obis-observer/commands/uplink/GetMeterArchiveStateResponse.d.ts +19 -0
  137. package/dist/obis-observer/commands/uplink/GetMeterArchiveStateResponse.js +78 -0
  138. package/dist/obis-observer/commands/uplink/GetMeterArchiveStateResponse.js.map +1 -0
  139. package/dist/obis-observer/commands/uplink/GetMeterDateResponse.d.ts +18 -0
  140. package/dist/obis-observer/commands/uplink/{GetDateResponse.js → GetMeterDateResponse.js} +18 -18
  141. package/dist/obis-observer/commands/uplink/GetMeterDateResponse.js.map +1 -0
  142. package/dist/obis-observer/commands/uplink/GetMeterIdListResponse.d.ts +16 -0
  143. package/dist/obis-observer/commands/uplink/GetMeterIdListResponse.js +43 -0
  144. package/dist/obis-observer/commands/uplink/GetMeterIdListResponse.js.map +1 -0
  145. package/dist/obis-observer/commands/uplink/GetMeterIdResponse.d.ts +16 -0
  146. package/dist/obis-observer/commands/uplink/GetMeterIdResponse.js +34 -0
  147. package/dist/obis-observer/commands/uplink/GetMeterIdResponse.js.map +1 -0
  148. package/dist/obis-observer/commands/uplink/GetMeterInfoResponse.d.ts +17 -0
  149. package/dist/obis-observer/commands/uplink/GetMeterInfoResponse.js +57 -0
  150. package/dist/obis-observer/commands/uplink/GetMeterInfoResponse.js.map +1 -0
  151. package/dist/obis-observer/commands/uplink/GetMeterProfileIdListResponse.d.ts +16 -0
  152. package/dist/obis-observer/commands/uplink/GetMeterProfileIdListResponse.js +43 -0
  153. package/dist/obis-observer/commands/uplink/GetMeterProfileIdListResponse.js.map +1 -0
  154. package/dist/obis-observer/commands/uplink/{GetReadoutStateResponse.d.ts → GetMeterReadoutStateResponse.d.ts} +7 -7
  155. package/dist/obis-observer/commands/uplink/{GetReadoutStateResponse.js → GetMeterReadoutStateResponse.js} +11 -11
  156. package/dist/obis-observer/commands/uplink/GetMeterReadoutStateResponse.js.map +1 -0
  157. package/dist/obis-observer/commands/uplink/GetObisContentByIdResponse.d.ts +16 -0
  158. package/dist/obis-observer/commands/uplink/{GetContentByShortNameResponse.js → GetObisContentByIdResponse.js} +11 -11
  159. package/dist/obis-observer/commands/uplink/GetObisContentByIdResponse.js.map +1 -0
  160. package/dist/obis-observer/commands/uplink/GetObisContentByIdStringResponse.d.ts +16 -0
  161. package/dist/obis-observer/commands/uplink/{GetContentByShortNameStringResponse.js → GetObisContentByIdStringResponse.js} +12 -14
  162. package/dist/obis-observer/commands/uplink/GetObisContentByIdStringResponse.js.map +1 -0
  163. package/dist/obis-observer/commands/uplink/{GetContentByObisResponse.d.ts → GetObisContentResponse.d.ts} +1 -1
  164. package/dist/obis-observer/commands/uplink/{GetContentByObisResponse.js → GetObisContentResponse.js} +5 -7
  165. package/dist/obis-observer/commands/uplink/GetObisContentResponse.js.map +1 -0
  166. package/dist/obis-observer/commands/uplink/GetObisIdListResponse.d.ts +16 -0
  167. package/dist/obis-observer/commands/uplink/GetObisIdListResponse.js +43 -0
  168. package/dist/obis-observer/commands/uplink/GetObisIdListResponse.js.map +1 -0
  169. package/dist/obis-observer/commands/uplink/GetObisInfoResponse.d.ts +17 -0
  170. package/dist/obis-observer/commands/uplink/{GetShortNameInfoResponse.js → GetObisInfoResponse.js} +13 -14
  171. package/dist/obis-observer/commands/uplink/GetObisInfoResponse.js.map +1 -0
  172. package/dist/obis-observer/commands/uplink/GetObisProfileResponse.d.ts +16 -0
  173. package/dist/obis-observer/commands/uplink/{GetShortNameProfileResponse.js → GetObisProfileResponse.js} +11 -11
  174. package/dist/obis-observer/commands/uplink/GetObisProfileResponse.js.map +1 -0
  175. package/dist/obis-observer/commands/uplink/GetObserverCapabilitiesResponse.d.ts +19 -0
  176. package/dist/obis-observer/commands/uplink/GetObserverCapabilitiesResponse.js +53 -0
  177. package/dist/obis-observer/commands/uplink/GetObserverCapabilitiesResponse.js.map +1 -0
  178. package/dist/obis-observer/commands/uplink/{GetDeviceInfoResponse.d.ts → GetObserverInfoResponse.d.ts} +7 -7
  179. package/dist/obis-observer/commands/uplink/{GetDeviceInfoResponse.js → GetObserverInfoResponse.js} +13 -15
  180. package/dist/obis-observer/commands/uplink/GetObserverInfoResponse.js.map +1 -0
  181. package/dist/obis-observer/commands/uplink/GetObserverSingleModeResponse.d.ts +16 -0
  182. package/dist/obis-observer/commands/uplink/GetObserverSingleModeResponse.js +33 -0
  183. package/dist/obis-observer/commands/uplink/GetObserverSingleModeResponse.js.map +1 -0
  184. package/dist/obis-observer/commands/uplink/GetObserverUptimeResponse.d.ts +16 -0
  185. package/dist/obis-observer/commands/uplink/GetObserverUptimeResponse.js +44 -0
  186. package/dist/obis-observer/commands/uplink/GetObserverUptimeResponse.js.map +1 -0
  187. package/dist/obis-observer/commands/uplink/ObservationReport.d.ts +3 -3
  188. package/dist/obis-observer/commands/uplink/ObservationReport.js +15 -16
  189. package/dist/obis-observer/commands/uplink/ObservationReport.js.map +1 -1
  190. package/dist/obis-observer/commands/uplink/ObservationReportString.d.ts +3 -3
  191. package/dist/obis-observer/commands/uplink/ObservationReportString.js +16 -17
  192. package/dist/obis-observer/commands/uplink/ObservationReportString.js.map +1 -1
  193. package/dist/obis-observer/commands/uplink/ReadMeterArchiveResponse.d.ts +18 -0
  194. package/dist/obis-observer/commands/uplink/{ReadArchiveResponse.js → ReadMeterArchiveResponse.js} +22 -23
  195. package/dist/obis-observer/commands/uplink/ReadMeterArchiveResponse.js.map +1 -0
  196. package/dist/obis-observer/commands/uplink/RebootResponse.d.ts +7 -4
  197. package/dist/obis-observer/commands/uplink/RebootResponse.js +11 -12
  198. package/dist/obis-observer/commands/uplink/RebootResponse.js.map +1 -1
  199. package/dist/obis-observer/commands/uplink/RemoveMeterProfileResponse.d.ts +16 -0
  200. package/dist/obis-observer/commands/uplink/RemoveMeterProfileResponse.js +35 -0
  201. package/dist/obis-observer/commands/uplink/RemoveMeterProfileResponse.js.map +1 -0
  202. package/dist/obis-observer/commands/uplink/RemoveMeterResponse.d.ts +16 -0
  203. package/dist/obis-observer/commands/uplink/RemoveMeterResponse.js +35 -0
  204. package/dist/obis-observer/commands/uplink/RemoveMeterResponse.js.map +1 -0
  205. package/dist/obis-observer/commands/uplink/RemoveObisProfileResponse.d.ts +16 -0
  206. package/dist/obis-observer/commands/uplink/RemoveObisProfileResponse.js +35 -0
  207. package/dist/obis-observer/commands/uplink/RemoveObisProfileResponse.js.map +1 -0
  208. package/dist/obis-observer/commands/uplink/SetLorawanActivationMethodResponse.d.ts +16 -0
  209. package/dist/obis-observer/commands/uplink/SetLorawanActivationMethodResponse.js +35 -0
  210. package/dist/obis-observer/commands/uplink/SetLorawanActivationMethodResponse.js.map +1 -0
  211. package/dist/obis-observer/commands/uplink/SetMeterArchiveProfileResponse.d.ts +16 -0
  212. package/dist/obis-observer/commands/uplink/SetMeterArchiveProfileResponse.js +43 -0
  213. package/dist/obis-observer/commands/uplink/SetMeterArchiveProfileResponse.js.map +1 -0
  214. package/dist/obis-observer/commands/uplink/SetObisIdResponse.d.ts +16 -0
  215. package/dist/obis-observer/commands/uplink/SetObisIdResponse.js +35 -0
  216. package/dist/obis-observer/commands/uplink/SetObisIdResponse.js.map +1 -0
  217. package/dist/obis-observer/commands/uplink/SetObserverSingleModeResponse.d.ts +16 -0
  218. package/dist/obis-observer/commands/uplink/SetObserverSingleModeResponse.js +35 -0
  219. package/dist/obis-observer/commands/uplink/SetObserverSingleModeResponse.js.map +1 -0
  220. package/dist/obis-observer/commands/uplink/SetSerialPortResponse.d.ts +2 -2
  221. package/dist/obis-observer/commands/uplink/SetSerialPortResponse.js +9 -17
  222. package/dist/obis-observer/commands/uplink/SetSerialPortResponse.js.map +1 -1
  223. package/dist/obis-observer/commands/uplink/SetupMeterResponse.d.ts +16 -0
  224. package/dist/obis-observer/commands/uplink/SetupMeterResponse.js +35 -0
  225. package/dist/obis-observer/commands/uplink/SetupMeterResponse.js.map +1 -0
  226. package/dist/obis-observer/commands/uplink/UpdateImageVerifyResponse.d.ts +2 -2
  227. package/dist/obis-observer/commands/uplink/UpdateImageVerifyResponse.js +8 -16
  228. package/dist/obis-observer/commands/uplink/UpdateImageVerifyResponse.js.map +1 -1
  229. package/dist/obis-observer/commands/uplink/UpdateImageWriteResponse.d.ts +2 -2
  230. package/dist/obis-observer/commands/uplink/UpdateImageWriteResponse.js +8 -16
  231. package/dist/obis-observer/commands/uplink/UpdateImageWriteResponse.js.map +1 -1
  232. package/dist/obis-observer/commands/uplink/UpdateRunResponse.d.ts +2 -2
  233. package/dist/obis-observer/commands/uplink/UpdateRunResponse.js +8 -16
  234. package/dist/obis-observer/commands/uplink/UpdateRunResponse.js.map +1 -1
  235. package/dist/obis-observer/commands/uplink/index.d.ts +29 -16
  236. package/dist/obis-observer/commands/uplink/index.js +29 -16
  237. package/dist/obis-observer/commands/uplink/index.js.map +1 -1
  238. package/dist/obis-observer/constants/commandRelations.js +31 -12
  239. package/dist/obis-observer/constants/commandRelations.js.map +1 -1
  240. package/dist/obis-observer/constants/index.d.ts +1 -1
  241. package/dist/obis-observer/constants/index.js +1 -1
  242. package/dist/obis-observer/constants/index.js.map +1 -1
  243. package/dist/obis-observer/constants/{shortNames.d.ts → obisIds.d.ts} +4 -4
  244. package/dist/obis-observer/constants/obisIds.js +228 -0
  245. package/dist/obis-observer/constants/obisIds.js.map +1 -0
  246. package/dist/obis-observer/message.d.ts +2 -0
  247. package/dist/obis-observer/message.js +8 -12
  248. package/dist/obis-observer/message.js.map +1 -1
  249. package/dist/utils/getBase64FromBytes.d.ts +2 -0
  250. package/dist/utils/getBase64FromBytes.js +5 -0
  251. package/dist/utils/getBase64FromBytes.js.map +1 -0
  252. package/dist/utils/getBytesFromBase64.d.ts +2 -0
  253. package/dist/utils/getBytesFromBase64.js +2 -0
  254. package/dist/utils/getBytesFromBase64.js.map +1 -0
  255. package/dist/utils/index.d.ts +2 -0
  256. package/dist/utils/index.js +2 -0
  257. package/dist/utils/index.js.map +1 -1
  258. package/package.json +1 -1
  259. package/dist/obis-observer/commands/downlink/AddShortNameProfile.d.ts +0 -17
  260. package/dist/obis-observer/commands/downlink/AddShortNameProfile.js.map +0 -1
  261. package/dist/obis-observer/commands/downlink/GetArchiveProfile.js +0 -39
  262. package/dist/obis-observer/commands/downlink/GetArchiveProfile.js.map +0 -1
  263. package/dist/obis-observer/commands/downlink/GetArchiveState.d.ts +0 -16
  264. package/dist/obis-observer/commands/downlink/GetArchiveState.js +0 -42
  265. package/dist/obis-observer/commands/downlink/GetArchiveState.js.map +0 -1
  266. package/dist/obis-observer/commands/downlink/GetContentByObis.js.map +0 -1
  267. package/dist/obis-observer/commands/downlink/GetContentByShortName.d.ts +0 -17
  268. package/dist/obis-observer/commands/downlink/GetContentByShortName.js +0 -44
  269. package/dist/obis-observer/commands/downlink/GetContentByShortName.js.map +0 -1
  270. package/dist/obis-observer/commands/downlink/GetDate.js +0 -39
  271. package/dist/obis-observer/commands/downlink/GetDate.js.map +0 -1
  272. package/dist/obis-observer/commands/downlink/GetDeviceInfo.js +0 -39
  273. package/dist/obis-observer/commands/downlink/GetDeviceInfo.js.map +0 -1
  274. package/dist/obis-observer/commands/downlink/GetReadoutState.js +0 -39
  275. package/dist/obis-observer/commands/downlink/GetReadoutState.js.map +0 -1
  276. package/dist/obis-observer/commands/downlink/GetShortNameInfo.d.ts +0 -17
  277. package/dist/obis-observer/commands/downlink/GetShortNameInfo.js.map +0 -1
  278. package/dist/obis-observer/commands/downlink/GetShortNameProfile.d.ts +0 -16
  279. package/dist/obis-observer/commands/downlink/GetShortNameProfile.js +0 -45
  280. package/dist/obis-observer/commands/downlink/GetShortNameProfile.js.map +0 -1
  281. package/dist/obis-observer/commands/downlink/GetShortNames.d.ts +0 -16
  282. package/dist/obis-observer/commands/downlink/GetShortNames.js.map +0 -1
  283. package/dist/obis-observer/commands/downlink/ReadArchive.d.ts +0 -18
  284. package/dist/obis-observer/commands/downlink/ReadArchive.js +0 -57
  285. package/dist/obis-observer/commands/downlink/ReadArchive.js.map +0 -1
  286. package/dist/obis-observer/commands/downlink/RemoveShortNameProfile.d.ts +0 -16
  287. package/dist/obis-observer/commands/downlink/RemoveShortNameProfile.js +0 -42
  288. package/dist/obis-observer/commands/downlink/RemoveShortNameProfile.js.map +0 -1
  289. package/dist/obis-observer/commands/downlink/SetArchiveProfile.d.ts +0 -17
  290. package/dist/obis-observer/commands/downlink/SetArchiveProfile.js +0 -45
  291. package/dist/obis-observer/commands/downlink/SetArchiveProfile.js.map +0 -1
  292. package/dist/obis-observer/commands/downlink/SetShortName.d.ts +0 -17
  293. package/dist/obis-observer/commands/downlink/SetShortName.js.map +0 -1
  294. package/dist/obis-observer/commands/uplink/AddShortNameProfileResponse.d.ts +0 -16
  295. package/dist/obis-observer/commands/uplink/AddShortNameProfileResponse.js +0 -43
  296. package/dist/obis-observer/commands/uplink/AddShortNameProfileResponse.js.map +0 -1
  297. package/dist/obis-observer/commands/uplink/GetArchiveProfileResponse.js.map +0 -1
  298. package/dist/obis-observer/commands/uplink/GetArchiveStateResponse.d.ts +0 -19
  299. package/dist/obis-observer/commands/uplink/GetArchiveStateResponse.js +0 -58
  300. package/dist/obis-observer/commands/uplink/GetArchiveStateResponse.js.map +0 -1
  301. package/dist/obis-observer/commands/uplink/GetContentByObisResponse.js.map +0 -1
  302. package/dist/obis-observer/commands/uplink/GetContentByShortNameResponse.d.ts +0 -16
  303. package/dist/obis-observer/commands/uplink/GetContentByShortNameResponse.js.map +0 -1
  304. package/dist/obis-observer/commands/uplink/GetContentByShortNameStringResponse.d.ts +0 -16
  305. package/dist/obis-observer/commands/uplink/GetContentByShortNameStringResponse.js.map +0 -1
  306. package/dist/obis-observer/commands/uplink/GetDateResponse.d.ts +0 -18
  307. package/dist/obis-observer/commands/uplink/GetDateResponse.js.map +0 -1
  308. package/dist/obis-observer/commands/uplink/GetDeviceInfoResponse.js.map +0 -1
  309. package/dist/obis-observer/commands/uplink/GetReadoutStateResponse.js.map +0 -1
  310. package/dist/obis-observer/commands/uplink/GetShortNameInfoResponse.d.ts +0 -17
  311. package/dist/obis-observer/commands/uplink/GetShortNameInfoResponse.js.map +0 -1
  312. package/dist/obis-observer/commands/uplink/GetShortNameProfileResponse.d.ts +0 -16
  313. package/dist/obis-observer/commands/uplink/GetShortNameProfileResponse.js.map +0 -1
  314. package/dist/obis-observer/commands/uplink/GetShortNamesResponse.d.ts +0 -16
  315. package/dist/obis-observer/commands/uplink/GetShortNamesResponse.js +0 -45
  316. package/dist/obis-observer/commands/uplink/GetShortNamesResponse.js.map +0 -1
  317. package/dist/obis-observer/commands/uplink/ReadArchiveResponse.d.ts +0 -18
  318. package/dist/obis-observer/commands/uplink/ReadArchiveResponse.js.map +0 -1
  319. package/dist/obis-observer/commands/uplink/RemoveShortNameProfileResponse.d.ts +0 -16
  320. package/dist/obis-observer/commands/uplink/RemoveShortNameProfileResponse.js +0 -43
  321. package/dist/obis-observer/commands/uplink/RemoveShortNameProfileResponse.js.map +0 -1
  322. package/dist/obis-observer/commands/uplink/SetArchiveProfileResponse.d.ts +0 -16
  323. package/dist/obis-observer/commands/uplink/SetArchiveProfileResponse.js +0 -51
  324. package/dist/obis-observer/commands/uplink/SetArchiveProfileResponse.js.map +0 -1
  325. package/dist/obis-observer/commands/uplink/SetShortNameResponse.d.ts +0 -16
  326. package/dist/obis-observer/commands/uplink/SetShortNameResponse.js +0 -43
  327. package/dist/obis-observer/commands/uplink/SetShortNameResponse.js.map +0 -1
  328. package/dist/obis-observer/constants/shortNames.js +0 -228
  329. package/dist/obis-observer/constants/shortNames.js.map +0 -1
@@ -0,0 +1,43 @@
1
+ import Command from '../../Command.js';
2
+ import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
3
+ import { UPLINK } from '../../constants/directions.js';
4
+ const COMMAND_ID = 0x41;
5
+ const examples = [
6
+ {
7
+ name: 'response to GetObisIdList with two obis id',
8
+ parameters: {
9
+ requestId: 3,
10
+ obisIdList: [197, 198]
11
+ },
12
+ hex: { header: '41 03', body: '03 c5 c6' }
13
+ }
14
+ ];
15
+ class GetObisIdListResponse extends Command {
16
+ constructor(parameters) {
17
+ super();
18
+ this.parameters = parameters;
19
+ this.size = REQUEST_ID_SIZE + parameters.obisIdList.length;
20
+ }
21
+ static fromBytes(data) {
22
+ const buffer = new CommandBinaryBuffer(data);
23
+ const requestId = buffer.getUint8();
24
+ const obisIdList = [...new Array(data.length - REQUEST_ID_SIZE)].map(() => buffer.getUint8());
25
+ return new GetObisIdListResponse({ requestId, obisIdList });
26
+ }
27
+ toBytes() {
28
+ if (typeof this.size !== 'number') {
29
+ throw new Error('unknown or invalid size');
30
+ }
31
+ const buffer = new CommandBinaryBuffer(this.size);
32
+ const { requestId, obisIdList } = this.parameters;
33
+ buffer.setUint8(requestId);
34
+ obisIdList.forEach(obisId => buffer.setUint8(obisId));
35
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
36
+ }
37
+ }
38
+ GetObisIdListResponse.id = COMMAND_ID;
39
+ GetObisIdListResponse.directionType = UPLINK;
40
+ GetObisIdListResponse.examples = examples;
41
+ GetObisIdListResponse.hasParameters = true;
42
+ export default GetObisIdListResponse;
43
+ //# sourceMappingURL=GetObisIdListResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetObisIdListResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObisIdListResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,MAAM,E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S,CAAC,CAAC;QAC3B,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QAEtD,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAjCe,wBAAE,GAAG,UAAU,CAAC;AAEhB,mCAAa,GAAG,MAAM,CAAC;AAEvB,8BAAQ,GAAG,QAAQ,CAAC;AAEpB,mCAAa,GAAG,IAAI,CAAC;AA+BzC,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters, IObisProfile, IObis } from '../../CommandBinaryBuffer.js';
3
+ interface IGetObisInfoResponseParameters extends ICommandParameters {
4
+ obis?: IObis;
5
+ obisProfile?: IObisProfile;
6
+ }
7
+ declare class GetObisInfoResponse extends Command {
8
+ parameters: IGetObisInfoResponseParameters;
9
+ constructor(parameters: IGetObisInfoResponseParameters);
10
+ static readonly id = 75;
11
+ static readonly directionType = 2;
12
+ static readonly examples: TCommandExampleList;
13
+ static readonly hasParameters = true;
14
+ static fromBytes(data: Uint8Array): GetObisInfoResponse;
15
+ toBytes(): Uint8Array;
16
+ }
17
+ export default GetObisInfoResponse;
@@ -2,10 +2,10 @@ import Command from '../../Command.js';
2
2
  import CommandBinaryBuffer, { REQUEST_ID_SIZE, OBIS_PROFILE_SIZE } from '../../CommandBinaryBuffer.js';
3
3
  import { UPLINK } from '../../constants/directions.js';
4
4
  import { contentTypes } from '../../constants/index.js';
5
- const COMMAND_ID = 0x0c;
5
+ const COMMAND_ID = 0x4b;
6
6
  const examples = [
7
7
  {
8
- name: 'short name info with obis code 0.9.1 and obis profile',
8
+ name: 'response to GetObisInfo with obis code 0.9.1 and obis profile',
9
9
  parameters: {
10
10
  requestId: 3,
11
11
  obis: {
@@ -25,14 +25,14 @@ const examples = [
25
25
  }
26
26
  }
27
27
  },
28
- hex: { header: '0c', body: '0b 03 02 00 09 01 01 58 02 14 3d 15' }
28
+ hex: { header: '4b 0b', body: '03 02 00 09 01 01 58 02 14 3d 15' }
29
29
  }
30
30
  ];
31
- class GetShortNameInfoResponse extends Command {
31
+ class GetObisInfoResponse extends Command {
32
32
  constructor(parameters) {
33
33
  super();
34
34
  this.parameters = parameters;
35
- let size = 1 + REQUEST_ID_SIZE;
35
+ let size = REQUEST_ID_SIZE;
36
36
  if (parameters.obis) {
37
37
  size += CommandBinaryBuffer.getObisSize(parameters.obis);
38
38
  }
@@ -43,7 +43,7 @@ class GetShortNameInfoResponse extends Command {
43
43
  }
44
44
  static fromBytes(data) {
45
45
  const buffer = new CommandBinaryBuffer(data);
46
- let size = buffer.getUint8() - REQUEST_ID_SIZE;
46
+ let size = data.length - REQUEST_ID_SIZE;
47
47
  const requestId = buffer.getUint8();
48
48
  let obis;
49
49
  let obisProfile;
@@ -54,7 +54,7 @@ class GetShortNameInfoResponse extends Command {
54
54
  if (size > 0) {
55
55
  obisProfile = buffer.getObisProfile();
56
56
  }
57
- return new GetShortNameInfoResponse({ requestId, obis, obisProfile });
57
+ return new GetObisInfoResponse({ requestId, obis, obisProfile });
58
58
  }
59
59
  toBytes() {
60
60
  if (typeof this.size !== 'number') {
@@ -62,7 +62,6 @@ class GetShortNameInfoResponse extends Command {
62
62
  }
63
63
  const buffer = new CommandBinaryBuffer(this.size);
64
64
  const { requestId, obis, obisProfile } = this.parameters;
65
- buffer.setUint8(this.size - 1);
66
65
  buffer.setUint8(requestId);
67
66
  if (obis) {
68
67
  buffer.setObis(obis);
@@ -73,9 +72,9 @@ class GetShortNameInfoResponse extends Command {
73
72
  return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
74
73
  }
75
74
  }
76
- GetShortNameInfoResponse.id = COMMAND_ID;
77
- GetShortNameInfoResponse.directionType = UPLINK;
78
- GetShortNameInfoResponse.examples = examples;
79
- GetShortNameInfoResponse.hasParameters = true;
80
- export default GetShortNameInfoResponse;
81
- //# sourceMappingURL=GetShortNameInfoResponse.js.map
75
+ GetObisInfoResponse.id = COMMAND_ID;
76
+ GetObisInfoResponse.directionType = UPLINK;
77
+ GetObisInfoResponse.examples = examples;
78
+ GetObisInfoResponse.hasParameters = true;
79
+ export default GetObisInfoResponse;
80
+ //# sourceMappingURL=GetObisInfoResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetObisInfoResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObisInfoResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAE,iBAAiB,EAA0C,MAAM,8BAA8B,CAAC;AAC9I,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAWtD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,+DAA+D;QACrE,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,IAAI,EAAE;gBACF,CAAC,EAAE,CAAC;gBACJ,CAAC,EAAE,CAAC;gBACJ,CAAC,EAAE,CAAC;aACP;YACD,WAAW,EAAE;gBACT,aAAa,EAAE,GAAG;gBAClB,aAAa,EAAE,GAAG;gBAClB,cAAc,EAAE,EAAE;gBAClB,KAAK,EAAE;oBACH,WAAW,EAAE,YAAY,CAAC,MAAM;oBAChC,YAAY,EAAE,IAAI;oBAClB,eAAe,EAAE,IAAI;oBACrB,eAAe,EAAE,KAAK;iBACzB;aACJ;SACJ;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,kCAAkC,EAAC;KACnE;CACJ,CAAC;AAsCF,MAAM,mBAAoB,SAAQ,OAAO;IACrC,YAAqB,UAA0C;QAC3D,KAAK,EAAE,CAAC;QADS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SAAS,CAAC,CAAC;QAE3B,IAAK,IAAI,EAAG;YACR,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SACxB;QAED,IAAK,WAAW,EAAG;YACf,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;SACtC;QAED,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AApDe,sBAAE,GAAG,UAAU,CAAC;AAEhB,iCAAa,GAAG,MAAM,CAAC;AAEvB,4BAAQ,GAAG,QAAQ,CAAC;AAEpB,iCAAa,GAAG,IAAI,CAAC;AAkDzC,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters, IObisProfile } from '../../CommandBinaryBuffer.js';
3
+ interface IGetObisProfileResponseParameters extends ICommandParameters {
4
+ obisProfile: IObisProfile;
5
+ }
6
+ declare class GetObisProfileResponse extends Command {
7
+ parameters: IGetObisProfileResponseParameters;
8
+ constructor(parameters: IGetObisProfileResponseParameters);
9
+ static readonly id = 73;
10
+ static readonly directionType = 2;
11
+ static readonly examples: TCommandExampleList;
12
+ static readonly hasParameters = true;
13
+ static fromBytes(data: Uint8Array): GetObisProfileResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default GetObisProfileResponse;
@@ -2,11 +2,11 @@ import Command from '../../Command.js';
2
2
  import CommandBinaryBuffer, { REQUEST_ID_SIZE, OBIS_PROFILE_SIZE } from '../../CommandBinaryBuffer.js';
3
3
  import { UPLINK } from '../../constants/directions.js';
4
4
  import { contentTypes } from '../../constants/index.js';
5
- const COMMAND_ID = 0x0a;
5
+ const COMMAND_ID = 0x49;
6
6
  const COMMAND_SIZE = REQUEST_ID_SIZE + OBIS_PROFILE_SIZE;
7
7
  const examples = [
8
8
  {
9
- name: 'profile for short name 121',
9
+ name: 'response to GetObisProfile',
10
10
  parameters: {
11
11
  requestId: 3,
12
12
  obisProfile: {
@@ -21,10 +21,10 @@ const examples = [
21
21
  }
22
22
  }
23
23
  },
24
- hex: { header: '0a', body: '03 01 58 02 14 3d 13' }
24
+ hex: { header: '49 07', body: '03 01 58 02 14 3d 13' }
25
25
  }
26
26
  ];
27
- class GetShortNameProfileResponse extends Command {
27
+ class GetObisProfileResponse extends Command {
28
28
  constructor(parameters) {
29
29
  super();
30
30
  this.parameters = parameters;
@@ -34,7 +34,7 @@ class GetShortNameProfileResponse extends Command {
34
34
  const buffer = new CommandBinaryBuffer(data);
35
35
  const requestId = buffer.getUint8();
36
36
  const obisProfile = buffer.getObisProfile();
37
- return new GetShortNameProfileResponse({ requestId, obisProfile });
37
+ return new GetObisProfileResponse({ requestId, obisProfile });
38
38
  }
39
39
  toBytes() {
40
40
  if (typeof this.size !== 'number') {
@@ -47,9 +47,9 @@ class GetShortNameProfileResponse extends Command {
47
47
  return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
48
48
  }
49
49
  }
50
- GetShortNameProfileResponse.id = COMMAND_ID;
51
- GetShortNameProfileResponse.directionType = UPLINK;
52
- GetShortNameProfileResponse.examples = examples;
53
- GetShortNameProfileResponse.hasParameters = true;
54
- export default GetShortNameProfileResponse;
55
- //# sourceMappingURL=GetShortNameProfileResponse.js.map
50
+ GetObisProfileResponse.id = COMMAND_ID;
51
+ GetObisProfileResponse.directionType = UPLINK;
52
+ GetObisProfileResponse.examples = examples;
53
+ GetObisProfileResponse.hasParameters = true;
54
+ export default GetObisProfileResponse;
55
+ //# sourceMappingURL=GetObisProfileResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetObisProfileResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObisProfileResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAE,iBAAiB,EAAmC,MAAM,8BAA8B,CAAC;AACvI,OAAO,E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AAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,MAAM,EAAC,SAAS,EAAE,WAAW,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAEjD,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAEnC,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAhCe,yBAAE,GAAG,UAAU,CAAC;AAEhB,oCAAa,GAAG,MAAM,CAAC;AAEvB,+BAAQ,GAAG,QAAQ,CAAC;AAEpB,oCAAa,GAAG,IAAI,CAAC;AA8BzC,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetObserverCapabilitiesResponseParameters extends ICommandParameters {
4
+ maxMeterProfilesNumber: number;
5
+ maxMetersNumber: number;
6
+ maxObisProfilesNumber: number;
7
+ isMultiModeSupported: boolean;
8
+ }
9
+ declare class GetObserverCapabilitiesResponse extends Command {
10
+ parameters: IGetObserverCapabilitiesResponseParameters;
11
+ constructor(parameters: IGetObserverCapabilitiesResponseParameters);
12
+ static readonly id = 4;
13
+ static readonly directionType = 2;
14
+ static readonly examples: TCommandExampleList;
15
+ static readonly hasParameters = true;
16
+ static fromBytes(data: Uint8Array): GetObserverCapabilitiesResponse;
17
+ toBytes(): Uint8Array;
18
+ }
19
+ export default GetObserverCapabilitiesResponse;
@@ -0,0 +1,53 @@
1
+ import Command from '../../Command.js';
2
+ import { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
3
+ import { UPLINK } from '../../constants/directions.js';
4
+ const COMMAND_ID = 0x04;
5
+ const examples = [
6
+ {
7
+ name: 'response to GetObserverCapabilities',
8
+ parameters: {
9
+ requestId: 7,
10
+ maxMeterProfilesNumber: 8,
11
+ maxMetersNumber: 8,
12
+ maxObisProfilesNumber: 255,
13
+ isMultiModeSupported: true
14
+ },
15
+ hex: {
16
+ header: '04 05',
17
+ body: '07 08 08 ff 01'
18
+ }
19
+ }
20
+ ];
21
+ class GetObserverCapabilitiesResponse extends Command {
22
+ constructor(parameters) {
23
+ super();
24
+ this.parameters = parameters;
25
+ this.size = REQUEST_ID_SIZE + 4;
26
+ }
27
+ static fromBytes(data) {
28
+ const [requestId, maxMeterProfilesNumber, maxMetersNumber, maxObisProfilesNumber, isMultiModeSupported] = data;
29
+ return new GetObserverCapabilitiesResponse({
30
+ requestId,
31
+ maxMeterProfilesNumber,
32
+ maxMetersNumber,
33
+ maxObisProfilesNumber,
34
+ isMultiModeSupported: isMultiModeSupported !== 0
35
+ });
36
+ }
37
+ toBytes() {
38
+ const { parameters } = this;
39
+ return Command.toBytes(COMMAND_ID, new Uint8Array([
40
+ parameters.requestId,
41
+ parameters.maxMeterProfilesNumber,
42
+ parameters.maxMetersNumber,
43
+ parameters.maxObisProfilesNumber,
44
+ parameters.isMultiModeSupported ? 1 : 0
45
+ ]));
46
+ }
47
+ }
48
+ GetObserverCapabilitiesResponse.id = COMMAND_ID;
49
+ GetObserverCapabilitiesResponse.directionType = UPLINK;
50
+ GetObserverCapabilitiesResponse.examples = examples;
51
+ GetObserverCapabilitiesResponse.hasParameters = true;
52
+ export default GetObserverCapabilitiesResponse;
53
+ //# sourceMappingURL=GetObserverCapabilitiesResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetObserverCapabilitiesResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObserverCapabilitiesResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAcrD,MAAM,UAAU,GAAG,IAAI,CAAC;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CAAC;AAwCzC,eAAe,+BAA+B,CAAC"}
@@ -1,18 +1,18 @@
1
1
  import Command, { TCommandExampleList } from '../../Command.js';
2
2
  import { ICommandParameters, IVersion } from '../../CommandBinaryBuffer.js';
3
- interface IGetDeviceInfoResponseParameters extends ICommandParameters {
3
+ interface IGetObserverInfoResponseParameters extends ICommandParameters {
4
4
  softwareVersion: IVersion;
5
5
  hardwareVersion: IVersion;
6
6
  deviceName: string;
7
7
  }
8
- declare class GetDeviceInfoResponse extends Command {
9
- parameters: IGetDeviceInfoResponseParameters;
10
- constructor(parameters: IGetDeviceInfoResponseParameters);
11
- static readonly id = 33;
8
+ declare class GetObserverInfoResponse extends Command {
9
+ parameters: IGetObserverInfoResponseParameters;
10
+ constructor(parameters: IGetObserverInfoResponseParameters);
11
+ static readonly id = 2;
12
12
  static readonly directionType = 2;
13
13
  static readonly examples: TCommandExampleList;
14
14
  static readonly hasParameters = true;
15
- static fromBytes(data: Uint8Array): GetDeviceInfoResponse;
15
+ static fromBytes(data: Uint8Array): GetObserverInfoResponse;
16
16
  toBytes(): Uint8Array;
17
17
  }
18
- export default GetDeviceInfoResponse;
18
+ export default GetObserverInfoResponse;
@@ -1,10 +1,10 @@
1
1
  import Command from '../../Command.js';
2
2
  import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
3
3
  import { UPLINK } from '../../constants/directions.js';
4
- const COMMAND_ID = 0x21;
4
+ const COMMAND_ID = 0x02;
5
5
  const examples = [
6
6
  {
7
- name: 'response from device "Jooby Electra RM LoraWan 1D485 EU"',
7
+ name: 'response to GetObserverInfo with device name "Jooby Electra RM LoraWan 1D485 EU"',
8
8
  parameters: {
9
9
  requestId: 7,
10
10
  softwareVersion: {
@@ -18,25 +18,24 @@ const examples = [
18
18
  deviceName: 'Jooby Electra RM LoraWan 1D485 EU'
19
19
  },
20
20
  hex: {
21
- header: '21',
22
- body: '27 07 00 01 01 01 21 4a 6f 6f 62 79 20 45 6c 65 63 74 72 61 20 52 4d 20 4c 6f 72 61 57 61 6e 20 31 44 34 38 35 20 45 55'
21
+ header: '02 27',
22
+ body: '07 00 01 01 01 21 4a 6f 6f 62 79 20 45 6c 65 63 74 72 61 20 52 4d 20 4c 6f 72 61 57 61 6e 20 31 44 34 38 35 20 45 55'
23
23
  }
24
24
  }
25
25
  ];
26
- class GetDeviceInfoResponse extends Command {
26
+ class GetObserverInfoResponse extends Command {
27
27
  constructor(parameters) {
28
28
  super();
29
29
  this.parameters = parameters;
30
- this.size = 1 + REQUEST_ID_SIZE + 2 + 2 + 1 + parameters.deviceName.length;
30
+ this.size = REQUEST_ID_SIZE + 2 + 2 + 1 + parameters.deviceName.length;
31
31
  }
32
32
  static fromBytes(data) {
33
33
  const buffer = new CommandBinaryBuffer(data);
34
- buffer.seek(buffer.offset + 1);
35
34
  const requestId = buffer.getUint8();
36
35
  const softwareVersion = buffer.getVersion();
37
36
  const hardwareVersion = buffer.getVersion();
38
37
  const deviceName = buffer.getString();
39
- return new GetDeviceInfoResponse({ requestId, softwareVersion, hardwareVersion, deviceName });
38
+ return new GetObserverInfoResponse({ requestId, softwareVersion, hardwareVersion, deviceName });
40
39
  }
41
40
  toBytes() {
42
41
  if (typeof this.size !== 'number') {
@@ -44,7 +43,6 @@ class GetDeviceInfoResponse extends Command {
44
43
  }
45
44
  const buffer = new CommandBinaryBuffer(this.size);
46
45
  const { requestId, softwareVersion, hardwareVersion, deviceName } = this.parameters;
47
- buffer.setUint8(this.size - 1);
48
46
  buffer.setUint8(requestId);
49
47
  buffer.setVersion(softwareVersion);
50
48
  buffer.setVersion(hardwareVersion);
@@ -52,9 +50,9 @@ class GetDeviceInfoResponse extends Command {
52
50
  return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
53
51
  }
54
52
  }
55
- GetDeviceInfoResponse.id = COMMAND_ID;
56
- GetDeviceInfoResponse.directionType = UPLINK;
57
- GetDeviceInfoResponse.examples = examples;
58
- GetDeviceInfoResponse.hasParameters = true;
59
- export default GetDeviceInfoResponse;
60
- //# sourceMappingURL=GetDeviceInfoResponse.js.map
53
+ GetObserverInfoResponse.id = COMMAND_ID;
54
+ GetObserverInfoResponse.directionType = UPLINK;
55
+ GetObserverInfoResponse.examples = examples;
56
+ GetObserverInfoResponse.hasParameters = true;
57
+ export default GetObserverInfoResponse;
58
+ //# sourceMappingURL=GetObserverInfoResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetObserverInfoResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObserverInfoResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAA+B,MAAM,8BAA8B,CAAC;AAChH,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAarD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,kFAAkF;QACxF,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,eAAe,EAAE;gBACb,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,CAAC;aACX;YACD,eAAe,EAAE;gBACb,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,CAAC;aACX;YACD,UAAU,EAAE,mCAAmC;SAClD;QACD,GAAG,EAAE;YACD,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,sHAAsH;SAC/H;KACJ;CACJ,CAAC;AAqCF,MAAM,uBAAwB,SAAQ,OAAO;IACzC,YAAqB,UAA8C;QAC/D,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAoC;QAI/D,IAAI,CAAC,IAAI,GAAG,eAAe,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC;IAC3E,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpC,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAC5C,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAE5C,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAEtC,OAAO,IAAI,uBAAuB,CAAC,EAAC,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAC,CAAC,CAAC;IAClG,CAAC;IAGD,OAAO;QACH,IAAK,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAG;YACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC9C;QAED,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,MAAM,EAAC,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAElF,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;QACnC,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;QACnC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAE7B,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AApCe,0BAAE,GAAG,UAAU,CAAC;AAEhB,qCAAa,GAAG,MAAM,CAAC;AAEvB,gCAAQ,GAAG,QAAQ,CAAC;AAEpB,qCAAa,GAAG,IAAI,CAAC;AAkCzC,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetObserverSingleModeResponseParameters extends ICommandParameters {
4
+ isSingleMode: boolean;
5
+ }
6
+ declare class GetObserverSingleModeResponse extends Command {
7
+ parameters: IGetObserverSingleModeResponseParameters;
8
+ constructor(parameters: IGetObserverSingleModeResponseParameters);
9
+ static readonly id = 14;
10
+ static readonly directionType = 2;
11
+ static readonly examples: TCommandExampleList;
12
+ static readonly hasParameters = true;
13
+ static fromBytes([requestId, isSingleMode]: Uint8Array): GetObserverSingleModeResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default GetObserverSingleModeResponse;
@@ -0,0 +1,33 @@
1
+ import Command from '../../Command.js';
2
+ import { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
3
+ import { UPLINK } from '../../constants/directions.js';
4
+ const COMMAND_ID = 0x0e;
5
+ const examples = [
6
+ {
7
+ name: 'response to GetObserverSingleMode',
8
+ parameters: {
9
+ requestId: 7,
10
+ isSingleMode: true
11
+ },
12
+ hex: { header: '0e 02', body: '07 01' }
13
+ }
14
+ ];
15
+ class GetObserverSingleModeResponse extends Command {
16
+ constructor(parameters) {
17
+ super();
18
+ this.parameters = parameters;
19
+ this.size = REQUEST_ID_SIZE + 4;
20
+ }
21
+ static fromBytes([requestId, isSingleMode]) {
22
+ return new GetObserverSingleModeResponse({ requestId, isSingleMode: isSingleMode !== 0 });
23
+ }
24
+ toBytes() {
25
+ return Command.toBytes(COMMAND_ID, new Uint8Array([this.parameters.requestId, this.parameters.isSingleMode ? 1 : 0]));
26
+ }
27
+ }
28
+ GetObserverSingleModeResponse.id = COMMAND_ID;
29
+ GetObserverSingleModeResponse.directionType = UPLINK;
30
+ GetObserverSingleModeResponse.examples = examples;
31
+ GetObserverSingleModeResponse.hasParameters = true;
32
+ export default GetObserverSingleModeResponse;
33
+ //# sourceMappingURL=GetObserverSingleModeResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetObserverSingleModeResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObserverSingleModeResponse.ts"],"names":[],"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Buffer.js';
3
+ interface IGetObserverUptimeResponseParameters extends ICommandParameters {
4
+ uptime: number;
5
+ }
6
+ declare class GetObserverUptimeResponse extends Command {
7
+ parameters: IGetObserverUptimeResponseParameters;
8
+ constructor(parameters: IGetObserverUptimeResponseParameters);
9
+ static readonly id = 6;
10
+ static readonly directionType = 2;
11
+ static readonly examples: TCommandExampleList;
12
+ static readonly hasParameters = true;
13
+ static fromBytes(data: Uint8Array): GetObserverUptimeResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default GetObserverUptimeResponse;
@@ -0,0 +1,44 @@
1
+ import Command from '../../Command.js';
2
+ import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
3
+ import { UPLINK } from '../../constants/directions.js';
4
+ const COMMAND_ID = 0x06;
5
+ const examples = [
6
+ {
7
+ name: 'response to GetObserverUptime',
8
+ parameters: {
9
+ requestId: 7,
10
+ uptime: 4016
11
+ },
12
+ hex: { header: '06 05', body: '07 00 00 0f b0' }
13
+ }
14
+ ];
15
+ class GetObserverUptimeResponse extends Command {
16
+ constructor(parameters) {
17
+ super();
18
+ this.parameters = parameters;
19
+ this.size = REQUEST_ID_SIZE + 4;
20
+ }
21
+ static fromBytes(data) {
22
+ const buffer = new CommandBinaryBuffer(data);
23
+ return new GetObserverUptimeResponse({
24
+ requestId: buffer.getUint8(),
25
+ uptime: buffer.getUint32()
26
+ });
27
+ }
28
+ toBytes() {
29
+ if (typeof this.size !== 'number') {
30
+ throw new Error('unknown or invalid size');
31
+ }
32
+ const buffer = new CommandBinaryBuffer(this.size);
33
+ const { requestId, uptime } = this.parameters;
34
+ buffer.setUint8(requestId);
35
+ buffer.setUint32(uptime);
36
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
37
+ }
38
+ }
39
+ GetObserverUptimeResponse.id = COMMAND_ID;
40
+ GetObserverUptimeResponse.directionType = UPLINK;
41
+ GetObserverUptimeResponse.examples = examples;
42
+ GetObserverUptimeResponse.hasParameters = true;
43
+ export default GetObserverUptimeResponse;
44
+ //# sourceMappingURL=GetObserverUptimeResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetObserverUptimeResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObserverUptimeResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAUrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,+BAA+B;QACrC,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,MAAM,EAAE,IAAI;SACf;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAC;KACjD;CACJ,CAAC;AAyBF,MAAM,yBAA0B,SAAQ,OAAO;IAC3C,YAAqB,UAAgD;QACjE,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAsC;QAGjE,IAAI,CAAC,IAAI,GAAG,eAAe,GAAG,CAAC,CAAC;IACpC,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,yBAAyB,CAAC;YACjC,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC5B,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE;SAC7B,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,IAAK,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAG;YACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC9C;QAED,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,MAAM,EAAC,SAAS,EAAE,MAAM,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAE5C,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAEzB,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAhCe,4BAAE,GAAG,UAAU,CAAC;AAEhB,uCAAa,GAAG,MAAM,CAAC;AAEvB,kCAAQ,GAAG,QAAQ,CAAC;AAEpB,uCAAa,GAAG,IAAI,CAAC;AA8BzC,eAAe,yBAAyB,CAAC"}
@@ -1,14 +1,14 @@
1
1
  import Command, { TCommandExampleList } from '../../Command.js';
2
- import { IShortNameFloat } from '../../CommandBinaryBuffer.js';
2
+ import { IObisValueFloat } from '../../CommandBinaryBuffer.js';
3
3
  import { TTime2000 } from '../../../utils/time.js';
4
4
  interface IObservationReportParameters {
5
5
  time2000: TTime2000;
6
- shortNameList: Array<IShortNameFloat>;
6
+ obisValueList: Array<IObisValueFloat>;
7
7
  }
8
8
  declare class ObservationReport extends Command {
9
9
  parameters: IObservationReportParameters;
10
10
  constructor(parameters: IObservationReportParameters);
11
- static readonly id = 26;
11
+ static readonly id = 81;
12
12
  static readonly directionType = 2;
13
13
  static readonly examples: TCommandExampleList;
14
14
  static readonly hasParameters = true;
@@ -1,51 +1,50 @@
1
1
  import Command from '../../Command.js';
2
2
  import CommandBinaryBuffer, { DATE_TIME_SIZE } from '../../CommandBinaryBuffer.js';
3
3
  import { UPLINK } from '../../constants/directions.js';
4
- const COMMAND_ID = 0x1a;
4
+ const COMMAND_ID = 0x51;
5
5
  const examples = [
6
6
  {
7
- name: 'get observation report from 2023.12.23 00:00:00 GMT',
7
+ name: 'observation report from 2023.12.23 00:00:00 GMT',
8
8
  parameters: {
9
9
  time2000: 756604800,
10
- shortNameList: [
10
+ obisValueList: [
11
11
  { code: 50, content: 34.33 },
12
12
  { code: 56, content: 45.33 }
13
13
  ]
14
14
  },
15
- hex: { header: '1a', body: '0e 2d 18 df 80 32 42 09 51 ec 38 42 35 51 ec' }
15
+ hex: { header: '51 0e', body: '2d 18 df 80 32 42 09 51 ec 38 42 35 51 ec' }
16
16
  }
17
17
  ];
18
18
  class ObservationReport extends Command {
19
19
  constructor(parameters) {
20
20
  super();
21
21
  this.parameters = parameters;
22
- let size = 1 + DATE_TIME_SIZE;
23
- this.parameters.shortNameList.forEach(shortName => {
24
- size += CommandBinaryBuffer.getShortNameContentSize(shortName);
22
+ let size = DATE_TIME_SIZE;
23
+ this.parameters.obisValueList.forEach(obisValue => {
24
+ size += CommandBinaryBuffer.getObisContentSize(obisValue);
25
25
  });
26
26
  this.size = size;
27
27
  }
28
28
  static fromBytes(data) {
29
29
  const buffer = new CommandBinaryBuffer(data);
30
- let size = buffer.getUint8() - DATE_TIME_SIZE;
30
+ let size = data.length - DATE_TIME_SIZE;
31
31
  const time2000 = buffer.getUint32();
32
- const shortNameList = [];
32
+ const obisValueList = [];
33
33
  while (size > 0) {
34
- const shortName = buffer.getShortNameFloat();
35
- size -= CommandBinaryBuffer.getShortNameContentSize(shortName);
36
- shortNameList.push(shortName);
34
+ const obisValue = buffer.getObisValueFloat();
35
+ size -= CommandBinaryBuffer.getObisContentSize(obisValue);
36
+ obisValueList.push(obisValue);
37
37
  }
38
- return new ObservationReport({ time2000, shortNameList });
38
+ return new ObservationReport({ time2000, obisValueList });
39
39
  }
40
40
  toBytes() {
41
41
  if (typeof this.size !== 'number') {
42
42
  throw new Error('unknown or invalid size');
43
43
  }
44
44
  const buffer = new CommandBinaryBuffer(this.size);
45
- const { time2000, shortNameList } = this.parameters;
46
- buffer.setUint8(this.size - 1);
45
+ const { time2000, obisValueList } = this.parameters;
47
46
  buffer.setUint32(time2000);
48
- shortNameList.forEach(shortName => buffer.setShortNameFloat(shortName));
47
+ obisValueList.forEach(obisValue => buffer.setObisValueFloat(obisValue));
49
48
  return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
50
49
  }
51
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ObservationReport.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/ObservationReport.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,cAAc,EAAkB,MAAM,8BAA8B,CAAC;AAClG,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAcrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,qDAAqD;QAC3D,UAAU,EAAE;YACR,QAAQ,EAAE,SAAS;YACnB,aAAa,EAAE;gBACX,EAAC,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAC;gBAC1B,EAAC,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAC;aAC7B;SACJ;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,8CAA8C,EAAC;KAC5E;CACJ,CAAC;AA0BF,MAAM,iBAAkB,SAAQ,OAAO;IACnC,YAAqB,UAAwC;QACzD,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAA8B;QAIzD,IAAI,IAAI,GAAG,CAAC,GAAG,cAAc,CAAC;QAE9B,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;YAC9C,IAAI,IAAI,mBAAmB,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,IAAI,IAAI,GAAG,MAAM,CAAC,QAAQ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