jooby-codec 2.8.2 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analog/Command.d.ts +1 -0
- package/dist/analog/Command.js +4 -0
- package/dist/analog/Command.js.map +1 -1
- package/dist/analog/message.d.ts +2 -0
- package/dist/analog/message.js +4 -0
- package/dist/analog/message.js.map +1 -1
- package/dist/obis-observer/Command.d.ts +1 -0
- package/dist/obis-observer/Command.js +7 -8
- package/dist/obis-observer/Command.js.map +1 -1
- package/dist/obis-observer/CommandBinaryBuffer.d.ts +7 -7
- package/dist/obis-observer/CommandBinaryBuffer.js +11 -11
- package/dist/obis-observer/CommandBinaryBuffer.js.map +1 -1
- package/dist/obis-observer/commands/downlink/AddMeterProfile.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/AddMeterProfile.js +34 -0
- package/dist/obis-observer/commands/downlink/AddMeterProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/AddObisProfile.d.ts +18 -0
- package/dist/obis-observer/commands/downlink/{AddShortNameProfile.js → AddObisProfile.js} +20 -17
- package/dist/obis-observer/commands/downlink/AddObisProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetLorawanInfo.d.ts +2 -2
- package/dist/obis-observer/commands/downlink/GetLorawanInfo.js +6 -13
- package/dist/obis-observer/commands/downlink/GetLorawanInfo.js.map +1 -1
- package/dist/obis-observer/commands/downlink/GetLorawanState.d.ts +2 -2
- package/dist/obis-observer/commands/downlink/GetLorawanState.js +6 -13
- package/dist/obis-observer/commands/downlink/GetLorawanState.js.map +1 -1
- package/dist/obis-observer/commands/downlink/GetMeterArchiveProfile.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/GetMeterArchiveProfile.js +34 -0
- package/dist/obis-observer/commands/downlink/GetMeterArchiveProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetMeterArchiveState.d.ts +17 -0
- package/dist/obis-observer/commands/downlink/GetMeterArchiveState.js +35 -0
- package/dist/obis-observer/commands/downlink/GetMeterArchiveState.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetMeterDate.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/GetMeterDate.js +33 -0
- package/dist/obis-observer/commands/downlink/GetMeterDate.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetMeterId.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/{GetShortNameInfo.js → GetMeterId.js} +17 -17
- package/dist/obis-observer/commands/downlink/GetMeterId.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetMeterIdList.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/GetMeterIdList.js +33 -0
- package/dist/obis-observer/commands/downlink/GetMeterIdList.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetMeterInfo.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/GetMeterInfo.js +33 -0
- package/dist/obis-observer/commands/downlink/GetMeterInfo.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetMeterProfileIdList.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/GetMeterProfileIdList.js +33 -0
- package/dist/obis-observer/commands/downlink/GetMeterProfileIdList.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetMeterReadoutState.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/GetMeterReadoutState.js +33 -0
- package/dist/obis-observer/commands/downlink/GetMeterReadoutState.js.map +1 -0
- package/dist/obis-observer/commands/downlink/{GetContentByObis.d.ts → GetObisContent.d.ts} +2 -1
- package/dist/obis-observer/commands/downlink/{GetContentByObis.js → GetObisContent.js} +9 -6
- package/dist/obis-observer/commands/downlink/GetObisContent.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetObisContentById.d.ts +17 -0
- package/dist/obis-observer/commands/downlink/GetObisContentById.js +34 -0
- package/dist/obis-observer/commands/downlink/GetObisContentById.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetObisIdList.d.ts +17 -0
- package/dist/obis-observer/commands/downlink/{SetShortName.js → GetObisIdList.js} +15 -15
- package/dist/obis-observer/commands/downlink/GetObisIdList.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetObisInfo.d.ts +17 -0
- package/dist/obis-observer/commands/downlink/GetObisInfo.js +34 -0
- package/dist/obis-observer/commands/downlink/GetObisInfo.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetObisProfile.d.ts +17 -0
- package/dist/obis-observer/commands/downlink/GetObisProfile.js +35 -0
- package/dist/obis-observer/commands/downlink/GetObisProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/{GetReadoutState.d.ts → GetObserverCapabilities.d.ts} +4 -4
- package/dist/obis-observer/commands/downlink/GetObserverCapabilities.js +32 -0
- package/dist/obis-observer/commands/downlink/GetObserverCapabilities.js.map +1 -0
- package/dist/obis-observer/commands/downlink/{GetDeviceInfo.d.ts → GetObserverInfo.d.ts} +4 -4
- package/dist/obis-observer/commands/downlink/GetObserverInfo.js +32 -0
- package/dist/obis-observer/commands/downlink/GetObserverInfo.js.map +1 -0
- package/dist/obis-observer/commands/downlink/{GetArchiveProfile.d.ts → GetObserverSingleMode.d.ts} +3 -3
- package/dist/obis-observer/commands/downlink/GetObserverSingleMode.js +32 -0
- package/dist/obis-observer/commands/downlink/GetObserverSingleMode.js.map +1 -0
- package/dist/obis-observer/commands/downlink/{GetDate.d.ts → GetObserverUptime.d.ts} +4 -4
- package/dist/obis-observer/commands/downlink/GetObserverUptime.js +32 -0
- package/dist/obis-observer/commands/downlink/GetObserverUptime.js.map +1 -0
- package/dist/obis-observer/commands/downlink/ReadMeterArchive.d.ts +19 -0
- package/dist/obis-observer/commands/downlink/ReadMeterArchive.js +61 -0
- package/dist/obis-observer/commands/downlink/ReadMeterArchive.js.map +1 -0
- package/dist/obis-observer/commands/downlink/Reboot.d.ts +2 -2
- package/dist/obis-observer/commands/downlink/Reboot.js +6 -12
- package/dist/obis-observer/commands/downlink/Reboot.js.map +1 -1
- package/dist/obis-observer/commands/downlink/RemoveMeter.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/RemoveMeter.js +34 -0
- package/dist/obis-observer/commands/downlink/RemoveMeter.js.map +1 -0
- package/dist/obis-observer/commands/downlink/RemoveMeterProfile.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/RemoveMeterProfile.js +34 -0
- package/dist/obis-observer/commands/downlink/RemoveMeterProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/RemoveObisProfile.d.ts +17 -0
- package/dist/obis-observer/commands/downlink/RemoveObisProfile.js +35 -0
- package/dist/obis-observer/commands/downlink/RemoveObisProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/SetLorawanActivationMethod.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/SetLorawanActivationMethod.js +34 -0
- package/dist/obis-observer/commands/downlink/SetLorawanActivationMethod.js.map +1 -0
- package/dist/obis-observer/commands/downlink/SetMeterArchiveProfile.d.ts +18 -0
- package/dist/obis-observer/commands/downlink/SetMeterArchiveProfile.js +48 -0
- package/dist/obis-observer/commands/downlink/SetMeterArchiveProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/SetObisId.d.ts +18 -0
- package/dist/obis-observer/commands/downlink/{GetShortNames.js → SetObisId.js} +19 -13
- package/dist/obis-observer/commands/downlink/SetObisId.js.map +1 -0
- package/dist/obis-observer/commands/downlink/SetObserverSingleMode.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/SetObserverSingleMode.js +34 -0
- package/dist/obis-observer/commands/downlink/SetObserverSingleMode.js.map +1 -0
- package/dist/obis-observer/commands/downlink/SetSerialPort.d.ts +1 -1
- package/dist/obis-observer/commands/downlink/SetSerialPort.js +3 -3
- package/dist/obis-observer/commands/downlink/SetSerialPort.js.map +1 -1
- package/dist/obis-observer/commands/downlink/SetupMeter.d.ts +18 -0
- package/dist/obis-observer/commands/downlink/SetupMeter.js +50 -0
- package/dist/obis-observer/commands/downlink/SetupMeter.js.map +1 -0
- package/dist/obis-observer/commands/downlink/UpdateImageVerify.d.ts +2 -2
- package/dist/obis-observer/commands/downlink/UpdateImageVerify.js +6 -12
- package/dist/obis-observer/commands/downlink/UpdateImageVerify.js.map +1 -1
- package/dist/obis-observer/commands/downlink/UpdateImageWrite.d.ts +1 -1
- package/dist/obis-observer/commands/downlink/UpdateImageWrite.js +4 -6
- package/dist/obis-observer/commands/downlink/UpdateImageWrite.js.map +1 -1
- package/dist/obis-observer/commands/downlink/UpdateRun.d.ts +2 -2
- package/dist/obis-observer/commands/downlink/UpdateRun.js +6 -12
- package/dist/obis-observer/commands/downlink/UpdateRun.js.map +1 -1
- package/dist/obis-observer/commands/downlink/index.d.ts +28 -15
- package/dist/obis-observer/commands/downlink/index.js +28 -15
- package/dist/obis-observer/commands/downlink/index.js.map +1 -1
- package/dist/obis-observer/commands/uplink/AddMeterProfileResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/AddMeterProfileResponse.js +35 -0
- package/dist/obis-observer/commands/uplink/AddMeterProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/AddObisProfileResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/AddObisProfileResponse.js +35 -0
- package/dist/obis-observer/commands/uplink/AddObisProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetLorawanInfoResponse.d.ts +1 -1
- package/dist/obis-observer/commands/uplink/GetLorawanInfoResponse.js +3 -3
- package/dist/obis-observer/commands/uplink/GetLorawanInfoResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/GetLorawanStateResponse.d.ts +1 -1
- package/dist/obis-observer/commands/uplink/GetLorawanStateResponse.js +23 -26
- package/dist/obis-observer/commands/uplink/GetLorawanStateResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/{GetArchiveProfileResponse.d.ts → GetMeterArchiveProfileResponse.d.ts} +1 -1
- package/dist/obis-observer/commands/uplink/{GetArchiveProfileResponse.js → GetMeterArchiveProfileResponse.js} +4 -4
- package/dist/obis-observer/commands/uplink/GetMeterArchiveProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetMeterArchiveStateResponse.d.ts +19 -0
- package/dist/obis-observer/commands/uplink/GetMeterArchiveStateResponse.js +78 -0
- package/dist/obis-observer/commands/uplink/GetMeterArchiveStateResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetMeterDateResponse.d.ts +18 -0
- package/dist/obis-observer/commands/uplink/{GetDateResponse.js → GetMeterDateResponse.js} +18 -18
- package/dist/obis-observer/commands/uplink/GetMeterDateResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetMeterIdListResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/GetMeterIdListResponse.js +43 -0
- package/dist/obis-observer/commands/uplink/GetMeterIdListResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetMeterIdResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/GetMeterIdResponse.js +34 -0
- package/dist/obis-observer/commands/uplink/GetMeterIdResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetMeterInfoResponse.d.ts +17 -0
- package/dist/obis-observer/commands/uplink/GetMeterInfoResponse.js +57 -0
- package/dist/obis-observer/commands/uplink/GetMeterInfoResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetMeterProfileIdListResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/GetMeterProfileIdListResponse.js +43 -0
- package/dist/obis-observer/commands/uplink/GetMeterProfileIdListResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/{GetReadoutStateResponse.d.ts → GetMeterReadoutStateResponse.d.ts} +7 -7
- package/dist/obis-observer/commands/uplink/{GetReadoutStateResponse.js → GetMeterReadoutStateResponse.js} +11 -11
- package/dist/obis-observer/commands/uplink/GetMeterReadoutStateResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetObisContentByIdResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/{GetContentByShortNameResponse.js → GetObisContentByIdResponse.js} +11 -11
- package/dist/obis-observer/commands/uplink/GetObisContentByIdResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetObisContentByIdStringResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/{GetContentByShortNameStringResponse.js → GetObisContentByIdStringResponse.js} +12 -14
- package/dist/obis-observer/commands/uplink/GetObisContentByIdStringResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/{GetContentByObisResponse.d.ts → GetObisContentResponse.d.ts} +1 -1
- package/dist/obis-observer/commands/uplink/{GetContentByObisResponse.js → GetObisContentResponse.js} +5 -7
- package/dist/obis-observer/commands/uplink/GetObisContentResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetObisIdListResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/GetObisIdListResponse.js +43 -0
- package/dist/obis-observer/commands/uplink/GetObisIdListResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetObisInfoResponse.d.ts +17 -0
- package/dist/obis-observer/commands/uplink/{GetShortNameInfoResponse.js → GetObisInfoResponse.js} +13 -14
- package/dist/obis-observer/commands/uplink/GetObisInfoResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetObisProfileResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/{GetShortNameProfileResponse.js → GetObisProfileResponse.js} +11 -11
- package/dist/obis-observer/commands/uplink/GetObisProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetObserverCapabilitiesResponse.d.ts +19 -0
- package/dist/obis-observer/commands/uplink/GetObserverCapabilitiesResponse.js +53 -0
- package/dist/obis-observer/commands/uplink/GetObserverCapabilitiesResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/{GetDeviceInfoResponse.d.ts → GetObserverInfoResponse.d.ts} +7 -7
- package/dist/obis-observer/commands/uplink/{GetDeviceInfoResponse.js → GetObserverInfoResponse.js} +13 -15
- package/dist/obis-observer/commands/uplink/GetObserverInfoResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetObserverSingleModeResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/GetObserverSingleModeResponse.js +33 -0
- package/dist/obis-observer/commands/uplink/GetObserverSingleModeResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetObserverUptimeResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/GetObserverUptimeResponse.js +44 -0
- package/dist/obis-observer/commands/uplink/GetObserverUptimeResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/ObservationReport.d.ts +3 -3
- package/dist/obis-observer/commands/uplink/ObservationReport.js +15 -16
- package/dist/obis-observer/commands/uplink/ObservationReport.js.map +1 -1
- package/dist/obis-observer/commands/uplink/ObservationReportString.d.ts +3 -3
- package/dist/obis-observer/commands/uplink/ObservationReportString.js +16 -17
- package/dist/obis-observer/commands/uplink/ObservationReportString.js.map +1 -1
- package/dist/obis-observer/commands/uplink/ReadMeterArchiveResponse.d.ts +18 -0
- package/dist/obis-observer/commands/uplink/{ReadArchiveResponse.js → ReadMeterArchiveResponse.js} +22 -23
- package/dist/obis-observer/commands/uplink/ReadMeterArchiveResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/RebootResponse.d.ts +7 -4
- package/dist/obis-observer/commands/uplink/RebootResponse.js +11 -12
- package/dist/obis-observer/commands/uplink/RebootResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/RemoveMeterProfileResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/RemoveMeterProfileResponse.js +35 -0
- package/dist/obis-observer/commands/uplink/RemoveMeterProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/RemoveMeterResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/RemoveMeterResponse.js +35 -0
- package/dist/obis-observer/commands/uplink/RemoveMeterResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/RemoveObisProfileResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/RemoveObisProfileResponse.js +35 -0
- package/dist/obis-observer/commands/uplink/RemoveObisProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetLorawanActivationMethodResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/SetLorawanActivationMethodResponse.js +35 -0
- package/dist/obis-observer/commands/uplink/SetLorawanActivationMethodResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetMeterArchiveProfileResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/SetMeterArchiveProfileResponse.js +43 -0
- package/dist/obis-observer/commands/uplink/SetMeterArchiveProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetObisIdResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/SetObisIdResponse.js +35 -0
- package/dist/obis-observer/commands/uplink/SetObisIdResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetObserverSingleModeResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/SetObserverSingleModeResponse.js +35 -0
- package/dist/obis-observer/commands/uplink/SetObserverSingleModeResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetSerialPortResponse.d.ts +2 -2
- package/dist/obis-observer/commands/uplink/SetSerialPortResponse.js +9 -17
- package/dist/obis-observer/commands/uplink/SetSerialPortResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/SetupMeterResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/SetupMeterResponse.js +35 -0
- package/dist/obis-observer/commands/uplink/SetupMeterResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/UpdateImageVerifyResponse.d.ts +2 -2
- package/dist/obis-observer/commands/uplink/UpdateImageVerifyResponse.js +8 -16
- package/dist/obis-observer/commands/uplink/UpdateImageVerifyResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/UpdateImageWriteResponse.d.ts +2 -2
- package/dist/obis-observer/commands/uplink/UpdateImageWriteResponse.js +8 -16
- package/dist/obis-observer/commands/uplink/UpdateImageWriteResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/UpdateRunResponse.d.ts +2 -2
- package/dist/obis-observer/commands/uplink/UpdateRunResponse.js +8 -16
- package/dist/obis-observer/commands/uplink/UpdateRunResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/index.d.ts +29 -16
- package/dist/obis-observer/commands/uplink/index.js +29 -16
- package/dist/obis-observer/commands/uplink/index.js.map +1 -1
- package/dist/obis-observer/constants/commandRelations.js +31 -12
- package/dist/obis-observer/constants/commandRelations.js.map +1 -1
- package/dist/obis-observer/constants/index.d.ts +1 -1
- package/dist/obis-observer/constants/index.js +1 -1
- package/dist/obis-observer/constants/index.js.map +1 -1
- package/dist/obis-observer/constants/{shortNames.d.ts → obisIds.d.ts} +4 -4
- package/dist/obis-observer/constants/obisIds.js +228 -0
- package/dist/obis-observer/constants/obisIds.js.map +1 -0
- package/dist/obis-observer/message.d.ts +2 -0
- package/dist/obis-observer/message.js +8 -12
- package/dist/obis-observer/message.js.map +1 -1
- package/dist/utils/getBase64FromBytes.d.ts +2 -0
- package/dist/utils/getBase64FromBytes.js +5 -0
- package/dist/utils/getBase64FromBytes.js.map +1 -0
- package/dist/utils/getBytesFromBase64.d.ts +2 -0
- package/dist/utils/getBytesFromBase64.js +2 -0
- package/dist/utils/getBytesFromBase64.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/obis-observer/commands/downlink/AddShortNameProfile.d.ts +0 -17
- package/dist/obis-observer/commands/downlink/AddShortNameProfile.js.map +0 -1
- package/dist/obis-observer/commands/downlink/GetArchiveProfile.js +0 -39
- package/dist/obis-observer/commands/downlink/GetArchiveProfile.js.map +0 -1
- package/dist/obis-observer/commands/downlink/GetArchiveState.d.ts +0 -16
- package/dist/obis-observer/commands/downlink/GetArchiveState.js +0 -42
- package/dist/obis-observer/commands/downlink/GetArchiveState.js.map +0 -1
- package/dist/obis-observer/commands/downlink/GetContentByObis.js.map +0 -1
- package/dist/obis-observer/commands/downlink/GetContentByShortName.d.ts +0 -17
- package/dist/obis-observer/commands/downlink/GetContentByShortName.js +0 -44
- package/dist/obis-observer/commands/downlink/GetContentByShortName.js.map +0 -1
- package/dist/obis-observer/commands/downlink/GetDate.js +0 -39
- package/dist/obis-observer/commands/downlink/GetDate.js.map +0 -1
- package/dist/obis-observer/commands/downlink/GetDeviceInfo.js +0 -39
- package/dist/obis-observer/commands/downlink/GetDeviceInfo.js.map +0 -1
- package/dist/obis-observer/commands/downlink/GetReadoutState.js +0 -39
- package/dist/obis-observer/commands/downlink/GetReadoutState.js.map +0 -1
- package/dist/obis-observer/commands/downlink/GetShortNameInfo.d.ts +0 -17
- package/dist/obis-observer/commands/downlink/GetShortNameInfo.js.map +0 -1
- package/dist/obis-observer/commands/downlink/GetShortNameProfile.d.ts +0 -16
- package/dist/obis-observer/commands/downlink/GetShortNameProfile.js +0 -45
- package/dist/obis-observer/commands/downlink/GetShortNameProfile.js.map +0 -1
- package/dist/obis-observer/commands/downlink/GetShortNames.d.ts +0 -16
- package/dist/obis-observer/commands/downlink/GetShortNames.js.map +0 -1
- package/dist/obis-observer/commands/downlink/ReadArchive.d.ts +0 -18
- package/dist/obis-observer/commands/downlink/ReadArchive.js +0 -57
- package/dist/obis-observer/commands/downlink/ReadArchive.js.map +0 -1
- package/dist/obis-observer/commands/downlink/RemoveShortNameProfile.d.ts +0 -16
- package/dist/obis-observer/commands/downlink/RemoveShortNameProfile.js +0 -42
- package/dist/obis-observer/commands/downlink/RemoveShortNameProfile.js.map +0 -1
- package/dist/obis-observer/commands/downlink/SetArchiveProfile.d.ts +0 -17
- package/dist/obis-observer/commands/downlink/SetArchiveProfile.js +0 -45
- package/dist/obis-observer/commands/downlink/SetArchiveProfile.js.map +0 -1
- package/dist/obis-observer/commands/downlink/SetShortName.d.ts +0 -17
- package/dist/obis-observer/commands/downlink/SetShortName.js.map +0 -1
- package/dist/obis-observer/commands/uplink/AddShortNameProfileResponse.d.ts +0 -16
- package/dist/obis-observer/commands/uplink/AddShortNameProfileResponse.js +0 -43
- package/dist/obis-observer/commands/uplink/AddShortNameProfileResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetArchiveProfileResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetArchiveStateResponse.d.ts +0 -19
- package/dist/obis-observer/commands/uplink/GetArchiveStateResponse.js +0 -58
- package/dist/obis-observer/commands/uplink/GetArchiveStateResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetContentByObisResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetContentByShortNameResponse.d.ts +0 -16
- package/dist/obis-observer/commands/uplink/GetContentByShortNameResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetContentByShortNameStringResponse.d.ts +0 -16
- package/dist/obis-observer/commands/uplink/GetContentByShortNameStringResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetDateResponse.d.ts +0 -18
- package/dist/obis-observer/commands/uplink/GetDateResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetDeviceInfoResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetReadoutStateResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetShortNameInfoResponse.d.ts +0 -17
- package/dist/obis-observer/commands/uplink/GetShortNameInfoResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetShortNameProfileResponse.d.ts +0 -16
- package/dist/obis-observer/commands/uplink/GetShortNameProfileResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetShortNamesResponse.d.ts +0 -16
- package/dist/obis-observer/commands/uplink/GetShortNamesResponse.js +0 -45
- package/dist/obis-observer/commands/uplink/GetShortNamesResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/ReadArchiveResponse.d.ts +0 -18
- package/dist/obis-observer/commands/uplink/ReadArchiveResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/RemoveShortNameProfileResponse.d.ts +0 -16
- package/dist/obis-observer/commands/uplink/RemoveShortNameProfileResponse.js +0 -43
- package/dist/obis-observer/commands/uplink/RemoveShortNameProfileResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/SetArchiveProfileResponse.d.ts +0 -16
- package/dist/obis-observer/commands/uplink/SetArchiveProfileResponse.js +0 -51
- package/dist/obis-observer/commands/uplink/SetArchiveProfileResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/SetShortNameResponse.d.ts +0 -16
- package/dist/obis-observer/commands/uplink/SetShortNameResponse.js +0 -43
- package/dist/obis-observer/commands/uplink/SetShortNameResponse.js.map +0 -1
- package/dist/obis-observer/constants/shortNames.js +0 -228
- package/dist/obis-observer/constants/shortNames.js.map +0 -1
package/dist/analog/Command.d.ts
CHANGED
package/dist/analog/Command.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as header from './header.js';
|
|
2
2
|
import getHexFromBytes from '../utils/getHexFromBytes.js';
|
|
3
3
|
import getHexFromNumber from '../utils/getHexFromNumber.js';
|
|
4
|
+
import getBase64FromBytes from '../utils/getBase64FromBytes.js';
|
|
4
5
|
class Command {
|
|
5
6
|
static getId() {
|
|
6
7
|
return getHexFromNumber(this.id);
|
|
@@ -25,6 +26,9 @@ class Command {
|
|
|
25
26
|
toHex(options = {}) {
|
|
26
27
|
return getHexFromBytes(this.toBytes(), options);
|
|
27
28
|
}
|
|
29
|
+
toBase64() {
|
|
30
|
+
return getBase64FromBytes(this.toBytes());
|
|
31
|
+
}
|
|
28
32
|
toJson() {
|
|
29
33
|
return JSON.stringify(this.getParameters());
|
|
30
34
|
}
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"Command.js","sourceRoot":"","sources":["../../src/analog/Command.ts"],"names":[],"mappings":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,KAAK,CAAC;AA0GjC,eAAe,OAAO,CAAC"}
|
package/dist/analog/message.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ interface IMessageConfig {
|
|
|
22
22
|
export declare const calculateLrc: (data: Uint8Array, initialLrc?: number) => number;
|
|
23
23
|
export declare const fromBytes: (data: Uint8Array, config?: IMessageConfig) => IMessage;
|
|
24
24
|
export declare const fromHex: (data: string, config?: IMessageConfig) => IMessage;
|
|
25
|
+
export declare const fromBase64: (data: string) => IMessage;
|
|
25
26
|
export declare const toBytes: (commands: Array<Command>) => Uint8Array;
|
|
26
27
|
export declare const toHex: (commands: Array<Command>, options?: IHexFormatOptions) => string;
|
|
28
|
+
export declare const toBase64: (commands: Array<Command>) => string;
|
|
27
29
|
export {};
|
package/dist/analog/message.js
CHANGED
|
@@ -5,7 +5,9 @@ import * as directionTypes from './constants/directions.js';
|
|
|
5
5
|
import { AUTO, DOWNLINK, UPLINK } from './constants/directions.js';
|
|
6
6
|
import * as header from './header.js';
|
|
7
7
|
import getBytesFromHex from '../utils/getBytesFromHex.js';
|
|
8
|
+
import getBytesFromBase64 from '../utils/getBytesFromBase64.js';
|
|
8
9
|
import getHexFromBytes from '../utils/getHexFromBytes.js';
|
|
10
|
+
import getBase64FromBytes from '../utils/getBase64FromBytes.js';
|
|
9
11
|
const HEADER_MAX_SIZE = 3;
|
|
10
12
|
const directionTypeIds = new Set(Object.values(directionTypes));
|
|
11
13
|
const downlinkCommandsById = Object.fromEntries(Object.values(downlinkCommands).map(item => [item.id, item]));
|
|
@@ -81,6 +83,7 @@ export const fromBytes = (data, config) => {
|
|
|
81
83
|
return result;
|
|
82
84
|
};
|
|
83
85
|
export const fromHex = (data, config) => (fromBytes(getBytesFromHex(data), config));
|
|
86
|
+
export const fromBase64 = (data) => (fromBytes(getBytesFromBase64(data)));
|
|
84
87
|
export const toBytes = (commands) => {
|
|
85
88
|
const arrays = commands.map(command => command.toBytes());
|
|
86
89
|
const totalLength = arrays.reduce((accumulator, item) => (accumulator + item.length), 0);
|
|
@@ -94,4 +97,5 @@ export const toBytes = (commands) => {
|
|
|
94
97
|
return result;
|
|
95
98
|
};
|
|
96
99
|
export const toHex = (commands, options = {}) => getHexFromBytes(toBytes(commands), options);
|
|
100
|
+
export const toBase64 = (commands) => getBase64FromBytes(toBytes(commands));
|
|
97
101
|
//# sourceMappingURL=message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/analog/message.ts"],"names":[],"mappings":"AAGA,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAE7D,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,2BAA2B,CAAC;AAEjE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,eAAe,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/analog/message.ts"],"names":[],"mappings":"AAGA,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAE7D,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,2BAA2B,CAAC;AAEjE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,kBAAkB,MAAM,gCAAgC,CAAC;AAChE,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,kBAAkB,MAAM,gCAAgC,CAAC;AA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QAAQ,GAAG,CAAE,QAAwB,EAAW,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import getHexFromBytes from '../utils/getHexFromBytes.js';
|
|
2
2
|
import getHexFromNumber from '../utils/getHexFromNumber.js';
|
|
3
|
+
import getBase64FromBytes from '../utils/getBase64FromBytes.js';
|
|
3
4
|
class Command {
|
|
4
5
|
static getId() {
|
|
5
6
|
return getHexFromNumber(this.id);
|
|
6
7
|
}
|
|
7
8
|
static toBytes(id, commandData) {
|
|
8
9
|
const commandLength = commandData?.length ?? 0;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
resultData.set(headerData);
|
|
13
|
-
resultData.set(commandData, headerData.length);
|
|
14
|
-
return resultData;
|
|
15
|
-
}
|
|
16
|
-
return headerData;
|
|
10
|
+
return (commandData && commandLength)
|
|
11
|
+
? new Uint8Array([id, commandLength, ...commandData])
|
|
12
|
+
: new Uint8Array([id, 0]);
|
|
17
13
|
}
|
|
18
14
|
getParameters() {
|
|
19
15
|
return this.parameters;
|
|
@@ -24,6 +20,9 @@ class Command {
|
|
|
24
20
|
toHex(options = {}) {
|
|
25
21
|
return getHexFromBytes(this.toBytes(), options);
|
|
26
22
|
}
|
|
23
|
+
toBase64() {
|
|
24
|
+
return getBase64FromBytes(this.toBytes());
|
|
25
|
+
}
|
|
27
26
|
toJson() {
|
|
28
27
|
return JSON.stringify(this.getParameters());
|
|
29
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Command.js","sourceRoot":"","sources":["../../src/obis-observer/Command.ts"],"names":[],"mappings":"AACA,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"Command.js","sourceRoot":"","sources":["../../src/obis-observer/Command.ts"],"names":[],"mappings":"AACA,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAC5D,OAAO,kBAAkB,MAAM,gCAAgC,CAAC;AAmBhE,MAAe,OAAO;IAmBlB,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;QAE/C,OAAO,CAAE,WAAW,IAAI,aAAa,CAAE;YACnC,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,EAAE,aAAa,EAAE,GAAG,WAAW,CAAC,CAAC;YACrD,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAClC,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;IAED,QAAQ;QACJ,OAAO,kBAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9C,CAAC;IAOD,MAAM;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IAChD,CAAC;;AA5FM,qBAAa,GAAG,KAAK,CAAC;AAgGjC,eAAe,OAAO,CAAC"}
|
|
@@ -22,11 +22,11 @@ export interface IObisProfile {
|
|
|
22
22
|
sendingCounter: number;
|
|
23
23
|
flags: IObisProfileFlags;
|
|
24
24
|
}
|
|
25
|
-
export interface
|
|
25
|
+
export interface IObisValueFloat {
|
|
26
26
|
code: number;
|
|
27
27
|
content: number;
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface IObisValueString {
|
|
30
30
|
code: number;
|
|
31
31
|
content: string;
|
|
32
32
|
}
|
|
@@ -41,15 +41,15 @@ export declare const EUI_SIZE = 8;
|
|
|
41
41
|
declare class CommandBinaryBuffer extends BinaryBuffer {
|
|
42
42
|
constructor(dataOrLength: Uint8Array | number | string);
|
|
43
43
|
static getObisSize(obis: IObis): number;
|
|
44
|
-
static
|
|
44
|
+
static getObisContentSize(obisValue: IObisValueFloat | IObisValueString): number;
|
|
45
45
|
getObis(): IObis;
|
|
46
46
|
setObis(obis: IObis): void;
|
|
47
47
|
getObisProfile(): IObisProfile;
|
|
48
48
|
setObisProfile(profile: IObisProfile): void;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
getObisValueString(): IObisValueString;
|
|
50
|
+
setObisValueString(obisValue: IObisValueString): void;
|
|
51
|
+
getObisValueFloat(): IObisValueFloat;
|
|
52
|
+
setObisValueFloat(obisValue: IObisValueFloat): void;
|
|
53
53
|
getSerialPortFlags(): {
|
|
54
54
|
fixed: boolean;
|
|
55
55
|
parity: number;
|
|
@@ -28,11 +28,11 @@ class CommandBinaryBuffer extends BinaryBuffer {
|
|
|
28
28
|
const keys = Object.keys(obis);
|
|
29
29
|
return keys.filter(key => obis[key] !== undefined).length + 1;
|
|
30
30
|
}
|
|
31
|
-
static
|
|
32
|
-
if (typeof
|
|
31
|
+
static getObisContentSize(obisValue) {
|
|
32
|
+
if (typeof obisValue.content === 'number') {
|
|
33
33
|
return 5;
|
|
34
34
|
}
|
|
35
|
-
return 1 +
|
|
35
|
+
return 1 + obisValue.content.length + 1;
|
|
36
36
|
}
|
|
37
37
|
getObis() {
|
|
38
38
|
const obis = {
|
|
@@ -109,19 +109,19 @@ class CommandBinaryBuffer extends BinaryBuffer {
|
|
|
109
109
|
flags = bitSet.fillBits(flags, archiveProfileBitsNumber, archiveProfile2BitStartIndex, +profile.flags.archiveProfile2);
|
|
110
110
|
this.setUint8(flags);
|
|
111
111
|
}
|
|
112
|
-
|
|
112
|
+
getObisValueString() {
|
|
113
113
|
return { code: this.getUint8(), content: this.getString() };
|
|
114
114
|
}
|
|
115
|
-
|
|
116
|
-
this.setUint8(
|
|
117
|
-
this.setString(
|
|
115
|
+
setObisValueString(obisValue) {
|
|
116
|
+
this.setUint8(obisValue.code);
|
|
117
|
+
this.setString(obisValue.content);
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
getObisValueFloat() {
|
|
120
120
|
return { code: this.getUint8(), content: roundNumber(this.getFloat32()) };
|
|
121
121
|
}
|
|
122
|
-
|
|
123
|
-
this.setUint8(
|
|
124
|
-
this.setFloat32(roundNumber(
|
|
122
|
+
setObisValueFloat(obisValue) {
|
|
123
|
+
this.setUint8(obisValue.code);
|
|
124
|
+
this.setFloat32(roundNumber(obisValue.content));
|
|
125
125
|
}
|
|
126
126
|
getSerialPortFlags() {
|
|
127
127
|
const flags = this.getUint8();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandBinaryBuffer.js","sourceRoot":"","sources":["../../src/obis-observer/CommandBinaryBuffer.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAuElD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AACnC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAChC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC;AAG1B,MAAM,WAAW,GAAG;IAChB,CAAC,EAAE,CAAC,IAAI,CAAC;IACT,CAAC,EAAE,CAAC,IA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,eAAe,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAG,GAAW;QAChB,MAAM,KAAK,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;QAEnC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/C,CAAC;CACJ;AAGD,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IAddMeterProfileParameters extends ICommandParameters {
|
|
4
|
+
meterProfileId: number;
|
|
5
|
+
}
|
|
6
|
+
declare class AddMeterProfile extends Command {
|
|
7
|
+
parameters: IAddMeterProfileParameters;
|
|
8
|
+
constructor(parameters: IAddMeterProfileParameters);
|
|
9
|
+
static readonly id = 96;
|
|
10
|
+
static readonly directionType = 1;
|
|
11
|
+
static readonly examples: TCommandExampleList;
|
|
12
|
+
static readonly hasParameters = true;
|
|
13
|
+
static fromBytes([requestId, meterProfileId]: Uint8Array): AddMeterProfile;
|
|
14
|
+
toBytes(): Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
export default AddMeterProfile;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x60;
|
|
5
|
+
const COMMAND_SIZE = REQUEST_ID_SIZE + 1;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'add meter profile with Id 17',
|
|
9
|
+
parameters: {
|
|
10
|
+
requestId: 3,
|
|
11
|
+
meterProfileId: 17
|
|
12
|
+
},
|
|
13
|
+
hex: { header: '60 02', body: '03 11' }
|
|
14
|
+
}
|
|
15
|
+
];
|
|
16
|
+
class AddMeterProfile extends Command {
|
|
17
|
+
constructor(parameters) {
|
|
18
|
+
super();
|
|
19
|
+
this.parameters = parameters;
|
|
20
|
+
this.size = COMMAND_SIZE;
|
|
21
|
+
}
|
|
22
|
+
static fromBytes([requestId, meterProfileId]) {
|
|
23
|
+
return new AddMeterProfile({ requestId, meterProfileId });
|
|
24
|
+
}
|
|
25
|
+
toBytes() {
|
|
26
|
+
return Command.toBytes(COMMAND_ID, new Uint8Array([this.parameters.requestId, this.parameters.meterProfileId]));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
AddMeterProfile.id = COMMAND_ID;
|
|
30
|
+
AddMeterProfile.directionType = DOWNLINK;
|
|
31
|
+
AddMeterProfile.examples = examples;
|
|
32
|
+
AddMeterProfile.hasParameters = true;
|
|
33
|
+
export default AddMeterProfile;
|
|
34
|
+
//# sourceMappingURL=AddMeterProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddMeterProfile.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/AddMeterProfile.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACjF,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,8BAA8B;QACpC,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,cAAc,EAAE,EAAE;SACrB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC;KACxC;CACJ,CAAC;AAuBF,MAAM,eAAgB,SAAQ,OAAO;IACjC,YAAqB,UAAsC;QACvD,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAA4B;QAGvD,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,CAAC,SAAS,EAAE,cAAc,CAAa;QACtD,OAAO,IAAI,eAAe,CAAC,EAAC,SAAS,EAAE,cAAc,EAAC,CAAC,CAAC;IAC5D,CAAC;IAGD,OAAO;QACH,OAAO,OAAO,CAAC,OAAO,CAClB,UAAU,EACV,IAAI,UAAU,CACV,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,CAC9D,CACJ,CAAC;IACN,CAAC;;AAtBe,kBAAE,GAAG,UAAU,CAAC;AAEhB,6BAAa,GAAG,QAAQ,CAAC;AAEzB,wBAAQ,GAAG,QAAQ,CAAC;AAEpB,6BAAa,GAAG,IAAI,CAAC;AAoBzC,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters, IObisProfile } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IAddObisProfileParameters extends ICommandParameters {
|
|
4
|
+
meterProfileId: number;
|
|
5
|
+
obisId: number;
|
|
6
|
+
obisProfile: IObisProfile;
|
|
7
|
+
}
|
|
8
|
+
declare class AddObisProfile extends Command {
|
|
9
|
+
parameters: IAddObisProfileParameters;
|
|
10
|
+
constructor(parameters: IAddObisProfileParameters);
|
|
11
|
+
static readonly id = 68;
|
|
12
|
+
static readonly directionType = 1;
|
|
13
|
+
static readonly examples: TCommandExampleList;
|
|
14
|
+
static readonly hasParameters = true;
|
|
15
|
+
static fromBytes(data: Uint8Array): AddObisProfile;
|
|
16
|
+
toBytes(): Uint8Array;
|
|
17
|
+
}
|
|
18
|
+
export default AddObisProfile;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import Command from '../../Command.js';
|
|
2
|
-
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
2
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE, OBIS_PROFILE_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
3
|
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
4
|
import { contentTypes } from '../../constants/index.js';
|
|
5
|
-
const COMMAND_ID =
|
|
6
|
-
const COMMAND_SIZE =
|
|
5
|
+
const COMMAND_ID = 0x44;
|
|
6
|
+
const COMMAND_SIZE = REQUEST_ID_SIZE + 1 + 1 + OBIS_PROFILE_SIZE;
|
|
7
7
|
const examples = [
|
|
8
8
|
{
|
|
9
|
-
name: 'add profile for
|
|
9
|
+
name: 'add OBIS profile for obisId 32 in meter profile 2',
|
|
10
10
|
parameters: {
|
|
11
11
|
requestId: 3,
|
|
12
|
-
|
|
12
|
+
meterProfileId: 2,
|
|
13
|
+
obisId: 32,
|
|
13
14
|
obisProfile: {
|
|
14
15
|
capturePeriod: 244,
|
|
15
16
|
sendingPeriod: 132,
|
|
@@ -22,10 +23,10 @@ const examples = [
|
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
|
-
hex: { header: '
|
|
26
|
+
hex: { header: '44 09', body: '03 02 20 00 f4 00 84 26 04' }
|
|
26
27
|
}
|
|
27
28
|
];
|
|
28
|
-
class
|
|
29
|
+
class AddObisProfile extends Command {
|
|
29
30
|
constructor(parameters) {
|
|
30
31
|
super();
|
|
31
32
|
this.parameters = parameters;
|
|
@@ -33,24 +34,26 @@ class AddShortNameProfile extends Command {
|
|
|
33
34
|
}
|
|
34
35
|
static fromBytes(data) {
|
|
35
36
|
const buffer = new CommandBinaryBuffer(data);
|
|
36
|
-
return new
|
|
37
|
+
return new AddObisProfile({
|
|
37
38
|
requestId: buffer.getUint8(),
|
|
38
|
-
|
|
39
|
+
meterProfileId: buffer.getUint8(),
|
|
40
|
+
obisId: buffer.getUint8(),
|
|
39
41
|
obisProfile: buffer.getObisProfile()
|
|
40
42
|
});
|
|
41
43
|
}
|
|
42
44
|
toBytes() {
|
|
43
45
|
const buffer = new CommandBinaryBuffer(COMMAND_SIZE);
|
|
44
|
-
const { requestId,
|
|
46
|
+
const { requestId, meterProfileId, obisId, obisProfile } = this.parameters;
|
|
45
47
|
buffer.setUint8(requestId);
|
|
46
|
-
buffer.setUint8(
|
|
48
|
+
buffer.setUint8(meterProfileId);
|
|
49
|
+
buffer.setUint8(obisId);
|
|
47
50
|
buffer.setObisProfile(obisProfile);
|
|
48
51
|
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
export default
|
|
56
|
-
//# sourceMappingURL=
|
|
54
|
+
AddObisProfile.id = COMMAND_ID;
|
|
55
|
+
AddObisProfile.directionType = DOWNLINK;
|
|
56
|
+
AddObisProfile.examples = examples;
|
|
57
|
+
AddObisProfile.hasParameters = true;
|
|
58
|
+
export default AddObisProfile;
|
|
59
|
+
//# sourceMappingURL=AddObisProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddObisProfile.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/AddObisProfile.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAoC,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AACvI,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAatD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,eAAe,GAAG,CAAC,GAAG,CAAC,GAAG,iBAAiB,CAAC;AAEjE,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,mDAAmD;QACz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,CAAC;QACxB,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAEnC,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAhCe,iBAAE,GAAG,UAAU,CAAC;AAEhB,4BAAa,GAAG,QAAQ,CAAC;AAEzB,uBAAQ,GAAG,QAAQ,CAAC;AAEpB,4BAAa,GAAG,IAAI,CAAC;AA8BzC,eAAe,cAAc,CAAC"}
|
|
@@ -3,11 +3,11 @@ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
|
3
3
|
declare class GetLorawanInfo extends Command {
|
|
4
4
|
parameters: ICommandParameters;
|
|
5
5
|
constructor(parameters: ICommandParameters);
|
|
6
|
-
static readonly id =
|
|
6
|
+
static readonly id = 19;
|
|
7
7
|
static readonly directionType = 1;
|
|
8
8
|
static readonly examples: TCommandExampleList;
|
|
9
9
|
static readonly hasParameters = true;
|
|
10
|
-
static fromBytes(
|
|
10
|
+
static fromBytes([requestId]: Uint8Array): GetLorawanInfo;
|
|
11
11
|
toBytes(): Uint8Array;
|
|
12
12
|
}
|
|
13
13
|
export default GetLorawanInfo;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import Command from '../../Command.js';
|
|
2
|
-
import
|
|
2
|
+
import { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
3
|
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
-
const COMMAND_ID =
|
|
4
|
+
const COMMAND_ID = 0x13;
|
|
5
5
|
const examples = [
|
|
6
6
|
{
|
|
7
7
|
name: 'simple request',
|
|
8
8
|
parameters: {
|
|
9
9
|
requestId: 8
|
|
10
10
|
},
|
|
11
|
-
hex: { header: '
|
|
11
|
+
hex: { header: '13 01', body: '08' }
|
|
12
12
|
}
|
|
13
13
|
];
|
|
14
14
|
class GetLorawanInfo extends Command {
|
|
@@ -17,18 +17,11 @@ class GetLorawanInfo extends Command {
|
|
|
17
17
|
this.parameters = parameters;
|
|
18
18
|
this.size = REQUEST_ID_SIZE;
|
|
19
19
|
}
|
|
20
|
-
static fromBytes(
|
|
21
|
-
|
|
22
|
-
return new GetLorawanInfo({ requestId: buffer.getUint8() });
|
|
20
|
+
static fromBytes([requestId]) {
|
|
21
|
+
return new GetLorawanInfo({ requestId });
|
|
23
22
|
}
|
|
24
23
|
toBytes() {
|
|
25
|
-
|
|
26
|
-
throw new Error('unknown or invalid size');
|
|
27
|
-
}
|
|
28
|
-
const buffer = new CommandBinaryBuffer(this.size);
|
|
29
|
-
const { requestId } = this.parameters;
|
|
30
|
-
buffer.setUint8(requestId);
|
|
31
|
-
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
24
|
+
return Command.toBytes(COMMAND_ID, new Uint8Array([this.parameters.requestId]));
|
|
32
25
|
}
|
|
33
26
|
}
|
|
34
27
|
GetLorawanInfo.id = COMMAND_ID;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetLorawanInfo.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/GetLorawanInfo.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,
|
|
1
|
+
{"version":3,"file":"GetLorawanInfo.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/GetLorawanInfo.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAqB,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAGvD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;SACf;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC;KACrC;CACJ,CAAC;AAsBF,MAAM,cAAe,SAAQ,OAAO;IAChC,YAAqB,UAA8B;QAC/C,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAoB;QAG/C,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAChC,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,CAAC,SAAS,CAAa;QACtC,OAAO,IAAI,cAAc,CAAC,EAAC,SAAS,EAAC,CAAC,CAAC;IAC3C,CAAC;IAGD,OAAO;QACH,OAAO,OAAO,CAAC,OAAO,CAClB,UAAU,EACV,IAAI,UAAU,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAC9C,CAAC;IACN,CAAC;;AApBe,iBAAE,GAAG,UAAU,CAAC;AAEhB,4BAAa,GAAG,QAAQ,CAAC;AAEzB,uBAAQ,GAAG,QAAQ,CAAC;AAEpB,4BAAa,GAAG,IAAI,CAAC;AAkBzC,eAAe,cAAc,CAAC"}
|
|
@@ -3,11 +3,11 @@ import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
|
3
3
|
declare class GetLorawanState extends Command {
|
|
4
4
|
parameters: ICommandParameters;
|
|
5
5
|
constructor(parameters: ICommandParameters);
|
|
6
|
-
static readonly id =
|
|
6
|
+
static readonly id = 21;
|
|
7
7
|
static readonly directionType = 1;
|
|
8
8
|
static readonly examples: TCommandExampleList;
|
|
9
9
|
static readonly hasParameters = true;
|
|
10
|
-
static fromBytes(
|
|
10
|
+
static fromBytes([requestId]: Uint8Array): GetLorawanState;
|
|
11
11
|
toBytes(): Uint8Array;
|
|
12
12
|
}
|
|
13
13
|
export default GetLorawanState;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import Command from '../../Command.js';
|
|
2
|
-
import
|
|
2
|
+
import { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
3
|
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
-
const COMMAND_ID =
|
|
4
|
+
const COMMAND_ID = 0x15;
|
|
5
5
|
const examples = [
|
|
6
6
|
{
|
|
7
7
|
name: 'simple request',
|
|
8
8
|
parameters: {
|
|
9
9
|
requestId: 8
|
|
10
10
|
},
|
|
11
|
-
hex: { header: '
|
|
11
|
+
hex: { header: '15 01', body: '08' }
|
|
12
12
|
}
|
|
13
13
|
];
|
|
14
14
|
class GetLorawanState extends Command {
|
|
@@ -17,18 +17,11 @@ class GetLorawanState extends Command {
|
|
|
17
17
|
this.parameters = parameters;
|
|
18
18
|
this.size = REQUEST_ID_SIZE;
|
|
19
19
|
}
|
|
20
|
-
static fromBytes(
|
|
21
|
-
|
|
22
|
-
return new GetLorawanState({ requestId: buffer.getUint8() });
|
|
20
|
+
static fromBytes([requestId]) {
|
|
21
|
+
return new GetLorawanState({ requestId });
|
|
23
22
|
}
|
|
24
23
|
toBytes() {
|
|
25
|
-
|
|
26
|
-
throw new Error('unknown or invalid size');
|
|
27
|
-
}
|
|
28
|
-
const buffer = new CommandBinaryBuffer(this.size);
|
|
29
|
-
const { requestId } = this.parameters;
|
|
30
|
-
buffer.setUint8(requestId);
|
|
31
|
-
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
24
|
+
return Command.toBytes(COMMAND_ID, new Uint8Array([this.parameters.requestId]));
|
|
32
25
|
}
|
|
33
26
|
}
|
|
34
27
|
GetLorawanState.id = COMMAND_ID;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetLorawanState.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/GetLorawanState.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,
|
|
1
|
+
{"version":3,"file":"GetLorawanState.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/GetLorawanState.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAqB,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAGvD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;SACf;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC;KACrC;CACJ,CAAC;AAsBF,MAAM,eAAgB,SAAQ,OAAO;IACjC,YAAqB,UAA8B;QAC/C,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAoB;QAG/C,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAChC,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,CAAC,SAAS,CAAa;QACtC,OAAO,IAAI,eAAe,CAAC,EAAC,SAAS,EAAC,CAAC,CAAC;IAC5C,CAAC;IAGD,OAAO;QACH,OAAO,OAAO,CAAC,OAAO,CAClB,UAAU,EACV,IAAI,UAAU,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAC9C,CAAC;IACN,CAAC;;AApBe,kBAAE,GAAG,UAAU,CAAC;AAEhB,6BAAa,GAAG,QAAQ,CAAC;AAEzB,wBAAQ,GAAG,QAAQ,CAAC;AAEpB,6BAAa,GAAG,IAAI,CAAC;AAkBzC,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetMeterArchiveProfileParameters extends ICommandParameters {
|
|
4
|
+
meterProfileId: number;
|
|
5
|
+
}
|
|
6
|
+
declare class GetMeterArchiveProfile extends Command {
|
|
7
|
+
parameters: IGetMeterArchiveProfileParameters;
|
|
8
|
+
constructor(parameters: IGetMeterArchiveProfileParameters);
|
|
9
|
+
static readonly id = 102;
|
|
10
|
+
static readonly directionType = 1;
|
|
11
|
+
static readonly examples: TCommandExampleList;
|
|
12
|
+
static readonly hasParameters = true;
|
|
13
|
+
static fromBytes([requestId, meterProfileId]: Uint8Array): GetMeterArchiveProfile;
|
|
14
|
+
toBytes(): Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
export default GetMeterArchiveProfile;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x66;
|
|
5
|
+
const COMMAND_SIZE = REQUEST_ID_SIZE + 1;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'get meter archive settings from meter profile 4',
|
|
9
|
+
parameters: {
|
|
10
|
+
requestId: 3,
|
|
11
|
+
meterProfileId: 4
|
|
12
|
+
},
|
|
13
|
+
hex: { header: '66 02', body: '03 04' }
|
|
14
|
+
}
|
|
15
|
+
];
|
|
16
|
+
class GetMeterArchiveProfile extends Command {
|
|
17
|
+
constructor(parameters) {
|
|
18
|
+
super();
|
|
19
|
+
this.parameters = parameters;
|
|
20
|
+
this.size = COMMAND_SIZE;
|
|
21
|
+
}
|
|
22
|
+
static fromBytes([requestId, meterProfileId]) {
|
|
23
|
+
return new GetMeterArchiveProfile({ requestId, meterProfileId });
|
|
24
|
+
}
|
|
25
|
+
toBytes() {
|
|
26
|
+
return Command.toBytes(COMMAND_ID, new Uint8Array([this.parameters.requestId, this.parameters.meterProfileId]));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
GetMeterArchiveProfile.id = COMMAND_ID;
|
|
30
|
+
GetMeterArchiveProfile.directionType = DOWNLINK;
|
|
31
|
+
GetMeterArchiveProfile.examples = examples;
|
|
32
|
+
GetMeterArchiveProfile.hasParameters = true;
|
|
33
|
+
export default GetMeterArchiveProfile;
|
|
34
|
+
//# sourceMappingURL=GetMeterArchiveProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetMeterArchiveProfile.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/downlink/GetMeterArchiveProfile.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACjF,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,iDAAiD;QACvD,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,cAAc,EAAE,CAAC;SACpB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC;KACxC;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,CAAC,SAAS,EAAE,cAAc,CAAa;QACtD,OAAO,IAAI,sBAAsB,CAAC,EAAC,SAAS,EAAE,cAAc,EAAC,CAAC,CAAC;IACnE,CAAC;IAGD,OAAO;QACH,OAAO,OAAO,CAAC,OAAO,CAClB,UAAU,EACV,IAAI,UAAU,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAC9E,CAAC;IACN,CAAC;;AApBe,yBAAE,GAAG,UAAU,CAAC;AAEhB,oCAAa,GAAG,QAAQ,CAAC;AAEzB,+BAAQ,GAAG,QAAQ,CAAC;AAEpB,oCAAa,GAAG,IAAI,CAAC;AAkBzC,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetMeterArchiveStateParameters extends ICommandParameters {
|
|
4
|
+
meterId: number;
|
|
5
|
+
archiveType: number;
|
|
6
|
+
}
|
|
7
|
+
declare class GetMeterArchiveState extends Command {
|
|
8
|
+
parameters: IGetMeterArchiveStateParameters;
|
|
9
|
+
constructor(parameters: IGetMeterArchiveStateParameters);
|
|
10
|
+
static readonly id = 124;
|
|
11
|
+
static readonly directionType = 1;
|
|
12
|
+
static readonly examples: TCommandExampleList;
|
|
13
|
+
static readonly hasParameters = true;
|
|
14
|
+
static fromBytes([requestId, meterId, archiveType]: Uint8Array): GetMeterArchiveState;
|
|
15
|
+
toBytes(): Uint8Array;
|
|
16
|
+
}
|
|
17
|
+
export default GetMeterArchiveState;
|