jooby-codec 1.14.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/dist/analog/Command.d.ts +29 -0
  2. package/dist/analog/Command.js +34 -0
  3. package/dist/analog/Command.js.map +1 -0
  4. package/dist/{CommandBinaryBuffer.d.ts → analog/CommandBinaryBuffer.d.ts} +3 -208
  5. package/dist/{CommandBinaryBuffer.js → analog/CommandBinaryBuffer.js} +8 -80
  6. package/dist/analog/CommandBinaryBuffer.js.map +1 -0
  7. package/dist/{UnknownCommand.d.ts → analog/UnknownCommand.d.ts} +0 -8
  8. package/dist/{UnknownCommand.js → analog/UnknownCommand.js} +0 -5
  9. package/dist/analog/UnknownCommand.js.map +1 -0
  10. package/dist/analog/commands/downlink/CorrectTime2000.d.ts +16 -0
  11. package/dist/{commands → analog/commands}/downlink/CorrectTime2000.js +3 -23
  12. package/dist/analog/commands/downlink/CorrectTime2000.js.map +1 -0
  13. package/dist/analog/commands/downlink/GetArchiveDaysMC.d.ts +18 -0
  14. package/dist/{commands → analog/commands}/downlink/GetArchiveDaysMC.js +3 -27
  15. package/dist/analog/commands/downlink/GetArchiveDaysMC.js.map +1 -0
  16. package/dist/analog/commands/downlink/GetArchiveEvents.d.ts +17 -0
  17. package/dist/{commands → analog/commands}/downlink/GetArchiveEvents.js +0 -19
  18. package/dist/analog/commands/downlink/GetArchiveEvents.js.map +1 -0
  19. package/dist/analog/commands/downlink/GetArchiveHoursMC.d.ts +18 -0
  20. package/dist/{commands → analog/commands}/downlink/GetArchiveHoursMC.js +3 -22
  21. package/dist/analog/commands/downlink/GetArchiveHoursMC.js.map +1 -0
  22. package/dist/analog/commands/downlink/GetCurrentMC.d.ts +10 -0
  23. package/dist/analog/commands/downlink/GetCurrentMC.js +23 -0
  24. package/dist/analog/commands/downlink/GetCurrentMC.js.map +1 -0
  25. package/dist/analog/commands/downlink/GetExAbsArchiveDaysMC.d.ts +18 -0
  26. package/dist/{commands → analog/commands}/downlink/GetExAbsArchiveDaysMC.js +3 -24
  27. package/dist/analog/commands/downlink/GetExAbsArchiveDaysMC.js.map +1 -0
  28. package/dist/analog/commands/downlink/GetExAbsArchiveHoursMC.d.ts +18 -0
  29. package/dist/{commands → analog/commands}/downlink/GetExAbsArchiveHoursMC.js +3 -23
  30. package/dist/analog/commands/downlink/GetExAbsArchiveHoursMC.js.map +1 -0
  31. package/dist/analog/commands/downlink/GetExAbsCurrentMC.d.ts +11 -0
  32. package/dist/{commands → analog/commands}/downlink/GetExAbsCurrentMC.js +0 -20
  33. package/dist/analog/commands/downlink/GetExAbsCurrentMC.js.map +1 -0
  34. package/dist/analog/commands/downlink/GetLmicInfo.d.ts +10 -0
  35. package/dist/analog/commands/downlink/GetLmicInfo.js +23 -0
  36. package/dist/analog/commands/downlink/GetLmicInfo.js.map +1 -0
  37. package/dist/analog/commands/downlink/GetParameter.d.ts +15 -0
  38. package/dist/{commands → analog/commands}/downlink/GetParameter.js +0 -20
  39. package/dist/analog/commands/downlink/GetParameter.js.map +1 -0
  40. package/dist/analog/commands/downlink/GetStatus.d.ts +11 -0
  41. package/dist/{commands → analog/commands}/downlink/GetStatus.js +0 -19
  42. package/dist/analog/commands/downlink/GetStatus.js.map +1 -0
  43. package/dist/analog/commands/downlink/SetParameter.d.ts +13 -0
  44. package/dist/{commands → analog/commands}/downlink/SetParameter.js +2 -21
  45. package/dist/analog/commands/downlink/SetParameter.js.map +1 -0
  46. package/dist/analog/commands/downlink/SetTime2000.d.ts +16 -0
  47. package/dist/{commands → analog/commands}/downlink/SetTime2000.js +3 -22
  48. package/dist/analog/commands/downlink/SetTime2000.js.map +1 -0
  49. package/dist/analog/commands/downlink/SoftRestart.d.ts +10 -0
  50. package/dist/analog/commands/downlink/SoftRestart.js +23 -0
  51. package/dist/analog/commands/downlink/SoftRestart.js.map +1 -0
  52. package/dist/{commands → analog/commands}/downlink/index.d.ts +0 -5
  53. package/dist/{commands → analog/commands}/downlink/index.js +0 -5
  54. package/dist/analog/commands/downlink/index.js.map +1 -0
  55. package/dist/{commands → analog/commands}/index.d.ts +0 -5
  56. package/dist/{commands → analog/commands}/index.js +0 -5
  57. package/dist/analog/commands/index.js.map +1 -0
  58. package/dist/analog/commands/uplink/CorrectTime2000Response.d.ts +15 -0
  59. package/dist/{commands → analog/commands}/uplink/CorrectTime2000Response.js +3 -23
  60. package/dist/analog/commands/uplink/CorrectTime2000Response.js.map +1 -0
  61. package/dist/{commands → analog/commands}/uplink/CurrentMC.d.ts +0 -24
  62. package/dist/{commands → analog/commands}/uplink/CurrentMC.js +0 -24
  63. package/dist/analog/commands/uplink/CurrentMC.js.map +1 -0
  64. package/dist/analog/commands/uplink/DayMC.d.ts +17 -0
  65. package/dist/{commands → analog/commands}/uplink/DayMC.js +1 -33
  66. package/dist/analog/commands/uplink/DayMC.js.map +1 -0
  67. package/dist/analog/commands/uplink/ExAbsCurrentMC.d.ts +16 -0
  68. package/dist/{commands → analog/commands}/uplink/ExAbsCurrentMC.js +0 -29
  69. package/dist/analog/commands/uplink/ExAbsCurrentMC.js.map +1 -0
  70. package/dist/analog/commands/uplink/ExAbsDayMC.d.ts +19 -0
  71. package/dist/{commands → analog/commands}/uplink/ExAbsDayMC.js +1 -31
  72. package/dist/analog/commands/uplink/ExAbsDayMC.js.map +1 -0
  73. package/dist/analog/commands/uplink/ExAbsHourMC.d.ts +19 -0
  74. package/dist/{commands → analog/commands}/uplink/ExAbsHourMC.js +1 -36
  75. package/dist/analog/commands/uplink/ExAbsHourMC.js.map +1 -0
  76. package/dist/analog/commands/uplink/GetArchiveDaysMCResponse.d.ts +19 -0
  77. package/dist/{commands → analog/commands}/uplink/GetArchiveDaysMCResponse.js +1 -33
  78. package/dist/analog/commands/uplink/GetArchiveDaysMCResponse.js.map +1 -0
  79. package/dist/analog/commands/uplink/GetArchiveEventsResponse.d.ts +21 -0
  80. package/dist/{commands → analog/commands}/uplink/GetArchiveEventsResponse.js +0 -26
  81. package/dist/analog/commands/uplink/GetArchiveEventsResponse.js.map +1 -0
  82. package/dist/analog/commands/uplink/GetArchiveHoursMCResponse.d.ts +19 -0
  83. package/dist/{commands → analog/commands}/uplink/GetArchiveHoursMCResponse.js +0 -33
  84. package/dist/analog/commands/uplink/GetArchiveHoursMCResponse.js.map +1 -0
  85. package/dist/analog/commands/uplink/GetExAbsArchiveDaysMCResponse.d.ts +19 -0
  86. package/dist/{commands → analog/commands}/uplink/GetExAbsArchiveDaysMCResponse.js +1 -33
  87. package/dist/analog/commands/uplink/GetExAbsArchiveDaysMCResponse.js.map +1 -0
  88. package/dist/{commands → analog/commands}/uplink/GetExAbsArchiveHoursMCResponse.d.ts +1 -26
  89. package/dist/{commands → analog/commands}/uplink/GetExAbsArchiveHoursMCResponse.js +1 -31
  90. package/dist/analog/commands/uplink/GetExAbsArchiveHoursMCResponse.js.map +1 -0
  91. package/dist/analog/commands/uplink/GetLmicInfoResponse.d.ts +21 -0
  92. package/dist/{commands → analog/commands}/uplink/GetLmicInfoResponse.js +4 -29
  93. package/dist/analog/commands/uplink/GetLmicInfoResponse.js.map +1 -0
  94. package/dist/analog/commands/uplink/GetParameterResponse.d.ts +13 -0
  95. package/dist/{commands → analog/commands}/uplink/GetParameterResponse.js +0 -24
  96. package/dist/analog/commands/uplink/GetParameterResponse.js.map +1 -0
  97. package/dist/analog/commands/uplink/HourMC.d.ts +20 -0
  98. package/dist/{commands → analog/commands}/uplink/HourMC.js +1 -35
  99. package/dist/analog/commands/uplink/HourMC.js.map +1 -0
  100. package/dist/analog/commands/uplink/LastEvent.d.ts +21 -0
  101. package/dist/{commands → analog/commands}/uplink/LastEvent.js +22 -48
  102. package/dist/analog/commands/uplink/LastEvent.js.map +1 -0
  103. package/dist/{commands → analog/commands}/uplink/NewEvent.d.ts +1 -42
  104. package/dist/{commands → analog/commands}/uplink/NewEvent.js +2 -32
  105. package/dist/analog/commands/uplink/NewEvent.js.map +1 -0
  106. package/dist/analog/commands/uplink/SetTime2000Response.d.ts +15 -0
  107. package/dist/{commands → analog/commands}/uplink/SetTime2000Response.js +3 -22
  108. package/dist/analog/commands/uplink/SetTime2000Response.js.map +1 -0
  109. package/dist/analog/commands/uplink/SoftRestartResponse.d.ts +10 -0
  110. package/dist/analog/commands/uplink/SoftRestartResponse.js +23 -0
  111. package/dist/analog/commands/uplink/SoftRestartResponse.js.map +1 -0
  112. package/dist/analog/commands/uplink/Status.d.ts +23 -0
  113. package/dist/{commands → analog/commands}/uplink/Status.js +1 -33
  114. package/dist/analog/commands/uplink/Status.js.map +1 -0
  115. package/dist/analog/commands/uplink/Time2000.d.ts +17 -0
  116. package/dist/{commands → analog/commands}/uplink/Time2000.js +2 -22
  117. package/dist/analog/commands/uplink/Time2000.js.map +1 -0
  118. package/dist/{commands → analog/commands}/uplink/index.d.ts +0 -5
  119. package/dist/{commands → analog/commands}/uplink/index.js +0 -5
  120. package/dist/analog/commands/uplink/index.js.map +1 -0
  121. package/dist/analog/constants/deviceParameters.d.ts +18 -0
  122. package/dist/analog/constants/deviceParameters.js +19 -0
  123. package/dist/analog/constants/deviceParameters.js.map +1 -0
  124. package/dist/analog/constants/directions.js.map +1 -0
  125. package/dist/analog/constants/events.d.ts +21 -0
  126. package/dist/analog/constants/events.js +22 -0
  127. package/dist/analog/constants/events.js.map +1 -0
  128. package/dist/analog/constants/hardwareTypes.d.ts +13 -0
  129. package/dist/analog/constants/hardwareTypes.js +14 -0
  130. package/dist/analog/constants/hardwareTypes.js.map +1 -0
  131. package/dist/analog/constants/index.js.map +1 -0
  132. package/dist/{constants → analog/constants}/rx2SpreadFactors.d.ts +0 -5
  133. package/dist/{constants → analog/constants}/rx2SpreadFactors.js +0 -5
  134. package/dist/analog/constants/rx2SpreadFactors.js.map +1 -0
  135. package/dist/{utils → analog}/header.d.ts +1 -1
  136. package/dist/{utils → analog}/header.js +2 -4
  137. package/dist/analog/header.js.map +1 -0
  138. package/dist/analog/index.d.ts +3 -0
  139. package/dist/analog/index.js +4 -0
  140. package/dist/analog/index.js.map +1 -0
  141. package/dist/{utils → analog}/message.d.ts +8 -13
  142. package/dist/{utils → analog}/message.js +13 -32
  143. package/dist/analog/message.js.map +1 -0
  144. package/dist/config.d.ts +5 -0
  145. package/dist/config.js +5 -0
  146. package/dist/config.js.map +1 -0
  147. package/dist/index.d.ts +3 -3
  148. package/dist/index.js +3 -3
  149. package/dist/index.js.map +1 -1
  150. package/dist/{Command.d.ts → obis-observer/Command.d.ts} +2 -27
  151. package/dist/obis-observer/Command.js +33 -0
  152. package/dist/obis-observer/Command.js.map +1 -0
  153. package/dist/obis-observer/CommandBinaryBuffer.d.ts +56 -0
  154. package/dist/obis-observer/CommandBinaryBuffer.js +138 -0
  155. package/dist/obis-observer/CommandBinaryBuffer.js.map +1 -0
  156. package/dist/obis-observer/UnknownCommand.d.ts +12 -0
  157. package/dist/obis-observer/UnknownCommand.js +17 -0
  158. package/dist/obis-observer/UnknownCommand.js.map +1 -0
  159. package/dist/obis-observer/commands/downlink/AddShortNameProfile.d.ts +17 -0
  160. package/dist/obis-observer/commands/downlink/AddShortNameProfile.js +55 -0
  161. package/dist/obis-observer/commands/downlink/AddShortNameProfile.js.map +1 -0
  162. package/dist/obis-observer/commands/downlink/GetArchiveProfile.d.ts +13 -0
  163. package/dist/obis-observer/commands/downlink/GetArchiveProfile.js +39 -0
  164. package/dist/obis-observer/commands/downlink/GetArchiveProfile.js.map +1 -0
  165. package/dist/obis-observer/commands/downlink/GetContentByObis.d.ts +16 -0
  166. package/dist/obis-observer/commands/downlink/GetContentByObis.js +48 -0
  167. package/dist/obis-observer/commands/downlink/GetContentByObis.js.map +1 -0
  168. package/dist/obis-observer/commands/downlink/GetContentByShortName.d.ts +17 -0
  169. package/dist/obis-observer/commands/downlink/GetContentByShortName.js +44 -0
  170. package/dist/obis-observer/commands/downlink/GetContentByShortName.js.map +1 -0
  171. package/dist/obis-observer/commands/downlink/GetShortNameInfo.d.ts +17 -0
  172. package/dist/obis-observer/commands/downlink/GetShortNameInfo.js +44 -0
  173. package/dist/obis-observer/commands/downlink/GetShortNameInfo.js.map +1 -0
  174. package/dist/obis-observer/commands/downlink/GetShortNameProfile.d.ts +16 -0
  175. package/dist/obis-observer/commands/downlink/GetShortNameProfile.js +45 -0
  176. package/dist/obis-observer/commands/downlink/GetShortNameProfile.js.map +1 -0
  177. package/dist/obis-observer/commands/downlink/GetShortNames.d.ts +16 -0
  178. package/dist/obis-observer/commands/downlink/GetShortNames.js +48 -0
  179. package/dist/obis-observer/commands/downlink/GetShortNames.js.map +1 -0
  180. package/dist/obis-observer/commands/downlink/ReadArchive.d.ts +17 -0
  181. package/dist/obis-observer/commands/downlink/ReadArchive.js +58 -0
  182. package/dist/obis-observer/commands/downlink/ReadArchive.js.map +1 -0
  183. package/dist/obis-observer/commands/downlink/Reboot.d.ts +13 -0
  184. package/dist/obis-observer/commands/downlink/Reboot.js +39 -0
  185. package/dist/obis-observer/commands/downlink/Reboot.js.map +1 -0
  186. package/dist/obis-observer/commands/downlink/RemoveShortNameProfile.d.ts +16 -0
  187. package/dist/obis-observer/commands/downlink/RemoveShortNameProfile.js +42 -0
  188. package/dist/obis-observer/commands/downlink/RemoveShortNameProfile.js.map +1 -0
  189. package/dist/obis-observer/commands/downlink/SetArchiveProfile.d.ts +17 -0
  190. package/dist/obis-observer/commands/downlink/SetArchiveProfile.js +45 -0
  191. package/dist/obis-observer/commands/downlink/SetArchiveProfile.js.map +1 -0
  192. package/dist/obis-observer/commands/downlink/SetSerialPort.d.ts +19 -0
  193. package/dist/obis-observer/commands/downlink/SetSerialPort.js +61 -0
  194. package/dist/obis-observer/commands/downlink/SetSerialPort.js.map +1 -0
  195. package/dist/obis-observer/commands/downlink/SetShortName.d.ts +17 -0
  196. package/dist/obis-observer/commands/downlink/SetShortName.js +51 -0
  197. package/dist/obis-observer/commands/downlink/SetShortName.js.map +1 -0
  198. package/dist/obis-observer/commands/downlink/index.d.ts +13 -0
  199. package/dist/obis-observer/commands/downlink/index.js +14 -0
  200. package/dist/obis-observer/commands/downlink/index.js.map +1 -0
  201. package/dist/obis-observer/commands/index.d.ts +2 -0
  202. package/dist/obis-observer/commands/index.js +3 -0
  203. package/dist/obis-observer/commands/index.js.map +1 -0
  204. package/dist/obis-observer/commands/uplink/AddShortNameProfileResponse.d.ts +16 -0
  205. package/dist/obis-observer/commands/uplink/AddShortNameProfileResponse.js +43 -0
  206. package/dist/obis-observer/commands/uplink/AddShortNameProfileResponse.js.map +1 -0
  207. package/dist/obis-observer/commands/uplink/GetArchiveProfileResponse.d.ts +17 -0
  208. package/dist/obis-observer/commands/uplink/GetArchiveProfileResponse.js +45 -0
  209. package/dist/obis-observer/commands/uplink/GetArchiveProfileResponse.js.map +1 -0
  210. package/dist/obis-observer/commands/uplink/GetContentByObisResponse.d.ts +16 -0
  211. package/dist/obis-observer/commands/uplink/GetContentByObisResponse.js +45 -0
  212. package/dist/obis-observer/commands/uplink/GetContentByObisResponse.js.map +1 -0
  213. package/dist/obis-observer/commands/uplink/GetContentByShortNameResponse.d.ts +16 -0
  214. package/dist/obis-observer/commands/uplink/GetContentByShortNameResponse.js +44 -0
  215. package/dist/obis-observer/commands/uplink/GetContentByShortNameResponse.js.map +1 -0
  216. package/dist/obis-observer/commands/uplink/GetContentByShortNameStringResponse.d.ts +16 -0
  217. package/dist/obis-observer/commands/uplink/GetContentByShortNameStringResponse.js +45 -0
  218. package/dist/obis-observer/commands/uplink/GetContentByShortNameStringResponse.js.map +1 -0
  219. package/dist/obis-observer/commands/uplink/GetShortNameInfoResponse.d.ts +17 -0
  220. package/dist/obis-observer/commands/uplink/GetShortNameInfoResponse.js +74 -0
  221. package/dist/obis-observer/commands/uplink/GetShortNameInfoResponse.js.map +1 -0
  222. package/dist/obis-observer/commands/uplink/GetShortNameProfileResponse.d.ts +16 -0
  223. package/dist/obis-observer/commands/uplink/GetShortNameProfileResponse.js +54 -0
  224. package/dist/obis-observer/commands/uplink/GetShortNameProfileResponse.js.map +1 -0
  225. package/dist/obis-observer/commands/uplink/GetShortNamesResponse.d.ts +16 -0
  226. package/dist/obis-observer/commands/uplink/GetShortNamesResponse.js +45 -0
  227. package/dist/obis-observer/commands/uplink/GetShortNamesResponse.js.map +1 -0
  228. package/dist/obis-observer/commands/uplink/ObservationReport.d.ts +17 -0
  229. package/dist/obis-observer/commands/uplink/ObservationReport.js +57 -0
  230. package/dist/obis-observer/commands/uplink/ObservationReport.js.map +1 -0
  231. package/dist/obis-observer/commands/uplink/ObservationReportString.d.ts +17 -0
  232. package/dist/obis-observer/commands/uplink/ObservationReportString.js +62 -0
  233. package/dist/obis-observer/commands/uplink/ObservationReportString.js.map +1 -0
  234. package/dist/obis-observer/commands/uplink/ReadArchiveResponse.d.ts +17 -0
  235. package/dist/obis-observer/commands/uplink/ReadArchiveResponse.js +61 -0
  236. package/dist/obis-observer/commands/uplink/ReadArchiveResponse.js.map +1 -0
  237. package/dist/obis-observer/commands/uplink/RebootResponse.d.ts +13 -0
  238. package/dist/obis-observer/commands/uplink/RebootResponse.js +36 -0
  239. package/dist/obis-observer/commands/uplink/RebootResponse.js.map +1 -0
  240. package/dist/obis-observer/commands/uplink/RemoveShortNameProfileResponse.d.ts +16 -0
  241. package/dist/obis-observer/commands/uplink/RemoveShortNameProfileResponse.js +43 -0
  242. package/dist/obis-observer/commands/uplink/RemoveShortNameProfileResponse.js.map +1 -0
  243. package/dist/obis-observer/commands/uplink/SetArchiveProfileResponse.d.ts +16 -0
  244. package/dist/obis-observer/commands/uplink/SetArchiveProfileResponse.js +51 -0
  245. package/dist/obis-observer/commands/uplink/SetArchiveProfileResponse.js.map +1 -0
  246. package/dist/obis-observer/commands/uplink/SetSerialPortResponse.d.ts +16 -0
  247. package/dist/obis-observer/commands/uplink/SetSerialPortResponse.js +51 -0
  248. package/dist/obis-observer/commands/uplink/SetSerialPortResponse.js.map +1 -0
  249. package/dist/obis-observer/commands/uplink/SetShortNameResponse.d.ts +16 -0
  250. package/dist/obis-observer/commands/uplink/SetShortNameResponse.js +43 -0
  251. package/dist/obis-observer/commands/uplink/SetShortNameResponse.js.map +1 -0
  252. package/dist/obis-observer/commands/uplink/index.d.ts +16 -0
  253. package/dist/obis-observer/commands/uplink/index.js +17 -0
  254. package/dist/obis-observer/commands/uplink/index.js.map +1 -0
  255. package/dist/obis-observer/constants/archiveTypes.d.ts +3 -0
  256. package/dist/obis-observer/constants/archiveTypes.js +4 -0
  257. package/dist/obis-observer/constants/archiveTypes.js.map +1 -0
  258. package/dist/obis-observer/constants/contentTypes.d.ts +3 -0
  259. package/dist/obis-observer/constants/contentTypes.js +4 -0
  260. package/dist/obis-observer/constants/contentTypes.js.map +1 -0
  261. package/dist/obis-observer/constants/directions.d.ts +2 -0
  262. package/dist/obis-observer/constants/directions.js +3 -0
  263. package/dist/obis-observer/constants/directions.js.map +1 -0
  264. package/dist/obis-observer/constants/index.d.ts +5 -0
  265. package/dist/obis-observer/constants/index.js +6 -0
  266. package/dist/obis-observer/constants/index.js.map +1 -0
  267. package/dist/obis-observer/constants/parityTypes.d.ts +3 -0
  268. package/dist/obis-observer/constants/parityTypes.js +4 -0
  269. package/dist/obis-observer/constants/parityTypes.js.map +1 -0
  270. package/dist/obis-observer/constants/resultCodes.d.ts +6 -0
  271. package/dist/obis-observer/constants/resultCodes.js +7 -0
  272. package/dist/obis-observer/constants/resultCodes.js.map +1 -0
  273. package/dist/obis-observer/index.d.ts +3 -0
  274. package/dist/obis-observer/index.js +4 -0
  275. package/dist/obis-observer/index.js.map +1 -0
  276. package/dist/obis-observer/message.d.ts +18 -0
  277. package/dist/obis-observer/message.js +58 -0
  278. package/dist/obis-observer/message.js.map +1 -0
  279. package/dist/{BinaryBuffer.d.ts → utils/BinaryBuffer.d.ts} +3 -17
  280. package/dist/{BinaryBuffer.js → utils/BinaryBuffer.js} +17 -19
  281. package/dist/utils/BinaryBuffer.js.map +1 -0
  282. package/dist/utils/bitSet.d.ts +2 -36
  283. package/dist/utils/bitSet.js +10 -36
  284. package/dist/utils/bitSet.js.map +1 -1
  285. package/dist/utils/getBytesFromHex.d.ts +0 -9
  286. package/dist/utils/getBytesFromHex.js +0 -10
  287. package/dist/utils/getBytesFromHex.js.map +1 -1
  288. package/dist/utils/getHexFromBytes.d.ts +1 -25
  289. package/dist/utils/getHexFromBytes.js +2 -16
  290. package/dist/utils/getHexFromBytes.js.map +1 -1
  291. package/dist/utils/getHexFromNumber.d.ts +3 -0
  292. package/dist/utils/getHexFromNumber.js +20 -0
  293. package/dist/utils/getHexFromNumber.js.map +1 -0
  294. package/dist/utils/index.d.ts +3 -1
  295. package/dist/utils/index.js +2 -0
  296. package/dist/utils/index.js.map +1 -1
  297. package/dist/utils/time.d.ts +0 -24
  298. package/dist/utils/time.js +0 -12
  299. package/dist/utils/time.js.map +1 -1
  300. package/package.json +13 -9
  301. package/readme.md +19 -12
  302. package/dist/BinaryBuffer.js.map +0 -1
  303. package/dist/Command.js +0 -89
  304. package/dist/Command.js.map +0 -1
  305. package/dist/CommandBinaryBuffer.js.map +0 -1
  306. package/dist/UnknownCommand.js.map +0 -1
  307. package/dist/commands/downlink/CorrectTime2000.d.ts +0 -46
  308. package/dist/commands/downlink/CorrectTime2000.js.map +0 -1
  309. package/dist/commands/downlink/GetArchiveDaysMC.d.ts +0 -45
  310. package/dist/commands/downlink/GetArchiveDaysMC.js.map +0 -1
  311. package/dist/commands/downlink/GetArchiveEvents.d.ts +0 -40
  312. package/dist/commands/downlink/GetArchiveEvents.js.map +0 -1
  313. package/dist/commands/downlink/GetArchiveHoursMC.d.ts +0 -40
  314. package/dist/commands/downlink/GetArchiveHoursMC.js.map +0 -1
  315. package/dist/commands/downlink/GetCurrentMC.d.ts +0 -26
  316. package/dist/commands/downlink/GetCurrentMC.js +0 -42
  317. package/dist/commands/downlink/GetCurrentMC.js.map +0 -1
  318. package/dist/commands/downlink/GetExAbsArchiveDaysMC.d.ts +0 -41
  319. package/dist/commands/downlink/GetExAbsArchiveDaysMC.js.map +0 -1
  320. package/dist/commands/downlink/GetExAbsArchiveHoursMC.d.ts +0 -40
  321. package/dist/commands/downlink/GetExAbsArchiveHoursMC.js.map +0 -1
  322. package/dist/commands/downlink/GetExAbsCurrentMC.d.ts +0 -27
  323. package/dist/commands/downlink/GetExAbsCurrentMC.js.map +0 -1
  324. package/dist/commands/downlink/GetLmicInfo.d.ts +0 -26
  325. package/dist/commands/downlink/GetLmicInfo.js +0 -42
  326. package/dist/commands/downlink/GetLmicInfo.js.map +0 -1
  327. package/dist/commands/downlink/GetParameter.d.ts +0 -38
  328. package/dist/commands/downlink/GetParameter.js.map +0 -1
  329. package/dist/commands/downlink/GetStatus.d.ts +0 -27
  330. package/dist/commands/downlink/GetStatus.js.map +0 -1
  331. package/dist/commands/downlink/SetParameter.d.ts +0 -30
  332. package/dist/commands/downlink/SetParameter.js.map +0 -1
  333. package/dist/commands/downlink/SetTime2000.d.ts +0 -42
  334. package/dist/commands/downlink/SetTime2000.js.map +0 -1
  335. package/dist/commands/downlink/SoftRestart.d.ts +0 -26
  336. package/dist/commands/downlink/SoftRestart.js +0 -42
  337. package/dist/commands/downlink/SoftRestart.js.map +0 -1
  338. package/dist/commands/downlink/index.js.map +0 -1
  339. package/dist/commands/index.js.map +0 -1
  340. package/dist/commands/uplink/CorrectTime2000Response.d.ts +0 -39
  341. package/dist/commands/uplink/CorrectTime2000Response.js.map +0 -1
  342. package/dist/commands/uplink/CurrentMC.js.map +0 -1
  343. package/dist/commands/uplink/DayMC.d.ts +0 -47
  344. package/dist/commands/uplink/DayMC.js.map +0 -1
  345. package/dist/commands/uplink/ExAbsCurrentMC.d.ts +0 -41
  346. package/dist/commands/uplink/ExAbsCurrentMC.js.map +0 -1
  347. package/dist/commands/uplink/ExAbsDayMC.d.ts +0 -45
  348. package/dist/commands/uplink/ExAbsDayMC.js.map +0 -1
  349. package/dist/commands/uplink/ExAbsHourMC.d.ts +0 -69
  350. package/dist/commands/uplink/ExAbsHourMC.js.map +0 -1
  351. package/dist/commands/uplink/GetArchiveDaysMCResponse.d.ts +0 -58
  352. package/dist/commands/uplink/GetArchiveDaysMCResponse.js.map +0 -1
  353. package/dist/commands/uplink/GetArchiveEventsResponse.d.ts +0 -54
  354. package/dist/commands/uplink/GetArchiveEventsResponse.js.map +0 -1
  355. package/dist/commands/uplink/GetArchiveHoursMCResponse.d.ts +0 -50
  356. package/dist/commands/uplink/GetArchiveHoursMCResponse.js.map +0 -1
  357. package/dist/commands/uplink/GetExAbsArchiveDaysMCResponse.d.ts +0 -47
  358. package/dist/commands/uplink/GetExAbsArchiveDaysMCResponse.js.map +0 -1
  359. package/dist/commands/uplink/GetExAbsArchiveHoursMCResponse.js.map +0 -1
  360. package/dist/commands/uplink/GetLmicInfoResponse.d.ts +0 -52
  361. package/dist/commands/uplink/GetLmicInfoResponse.js.map +0 -1
  362. package/dist/commands/uplink/GetParameterResponse.d.ts +0 -35
  363. package/dist/commands/uplink/GetParameterResponse.js.map +0 -1
  364. package/dist/commands/uplink/HourMC.d.ts +0 -48
  365. package/dist/commands/uplink/HourMC.js.map +0 -1
  366. package/dist/commands/uplink/LastEvent.d.ts +0 -54
  367. package/dist/commands/uplink/LastEvent.js.map +0 -1
  368. package/dist/commands/uplink/NewEvent.js.map +0 -1
  369. package/dist/commands/uplink/SetTime2000Response.d.ts +0 -38
  370. package/dist/commands/uplink/SetTime2000Response.js.map +0 -1
  371. package/dist/commands/uplink/SoftRestartResponse.d.ts +0 -28
  372. package/dist/commands/uplink/SoftRestartResponse.js +0 -44
  373. package/dist/commands/uplink/SoftRestartResponse.js.map +0 -1
  374. package/dist/commands/uplink/Status.d.ts +0 -55
  375. package/dist/commands/uplink/Status.js.map +0 -1
  376. package/dist/commands/uplink/Time2000.d.ts +0 -43
  377. package/dist/commands/uplink/Time2000.js.map +0 -1
  378. package/dist/commands/uplink/index.js.map +0 -1
  379. package/dist/constants/deviceParameters.d.ts +0 -53
  380. package/dist/constants/deviceParameters.js +0 -54
  381. package/dist/constants/deviceParameters.js.map +0 -1
  382. package/dist/constants/directions.js.map +0 -1
  383. package/dist/constants/events.d.ts +0 -42
  384. package/dist/constants/events.js +0 -43
  385. package/dist/constants/events.js.map +0 -1
  386. package/dist/constants/hardwareTypes.d.ts +0 -108
  387. package/dist/constants/hardwareTypes.js +0 -109
  388. package/dist/constants/hardwareTypes.js.map +0 -1
  389. package/dist/constants/index.js.map +0 -1
  390. package/dist/constants/rx2SpreadFactors.js.map +0 -1
  391. package/dist/utils/header.js.map +0 -1
  392. package/dist/utils/message.js.map +0 -1
  393. /package/dist/{constants → analog/constants}/directions.d.ts +0 -0
  394. /package/dist/{constants → analog/constants}/directions.js +0 -0
  395. /package/dist/{constants → analog/constants}/index.d.ts +0 -0
  396. /package/dist/{constants → analog/constants}/index.js +0 -0
