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.
- 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} +2 -211
- package/dist/{CommandBinaryBuffer.js → analog/CommandBinaryBuffer.js} +6 -80
- 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 +3 -27
- 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 +0 -19
- 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 +3 -22
- 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 +3 -24
- 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 +3 -23
- 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 +1 -33
- 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 +1 -31
- 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 +1 -36
- 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 +1 -33
- 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 +0 -26
- 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 +0 -33
- 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 +1 -33
- package/dist/analog/commands/uplink/GetExAbsArchiveDaysMCResponse.js.map +1 -0
- package/dist/{commands → analog/commands}/uplink/GetExAbsArchiveHoursMCResponse.d.ts +1 -26
- package/dist/{commands → analog/commands}/uplink/GetExAbsArchiveHoursMCResponse.js +1 -31
- 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 +1 -35
- 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 +1 -42
- package/dist/{commands → analog/commands}/uplink/NewEvent.js +2 -32
- 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 +2 -22
- 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 +17 -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 +17 -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 +17 -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 +17 -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 +0 -24
- package/dist/utils/time.js +0 -12
- package/dist/utils/time.js.map +1 -1
- package/package.json +13 -9
- package/readme.md +19 -12
- 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.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,39 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x0d;
|
|
5
|
+
const COMMAND_SIZE = REQUEST_ID_SIZE;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'simple request',
|
|
9
|
+
parameters: {
|
|
10
|
+
requestId: 3
|
|
11
|
+
},
|
|
12
|
+
hex: { header: '0d', body: '03' }
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
class GetArchiveProfile extends Command {
|
|
16
|
+
constructor(parameters) {
|
|
17
|
+
super();
|
|
18
|
+
this.parameters = parameters;
|
|
19
|
+
this.size = COMMAND_SIZE;
|
|
20
|
+
}
|
|
21
|
+
static fromBytes(data) {
|
|
22
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
23
|
+
return new GetArchiveProfile({ requestId: buffer.getUint8() });
|
|
24
|
+
}
|
|
25
|
+
toBytes() {
|
|
26
|
+
if (typeof this.size !== 'number') {
|
|
27
|
+
throw new Error('unknown or invalid size');
|
|
28
|
+
}
|
|
29
|
+
const buffer = new CommandBinaryBuffer(this.size);
|
|
30
|
+
buffer.setUint8(this.parameters.requestId);
|
|
31
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
GetArchiveProfile.id = COMMAND_ID;
|
|
35
|
+
GetArchiveProfile.directionType = DOWNLINK;
|
|
36
|
+
GetArchiveProfile.examples = examples;
|
|
37
|
+
GetArchiveProfile.hasParameters = true;
|
|
38
|
+
export default GetArchiveProfile;
|
|
39
|
+
//# sourceMappingURL=GetArchiveProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetArchiveProfile.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/GetArchiveProfile.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAGvD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,eAAe,CAAC;AAErC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;SACf;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC;KAClC;CACJ,CAAC;AAsBF,MAAM,iBAAkB,SAAQ,OAAO;IACnC,YAAqB,UAA8B;QAC/C,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAoB;QAG/C,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,iBAAiB,CAAC,EAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAC,CAAC,CAAC;IACjE,CAAC;IAGD,OAAO;QACH,IAAK,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAG;YACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC9C;QAED,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAElD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAE3C,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AA3Be,oBAAE,GAAG,UAAU,CAAC;AAEhB,+BAAa,GAAG,QAAQ,CAAC;AAEzB,0BAAQ,GAAG,QAAQ,CAAC;AAEpB,+BAAa,GAAG,IAAI,CAAC;AAyBzC,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters, IObis } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetContentByObisParameters extends ICommandParameters {
|
|
4
|
+
obis: IObis;
|
|
5
|
+
}
|
|
6
|
+
declare class GetContentByObis extends Command {
|
|
7
|
+
parameters: IGetContentByObisParameters;
|
|
8
|
+
constructor(parameters: IGetContentByObisParameters);
|
|
9
|
+
static readonly id = 21;
|
|
10
|
+
static readonly directionType = 1;
|
|
11
|
+
static readonly examples: TCommandExampleList;
|
|
12
|
+
static readonly hasParameters = true;
|
|
13
|
+
static fromBytes(data: Uint8Array): GetContentByObis;
|
|
14
|
+
toBytes(): Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
export default GetContentByObis;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x15;
|
|
5
|
+
const examples = [
|
|
6
|
+
{
|
|
7
|
+
name: 'get content for OBIS code 0.9.1 - local time',
|
|
8
|
+
parameters: {
|
|
9
|
+
requestId: 3,
|
|
10
|
+
obis: {
|
|
11
|
+
c: 0,
|
|
12
|
+
d: 9,
|
|
13
|
+
e: 1
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
hex: { header: '15', body: '03 02 00 09 01' }
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
class GetContentByObis extends Command {
|
|
20
|
+
constructor(parameters) {
|
|
21
|
+
super();
|
|
22
|
+
this.parameters = parameters;
|
|
23
|
+
this.size = REQUEST_ID_SIZE + CommandBinaryBuffer.getObisSize(parameters.obis);
|
|
24
|
+
}
|
|
25
|
+
static fromBytes(data) {
|
|
26
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
27
|
+
return new GetContentByObis({
|
|
28
|
+
requestId: buffer.getUint8(),
|
|
29
|
+
obis: buffer.getObis()
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
toBytes() {
|
|
33
|
+
if (typeof this.size !== 'number') {
|
|
34
|
+
throw new Error('unknown or invalid size');
|
|
35
|
+
}
|
|
36
|
+
const { requestId, obis } = this.parameters;
|
|
37
|
+
const buffer = new CommandBinaryBuffer(this.size);
|
|
38
|
+
buffer.setUint8(requestId);
|
|
39
|
+
buffer.setObis(obis);
|
|
40
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
GetContentByObis.id = COMMAND_ID;
|
|
44
|
+
GetContentByObis.directionType = DOWNLINK;
|
|
45
|
+
GetContentByObis.examples = examples;
|
|
46
|
+
GetContentByObis.hasParameters = true;
|
|
47
|
+
export default GetContentByObis;
|
|
48
|
+
//# sourceMappingURL=GetContentByObis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetContentByObis.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/GetContentByObis.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAA4B,MAAM,8BAA8B,CAAC;AAC7G,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAWvD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,8CAA8C;QACpD,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,IAAI,EAAE;gBACF,CAAC,EAAE,CAAC;gBACJ,CAAC,EAAE,CAAC;gBACJ,CAAC,EAAE,CAAC;aACP;SACJ;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAC;KAC9C;CACJ,CAAC;AA2BF,MAAM,gBAAiB,SAAQ,OAAO;IAClC,YAAqB,UAAuC;QACxD,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAA6B;QAGxD,IAAI,CAAC,IAAI,GAAG,eAAe,GAAG,mBAAmB,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACnF,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,gBAAgB,CAAC;YACxB,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC5B,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE;SACzB,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,IAAK,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAG;YACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC9C;QAED,MAAM,EAAC,SAAS,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAC1C,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAElD,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAErB,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAhCe,mBAAE,GAAG,UAAU,CAAC;AAEhB,8BAAa,GAAG,QAAQ,CAAC;AAEzB,yBAAQ,GAAG,QAAQ,CAAC;AAEpB,8BAAa,GAAG,IAAI,CAAC;AA8BzC,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetContentByShortNameParameters extends ICommandParameters {
|
|
4
|
+
requestId: number;
|
|
5
|
+
shortName: number;
|
|
6
|
+
}
|
|
7
|
+
declare class GetContentByShortName extends Command {
|
|
8
|
+
parameters: IGetContentByShortNameParameters;
|
|
9
|
+
constructor(parameters: IGetContentByShortNameParameters);
|
|
10
|
+
static readonly id = 23;
|
|
11
|
+
static readonly directionType = 1;
|
|
12
|
+
static readonly examples: TCommandExampleList;
|
|
13
|
+
static readonly hasParameters = true;
|
|
14
|
+
static fromBytes(data: Uint8Array): GetContentByShortName;
|
|
15
|
+
toBytes(): Uint8Array;
|
|
16
|
+
}
|
|
17
|
+
export default GetContentByShortName;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x17;
|
|
5
|
+
const examples = [
|
|
6
|
+
{
|
|
7
|
+
name: 'get content for short name 50',
|
|
8
|
+
parameters: {
|
|
9
|
+
requestId: 121,
|
|
10
|
+
shortName: 50
|
|
11
|
+
},
|
|
12
|
+
hex: { header: '17', body: '79 32' }
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
class GetContentByShortName extends Command {
|
|
16
|
+
constructor(parameters) {
|
|
17
|
+
super();
|
|
18
|
+
this.parameters = parameters;
|
|
19
|
+
this.size = REQUEST_ID_SIZE + 1;
|
|
20
|
+
}
|
|
21
|
+
static fromBytes(data) {
|
|
22
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
23
|
+
return new GetContentByShortName({
|
|
24
|
+
requestId: buffer.getUint8(),
|
|
25
|
+
shortName: buffer.getUint8()
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
toBytes() {
|
|
29
|
+
if (typeof this.size !== 'number') {
|
|
30
|
+
throw new Error('unknown or invalid size');
|
|
31
|
+
}
|
|
32
|
+
const buffer = new CommandBinaryBuffer(this.size);
|
|
33
|
+
const { requestId, shortName } = this.parameters;
|
|
34
|
+
buffer.setUint8(requestId);
|
|
35
|
+
buffer.setUint8(shortName);
|
|
36
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
GetContentByShortName.id = COMMAND_ID;
|
|
40
|
+
GetContentByShortName.directionType = DOWNLINK;
|
|
41
|
+
GetContentByShortName.examples = examples;
|
|
42
|
+
GetContentByShortName.hasParameters = true;
|
|
43
|
+
export default GetContentByShortName;
|
|
44
|
+
//# sourceMappingURL=GetContentByShortName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetContentByShortName.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/GetContentByShortName.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAqB,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAYvD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,+BAA+B;QACrC,UAAU,EAAE;YACR,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,EAAE;SAChB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC;KACrC;CACJ,CAAC;AAuBF,MAAM,qBAAsB,SAAQ,OAAO;IACvC,YAAqB,UAA4C;QAC7D,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAkC;QAI7D,IAAI,CAAC,IAAI,GAAG,eAAe,GAAG,CAAC,CAAC;IACpC,CAAC;IAWD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,qBAAqB,CAAC;YAC7B,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC5B,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;SAC/B,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,IAAK,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAG;YACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC9C;QAED,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,MAAM,EAAC,SAAS,EAAE,SAAS,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAE/C,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAE3B,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AA/Be,wBAAE,GAAG,UAAU,CAAC;AAEhB,mCAAa,GAAG,QAAQ,CAAC;AAEzB,8BAAQ,GAAG,QAAQ,CAAC;AAEpB,mCAAa,GAAG,IAAI,CAAC;AA6BzC,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetShortNameInfoParameters extends ICommandParameters {
|
|
4
|
+
requestId: number;
|
|
5
|
+
shortName: number;
|
|
6
|
+
}
|
|
7
|
+
declare class GetShortNameInfo extends Command {
|
|
8
|
+
parameters: IGetShortNameInfoParameters;
|
|
9
|
+
constructor(parameters: IGetShortNameInfoParameters);
|
|
10
|
+
static readonly id = 11;
|
|
11
|
+
static readonly directionType = 1;
|
|
12
|
+
static readonly examples: TCommandExampleList;
|
|
13
|
+
static readonly hasParameters = true;
|
|
14
|
+
static fromBytes(data: Uint8Array): GetShortNameInfo;
|
|
15
|
+
toBytes(): Uint8Array;
|
|
16
|
+
}
|
|
17
|
+
export default GetShortNameInfo;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x0b;
|
|
5
|
+
const examples = [
|
|
6
|
+
{
|
|
7
|
+
name: 'get info for short name 44',
|
|
8
|
+
parameters: {
|
|
9
|
+
requestId: 3,
|
|
10
|
+
shortName: 44
|
|
11
|
+
},
|
|
12
|
+
hex: { header: '0b', body: '03 2c' }
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
class GetShortNameInfo extends Command {
|
|
16
|
+
constructor(parameters) {
|
|
17
|
+
super();
|
|
18
|
+
this.parameters = parameters;
|
|
19
|
+
this.size = REQUEST_ID_SIZE + 1;
|
|
20
|
+
}
|
|
21
|
+
static fromBytes(data) {
|
|
22
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
23
|
+
return new GetShortNameInfo({
|
|
24
|
+
requestId: buffer.getUint8(),
|
|
25
|
+
shortName: buffer.getUint8()
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
toBytes() {
|
|
29
|
+
if (typeof this.size !== 'number') {
|
|
30
|
+
throw new Error('unknown or invalid size');
|
|
31
|
+
}
|
|
32
|
+
const buffer = new CommandBinaryBuffer(this.size);
|
|
33
|
+
const { requestId, shortName } = this.parameters;
|
|
34
|
+
buffer.setUint8(requestId);
|
|
35
|
+
buffer.setUint8(shortName);
|
|
36
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
GetShortNameInfo.id = COMMAND_ID;
|
|
40
|
+
GetShortNameInfo.directionType = DOWNLINK;
|
|
41
|
+
GetShortNameInfo.examples = examples;
|
|
42
|
+
GetShortNameInfo.hasParameters = true;
|
|
43
|
+
export default GetShortNameInfo;
|
|
44
|
+
//# sourceMappingURL=GetShortNameInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetShortNameInfo.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/GetShortNameInfo.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAqB,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAYvD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,4BAA4B;QAClC,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,EAAE;SAChB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC;KACrC;CACJ,CAAC;AAuBF,MAAM,gBAAiB,SAAQ,OAAO;IAClC,YAAqB,UAAuC;QACxD,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAA6B;QAIxD,IAAI,CAAC,IAAI,GAAG,eAAe,GAAG,CAAC,CAAC;IACpC,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,gBAAgB,CAAC;YACxB,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC5B,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;SAC/B,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,IAAK,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAG;YACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC9C;QAED,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,MAAM,EAAC,SAAS,EAAE,SAAS,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAE/C,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAE3B,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAhCe,mBAAE,GAAG,UAAU,CAAC;AAEhB,8BAAa,GAAG,QAAQ,CAAC;AAEzB,yBAAQ,GAAG,QAAQ,CAAC;AAEpB,8BAAa,GAAG,IAAI,CAAC;AA8BzC,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetShortNameProfileParameters extends ICommandParameters {
|
|
4
|
+
shortName: number;
|
|
5
|
+
}
|
|
6
|
+
declare class GetShortNameProfile extends Command {
|
|
7
|
+
parameters: IGetShortNameProfileParameters;
|
|
8
|
+
constructor(parameters: IGetShortNameProfileParameters);
|
|
9
|
+
static readonly id = 9;
|
|
10
|
+
static readonly directionType = 1;
|
|
11
|
+
static readonly examples: TCommandExampleList;
|
|
12
|
+
static readonly hasParameters = true;
|
|
13
|
+
static fromBytes(data: Uint8Array): GetShortNameProfile;
|
|
14
|
+
toBytes(): Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
export default GetShortNameProfile;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x09;
|
|
5
|
+
const COMMAND_SIZE = REQUEST_ID_SIZE + 1;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'get profile for short name 128',
|
|
9
|
+
parameters: {
|
|
10
|
+
requestId: 4,
|
|
11
|
+
shortName: 128
|
|
12
|
+
},
|
|
13
|
+
hex: { header: '09', body: '04 80' }
|
|
14
|
+
}
|
|
15
|
+
];
|
|
16
|
+
class GetShortNameProfile extends Command {
|
|
17
|
+
constructor(parameters) {
|
|
18
|
+
super();
|
|
19
|
+
this.parameters = parameters;
|
|
20
|
+
this.size = COMMAND_SIZE;
|
|
21
|
+
}
|
|
22
|
+
static fromBytes(data) {
|
|
23
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
24
|
+
return new GetShortNameProfile({
|
|
25
|
+
requestId: buffer.getUint8(),
|
|
26
|
+
shortName: buffer.getUint8()
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
toBytes() {
|
|
30
|
+
if (typeof this.size !== 'number') {
|
|
31
|
+
throw new Error('unknown or invalid size');
|
|
32
|
+
}
|
|
33
|
+
const buffer = new CommandBinaryBuffer(this.size);
|
|
34
|
+
const { requestId, shortName } = this.parameters;
|
|
35
|
+
buffer.setUint8(requestId);
|
|
36
|
+
buffer.setUint8(shortName);
|
|
37
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
GetShortNameProfile.id = COMMAND_ID;
|
|
41
|
+
GetShortNameProfile.directionType = DOWNLINK;
|
|
42
|
+
GetShortNameProfile.examples = examples;
|
|
43
|
+
GetShortNameProfile.hasParameters = true;
|
|
44
|
+
export default GetShortNameProfile;
|
|
45
|
+
//# sourceMappingURL=GetShortNameProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetShortNameProfile.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/GetShortNameProfile.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAWvD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,eAAe,GAAG,CAAC,CAAC;AAEzC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,gCAAgC;QACtC,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,GAAG;SACjB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC;KACrC;CACJ,CAAC;AAwBF,MAAM,mBAAoB,SAAQ,OAAO;IACrC,YAAqB,UAA0C;QAC3D,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAgC;QAG3D,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,mBAAmB,CAAC;YAC3B,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC5B,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;SAC/B,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,IAAK,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAG;YACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC9C;QAED,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,MAAM,EAAC,SAAS,EAAE,SAAS,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAE/C,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAE3B,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAhCe,sBAAE,GAAG,UAAU,CAAC;AAEhB,iCAAa,GAAG,QAAQ,CAAC;AAEzB,4BAAQ,GAAG,QAAQ,CAAC;AAEpB,iCAAa,GAAG,IAAI,CAAC;AA8BzC,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters, IObis } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetShortNamesParameters extends ICommandParameters {
|
|
4
|
+
obis: IObis;
|
|
5
|
+
}
|
|
6
|
+
declare class GetShortNames extends Command {
|
|
7
|
+
parameters: IGetShortNamesParameters;
|
|
8
|
+
constructor(parameters: IGetShortNamesParameters);
|
|
9
|
+
static readonly id = 1;
|
|
10
|
+
static readonly directionType = 1;
|
|
11
|
+
static readonly examples: TCommandExampleList;
|
|
12
|
+
static readonly hasParameters = true;
|
|
13
|
+
static fromBytes(data: Uint8Array): GetShortNames;
|
|
14
|
+
toBytes(): Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
export default GetShortNames;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x01;
|
|
5
|
+
const examples = [
|
|
6
|
+
{
|
|
7
|
+
name: 'get short name for OBIS code 0.9.1 - local time',
|
|
8
|
+
parameters: {
|
|
9
|
+
requestId: 3,
|
|
10
|
+
obis: {
|
|
11
|
+
c: 0,
|
|
12
|
+
d: 9,
|
|
13
|
+
e: 1
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
hex: { header: '01', body: '03 02 00 09 01' }
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
class GetShortNames extends Command {
|
|
20
|
+
constructor(parameters) {
|
|
21
|
+
super();
|
|
22
|
+
this.parameters = parameters;
|
|
23
|
+
this.size = REQUEST_ID_SIZE + CommandBinaryBuffer.getObisSize(parameters.obis);
|
|
24
|
+
}
|
|
25
|
+
static fromBytes(data) {
|
|
26
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
27
|
+
return new GetShortNames({
|
|
28
|
+
requestId: buffer.getUint8(),
|
|
29
|
+
obis: buffer.getObis()
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
toBytes() {
|
|
33
|
+
if (typeof this.size !== 'number') {
|
|
34
|
+
throw new Error('unknown or invalid size');
|
|
35
|
+
}
|
|
36
|
+
const { requestId, obis } = this.parameters;
|
|
37
|
+
const buffer = new CommandBinaryBuffer(this.size);
|
|
38
|
+
buffer.setUint8(requestId);
|
|
39
|
+
buffer.setObis(obis);
|
|
40
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
GetShortNames.id = COMMAND_ID;
|
|
44
|
+
GetShortNames.directionType = DOWNLINK;
|
|
45
|
+
GetShortNames.examples = examples;
|
|
46
|
+
GetShortNames.hasParameters = true;
|
|
47
|
+
export default GetShortNames;
|
|
48
|
+
//# sourceMappingURL=GetShortNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetShortNames.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/GetShortNames.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAA4B,MAAM,8BAA8B,CAAC;AAC7G,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAWvD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,iDAAiD;QACvD,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,IAAI,EAAE;gBACF,CAAC,EAAE,CAAC;gBACJ,CAAC,EAAE,CAAC;gBACJ,CAAC,EAAE,CAAC;aACP;SACJ;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAC;KAC9C;CACJ,CAAC;AA2BF,MAAM,aAAc,SAAQ,OAAO;IAC/B,YAAqB,UAAoC;QACrD,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAA0B;QAGrD,IAAI,CAAC,IAAI,GAAG,eAAe,GAAG,mBAAmB,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACnF,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,aAAa,CAAC;YACrB,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC5B,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE;SACzB,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,IAAK,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAG;YACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC9C;QAED,MAAM,EAAC,SAAS,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAC1C,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAElD,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAErB,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAhCe,gBAAE,GAAG,UAAU,CAAC;AAEhB,2BAAa,GAAG,QAAQ,CAAC;AAEzB,sBAAQ,GAAG,QAAQ,CAAC;AAEpB,2BAAa,GAAG,IAAI,CAAC;AA8BzC,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IReadArchiveParameters extends ICommandParameters {
|
|
4
|
+
archiveType: number;
|
|
5
|
+
time: number;
|
|
6
|
+
}
|
|
7
|
+
declare class ReadArchive extends Command {
|
|
8
|
+
parameters: IReadArchiveParameters;
|
|
9
|
+
constructor(parameters: IReadArchiveParameters);
|
|
10
|
+
static readonly id = 17;
|
|
11
|
+
static readonly directionType = 1;
|
|
12
|
+
static readonly examples: TCommandExampleList;
|
|
13
|
+
static readonly hasParameters = true;
|
|
14
|
+
static fromBytes(data: Uint8Array): ReadArchive;
|
|
15
|
+
toBytes(): Uint8Array;
|
|
16
|
+
}
|
|
17
|
+
export default ReadArchive;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
+
import { archiveTypes } from '../../constants/index.js';
|
|
5
|
+
const COMMAND_ID = 0x11;
|
|
6
|
+
const COMMAND_SIZE = REQUEST_ID_SIZE + 5;
|
|
7
|
+
const examples = [
|
|
8
|
+
{
|
|
9
|
+
name: 'request detailed archive from 2023.12.23 00:00:00 GMT',
|
|
10
|
+
parameters: {
|
|
11
|
+
requestId: 33,
|
|
12
|
+
archiveType: archiveTypes.DETAILED,
|
|
13
|
+
time: 756604800
|
|
14
|
+
},
|
|
15
|
+
hex: { header: '11', body: '21 01 2d 18 df 80' }
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'request summary archive from 2023-12-23 04:00:00 GMT',
|
|
19
|
+
parameters: {
|
|
20
|
+
requestId: 34,
|
|
21
|
+
archiveType: archiveTypes.SUMMARY,
|
|
22
|
+
time: 756619200
|
|
23
|
+
},
|
|
24
|
+
hex: { header: '11', body: '22 02 2d 19 17 c0' }
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
class ReadArchive extends Command {
|
|
28
|
+
constructor(parameters) {
|
|
29
|
+
super();
|
|
30
|
+
this.parameters = parameters;
|
|
31
|
+
this.size = COMMAND_SIZE;
|
|
32
|
+
}
|
|
33
|
+
static fromBytes(data) {
|
|
34
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
35
|
+
return new ReadArchive({
|
|
36
|
+
requestId: buffer.getUint8(),
|
|
37
|
+
archiveType: buffer.getUint8(),
|
|
38
|
+
time: buffer.getUint32()
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
toBytes() {
|
|
42
|
+
if (typeof this.size !== 'number') {
|
|
43
|
+
throw new Error('unknown or invalid size');
|
|
44
|
+
}
|
|
45
|
+
const { requestId, archiveType, time } = this.parameters;
|
|
46
|
+
const buffer = new CommandBinaryBuffer(this.size);
|
|
47
|
+
buffer.setUint8(requestId);
|
|
48
|
+
buffer.setUint8(archiveType);
|
|
49
|
+
buffer.setUint32(time);
|
|
50
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
ReadArchive.id = COMMAND_ID;
|
|
54
|
+
ReadArchive.directionType = DOWNLINK;
|
|
55
|
+
ReadArchive.examples = examples;
|
|
56
|
+
ReadArchive.hasParameters = true;
|
|
57
|
+
export default ReadArchive;
|
|
58
|
+
//# sourceMappingURL=ReadArchive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadArchive.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/ReadArchive.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAYtD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,eAAe,GAAG,CAAC,CAAC;AAEzC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,uDAAuD;QAC7D,UAAU,EAAE;YACR,SAAS,EAAE,EAAE;YACb,WAAW,EAAE,YAAY,CAAC,QAAQ;YAClC,IAAI,EAAE,SAAS;SAClB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,mBAAmB,EAAC;KACjD;IACD;QACI,IAAI,EAAE,sDAAsD;QAC5D,UAAU,EAAE;YACR,SAAS,EAAE,EAAE;YACb,WAAW,EAAE,YAAY,CAAC,OAAO;YACjC,IAAI,EAAE,SAAS;SAClB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,mBAAmB,EAAC;KACjD;CACJ,CAAC;AAyBF,MAAM,WAAY,SAAQ,OAAO;IAC7B,YAAqB,UAAkC;QACnD,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAwB;QAGnD,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,WAAW,CAAC;YACnB,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC5B,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC9B,IAAI,EAAE,MAAM,CAAC,SAAS,EAAE;SAC3B,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,IAAK,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAG;YACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC9C;QAED,MAAM,EAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QACvD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAElD,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC7B,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAEvB,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAlCe,cAAE,GAAG,UAAU,CAAC;AAEhB,yBAAa,GAAG,QAAQ,CAAC;AAEzB,oBAAQ,GAAG,QAAQ,CAAC;AAEpB,yBAAa,GAAG,IAAI,CAAC;AAgCzC,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
declare class Reboot extends Command {
|
|
4
|
+
parameters: ICommandParameters;
|
|
5
|
+
constructor(parameters: ICommandParameters);
|
|
6
|
+
static readonly id = 28;
|
|
7
|
+
static readonly directionType = 1;
|
|
8
|
+
static readonly examples: TCommandExampleList;
|
|
9
|
+
static readonly hasParameters = true;
|
|
10
|
+
static fromBytes(data: Uint8Array): Reboot;
|
|
11
|
+
toBytes(): Uint8Array;
|
|
12
|
+
}
|
|
13
|
+
export default Reboot;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x1c;
|
|
5
|
+
const COMMAND_SIZE = REQUEST_ID_SIZE;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'simple request',
|
|
9
|
+
parameters: {
|
|
10
|
+
requestId: 3
|
|
11
|
+
},
|
|
12
|
+
hex: { header: '1c', body: '03' }
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
class Reboot extends Command {
|
|
16
|
+
constructor(parameters) {
|
|
17
|
+
super();
|
|
18
|
+
this.parameters = parameters;
|
|
19
|
+
this.size = COMMAND_SIZE;
|
|
20
|
+
}
|
|
21
|
+
static fromBytes(data) {
|
|
22
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
23
|
+
return new Reboot({ requestId: buffer.getUint8() });
|
|
24
|
+
}
|
|
25
|
+
toBytes() {
|
|
26
|
+
if (typeof this.size !== 'number') {
|
|
27
|
+
throw new Error('unknown or invalid size');
|
|
28
|
+
}
|
|
29
|
+
const buffer = new CommandBinaryBuffer(this.size);
|
|
30
|
+
buffer.setUint8(this.parameters.requestId);
|
|
31
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
Reboot.id = COMMAND_ID;
|
|
35
|
+
Reboot.directionType = DOWNLINK;
|
|
36
|
+
Reboot.examples = examples;
|
|
37
|
+
Reboot.hasParameters = true;
|
|
38
|
+
export default Reboot;
|
|
39
|
+
//# sourceMappingURL=Reboot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Reboot.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/Reboot.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAGvD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,eAAe,CAAC;AAErC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;SACf;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC;KAClC;CACJ,CAAC;AAsBF,MAAM,MAAO,SAAQ,OAAO;IACxB,YAAqB,UAA8B;QAC/C,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAoB;QAG/C,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,MAAM,CAAC,EAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAC,CAAC,CAAC;IACtD,CAAC;IAGD,OAAO;QACH,IAAK,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAG;YACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC9C;QAED,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAElD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAE3C,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AA3Be,SAAE,GAAG,UAAU,CAAC;AAEhB,oBAAa,GAAG,QAAQ,CAAC;AAEzB,eAAQ,GAAG,QAAQ,CAAC;AAEpB,oBAAa,GAAG,IAAI,CAAC;AAyBzC,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IRemoveShortNameProfileParameters extends ICommandParameters {
|
|
4
|
+
shortName: number;
|
|
5
|
+
}
|
|
6
|
+
declare class RemoveShortNameProfile extends Command {
|
|
7
|
+
parameters: IRemoveShortNameProfileParameters;
|
|
8
|
+
constructor(parameters: IRemoveShortNameProfileParameters);
|
|
9
|
+
static readonly id = 7;
|
|
10
|
+
static readonly directionType = 1;
|
|
11
|
+
static readonly examples: TCommandExampleList;
|
|
12
|
+
static readonly hasParameters = true;
|
|
13
|
+
static fromBytes(data: Uint8Array): RemoveShortNameProfile;
|
|
14
|
+
toBytes(): Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
export default RemoveShortNameProfile;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x07;
|
|
5
|
+
const COMMAND_SIZE = 1 + REQUEST_ID_SIZE;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'remove profile for short name 28',
|
|
9
|
+
parameters: {
|
|
10
|
+
requestId: 5,
|
|
11
|
+
shortName: 28
|
|
12
|
+
},
|
|
13
|
+
hex: { header: '07', body: '05 1c' }
|
|
14
|
+
}
|
|
15
|
+
];
|
|
16
|
+
class RemoveShortNameProfile extends Command {
|
|
17
|
+
constructor(parameters) {
|
|
18
|
+
super();
|
|
19
|
+
this.parameters = parameters;
|
|
20
|
+
this.size = COMMAND_SIZE;
|
|
21
|
+
}
|
|
22
|
+
static fromBytes(data) {
|
|
23
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
24
|
+
return new RemoveShortNameProfile({
|
|
25
|
+
requestId: buffer.getUint8(),
|
|
26
|
+
shortName: buffer.getUint8()
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
toBytes() {
|
|
30
|
+
const buffer = new CommandBinaryBuffer(COMMAND_SIZE);
|
|
31
|
+
const { requestId, shortName } = this.parameters;
|
|
32
|
+
buffer.setUint8(requestId);
|
|
33
|
+
buffer.setUint8(shortName);
|
|
34
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
RemoveShortNameProfile.id = COMMAND_ID;
|
|
38
|
+
RemoveShortNameProfile.directionType = DOWNLINK;
|
|
39
|
+
RemoveShortNameProfile.examples = examples;
|
|
40
|
+
RemoveShortNameProfile.hasParameters = true;
|
|
41
|
+
export default RemoveShortNameProfile;
|
|
42
|
+
//# sourceMappingURL=RemoveShortNameProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RemoveShortNameProfile.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/RemoveShortNameProfile.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAWvD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,GAAG,eAAe,CAAC;AAEzC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,kCAAkC;QACxC,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,EAAE;SAChB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC;KACrC;CACJ,CAAC;AAuBF,MAAM,sBAAuB,SAAQ,OAAO;IACxC,YAAqB,UAA6C;QAC9D,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAmC;QAG9D,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,sBAAsB,CAAC;YAC9B,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC5B,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;SAC/B,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACrD,MAAM,EAAC,SAAS,EAAE,SAAS,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAE/C,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAE3B,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AA5Be,yBAAE,GAAG,UAAU,CAAC;AAEhB,oCAAa,GAAG,QAAQ,CAAC;AAEzB,+BAAQ,GAAG,QAAQ,CAAC;AAEpB,oCAAa,GAAG,IAAI,CAAC;AA0BzC,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface ISetArchiveProfileParameters extends ICommandParameters {
|
|
4
|
+
summaryArchivePeriod: number;
|
|
5
|
+
detailedArchivePeriod: number;
|
|
6
|
+
}
|
|
7
|
+
declare class SetArchiveProfile extends Command {
|
|
8
|
+
parameters: ISetArchiveProfileParameters;
|
|
9
|
+
constructor(parameters: ISetArchiveProfileParameters);
|
|
10
|
+
static readonly id = 15;
|
|
11
|
+
static readonly directionType = 1;
|
|
12
|
+
static readonly examples: TCommandExampleList;
|
|
13
|
+
static readonly hasParameters = true;
|
|
14
|
+
static fromBytes(data: Uint8Array): SetArchiveProfile;
|
|
15
|
+
toBytes(): Uint8Array;
|
|
16
|
+
}
|
|
17
|
+
export default SetArchiveProfile;
|