jooby-codec 1.15.0 → 2.1.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.
- package/dist/analog/Command.d.ts +29 -0
- package/dist/analog/Command.js +34 -0
- package/dist/analog/Command.js.map +1 -0
- package/dist/{CommandBinaryBuffer.d.ts → analog/CommandBinaryBuffer.d.ts} +4 -213
- package/dist/{CommandBinaryBuffer.js → analog/CommandBinaryBuffer.js} +10 -84
- package/dist/analog/CommandBinaryBuffer.js.map +1 -0
- package/dist/{UnknownCommand.d.ts → analog/UnknownCommand.d.ts} +0 -8
- package/dist/{UnknownCommand.js → analog/UnknownCommand.js} +0 -5
- package/dist/analog/UnknownCommand.js.map +1 -0
- package/dist/analog/commands/downlink/CorrectTime2000.d.ts +16 -0
- package/dist/{commands → analog/commands}/downlink/CorrectTime2000.js +3 -23
- package/dist/analog/commands/downlink/CorrectTime2000.js.map +1 -0
- package/dist/analog/commands/downlink/GetArchiveDaysMC.d.ts +18 -0
- package/dist/{commands → analog/commands}/downlink/GetArchiveDaysMC.js +7 -31
- package/dist/analog/commands/downlink/GetArchiveDaysMC.js.map +1 -0
- package/dist/analog/commands/downlink/GetArchiveEvents.d.ts +17 -0
- package/dist/{commands → analog/commands}/downlink/GetArchiveEvents.js +5 -24
- package/dist/analog/commands/downlink/GetArchiveEvents.js.map +1 -0
- package/dist/analog/commands/downlink/GetArchiveHoursMC.d.ts +18 -0
- package/dist/{commands → analog/commands}/downlink/GetArchiveHoursMC.js +7 -26
- package/dist/analog/commands/downlink/GetArchiveHoursMC.js.map +1 -0
- package/dist/analog/commands/downlink/GetCurrentMC.d.ts +10 -0
- package/dist/analog/commands/downlink/GetCurrentMC.js +23 -0
- package/dist/analog/commands/downlink/GetCurrentMC.js.map +1 -0
- package/dist/analog/commands/downlink/GetExAbsArchiveDaysMC.d.ts +18 -0
- package/dist/{commands → analog/commands}/downlink/GetExAbsArchiveDaysMC.js +7 -28
- package/dist/analog/commands/downlink/GetExAbsArchiveDaysMC.js.map +1 -0
- package/dist/analog/commands/downlink/GetExAbsArchiveHoursMC.d.ts +18 -0
- package/dist/{commands → analog/commands}/downlink/GetExAbsArchiveHoursMC.js +7 -27
- package/dist/analog/commands/downlink/GetExAbsArchiveHoursMC.js.map +1 -0
- package/dist/analog/commands/downlink/GetExAbsCurrentMC.d.ts +11 -0
- package/dist/{commands → analog/commands}/downlink/GetExAbsCurrentMC.js +0 -20
- package/dist/analog/commands/downlink/GetExAbsCurrentMC.js.map +1 -0
- package/dist/analog/commands/downlink/GetLmicInfo.d.ts +10 -0
- package/dist/analog/commands/downlink/GetLmicInfo.js +23 -0
- package/dist/analog/commands/downlink/GetLmicInfo.js.map +1 -0
- package/dist/analog/commands/downlink/GetParameter.d.ts +15 -0
- package/dist/{commands → analog/commands}/downlink/GetParameter.js +0 -20
- package/dist/analog/commands/downlink/GetParameter.js.map +1 -0
- package/dist/analog/commands/downlink/GetStatus.d.ts +11 -0
- package/dist/{commands → analog/commands}/downlink/GetStatus.js +0 -19
- package/dist/analog/commands/downlink/GetStatus.js.map +1 -0
- package/dist/analog/commands/downlink/SetParameter.d.ts +13 -0
- package/dist/{commands → analog/commands}/downlink/SetParameter.js +0 -19
- package/dist/analog/commands/downlink/SetParameter.js.map +1 -0
- package/dist/analog/commands/downlink/SetTime2000.d.ts +16 -0
- package/dist/{commands → analog/commands}/downlink/SetTime2000.js +3 -22
- package/dist/analog/commands/downlink/SetTime2000.js.map +1 -0
- package/dist/analog/commands/downlink/SoftRestart.d.ts +10 -0
- package/dist/analog/commands/downlink/SoftRestart.js +23 -0
- package/dist/analog/commands/downlink/SoftRestart.js.map +1 -0
- package/dist/{commands → analog/commands}/downlink/index.d.ts +0 -5
- package/dist/{commands → analog/commands}/downlink/index.js +0 -5
- package/dist/analog/commands/downlink/index.js.map +1 -0
- package/dist/{commands → analog/commands}/index.d.ts +0 -5
- package/dist/{commands → analog/commands}/index.js +0 -5
- package/dist/analog/commands/index.js.map +1 -0
- package/dist/analog/commands/uplink/CorrectTime2000Response.d.ts +15 -0
- package/dist/{commands → analog/commands}/uplink/CorrectTime2000Response.js +3 -23
- package/dist/analog/commands/uplink/CorrectTime2000Response.js.map +1 -0
- package/dist/{commands → analog/commands}/uplink/CurrentMC.d.ts +0 -24
- package/dist/{commands → analog/commands}/uplink/CurrentMC.js +0 -24
- package/dist/analog/commands/uplink/CurrentMC.js.map +1 -0
- package/dist/analog/commands/uplink/DayMC.d.ts +17 -0
- package/dist/{commands → analog/commands}/uplink/DayMC.js +6 -38
- package/dist/analog/commands/uplink/DayMC.js.map +1 -0
- package/dist/analog/commands/uplink/ExAbsCurrentMC.d.ts +16 -0
- package/dist/{commands → analog/commands}/uplink/ExAbsCurrentMC.js +0 -29
- package/dist/analog/commands/uplink/ExAbsCurrentMC.js.map +1 -0
- package/dist/analog/commands/uplink/ExAbsDayMC.d.ts +19 -0
- package/dist/{commands → analog/commands}/uplink/ExAbsDayMC.js +5 -35
- package/dist/analog/commands/uplink/ExAbsDayMC.js.map +1 -0
- package/dist/analog/commands/uplink/ExAbsHourMC.d.ts +19 -0
- package/dist/{commands → analog/commands}/uplink/ExAbsHourMC.js +6 -41
- package/dist/analog/commands/uplink/ExAbsHourMC.js.map +1 -0
- package/dist/analog/commands/uplink/GetArchiveDaysMCResponse.d.ts +19 -0
- package/dist/{commands → analog/commands}/uplink/GetArchiveDaysMCResponse.js +5 -37
- package/dist/analog/commands/uplink/GetArchiveDaysMCResponse.js.map +1 -0
- package/dist/analog/commands/uplink/GetArchiveEventsResponse.d.ts +21 -0
- package/dist/{commands → analog/commands}/uplink/GetArchiveEventsResponse.js +7 -33
- package/dist/analog/commands/uplink/GetArchiveEventsResponse.js.map +1 -0
- package/dist/analog/commands/uplink/GetArchiveHoursMCResponse.d.ts +19 -0
- package/dist/{commands → analog/commands}/uplink/GetArchiveHoursMCResponse.js +3 -36
- package/dist/analog/commands/uplink/GetArchiveHoursMCResponse.js.map +1 -0
- package/dist/analog/commands/uplink/GetExAbsArchiveDaysMCResponse.d.ts +19 -0
- package/dist/{commands → analog/commands}/uplink/GetExAbsArchiveDaysMCResponse.js +5 -37
- package/dist/analog/commands/uplink/GetExAbsArchiveDaysMCResponse.js.map +1 -0
- package/dist/analog/commands/uplink/GetExAbsArchiveHoursMCResponse.d.ts +19 -0
- package/dist/{commands → analog/commands}/uplink/GetExAbsArchiveHoursMCResponse.js +5 -35
- package/dist/analog/commands/uplink/GetExAbsArchiveHoursMCResponse.js.map +1 -0
- package/dist/analog/commands/uplink/GetLmicInfoResponse.d.ts +21 -0
- package/dist/{commands → analog/commands}/uplink/GetLmicInfoResponse.js +4 -29
- package/dist/analog/commands/uplink/GetLmicInfoResponse.js.map +1 -0
- package/dist/analog/commands/uplink/GetParameterResponse.d.ts +13 -0
- package/dist/{commands → analog/commands}/uplink/GetParameterResponse.js +0 -24
- package/dist/analog/commands/uplink/GetParameterResponse.js.map +1 -0
- package/dist/analog/commands/uplink/HourMC.d.ts +20 -0
- package/dist/{commands → analog/commands}/uplink/HourMC.js +5 -39
- package/dist/analog/commands/uplink/HourMC.js.map +1 -0
- package/dist/analog/commands/uplink/LastEvent.d.ts +21 -0
- package/dist/{commands → analog/commands}/uplink/LastEvent.js +22 -48
- package/dist/analog/commands/uplink/LastEvent.js.map +1 -0
- package/dist/{commands → analog/commands}/uplink/NewEvent.d.ts +2 -43
- package/dist/{commands → analog/commands}/uplink/NewEvent.js +8 -38
- package/dist/analog/commands/uplink/NewEvent.js.map +1 -0
- package/dist/analog/commands/uplink/SetTime2000Response.d.ts +15 -0
- package/dist/{commands → analog/commands}/uplink/SetTime2000Response.js +3 -22
- package/dist/analog/commands/uplink/SetTime2000Response.js.map +1 -0
- package/dist/analog/commands/uplink/SoftRestartResponse.d.ts +10 -0
- package/dist/analog/commands/uplink/SoftRestartResponse.js +23 -0
- package/dist/analog/commands/uplink/SoftRestartResponse.js.map +1 -0
- package/dist/analog/commands/uplink/Status.d.ts +23 -0
- package/dist/{commands → analog/commands}/uplink/Status.js +1 -33
- package/dist/analog/commands/uplink/Status.js.map +1 -0
- package/dist/analog/commands/uplink/Time2000.d.ts +17 -0
- package/dist/{commands → analog/commands}/uplink/Time2000.js +6 -26
- package/dist/analog/commands/uplink/Time2000.js.map +1 -0
- package/dist/{commands → analog/commands}/uplink/index.d.ts +0 -5
- package/dist/{commands → analog/commands}/uplink/index.js +0 -5
- package/dist/analog/commands/uplink/index.js.map +1 -0
- package/dist/analog/constants/deviceParameters.d.ts +18 -0
- package/dist/analog/constants/deviceParameters.js +19 -0
- package/dist/analog/constants/deviceParameters.js.map +1 -0
- package/dist/analog/constants/directions.js.map +1 -0
- package/dist/analog/constants/events.d.ts +21 -0
- package/dist/analog/constants/events.js +22 -0
- package/dist/analog/constants/events.js.map +1 -0
- package/dist/analog/constants/hardwareTypes.d.ts +13 -0
- package/dist/analog/constants/hardwareTypes.js +14 -0
- package/dist/analog/constants/hardwareTypes.js.map +1 -0
- package/dist/analog/constants/index.js.map +1 -0
- package/dist/{constants → analog/constants}/rx2SpreadFactors.d.ts +0 -5
- package/dist/{constants → analog/constants}/rx2SpreadFactors.js +0 -5
- package/dist/analog/constants/rx2SpreadFactors.js.map +1 -0
- package/dist/{utils → analog}/header.d.ts +1 -1
- package/dist/{utils → analog}/header.js +2 -4
- package/dist/analog/header.js.map +1 -0
- package/dist/analog/index.d.ts +3 -0
- package/dist/analog/index.js +4 -0
- package/dist/analog/index.js.map +1 -0
- package/dist/{utils → analog}/message.d.ts +8 -13
- package/dist/{utils → analog}/message.js +13 -32
- package/dist/analog/message.js.map +1 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.js +5 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/{Command.d.ts → obis-observer/Command.d.ts} +2 -27
- package/dist/obis-observer/Command.js +33 -0
- package/dist/obis-observer/Command.js.map +1 -0
- package/dist/obis-observer/CommandBinaryBuffer.d.ts +56 -0
- package/dist/obis-observer/CommandBinaryBuffer.js +138 -0
- package/dist/obis-observer/CommandBinaryBuffer.js.map +1 -0
- package/dist/obis-observer/UnknownCommand.d.ts +12 -0
- package/dist/obis-observer/UnknownCommand.js +17 -0
- package/dist/obis-observer/UnknownCommand.js.map +1 -0
- package/dist/obis-observer/commands/downlink/AddShortNameProfile.d.ts +17 -0
- package/dist/obis-observer/commands/downlink/AddShortNameProfile.js +55 -0
- package/dist/obis-observer/commands/downlink/AddShortNameProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetArchiveProfile.d.ts +13 -0
- package/dist/obis-observer/commands/downlink/GetArchiveProfile.js +39 -0
- package/dist/obis-observer/commands/downlink/GetArchiveProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetContentByObis.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/GetContentByObis.js +48 -0
- package/dist/obis-observer/commands/downlink/GetContentByObis.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetContentByShortName.d.ts +17 -0
- package/dist/obis-observer/commands/downlink/GetContentByShortName.js +44 -0
- package/dist/obis-observer/commands/downlink/GetContentByShortName.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetShortNameInfo.d.ts +17 -0
- package/dist/obis-observer/commands/downlink/GetShortNameInfo.js +44 -0
- package/dist/obis-observer/commands/downlink/GetShortNameInfo.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetShortNameProfile.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/GetShortNameProfile.js +45 -0
- package/dist/obis-observer/commands/downlink/GetShortNameProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetShortNames.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/GetShortNames.js +48 -0
- package/dist/obis-observer/commands/downlink/GetShortNames.js.map +1 -0
- package/dist/obis-observer/commands/downlink/ReadArchive.d.ts +18 -0
- package/dist/obis-observer/commands/downlink/ReadArchive.js +58 -0
- package/dist/obis-observer/commands/downlink/ReadArchive.js.map +1 -0
- package/dist/obis-observer/commands/downlink/Reboot.d.ts +13 -0
- package/dist/obis-observer/commands/downlink/Reboot.js +39 -0
- package/dist/obis-observer/commands/downlink/Reboot.js.map +1 -0
- package/dist/obis-observer/commands/downlink/RemoveShortNameProfile.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/RemoveShortNameProfile.js +42 -0
- package/dist/obis-observer/commands/downlink/RemoveShortNameProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/SetArchiveProfile.d.ts +17 -0
- package/dist/obis-observer/commands/downlink/SetArchiveProfile.js +45 -0
- package/dist/obis-observer/commands/downlink/SetArchiveProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/SetSerialPort.d.ts +19 -0
- package/dist/obis-observer/commands/downlink/SetSerialPort.js +61 -0
- package/dist/obis-observer/commands/downlink/SetSerialPort.js.map +1 -0
- package/dist/obis-observer/commands/downlink/SetShortName.d.ts +17 -0
- package/dist/obis-observer/commands/downlink/SetShortName.js +51 -0
- package/dist/obis-observer/commands/downlink/SetShortName.js.map +1 -0
- package/dist/obis-observer/commands/downlink/index.d.ts +13 -0
- package/dist/obis-observer/commands/downlink/index.js +14 -0
- package/dist/obis-observer/commands/downlink/index.js.map +1 -0
- package/dist/obis-observer/commands/index.d.ts +2 -0
- package/dist/obis-observer/commands/index.js +3 -0
- package/dist/obis-observer/commands/index.js.map +1 -0
- package/dist/obis-observer/commands/uplink/AddShortNameProfileResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/AddShortNameProfileResponse.js +43 -0
- package/dist/obis-observer/commands/uplink/AddShortNameProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetArchiveProfileResponse.d.ts +17 -0
- package/dist/obis-observer/commands/uplink/GetArchiveProfileResponse.js +45 -0
- package/dist/obis-observer/commands/uplink/GetArchiveProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetContentByObisResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/GetContentByObisResponse.js +45 -0
- package/dist/obis-observer/commands/uplink/GetContentByObisResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetContentByShortNameResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/GetContentByShortNameResponse.js +44 -0
- package/dist/obis-observer/commands/uplink/GetContentByShortNameResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetContentByShortNameStringResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/GetContentByShortNameStringResponse.js +45 -0
- package/dist/obis-observer/commands/uplink/GetContentByShortNameStringResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetShortNameInfoResponse.d.ts +17 -0
- package/dist/obis-observer/commands/uplink/GetShortNameInfoResponse.js +74 -0
- package/dist/obis-observer/commands/uplink/GetShortNameInfoResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetShortNameProfileResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/GetShortNameProfileResponse.js +54 -0
- package/dist/obis-observer/commands/uplink/GetShortNameProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetShortNamesResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/GetShortNamesResponse.js +45 -0
- package/dist/obis-observer/commands/uplink/GetShortNamesResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/ObservationReport.d.ts +18 -0
- package/dist/obis-observer/commands/uplink/ObservationReport.js +57 -0
- package/dist/obis-observer/commands/uplink/ObservationReport.js.map +1 -0
- package/dist/obis-observer/commands/uplink/ObservationReportString.d.ts +18 -0
- package/dist/obis-observer/commands/uplink/ObservationReportString.js +62 -0
- package/dist/obis-observer/commands/uplink/ObservationReportString.js.map +1 -0
- package/dist/obis-observer/commands/uplink/ReadArchiveResponse.d.ts +18 -0
- package/dist/obis-observer/commands/uplink/ReadArchiveResponse.js +61 -0
- package/dist/obis-observer/commands/uplink/ReadArchiveResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/RebootResponse.d.ts +13 -0
- package/dist/obis-observer/commands/uplink/RebootResponse.js +36 -0
- package/dist/obis-observer/commands/uplink/RebootResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/RemoveShortNameProfileResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/RemoveShortNameProfileResponse.js +43 -0
- package/dist/obis-observer/commands/uplink/RemoveShortNameProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetArchiveProfileResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/SetArchiveProfileResponse.js +51 -0
- package/dist/obis-observer/commands/uplink/SetArchiveProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetSerialPortResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/SetSerialPortResponse.js +51 -0
- package/dist/obis-observer/commands/uplink/SetSerialPortResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetShortNameResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/SetShortNameResponse.js +43 -0
- package/dist/obis-observer/commands/uplink/SetShortNameResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/index.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/index.js +17 -0
- package/dist/obis-observer/commands/uplink/index.js.map +1 -0
- package/dist/obis-observer/constants/archiveTypes.d.ts +3 -0
- package/dist/obis-observer/constants/archiveTypes.js +4 -0
- package/dist/obis-observer/constants/archiveTypes.js.map +1 -0
- package/dist/obis-observer/constants/contentTypes.d.ts +3 -0
- package/dist/obis-observer/constants/contentTypes.js +4 -0
- package/dist/obis-observer/constants/contentTypes.js.map +1 -0
- package/dist/obis-observer/constants/directions.d.ts +2 -0
- package/dist/obis-observer/constants/directions.js +3 -0
- package/dist/obis-observer/constants/directions.js.map +1 -0
- package/dist/obis-observer/constants/index.d.ts +5 -0
- package/dist/obis-observer/constants/index.js +6 -0
- package/dist/obis-observer/constants/index.js.map +1 -0
- package/dist/obis-observer/constants/parityTypes.d.ts +3 -0
- package/dist/obis-observer/constants/parityTypes.js +4 -0
- package/dist/obis-observer/constants/parityTypes.js.map +1 -0
- package/dist/obis-observer/constants/resultCodes.d.ts +6 -0
- package/dist/obis-observer/constants/resultCodes.js +7 -0
- package/dist/obis-observer/constants/resultCodes.js.map +1 -0
- package/dist/obis-observer/index.d.ts +3 -0
- package/dist/obis-observer/index.js +4 -0
- package/dist/obis-observer/index.js.map +1 -0
- package/dist/obis-observer/message.d.ts +18 -0
- package/dist/obis-observer/message.js +58 -0
- package/dist/obis-observer/message.js.map +1 -0
- package/dist/{BinaryBuffer.d.ts → utils/BinaryBuffer.d.ts} +3 -17
- package/dist/{BinaryBuffer.js → utils/BinaryBuffer.js} +17 -19
- package/dist/utils/BinaryBuffer.js.map +1 -0
- package/dist/utils/bitSet.d.ts +2 -36
- package/dist/utils/bitSet.js +10 -36
- package/dist/utils/bitSet.js.map +1 -1
- package/dist/utils/getBytesFromHex.d.ts +0 -9
- package/dist/utils/getBytesFromHex.js +0 -10
- package/dist/utils/getBytesFromHex.js.map +1 -1
- package/dist/utils/getHexFromBytes.d.ts +1 -25
- package/dist/utils/getHexFromBytes.js +2 -16
- package/dist/utils/getHexFromBytes.js.map +1 -1
- package/dist/utils/getHexFromNumber.d.ts +3 -0
- package/dist/utils/getHexFromNumber.js +20 -0
- package/dist/utils/getHexFromNumber.js.map +1 -0
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/time.d.ts +2 -26
- package/dist/utils/time.js +2 -14
- package/dist/utils/time.js.map +1 -1
- package/package.json +13 -9
- package/readme.md +20 -13
- package/dist/BinaryBuffer.js.map +0 -1
- package/dist/Command.js +0 -89
- package/dist/Command.js.map +0 -1
- package/dist/CommandBinaryBuffer.js.map +0 -1
- package/dist/UnknownCommand.js.map +0 -1
- package/dist/commands/downlink/CorrectTime2000.d.ts +0 -46
- package/dist/commands/downlink/CorrectTime2000.js.map +0 -1
- package/dist/commands/downlink/GetArchiveDaysMC.d.ts +0 -45
- package/dist/commands/downlink/GetArchiveDaysMC.js.map +0 -1
- package/dist/commands/downlink/GetArchiveEvents.d.ts +0 -40
- package/dist/commands/downlink/GetArchiveEvents.js.map +0 -1
- package/dist/commands/downlink/GetArchiveHoursMC.d.ts +0 -40
- package/dist/commands/downlink/GetArchiveHoursMC.js.map +0 -1
- package/dist/commands/downlink/GetCurrentMC.d.ts +0 -26
- package/dist/commands/downlink/GetCurrentMC.js +0 -42
- package/dist/commands/downlink/GetCurrentMC.js.map +0 -1
- package/dist/commands/downlink/GetExAbsArchiveDaysMC.d.ts +0 -41
- package/dist/commands/downlink/GetExAbsArchiveDaysMC.js.map +0 -1
- package/dist/commands/downlink/GetExAbsArchiveHoursMC.d.ts +0 -40
- package/dist/commands/downlink/GetExAbsArchiveHoursMC.js.map +0 -1
- package/dist/commands/downlink/GetExAbsCurrentMC.d.ts +0 -27
- package/dist/commands/downlink/GetExAbsCurrentMC.js.map +0 -1
- package/dist/commands/downlink/GetLmicInfo.d.ts +0 -26
- package/dist/commands/downlink/GetLmicInfo.js +0 -42
- package/dist/commands/downlink/GetLmicInfo.js.map +0 -1
- package/dist/commands/downlink/GetParameter.d.ts +0 -38
- package/dist/commands/downlink/GetParameter.js.map +0 -1
- package/dist/commands/downlink/GetStatus.d.ts +0 -27
- package/dist/commands/downlink/GetStatus.js.map +0 -1
- package/dist/commands/downlink/SetParameter.d.ts +0 -30
- package/dist/commands/downlink/SetParameter.js.map +0 -1
- package/dist/commands/downlink/SetTime2000.d.ts +0 -42
- package/dist/commands/downlink/SetTime2000.js.map +0 -1
- package/dist/commands/downlink/SoftRestart.d.ts +0 -26
- package/dist/commands/downlink/SoftRestart.js +0 -42
- package/dist/commands/downlink/SoftRestart.js.map +0 -1
- package/dist/commands/downlink/index.js.map +0 -1
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/uplink/CorrectTime2000Response.d.ts +0 -39
- package/dist/commands/uplink/CorrectTime2000Response.js.map +0 -1
- package/dist/commands/uplink/CurrentMC.js.map +0 -1
- package/dist/commands/uplink/DayMC.d.ts +0 -47
- package/dist/commands/uplink/DayMC.js.map +0 -1
- package/dist/commands/uplink/ExAbsCurrentMC.d.ts +0 -41
- package/dist/commands/uplink/ExAbsCurrentMC.js.map +0 -1
- package/dist/commands/uplink/ExAbsDayMC.d.ts +0 -45
- package/dist/commands/uplink/ExAbsDayMC.js.map +0 -1
- package/dist/commands/uplink/ExAbsHourMC.d.ts +0 -69
- package/dist/commands/uplink/ExAbsHourMC.js.map +0 -1
- package/dist/commands/uplink/GetArchiveDaysMCResponse.d.ts +0 -58
- package/dist/commands/uplink/GetArchiveDaysMCResponse.js.map +0 -1
- package/dist/commands/uplink/GetArchiveEventsResponse.d.ts +0 -54
- package/dist/commands/uplink/GetArchiveEventsResponse.js.map +0 -1
- package/dist/commands/uplink/GetArchiveHoursMCResponse.d.ts +0 -50
- package/dist/commands/uplink/GetArchiveHoursMCResponse.js.map +0 -1
- package/dist/commands/uplink/GetExAbsArchiveDaysMCResponse.d.ts +0 -47
- package/dist/commands/uplink/GetExAbsArchiveDaysMCResponse.js.map +0 -1
- package/dist/commands/uplink/GetExAbsArchiveHoursMCResponse.d.ts +0 -44
- package/dist/commands/uplink/GetExAbsArchiveHoursMCResponse.js.map +0 -1
- package/dist/commands/uplink/GetLmicInfoResponse.d.ts +0 -52
- package/dist/commands/uplink/GetLmicInfoResponse.js.map +0 -1
- package/dist/commands/uplink/GetParameterResponse.d.ts +0 -35
- package/dist/commands/uplink/GetParameterResponse.js.map +0 -1
- package/dist/commands/uplink/HourMC.d.ts +0 -48
- package/dist/commands/uplink/HourMC.js.map +0 -1
- package/dist/commands/uplink/LastEvent.d.ts +0 -54
- package/dist/commands/uplink/LastEvent.js.map +0 -1
- package/dist/commands/uplink/NewEvent.js.map +0 -1
- package/dist/commands/uplink/SetTime2000Response.d.ts +0 -38
- package/dist/commands/uplink/SetTime2000Response.js.map +0 -1
- package/dist/commands/uplink/SoftRestartResponse.d.ts +0 -28
- package/dist/commands/uplink/SoftRestartResponse.js +0 -44
- package/dist/commands/uplink/SoftRestartResponse.js.map +0 -1
- package/dist/commands/uplink/Status.d.ts +0 -55
- package/dist/commands/uplink/Status.js.map +0 -1
- package/dist/commands/uplink/Time2000.d.ts +0 -43
- package/dist/commands/uplink/Time2000.js.map +0 -1
- package/dist/commands/uplink/index.js.map +0 -1
- package/dist/constants/deviceParameters.d.ts +0 -53
- package/dist/constants/deviceParameters.js +0 -54
- package/dist/constants/deviceParameters.js.map +0 -1
- package/dist/constants/directions.js.map +0 -1
- package/dist/constants/events.d.ts +0 -42
- package/dist/constants/events.js +0 -43
- package/dist/constants/events.js.map +0 -1
- package/dist/constants/hardwareTypes.d.ts +0 -108
- package/dist/constants/hardwareTypes.js +0 -109
- package/dist/constants/hardwareTypes.js.map +0 -1
- package/dist/constants/index.js.map +0 -1
- package/dist/constants/rx2SpreadFactors.js.map +0 -1
- package/dist/utils/header.js.map +0 -1
- package/dist/utils/message.js.map +0 -1
- /package/dist/{constants → analog/constants}/directions.d.ts +0 -0
- /package/dist/{constants → analog/constants}/directions.js +0 -0
- /package/dist/{constants → analog/constants}/index.d.ts +0 -0
- /package/dist/{constants → analog/constants}/index.js +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IHexFormatOptions } from '../config.js';
|
|
2
|
+
export interface ICommandExample {
|
|
3
|
+
name: string;
|
|
4
|
+
parameters?: object;
|
|
5
|
+
config?: {
|
|
6
|
+
hardwareType?: number;
|
|
7
|
+
};
|
|
8
|
+
hex: {
|
|
9
|
+
header: string;
|
|
10
|
+
body: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export type TCommandExampleList = Array<ICommandExample>;
|
|
14
|
+
declare abstract class Command {
|
|
15
|
+
static id: number;
|
|
16
|
+
static directionType: unknown;
|
|
17
|
+
static title: string;
|
|
18
|
+
static examples: TCommandExampleList;
|
|
19
|
+
static hasParameters: boolean;
|
|
20
|
+
parameters: unknown;
|
|
21
|
+
config: unknown;
|
|
22
|
+
static getId(): string;
|
|
23
|
+
static toBytes(id: number, commandData?: Uint8Array): Uint8Array;
|
|
24
|
+
getParameters(): unknown;
|
|
25
|
+
toBytes(): Uint8Array;
|
|
26
|
+
toHex(options?: IHexFormatOptions): string;
|
|
27
|
+
toJson(): string;
|
|
28
|
+
}
|
|
29
|
+
export default Command;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as header from './header.js';
|
|
2
|
+
import getHexFromBytes from '../utils/getHexFromBytes.js';
|
|
3
|
+
import getHexFromNumber from '../utils/getHexFromNumber.js';
|
|
4
|
+
class Command {
|
|
5
|
+
static getId() {
|
|
6
|
+
return getHexFromNumber(this.id);
|
|
7
|
+
}
|
|
8
|
+
static toBytes(id, commandData) {
|
|
9
|
+
const commandLength = commandData?.length ?? 0;
|
|
10
|
+
const headerData = header.toBytes(id, commandLength);
|
|
11
|
+
if (commandData && commandLength) {
|
|
12
|
+
const resultData = new Uint8Array(headerData.length + commandLength);
|
|
13
|
+
resultData.set(headerData);
|
|
14
|
+
resultData.set(commandData, headerData.length);
|
|
15
|
+
return resultData;
|
|
16
|
+
}
|
|
17
|
+
return headerData;
|
|
18
|
+
}
|
|
19
|
+
getParameters() {
|
|
20
|
+
return this.parameters;
|
|
21
|
+
}
|
|
22
|
+
toBytes() {
|
|
23
|
+
throw new Error('not implemented!');
|
|
24
|
+
}
|
|
25
|
+
toHex(options = {}) {
|
|
26
|
+
return getHexFromBytes(this.toBytes(), options);
|
|
27
|
+
}
|
|
28
|
+
toJson() {
|
|
29
|
+
return JSON.stringify(this.getParameters());
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
Command.hasParameters = false;
|
|
33
|
+
export default Command;
|
|
34
|
+
//# sourceMappingURL=Command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Command.js","sourceRoot":"","sources":["../../src/analog/Command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAqB5D,MAAe,OAAO;IAoBlB,MAAM,CAAC,KAAK;QACR,OAAO,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrC,CAAC;IA+CD,MAAM,CAAC,OAAO,CAAG,EAAU,EAAE,WAAwB;QACjD,MAAM,aAAa,GAAG,WAAW,EAAE,MAAM,IAAI,CAAC,CAAC;QAC/C,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;QAErD,IAAK,WAAW,IAAI,aAAa,EAAG;YAChC,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,aAAa,CAAC,CAAC;YAErE,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC3B,UAAU,CAAC,GAAG,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;YAE/C,OAAO,UAAU,CAAC;SACrB;QAGD,OAAO,UAAU,CAAC;IACtB,CAAC;IAGD,aAAa;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAGD,OAAO;QACH,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACxC,CAAC;IAED,KAAK,CAAG,UAA6B,EAAE;QACnC,OAAO,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAOD,MAAM;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IAChD,CAAC;;AAlGM,qBAAa,GAAG,KAAK,CAAC;AAsGjC,eAAe,OAAO,CAAC"}
|
|
@@ -1,299 +1,129 @@
|
|
|
1
|
-
import BinaryBuffer from '
|
|
2
|
-
import { TTime2000 } from '
|
|
1
|
+
import BinaryBuffer from '../utils/BinaryBuffer.js';
|
|
2
|
+
import { TTime2000 } from '../utils/time.js';
|
|
3
3
|
export interface IBatteryVoltage {
|
|
4
|
-
/**
|
|
5
|
-
* battery voltage value at low consumption, in mV
|
|
6
|
-
*
|
|
7
|
-
* `4095` - unknown value and becomes `undefined`
|
|
8
|
-
*/
|
|
9
4
|
low: number | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* battery voltage value at hight consumption, in mV
|
|
12
|
-
*
|
|
13
|
-
* `4095` - unknown value and becomes `undefined`
|
|
14
|
-
*/
|
|
15
5
|
high: number | undefined;
|
|
16
6
|
}
|
|
17
7
|
export interface IChannel {
|
|
18
|
-
/** channel number */
|
|
19
8
|
index: number;
|
|
20
9
|
}
|
|
21
10
|
export interface IChannelValue extends IChannel {
|
|
22
|
-
/** pulse counter or absolute value of device channel */
|
|
23
11
|
value: number;
|
|
24
12
|
}
|
|
25
13
|
export interface IChannelHours extends IChannelValue {
|
|
26
|
-
/** values differences between hours */
|
|
27
14
|
diff: Array<number>;
|
|
28
15
|
}
|
|
29
16
|
export interface IChannelHourAbsoluteValue extends IChannelHours {
|
|
30
|
-
/** channel pulse coefficient */
|
|
31
17
|
pulseCoefficient: number;
|
|
32
18
|
}
|
|
33
19
|
export interface IChannelDays extends IChannel {
|
|
34
20
|
dayList: Array<number>;
|
|
35
21
|
}
|
|
36
22
|
export interface IChannelAbsoluteValue extends IChannelValue {
|
|
37
|
-
/** channel pulse coefficient */
|
|
38
23
|
pulseCoefficient: number;
|
|
39
24
|
}
|
|
40
25
|
export interface IChannelArchiveDaysAbsolute extends IChannel {
|
|
41
|
-
/** values by days */
|
|
42
26
|
dayList: Array<number>;
|
|
43
|
-
/** Channel pulse coefficient */
|
|
44
27
|
pulseCoefficient: number;
|
|
45
28
|
}
|
|
46
29
|
export interface IChannelArchiveDays extends IChannel {
|
|
47
|
-
/** values by days */
|
|
48
30
|
dayList: Array<number>;
|
|
49
31
|
}
|
|
50
32
|
export interface IEventGasStatus {
|
|
51
|
-
/** the battery voltage has dropped below the set threshold */
|
|
52
33
|
isBatteryLow?: boolean;
|
|
53
|
-
/** there is a magnetic field influence */
|
|
54
34
|
isMagneticInfluence?: boolean;
|
|
55
|
-
/** button is release (device is unmounted) */
|
|
56
35
|
isButtonReleased?: boolean;
|
|
57
|
-
/** the device has detected a loss of connection to the server */
|
|
58
36
|
isConnectionLost?: boolean;
|
|
59
37
|
}
|
|
60
38
|
export interface IEvent2ChannelStatus {
|
|
61
|
-
/** the battery voltage has dropped below the set threshold */
|
|
62
39
|
isBatteryLow?: boolean;
|
|
63
|
-
/** the device has detected a loss of connection to the server */
|
|
64
40
|
isConnectionLost?: boolean;
|
|
65
|
-
/** the first channel is not active */
|
|
66
41
|
isFirstChannelInactive?: boolean;
|
|
67
|
-
/** the second channel is not active */
|
|
68
42
|
isSecondChannelInactive?: boolean;
|
|
69
43
|
}
|
|
70
44
|
export interface IEventElimpStatus {
|
|
71
|
-
/** the device has detected a loss of connection to the server */
|
|
72
45
|
isConnectionLost?: boolean;
|
|
73
46
|
}
|
|
74
47
|
export interface IEvent4ChannelStatus {
|
|
75
|
-
/** the battery voltage has dropped below the set threshold */
|
|
76
48
|
isBatteryLow?: boolean;
|
|
77
|
-
/** the device has detected a loss of connection to the server */
|
|
78
49
|
isConnectionLost?: boolean;
|
|
79
|
-
/** the first channel is not active */
|
|
80
50
|
isFirstChannelInactive?: boolean;
|
|
81
|
-
/** the second channel is not active */
|
|
82
51
|
isSecondChannelInactive?: boolean;
|
|
83
|
-
/** the third channel is not active */
|
|
84
52
|
isThirdChannelInactive?: boolean;
|
|
85
|
-
/** the forth channel is not active */
|
|
86
53
|
isForthChannelInactive?: boolean;
|
|
87
54
|
}
|
|
88
55
|
export interface IEventMtxStatus {
|
|
89
|
-
/** meter case is open */
|
|
90
56
|
isMeterCaseOpen?: boolean;
|
|
91
|
-
/** there is a magnetic field influence */
|
|
92
57
|
isMagneticInfluence?: boolean;
|
|
93
|
-
/** parameters set remotely */
|
|
94
58
|
isParametersSetRemotely?: boolean;
|
|
95
|
-
/** parameters set locally */
|
|
96
59
|
isParametersSetLocally?: boolean;
|
|
97
|
-
/** meter program restart */
|
|
98
60
|
isMeterProgramRestarted?: boolean;
|
|
99
|
-
/** incorrect password and lockout */
|
|
100
61
|
isLockedOut?: boolean;
|
|
101
|
-
/** time set */
|
|
102
62
|
isTimeSet?: boolean;
|
|
103
|
-
/** time correction */
|
|
104
63
|
isTimeCorrected?: boolean;
|
|
105
|
-
/** meter failure */
|
|
106
64
|
isMeterFailure?: boolean;
|
|
107
|
-
/** meter terminal box is open */
|
|
108
65
|
isMeterTerminalBoxOpen?: boolean;
|
|
109
|
-
/** meter module compartment is open */
|
|
110
66
|
isModuleCompartmentOpen?: boolean;
|
|
111
|
-
/** tariff plan changed */
|
|
112
67
|
isTariffPlanChanged?: boolean;
|
|
113
|
-
/** new tariff plan received */
|
|
114
68
|
isNewTariffPlanReceived?: boolean;
|
|
115
69
|
}
|
|
116
|
-
/**
|
|
117
|
-
* Device send data periodically using this interval.
|
|
118
|
-
* deviceParameters.REPORTING_DATA_INTERVAL = `1`.
|
|
119
|
-
*/
|
|
120
70
|
interface IParameterReportingDataInterval {
|
|
121
|
-
/**
|
|
122
|
-
* Minimal interval for data sending from device (in seconds).
|
|
123
|
-
* Real value = value + pseudo-random value which is not more than `255` * `4`.
|
|
124
|
-
*/
|
|
125
71
|
value: number;
|
|
126
72
|
}
|
|
127
|
-
/**
|
|
128
|
-
* The parameter defines the hour of the day by which the daily consumption is calculated.
|
|
129
|
-
* deviceParameters.DAY_CHECKOUT_HOUR = `4`.
|
|
130
|
-
*/
|
|
131
73
|
interface IParameterDayCheckoutHour {
|
|
132
74
|
value: number;
|
|
133
75
|
}
|
|
134
|
-
/**
|
|
135
|
-
* Type of data from device.
|
|
136
|
-
* deviceParameters.REPORTING_DATA_TYPE = `5`.
|
|
137
|
-
*/
|
|
138
76
|
interface IParameterReportingDataType {
|
|
139
|
-
/**
|
|
140
|
-
* `0` - hour, by default
|
|
141
|
-
* `1` - day
|
|
142
|
-
* `2` - current
|
|
143
|
-
* `3` - hour + day
|
|
144
|
-
*/
|
|
145
77
|
type: number;
|
|
146
78
|
}
|
|
147
|
-
/**
|
|
148
|
-
* Delivery type of priority data, with or without acknowledgment.
|
|
149
|
-
* Priority data - frames from uplink/NewEvent command.
|
|
150
|
-
* deviceParameters.PRIORITY_DATA_DELIVERY_TYPE = `8`.
|
|
151
|
-
*/
|
|
152
79
|
interface IParameterDeliveryTypeOfPriorityData {
|
|
153
|
-
/**
|
|
154
|
-
* `0` - delivery with confirmation
|
|
155
|
-
* `1` - delivery without confirmation
|
|
156
|
-
*/
|
|
157
80
|
value: number;
|
|
158
81
|
}
|
|
159
|
-
/**
|
|
160
|
-
* Device activation method in LoRaWAN network.
|
|
161
|
-
* deviceParameters.ACTIVATION_METHOD = `9`.
|
|
162
|
-
*/
|
|
163
82
|
interface IParameterActivationMethod {
|
|
164
|
-
/**
|
|
165
|
-
* `0` - OTAA, by default
|
|
166
|
-
* `1` - ABP
|
|
167
|
-
*
|
|
168
|
-
* @see https://www.thethingsindustries.com/docs/devices/abp-vs-otaa/
|
|
169
|
-
*/
|
|
170
83
|
type: number;
|
|
171
84
|
}
|
|
172
|
-
/**
|
|
173
|
-
* Channels config, only for universal 4-channels devices
|
|
174
|
-
* deviceParameters.CHANNELS_CONFIG = `13`.
|
|
175
|
-
*/
|
|
176
85
|
interface IParameterChannelsConfig {
|
|
177
|
-
/**
|
|
178
|
-
* value from 0 to 18, [values description](https://github.com/jooby-dev/jooby-docs/blob/main/docs/parameter-types.md#channels-config)
|
|
179
|
-
*/
|
|
180
86
|
value: number;
|
|
181
87
|
}
|
|
182
|
-
/**
|
|
183
|
-
* RX2 configuration.
|
|
184
|
-
* deviceParameters.RX2_CONFIG = `18`.
|
|
185
|
-
*
|
|
186
|
-
* @see https://www.thethingsindustries.com/docs/reference/glossary/
|
|
187
|
-
*/
|
|
188
88
|
interface IParameterRx2Config {
|
|
189
|
-
/**
|
|
190
|
-
* The transmission speed or Data Rate of a LoRaWAN message, ranging from `SF7` (highest Data Rate) to `SF12` (lowest Data Rate).
|
|
191
|
-
* Making the spreading factor `1` step lower (from `SF10` to `SF9`) allows you to roughly send the same amount of data use half the time on air.
|
|
192
|
-
* Lowering the spreading factor makes it more difficult for the gateway to receive a transmission, as it will be more sensitive to noise.
|
|
193
|
-
*
|
|
194
|
-
* @see https://www.thethingsnetwork.org/docs/lorawan/spreading-factors/
|
|
195
|
-
*/
|
|
196
89
|
spreadFactor: number;
|
|
197
|
-
/**
|
|
198
|
-
* RX2 data rate frequency.
|
|
199
|
-
* The second receive window (RX2) uses a fixed frequency and data rate.
|
|
200
|
-
* This value configures the frequency to use in RX2.
|
|
201
|
-
* Changing the desired value makes the Network Server transmit the RXParamSetupReq MAC command.
|
|
202
|
-
*/
|
|
203
90
|
frequency: number;
|
|
204
91
|
}
|
|
205
|
-
/**
|
|
206
|
-
* Device battery depassivation information.
|
|
207
|
-
* deviceParameters.BATTERY_DEPASSIVATION_INFO = `10`.
|
|
208
|
-
*/
|
|
209
92
|
interface IParameterBatteryDepassivationInfo {
|
|
210
|
-
/** battery load time in milliseconds */
|
|
211
93
|
loadTime: number;
|
|
212
|
-
/** battery internal resistance, in mΩ */
|
|
213
94
|
internalResistance: number;
|
|
214
|
-
/** battery low voltage, in mV */
|
|
215
95
|
lowVoltage: number;
|
|
216
96
|
}
|
|
217
|
-
/**
|
|
218
|
-
* Device battery minimum required battery load time per day to prevent passivation.
|
|
219
|
-
* deviceParameters.BATTERY_MINIMAL_LOAD_TIME = `11`.
|
|
220
|
-
*/
|
|
221
97
|
interface IParameterBatteryMinimalLoadTime {
|
|
222
98
|
value: number;
|
|
223
99
|
}
|
|
224
|
-
/**
|
|
225
|
-
* Absolute data for pulse devices.
|
|
226
|
-
* deviceParameters.ABSOLUTE_DATA = `23`.
|
|
227
|
-
*/
|
|
228
100
|
interface IParameterAbsoluteData {
|
|
229
|
-
/** 4 byte int BE */
|
|
230
101
|
value: number;
|
|
231
|
-
/** 4 byte int BE */
|
|
232
102
|
meterValue: number;
|
|
233
103
|
pulseCoefficient: number;
|
|
234
104
|
}
|
|
235
|
-
/**
|
|
236
|
-
* Data type sending from device - absolute or not.
|
|
237
|
-
* deviceParameters.ABSOLUTE_DATA_ENABLE = `24`
|
|
238
|
-
*/
|
|
239
105
|
interface IParameterAbsoluteDataEnable {
|
|
240
|
-
/**
|
|
241
|
-
* `1` - absolute data enabled
|
|
242
|
-
* `0` - absolute data disabled, device send pulse counter
|
|
243
|
-
*/
|
|
244
106
|
state: number;
|
|
245
107
|
}
|
|
246
|
-
/**
|
|
247
|
-
* Device serial number.
|
|
248
|
-
* deviceParameters.SERIAL_NUMBER = `25`
|
|
249
|
-
*/
|
|
250
108
|
interface IParameterSerialNumber {
|
|
251
|
-
/**
|
|
252
|
-
* hex string, 6 bytes
|
|
253
|
-
*/
|
|
254
109
|
value: string;
|
|
255
110
|
}
|
|
256
|
-
/**
|
|
257
|
-
* Device geolocation.
|
|
258
|
-
* deviceParameters.GEOLOCATION = `26`
|
|
259
|
-
*/
|
|
260
111
|
interface IParameterGeolocation {
|
|
261
112
|
latitude: number;
|
|
262
113
|
longitude: number;
|
|
263
114
|
altitude: number;
|
|
264
115
|
}
|
|
265
|
-
/**
|
|
266
|
-
* Absolute data for multi-channel devices.
|
|
267
|
-
* deviceParameters.ABSOLUTE_DATA_MULTI_CHANNEL = `29`.
|
|
268
|
-
*/
|
|
269
116
|
interface IParameterAbsoluteDataMC extends IParameterAbsoluteData {
|
|
270
|
-
/** set data for specific channel */
|
|
271
117
|
channel: number;
|
|
272
118
|
}
|
|
273
|
-
/**
|
|
274
|
-
* Data type sending from device - absolute or not, multi-channel devices.
|
|
275
|
-
* deviceParameters.ABSOLUTE_DATA_STATUS_MULTI_CHANNEL = `30`
|
|
276
|
-
*/
|
|
277
119
|
interface IParameterAbsoluteDataEnableMC extends IParameterAbsoluteDataEnable {
|
|
278
|
-
/** channel that accept status changing */
|
|
279
120
|
channel: number;
|
|
280
121
|
}
|
|
281
|
-
/**
|
|
282
|
-
* Channels scan config for pulse devices.
|
|
283
|
-
* deviceParameters.PULSE_CHANNELS_SCAN_CONFIG = `31`
|
|
284
|
-
*/
|
|
285
122
|
interface IParameterPulseChannelsScanConfig {
|
|
286
|
-
/** channels to set configuration */
|
|
287
123
|
channelList: Array<number>;
|
|
288
|
-
/** channel pull up time in microseconds */
|
|
289
124
|
pullUpTime: number;
|
|
290
|
-
/** channel scan time in microseconds */
|
|
291
125
|
scanTime: number;
|
|
292
126
|
}
|
|
293
|
-
/**
|
|
294
|
-
* Set channels for pulse devices.
|
|
295
|
-
* deviceParameters.PULSE_CHANNELS_SET_CONFIG = `32`
|
|
296
|
-
*/
|
|
297
127
|
interface IParameterPulseChannelsSetConfig {
|
|
298
128
|
channel1: boolean;
|
|
299
129
|
channel2: boolean;
|
|
@@ -306,22 +136,7 @@ export interface IParameter {
|
|
|
306
136
|
}
|
|
307
137
|
export type TEventStatus = IEventGasStatus | IEvent2ChannelStatus | IEventElimpStatus | IEvent4ChannelStatus | IEventMtxStatus;
|
|
308
138
|
type TParameterData = IParameterReportingDataInterval | IParameterReportingDataType | IParameterDayCheckoutHour | IParameterDeliveryTypeOfPriorityData | IParameterActivationMethod | IParameterBatteryDepassivationInfo | IParameterBatteryMinimalLoadTime | IParameterChannelsConfig | IParameterRx2Config | IParameterAbsoluteData | IParameterAbsoluteDataEnable | IParameterSerialNumber | IParameterGeolocation | IParameterAbsoluteDataMC | IParameterAbsoluteDataEnableMC | IParameterPulseChannelsScanConfig | IParameterPulseChannelsSetConfig;
|
|
309
|
-
/**
|
|
310
|
-
* Command specific byte array manipulation.
|
|
311
|
-
*/
|
|
312
139
|
declare class CommandBinaryBuffer extends BinaryBuffer {
|
|
313
|
-
/**
|
|
314
|
-
* Get the number of bytes necessary to store an extended value.
|
|
315
|
-
*
|
|
316
|
-
* @param bits - the number of bits of original value
|
|
317
|
-
*
|
|
318
|
-
* @example
|
|
319
|
-
* ```js
|
|
320
|
-
* const bits = (16384).toString(2).length;
|
|
321
|
-
* const bytes = CommandBinaryBuffer.getExtendedValueSize(bits);
|
|
322
|
-
* // 16384 normally is stored in 2 bytes but for extended value 3 bytes are required
|
|
323
|
-
* ```
|
|
324
|
-
*/
|
|
325
140
|
static getExtendedValueSize(bits: number): number;
|
|
326
141
|
static getParameterSize(parameter: IParameter): number;
|
|
327
142
|
setInt12(value: number, isLittleEndian?: boolean): void;
|
|
@@ -330,34 +145,10 @@ declare class CommandBinaryBuffer extends BinaryBuffer {
|
|
|
330
145
|
getUint12(isLittleEndian?: boolean): number;
|
|
331
146
|
getExtendedValue(): number;
|
|
332
147
|
setExtendedValue(value: number): void;
|
|
333
|
-
/**
|
|
334
|
-
* Get array of channel indexes.
|
|
335
|
-
*/
|
|
336
148
|
getChannels(): Array<number>;
|
|
337
|
-
/**
|
|
338
|
-
* Set array of channel indexes.
|
|
339
|
-
*/
|
|
340
149
|
setChannels(channelList: Array<IChannel>): void;
|
|
341
|
-
/**
|
|
342
|
-
* Retrieve device time from byte array.
|
|
343
|
-
*
|
|
344
|
-
* @example
|
|
345
|
-
* ['00101111', '10010111'] -> [47, 151] will be '2023-12-23'
|
|
346
|
-
*
|
|
347
|
-
* @returns Date object instance
|
|
348
|
-
*/
|
|
349
150
|
getDate(): Date;
|
|
350
|
-
/**
|
|
351
|
-
* Convert date or seconds to bytes.
|
|
352
|
-
* '2023-12-23' will be 0010111-1100-10111, so bytes: ['00101111', '10010111'] -> [47, 151]
|
|
353
|
-
*/
|
|
354
151
|
setDate(dateOrTime: Date | TTime2000): void;
|
|
355
|
-
/**
|
|
356
|
-
* Retrieve device time from byte array.
|
|
357
|
-
*
|
|
358
|
-
* @example
|
|
359
|
-
* 0xb8 = 0b10111000 will be {hours: 0b101, hour: 0b11000} i.e. {hours: 5, hour: 24}
|
|
360
|
-
*/
|
|
361
152
|
getHours(): {
|
|
362
153
|
hours: number;
|
|
363
154
|
hour: number;
|
|
@@ -369,10 +160,10 @@ declare class CommandBinaryBuffer extends BinaryBuffer {
|
|
|
369
160
|
setBatteryVoltage(batteryVoltage: IBatteryVoltage): void;
|
|
370
161
|
getChannelsValuesWithHourDiff(): {
|
|
371
162
|
hours: number;
|
|
372
|
-
|
|
163
|
+
startTime2000: TTime2000;
|
|
373
164
|
channelList: Array<IChannelHours>;
|
|
374
165
|
};
|
|
375
|
-
setChannelsValuesWithHourDiff(hours: number,
|
|
166
|
+
setChannelsValuesWithHourDiff(hours: number, startTime2000: TTime2000, channelList: Array<IChannelHours>): void;
|
|
376
167
|
getChannelsWithAbsoluteValues(): Array<IChannelAbsoluteValue>;
|
|
377
168
|
setChannelsWithAbsoluteValues(channelList: Array<IChannelAbsoluteValue>): void;
|
|
378
169
|
static getEventStatusSize(hardwareType: number): number;
|