@@ -0,0 +1,45 @@
1
+ import Command from '../../Command.js';
2
+ import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
3
+ import { DOWNLINK } from '../../constants/directions.js';
4
+ const COMMAND_ID = 0x0f;
5
+ const COMMAND_SIZE = REQUEST_ID_SIZE + 4;
6
+ const examples = [
7
+ {
8
+ name: 'set double default parameters',
9
+ parameters: {
10
+ requestId: 68,
11
+ summaryArchivePeriod: 2880,
12
+ detailedArchivePeriod: 30
13
+ },
14
+ hex: { header: '0f', body: '44 0b 40 00 1e' }
15
+ }
16
+ ];
17
+ class SetArchiveProfile extends Command {
18
+ constructor(parameters) {
19
+ super();
20
+ this.parameters = parameters;
21
+ this.size = COMMAND_SIZE;
22
+ }
23
+ static fromBytes(data) {
24
+ const buffer = new CommandBinaryBuffer(data);
25
+ return new SetArchiveProfile({
26
+ requestId: buffer.getUint8(),
27
+ summaryArchivePeriod: buffer.getUint16(),
28
+ detailedArchivePeriod: buffer.getUint16()
29
+ });
30
+ }
31
+ toBytes() {
32
+ const buffer = new CommandBinaryBuffer(COMMAND_SIZE);
33
+ const { requestId, summaryArchivePeriod, detailedArchivePeriod } = this.parameters;
34
+ buffer.setUint8(requestId);
35
+ buffer.setUint16(summaryArchivePeriod);
36
+ buffer.setUint16(detailedArchivePeriod);
37
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
38
+ }
39
+ }
40
+ SetArchiveProfile.id = COMMAND_ID;
41
+ SetArchiveProfile.directionType = DOWNLINK;
42
+ SetArchiveProfile.examples = examples;
43
+ SetArchiveProfile.hasParameters = true;
44
+ export default SetArchiveProfile;
45
+ //# sourceMappingURL=SetArchiveProfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SetArchiveProfile.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/SetArchiveProfile.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAYvD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,eAAe,GAAG,CAAC,CAAC;AAEzC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,+BAA+B;QACrC,UAAU,EAAE;YACR,SAAS,EAAE,EAAE;YACb,oBAAoB,EAAE,IAAI;YAC1B,qBAAqB,EAAE,EAAE;SAC5B;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAC;KAC9C;CACJ,CAAC;AAuBF,MAAM,iBAAkB,SAAQ,OAAO;IACnC,YAAqB,UAAwC;QACzD,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAA8B;QAGzD,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,iBAAiB,CAAC;YACzB,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC5B,oBAAoB,EAAE,MAAM,CAAC,SAAS,EAAE;YACxC,qBAAqB,EAAE,MAAM,CAAC,SAAS,EAAE;SAC5C,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACrD,MAAM,EAAC,SAAS,EAAE,oBAAoB,EAAE,qBAAqB,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAEjF,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QACvC,MAAM,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;QAExC,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AA9Be,oBAAE,GAAG,UAAU,CAAC;AAEhB,+BAAa,GAAG,QAAQ,CAAC;AAEzB,0BAAQ,GAAG,QAAQ,CAAC;AAEpB,+BAAa,GAAG,IAAI,CAAC;AA4BzC,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface ISetSerialPortParameters extends ICommandParameters {
4
+ baudRate: number;
5
+ dataBits: number;
6
+ parity: number;
7
+ fixed: number;
8
+ }
9
+ declare class SetSerialPort extends Command {
10
+ parameters: ISetSerialPortParameters;
11
+ constructor(parameters: ISetSerialPortParameters);
12
+ static readonly id = 19;
13
+ static readonly directionType = 1;
14
+ static readonly examples: TCommandExampleList;
15
+ static readonly hasParameters = true;
16
+ static fromBytes(data: Uint8Array): SetSerialPort;
17
+ toBytes(): Uint8Array;
18
+ }
19
+ export default SetSerialPort;
@@ -0,0 +1,61 @@
1
+ import Command from '../../Command.js';
2
+ import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
3
+ import { DOWNLINK } from '../../constants/directions.js';
4
+ import * as parityTypes from '../../constants/parityTypes.js';
5
+ const COMMAND_ID = 0x13;
6
+ const COMMAND_SIZE = REQUEST_ID_SIZE + 3;
7
+ const examples = [
8
+ {
9
+ name: 'set fixed settings: 9600, 8, odd',
10
+ parameters: {
11
+ requestId: 52,
12
+ baudRate: 5,
13
+ dataBits: 8,
14
+ parity: parityTypes.ODD,
15
+ fixed: 1
16
+ },
17
+ hex: { header: '13', body: '34 05 08 05' }
18
+ },
19
+ {
20
+ name: 'set settings: 115200, 7, none',
21
+ parameters: {
22
+ requestId: 52,
23
+ baudRate: 12,
24
+ dataBits: 7,
25
+ parity: parityTypes.NONE,
26
+ fixed: 0
27
+ },
28
+ hex: { header: '13', body: '34 0c 07 00' }
29
+ }
30
+ ];
31
+ class SetSerialPort extends Command {
32
+ constructor(parameters) {
33
+ super();
34
+ this.parameters = parameters;
35
+ this.size = COMMAND_SIZE;
36
+ }
37
+ static fromBytes(data) {
38
+ const buffer = new CommandBinaryBuffer(data);
39
+ return new SetSerialPort({
40
+ requestId: buffer.getUint8(),
41
+ baudRate: buffer.getUint8(),
42
+ dataBits: buffer.getUint8(),
43
+ ...buffer.getSerialPortFlags()
44
+ });
45
+ }
46
+ toBytes() {
47
+ const buffer = new CommandBinaryBuffer(COMMAND_SIZE);
48
+ const { requestId, baudRate, dataBits, parity, fixed } = this.parameters;
49
+ buffer.setUint8(requestId);
50
+ buffer.setUint8(baudRate);
51
+ buffer.setUint8(dataBits);
52
+ buffer.setSerialPortFlags({ parity, fixed });
53
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
54
+ }
55
+ }
56
+ SetSerialPort.id = COMMAND_ID;
57
+ SetSerialPort.directionType = DOWNLINK;
58
+ SetSerialPort.examples = examples;
59
+ SetSerialPort.hasParameters = true;
60
+ export default SetSerialPort;
61
+ //# sourceMappingURL=SetSerialPort.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SetSerialPort.js","sourceRoot":"","s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C,QAAQ,EAAE;YAC5B,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;YAE3B,GAAG,MAAM,CAAC,kBAAkB,EAAE;SACjC,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACrD,MAAM,EACF,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,EACR,GAAG,IAAI,CAAC,UAAU,CAAC;QAEpB,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC1B,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC1B,MAAM,CAAC,kBAAkB,CAAC,EAAC,MAAM,EAAE,KAAK,EAAC,CAAC,CAAC;QAE3C,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAvCe,gBAAE,GAAG,UAAU,CAAC;AAEhB,2BAAa,GAAG,QAAQ,CAAC;AAEzB,sBAAQ,GAAG,QAAQ,CAAC;AAEpB,2BAAa,GAAG,IAAI,CAAC;AAqCzC,eAAe,aAAa,CAAC"}
@@ -0,0 +1,17 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters, IObis } from '../../CommandBinaryBuffer.js';
3
+ interface ISetShortNameParameters extends ICommandParameters {
4
+ shortName: number;
5
+ obis: IObis;
6
+ }
7
+ declare class SetShortName extends Command {
8
+ parameters: ISetShortNameParameters;
9
+ constructor(parameters: ISetShortNameParameters);
10
+ static readonly id = 3;
11
+ static readonly directionType = 1;
12
+ static readonly examples: TCommandExampleList;
13
+ static readonly hasParameters = true;
14
+ static fromBytes(data: Uint8Array): SetShortName;
15
+ toBytes(): Uint8Array;
16
+ }
17
+ export default SetShortName;
@@ -0,0 +1,51 @@
1
+ import Command from '../../Command.js';
2
+ import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
3
+ import { DOWNLINK } from '../../constants/directions.js';
4
+ const COMMAND_ID = 0x03;
5
+ const examples = [
6
+ {
7
+ name: 'set short name 44 for OBIS code 0.9.1',
8
+ parameters: {
9
+ requestId: 3,
10
+ shortName: 44,
11
+ obis: {
12
+ c: 0,
13
+ d: 9,
14
+ e: 1
15
+ }
16
+ },
17
+ hex: { header: '03', body: '03 2c 02 00 09 01' }
18
+ }
19
+ ];
20
+ class SetShortName extends Command {
21
+ constructor(parameters) {
22
+ super();
23
+ this.parameters = parameters;
24
+ this.size = REQUEST_ID_SIZE + 1 + CommandBinaryBuffer.getObisSize(parameters.obis);
25
+ }
26
+ static fromBytes(data) {
27
+ const buffer = new CommandBinaryBuffer(data);
28
+ return new SetShortName({
29
+ requestId: buffer.getUint8(),
30
+ shortName: buffer.getUint8(),
31
+ obis: buffer.getObis()
32
+ });
33
+ }
34
+ toBytes() {
35
+ if (typeof this.size !== 'number') {
36
+ throw new Error('unknown or invalid size');
37
+ }
38
+ const buffer = new CommandBinaryBuffer(this.size);
39
+ const { requestId, shortName, obis } = this.parameters;
40
+ buffer.setUint8(requestId);
41
+ buffer.setUint8(shortName);
42
+ buffer.setObis(obis);
43
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
44
+ }
45
+ }
46
+ SetShortName.id = COMMAND_ID;
47
+ SetShortName.directionType = DOWNLINK;
48
+ SetShortName.examples = examples;
49
+ SetShortName.hasParameters = true;
50
+ export default SetShortName;
51
+ //# sourceMappingURL=SetShortName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SetShortName.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/SetShortName.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EA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,CAAC;QAErD,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAErB,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAlCe,eAAE,GAAG,UAAU,CAAC;AAEhB,0BAAa,GAAG,QAAQ,CAAC;AAEzB,qBAAQ,GAAG,QAAQ,CAAC;AAEpB,0BAAa,GAAG,IAAI,CAAC;AAgCzC,eAAe,YAAY,CAAC"}
@@ -0,0 +1,13 @@
1
+ export { default as AddShortNameProfile } from './AddShortNameProfile.js';
2
+ export { default as GetArchiveProfile } from './GetArchiveProfile.js';
3
+ export { default as GetContentByObis } from './GetContentByObis.js';
4
+ export { default as GetContentByShortName } from './GetContentByShortName.js';
5
+ export { default as GetShortNameInfo } from './GetShortNameInfo.js';
6
+ export { default as GetShortNameProfile } from './GetShortNameProfile.js';
7
+ export { default as GetShortNames } from './GetShortNames.js';
8
+ export { default as ReadArchive } from './ReadArchive.js';
9
+ export { default as Reboot } from './Reboot.js';
10
+ export { default as RemoveShortNameProfile } from './RemoveShortNameProfile.js';
11
+ export { default as SetArchiveProfile } from './SetArchiveProfile.js';
12
+ export { default as SetSerialPort } from './SetSerialPort.js';
13
+ export { default as SetShortName } from './SetShortName.js';
@@ -0,0 +1,14 @@
1
+ export { default as AddShortNameProfile } from './AddShortNameProfile.js';
2
+ export { default as GetArchiveProfile } from './GetArchiveProfile.js';
3
+ export { default as GetContentByObis } from './GetContentByObis.js';
4
+ export { default as GetContentByShortName } from './GetContentByShortName.js';
5
+ export { default as GetShortNameInfo } from './GetShortNameInfo.js';
6
+ export { default as GetShortNameProfile } from './GetShortNameProfile.js';
7
+ export { default as GetShortNames } from './GetShortNames.js';
8
+ export { default as ReadArchive } from './ReadArchive.js';
9
+ export { default as Reboot } from './Reboot.js';
10
+ export { default as RemoveShortNameProfile } from './RemoveShortNameProfile.js';
11
+ export { default as SetArchiveProfile } from './SetArchiveProfile.js';
12
+ export { default as SetSerialPort } from './SetSerialPort.js';
13
+ export { default as SetShortName } from './SetShortName.js';
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAC,OAAO,IAAI,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * as downlink from './downlink/index.js';
2
+ export * as uplink from './uplink/index.js';
@@ -0,0 +1,3 @@
1
+ export * as downlink from './downlink/index.js';
2
+ export * as uplink from './uplink/index.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/obis-observer/commands/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IAddShortNameProfileResponseParameters extends ICommandParameters {
4
+ resultCode: number;
5
+ }
6
+ declare class AddShortNameProfileResponse extends Command {
7
+ parameters: IAddShortNameProfileResponseParameters;
8
+ constructor(parameters: IAddShortNameProfileResponseParameters);
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): AddShortNameProfileResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default AddShortNameProfileResponse;
@@ -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
+ import { resultCodes } from '../../constants/index.js';
5
+ const COMMAND_ID = 0x06;
6
+ const COMMAND_SIZE = 1 + REQUEST_ID_SIZE;
7
+ const examples = [
8
+ {
9
+ name: 'add short name profile - succeed',
10
+ parameters: {
11
+ requestId: 7,
12
+ resultCode: resultCodes.OK
13
+ },
14
+ hex: { header: '06', body: '07 00' }
15
+ }
16
+ ];
17
+ class AddShortNameProfileResponse extends Command {
18
+ constructor(parameters) {
19
+ super();
20
+ this.parameters = parameters;
21
+ this.size = COMMAND_SIZE;
22
+ }
23
+ static fromBytes(data) {
24
+ const buffer = new CommandBinaryBuffer(data);
25
+ return new AddShortNameProfileResponse({
26
+ requestId: buffer.getUint8(),
27
+ resultCode: buffer.getUint8()
28
+ });
29
+ }
30
+ toBytes() {
31
+ const buffer = new CommandBinaryBuffer(COMMAND_SIZE);
32
+ const { requestId, resultCode } = this.parameters;
33
+ buffer.setUint8(requestId);
34
+ buffer.setUint8(resultCode);
35
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
36
+ }
37
+ }
38
+ AddShortNameProfileResponse.id = COMMAND_ID;
39
+ AddShortNameProfileResponse.directionType = UPLINK;
40
+ AddShortNameProfileResponse.examples = examples;
41
+ AddShortNameProfileResponse.hasParameters = true;
42
+ export default AddShortNameProfileResponse;
43
+ //# sourceMappingURL=AddShortNameProfileResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddShortNameProfileResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/AddShortNameProfileResponse.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;AACrD,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AAWrD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,GAAG,eAAe,CAAC;AAEzC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,kCAAkC;QACxC,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,UAAU,EAAE,WAAW,CAAC,EAAE;SAC7B;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC;KACrC;CACJ,CAAC;AAuBF,MAAM,2BAA4B,SAAQ,OAAO;IAC7C,YAAqB,UAAkD;QACnE,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAwC;QAGnE,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,2BAA2B,CAAC;YACnC,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC5B,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE;SAChC,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACrD,MAAM,EAAC,SAAS,EAAE,UAAU,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAEhD,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAE5B,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AA5Be,8BAAE,GAAG,UAAU,CAAC;AAEhB,yCAAa,GAAG,MAAM,CAAC;AAEvB,oCAAQ,GAAG,QAAQ,CAAC;AAEpB,yCAAa,GAAG,IAAI,CAAC;AA0BzC,eAAe,2BAA2B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetArchiveProfileResponseParameters extends ICommandParameters {
4
+ summaryArchivePeriod?: number;
5
+ detailedArchivePeriod?: number;
6
+ }
7
+ declare class GetArchiveProfileResponse extends Command {
8
+ parameters: IGetArchiveProfileResponseParameters;
9
+ constructor(parameters: IGetArchiveProfileResponseParameters);
10
+ static readonly id = 14;
11
+ static readonly directionType = 2;
12
+ static readonly examples: TCommandExampleList;
13
+ static readonly hasParameters = true;
14
+ static fromBytes(data: Uint8Array): GetArchiveProfileResponse;
15
+ toBytes(): Uint8Array;
16
+ }
17
+ export default GetArchiveProfileResponse;
@@ -0,0 +1,45 @@
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 = 0x0e;
5
+ const COMMAND_SIZE = REQUEST_ID_SIZE + 4;
6
+ const examples = [
7
+ {
8
+ name: 'default periods',
9
+ parameters: {
10
+ requestId: 3,
11
+ summaryArchivePeriod: 600,
12
+ detailedArchivePeriod: 45
13
+ },
14
+ hex: { header: '0e', body: '03 02 58 00 2d' }
15
+ }
16
+ ];
17
+ class GetArchiveProfileResponse extends Command {
18
+ constructor(parameters) {
19
+ super();
20
+ this.parameters = parameters;
21
+ this.size = COMMAND_SIZE;
22
+ }
23
+ static fromBytes(data) {
24
+ const buffer = new CommandBinaryBuffer(data);
25
+ return new GetArchiveProfileResponse({
26
+ requestId: buffer.getUint8(),
27
+ summaryArchivePeriod: buffer.getUint16(),
28
+ detailedArchivePeriod: buffer.getUint16()
29
+ });
30
+ }
31
+ toBytes() {
32
+ const buffer = new CommandBinaryBuffer(COMMAND_SIZE);
33
+ const { requestId, summaryArchivePeriod, detailedArchivePeriod } = this.parameters;
34
+ buffer.setUint8(requestId);
35
+ buffer.setUint16(summaryArchivePeriod ?? 0);
36
+ buffer.setUint16(detailedArchivePeriod ?? 0);
37
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
38
+ }
39
+ }
40
+ GetArchiveProfileResponse.id = COMMAND_ID;
41
+ GetArchiveProfileResponse.directionType = UPLINK;
42
+ GetArchiveProfileResponse.examples = examples;
43
+ GetArchiveProfileResponse.hasParameters = true;
44
+ export default GetArchiveProfileResponse;
45
+ //# sourceMappingURL=GetArchiveProfileResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetArchiveProfileResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetArchiveProfileResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AA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qB,IAAI,CAAC,CAAC,CAAC;QAE7C,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AA9Be,4BAAE,GAAG,UAAU,CAAC;AAEhB,uCAAa,GAAG,MAAM,CAAC;AAEvB,kCAAQ,GAAG,QAAQ,CAAC;AAEpB,uCAAa,GAAG,IAAI,CAAC;AA4BzC,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetContentByObisResponseParameters extends ICommandParameters {
4
+ content: string;
5
+ }
6
+ declare class GetContentByObisResponse extends Command {
7
+ parameters: IGetContentByObisResponseParameters;
8
+ constructor(parameters: IGetContentByObisResponseParameters);
9
+ static readonly id = 22;
10
+ static readonly directionType = 2;
11
+ static readonly examples: TCommandExampleList;
12
+ static readonly hasParameters = true;
13
+ static fromBytes(data: Uint8Array): GetContentByObisResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default GetContentByObisResponse;
@@ -0,0 +1,45 @@
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 = 0x16;
5
+ const examples = [
6
+ {
7
+ name: 'content response',
8
+ parameters: {
9
+ requestId: 2,
10
+ content: '57906635'
11
+ },
12
+ hex: { header: '16', body: '0a 02 08 35 37 39 30 36 36 33 35' }
13
+ }
14
+ ];
15
+ class GetContentByObisResponse extends Command {
16
+ constructor(parameters) {
17
+ super();
18
+ this.parameters = parameters;
19
+ this.size = REQUEST_ID_SIZE + 1 + 1 + this.parameters.content.length;
20
+ }
21
+ static fromBytes(data) {
22
+ const buffer = new CommandBinaryBuffer(data);
23
+ buffer.seek(buffer.offset + 1);
24
+ const requestId = buffer.getUint8();
25
+ const content = buffer.getString();
26
+ return new GetContentByObisResponse({ requestId, content });
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, content } = this.parameters;
34
+ buffer.setUint8(this.size - 1);
35
+ buffer.setUint8(requestId);
36
+ buffer.setString(content);
37
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
38
+ }
39
+ }
40
+ GetContentByObisResponse.id = COMMAND_ID;
41
+ GetContentByObisResponse.directionType = UPLINK;
42
+ GetContentByObisResponse.examples = examples;
43
+ GetContentByObisResponse.hasParameters = true;
44
+ export default GetContentByObisResponse;
45
+ //# sourceMappingURL=GetContentByObisResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetContentByObisResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetContentByObisResponse.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,kBAAkB;QACxB,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,OAAO,EAAE,UAAU;SACtB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,kCAAkC,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,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC;IACzE,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAG7C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAE/B,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;QAG7C,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;QAC/B,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;;AArCe,2BAAE,GAAG,UAAU,CAAC;AAEhB,sCAAa,GAAG,MAAM,CAAC;AAEvB,iCAAQ,GAAG,QAAQ,CAAC;AAEpB,sCAAa,GAAG,IAAI,CAAC;AAmCzC,eAAe,wBAAwB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetContentByShortNameResponseParameters extends ICommandParameters {
4
+ content: number;
5
+ }
6
+ declare class GetContentByShortNameResponse extends Command {
7
+ parameters: IGetContentByShortNameResponseParameters;
8
+ constructor(parameters: IGetContentByShortNameResponseParameters);
9
+ static readonly id = 24;
10
+ static readonly directionType = 2;
11
+ static readonly examples: TCommandExampleList;
12
+ static readonly hasParameters = true;
13
+ static fromBytes(data: Uint8Array): GetContentByShortNameResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default GetContentByShortNameResponse;
@@ -0,0 +1,44 @@
1
+ import roundNumber from '../../../utils/roundNumber.js';
2
+ import Command from '../../Command.js';
3
+ import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
4
+ import { UPLINK } from '../../constants/directions.js';
5
+ const COMMAND_ID = 0x18;
6
+ const examples = [
7
+ {
8
+ name: 'simple response',
9
+ parameters: {
10
+ requestId: 121,
11
+ content: 344.23
12
+ },
13
+ hex: { header: '18', body: '79 43 ac 1d 71' }
14
+ }
15
+ ];
16
+ class GetContentByShortNameResponse extends Command {
17
+ constructor(parameters) {
18
+ super();
19
+ this.parameters = parameters;
20
+ this.size = REQUEST_ID_SIZE + 4;
21
+ }
22
+ static fromBytes(data) {
23
+ const buffer = new CommandBinaryBuffer(data);
24
+ const requestId = buffer.getUint8();
25
+ const content = roundNumber(buffer.getFloat32());
26
+ return new GetContentByShortNameResponse({ requestId, content });
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, content } = this.parameters;
34
+ buffer.setUint8(requestId);
35
+ buffer.setFloat32(roundNumber(content));
36
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
37
+ }
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetContentByShortNameResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetContentByShortNameResponse.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,iBAAiB;QACvB,UAAU,EAAE;YACR,SAAS,EAAE,GAAG;YACd,OAAO,EAAE,MAAM;SAClB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAC;KAC9C;CACJ,CAAC;AAuBF,MAAM,6BAA8B,SAAQ,OAAO;IAC/C,YAAqB,UAAoD;QACrE,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAA0C;QAIrE,IAAI,CAAC,IAAI,GAAG,eAAe,GAAG,CAAC,CAAC;IACpC,CAAC;IAYD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpC,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;QAEjD,OAAO,IAAI,6BAA6B,CAAC,EAAC,SAAS,EAAE,OAAO,EAAC,CAAC,CAAC;IACnE,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,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;QAExC,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAhCe,gCAAE,GAAG,UAAU,CAAC;AAEhB,2CAAa,GAAG,MAAM,CAAC;AAEvB,sCAAQ,GAAG,QAAQ,CAAC;AAEpB,2CAAa,GAAG,IAAI,CAAC;AA8BzC,eAAe,6BAA6B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
3
+ interface IGetContentByShortNameStringResponseParameters extends ICommandParameters {
4
+ content: string;
5
+ }
6
+ declare class GetContentByShortNameStringResponse extends Command {
7
+ parameters: IGetContentByShortNameStringResponseParameters;
8
+ constructor(parameters: IGetContentByShortNameStringResponseParameters);
9
+ static readonly id = 25;
10
+ static readonly directionType = 2;
11
+ static readonly examples: TCommandExampleList;
12
+ static readonly hasParameters = true;
13
+ static fromBytes(data: Uint8Array): GetContentByShortNameStringResponse;
14
+ toBytes(): Uint8Array;
15
+ }
16
+ export default GetContentByShortNameStringResponse;
@@ -0,0 +1,45 @@
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 = 0x19;
5
+ const examples = [
6
+ {
7
+ name: 'simple response',
8
+ parameters: {
9
+ requestId: 121,
10
+ content: 'Total energy'
11
+ },
12
+ hex: { header: '19', body: '0e 79 0c 54 6f 74 61 6c 20 65 6e 65 72 67 79' }
13
+ }
14
+ ];
15
+ class GetContentByShortNameStringResponse extends Command {
16
+ constructor(parameters) {
17
+ super();
18
+ this.parameters = parameters;
19
+ this.size = REQUEST_ID_SIZE + 1 + this.parameters.content.length + 1;
20
+ }
21
+ static fromBytes(data) {
22
+ const buffer = new CommandBinaryBuffer(data);
23
+ buffer.seek(buffer.offset + 1);
24
+ const requestId = buffer.getUint8();
25
+ const content = buffer.getString();
26
+ return new GetContentByShortNameStringResponse({ requestId, content });
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, content } = this.parameters;
34
+ buffer.setUint8(this.size - 1);
35
+ buffer.setUint8(requestId);
36
+ buffer.setString(content);
37
+ return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
38
+ }
39
+ }
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetContentByShortNameStringResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetContentByShortNameStringResponse.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,iBAAiB;QACvB,UAAU,EAAE;YACR,SAAS,EAAE,GAAG;YACd,OAAO,EAAE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AE,CAAC,CAAC;IAC9D,CAAC;;AArCe,sCAAE,GAAG,UAAU,CAAC;AAEhB,iDAAa,GAAG,MAAM,CAAC;AAEvB,4CAAQ,GAAG,QAAQ,CAAC;AAEpB,iDAAa,GAAG,IAAI,CAAC;AAmCzC,eAAe,mCAAmC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { ICommandParameters, IObisProfile, IObis } from '../../CommandBinaryBuffer.js';
3
+ interface IGetShortNameInfoResponseParameters extends ICommandParameters {
4
+ obis?: IObis;
5
+ obisProfile?: IObisProfile;
6
+ }
7
+ declare class GetShortNameInfoResponse extends Command {
8
+ parameters: IGetShortNameInfoResponseParameters;
9
+ constructor(parameters: IGetShortNameInfoResponseParameters);
10
+ static readonly id = 12;
11
+ static readonly directionType = 2;
12
+ static readonly examples: TCommandExampleList;
13
+ static readonly hasParameters = true;
14
+ static fromBytes(data: Uint8Array): GetShortNameInfoResponse;
15
+ toBytes(): Uint8Array;
16
+ }
17
+ export default GetShortNameInfoResponse;