jooby-codec 1.15.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} +2 -211
  5. package/dist/{CommandBinaryBuffer.js → analog/CommandBinaryBuffer.js} +6 -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 +0 -19
  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
@@ -1,12 +1,11 @@
1
1
  import Command from '../../Command.js';
2
2
  import CommandBinaryBuffer from '../../CommandBinaryBuffer.js';
3
- import getHexFromBytes from '../../utils/getHexFromBytes.js';
4
- import getBytesFromHex from '../../utils/getBytesFromHex.js';
3
+ import getHexFromBytes from '../../../utils/getHexFromBytes.js';
4
+ import getBytesFromHex from '../../../utils/getBytesFromHex.js';
5
5
  import * as events from '../../constants/events.js';
6
6
  import { UPLINK } from '../../constants/directions.js';
7
7
  import * as hardwareTypes from '../../constants/hardwareTypes.js';
8
8
  const COMMAND_ID = 0x15;
9
- // ACTIVATE_MTX are biggest,1 byte event id, 1 byte sequence number, 4 bytes time, 8 bytes mtx address
10
9
  const COMMAND_BODY_MAX_SIZE = 14;
11
10
  const MTX_ADDRESS_SIZE = 8;
12
11
  const examples = [
@@ -62,7 +61,6 @@ const examples = [
62
61
  sequenceNumber: 2,
63
62
  data: {
64
63
  status: {
65
- // first byte: 10000011 = 83 (131)
66
64
  isMeterCaseOpen: true,
67
65
  isMagneticInfluence: true,
68
66
  isParametersSetRemotely: false,
@@ -71,7 +69,6 @@ const examples = [
71
69
  isLockedOut: false,
72
70
  isTimeSet: false,
73
71
  isTimeCorrected: true,
74
- // second byte: 00001010 = 0a (10)
75
72
  isMeterFailure: false,
76
73
  isMeterTerminalBoxOpen: true,
77
74
  isModuleCompartmentOpen: false,
@@ -96,35 +93,11 @@ const setDeviceId = (buffer, value) => {
96
93
  const bytes = getBytesFromHex(value);
97
94
  bytes.forEach(byte => buffer.setUint8(byte));
98
95
  };
99
- /**
100
- * Uplink command.
101
- *
102
- * @example create command instance from command body hex dump
103
- * ```js
104
- * import NewEvent from 'jooby-codec/commands/uplink/NewEvent';
105
- *
106
- * const commandBody = new Uint8Array([
107
- * 0x05, 0x02, 0x0c, 0xec
108
- * ]);
109
- * const command = NewEvent.fromBytes(commandBody);
110
- *
111
- * console.log(command.parameters);
112
- * // output:
113
- * {
114
- * id: 5,
115
- * sequenceNumber: 2,
116
- * data: {voltage: 3308}
117
- * }
118
- * ```
119
- *
120
- * [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/uplink/NewEvent.md)
121
- */
122
96
  class NewEvent extends Command {
123
97
  constructor(parameters) {
124
98
  super();
125
99
  this.parameters = parameters;
126
100
  }
127
- // data - only body (without header)
128
101
  static fromBytes(data) {
129
102
  const buffer = new CommandBinaryBuffer(data);
130
103
  const id = buffer.getUint8();
@@ -152,7 +125,6 @@ class NewEvent extends Command {
152
125
  break;
153
126
  case events.CONNECT:
154
127
  case events.DISCONNECT:
155
- // 0 logical channel - 1 real channel
156
128
  eventData = { channel: buffer.getUint8() + 1, value: buffer.getExtendedValue() };
157
129
  break;
158
130
  case events.MTX:
@@ -163,7 +135,6 @@ class NewEvent extends Command {
163
135
  }
164
136
  return new NewEvent({ id, sequenceNumber, data: eventData });
165
137
  }
166
- // returns full message - header with body
167
138
  toBytes() {
168
139
  const { id, sequenceNumber, data } = this.parameters;
169
140
  const buffer = new CommandBinaryBuffer(COMMAND_BODY_MAX_SIZE);
@@ -197,7 +168,6 @@ class NewEvent extends Command {
197
168
  case events.CONNECT:
198
169
  case events.DISCONNECT:
199
170
  eventData = data;
200
- // 1 real channel - 0 logical channel
201
171
  buffer.setUint8(eventData.channel - 1);
202
172
  buffer.setExtendedValue(eventData.value);
203
173
  break;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NewEvent.js","sourceRoot":"","sources":["../../../../src/analog/commands/uplink/NewEvent.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAsC,MAAM,8BAA8B,CAAC;AAClF,OAAO,eAAe,MAAM,mCAAmC,CAAC;AAChE,OAAO,eAAe,MAAM,mCAAmC,CAAC;AAEhE,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAAO,KAAK,aAAa,MAAM,kCAAkC,CAAC;AA4DlE,MAAM,UAAU,GAAG,IAAI,CAAC;AAGxB,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAE3B,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE;YACR,EAAE,EAAE,MAAM,CAAC,SAAS;YACpB,cAAc,EAAE,CAAC;YACjB,IAAI,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC;SAC1B;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAC;KACpD;IACD;QACI,IAAI,EAAE,yBAAyB;QAC/B,UAAU,EAAE;YACR,EAAE,EAAE,MAAM,CAAC,aAAa;YACxB,cAAc,EAAE,CAAC;YACjB,IAAI,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC;SACxB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAC;KAC9C;IACD;QACI,IAAI,EAAE,wBAAwB;QAC9B,UAAU,EAAE;YACR,EAAE,EAAE,MAAM,CAAC,YAAY;YACvB,cAAc,EAAE,CAAC;YACjB,IAAI,EAAE,EAAC,IAAI,EAAE,SA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OAAO,CAAC;YACpB,KAAK,MAAM,CAAC,UAAU;gBAClB,SAAS,GAAG,IAAwB,CAAC;gBAErC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;gBACvC,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;gBACzC,MAAM;YAEV,KAAK,MAAM,CAAC,GAAG;gBACX,SAAS,GAAG,IAAiB,CAAC;gBAC9B,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;gBAC/D,MAAM;YAEV;gBACI,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,mBAAmB,CAAC,CAAC;SAC5E;QAED,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAClE,CAAC;;AA9Ge,WAAE,GAAG,UAAU,CAAC;AAEhB,sBAAa,GAAG,MAAM,CAAC;AAEvB,iBAAQ,GAAG,QAAQ,CAAC;AAEpB,sBAAa,GAAG,IAAI,CAAC;AA4GzC,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ interface ISetTime2000ResponseParameters {
3
+ status: number;
4
+ }
5
+ declare class SetTime2000Response extends Command {
6
+ parameters: ISetTime2000ResponseParameters;
7
+ constructor(parameters: ISetTime2000ResponseParameters);
8
+ static readonly id = 2;
9
+ static readonly directionType = 2;
10
+ static readonly examples: TCommandExampleList;
11
+ static readonly hasParameters = true;
12
+ static fromBytes(data: Uint8Array): SetTime2000Response;
13
+ toBytes(): Uint8Array;
14
+ }
15
+ export default SetTime2000Response;
@@ -1,5 +1,5 @@
1
1
  import Command from '../../Command.js';
2
- import BinaryBuffer from '../../BinaryBuffer.js';
2
+ import BinaryBuffer from '../../../utils/BinaryBuffer.js';
3
3
  import { UPLINK } from '../../constants/directions.js';
4
4
  const COMMAND_ID = 0x02;
5
5
  const COMMAND_BODY_SIZE = 1;
@@ -10,43 +10,24 @@ const examples = [
10
10
  hex: { header: '02 01', body: '01' }
11
11
  }
12
12
  ];
13
- /**
14
- * Uplink command.
15
- *
16
- * @example create command instance from command body hex dump
17
- * ```js
18
- * import SetTime2000Response from 'jooby-codec/commands/uplink/SetTime2000Response';
19
- *
20
- * const commandBody = new Uint8Array([0x01]);
21
- * const command = SetTime2000Response.fromBytes(commandBody);
22
- *
23
- * console.log(command.parameters);
24
- * // output:
25
- * {status: 1}
26
- * ```
27
- *
28
- * [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/SetTime2000.md#response)
29
- */
30
13
  class SetTime2000Response extends Command {
31
14
  constructor(parameters) {
32
15
  super();
33
16
  this.parameters = parameters;
34
17
  }
35
- // data - only body (without header)
36
18
  static fromBytes(data) {
37
19
  if (data.byteLength !== COMMAND_BODY_SIZE) {
38
- throw new Error(`${this.getName()}. Wrong buffer size: ${data.byteLength}.`);
20
+ throw new Error(`Wrong buffer size: ${data.byteLength}.`);
39
21
  }
40
22
  const buffer = new BinaryBuffer(data, false);
41
23
  const parameters = {
42
24
  status: buffer.getUint8()
43
25
  };
44
26
  if (!buffer.isEmpty) {
45
- throw new Error(`${this.getName()}. BinaryBuffer is not empty.`);
27
+ throw new Error('BinaryBuffer is not empty.');
46
28
  }
47
29
  return new SetTime2000Response(parameters);
48
30
  }
49
- // returns full message - header with body
50
31
  toBytes() {
51
32
  const { status } = this.parameters;
52
33
  const buffer = new BinaryBuffer(COMMAND_BODY_SIZE, false);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SetTime2000Response.js","sourceRoot":"","sources":["../../../../src/analog/commands/uplink/SetTime2000Response.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,YAAY,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAC,MAAM,EAA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B,iCAAa,GAAG,MAAM,CAAC;AAEvB,4BAAQ,GAAG,QAAQ,CAAC;AAEpB,iCAAa,GAAG,IAAI,CAAC;AAiCzC,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ declare class SoftRestartResponse extends Command {
3
+ static readonly id = 25;
4
+ static readonly directionType = 2;
5
+ static readonly examples: TCommandExampleList;
6
+ static readonly hasParameters = false;
7
+ static fromBytes(): SoftRestartResponse;
8
+ toBytes(): Uint8Array;
9
+ }
10
+ export default SoftRestartResponse;
@@ -0,0 +1,23 @@
1
+ import Command from '../../Command.js';
2
+ import { UPLINK } from '../../constants/directions.js';
3
+ const COMMAND_ID = 0x19;
4
+ const examples = [
5
+ {
6
+ name: 'simple response',
7
+ hex: { header: '19 00', body: '' }
8
+ }
9
+ ];
10
+ class SoftRestartResponse extends Command {
11
+ static fromBytes() {
12
+ return new SoftRestartResponse();
13
+ }
14
+ toBytes() {
15
+ return Command.toBytes(COMMAND_ID);
16
+ }
17
+ }
18
+ SoftRestartResponse.id = COMMAND_ID;
19
+ SoftRestartResponse.directionType = UPLINK;
20
+ SoftRestartResponse.examples = examples;
21
+ SoftRestartResponse.hasParameters = false;
22
+ export default SoftRestartResponse;
23
+ //# sourceMappingURL=SoftRestartResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SoftRestartResponse.js","sourceRoot":"","sources":["../../../../src/analog/commands/uplink/SoftRestartResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAGrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,iBAAiB;QACvB,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAC;KACnC;CACJ,CAAC;AAqBF,MAAM,mBAAoB,SAAQ,OAAO;IAWrC,MAAM,CAAC,SAAS;QACZ,OAAO,IAAI,mBAAmB,EAAE,CAAC;IACrC,CAAC;IAID,OAAO;QACH,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;;AAlBe,sBAAE,GAAG,UAAU,CAAC;AAEhB,iCAAa,GAAG,MAAM,CAAC;AAEvB,4BAAQ,GAAG,QAAQ,CAAC;AAEpB,iCAAa,GAAG,KAAK,CAAC;AAgB1C,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ interface IStatusBase {
3
+ }
4
+ interface IProduct {
5
+ version: number;
6
+ type: number;
7
+ }
8
+ interface IStatusParameters {
9
+ software: IProduct;
10
+ hardware: IProduct;
11
+ data: IStatusBase;
12
+ }
13
+ declare class Status extends Command {
14
+ parameters: IStatusParameters;
15
+ constructor(parameters: IStatusParameters);
16
+ static readonly id = 20;
17
+ static readonly directionType = 2;
18
+ static readonly examples: TCommandExampleList;
19
+ static readonly hasParameters = true;
20
+ static fromBytes(data: Uint8Array): Status;
21
+ toBytes(): Uint8Array;
22
+ }
23
+ export default Status;
@@ -1,12 +1,11 @@
1
1
  import Command from '../../Command.js';
2
2
  import CommandBinaryBuffer from '../../CommandBinaryBuffer.js';
3
- import roundNumber from '../../utils/roundNumber.js';
3
+ import roundNumber from '../../../utils/roundNumber.js';
4
4
  import * as hardwareTypes from '../../constants/hardwareTypes.js';
5
5
  import { UPLINK } from '../../constants/directions.js';
6
6
  const COMMAND_ID = 0x14;
7
7
  const COMMAND_BODY_MAX_SIZE = 20;
8
8
  const UNKNOWN_BATTERY_RESISTANCE = 65535;
9
- // max battery capacity, 254 - 100%
10
9
  const UNKNOWN_BATTERY_CAPACITY = 255;
11
10
  const examples = [
12
11
  {
@@ -25,41 +24,11 @@ const examples = [
25
24
  hex: { header: '14 0c', body: '02 0a 03 01 c5 6d c2 27 32 0e 68 22' }
26
25
  }
27
26
  ];
28
- /**
29
- * Uplink command.
30
- *
31
- * @example create command instance from command body hex dump
32
- * ```js
33
- * import Status from 'jooby-codec/commands/uplink/Status';
34
- *
35
- * const commandBody = new Uint8Array([
36
- * 0x02, 0x0a, 0x03, 0x01, 0xc5, 0x6d, 0xc2, 0x27, 0x32, 0x0e, 0x68, 0x22
37
- * ]);
38
- * const command = Status.fromBytes(commandBody);
39
- *
40
- * console.log(command.parameters);
41
- * // output:
42
- * {
43
- * software: {type: 2, version: 10},
44
- * hardware: {type: 3, version: 1},
45
- * data: {
46
- * batteryVoltage: {low: 3158, high: 3522},
47
- * batteryInternalResistance: 10034,
48
- * temperature: 14,
49
- * remainingBatteryCapacity: 41,
50
- * lastEventSequenceNumber: 34
51
- * }
52
- * }
53
- * ```
54
- *
55
- * [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/GetStatus.md#response)
56
- */
57
27
  class Status extends Command {
58
28
  constructor(parameters) {
59
29
  super();
60
30
  this.parameters = parameters;
61
31
  }
62
- // data - only body (without header)
63
32
  static fromBytes(data) {
64
33
  const buffer = new CommandBinaryBuffer(data);
65
34
  const software = { type: buffer.getUint8(), version: buffer.getUint8() };
@@ -100,7 +69,6 @@ class Status extends Command {
100
69
  }
101
70
  return new Status({ software, hardware, data: statusData });
102
71
  }
103
- // returns full message - header with body
104
72
  toBytes() {
105
73
  const { software, hardware, data } = this.parameters;
106
74
  const buffer = new CommandBinaryBuffer(COMMAND_BODY_MAX_SIZE);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Status.js","sourceRoot":"","sources":["../../../../src/analog/commands/uplink/Status.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAsC,MAAM,8BAA8B,CAAC;AAClF,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,aAAa,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAC,MAAM,EAAC,MAAM,+B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AAM,CAAC,SAAS,CAAC,UAAU,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;iBACjE;gBAED,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;gBAExC,IAAK,UAAU,CAAC,wBAAwB,KAAK,SAAS,EAAG;oBACrD,MAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;iBAC7C;qBAAM;oBACH,MAAM,CAAC,QAAQ,CAAC,CAAC,wBAAwB,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,wBAAwB,GAAG,GAAG,CAAC,CAAC,CAAC;iBACjG;gBAED,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;gBAEpD,MAAM;YAEV,KAAK,aAAa,CAAC,OAAO,CAAC;YAC3B,KAAK,aAAa,CAAC,KAAK,CAAC;YACzB;gBACI,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,mBAAmB,QAAQ,CAAC,IAAI,mBAAmB,CAAC,CAAC;SAC7F;QAED,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAClE,CAAC;;AA7Ge,SAAE,GAAG,UAAU,CAAC;AAEhB,oBAAa,GAAG,MAAM,CAAC;AAEvB,eAAQ,GAAG,QAAQ,CAAC;AAEpB,oBAAa,GAAG,IAAI,CAAC;AA2GzC,eAAe,MAAM,CAAC"}
@@ -0,0 +1,17 @@
1
+ import Command, { TCommandExampleList } from '../../Command.js';
2
+ import { TTime2000 } from '../../../utils/time.js';
3
+ interface ITime2000Parameters {
4
+ sequenceNumber: number;
5
+ time: TTime2000;
6
+ }
7
+ declare class Time2000 extends Command {
8
+ parameters: ITime2000Parameters;
9
+ constructor(parameters: ITime2000Parameters);
10
+ static readonly id = 9;
11
+ static readonly directionType = 2;
12
+ static readonly examples: TCommandExampleList;
13
+ static readonly hasParameters = true;
14
+ static fromBytes(data: Uint8Array): Time2000;
15
+ toBytes(): Uint8Array;
16
+ }
17
+ export default Time2000;
@@ -10,33 +10,14 @@ const examples = [
10
10
  hex: { header: '09 05', body: '4d 2b bd 98 ad' }
11
11
  }
12
12
  ];
13
- /**
14
- * Uplink command.
15
- *
16
- * @example create command instance from command body hex dump
17
- * ```js
18
- * import CorrectTime2000Response from 'jooby-codec/commands/uplink/CorrectTime2000Response';
19
- *
20
- * // failure
21
- * const commandBody = new Uint8Array([0x4d, 0x2b, 0xbd, 0x98, 0xad]);
22
- * const command = CorrectTime2000Response.fromBytes(commandBody);
23
- *
24
- * console.log(command.parameters);
25
- * // output:
26
- * {sequenceNumber: 77, time: 733845677}
27
- * ```
28
- *
29
- * [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/uplink/Time2000.md)
30
- */
31
13
  class Time2000 extends Command {
32
14
  constructor(parameters) {
33
15
  super();
34
16
  this.parameters = parameters;
35
17
  }
36
- // data - only body (without header)
37
18
  static fromBytes(data) {
38
19
  if (data.byteLength !== COMMAND_BODY_SIZE) {
39
- throw new Error(`${this.getName()}. Wrong buffer size: ${data.byteLength}.`);
20
+ throw new Error(`Wrong buffer size: ${data.byteLength}.`);
40
21
  }
41
22
  const buffer = new CommandBinaryBuffer(data);
42
23
  const parameters = {
@@ -44,11 +25,10 @@ class Time2000 extends Command {
44
25
  time: buffer.getTime()
45
26
  };
46
27
  if (!buffer.isEmpty) {
47
- throw new Error(`${this.getName()}. BinaryBuffer is not empty.`);
28
+ throw new Error('BinaryBuffer is not empty.');
48
29
  }
49
30
  return new Time2000(parameters);
50
31
  }
51
- // returns full message - header with body
52
32
  toBytes() {
53
33
  const { sequenceNumber, time } = this.parameters;
54
34
  const buffer = new CommandBinaryBuffer(COMMAND_BODY_SIZE);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Time2000.js","sourceRoot":"","sources":["../../../../src/analog/commands/uplink/Time2000.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MA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c,CAAC,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAErB,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AArCe,WAAE,GAAG,UAAU,CAAC;AAEhB,sBAAa,GAAG,MAAM,CAAC;AAEvB,iBAAQ,GAAG,QAAQ,CAAC;AAEpB,sBAAa,GAAG,IAAI,CAAC;AAmCzC,eAAe,QAAQ,CAAC"}
@@ -1,8 +1,3 @@
1
- /**
2
- * All uplink commands.
3
- *
4
- * @packageDocumentation
5
- */
6
1
  export { default as CorrectTime2000Response } from './CorrectTime2000Response.js';
7
2
  export { default as CurrentMC } from './CurrentMC.js';
8
3
  export { default as DayMC } from './DayMC.js';
@@ -1,8 +1,3 @@
1
- /**
2
- * All uplink commands.
3
- *
4
- * @packageDocumentation
5
- */
6
1
  export { default as CorrectTime2000Response } from './CorrectTime2000Response.js';
7
2
  export { default as CurrentMC } from './CurrentMC.js';
8
3
  export { default as DayMC } from './DayMC.js';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/analog/commands/uplink/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,OAAO,IAAI,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,wBAAwB,EAAC,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAC,OAAO,IAAI,wBAAwB,EAAC,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAC,OAAO,IAAI,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAC,OAAO,IAAI,6BAA6B,EAAC,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAC,OAAO,IAAI,8BAA8B,EAAC,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAC,OAAO,IAAI,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,eAAe,CAAC"}
@@ -0,0 +1,18 @@
1
+ export declare const REPORTING_DATA_INTERVAL = 1;
2
+ export declare const DAY_CHECKOUT_HOUR = 4;
3
+ export declare const REPORTING_DATA_TYPE = 5;
4
+ export declare const PRIORITY_DATA_DELIVERY_TYPE = 8;
5
+ export declare const ACTIVATION_METHOD = 9;
6
+ export declare const BATTERY_DEPASSIVATION_INFO = 10;
7
+ export declare const BATTERY_MINIMAL_LOAD_TIME = 11;
8
+ export declare const CHANNELS_CONFIG = 13;
9
+ export declare const RX2_CONFIG = 18;
10
+ export declare const ABSOLUTE_DATA = 23;
11
+ export declare const ABSOLUTE_DATA_ENABLE = 24;
12
+ export declare const SERIAL_NUMBER = 25;
13
+ export declare const GEOLOCATION = 26;
14
+ export declare const EXTRA_FRAME_INTERVAL = 28;
15
+ export declare const ABSOLUTE_DATA_MULTI_CHANNEL = 29;
16
+ export declare const ABSOLUTE_DATA_ENABLE_MULTI_CHANNEL = 30;
17
+ export declare const PULSE_CHANNELS_SCAN_CONFIG = 31;
18
+ export declare const PULSE_CHANNELS_SET_CONFIG = 32;
@@ -0,0 +1,19 @@
1
+ export const REPORTING_DATA_INTERVAL = 1;
2
+ export const DAY_CHECKOUT_HOUR = 4;
3
+ export const REPORTING_DATA_TYPE = 5;
4
+ export const PRIORITY_DATA_DELIVERY_TYPE = 8;
5
+ export const ACTIVATION_METHOD = 9;
6
+ export const BATTERY_DEPASSIVATION_INFO = 10;
7
+ export const BATTERY_MINIMAL_LOAD_TIME = 11;
8
+ export const CHANNELS_CONFIG = 13;
9
+ export const RX2_CONFIG = 18;
10
+ export const ABSOLUTE_DATA = 23;
11
+ export const ABSOLUTE_DATA_ENABLE = 24;
12
+ export const SERIAL_NUMBER = 25;
13
+ export const GEOLOCATION = 26;
14
+ export const EXTRA_FRAME_INTERVAL = 28;
15
+ export const ABSOLUTE_DATA_MULTI_CHANNEL = 29;
16
+ export const ABSOLUTE_DATA_ENABLE_MULTI_CHANNEL = 30;
17
+ export const PULSE_CHANNELS_SCAN_CONFIG = 31;
18
+ export const PULSE_CHANNELS_SET_CONFIG = 32;
19
+ //# sourceMappingURL=deviceParameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deviceParameters.js","sourceRoot":"","sources":["../../../src/analog/constants/deviceParameters.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAGzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAGnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAGrC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAG7C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAGnC,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAG7C,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAO5C,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAGlC,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC;AAG7B,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC;AAGhC,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAGvC,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC;AAGhC,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAG9B,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAGvC,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAG9C,MAAM,CAAC,MAAM,kCAAkC,GAAG,EAAE,CAAC;AAQrD,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAQ7C,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directions.js","sourceRoot":"","sources":["../../../src/analog/constants/directions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC;AACtB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ export declare const MAGNET_ON = 1;
2
+ export declare const MAGNET_OFF = 2;
3
+ export declare const ACTIVATE = 3;
4
+ export declare const DEACTIVATE = 4;
5
+ export declare const BATTERY_ALARM = 5;
6
+ export declare const CAN_OFF = 6;
7
+ export declare const INSERT = 7;
8
+ export declare const REMOVE = 8;
9
+ export declare const COUNTER_OVER = 9;
10
+ export declare const SET_TIME = 10;
11
+ export declare const ACTIVATE_MTX = 11;
12
+ export declare const CONNECT = 12;
13
+ export declare const DISCONNECT = 13;
14
+ export declare const DEPASS_DONE = 14;
15
+ export declare const OPTOLOW = 15;
16
+ export declare const OPTOFLASH = 16;
17
+ export declare const MTX = 17;
18
+ export declare const JOIN_ACCEPT = 18;
19
+ export declare const WATER_EVENT = 19;
20
+ export declare const WATER_NO_RESPONSE = 20;
21
+ export declare const OPTOSENSOR_ERROR = 21;
@@ -0,0 +1,22 @@
1
+ export const MAGNET_ON = 1;
2
+ export const MAGNET_OFF = 2;
3
+ export const ACTIVATE = 3;
4
+ export const DEACTIVATE = 4;
5
+ export const BATTERY_ALARM = 5;
6
+ export const CAN_OFF = 6;
7
+ export const INSERT = 7;
8
+ export const REMOVE = 8;
9
+ export const COUNTER_OVER = 9;
10
+ export const SET_TIME = 10;
11
+ export const ACTIVATE_MTX = 11;
12
+ export const CONNECT = 12;
13
+ export const DISCONNECT = 13;
14
+ export const DEPASS_DONE = 14;
15
+ export const OPTOLOW = 15;
16
+ export const OPTOFLASH = 16;
17
+ export const MTX = 17;
18
+ export const JOIN_ACCEPT = 18;
19
+ export const WATER_EVENT = 19;
20
+ export const WATER_NO_RESPONSE = 20;
21
+ export const OPTOSENSOR_ERROR = 21;
22
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/analog/constants/events.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC;AAG3B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC;AAG5B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC;AAG1B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC;AAG5B,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAG/B,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC;AAGzB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC;AAGxB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC;AAGxB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAG9B,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,CAAC;AAG3B,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAG/B,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;AAG1B,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC;AAG7B,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAG9B,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;AAG1B,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,CAAC;AAG5B,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;AAGtB,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAG9B,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAG9B,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAGpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const GASI1 = 1;
2
+ export declare const GASI2 = 2;
3
+ export declare const GASI3 = 3;
4
+ export declare const NOVATOR = 4;
5
+ export declare const IMP2EU = 5;
6
+ export declare const IMP4EU = 6;
7
+ export declare const MTXLORA = 7;
8
+ export declare const IMP2AS = 8;
9
+ export declare const IMP2IN = 9;
10
+ export declare const IMP4IN = 10;
11
+ export declare const ELIMP = 11;
12
+ export declare const GASIC = 12;
13
+ export declare const IMP4AS = 15;
@@ -0,0 +1,14 @@
1
+ export const GASI1 = 1;
2
+ export const GASI2 = 2;
3
+ export const GASI3 = 3;
4
+ export const NOVATOR = 4;
5
+ export const IMP2EU = 5;
6
+ export const IMP4EU = 6;
7
+ export const MTXLORA = 7;
8
+ export const IMP2AS = 8;
9
+ export const IMP2IN = 9;
10
+ export const IMP4IN = 10;
11
+ export const ELIMP = 11;
12
+ export const GASIC = 12;
13
+ export const IMP4AS = 15;
14
+ //# sourceMappingURL=hardwareTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hardwareTypes.js","sourceRoot":"","sources":["../../../src/analog/constants/hardwareTypes.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC;AAQvB,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC;AAavB,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC;AAUvB,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC;AAMzB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC;AAWxB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC;AAMxB,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC;AAOzB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC;AAOxB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC;AAOxB,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,CAAC;AASzB,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;AAiBxB,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;AAWxB,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/analog/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC"}
@@ -1,8 +1,3 @@
1
- /**
2
- * Possible values of RX2 spread factor
3
- *
4
- * @packageDocumentation
5
- */
6
1
  export declare const SF12B125 = 0;
7
2
  export declare const SF11B125 = 1;
8
3
  export declare const SF10B125 = 2;
@@ -1,8 +1,3 @@
1
- /**
2
- * Possible values of RX2 spread factor
3
- *
4
- * @packageDocumentation
5
- */
6
1
  export const SF12B125 = 0;
7
2
  export const SF11B125 = 1;
8
3
  export const SF10B125 = 2;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rx2SpreadFactors.js","sourceRoot":"","sources":["../../../src/analog/constants/rx2SpreadFactors.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC;AAE1B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC;AAE1B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC;AAE1B,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC;AAEzB,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC;AAEzB,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC;AAEzB,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { IHexFormatOptions } from './getHexFromBytes.js';
1
+ import { IHexFormatOptions } from '../config.js';
2
2
  export declare const fromBytes: (data: Uint8Array) => {
3
3
  headerSize: number;
4
4
  commandId: number;
@@ -1,5 +1,5 @@
1
- import getBytesFromHex from './getBytesFromHex.js';
2
- import getHexFromBytes from './getHexFromBytes.js';
1
+ import getBytesFromHex from '../utils/getBytesFromHex.js';
2
+ import getHexFromBytes from '../utils/getHexFromBytes.js';
3
3
  const shortCommandMask = 0xe0;
4
4
  const extraCommandMask = 0x1f;
5
5
  export const fromBytes = (data) => {
@@ -11,7 +11,6 @@ export const fromBytes = (data) => {
11
11
  extraCode: data[0] & extraCommandMask
12
12
  };
13
13
  if (header.shortCode !== 0) {
14
- // short header
15
14
  return {
16
15
  headerSize: 1,
17
16
  commandId: data[0] & (~header.extraCode),
@@ -19,7 +18,6 @@ export const fromBytes = (data) => {
19
18
  };
20
19
  }
21
20
  if (header.extraCode === extraCommandMask) {
22
- // extra command
23
21
  if (data.length < 3) {
24
22
  throw new Error('Invalid buffer size');
25
23
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/analog/header.ts"],"names":[],"mappings":"AACA,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAG1D,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAG9B,MAAM,CAAC,MAAM,SAAS,GAAG,CAAE,IAAgB,EAAG,EAAE;IAC5C,IAAK,IAAI,CAAC,MAAM,KAAK,CAAC,EAAG;QACrB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;KAC1C;IAED,MAAM,MAAM,GAAG;QACX,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,gBAAgB;QACrC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,gBAAgB;KACxC,CAAC;IAEF,IAAK,MAAM,CAAC,SAAS,KAAK,CAAC,EAAG;QAE1B,OAAO;YACH,UAAU,EAAE,CAAC;YACb,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC;YACxC,WAAW,EAAE,MAAM,CAAC,SAAS;SAChC,CAAC;KACL;IAED,IAAK,MAAM,CAAC,SAAS,KAAK,gBAAgB,EAAG;QAEzC,IAAK,IAAI,CAAC,MAAM,GAAG,CAAC,EAAG;YACnB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;SAC1C;QACD,OAAO;YACH,UAAU,EAAE,CAAC;YACb,SAAS,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,gBAAgB;YAC5C,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC;SACvB,CAAC;KACL;IAED,IAAK,IAAI,CAAC,MAAM,GAAG,CAAC,EAAG;QACnB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;KAC1C;IAED,OAAO;QACH,UAAU,EAAE,CAAC;QACb,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC;KACvB,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAE,IAAY,EAAG,EAAE,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,OAAO,GAAG,CAAE,SAAiB,EAAE,WAAmB,EAAe,EAAE;IAC5E,IAAK,CAAC,SAAS,GAAG,gBAAgB,CAAC,KAAK,CAAC,EAAG;QACxC,IAAK,WAAW,GAAG,gBAAgB,EAAG;YAClC,MAAM,IAAI,KAAK,CAAC,8BAA8B,SAAS,WAAW,WAAW,GAAG,CAAC,CAAC;SACrF;QAED,OAAO,IAAI,UAAU,CAAC,CAAC,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC;KACpD;IAED,IAAK,SAAS,GAAG,gBAAgB,EAAG;QAChC,OAAO,IAAI,UAAU,CAAC;YAClB,gBAAgB;YAChB,CAAC,SAAS,IAAI,CAAC,CAAC;YAChB,WAAW;SACd,CAAC,CAAC;KACN;IAED,OAAO,IAAI,UAAU,CAAC;QAClB,SAAS;QACT,WAAW;KACd,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAE,SAAiB,EAAE,WAAmB,EAAE,UAA6B,EAAE,EAAW,EAAE,CAAC,CACxG,eAAe,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE,OAAO,CAAC,CAC5D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * as commands from './commands/index.js';
2
+ export * as message from './message.js';
3
+ export * as constants from './constants/index.js';
@@ -0,0 +1,4 @@
1
+ export * as commands from './commands/index.js';
2
+ export * as message from './message.js';
3
+ export * as constants from './constants/index.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/analog/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC"}