jooby-codec 2.15.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mtx/CommandBinaryBuffer.d.ts +27 -0
- package/dist/mtx/CommandBinaryBuffer.js +55 -0
- package/dist/mtx/CommandBinaryBuffer.js.map +1 -1
- package/dist/mtx/commands/downlink/ActivateRatePlan.d.ts +1 -0
- package/dist/mtx/commands/downlink/ActivateRatePlan.js +1 -0
- package/dist/mtx/commands/downlink/ActivateRatePlan.js.map +1 -1
- package/dist/mtx/commands/downlink/GetDateTime.d.ts +1 -0
- package/dist/mtx/commands/downlink/GetDateTime.js +1 -0
- package/dist/mtx/commands/downlink/GetDateTime.js.map +1 -1
- package/dist/mtx/commands/downlink/GetDeviceId.d.ts +13 -0
- package/dist/mtx/commands/downlink/GetDeviceId.js +31 -0
- package/dist/mtx/commands/downlink/GetDeviceId.js.map +1 -0
- package/dist/mtx/commands/downlink/GetDisplayParam.d.ts +1 -0
- package/dist/mtx/commands/downlink/GetDisplayParam.js +1 -0
- package/dist/mtx/commands/downlink/GetDisplayParam.js.map +1 -1
- package/dist/mtx/commands/downlink/GetOpParams.d.ts +1 -0
- package/dist/mtx/commands/downlink/GetOpParams.js +1 -0
- package/dist/mtx/commands/downlink/GetOpParams.js.map +1 -1
- package/dist/mtx/commands/downlink/GetRatePlanInfo.d.ts +1 -0
- package/dist/mtx/commands/downlink/GetRatePlanInfo.js +1 -0
- package/dist/mtx/commands/downlink/GetRatePlanInfo.js.map +1 -1
- package/dist/mtx/commands/downlink/PrepareRatePlan.d.ts +18 -0
- package/dist/mtx/commands/downlink/PrepareRatePlan.js +47 -0
- package/dist/mtx/commands/downlink/PrepareRatePlan.js.map +1 -0
- package/dist/mtx/commands/downlink/RunTariffPlan.d.ts +17 -0
- package/dist/mtx/commands/downlink/RunTariffPlan.js +39 -0
- package/dist/mtx/commands/downlink/RunTariffPlan.js.map +1 -0
- package/dist/mtx/commands/downlink/SetDayProfile.d.ts +20 -0
- package/dist/mtx/commands/downlink/SetDayProfile.js +92 -0
- package/dist/mtx/commands/downlink/SetDayProfile.js.map +1 -0
- package/dist/mtx/commands/downlink/SetDisplayParam.d.ts +1 -0
- package/dist/mtx/commands/downlink/SetDisplayParam.js +1 -0
- package/dist/mtx/commands/downlink/SetDisplayParam.js.map +1 -1
- package/dist/mtx/commands/downlink/SetOpParams.d.ts +1 -0
- package/dist/mtx/commands/downlink/SetOpParams.js +1 -0
- package/dist/mtx/commands/downlink/SetOpParams.js.map +1 -1
- package/dist/mtx/commands/downlink/SetSeasonProfile.d.ts +19 -0
- package/dist/mtx/commands/downlink/SetSeasonProfile.js +63 -0
- package/dist/mtx/commands/downlink/SetSeasonProfile.js.map +1 -0
- package/dist/mtx/commands/downlink/SetSpecialDay.d.ts +19 -0
- package/dist/mtx/commands/downlink/SetSpecialDay.js +53 -0
- package/dist/mtx/commands/downlink/SetSpecialDay.js.map +1 -0
- package/dist/mtx/commands/downlink/TurnRelayOff.d.ts +1 -0
- package/dist/mtx/commands/downlink/TurnRelayOff.js +1 -0
- package/dist/mtx/commands/downlink/TurnRelayOff.js.map +1 -1
- package/dist/mtx/commands/downlink/TurnRelayOn.d.ts +1 -0
- package/dist/mtx/commands/downlink/TurnRelayOn.js +1 -0
- package/dist/mtx/commands/downlink/TurnRelayOn.js.map +1 -1
- package/dist/mtx/commands/downlink/index.d.ts +6 -0
- package/dist/mtx/commands/downlink/index.js +6 -0
- package/dist/mtx/commands/downlink/index.js.map +1 -1
- package/dist/mtx/commands/uplink/ActivateRatePlanResponse.d.ts +1 -0
- package/dist/mtx/commands/uplink/ActivateRatePlanResponse.js +1 -0
- package/dist/mtx/commands/uplink/ActivateRatePlanResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/ErrorResponse.d.ts +1 -0
- package/dist/mtx/commands/uplink/ErrorResponse.js +1 -0
- package/dist/mtx/commands/uplink/ErrorResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/GetDateTimeResponse.d.ts +1 -0
- package/dist/mtx/commands/uplink/GetDateTimeResponse.js +1 -0
- package/dist/mtx/commands/uplink/GetDateTimeResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/GetDeviceIdResponse.d.ts +17 -0
- package/dist/mtx/commands/uplink/GetDeviceIdResponse.js +44 -0
- package/dist/mtx/commands/uplink/GetDeviceIdResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/GetDisplayParamResponse.d.ts +1 -0
- package/dist/mtx/commands/uplink/GetDisplayParamResponse.js +1 -0
- package/dist/mtx/commands/uplink/GetDisplayParamResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/GetOpParamsResponse.d.ts +1 -0
- package/dist/mtx/commands/uplink/GetOpParamsResponse.js +1 -0
- package/dist/mtx/commands/uplink/GetOpParamsResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/GetRatePlanInfoResponse.d.ts +1 -0
- package/dist/mtx/commands/uplink/GetRatePlanInfoResponse.js +1 -0
- package/dist/mtx/commands/uplink/GetRatePlanInfoResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/PrepareRatePlanResponse.d.ts +13 -0
- package/dist/mtx/commands/uplink/PrepareRatePlanResponse.js +31 -0
- package/dist/mtx/commands/uplink/PrepareRatePlanResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/RunTariffPlanResponse.d.ts +13 -0
- package/dist/mtx/commands/uplink/RunTariffPlanResponse.js +31 -0
- package/dist/mtx/commands/uplink/RunTariffPlanResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/SetDayProfileResponse.d.ts +13 -0
- package/dist/mtx/commands/uplink/SetDayProfileResponse.js +31 -0
- package/dist/mtx/commands/uplink/SetDayProfileResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/SetDisplayParamResponse.d.ts +1 -0
- package/dist/mtx/commands/uplink/SetDisplayParamResponse.js +1 -0
- package/dist/mtx/commands/uplink/SetDisplayParamResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/SetOpParamsResponse.d.ts +1 -0
- package/dist/mtx/commands/uplink/SetOpParamsResponse.js +1 -0
- package/dist/mtx/commands/uplink/SetOpParamsResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/SetSeasonProfileResponse.d.ts +13 -0
- package/dist/mtx/commands/uplink/SetSeasonProfileResponse.js +31 -0
- package/dist/mtx/commands/uplink/SetSeasonProfileResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/SetSpecialDayResponse.d.ts +13 -0
- package/dist/mtx/commands/uplink/SetSpecialDayResponse.js +31 -0
- package/dist/mtx/commands/uplink/SetSpecialDayResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/TurnRelayOffResponse.d.ts +1 -0
- package/dist/mtx/commands/uplink/TurnRelayOffResponse.js +1 -0
- package/dist/mtx/commands/uplink/TurnRelayOffResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/TurnRelayOnResponse.d.ts +1 -0
- package/dist/mtx/commands/uplink/TurnRelayOnResponse.js +1 -0
- package/dist/mtx/commands/uplink/TurnRelayOnResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/index.d.ts +6 -0
- package/dist/mtx/commands/uplink/index.js +6 -0
- package/dist/mtx/commands/uplink/index.js.map +1 -1
- package/dist/mtx/message.d.ts +2 -2
- package/dist/obis-observer/Command.js +1 -1
- package/dist/obis-observer/Command.js.map +1 -1
- package/dist/obis-observer/CommandBinaryBuffer.d.ts +9 -9
- package/dist/obis-observer/CommandBinaryBuffer.js +20 -20
- package/dist/obis-observer/CommandBinaryBuffer.js.map +1 -1
- package/dist/obis-observer/commands/downlink/GetArchiveState.d.ts +4 -3
- package/dist/obis-observer/commands/downlink/GetArchiveState.js +23 -16
- package/dist/obis-observer/commands/downlink/GetArchiveState.js.map +1 -1
- 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/GetMeterDate.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/GetMeterDate.js +34 -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/GetMeterId.js +41 -0
- 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 +34 -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 +34 -0
- package/dist/obis-observer/commands/downlink/GetMeterInfo.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetMeterProfile.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/GetMeterProfile.js +35 -0
- package/dist/obis-observer/commands/downlink/GetMeterProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/GetMeterProfileIdList.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/GetMeterProfileIdList.js +34 -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 +34 -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 -9
- 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 +35 -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/GetObisIdList.js +35 -0
- 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 +35 -0
- package/dist/obis-observer/commands/downlink/GetObisInfo.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/{GetDate.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/{GetDeviceInfo.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 +18 -0
- package/dist/obis-observer/commands/downlink/ReadMeterArchive.js +48 -0
- package/dist/obis-observer/commands/downlink/ReadMeterArchive.js.map +1 -0
- package/dist/obis-observer/commands/downlink/ReadMeterArchiveWithDate.d.ts +20 -0
- package/dist/obis-observer/commands/downlink/ReadMeterArchiveWithDate.js +51 -0
- package/dist/obis-observer/commands/downlink/ReadMeterArchiveWithDate.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 +35 -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 +35 -0
- package/dist/obis-observer/commands/downlink/RemoveMeterProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/RemoveObis.d.ts +17 -0
- package/dist/obis-observer/commands/downlink/RemoveObis.js +36 -0
- package/dist/obis-observer/commands/downlink/RemoveObis.js.map +1 -0
- package/dist/obis-observer/commands/downlink/SetLorawanActivationMethod.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/SetLorawanActivationMethod.js +35 -0
- package/dist/obis-observer/commands/downlink/SetLorawanActivationMethod.js.map +1 -0
- package/dist/obis-observer/commands/downlink/SetObserverSingleMode.d.ts +16 -0
- package/dist/obis-observer/commands/downlink/SetObserverSingleMode.js +35 -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 +82 -0
- package/dist/obis-observer/commands/downlink/SetupMeter.js.map +1 -0
- package/dist/obis-observer/commands/downlink/SetupMeterProfile.d.ts +18 -0
- package/dist/obis-observer/commands/downlink/SetupMeterProfile.js +48 -0
- package/dist/obis-observer/commands/downlink/SetupMeterProfile.js.map +1 -0
- package/dist/obis-observer/commands/downlink/SetupObis.d.ts +19 -0
- package/dist/obis-observer/commands/downlink/SetupObis.js +85 -0
- package/dist/obis-observer/commands/downlink/SetupObis.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 -9
- 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 +25 -14
- package/dist/obis-observer/commands/downlink/index.js +25 -14
- package/dist/obis-observer/commands/downlink/index.js.map +1 -1
- package/dist/obis-observer/commands/uplink/ErrorResponse.d.ts +16 -0
- package/dist/obis-observer/commands/uplink/ErrorResponse.js +36 -0
- package/dist/obis-observer/commands/uplink/ErrorResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetArchiveStateResponse.d.ts +3 -3
- package/dist/obis-observer/commands/uplink/GetArchiveStateResponse.js +36 -14
- package/dist/obis-observer/commands/uplink/GetArchiveStateResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/GetLorawanInfoResponse.d.ts +1 -1
- package/dist/obis-observer/commands/uplink/GetLorawanInfoResponse.js +3 -6
- 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/{GetDateResponse.d.ts → GetMeterDateResponse.d.ts} +7 -8
- package/dist/obis-observer/commands/uplink/GetMeterDateResponse.js +38 -0
- package/dist/obis-observer/commands/uplink/GetMeterDateResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetMeterIdListResponse.d.ts +17 -0
- package/dist/obis-observer/commands/uplink/GetMeterIdListResponse.js +45 -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 +35 -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 +83 -0
- package/dist/obis-observer/commands/uplink/GetMeterInfoResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetMeterProfileIdListResponse.d.ts +17 -0
- package/dist/obis-observer/commands/uplink/GetMeterProfileIdListResponse.js +45 -0
- package/dist/obis-observer/commands/uplink/GetMeterProfileIdListResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetMeterProfileResponse.d.ts +17 -0
- package/dist/obis-observer/commands/uplink/GetMeterProfileResponse.js +45 -0
- package/dist/obis-observer/commands/uplink/GetMeterProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/{GetReadoutStateResponse.d.ts → GetMeterReadoutStateResponse.d.ts} +7 -7
- package/dist/obis-observer/commands/uplink/GetMeterReadoutStateResponse.js +104 -0
- 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/GetObisContentByIdResponse.js +51 -0
- 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 -17
- 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 -10
- package/dist/obis-observer/commands/uplink/GetObisContentResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/GetObisIdListResponse.d.ts +17 -0
- package/dist/obis-observer/commands/uplink/GetObisIdListResponse.js +54 -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/GetObisInfoResponse.js +92 -0
- package/dist/obis-observer/commands/uplink/GetObisInfoResponse.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/GetObserverInfoResponse.d.ts +19 -0
- package/dist/obis-observer/commands/uplink/{GetDeviceInfoResponse.js → GetObserverInfoResponse.js} +20 -19
- 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 +41 -0
- package/dist/obis-observer/commands/uplink/GetObserverUptimeResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/ObservationReport.d.ts +4 -3
- package/dist/obis-observer/commands/uplink/ObservationReport.js +16 -19
- package/dist/obis-observer/commands/uplink/ObservationReport.js.map +1 -1
- package/dist/obis-observer/commands/uplink/ObservationReportString.d.ts +4 -3
- package/dist/obis-observer/commands/uplink/ObservationReportString.js +17 -20
- package/dist/obis-observer/commands/uplink/ObservationReportString.js.map +1 -1
- package/dist/obis-observer/commands/uplink/ReadMeterArchiveResponse.d.ts +22 -0
- package/dist/obis-observer/commands/uplink/ReadMeterArchiveResponse.js +102 -0
- package/dist/obis-observer/commands/uplink/ReadMeterArchiveResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/ReadMeterArchiveWithDateResponse.d.ts +17 -0
- package/dist/obis-observer/commands/uplink/ReadMeterArchiveWithDateResponse.js +69 -0
- package/dist/obis-observer/commands/uplink/ReadMeterArchiveWithDateResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/RebootResponse.d.ts +2 -2
- package/dist/obis-observer/commands/uplink/RebootResponse.js +8 -11
- package/dist/obis-observer/commands/uplink/RebootResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/RemoveMeterProfileResponse.d.ts +13 -0
- package/dist/obis-observer/commands/uplink/RemoveMeterProfileResponse.js +33 -0
- package/dist/obis-observer/commands/uplink/RemoveMeterProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/RemoveMeterResponse.d.ts +13 -0
- package/dist/obis-observer/commands/uplink/RemoveMeterResponse.js +33 -0
- package/dist/obis-observer/commands/uplink/RemoveMeterResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/RemoveObisResponse.d.ts +13 -0
- package/dist/obis-observer/commands/uplink/RemoveObisResponse.js +33 -0
- package/dist/obis-observer/commands/uplink/RemoveObisResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetLorawanActivationMethodResponse.d.ts +13 -0
- package/dist/obis-observer/commands/uplink/SetLorawanActivationMethodResponse.js +33 -0
- package/dist/obis-observer/commands/uplink/SetLorawanActivationMethodResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetObserverSingleModeResponse.d.ts +13 -0
- package/dist/obis-observer/commands/uplink/SetObserverSingleModeResponse.js +33 -0
- package/dist/obis-observer/commands/uplink/SetObserverSingleModeResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetSerialPortResponse.d.ts +4 -7
- package/dist/obis-observer/commands/uplink/SetSerialPortResponse.js +8 -26
- package/dist/obis-observer/commands/uplink/SetSerialPortResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/SetupMeterProfileResponse.d.ts +13 -0
- package/dist/obis-observer/commands/uplink/SetupMeterProfileResponse.js +33 -0
- package/dist/obis-observer/commands/uplink/SetupMeterProfileResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetupMeterResponse.d.ts +13 -0
- package/dist/obis-observer/commands/uplink/SetupMeterResponse.js +33 -0
- package/dist/obis-observer/commands/uplink/SetupMeterResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/SetupObisResponse.d.ts +13 -0
- package/dist/obis-observer/commands/uplink/SetupObisResponse.js +33 -0
- package/dist/obis-observer/commands/uplink/SetupObisResponse.js.map +1 -0
- package/dist/obis-observer/commands/uplink/UpdateImageVerifyResponse.d.ts +3 -3
- package/dist/obis-observer/commands/uplink/UpdateImageVerifyResponse.js +10 -18
- package/dist/obis-observer/commands/uplink/UpdateImageVerifyResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/UpdateImageWriteResponse.d.ts +4 -7
- package/dist/obis-observer/commands/uplink/UpdateImageWriteResponse.js +9 -19
- package/dist/obis-observer/commands/uplink/UpdateImageWriteResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/UpdateRunResponse.d.ts +4 -7
- package/dist/obis-observer/commands/uplink/UpdateRunResponse.js +9 -19
- package/dist/obis-observer/commands/uplink/UpdateRunResponse.js.map +1 -1
- package/dist/obis-observer/commands/uplink/index.d.ts +27 -15
- package/dist/obis-observer/commands/uplink/index.js +27 -15
- package/dist/obis-observer/commands/uplink/index.js.map +1 -1
- package/dist/obis-observer/constants/commandRelations.js +29 -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/constants/resultCodes.d.ts +12 -4
- package/dist/obis-observer/constants/resultCodes.js +12 -4
- package/dist/obis-observer/constants/resultCodes.js.map +1 -1
- package/dist/obis-observer/constants/resultDescriptions.d.ts +16 -0
- package/dist/obis-observer/constants/resultDescriptions.js +17 -0
- package/dist/obis-observer/constants/resultDescriptions.js.map +1 -0
- package/dist/obis-observer/message.d.ts +2 -2
- package/dist/obis-observer/message.js +4 -12
- package/dist/obis-observer/message.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 +0 -56
- 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/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 +0 -44
- 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 +0 -48
- 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 +0 -51
- 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.d.ts +0 -17
- package/dist/obis-observer/commands/uplink/GetArchiveProfileResponse.js +0 -45
- package/dist/obis-observer/commands/uplink/GetArchiveProfileResponse.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 +0 -44
- 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.js +0 -47
- package/dist/obis-observer/commands/uplink/GetDateResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetDeviceInfoResponse.d.ts +0 -18
- package/dist/obis-observer/commands/uplink/GetDeviceInfoResponse.js.map +0 -1
- package/dist/obis-observer/commands/uplink/GetReadoutStateResponse.js +0 -77
- 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 +0 -81
- 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 +0 -55
- 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 +0 -61
- 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
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import roundNumber from '../../../utils/roundNumber.js';
|
|
2
|
+
import Command from '../../Command.js';
|
|
3
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
4
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
5
|
+
const COMMAND_ID = 0x51;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'response to GetObisContentById',
|
|
9
|
+
parameters: {
|
|
10
|
+
requestId: 121,
|
|
11
|
+
content: 344.23
|
|
12
|
+
},
|
|
13
|
+
hex: { header: '51 05', body: '79 43 ac 1d 71' }
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'response to GetObisContentById without content',
|
|
17
|
+
parameters: {
|
|
18
|
+
requestId: 122
|
|
19
|
+
},
|
|
20
|
+
hex: { header: '51 01', body: '7a' }
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
class GetObisContentByIdResponse extends Command {
|
|
24
|
+
constructor(parameters) {
|
|
25
|
+
super();
|
|
26
|
+
this.parameters = parameters;
|
|
27
|
+
this.size = REQUEST_ID_SIZE + (parameters.content ? 4 : 0);
|
|
28
|
+
}
|
|
29
|
+
static fromBytes(data) {
|
|
30
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
31
|
+
const requestId = buffer.getUint8();
|
|
32
|
+
return buffer.isEmpty
|
|
33
|
+
? new GetObisContentByIdResponse({ requestId })
|
|
34
|
+
: new GetObisContentByIdResponse({ requestId, content: roundNumber(buffer.getFloat32()) });
|
|
35
|
+
}
|
|
36
|
+
toBytes() {
|
|
37
|
+
const buffer = new CommandBinaryBuffer(this.size);
|
|
38
|
+
const { requestId, content } = this.parameters;
|
|
39
|
+
buffer.setUint8(requestId);
|
|
40
|
+
if (content) {
|
|
41
|
+
buffer.setFloat32(roundNumber(content));
|
|
42
|
+
}
|
|
43
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
GetObisContentByIdResponse.id = COMMAND_ID;
|
|
47
|
+
GetObisContentByIdResponse.directionType = UPLINK;
|
|
48
|
+
GetObisContentByIdResponse.examples = examples;
|
|
49
|
+
GetObisContentByIdResponse.hasParameters = true;
|
|
50
|
+
export default GetObisContentByIdResponse;
|
|
51
|
+
//# sourceMappingURL=GetObisContentByIdResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetObisContentByIdResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObisContentByIdResponse.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAWrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,gCAAgC;QACtC,UAAU,EAAE;YACR,SAAS,EAAE,GAAG;YACd,OAAO,EAAE,MAAM;SAClB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EA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CAAC;;AA/Be,6BAAE,GAAG,UAAU,CAAC;AAEhB,wCAAa,GAAG,MAAM,CAAC;AAEvB,mCAAQ,GAAG,QAAQ,CAAC;AAEpB,wCAAa,GAAG,IAAI,CAAC;AA6BzC,eAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetObisContentByIdStringResponseParameters extends ICommandParameters {
|
|
4
|
+
content: string;
|
|
5
|
+
}
|
|
6
|
+
declare class GetObisContentByIdStringResponse extends Command {
|
|
7
|
+
parameters: IGetObisContentByIdStringResponseParameters;
|
|
8
|
+
constructor(parameters: IGetObisContentByIdStringResponseParameters);
|
|
9
|
+
static readonly id = 82;
|
|
10
|
+
static readonly directionType = 2;
|
|
11
|
+
static readonly examples: TCommandExampleList;
|
|
12
|
+
static readonly hasParameters = true;
|
|
13
|
+
static fromBytes(data: Uint8Array): GetObisContentByIdStringResponse;
|
|
14
|
+
toBytes(): Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
export default GetObisContentByIdStringResponse;
|
|
@@ -1,45 +1,40 @@
|
|
|
1
1
|
import Command from '../../Command.js';
|
|
2
2
|
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
3
|
import { UPLINK } from '../../constants/directions.js';
|
|
4
|
-
const COMMAND_ID =
|
|
4
|
+
const COMMAND_ID = 0x52;
|
|
5
5
|
const examples = [
|
|
6
6
|
{
|
|
7
|
-
name: '
|
|
7
|
+
name: 'response to GetObisContentById with string result',
|
|
8
8
|
parameters: {
|
|
9
9
|
requestId: 121,
|
|
10
10
|
content: 'Total energy'
|
|
11
11
|
},
|
|
12
|
-
hex: { header: '
|
|
12
|
+
hex: { header: '52 0e', body: '79 0c 54 6f 74 61 6c 20 65 6e 65 72 67 79' }
|
|
13
13
|
}
|
|
14
14
|
];
|
|
15
|
-
class
|
|
15
|
+
class GetObisContentByIdStringResponse extends Command {
|
|
16
16
|
constructor(parameters) {
|
|
17
17
|
super();
|
|
18
18
|
this.parameters = parameters;
|
|
19
|
-
this.size = REQUEST_ID_SIZE +
|
|
19
|
+
this.size = REQUEST_ID_SIZE + this.parameters.content.length + 1;
|
|
20
20
|
}
|
|
21
21
|
static fromBytes(data) {
|
|
22
22
|
const buffer = new CommandBinaryBuffer(data);
|
|
23
|
-
buffer.seek(buffer.offset + 1);
|
|
24
23
|
const requestId = buffer.getUint8();
|
|
25
24
|
const content = buffer.getString();
|
|
26
|
-
return new
|
|
25
|
+
return new GetObisContentByIdStringResponse({ requestId, content });
|
|
27
26
|
}
|
|
28
27
|
toBytes() {
|
|
29
|
-
if (typeof this.size !== 'number') {
|
|
30
|
-
throw new Error('unknown or invalid size');
|
|
31
|
-
}
|
|
32
28
|
const buffer = new CommandBinaryBuffer(this.size);
|
|
33
29
|
const { requestId, content } = this.parameters;
|
|
34
|
-
buffer.setUint8(this.size - 1);
|
|
35
30
|
buffer.setUint8(requestId);
|
|
36
31
|
buffer.setString(content);
|
|
37
32
|
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
38
33
|
}
|
|
39
34
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
export default
|
|
45
|
-
//# sourceMappingURL=
|
|
35
|
+
GetObisContentByIdStringResponse.id = COMMAND_ID;
|
|
36
|
+
GetObisContentByIdStringResponse.directionType = UPLINK;
|
|
37
|
+
GetObisContentByIdStringResponse.examples = examples;
|
|
38
|
+
GetObisContentByIdStringResponse.hasParameters = true;
|
|
39
|
+
export default GetObisContentByIdStringResponse;
|
|
40
|
+
//# sourceMappingURL=GetObisContentByIdStringResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetObisContentByIdStringResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObisContentByIdString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AO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AA3Be,mCAAE,GAAG,UAAU,CAAC;AAEhB,8CAAa,GAAG,MAAM,CAAC;AAEvB,yCAAQ,GAAG,QAAQ,CAAC;AAEpB,8CAAa,GAAG,IAAI,CAAC;AAyBzC,eAAe,gCAAgC,CAAC"}
|
|
@@ -6,7 +6,7 @@ interface IGetContentByObisResponseParameters extends ICommandParameters {
|
|
|
6
6
|
declare class GetContentByObisResponse extends Command {
|
|
7
7
|
parameters: IGetContentByObisResponseParameters;
|
|
8
8
|
constructor(parameters: IGetContentByObisResponseParameters);
|
|
9
|
-
static readonly id =
|
|
9
|
+
static readonly id = 79;
|
|
10
10
|
static readonly directionType = 2;
|
|
11
11
|
static readonly examples: TCommandExampleList;
|
|
12
12
|
static readonly hasParameters = true;
|
package/dist/obis-observer/commands/uplink/{GetContentByObisResponse.js → GetObisContentResponse.js}
RENAMED
|
@@ -1,37 +1,32 @@
|
|
|
1
1
|
import Command from '../../Command.js';
|
|
2
2
|
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
3
|
import { UPLINK } from '../../constants/directions.js';
|
|
4
|
-
const COMMAND_ID =
|
|
4
|
+
const COMMAND_ID = 0x4f;
|
|
5
5
|
const examples = [
|
|
6
6
|
{
|
|
7
|
-
name: '
|
|
7
|
+
name: 'response to GetObisContent',
|
|
8
8
|
parameters: {
|
|
9
9
|
requestId: 2,
|
|
10
10
|
content: '57906635'
|
|
11
11
|
},
|
|
12
|
-
hex: { header: '
|
|
12
|
+
hex: { header: '4f 0a', body: '02 08 35 37 39 30 36 36 33 35' }
|
|
13
13
|
}
|
|
14
14
|
];
|
|
15
15
|
class GetContentByObisResponse extends Command {
|
|
16
16
|
constructor(parameters) {
|
|
17
17
|
super();
|
|
18
18
|
this.parameters = parameters;
|
|
19
|
-
this.size = REQUEST_ID_SIZE + 1 +
|
|
19
|
+
this.size = REQUEST_ID_SIZE + 1 + this.parameters.content.length;
|
|
20
20
|
}
|
|
21
21
|
static fromBytes(data) {
|
|
22
22
|
const buffer = new CommandBinaryBuffer(data);
|
|
23
|
-
buffer.seek(buffer.offset + 1);
|
|
24
23
|
const requestId = buffer.getUint8();
|
|
25
24
|
const content = buffer.getString();
|
|
26
25
|
return new GetContentByObisResponse({ requestId, content });
|
|
27
26
|
}
|
|
28
27
|
toBytes() {
|
|
29
|
-
if (typeof this.size !== 'number') {
|
|
30
|
-
throw new Error('unknown or invalid size');
|
|
31
|
-
}
|
|
32
28
|
const buffer = new CommandBinaryBuffer(this.size);
|
|
33
29
|
const { requestId, content } = this.parameters;
|
|
34
|
-
buffer.setUint8(this.size - 1);
|
|
35
30
|
buffer.setUint8(requestId);
|
|
36
31
|
buffer.setString(content);
|
|
37
32
|
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
@@ -42,4 +37,4 @@ GetContentByObisResponse.directionType = UPLINK;
|
|
|
42
37
|
GetContentByObisResponse.examples = examples;
|
|
43
38
|
GetContentByObisResponse.hasParameters = true;
|
|
44
39
|
export default GetContentByObisResponse;
|
|
45
|
-
//# sourceMappingURL=
|
|
40
|
+
//# sourceMappingURL=GetObisContentResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetObisContentResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObisContentResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAqB,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAWrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,4BAA4B;QAClC,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,OAAO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2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetObisIdListResponseParameters extends ICommandParameters {
|
|
4
|
+
isCompleted: boolean;
|
|
5
|
+
obisIdList: Array<number>;
|
|
6
|
+
}
|
|
7
|
+
declare class GetObisIdListResponse extends Command {
|
|
8
|
+
parameters: IGetObisIdListResponseParameters;
|
|
9
|
+
constructor(parameters: IGetObisIdListResponseParameters);
|
|
10
|
+
static readonly id = 65;
|
|
11
|
+
static readonly directionType = 2;
|
|
12
|
+
static readonly examples: TCommandExampleList;
|
|
13
|
+
static readonly hasParameters = true;
|
|
14
|
+
static fromBytes(data: Uint8Array): GetObisIdListResponse;
|
|
15
|
+
toBytes(): Uint8Array;
|
|
16
|
+
}
|
|
17
|
+
export default GetObisIdListResponse;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x41;
|
|
5
|
+
const examples = [
|
|
6
|
+
{
|
|
7
|
+
name: 'response to GetObisIdList with two elements',
|
|
8
|
+
parameters: {
|
|
9
|
+
requestId: 3,
|
|
10
|
+
isCompleted: true,
|
|
11
|
+
obisIdList: [197, 198]
|
|
12
|
+
},
|
|
13
|
+
hex: { header: '41 04', body: '03 01 c5 c6' }
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'response to GetObisIdList without elements',
|
|
17
|
+
parameters: {
|
|
18
|
+
requestId: 3,
|
|
19
|
+
isCompleted: true,
|
|
20
|
+
obisIdList: []
|
|
21
|
+
},
|
|
22
|
+
hex: { header: '41 02', body: '03 01' }
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
class GetObisIdListResponse extends Command {
|
|
26
|
+
constructor(parameters) {
|
|
27
|
+
super();
|
|
28
|
+
this.parameters = parameters;
|
|
29
|
+
this.size = REQUEST_ID_SIZE + 1 + parameters.obisIdList.length;
|
|
30
|
+
}
|
|
31
|
+
static fromBytes(data) {
|
|
32
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
33
|
+
const requestId = buffer.getUint8();
|
|
34
|
+
const isCompleted = buffer.isEmpty ? 1 : buffer.getUint8();
|
|
35
|
+
const obisIdList = buffer.isEmpty
|
|
36
|
+
? []
|
|
37
|
+
: [...new Array(buffer.bytesLeft)].map(() => buffer.getUint8());
|
|
38
|
+
return new GetObisIdListResponse({ requestId, isCompleted: isCompleted !== 0, obisIdList });
|
|
39
|
+
}
|
|
40
|
+
toBytes() {
|
|
41
|
+
const buffer = new CommandBinaryBuffer(this.size);
|
|
42
|
+
const { requestId, isCompleted, obisIdList } = this.parameters;
|
|
43
|
+
buffer.setUint8(requestId);
|
|
44
|
+
buffer.setUint8(isCompleted ? 1 : 0);
|
|
45
|
+
obisIdList.forEach(obisId => buffer.setUint8(obisId));
|
|
46
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
GetObisIdListResponse.id = COMMAND_ID;
|
|
50
|
+
GetObisIdListResponse.directionType = UPLINK;
|
|
51
|
+
GetObisIdListResponse.examples = examples;
|
|
52
|
+
GetObisIdListResponse.hasParameters = true;
|
|
53
|
+
export default GetObisIdListResponse;
|
|
54
|
+
//# sourceMappingURL=GetObisIdListResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetObisIdListResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObisIdListResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAWrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAEx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AAE,WAAW,KAAK,CAAC,EAAE,UAAU,EAAC,CAAC,CAAC;IAC9F,CAAC;IAGD,OAAO;QACH,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAc,CAAC,CAAC;QAC5D,MAAM,EAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAE7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QAEtD,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AA/Be,wBAAE,GAAG,UAAU,CAAC;AAEhB,mCAAa,GAAG,MAAM,CAAC;AAEvB,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, IObisProfile, IObis } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetObisInfoResponseParameters extends ICommandParameters {
|
|
4
|
+
obis?: IObis;
|
|
5
|
+
obisProfile?: IObisProfile;
|
|
6
|
+
}
|
|
7
|
+
declare class GetObisInfoResponse extends Command {
|
|
8
|
+
parameters: IGetObisInfoResponseParameters;
|
|
9
|
+
constructor(parameters: IGetObisInfoResponseParameters);
|
|
10
|
+
static readonly id = 71;
|
|
11
|
+
static readonly directionType = 2;
|
|
12
|
+
static readonly examples: TCommandExampleList;
|
|
13
|
+
static readonly hasParameters = true;
|
|
14
|
+
static fromBytes(data: Uint8Array): GetObisInfoResponse;
|
|
15
|
+
toBytes(): Uint8Array;
|
|
16
|
+
}
|
|
17
|
+
export default GetObisInfoResponse;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { REQUEST_ID_SIZE, OBIS_PROFILE_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
4
|
+
import { contentTypes } from '../../constants/index.js';
|
|
5
|
+
const COMMAND_ID = 0x47;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'response to GetObisInfo with obis code 0.9.1 and obis profile',
|
|
9
|
+
parameters: {
|
|
10
|
+
requestId: 3,
|
|
11
|
+
obis: {
|
|
12
|
+
c: 0,
|
|
13
|
+
d: 9,
|
|
14
|
+
e: 1
|
|
15
|
+
},
|
|
16
|
+
obisProfile: {
|
|
17
|
+
capturePeriod: 344,
|
|
18
|
+
sendingPeriod: 532,
|
|
19
|
+
sendingCounter: 61,
|
|
20
|
+
flags: {
|
|
21
|
+
contentType: contentTypes.STRING,
|
|
22
|
+
sendOnChange: true,
|
|
23
|
+
archive1: true,
|
|
24
|
+
archive2: false
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
hex: { header: '47 0b', body: '03 02 00 09 01 01 58 02 14 3d 15' }
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'response to GetObisInfo with obis code 0.9.1 without obis profile',
|
|
32
|
+
parameters: {
|
|
33
|
+
requestId: 3,
|
|
34
|
+
obis: {
|
|
35
|
+
c: 0,
|
|
36
|
+
d: 9,
|
|
37
|
+
e: 1
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
hex: { header: '47 05', body: '03 02 00 09 01' }
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'response to GetObisInfo without data',
|
|
44
|
+
parameters: {
|
|
45
|
+
requestId: 3
|
|
46
|
+
},
|
|
47
|
+
hex: { header: '47 01', body: '03' }
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
class GetObisInfoResponse extends Command {
|
|
51
|
+
constructor(parameters) {
|
|
52
|
+
super();
|
|
53
|
+
this.parameters = parameters;
|
|
54
|
+
let size = REQUEST_ID_SIZE;
|
|
55
|
+
if (parameters.obis) {
|
|
56
|
+
size += CommandBinaryBuffer.getObisSize(parameters.obis);
|
|
57
|
+
if (parameters.obisProfile) {
|
|
58
|
+
size += OBIS_PROFILE_SIZE;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
this.size = size;
|
|
62
|
+
}
|
|
63
|
+
static fromBytes(data) {
|
|
64
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
65
|
+
const requestId = buffer.getUint8();
|
|
66
|
+
if (buffer.isEmpty) {
|
|
67
|
+
return new GetObisInfoResponse({ requestId });
|
|
68
|
+
}
|
|
69
|
+
const obis = buffer.getObis();
|
|
70
|
+
return buffer.isEmpty
|
|
71
|
+
? new GetObisInfoResponse({ requestId, obis })
|
|
72
|
+
: new GetObisInfoResponse({ requestId, obis, obisProfile: buffer.getObisProfile() });
|
|
73
|
+
}
|
|
74
|
+
toBytes() {
|
|
75
|
+
const buffer = new CommandBinaryBuffer(this.size);
|
|
76
|
+
const { requestId, obis, obisProfile } = this.parameters;
|
|
77
|
+
buffer.setUint8(requestId);
|
|
78
|
+
if (obis) {
|
|
79
|
+
buffer.setObis(obis);
|
|
80
|
+
if (obisProfile) {
|
|
81
|
+
buffer.setObisProfile(obisProfile);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
GetObisInfoResponse.id = COMMAND_ID;
|
|
88
|
+
GetObisInfoResponse.directionType = UPLINK;
|
|
89
|
+
GetObisInfoResponse.examples = examples;
|
|
90
|
+
GetObisInfoResponse.hasParameters = true;
|
|
91
|
+
export default GetObisInfoResponse;
|
|
92
|
+
//# sourceMappingURL=GetObisInfoResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetObisInfoResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObisInfoResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAAE,iBAAiB,EAA0C,MAAM,8BAA8B,CAAC;AAC9I,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAWtD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,+DAA+D;QACrE,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,IAAI,EAAE;gBACF,CAAC,EAAE,CAAC;gBACJ,CAAC,EAAE,CAAC;gBACJ,CAAC,EAAE,CAAC;aACP;YACD,WAAW,EAAE;gBACT,aAAa,EAAE,GAAG;gBAClB,aAAa,EAAE,GAAG;gBAClB,cAAc,EAAE,EAAE;gBAClB,KAAK,EAAE;oBACH,WAAW,EAAE,YAAY,CAAC,MAAM;oBAChC,YAAY,EAAE,IAAI;oBAClB,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,KAAK;iBAClB;aACJ;SACJ;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,kCAAkC,EAAC;KACnE;IACD;QACI,IAAI,EAAE,mEAAmE;QACzE,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,OAAO,EAAE,IAAI,EAAE,gBAA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,MAAM,EAAC,SAAS,EAAE,IAAI,EAAE,WAAW,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAEvD,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAE3B,IAAK,IAAI,EAAG;YACR,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAErB,IAAK,WAAW,EAAG;gBACf,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;aACtC;SACJ;QAED,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAzCe,sBAAE,GAAG,UAAU,CAAC;AAEhB,iCAAa,GAAG,MAAM,CAAC;AAEvB,4BAAQ,GAAG,QAAQ,CAAC;AAEpB,iCAAa,GAAG,IAAI,CAAC;AAuCzC,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetObserverCapabilitiesResponseParameters extends ICommandParameters {
|
|
4
|
+
maxMeterProfilesNumber: number;
|
|
5
|
+
maxMetersNumber: number;
|
|
6
|
+
maxObisProfilesNumber: number;
|
|
7
|
+
isMultiModeSupported: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare class GetObserverCapabilitiesResponse extends Command {
|
|
10
|
+
parameters: IGetObserverCapabilitiesResponseParameters;
|
|
11
|
+
constructor(parameters: IGetObserverCapabilitiesResponseParameters);
|
|
12
|
+
static readonly id = 4;
|
|
13
|
+
static readonly directionType = 2;
|
|
14
|
+
static readonly examples: TCommandExampleList;
|
|
15
|
+
static readonly hasParameters = true;
|
|
16
|
+
static fromBytes(data: Uint8Array): GetObserverCapabilitiesResponse;
|
|
17
|
+
toBytes(): Uint8Array;
|
|
18
|
+
}
|
|
19
|
+
export default GetObserverCapabilitiesResponse;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x04;
|
|
5
|
+
const examples = [
|
|
6
|
+
{
|
|
7
|
+
name: 'response to GetObserverCapabilities',
|
|
8
|
+
parameters: {
|
|
9
|
+
requestId: 7,
|
|
10
|
+
maxMeterProfilesNumber: 8,
|
|
11
|
+
maxMetersNumber: 8,
|
|
12
|
+
maxObisProfilesNumber: 255,
|
|
13
|
+
isMultiModeSupported: true
|
|
14
|
+
},
|
|
15
|
+
hex: {
|
|
16
|
+
header: '04 05',
|
|
17
|
+
body: '07 08 08 ff 01'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
class GetObserverCapabilitiesResponse extends Command {
|
|
22
|
+
constructor(parameters) {
|
|
23
|
+
super();
|
|
24
|
+
this.parameters = parameters;
|
|
25
|
+
this.size = REQUEST_ID_SIZE + 4;
|
|
26
|
+
}
|
|
27
|
+
static fromBytes(data) {
|
|
28
|
+
const [requestId, maxMeterProfilesNumber, maxMetersNumber, maxObisProfilesNumber, isMultiModeSupported] = data;
|
|
29
|
+
return new GetObserverCapabilitiesResponse({
|
|
30
|
+
requestId,
|
|
31
|
+
maxMeterProfilesNumber,
|
|
32
|
+
maxMetersNumber,
|
|
33
|
+
maxObisProfilesNumber,
|
|
34
|
+
isMultiModeSupported: isMultiModeSupported !== 0
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
toBytes() {
|
|
38
|
+
const { parameters } = this;
|
|
39
|
+
return Command.toBytes(COMMAND_ID, new Uint8Array([
|
|
40
|
+
parameters.requestId,
|
|
41
|
+
parameters.maxMeterProfilesNumber,
|
|
42
|
+
parameters.maxMetersNumber,
|
|
43
|
+
parameters.maxObisProfilesNumber,
|
|
44
|
+
parameters.isMultiModeSupported ? 1 : 0
|
|
45
|
+
]));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
GetObserverCapabilitiesResponse.id = COMMAND_ID;
|
|
49
|
+
GetObserverCapabilitiesResponse.directionType = UPLINK;
|
|
50
|
+
GetObserverCapabilitiesResponse.examples = examples;
|
|
51
|
+
GetObserverCapabilitiesResponse.hasParameters = true;
|
|
52
|
+
export default GetObserverCapabilitiesResponse;
|
|
53
|
+
//# sourceMappingURL=GetObserverCapabilitiesResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetObserverCapabilitiesResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObserverCapabilitiesResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAcrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,qCAAqC;QAC3C,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,sBAAsB,EAAE,CAAC;YACzB,eAAe,EAAE,CAAC;YAClB,qBAAqB,EAAE,GAAG;YAC1B,oBAAoB,EAAE,IAAI;SAC7B;QACD,GAAG,EAAE;YACD,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,gBAAgB;SACzB;KACJ;CACJ,CAAC;AA4BF,MAAM,+BAAgC,SAAQ,OAAO;IACjD,YAAqB,UAAsD;QACvE,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAA4C;QAIvE,IAAI,CAAC,IAAI,GAAG,eAAe,GAAG,CAAC,CAAC;IACpC,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,CACF,SAAS,EACT,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,CACvB,GAAG,IAAI,CAAC;QAET,OAAO,IAAI,+BAA+B,CAAC;YACvC,SAAS;YACT,sBAAsB;YACtB,eAAe;YACf,qBAAqB;YACrB,oBAAoB,EAAE,oBAAoB,KAAK,CAAC;SACnD,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,MAAM,EAAC,UAAU,EAAC,GAAG,IAAI,CAAC;QAE1B,OAAO,OAAO,CAAC,OAAO,CAClB,UAAU,EACV,IAAI,UAAU,CAAC;YACX,UAAU,CAAC,SAAS;YACpB,UAAU,CAAC,sBAAsB;YACjC,UAAU,CAAC,eAAe;YAC1B,UAAU,CAAC,qBAAqB;YAChC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1C,CAAC,CACL,CAAC;IACN,CAAC;;AA1Ce,kCAAE,GAAG,UAAU,CAAC;AAEhB,6CAAa,GAAG,MAAM,CAAC;AAEvB,wCAAQ,GAAG,QAAQ,CAAC;AAEpB,6CAAa,GAAG,IAAI,CAAC;AAwCzC,eAAe,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters, IVersion } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetObserverInfoResponseParameters extends ICommandParameters {
|
|
4
|
+
softwareVersion: IVersion;
|
|
5
|
+
protocolVersion: IVersion;
|
|
6
|
+
hardwareVersion: IVersion;
|
|
7
|
+
deviceName: string;
|
|
8
|
+
}
|
|
9
|
+
declare class GetObserverInfoResponse extends Command {
|
|
10
|
+
parameters: IGetObserverInfoResponseParameters;
|
|
11
|
+
constructor(parameters: IGetObserverInfoResponseParameters);
|
|
12
|
+
static readonly id = 2;
|
|
13
|
+
static readonly directionType = 2;
|
|
14
|
+
static readonly examples: TCommandExampleList;
|
|
15
|
+
static readonly hasParameters = true;
|
|
16
|
+
static fromBytes(data: Uint8Array): GetObserverInfoResponse;
|
|
17
|
+
toBytes(): Uint8Array;
|
|
18
|
+
}
|
|
19
|
+
export default GetObserverInfoResponse;
|
package/dist/obis-observer/commands/uplink/{GetDeviceInfoResponse.js → GetObserverInfoResponse.js}
RENAMED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import Command from '../../Command.js';
|
|
2
2
|
import CommandBinaryBuffer, { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
3
|
import { UPLINK } from '../../constants/directions.js';
|
|
4
|
-
const COMMAND_ID =
|
|
4
|
+
const COMMAND_ID = 0x02;
|
|
5
5
|
const examples = [
|
|
6
6
|
{
|
|
7
|
-
name: 'response
|
|
7
|
+
name: 'response to GetObserverInfo with device name "Jooby Electra RM LoraWan 1D485 EU"',
|
|
8
8
|
parameters: {
|
|
9
9
|
requestId: 7,
|
|
10
10
|
softwareVersion: {
|
|
11
11
|
major: 0,
|
|
12
12
|
minor: 1
|
|
13
13
|
},
|
|
14
|
+
protocolVersion: {
|
|
15
|
+
major: 0,
|
|
16
|
+
minor: 1
|
|
17
|
+
},
|
|
14
18
|
hardwareVersion: {
|
|
15
19
|
major: 1,
|
|
16
20
|
minor: 1
|
|
@@ -18,43 +22,40 @@ const examples = [
|
|
|
18
22
|
deviceName: 'Jooby Electra RM LoraWan 1D485 EU'
|
|
19
23
|
},
|
|
20
24
|
hex: {
|
|
21
|
-
header: '
|
|
22
|
-
body: '
|
|
25
|
+
header: '02 29',
|
|
26
|
+
body: '07 00 01 00 01 01 01 21 4a 6f 6f 62 79 20 45 6c 65 63 74 72 61 20 52 4d 20 4c 6f 72 61 57 61 6e 20 31 44 34 38 35 20 45 55'
|
|
23
27
|
}
|
|
24
28
|
}
|
|
25
29
|
];
|
|
26
|
-
class
|
|
30
|
+
class GetObserverInfoResponse extends Command {
|
|
27
31
|
constructor(parameters) {
|
|
28
32
|
super();
|
|
29
33
|
this.parameters = parameters;
|
|
30
|
-
this.size =
|
|
34
|
+
this.size = REQUEST_ID_SIZE + 2 + 2 + 2 + 1 + parameters.deviceName.length;
|
|
31
35
|
}
|
|
32
36
|
static fromBytes(data) {
|
|
33
37
|
const buffer = new CommandBinaryBuffer(data);
|
|
34
|
-
buffer.seek(buffer.offset + 1);
|
|
35
38
|
const requestId = buffer.getUint8();
|
|
36
39
|
const softwareVersion = buffer.getVersion();
|
|
40
|
+
const protocolVersion = buffer.getVersion();
|
|
37
41
|
const hardwareVersion = buffer.getVersion();
|
|
38
42
|
const deviceName = buffer.getString();
|
|
39
|
-
return new
|
|
43
|
+
return new GetObserverInfoResponse({ requestId, softwareVersion, protocolVersion, hardwareVersion, deviceName });
|
|
40
44
|
}
|
|
41
45
|
toBytes() {
|
|
42
|
-
if (typeof this.size !== 'number') {
|
|
43
|
-
throw new Error('unknown or invalid size');
|
|
44
|
-
}
|
|
45
46
|
const buffer = new CommandBinaryBuffer(this.size);
|
|
46
|
-
const { requestId, softwareVersion, hardwareVersion, deviceName } = this.parameters;
|
|
47
|
-
buffer.setUint8(this.size - 1);
|
|
47
|
+
const { requestId, softwareVersion, protocolVersion, hardwareVersion, deviceName } = this.parameters;
|
|
48
48
|
buffer.setUint8(requestId);
|
|
49
49
|
buffer.setVersion(softwareVersion);
|
|
50
|
+
buffer.setVersion(protocolVersion);
|
|
50
51
|
buffer.setVersion(hardwareVersion);
|
|
51
52
|
buffer.setString(deviceName);
|
|
52
53
|
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export default
|
|
60
|
-
//# sourceMappingURL=
|
|
56
|
+
GetObserverInfoResponse.id = COMMAND_ID;
|
|
57
|
+
GetObserverInfoResponse.directionType = UPLINK;
|
|
58
|
+
GetObserverInfoResponse.examples = examples;
|
|
59
|
+
GetObserverInfoResponse.hasParameters = true;
|
|
60
|
+
export default GetObserverInfoResponse;
|
|
61
|
+
//# sourceMappingURL=GetObserverInfoResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetObserverInfoResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObserverInfoResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,EAAE,EAAC,eAAe,EAA+B,MAAM,8BAA8B,CAAC;AAChH,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAcrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,kFAAkF;QACxF,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,eAAe,EAAE;gBACb,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,CAAC;aACX;YACD,eAAe,EAAE;gBACb,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,CAAC;aACX;YACD,eAAe,EAAE;gBACb,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,CAAC;aACX;YACD,UAAU,EAAE,mCAAmC;SAClD;QACD,GAAG,EAAE;YACD,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,4HAA4H;SACrI;KACJ;CACJ,CAAC;AA0CF,MAAM,uBAAwB,SAAQ,OAAO;IACzC,YAAqB,UAA8C;QAC/D,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAoC;QAK/D,IAAI,CAAC,IAAI,GAAG,eAAe,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC;IAC/E,CAAC;IAYD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpC,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAC5C,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAC5C,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAE5C,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAEtC,OAAO,IAAI,uBAAuB,CAAC,EAAC,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAC,CAAC,CAAC;IACnH,CAAC;IAGD,OAAO;QACH,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAc,CAAC,CAAC;QAC5D,MAAM,EAAC,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAEnG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC3B,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;QACnC,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;QACnC,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;QACnC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAE7B,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAlCe,0BAAE,GAAG,UAAU,CAAC;AAEhB,qCAAa,GAAG,MAAM,CAAC;AAEvB,gCAAQ,GAAG,QAAQ,CAAC;AAEpB,qCAAa,GAAG,IAAI,CAAC;AAgCzC,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ICommandParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetObserverSingleModeResponseParameters extends ICommandParameters {
|
|
4
|
+
isSingleMode: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare class GetObserverSingleModeResponse extends Command {
|
|
7
|
+
parameters: IGetObserverSingleModeResponseParameters;
|
|
8
|
+
constructor(parameters: IGetObserverSingleModeResponseParameters);
|
|
9
|
+
static readonly id = 14;
|
|
10
|
+
static readonly directionType = 2;
|
|
11
|
+
static readonly examples: TCommandExampleList;
|
|
12
|
+
static readonly hasParameters = true;
|
|
13
|
+
static fromBytes([requestId, isSingleMode]: Uint8Array): GetObserverSingleModeResponse;
|
|
14
|
+
toBytes(): Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
export default GetObserverSingleModeResponse;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { REQUEST_ID_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x0e;
|
|
5
|
+
const examples = [
|
|
6
|
+
{
|
|
7
|
+
name: 'response to GetObserverSingleMode',
|
|
8
|
+
parameters: {
|
|
9
|
+
requestId: 7,
|
|
10
|
+
isSingleMode: true
|
|
11
|
+
},
|
|
12
|
+
hex: { header: '0e 02', body: '07 01' }
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
class GetObserverSingleModeResponse extends Command {
|
|
16
|
+
constructor(parameters) {
|
|
17
|
+
super();
|
|
18
|
+
this.parameters = parameters;
|
|
19
|
+
this.size = REQUEST_ID_SIZE + 4;
|
|
20
|
+
}
|
|
21
|
+
static fromBytes([requestId, isSingleMode]) {
|
|
22
|
+
return new GetObserverSingleModeResponse({ requestId, isSingleMode: isSingleMode !== 0 });
|
|
23
|
+
}
|
|
24
|
+
toBytes() {
|
|
25
|
+
return Command.toBytes(COMMAND_ID, new Uint8Array([this.parameters.requestId, this.parameters.isSingleMode ? 1 : 0]));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
GetObserverSingleModeResponse.id = COMMAND_ID;
|
|
29
|
+
GetObserverSingleModeResponse.directionType = UPLINK;
|
|
30
|
+
GetObserverSingleModeResponse.examples = examples;
|
|
31
|
+
GetObserverSingleModeResponse.hasParameters = true;
|
|
32
|
+
export default GetObserverSingleModeResponse;
|
|
33
|
+
//# sourceMappingURL=GetObserverSingleModeResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetObserverSingleModeResponse.js","sourceRoot":"","sources":["../../../../src/obis-observer/commands/uplink/GetObserverSingleModeResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAqB,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAUrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,mCAAmC;QACzC,UAAU,EAAE;YACR,SAAS,EAAE,CAAC;YACZ,YAAY,EAAE,IAAI;SACrB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC;KACxC;CACJ,CAAC;AAyBF,MAAM,6BAA8B,SAAQ,OAAO;IAC/C,YAAqB,UAAoD;QACrE,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAA0C;QAGrE,IAAI,CAAC,IAAI,GAAG,eAAe,GAAG,CAAC,CAAC;IACpC,CAAC;IAaD,MAAM,CAAC,SAAS,CAAG,CAAC,SAAS,EAAE,YAAY,CAAa;QACpD,OAAO,IAAI,6BAA6B,CAAC,EAAC,SAAS,EAAE,YAAY,EAAE,YAAY,KAAK,CAAC,EAAC,CAAC,CAAC;IAC5F,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,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACpF,CAAC;IACN,CAAC;;A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