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 @@
1
+ {"version":3,"file":"GetMeter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C,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAEvD,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACzB,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAE3B,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAlCe,uBAAE,GAAG,UAAU,CAAC;AAEhB,kCAAa,GAAG,MAAM,CAAC;AAEvB,6BAAQ,GAAG,QAAQ,CAAC;AAEpB,kCAAa,GAAG,IAAI,CAAC;AAgCzC,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetMeterIdListResponseParameters extends ICommandParameters {
4
+ meterIdList: Array<number>;
5
+ }
6
+ declare class GetMeterIdListResponse extends Command {
7
+ parameters: IGetMeterIdListResponseParameters;
8
+ constructor(parameters: IGetMeterIdListResponseParameters);
9
+ static readonly id = 117;
10
+ static readonly directionType = 2;
11
+ static readonly examples: TCommandExampleList;
12
+ static readonly hasParameters = true;
13
+ static fromBytes(data: Uint8Array): GetMeterIdListResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default GetMeterIdListResponse;
@@ -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 = 0x75;
5
+ const examples = [
6
+ {
7
+ name: 'response to GetMeterIdList with two meterId',
8
+ parameters: {
9
+ requestId: 3,
10
+ meterIdList: [1, 2]
11
+ },
12
+ hex: { header: '75 03', body: '03 01 02' }
13
+ }
14
+ ];
15
+ class GetMeterIdListResponse extends Command {
16
+ constructor(parameters) {
17
+ super();
18
+ this.parameters = parameters;
19
+ this.size = REQUEST_ID_SIZE + parameters.meterIdList.length;
20
+ }
21
+ static fromBytes(data) {
22
+ const buffer = new CommandBinaryBuffer(data);
23
+ const requestId = buffer.getUint8();
24
+ const meterIdList = [...new Array(data.length - REQUEST_ID_SIZE)].map(() => buffer.getUint8());
25
+ return new GetMeterIdListResponse({ requestId, meterIdList });
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, meterIdList } = this.parameters;
33
+ buffer.setUint8(requestId);
34
+ meterIdList.forEach(meterId => buffer.setUint8(meterId));
35
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
36
+ }
37
+ }
38
+ GetMeterIdListResponse.id = COMMAND_ID;
39
+ GetMeterIdListResponse.directionType = UPLINK;
40
+ GetMeterIdListResponse.examples = examples;
41
+ GetMeterIdListResponse.hasParameters = true;
42
+ export default GetMeterIdListResponse;
43
+ //# sourceMappingURL=GetMeterIdListResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetMeterIdListResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetMeterIdListResponse.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,6CAA6C;QACnD,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;SACtB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAA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AM,CAAC;AAEvB,+BAAQ,GAAG,QAAQ,CAAC;AAEpB,oCAAa,GAAG,IAAI,CAAC;AA+BzC,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetMeterIdResponseParameters extends ICommandParameters {
4
+ meterId: number;
5
+ }
6
+ declare class GetMeterIdResponse extends Command {
7
+ parameters: IGetMeterIdResponseParameters;
8
+ constructor(parameters: IGetMeterIdResponseParameters);
9
+ static readonly id = 116;
10
+ static readonly directionType = 2;
11
+ static readonly examples: TCommandExampleList;
12
+ static readonly hasParameters = true;
13
+ static fromBytes([requestId, meterId]: Uint8Array): GetMeterIdResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default GetMeterIdResponse;
@@ -0,0 +1,34 @@
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 = 0x74;
5
+ const COMMAND_SIZE = REQUEST_ID_SIZE + 1;
6
+ const examples = [
7
+ {
8
+ name: 'get meter id response',
9
+ parameters: {
10
+ requestId: 2,
11
+ meterId: 1
12
+ },
13
+ hex: { header: '74 02', body: '02 01' }
14
+ }
15
+ ];
16
+ class GetMeterIdResponse extends Command {
17
+ constructor(parameters) {
18
+ super();
19
+ this.parameters = parameters;
20
+ this.size = COMMAND_SIZE;
21
+ }
22
+ static fromBytes([requestId, meterId]) {
23
+ return new GetMeterIdResponse({ requestId, meterId });
24
+ }
25
+ toBytes() {
26
+ return Command.toBytes(COMMAND_ID, new Uint8Array([this.parameters.requestId, this.parameters.meterId]));
27
+ }
28
+ }
29
+ GetMeterIdResponse.id = COMMAND_ID;
30
+ GetMeterIdResponse.directionType = UPLINK;
31
+ GetMeterIdResponse.examples = examples;
32
+ GetMeterIdResponse.hasParameters = true;
33
+ export default GetMeterIdResponse;
34
+ //# sourceMappingURL=GetMeterIdResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetMeterIdResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetMeterIdResponse.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;AAUrD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,eAAe,GAAG,CAAC,CAAC;AAEzC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,uBAAuB;QAC7B,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,OAAO,EAAE,CAAC;SACb;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC;KACxC;CACJ,CAAC;AAyBF,MAAM,kBAAmB,SAAQ,OAAO;IACpC,YAAqB,UAAyC;QAC1D,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAA+B;QAG1D,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,CAAC,SAAS,EAAE,OAAO,CAAa;QAC/C,OAAO,IAAI,kBAAkB,CAAC,EAAC,SAAS,EAAE,OAAO,EAAC,CAAC,CAAC;IACxD,CAAC;IAGD,OAAO;QACH,OAAO,OAAO,CAAC,OAAO,CAClB,UAAU,EACV,IAAI,UAAU,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CACvE,CAAC;IACN,CAAC;;AApBe,qBAAE,GAAG,UAAU,CAAC;AAEhB,gCAAa,GAAG,MAAM,CAAC;AAEvB,2BAAQ,GAAG,QAAQ,CAAC;AAEpB,gCAAa,GAAG,IAAI,CAAC;AAkBzC,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetMeterInfoResponseParameters extends ICommandParameters {
4
+ meterProfileId?: number;
5
+ address: string;
6
+ }
7
+ declare class GetMeterInfoResponse extends Command {
8
+ parameters: IGetMeterInfoResponseParameters;
9
+ constructor(parameters: IGetMeterInfoResponseParameters);
10
+ static readonly id = 121;
11
+ static readonly directionType = 2;
12
+ static readonly examples: TCommandExampleList;
13
+ static readonly hasParameters = true;
14
+ static fromBytes(data: Uint8Array): GetMeterInfoResponse;
15
+ toBytes(): Uint8Array;
16
+ }
17
+ export default GetMeterInfoResponse;
@@ -0,0 +1,57 @@
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 = 0x79;
5
+ const INVALID_METER_PROFILE_ID = 0xff;
6
+ const examples = [
7
+ {
8
+ name: 'get meter info response with meterProfileId',
9
+ parameters: {
10
+ requestId: 2,
11
+ meterProfileId: 1,
12
+ address: 'ma2375'
13
+ },
14
+ hex: { header: '79 09', body: '02 01 06 6d 61 32 33 37 35' }
15
+ },
16
+ {
17
+ name: 'get meter info response without meterProfileId',
18
+ parameters: {
19
+ requestId: 2,
20
+ address: 'ma2375'
21
+ },
22
+ hex: { header: '79 09', body: '02 ff 06 6d 61 32 33 37 35' }
23
+ }
24
+ ];
25
+ class GetMeterInfoResponse extends Command {
26
+ constructor(parameters) {
27
+ super();
28
+ this.parameters = parameters;
29
+ this.size = REQUEST_ID_SIZE + 1 + 1 + parameters.address.length;
30
+ }
31
+ static fromBytes(data) {
32
+ const buffer = new CommandBinaryBuffer(data);
33
+ const requestId = buffer.getUint8();
34
+ const meterProfileId = buffer.getUint8();
35
+ const address = buffer.getString();
36
+ return meterProfileId === INVALID_METER_PROFILE_ID
37
+ ? new GetMeterInfoResponse({ requestId, address })
38
+ : new GetMeterInfoResponse({ requestId, meterProfileId, address });
39
+ }
40
+ toBytes() {
41
+ if (typeof this.size !== 'number') {
42
+ throw new Error('unknown or invalid size');
43
+ }
44
+ const buffer = new CommandBinaryBuffer(this.size);
45
+ const { requestId, meterProfileId, address } = this.parameters;
46
+ buffer.setUint8(requestId);
47
+ buffer.setUint8(meterProfileId || INVALID_METER_PROFILE_ID);
48
+ buffer.setString(address);
49
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
50
+ }
51
+ }
52
+ GetMeterInfoResponse.id = COMMAND_ID;
53
+ GetMeterInfoResponse.directionType = UPLINK;
54
+ GetMeterInfoResponse.examples = examples;
55
+ GetMeterInfoResponse.hasParameters = true;
56
+ export default GetMeterInfoResponse;
57
+ //# sourceMappingURL=GetMeterInfoResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetMeterInfoResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetMeterInfoResponse.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;AAYrD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAEtC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,6CAA6C;QACnD,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,cAAc,EAAE,CAAC;YACjB,OAAO,EAAE,QAAQ;SACpB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,4BAA4B,EAAC;KAC7D;IACD;QACI,IAAI,EAAE,gDAAgD;QACtD,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,OAAO,EAA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SAAS,CAAC,OAAO,CAAC,CAAC;QAE1B,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AApCe,uBAAE,GAAG,UAAU,CAAC;AAEhB,kCAAa,GAAG,MAAM,CAAC;AAEvB,6BAAQ,GAAG,QAAQ,CAAC;AAEpB,kCAAa,GAAG,IAAI,CAAC;AAkCzC,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetMeterProfileIdListResponseParameters extends ICommandParameters {
4
+ meterProfileIdList: Array<number>;
5
+ }
6
+ declare class GetMeterProfileIdListResponse extends Command {
7
+ parameters: IGetMeterProfileIdListResponseParameters;
8
+ constructor(parameters: IGetMeterProfileIdListResponseParameters);
9
+ static readonly id = 101;
10
+ static readonly directionType = 2;
11
+ static readonly examples: TCommandExampleList;
12
+ static readonly hasParameters = true;
13
+ static fromBytes(data: Uint8Array): GetMeterProfileIdListResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default GetMeterProfileIdListResponse;
@@ -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 = 0x65;
5
+ const examples = [
6
+ {
7
+ name: 'response to GetMeterProfileIdList with two meterProfileId',
8
+ parameters: {
9
+ requestId: 3,
10
+ meterProfileIdList: [1, 2]
11
+ },
12
+ hex: { header: '65 03', body: '03 01 02' }
13
+ }
14
+ ];
15
+ class GetMeterProfileIdListResponse extends Command {
16
+ constructor(parameters) {
17
+ super();
18
+ this.parameters = parameters;
19
+ this.size = REQUEST_ID_SIZE + parameters.meterProfileIdList.length;
20
+ }
21
+ static fromBytes(data) {
22
+ const buffer = new CommandBinaryBuffer(data);
23
+ const requestId = buffer.getUint8();
24
+ const meterProfileIdList = [...new Array(data.length - REQUEST_ID_SIZE)].map(() => buffer.getUint8());
25
+ return new GetMeterProfileIdListResponse({ requestId, meterProfileIdList });
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, meterProfileIdList } = this.parameters;
33
+ buffer.setUint8(requestId);
34
+ meterProfileIdList.forEach(meterProfileId => buffer.setUint8(meterProfileId));
35
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
36
+ }
37
+ }
38
+ GetMeterProfileIdListResponse.id = COMMAND_ID;
39
+ GetMeterProfileIdListResponse.directionType = UPLINK;
40
+ GetMeterProfileIdListResponse.examples = examples;
41
+ GetMeterProfileIdListResponse.hasParameters = true;
42
+ export default GetMeterProfileIdListResponse;
43
+ //# sourceMappingURL=GetMeterProfileIdListResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetMeterProfileIdListResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetMeterProfileIdListResponse.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,2DAA2D;QACjE,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,kBAAkB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;SAC7B;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAC;KAC3C;CACJ,CAAC;AAuBF,MAAM,6BAA8B,SAAQ,OAAO;IAC/C,YAAqB,UAAoD;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A+BzC,eAAe,6BAA6B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import Command, { TCommandExampleList } from '../../Command.js';
2
2
  import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
- interface IGetReadoutStateResponseParameters extends ICommandParameters {
3
+ interface IGetMeterReadoutStateResponseParameters extends ICommandParameters {
4
4
  lastSuccessfulTime: number;
5
5
  lastFailedTime: number;
6
6
  readoutAttempts: number;
@@ -14,14 +14,14 @@ interface IGetReadoutStateResponseParameters extends ICommandParameters {
14
14
  frameErrors: number;
15
15
  overrunErrors: number;
16
16
  }
17
- declare class GetReadoutStateResponse extends Command {
18
- parameters: IGetReadoutStateResponseParameters;
19
- constructor(parameters: IGetReadoutStateResponseParameters);
20
- static readonly id = 39;
17
+ declare class GetMeterReadoutStateResponse extends Command {
18
+ parameters: IGetMeterReadoutStateResponseParameters;
19
+ constructor(parameters: IGetMeterReadoutStateResponseParameters);
20
+ static readonly id = 130;
21
21
  static readonly directionType = 2;
22
22
  static readonly examples: TCommandExampleList;
23
23
  static readonly hasParameters = true;
24
- static fromBytes(data: Uint8Array): GetReadoutStateResponse;
24
+ static fromBytes(data: Uint8Array): GetMeterReadoutStateResponse;
25
25
  toBytes(): Uint8Array;
26
26
  }
27
- export default GetReadoutStateResponse;
27
+ export default GetMeterReadoutStateResponse;
@@ -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 = 0x27;
4
+ const COMMAND_ID = 0x82;
5
5
  const examples = [
6
6
  {
7
- name: 'simple response',
7
+ name: 'response to GetMeterReadoutState',
8
8
  parameters: {
9
9
  requestId: 3,
10
10
  lastSuccessfulTime: 127,
@@ -20,10 +20,10 @@ const examples = [
20
20
  frameErrors: 0,
21
21
  overrunErrors: 0
22
22
  },
23
- hex: { header: '27', body: '03 00 00 00 7f 00 00 00 c1 00 0e 00 0c 00 02 00 00 00 00 00 00 00' }
23
+ hex: { header: '82 16', body: '03 00 00 00 7f 00 00 00 c1 00 0e 00 0c 00 02 00 00 00 00 00 00 00' }
24
24
  }
25
25
  ];
26
- class GetReadoutStateResponse extends Command {
26
+ class GetMeterReadoutStateResponse extends Command {
27
27
  constructor(parameters) {
28
28
  super();
29
29
  this.parameters = parameters;
@@ -31,7 +31,7 @@ class GetReadoutStateResponse extends Command {
31
31
  }
32
32
  static fromBytes(data) {
33
33
  const buffer = new CommandBinaryBuffer(data);
34
- return new GetReadoutStateResponse({
34
+ return new GetMeterReadoutStateResponse({
35
35
  requestId: buffer.getUint8(),
36
36
  lastSuccessfulTime: buffer.getUint32(),
37
37
  lastFailedTime: buffer.getUint32(),
@@ -69,9 +69,9 @@ class GetReadoutStateResponse extends Command {
69
69
  return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
70
70
  }
71
71
  }
72
- GetReadoutStateResponse.id = COMMAND_ID;
73
- GetReadoutStateResponse.directionType = UPLINK;
74
- GetReadoutStateResponse.examples = examples;
75
- GetReadoutStateResponse.hasParameters = true;
76
- export default GetReadoutStateResponse;
77
- //# sourceMappingURL=GetReadoutStateResponse.js.map
72
+ GetMeterReadoutStateResponse.id = COMMAND_ID;
73
+ GetMeterReadoutStateResponse.directionType = UPLINK;
74
+ GetMeterReadoutStateResponse.examples = examples;
75
+ GetMeterReadoutStateResponse.hasParameters = true;
76
+ export default GetMeterReadoutStateResponse;
77
+ //# sourceMappingURL=GetMeterReadoutStateResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetMeterReadoutStateResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetMeterReadoutStateResponse.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,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,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACxC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;QAE1C,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAtDe,+BAAE,GAAG,UAAU,CAAC;AAEhB,0CAAa,GAAG,MAAM,CAAC;AAEvB,qCAAQ,GAAG,QAAQ,CAAC;AAEpB,0CAAa,GAAG,IAAI,CAAC;AAoDzC,eAAe,4BAA4B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetObisContentByIdResponseParameters extends ICommandParameters {
4
+ content: number;
5
+ }
6
+ declare class GetObisContentByIdResponse extends Command {
7
+ parameters: IGetObisContentByIdResponseParameters;
8
+ constructor(parameters: IGetObisContentByIdResponseParameters);
9
+ static readonly id = 78;
10
+ static readonly directionType = 2;
11
+ static readonly examples: TCommandExampleList;
12
+ static readonly hasParameters = true;
13
+ static fromBytes(data: Uint8Array): GetObisContentByIdResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default GetObisContentByIdResponse;
@@ -2,18 +2,18 @@ import roundNumber from '../../../utils/roundNumber.js';
2
2
  import Command from '../../Command.js';
3
3
  import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
4
4
  import { UPLINK } from '../../constants/directions.js';
5
- const COMMAND_ID = 0x18;
5
+ const COMMAND_ID = 0x4e;
6
6
  const examples = [
7
7
  {
8
- name: 'simple response',
8
+ name: 'response to GetObisContentById',
9
9
  parameters: {
10
10
  requestId: 121,
11
11
  content: 344.23
12
12
  },
13
- hex: { header: '18', body: '79 43 ac 1d 71' }
13
+ hex: { header: '4e 05', body: '79 43 ac 1d 71' }
14
14
  }
15
15
  ];
16
- class GetContentByShortNameResponse extends Command {
16
+ class GetObisContentByIdResponse extends Command {
17
17
  constructor(parameters) {
18
18
  super();
19
19
  this.parameters = parameters;
@@ -23,7 +23,7 @@ class GetContentByShortNameResponse extends Command {
23
23
  const buffer = new CommandBinaryBuffer(data);
24
24
  const requestId = buffer.getUint8();
25
25
  const content = roundNumber(buffer.getFloat32());
26
- return new GetContentByShortNameResponse({ requestId, content });
26
+ return new GetObisContentByIdResponse({ requestId, content });
27
27
  }
28
28
  toBytes() {
29
29
  if (typeof this.size !== 'number') {
@@ -36,9 +36,9 @@ class GetContentByShortNameResponse extends Command {
36
36
  return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
37
37
  }
38
38
  }
39
- GetContentByShortNameResponse.id = COMMAND_ID;
40
- GetContentByShortNameResponse.directionType = UPLINK;
41
- GetContentByShortNameResponse.examples = examples;
42
- GetContentByShortNameResponse.hasParameters = true;
43
- export default GetContentByShortNameResponse;
44
- //# sourceMappingURL=GetContentByShortNameResponse.js.map
39
+ GetObisContentByIdResponse.id = COMMAND_ID;
40
+ GetObisContentByIdResponse.directionType = UPLINK;
41
+ GetObisContentByIdResponse.examples = examples;
42
+ GetObisContentByIdResponse.hasParameters = true;
43
+ export default GetObisContentByIdResponse;
44
+ //# sourceMappingURL=GetObisContentByIdResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetObisContentByIdResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObisContentByIdResponse.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAWrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,gCAAgC;QACtC,UAAU,EAAE;YACR,SA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GAAG,IAAI,CAAC;AA8BzC,eAAe,0BAA0B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetObisContentByIdStringResponseParameters extends ICommandParameters {
4
+ content: string;
5
+ }
6
+ declare class GetObisContentByIdStringResponse extends Command {
7
+ parameters: IGetObisContentByIdStringResponseParameters;
8
+ constructor(parameters: IGetObisContentByIdStringResponseParameters);
9
+ static readonly id = 79;
10
+ static readonly directionType = 2;
11
+ static readonly examples: TCommandExampleList;
12
+ static readonly hasParameters = true;
13
+ static fromBytes(data: Uint8Array): GetObisContentByIdStringResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default GetObisContentByIdStringResponse;
@@ -1,29 +1,28 @@
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 = 0x19;
4
+ const COMMAND_ID = 0x4f;
5
5
  const examples = [
6
6
  {
7
- name: 'simple response',
7
+ name: 'response to GetObisContentById with string result',
8
8
  parameters: {
9
9
  requestId: 121,
10
10
  content: 'Total energy'
11
11
  },
12
- hex: { header: '19', body: '0e 79 0c 54 6f 74 61 6c 20 65 6e 65 72 67 79' }
12
+ hex: { header: '4f 0e', body: '79 0c 54 6f 74 61 6c 20 65 6e 65 72 67 79' }
13
13
  }
14
14
  ];
15
- class GetContentByShortNameStringResponse extends Command {
15
+ class GetObisContentByIdStringResponse extends Command {
16
16
  constructor(parameters) {
17
17
  super();
18
18
  this.parameters = parameters;
19
- this.size = REQUEST_ID_SIZE + 1 + this.parameters.content.length + 1;
19
+ this.size = REQUEST_ID_SIZE + this.parameters.content.length + 1;
20
20
  }
21
21
  static fromBytes(data) {
22
22
  const buffer = new CommandBinaryBuffer(data);
23
- buffer.seek(buffer.offset + 1);
24
23
  const requestId = buffer.getUint8();
25
24
  const content = buffer.getString();
26
- return new GetContentByShortNameStringResponse({ requestId, content });
25
+ return new GetObisContentByIdStringResponse({ requestId, content });
27
26
  }
28
27
  toBytes() {
29
28
  if (typeof this.size !== 'number') {
@@ -31,15 +30,14 @@ class GetContentByShortNameStringResponse extends Command {
31
30
  }
32
31
  const buffer = new CommandBinaryBuffer(this.size);
33
32
  const { requestId, content } = this.parameters;
34
- buffer.setUint8(this.size - 1);
35
33
  buffer.setUint8(requestId);
36
34
  buffer.setString(content);
37
35
  return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
38
36
  }
39
37
  }
40
- GetContentByShortNameStringResponse.id = COMMAND_ID;
41
- GetContentByShortNameStringResponse.directionType = UPLINK;
42
- GetContentByShortNameStringResponse.examples = examples;
43
- GetContentByShortNameStringResponse.hasParameters = true;
44
- export default GetContentByShortNameStringResponse;
45
- //# sourceMappingURL=GetContentByShortNameStringResponse.js.map
38
+ GetObisContentByIdStringResponse.id = COMMAND_ID;
39
+ GetObisContentByIdStringResponse.directionType = UPLINK;
40
+ GetObisContentByIdStringResponse.examples = examples;
41
+ GetObisContentByIdStringResponse.hasParameters = true;
42
+ export default GetObisContentByIdStringResponse;
43
+ //# sourceMappingURL=GetObisContentByIdStringResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetObisContentByIdStringResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObisContentByIdStringResponse.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;AAWrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,mDAAmD;QACzD,UAAU,EAAE;YACR,SAAS,EAAE,GAAG;YACd,OAAO,EAAE,cAAc;SAC1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Ae,gCAAgC,CAAC"}
@@ -6,7 +6,7 @@ interface IGetContentByObisResponseParameters extends ICommandParameters {
6
6
  declare class GetContentByObisResponse extends Command {
7
7
  parameters: IGetContentByObisResponseParameters;
8
8
  constructor(parameters: IGetContentByObisResponseParameters);
9
- static readonly id = 22;
9
+ static readonly id = 77;
10
10
  static readonly directionType = 2;
11
11
  static readonly examples: TCommandExampleList;
12
12
  static readonly hasParameters = true;
@@ -1,26 +1,25 @@
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 = 0x16;
4
+ const COMMAND_ID = 0x4d;
5
5
  const examples = [
6
6
  {
7
- name: 'content response',
7
+ name: 'response to GetObisContent',
8
8
  parameters: {
9
9
  requestId: 2,
10
10
  content: '57906635'
11
11
  },
12
- hex: { header: '16', body: '0a 02 08 35 37 39 30 36 36 33 35' }
12
+ hex: { header: '4d 0a', body: '02 08 35 37 39 30 36 36 33 35' }
13
13
  }
14
14
  ];
15
15
  class GetContentByObisResponse extends Command {
16
16
  constructor(parameters) {
17
17
  super();
18
18
  this.parameters = parameters;
19
- this.size = REQUEST_ID_SIZE + 1 + 1 + this.parameters.content.length;
19
+ this.size = REQUEST_ID_SIZE + 1 + this.parameters.content.length;
20
20
  }
21
21
  static fromBytes(data) {
22
22
  const buffer = new CommandBinaryBuffer(data);
23
- buffer.seek(buffer.offset + 1);
24
23
  const requestId = buffer.getUint8();
25
24
  const content = buffer.getString();
26
25
  return new GetContentByObisResponse({ requestId, content });
@@ -31,7 +30,6 @@ class GetContentByObisResponse extends Command {
31
30
  }
32
31
  const buffer = new CommandBinaryBuffer(this.size);
33
32
  const { requestId, content } = this.parameters;
34
- buffer.setUint8(this.size - 1);
35
33
  buffer.setUint8(requestId);
36
34
  buffer.setString(content);
37
35
  return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
@@ -42,4 +40,4 @@ GetContentByObisResponse.directionType = UPLINK;
42
40
  GetContentByObisResponse.examples = examples;
43
41
  GetContentByObisResponse.hasParameters = true;
44
42
  export default GetContentByObisResponse;
45
- //# sourceMappingURL=GetContentByObisResponse.js.map
43
+ //# sourceMappingURL=GetObisContentResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetObisContentResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObisContentResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAqB,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAWrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,4BAA4B;QAClC,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,OAAO,EAAE,UAAU;SACtB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,+BAA+B,EAAC;KAChE;CACJ,CAAC;AAuBF,MAAM,wBAAyB,SAAQ,OAAO;IAC1C,YAAqB,UAA+C;QAChE,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAqC;QAIhE,IAAI,CAAC,IAAI,GAAG,eAAe,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC;IACrE,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,OAAO,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAEnC,OAAO,IAAI,wBAAwB,CAAC,EAAC,SAAS,EAAE,OAAO,EAAC,CAAC,CAAC;IAC9D,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,OAAO,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAE7C,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAE1B,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AA/Be,2BAAE,GAAG,UAAU,CAAC;AAEhB,sCAAa,GAAG,MAAM,CAAC;AAEvB,iCAAQ,GAAG,QAAQ,CAAC;AAEpB,sCAAa,GAAG,IAAI,CAAC;AA6BzC,eAAe,wBAAwB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetObisIdListResponseParameters extends ICommandParameters {
4
+ obisIdList: Array<number>;
5
+ }
6
+ declare class GetObisIdListResponse extends Command {
7
+ parameters: IGetObisIdListResponseParameters;
8
+ constructor(parameters: IGetObisIdListResponseParameters);
9
+ static readonly id = 65;
10
+ static readonly directionType = 2;
11
+ static readonly examples: TCommandExampleList;
12
+ static readonly hasParameters = true;
13
+ static fromBytes(data: Uint8Array): GetObisIdListResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default GetObisIdListResponse;