From da82f0cd0b4701841986893a9fae18b5ce150cd7 Mon Sep 17 00:00:00 2001 From: c-jimenez <18682655+c-jimenez@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:12:37 +0200 Subject: [PATCH] =?UTF-8?q?[ocpp20]=C2=A0Update=20messages=20and=20types?= =?UTF-8?q?=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 6 +- .../DefaultCentralSystemEventsHandler.cpp | 310 +++-- .../DefaultCentralSystemEventsHandler.h | 236 ++-- .../DefaultChargePointEventsHandler.cpp | 496 ++++---- .../common/DefaultChargePointEventsHandler.h | 392 +++---- .../DefaultLocalControllerEventsHandler.cpp | 8 +- .../ocpp20/quick_start_centralsystem/main.cpp | 22 +- .../ocpp20/quick_start_chargepoint/main.cpp | 56 +- .../quick_start_localcontroller/main.cpp | 22 +- .../chargepoint/ChargePointHandler20.cpp | 476 ++++---- .../chargepoint/ChargePointHandler20.h | 273 +++-- .../chargepoint/ChargePointProxy20.cpp | 738 ++++++------ .../chargepoint/ChargePointProxy20.h | 490 ++++---- .../interface/ICentralSystem20.h | 410 +++---- .../interface/IChargePointRequestHandler20.h | 240 ++-- src/ocpp20/chargepoint/ChargePoint20.cpp | 1002 ++++++++--------- src/ocpp20/chargepoint/ChargePoint20.h | 752 ++++++------- .../chargepoint/interface/IChargePoint20.h | 240 ++-- .../interface/IChargePointEventsHandler20.h | 410 +++---- .../centralsystem/CentralSystemHandler20.cpp | 647 ++++++----- .../centralsystem/CentralSystemHandler20.h | 468 ++++---- .../centralsystem/CentralSystemProxy20.cpp | 704 ++++++------ .../centralsystem/CentralSystemProxy20.h | 531 +++++---- .../chargepoint/ChargePointHandler20.cpp | 380 +++---- .../chargepoint/ChargePointHandler20.h | 273 +++-- .../chargepoint/ChargePointProxy20.cpp | 762 ++++++------- .../chargepoint/ChargePointProxy20.h | 652 ++++++----- .../interface/ICentralSystemProxy20.h | 479 ++++---- .../interface/IChargePointProxy20.h | 554 +++++---- src/ocpp20/messages/Authorize20.cpp | 57 +- src/ocpp20/messages/Authorize20.h | 32 +- src/ocpp20/messages/BootNotification20.cpp | 52 +- src/ocpp20/messages/BootNotification20.h | 32 +- src/ocpp20/messages/CancelReservation20.cpp | 44 +- src/ocpp20/messages/CancelReservation20.h | 28 +- src/ocpp20/messages/CertificateSigned20.cpp | 48 +- src/ocpp20/messages/CertificateSigned20.h | 30 +- src/ocpp20/messages/ChangeAvailability20.cpp | 52 +- src/ocpp20/messages/ChangeAvailability20.h | 32 +- src/ocpp20/messages/ClearCache20.cpp | 44 +- src/ocpp20/messages/ClearCache20.h | 28 +- .../messages/ClearChargingProfile20.cpp | 48 +- src/ocpp20/messages/ClearChargingProfile20.h | 30 +- src/ocpp20/messages/ClearDisplayMessage20.cpp | 44 +- src/ocpp20/messages/ClearDisplayMessage20.h | 28 +- .../messages/ClearVariableMonitoring20.cpp | 48 +- .../messages/ClearVariableMonitoring20.h | 26 +- .../messages/ClearedChargingLimit20.cpp | 40 +- src/ocpp20/messages/ClearedChargingLimit20.h | 26 +- src/ocpp20/messages/CostUpdated20.cpp | 36 +- src/ocpp20/messages/CostUpdated20.h | 24 +- src/ocpp20/messages/CustomerInformation20.cpp | 52 +- src/ocpp20/messages/CustomerInformation20.h | 32 +- src/ocpp20/messages/DataTransfer20.cpp | 44 +- src/ocpp20/messages/DataTransfer20.h | 28 +- src/ocpp20/messages/DeleteCertificate20.cpp | 48 +- src/ocpp20/messages/DeleteCertificate20.h | 30 +- .../messages/FirmwareStatusNotification20.cpp | 40 +- .../messages/FirmwareStatusNotification20.h | 26 +- .../messages/Get15118EVCertificate20.cpp | 48 +- src/ocpp20/messages/Get15118EVCertificate20.h | 30 +- src/ocpp20/messages/GetBaseReport20.cpp | 48 +- src/ocpp20/messages/GetBaseReport20.h | 30 +- .../messages/GetCertificateStatus20.cpp | 48 +- src/ocpp20/messages/GetCertificateStatus20.h | 30 +- src/ocpp20/messages/GetChargingProfiles20.cpp | 48 +- src/ocpp20/messages/GetChargingProfiles20.h | 30 +- .../messages/GetCompositeSchedule20.cpp | 52 +- src/ocpp20/messages/GetCompositeSchedule20.h | 32 +- src/ocpp20/messages/GetDisplayMessages20.cpp | 52 +- src/ocpp20/messages/GetDisplayMessages20.h | 32 +- .../messages/GetInstalledCertificateIds20.cpp | 64 +- .../messages/GetInstalledCertificateIds20.h | 32 +- src/ocpp20/messages/GetLocalListVersion20.cpp | 36 +- src/ocpp20/messages/GetLocalListVersion20.h | 24 +- src/ocpp20/messages/GetLog20.cpp | 40 +- src/ocpp20/messages/GetLog20.h | 32 +- src/ocpp20/messages/GetMonitoringReport20.cpp | 64 +- src/ocpp20/messages/GetMonitoringReport20.h | 32 +- src/ocpp20/messages/GetReport20.cpp | 61 +- src/ocpp20/messages/GetReport20.h | 32 +- .../messages/GetTransactionStatus20.cpp | 36 +- src/ocpp20/messages/GetTransactionStatus20.h | 24 +- src/ocpp20/messages/GetVariables20.cpp | 60 +- src/ocpp20/messages/GetVariables20.h | 28 +- src/ocpp20/messages/Heartbeat20.cpp | 33 +- src/ocpp20/messages/Heartbeat20.h | 24 +- src/ocpp20/messages/InstallCertificate20.cpp | 48 +- src/ocpp20/messages/InstallCertificate20.h | 30 +- .../messages/LogStatusNotification20.cpp | 40 +- src/ocpp20/messages/LogStatusNotification20.h | 26 +- src/ocpp20/messages/MessagesConverter20.cpp | 12 +- src/ocpp20/messages/MessagesValidator20.cpp | 130 +-- src/ocpp20/messages/MeterValues20.cpp | 50 +- src/ocpp20/messages/MeterValues20.h | 26 +- src/ocpp20/messages/NotifyChargingLimit20.cpp | 52 +- src/ocpp20/messages/NotifyChargingLimit20.h | 28 +- .../messages/NotifyCustomerInformation20.cpp | 36 +- .../messages/NotifyCustomerInformation20.h | 24 +- .../messages/NotifyDisplayMessages20.cpp | 50 +- src/ocpp20/messages/NotifyDisplayMessages20.h | 26 +- .../messages/NotifyEVChargingNeeds20.cpp | 48 +- src/ocpp20/messages/NotifyEVChargingNeeds20.h | 30 +- .../messages/NotifyEVChargingSchedule20.cpp | 48 +- .../messages/NotifyEVChargingSchedule20.h | 30 +- src/ocpp20/messages/NotifyEvent20.cpp | 50 +- src/ocpp20/messages/NotifyEvent20.h | 26 +- .../messages/NotifyMonitoringReport20.cpp | 50 +- .../messages/NotifyMonitoringReport20.h | 26 +- src/ocpp20/messages/NotifyReport20.cpp | 50 +- src/ocpp20/messages/NotifyReport20.h | 26 +- src/ocpp20/messages/PublishFirmware20.cpp | 44 +- src/ocpp20/messages/PublishFirmware20.h | 28 +- .../PublishFirmwareStatusNotification20.cpp | 41 +- .../PublishFirmwareStatusNotification20.h | 26 +- .../messages/ReportChargingProfiles20.cpp | 52 +- .../messages/ReportChargingProfiles20.h | 28 +- .../messages/RequestStartTransaction20.cpp | 56 +- .../messages/RequestStartTransaction20.h | 34 +- .../messages/RequestStopTransaction20.cpp | 44 +- .../messages/RequestStopTransaction20.h | 28 +- .../messages/ReservationStatusUpdate20.cpp | 43 +- .../messages/ReservationStatusUpdate20.h | 26 +- src/ocpp20/messages/ReserveNow20.cpp | 56 +- src/ocpp20/messages/ReserveNow20.h | 34 +- src/ocpp20/messages/Reset20.cpp | 36 +- src/ocpp20/messages/Reset20.h | 30 +- .../messages/SecurityEventNotification20.cpp | 36 +- .../messages/SecurityEventNotification20.h | 24 +- src/ocpp20/messages/SendLocalList20.cpp | 60 +- src/ocpp20/messages/SendLocalList20.h | 32 +- src/ocpp20/messages/SetChargingProfile20.cpp | 48 +- src/ocpp20/messages/SetChargingProfile20.h | 30 +- src/ocpp20/messages/SetDisplayMessage20.cpp | 48 +- src/ocpp20/messages/SetDisplayMessage20.h | 30 +- src/ocpp20/messages/SetMonitoringBase20.cpp | 48 +- src/ocpp20/messages/SetMonitoringBase20.h | 30 +- src/ocpp20/messages/SetMonitoringLevel20.cpp | 44 +- src/ocpp20/messages/SetMonitoringLevel20.h | 28 +- src/ocpp20/messages/SetNetworkProfile20.cpp | 48 +- src/ocpp20/messages/SetNetworkProfile20.h | 30 +- .../messages/SetVariableMonitoring20.cpp | 60 +- src/ocpp20/messages/SetVariableMonitoring20.h | 28 +- src/ocpp20/messages/SetVariables20.cpp | 60 +- src/ocpp20/messages/SetVariables20.h | 28 +- src/ocpp20/messages/SignCertificate20.cpp | 48 +- src/ocpp20/messages/SignCertificate20.h | 30 +- src/ocpp20/messages/StatusNotification20.cpp | 40 +- src/ocpp20/messages/StatusNotification20.h | 26 +- src/ocpp20/messages/TransactionEvent20.cpp | 78 +- src/ocpp20/messages/TransactionEvent20.h | 40 +- src/ocpp20/messages/TriggerMessage20.cpp | 52 +- src/ocpp20/messages/TriggerMessage20.h | 32 +- src/ocpp20/messages/UnlockConnector20.cpp | 44 +- src/ocpp20/messages/UnlockConnector20.h | 28 +- src/ocpp20/messages/UnpublishFirmware20.cpp | 40 +- src/ocpp20/messages/UnpublishFirmware20.h | 26 +- src/ocpp20/messages/UpdateFirmware20.cpp | 48 +- src/ocpp20/messages/UpdateFirmware20.h | 30 +- .../types/ACChargingParametersType20.cpp | 18 +- src/ocpp20/types/ACChargingParametersType20.h | 27 +- .../types/APNAuthenticationEnumType20.cpp | 12 +- .../types/APNAuthenticationEnumType20.h | 12 +- src/ocpp20/types/APNType20.cpp | 22 +- src/ocpp20/types/APNType20.h | 26 +- src/ocpp20/types/AdditionalInfoType20.cpp | 18 +- src/ocpp20/types/AdditionalInfoType20.h | 24 +- src/ocpp20/types/AttributeEnumType20.cpp | 12 +- src/ocpp20/types/AttributeEnumType20.h | 12 +- src/ocpp20/types/AuthorizationData20.cpp | 26 +- src/ocpp20/types/AuthorizationData20.h | 28 +- .../types/AuthorizationStatusEnumType20.cpp | 24 +- .../types/AuthorizationStatusEnumType20.h | 12 +- .../AuthorizeCertificateStatusEnumType20.cpp | 18 +- .../AuthorizeCertificateStatusEnumType20.h | 12 +- src/ocpp20/types/BootReasonEnumType20.cpp | 22 +- src/ocpp20/types/BootReasonEnumType20.h | 12 +- .../CancelReservationStatusEnumType20.cpp | 8 +- .../types/CancelReservationStatusEnumType20.h | 12 +- .../types/CertificateActionEnumType20.cpp | 8 +- .../types/CertificateActionEnumType20.h | 12 +- .../types/CertificateHashDataChainType20.cpp | 40 +- .../types/CertificateHashDataChainType20.h | 38 +- .../types/CertificateHashDataType20.cpp | 22 +- src/ocpp20/types/CertificateHashDataType20.h | 29 +- .../CertificateSignedStatusEnumType20.cpp | 8 +- .../types/CertificateSignedStatusEnumType20.h | 12 +- .../types/CertificateSigningUseEnumType20.cpp | 8 +- .../types/CertificateSigningUseEnumType20.h | 12 +- .../ChangeAvailabilityStatusEnumType20.cpp | 10 +- .../ChangeAvailabilityStatusEnumType20.h | 12 +- .../types/ChargingLimitSourceEnumType20.cpp | 12 +- .../types/ChargingLimitSourceEnumType20.h | 12 +- src/ocpp20/types/ChargingLimitType20.cpp | 22 +- src/ocpp20/types/ChargingLimitType20.h | 26 +- src/ocpp20/types/ChargingNeedsType20.cpp | 30 +- src/ocpp20/types/ChargingNeedsType20.h | 30 +- .../types/ChargingProfileCriterionType20.cpp | 32 +- .../types/ChargingProfileCriterionType20.h | 36 +- .../types/ChargingProfileKindEnumType20.cpp | 10 +- .../types/ChargingProfileKindEnumType20.h | 12 +- .../ChargingProfilePurposeEnumType20.cpp | 12 +- .../types/ChargingProfilePurposeEnumType20.h | 12 +- .../types/ChargingProfileStatusEnumType20.cpp | 8 +- .../types/ChargingProfileStatusEnumType20.h | 12 +- src/ocpp20/types/ChargingProfileType20.cpp | 44 +- src/ocpp20/types/ChargingProfileType20.h | 32 +- .../types/ChargingRateUnitEnumType20.cpp | 8 +- src/ocpp20/types/ChargingRateUnitEnumType20.h | 12 +- .../types/ChargingSchedulePeriodType20.cpp | 18 +- .../types/ChargingSchedulePeriodType20.h | 26 +- src/ocpp20/types/ChargingScheduleType20.cpp | 40 +- src/ocpp20/types/ChargingScheduleType20.h | 30 +- src/ocpp20/types/ChargingStateEnumType20.cpp | 14 +- src/ocpp20/types/ChargingStateEnumType20.h | 12 +- src/ocpp20/types/ChargingStationType20.cpp | 22 +- src/ocpp20/types/ChargingStationType20.h | 26 +- .../types/ClearCacheStatusEnumType20.cpp | 8 +- src/ocpp20/types/ClearCacheStatusEnumType20.h | 12 +- .../ClearChargingProfileStatusEnumType20.cpp | 8 +- .../ClearChargingProfileStatusEnumType20.h | 12 +- .../types/ClearChargingProfileType20.cpp | 22 +- src/ocpp20/types/ClearChargingProfileType20.h | 29 +- .../types/ClearMessageStatusEnumType20.cpp | 8 +- .../types/ClearMessageStatusEnumType20.h | 12 +- .../types/ClearMonitoringResultType20.cpp | 26 +- .../types/ClearMonitoringResultType20.h | 30 +- .../types/ClearMonitoringStatusEnumType20.cpp | 10 +- .../types/ClearMonitoringStatusEnumType20.h | 12 +- .../types/ComponentCriterionEnumType20.cpp | 12 +- .../types/ComponentCriterionEnumType20.h | 12 +- src/ocpp20/types/ComponentType20.cpp | 22 +- src/ocpp20/types/ComponentType20.h | 26 +- src/ocpp20/types/ComponentVariableType20.cpp | 26 +- src/ocpp20/types/ComponentVariableType20.h | 28 +- src/ocpp20/types/CompositeScheduleType20.cpp | 36 +- src/ocpp20/types/CompositeScheduleType20.h | 28 +- src/ocpp20/types/ConnectorEnumType20.cpp | 48 +- src/ocpp20/types/ConnectorEnumType20.h | 12 +- .../types/ConnectorStatusEnumType20.cpp | 14 +- src/ocpp20/types/ConnectorStatusEnumType20.h | 12 +- src/ocpp20/types/ConsumptionCostType20.cpp | 30 +- src/ocpp20/types/ConsumptionCostType20.h | 26 +- src/ocpp20/types/CostKindEnumType20.cpp | 10 +- src/ocpp20/types/CostKindEnumType20.h | 12 +- src/ocpp20/types/CostType20.cpp | 22 +- src/ocpp20/types/CostType20.h | 26 +- src/ocpp20/types/CustomDataType20.cpp | 14 +- src/ocpp20/types/CustomDataType20.h | 22 +- .../CustomerInformationStatusEnumType20.cpp | 10 +- .../CustomerInformationStatusEnumType20.h | 12 +- .../types/DCChargingParametersType20.cpp | 18 +- src/ocpp20/types/DCChargingParametersType20.h | 27 +- src/ocpp20/types/DataEnumType20.cpp | 20 +- src/ocpp20/types/DataEnumType20.h | 12 +- .../types/DataTransferStatusEnumType20.cpp | 12 +- .../types/DataTransferStatusEnumType20.h | 12 +- .../DeleteCertificateStatusEnumType20.cpp | 10 +- .../types/DeleteCertificateStatusEnumType20.h | 12 +- .../types/DisplayMessageStatusEnumType20.cpp | 16 +- .../types/DisplayMessageStatusEnumType20.h | 12 +- src/ocpp20/types/EVSEType20.cpp | 18 +- src/ocpp20/types/EVSEType20.h | 24 +- .../types/EnergyTransferModeEnumType20.cpp | 12 +- .../types/EnergyTransferModeEnumType20.h | 12 +- src/ocpp20/types/EventDataType20.cpp | 34 +- src/ocpp20/types/EventDataType20.h | 32 +- .../types/EventNotificationEnumType20.cpp | 12 +- .../types/EventNotificationEnumType20.h | 12 +- src/ocpp20/types/EventTriggerEnumType20.cpp | 10 +- src/ocpp20/types/EventTriggerEnumType20.h | 12 +- src/ocpp20/types/FirmwareStatusEnumType20.cpp | 32 +- src/ocpp20/types/FirmwareStatusEnumType20.h | 12 +- src/ocpp20/types/FirmwareType20.cpp | 18 +- src/ocpp20/types/FirmwareType20.h | 24 +- .../GenericDeviceModelStatusEnumType20.cpp | 12 +- .../GenericDeviceModelStatusEnumType20.h | 12 +- src/ocpp20/types/GenericStatusEnumType20.cpp | 8 +- src/ocpp20/types/GenericStatusEnumType20.h | 12 +- .../types/GetCertificateIdUseEnumType20.cpp | 14 +- .../types/GetCertificateIdUseEnumType20.h | 12 +- .../types/GetCertificateStatusEnumType20.cpp | 8 +- .../types/GetCertificateStatusEnumType20.h | 12 +- .../GetChargingProfileStatusEnumType20.cpp | 8 +- .../GetChargingProfileStatusEnumType20.h | 12 +- .../GetDisplayMessagesStatusEnumType20.cpp | 8 +- .../GetDisplayMessagesStatusEnumType20.h | 12 +- ...etInstalledCertificateStatusEnumType20.cpp | 8 +- .../GetInstalledCertificateStatusEnumType20.h | 12 +- src/ocpp20/types/GetVariableDataType20.cpp | 30 +- src/ocpp20/types/GetVariableDataType20.h | 30 +- src/ocpp20/types/GetVariableResultType20.cpp | 38 +- src/ocpp20/types/GetVariableResultType20.h | 34 +- .../types/GetVariableStatusEnumType20.cpp | 14 +- .../types/GetVariableStatusEnumType20.h | 12 +- src/ocpp20/types/HashAlgorithmEnumType20.cpp | 10 +- src/ocpp20/types/HashAlgorithmEnumType20.h | 12 +- src/ocpp20/types/IdTokenEnumType20.cpp | 20 +- src/ocpp20/types/IdTokenEnumType20.h | 12 +- src/ocpp20/types/IdTokenInfoType20.cpp | 30 +- src/ocpp20/types/IdTokenInfoType20.h | 30 +- src/ocpp20/types/IdTokenType20.cpp | 36 +- src/ocpp20/types/IdTokenType20.h | 28 +- .../InstallCertificateStatusEnumType20.cpp | 10 +- .../InstallCertificateStatusEnumType20.h | 12 +- .../types/InstallCertificateUseEnumType20.cpp | 12 +- .../types/InstallCertificateUseEnumType20.h | 12 +- .../Iso15118EVCertificateStatusEnumType20.cpp | 8 +- .../Iso15118EVCertificateStatusEnumType20.h | 12 +- src/ocpp20/types/LocationEnumType20.cpp | 14 +- src/ocpp20/types/LocationEnumType20.h | 12 +- src/ocpp20/types/LogEnumType20.cpp | 8 +- src/ocpp20/types/LogEnumType20.h | 12 +- src/ocpp20/types/LogParametersType20.cpp | 18 +- src/ocpp20/types/LogParametersType20.h | 24 +- src/ocpp20/types/LogStatusEnumType20.cpp | 10 +- src/ocpp20/types/LogStatusEnumType20.h | 12 +- src/ocpp20/types/MeasurandEnumType20.cpp | 54 +- src/ocpp20/types/MeasurandEnumType20.h | 12 +- src/ocpp20/types/MessageContentType20.cpp | 22 +- src/ocpp20/types/MessageContentType20.h | 26 +- src/ocpp20/types/MessageFormatEnumType20.cpp | 12 +- src/ocpp20/types/MessageFormatEnumType20.h | 12 +- src/ocpp20/types/MessageInfoType20.cpp | 34 +- src/ocpp20/types/MessageInfoType20.h | 32 +- .../types/MessagePriorityEnumType20.cpp | 10 +- src/ocpp20/types/MessagePriorityEnumType20.h | 12 +- src/ocpp20/types/MessageStateEnumType20.cpp | 12 +- src/ocpp20/types/MessageStateEnumType20.h | 12 +- src/ocpp20/types/MessageTriggerEnumType20.cpp | 26 +- src/ocpp20/types/MessageTriggerEnumType20.h | 12 +- src/ocpp20/types/MeterValueType20.cpp | 32 +- src/ocpp20/types/MeterValueType20.h | 26 +- src/ocpp20/types/ModemType20.cpp | 18 +- src/ocpp20/types/ModemType20.h | 24 +- src/ocpp20/types/MonitorEnumType20.cpp | 14 +- src/ocpp20/types/MonitorEnumType20.h | 12 +- src/ocpp20/types/MonitoringBaseEnumType20.cpp | 10 +- src/ocpp20/types/MonitoringBaseEnumType20.h | 12 +- .../types/MonitoringCriterionEnumType20.cpp | 10 +- .../types/MonitoringCriterionEnumType20.h | 12 +- src/ocpp20/types/MonitoringDataType20.cpp | 40 +- src/ocpp20/types/MonitoringDataType20.h | 30 +- src/ocpp20/types/MutabilityEnumType20.cpp | 10 +- src/ocpp20/types/MutabilityEnumType20.h | 12 +- .../types/NetworkConnectionProfileType20.cpp | 38 +- .../types/NetworkConnectionProfileType20.h | 42 +- .../NotifyEVChargingNeedsStatusEnumType20.cpp | 10 +- .../NotifyEVChargingNeedsStatusEnumType20.h | 12 +- src/ocpp20/types/OCPPInterfaceEnumType20.cpp | 20 +- src/ocpp20/types/OCPPInterfaceEnumType20.h | 12 +- src/ocpp20/types/OCPPTransportEnumType20.cpp | 8 +- src/ocpp20/types/OCPPTransportEnumType20.h | 12 +- src/ocpp20/types/OCPPVersionEnumType20.cpp | 12 +- src/ocpp20/types/OCPPVersionEnumType20.h | 12 +- src/ocpp20/types/OCSPRequestDataType20.cpp | 22 +- src/ocpp20/types/OCSPRequestDataType20.h | 26 +- .../types/OperationalStatusEnumType20.cpp | 8 +- .../types/OperationalStatusEnumType20.h | 12 +- src/ocpp20/types/PhaseEnumType20.cpp | 24 +- src/ocpp20/types/PhaseEnumType20.h | 12 +- .../types/PublishFirmwareStatusEnumType20.cpp | 24 +- .../types/PublishFirmwareStatusEnumType20.h | 12 +- src/ocpp20/types/ReadingContextEnumType20.cpp | 20 +- src/ocpp20/types/ReadingContextEnumType20.h | 12 +- src/ocpp20/types/ReasonEnumType20.cpp | 42 +- src/ocpp20/types/ReasonEnumType20.h | 12 +- src/ocpp20/types/RecurrencyKindEnumType20.cpp | 8 +- src/ocpp20/types/RecurrencyKindEnumType20.h | 12 +- .../types/RegistrationStatusEnumType20.cpp | 10 +- .../types/RegistrationStatusEnumType20.h | 12 +- .../types/RelativeTimeIntervalType20.cpp | 18 +- src/ocpp20/types/RelativeTimeIntervalType20.h | 27 +- src/ocpp20/types/ReportBaseEnumType20.cpp | 10 +- src/ocpp20/types/ReportBaseEnumType20.h | 12 +- src/ocpp20/types/ReportDataType20.cpp | 44 +- src/ocpp20/types/ReportDataType20.h | 32 +- .../RequestStartStopStatusEnumType20.cpp | 8 +- .../types/RequestStartStopStatusEnumType20.h | 12 +- .../ReservationUpdateStatusEnumType20.cpp | 8 +- .../types/ReservationUpdateStatusEnumType20.h | 12 +- .../types/ReserveNowStatusEnumType20.cpp | 14 +- src/ocpp20/types/ReserveNowStatusEnumType20.h | 12 +- src/ocpp20/types/ResetEnumType20.cpp | 8 +- src/ocpp20/types/ResetEnumType20.h | 12 +- src/ocpp20/types/ResetStatusEnumType20.cpp | 10 +- src/ocpp20/types/ResetStatusEnumType20.h | 12 +- src/ocpp20/types/SalesTariffEntryType20.cpp | 36 +- src/ocpp20/types/SalesTariffEntryType20.h | 28 +- src/ocpp20/types/SalesTariffType20.cpp | 32 +- src/ocpp20/types/SalesTariffType20.h | 26 +- src/ocpp20/types/SampledValueType20.cpp | 42 +- src/ocpp20/types/SampledValueType20.h | 36 +- .../types/SendLocalListStatusEnumType20.cpp | 10 +- .../types/SendLocalListStatusEnumType20.h | 12 +- src/ocpp20/types/SetMonitoringDataType20.cpp | 30 +- src/ocpp20/types/SetMonitoringDataType20.h | 30 +- .../types/SetMonitoringResultType20.cpp | 38 +- src/ocpp20/types/SetMonitoringResultType20.h | 37 +- .../types/SetMonitoringStatusEnumType20.cpp | 16 +- .../types/SetMonitoringStatusEnumType20.h | 12 +- .../SetNetworkProfileStatusEnumType20.cpp | 10 +- .../types/SetNetworkProfileStatusEnumType20.h | 12 +- src/ocpp20/types/SetVariableDataType20.cpp | 30 +- src/ocpp20/types/SetVariableDataType20.h | 30 +- src/ocpp20/types/SetVariableResultType20.cpp | 38 +- src/ocpp20/types/SetVariableResultType20.h | 34 +- .../types/SetVariableStatusEnumType20.cpp | 16 +- .../types/SetVariableStatusEnumType20.h | 12 +- src/ocpp20/types/SignedMeterValueType20.cpp | 18 +- src/ocpp20/types/SignedMeterValueType20.h | 24 +- src/ocpp20/types/StatusInfoType20.cpp | 18 +- src/ocpp20/types/StatusInfoType20.h | 24 +- .../types/TransactionEventEnumType20.cpp | 10 +- src/ocpp20/types/TransactionEventEnumType20.h | 12 +- src/ocpp20/types/TransactionType20.cpp | 26 +- src/ocpp20/types/TransactionType20.h | 28 +- .../types/TriggerMessageStatusEnumType20.cpp | 10 +- .../types/TriggerMessageStatusEnumType20.h | 12 +- src/ocpp20/types/TriggerReasonEnumType20.cpp | 46 +- src/ocpp20/types/TriggerReasonEnumType20.h | 12 +- src/ocpp20/types/UnitOfMeasureType20.cpp | 18 +- src/ocpp20/types/UnitOfMeasureType20.h | 24 +- src/ocpp20/types/UnlockStatusEnumType20.cpp | 12 +- src/ocpp20/types/UnlockStatusEnumType20.h | 12 +- .../UnpublishFirmwareStatusEnumType20.cpp | 10 +- .../types/UnpublishFirmwareStatusEnumType20.h | 12 +- src/ocpp20/types/UpdateEnumType20.cpp | 8 +- src/ocpp20/types/UpdateEnumType20.h | 12 +- .../types/UpdateFirmwareStatusEnumType20.cpp | 14 +- .../types/UpdateFirmwareStatusEnumType20.h | 12 +- .../types/UploadLogStatusEnumType20.cpp | 20 +- src/ocpp20/types/UploadLogStatusEnumType20.h | 12 +- src/ocpp20/types/VPNEnumType20.cpp | 12 +- src/ocpp20/types/VPNEnumType20.h | 12 +- src/ocpp20/types/VPNType20.cpp | 22 +- src/ocpp20/types/VPNType20.h | 26 +- src/ocpp20/types/VariableAttributeType20.cpp | 26 +- src/ocpp20/types/VariableAttributeType20.h | 28 +- .../types/VariableCharacteristicsType20.cpp | 22 +- .../types/VariableCharacteristicsType20.h | 34 +- src/ocpp20/types/VariableMonitoringType20.cpp | 22 +- src/ocpp20/types/VariableMonitoringType20.h | 26 +- src/ocpp20/types/VariableType20.cpp | 18 +- src/ocpp20/types/VariableType20.h | 24 +- tools/json2cpp/json2cpp.py | 58 +- .../centralsystem/ChargePointHandler.h.j2 | 2 +- .../centralsystem/ICentralSystem.h.j2 | 2 +- .../IChargePointRequestHandler.h.j2 | 2 +- .../templates/chargepoint/IChargePoint.h.j2 | 2 +- .../IChargePointEventsHandler.h.j2 | 2 +- .../localcontroller/CentralSystemHandler.h.j2 | 2 +- .../localcontroller/ChargePointHandler.h.j2 | 2 +- .../localcontroller/ICentralSystemProxy.h.j2 | 4 +- .../localcontroller/IChargePointProxy.h.j2 | 2 +- .../messages/MessagesConverter.cpp.j2 | 12 +- .../messages/MessagesValidator.cpp.j2 | 4 +- .../templates/messages/msg_header.template.j2 | 10 +- .../templates/messages/msg_impl.template.j2 | 2 +- .../templates/types/enum_header.template.j2 | 6 +- .../templates/types/enum_impl.template.j2 | 2 +- .../templates/types/type_header.template.j2 | 9 +- .../templates/types/type_impl.template.j2 | 2 +- 463 files changed, 11238 insertions(+), 11325 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 10a213be..c32e7263 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "type": "gdb", "request": "launch", "name": "x86 CP debug", - "target": "${workspaceRoot}/bin/gcc_native/quick_start_chargepoint", + "target": "${workspaceRoot}/bin/gcc_native/quick_start_chargepoint20", "cwd": "${workspaceRoot}/bin/gcc_native/", "arguments": "-r", "valuesFormatting": "parseText" @@ -14,7 +14,7 @@ "type": "gdb", "request": "launch", "name": "x86 CS debug", - "target": "${workspaceRoot}/bin/gcc_native/quick_start_centralsystem", + "target": "${workspaceRoot}/bin/gcc_native/quick_start_centralsystem20", "cwd": "${workspaceRoot}/bin/gcc_native/", "arguments": "-r", "valuesFormatting": "parseText" @@ -23,7 +23,7 @@ "type": "gdb", "request": "launch", "name": "x86 LC debug", - "target": "${workspaceRoot}/bin/gcc_native/quick_start_localcontroller", + "target": "${workspaceRoot}/bin/gcc_native/quick_start_localcontroller20", "cwd": "${workspaceRoot}/bin/gcc_native/", "arguments": "-r", "valuesFormatting": "parseText" diff --git a/examples/ocpp20/common/DefaultCentralSystemEventsHandler.cpp b/examples/ocpp20/common/DefaultCentralSystemEventsHandler.cpp index 630d93d8..e63ea5ea 100644 --- a/examples/ocpp20/common/DefaultCentralSystemEventsHandler.cpp +++ b/examples/ocpp20/common/DefaultCentralSystemEventsHandler.cpp @@ -43,7 +43,7 @@ using namespace ocpp::types::ocpp20; using namespace ocpp::x509; /** @brief Display a list of meter values */ -static void displayMeterValues(const std::vector meter_values); +static void displayMeterValues(const std::vector meter_values); /** @brief Constructor */ DefaultCentralSystemEventsHandler::DefaultCentralSystemEventsHandler(CentralSystemDemoConfig& config, @@ -167,12 +167,12 @@ void DefaultCentralSystemEventsHandler::ChargePointRequestHandler::disconnected( m_event_handler.removeChargePoint(m_chargepoint->identifier()); } -/** @brief Called on reception of a BootNotification20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onBootNotification20( - const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a BootNotification request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onBootNotification( + const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -185,25 +185,25 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onBootNotific response.currentTime = DateTime::now(); response.interval = m_event_handler.getConfig().heartbeatInterval().count(); - response.status = RegistrationStatusEnumType20::Accepted; + response.status = RegistrationStatusEnumType::Accepted; if (m_event_handler.setPendingEnabled()) { if (!m_event_handler.isAcceptedChargePoint(m_chargepoint->identifier())) { m_event_handler.addPendingChargePoint(m_chargepoint); response.interval = m_event_handler.getConfig().bootNotificationRetryInterval().count(); - response.status = RegistrationStatusEnumType20::Pending; + response.status = RegistrationStatusEnumType::Pending; } } return ret; } -/** @brief Called on reception of a Authorize20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onAuthorize20(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a Authorize request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onAuthorize(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -211,20 +211,20 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onAuthorize20 (void)message; cout << "[" << m_chargepoint->identifier() << "] - Authorize" - << " type = " << IdTokenEnumType20Helper.toString(request.idToken.type) << " token = " << request.idToken.idToken.str() << endl; + << " type = " << IdTokenEnumTypeHelper.toString(request.idToken.type) << " token = " << request.idToken.idToken.str() << endl; - response.idTokenInfo.status = AuthorizationStatusEnumType20::Accepted; + response.idTokenInfo.status = AuthorizationStatusEnumType::Accepted; response.idTokenInfo.cacheExpiryDateTime.value() = DateTime(DateTime::now().timestamp() + 3600); return ret; } -/** @brief Called on reception of a ClearedChargingLimit20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onClearedChargingLimit20( - const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a ClearedChargingLimit request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onClearedChargingLimit( + const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -238,11 +238,11 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onClearedChar return ret; } -/** @brief Called on reception of a CostUpdated20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onCostUpdated20(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a CostUpdated request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onCostUpdated(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -256,12 +256,11 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onCostUpdated return ret; } -/** @brief Called on reception of a DataTransfer20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onDataTransfer20( - const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a DataTransfer request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onDataTransfer(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -271,17 +270,17 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onDataTransfe cout << "[" << m_chargepoint->identifier() << "] - DataTransfer" << endl; - response.status = DataTransferStatusEnumType20::UnknownVendorId; + response.status = DataTransferStatusEnumType::UnknownVendorId; return ret; } -/** @brief Called on reception of a FirmwareStatusNotification20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onFirmwareStatusNotification20( - const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a FirmwareStatusNotification request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onFirmwareStatusNotification( + const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -295,11 +294,11 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onFirmwareSta return ret; } -/** @brief Called on reception of a Heartbeat20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onHeartbeat20(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a Heartbeat request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onHeartbeat(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -314,12 +313,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onHeartbeat20 return ret; } -/** @brief Called on reception of a LogStatusNotification20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onLogStatusNotification20( - const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a LogStatusNotification request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onLogStatusNotification( + const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -333,11 +332,11 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onLogStatusNo return ret; } -/** @brief Called on reception of a MeterValues20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onMeterValues20(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a MeterValues request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onMeterValues(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -352,12 +351,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onMeterValues return ret; } -/** @brief Called on reception of a NotifyChargingLimit20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyChargingLimit20( - const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a NotifyChargingLimit request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyChargingLimit( + const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -371,12 +370,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyCharg return ret; } -/** @brief Called on reception of a NotifyCustomerInformation20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyCustomerInformation20( - const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a NotifyCustomerInformation request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyCustomerInformation( + const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -390,12 +389,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyCusto return ret; } -/** @brief Called on reception of a NotifyDisplayMessages20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyDisplayMessages20( - const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a NotifyDisplayMessages request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyDisplayMessages( + const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -409,12 +408,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyDispl return ret; } -/** @brief Called on reception of a NotifyEVChargingNeeds20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyEVChargingNeeds20( - const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a NotifyEVChargingNeeds request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyEVChargingNeeds( + const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -428,12 +427,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyEVCha return ret; } -/** @brief Called on reception of a NotifyEVChargingSchedule20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyEVChargingSchedule20( - const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a NotifyEVChargingSchedule request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyEVChargingSchedule( + const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -447,11 +446,11 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyEVCha return ret; } -/** @brief Called on reception of a NotifyEvent20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyEvent20(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a NotifyEvent request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyEvent(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -465,12 +464,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyEvent return ret; } -/** @brief Called on reception of a NotifyMonitoringReport20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyMonitoringReport20( - const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a NotifyMonitoringReport request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyMonitoringReport( + const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -484,12 +483,11 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyMonit return ret; } -/** @brief Called on reception of a NotifyReport20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyReport20( - const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a NotifyReport request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyReport(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -503,12 +501,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onNotifyRepor return ret; } -/** @brief Called on reception of a PublishFirmwareStatusNotification20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onPublishFirmwareStatusNotification20( - const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a PublishFirmwareStatusNotification request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onPublishFirmwareStatusNotification( + const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -522,12 +520,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onPublishFirm return ret; } -/** @brief Called on reception of a ReportChargingProfiles20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onReportChargingProfiles20( - const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a ReportChargingProfiles request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onReportChargingProfiles( + const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -541,12 +539,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onReportCharg return ret; } -/** @brief Called on reception of a ReservationStatusUpdate20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onReservationStatusUpdate20( - const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a ReservationStatusUpdate request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onReservationStatusUpdate( + const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -560,12 +558,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onReservation return ret; } -/** @brief Called on reception of a SecurityEventNotification20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onSecurityEventNotification20( - const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a SecurityEventNotification request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onSecurityEventNotification( + const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -579,12 +577,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onSecurityEve return ret; } -/** @brief Called on reception of a SignCertificate20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onSignCertificate20( - const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a SignCertificate request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onSignCertificate( + const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -594,17 +592,17 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onSignCertifi cout << "[" << m_chargepoint->identifier() << "] - SignCertificate" << endl; - response.status = GenericStatusEnumType20::Rejected; + response.status = GenericStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a StatusNotification20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onStatusNotification20( - const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a StatusNotification request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onStatusNotification( + const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -618,12 +616,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onStatusNotif return ret; } -/** @brief Called on reception of a TransactionEvent20 request from the charge point */ -bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onTransactionEvent20( - const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a TransactionEvent request from the charge point */ +bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onTransactionEvent( + const ocpp::messages::ocpp20::TransactionEventReq& request, + ocpp::messages::ocpp20::TransactionEventConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -635,19 +633,19 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onTransaction switch (request.eventType) { - case TransactionEventEnumType20::Started: + case TransactionEventEnumType::Started: { cout << "Start transaction : id = " << request.transactionInfo.transactionId.str() << endl; } break; - case TransactionEventEnumType20::Ended: + case TransactionEventEnumType::Ended: { cout << "End transaction : id = " << request.transactionInfo.transactionId.str() << endl; } break; - case TransactionEventEnumType20::Updated: + case TransactionEventEnumType::Updated: { cout << "Transaction update : id = " << request.transactionInfo.transactionId.str() << endl; displayMeterValues(request.meterValue); @@ -662,12 +660,12 @@ bool DefaultCentralSystemEventsHandler::ChargePointRequestHandler::onTransaction } /** @brief Display a list of meter values */ -static void displayMeterValues(const std::vector meter_values) +static void displayMeterValues(const std::vector meter_values) { - for (const MeterValueType20& meter_value : meter_values) + for (const MeterValueType& meter_value : meter_values) { cout << " - timestamp : " << meter_value.timestamp.str() << ", sampled values : " << endl; - for (const SampledValueType20& sampled_value : meter_value.sampledValue) + for (const SampledValueType& sampled_value : meter_value.sampledValue) { cout << " - value = " << sampled_value.value; if (sampled_value.unitOfMeasure.isSet()) @@ -676,19 +674,19 @@ static void displayMeterValues(const std::vector meter_values) } if (sampled_value.phase.isSet()) { - cout << ", phase = " << PhaseEnumType20Helper.toString(sampled_value.phase); + cout << ", phase = " << PhaseEnumTypeHelper.toString(sampled_value.phase); } if (sampled_value.measurand.isSet()) { - cout << ", measurand = " << MeasurandEnumType20Helper.toString(sampled_value.measurand); + cout << ", measurand = " << MeasurandEnumTypeHelper.toString(sampled_value.measurand); } if (sampled_value.context.isSet()) { - cout << ", context = " << ReadingContextEnumType20Helper.toString(sampled_value.context); + cout << ", context = " << ReadingContextEnumTypeHelper.toString(sampled_value.context); } if (sampled_value.location.isSet()) { - cout << ", location = " << LocationEnumType20Helper.toString(sampled_value.location); + cout << ", location = " << LocationEnumTypeHelper.toString(sampled_value.location); } cout << endl; } diff --git a/examples/ocpp20/common/DefaultCentralSystemEventsHandler.h b/examples/ocpp20/common/DefaultCentralSystemEventsHandler.h index c281b599..21c02dff 100644 --- a/examples/ocpp20/common/DefaultCentralSystemEventsHandler.h +++ b/examples/ocpp20/common/DefaultCentralSystemEventsHandler.h @@ -84,150 +84,150 @@ class DefaultCentralSystemEventsHandler : public ocpp::centralsystem::ocpp20::IC /** @brief Called to notify the disconnection of the charge point */ void disconnected() override; - /** @brief Called on reception of a BootNotification20 request from the charge point */ - bool onBootNotification20(const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a BootNotification request from the charge point */ + bool onBootNotification(const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a Authorize request from the charge point */ + bool onAuthorize(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a ClearedChargingLimit request from the charge point */ + bool onClearedChargingLimit(const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a Authorize20 request from the charge point */ - bool onAuthorize20(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, + /** @brief Called on reception of a CostUpdated request from the charge point */ + bool onCostUpdated(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a ClearedChargingLimit20 request from the charge point */ - bool onClearedChargingLimit20(const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a DataTransfer request from the charge point */ + bool onDataTransfer(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a CostUpdated20 request from the charge point */ - bool onCostUpdated20(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a DataTransfer20 request from the charge point */ - bool onDataTransfer20(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a FirmwareStatusNotification20 request from the charge point */ - bool onFirmwareStatusNotification20(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a Heartbeat20 request from the charge point */ - bool onHeartbeat20(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a LogStatusNotification20 request from the charge point */ - bool onLogStatusNotification20(const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a FirmwareStatusNotification request from the charge point */ + bool onFirmwareStatusNotification(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a MeterValues20 request from the charge point */ - bool onMeterValues20(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a Heartbeat request from the charge point */ + bool onHeartbeat(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a NotifyChargingLimit20 request from the charge point */ - bool onNotifyChargingLimit20(const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, + /** @brief Called on reception of a LogStatusNotification request from the charge point */ + bool onLogStatusNotification(const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a NotifyCustomerInformation20 request from the charge point */ - bool onNotifyCustomerInformation20(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a MeterValues request from the charge point */ + bool onMeterValues(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a NotifyDisplayMessages20 request from the charge point */ - bool onNotifyDisplayMessages20(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a NotifyChargingLimit request from the charge point */ + bool onNotifyChargingLimit(const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a NotifyEVChargingNeeds20 request from the charge point */ - bool onNotifyEVChargingNeeds20(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a NotifyCustomerInformation request from the charge point */ + bool onNotifyCustomerInformation(const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a NotifyEVChargingSchedule20 request from the charge point */ - bool onNotifyEVChargingSchedule20(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a NotifyDisplayMessages request from the charge point */ + bool onNotifyDisplayMessages(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a NotifyEvent20 request from the charge point */ - bool onNotifyEvent20(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a NotifyEVChargingNeeds request from the charge point */ + bool onNotifyEVChargingNeeds(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a NotifyMonitoringReport20 request from the charge point */ - bool onNotifyMonitoringReport20(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, + /** @brief Called on reception of a NotifyEVChargingSchedule request from the charge point */ + bool onNotifyEVChargingSchedule(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a NotifyReport20 request from the charge point */ - bool onNotifyReport20(const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a PublishFirmwareStatusNotification20 request from the charge point */ - bool onPublishFirmwareStatusNotification20(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a ReportChargingProfiles20 request from the charge point */ - bool onReportChargingProfiles20(const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a NotifyEvent request from the charge point */ + bool onNotifyEvent(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a ReservationStatusUpdate20 request from the charge point */ - bool onReservationStatusUpdate20(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, + /** @brief Called on reception of a NotifyMonitoringReport request from the charge point */ + bool onNotifyMonitoringReport(const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a NotifyReport request from the charge point */ + bool onNotifyReport(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a PublishFirmwareStatusNotification request from the charge point */ + bool onPublishFirmwareStatusNotification(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a ReportChargingProfiles request from the charge point */ + bool onReportChargingProfiles(const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a ReservationStatusUpdate request from the charge point */ + bool onReservationStatusUpdate(const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a SecurityEventNotification request from the charge point */ + bool onSecurityEventNotification(const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a SecurityEventNotification20 request from the charge point */ - bool onSecurityEventNotification20(const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a SignCertificate20 request from the charge point */ - bool onSignCertificate20(const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a StatusNotification20 request from the charge point */ - bool onStatusNotification20(const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a SignCertificate request from the charge point */ + bool onSignCertificate(const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a TransactionEvent20 request from the charge point */ - bool onTransactionEvent20(const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, + /** @brief Called on reception of a StatusNotification request from the charge point */ + bool onStatusNotification(const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, std::string& error, std::string& message) override; + /** @brief Called on reception of a TransactionEvent request from the charge point */ + bool onTransactionEvent(const ocpp::messages::ocpp20::TransactionEventReq& request, + ocpp::messages::ocpp20::TransactionEventConf& response, + std::string& error, + std::string& message) override; + protected: /** @brief Get the serial number of the charge point */ virtual std::string getChargePointSerialNumber(const std::string& chargepoint_id) diff --git a/examples/ocpp20/common/DefaultChargePointEventsHandler.cpp b/examples/ocpp20/common/DefaultChargePointEventsHandler.cpp index 24d0dc51..c77c7e76 100644 --- a/examples/ocpp20/common/DefaultChargePointEventsHandler.cpp +++ b/examples/ocpp20/common/DefaultChargePointEventsHandler.cpp @@ -61,11 +61,11 @@ void DefaultChargePointEventsHandler::connectionStateChanged(bool isConnected) // OCPP operations -/** @brief Called on reception of a CancelReservation20 message from the central */ -bool DefaultChargePointEventsHandler::onCancelReservation20(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a CancelReservation message from the central */ +bool DefaultChargePointEventsHandler::onCancelReservation(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -75,16 +75,16 @@ bool DefaultChargePointEventsHandler::onCancelReservation20(const ocpp::messages cout << "CancelReservation" << endl; - response.status = CancelReservationStatusEnumType20::Rejected; + response.status = CancelReservationStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a CertificateSigned20 message from the central */ -bool DefaultChargePointEventsHandler::onCertificateSigned20(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a CertificateSigned message from the central */ +bool DefaultChargePointEventsHandler::onCertificateSigned(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -94,16 +94,16 @@ bool DefaultChargePointEventsHandler::onCertificateSigned20(const ocpp::messages cout << "CertificateSigned" << endl; - response.status = CertificateSignedStatusEnumType20::Rejected; + response.status = CertificateSignedStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a ChangeAvailability20 message from the central */ -bool DefaultChargePointEventsHandler::onChangeAvailability20(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a ChangeAvailability message from the central */ +bool DefaultChargePointEventsHandler::onChangeAvailability(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -113,16 +113,16 @@ bool DefaultChargePointEventsHandler::onChangeAvailability20(const ocpp::message cout << "ChangeAvailability" << endl; - response.status = ChangeAvailabilityStatusEnumType20::Rejected; + response.status = ChangeAvailabilityStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a ClearCache20 message from the central */ -bool DefaultChargePointEventsHandler::onClearCache20(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a ClearCache message from the central */ +bool DefaultChargePointEventsHandler::onClearCache(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -132,16 +132,16 @@ bool DefaultChargePointEventsHandler::onClearCache20(const ocpp::messages::ocpp2 cout << "ClearCache" << endl; - response.status = ClearCacheStatusEnumType20::Rejected; + response.status = ClearCacheStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a ClearChargingProfile20 message from the central */ -bool DefaultChargePointEventsHandler::onClearChargingProfile20(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a ClearChargingProfile message from the central */ +bool DefaultChargePointEventsHandler::onClearChargingProfile(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -151,16 +151,16 @@ bool DefaultChargePointEventsHandler::onClearChargingProfile20(const ocpp::messa cout << "ClearChargingProfile" << endl; - response.status = ClearChargingProfileStatusEnumType20::Unknown; + response.status = ClearChargingProfileStatusEnumType::Unknown; return ret; } -/** @brief Called on reception of a ClearDisplayMessage20 message from the central */ -bool DefaultChargePointEventsHandler::onClearDisplayMessage20(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a ClearDisplayMessage message from the central */ +bool DefaultChargePointEventsHandler::onClearDisplayMessage(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -170,16 +170,16 @@ bool DefaultChargePointEventsHandler::onClearDisplayMessage20(const ocpp::messag cout << "ClearDisplayMessage" << endl; - response.status = ClearMessageStatusEnumType20::Unknown; + response.status = ClearMessageStatusEnumType::Unknown; return ret; } -/** @brief Called on reception of a ClearVariableMonitoring20 message from the central */ -bool DefaultChargePointEventsHandler::onClearVariableMonitoring20(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a ClearVariableMonitoring message from the central */ +bool DefaultChargePointEventsHandler::onClearVariableMonitoring(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -192,19 +192,19 @@ bool DefaultChargePointEventsHandler::onClearVariableMonitoring20(const ocpp::me { (void)id; - ClearMonitoringResultType20 result; - result.status = ClearMonitoringStatusEnumType20::Rejected; + ClearMonitoringResultType result; + result.status = ClearMonitoringStatusEnumType::Rejected; response.clearMonitoringResult.push_back(result); } return ret; } -/** @brief Called on reception of a CustomerInformation20 message from the central */ -bool DefaultChargePointEventsHandler::onCustomerInformation20(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a CustomerInformation message from the central */ +bool DefaultChargePointEventsHandler::onCustomerInformation(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -214,16 +214,16 @@ bool DefaultChargePointEventsHandler::onCustomerInformation20(const ocpp::messag cout << "CustomerInformation" << endl; - response.status = CustomerInformationStatusEnumType20::Rejected; + response.status = CustomerInformationStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a DataTransfer20 message from the central */ -bool DefaultChargePointEventsHandler::onDataTransfer20(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a DataTransfer message from the central */ +bool DefaultChargePointEventsHandler::onDataTransfer(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -233,16 +233,16 @@ bool DefaultChargePointEventsHandler::onDataTransfer20(const ocpp::messages::ocp cout << "DataTransfer" << endl; - response.status = DataTransferStatusEnumType20::UnknownVendorId; + response.status = DataTransferStatusEnumType::UnknownVendorId; return ret; } -/** @brief Called on reception of a DeleteCertificate20 message from the central */ -bool DefaultChargePointEventsHandler::onDeleteCertificate20(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a DeleteCertificate message from the central */ +bool DefaultChargePointEventsHandler::onDeleteCertificate(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -252,16 +252,16 @@ bool DefaultChargePointEventsHandler::onDeleteCertificate20(const ocpp::messages cout << "DeleteCertificate" << endl; - response.status = DeleteCertificateStatusEnumType20::NotFound; + response.status = DeleteCertificateStatusEnumType::NotFound; return ret; } -/** @brief Called on reception of a Get15118EVCertificate20 message from the central */ -bool DefaultChargePointEventsHandler::onGet15118EVCertificate20(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a Get15118EVCertificate message from the central */ +bool DefaultChargePointEventsHandler::onGet15118EVCertificate(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -271,16 +271,16 @@ bool DefaultChargePointEventsHandler::onGet15118EVCertificate20(const ocpp::mess cout << "Get15118EVCertificate" << endl; - response.status = Iso15118EVCertificateStatusEnumType20::Failed; + response.status = Iso15118EVCertificateStatusEnumType::Failed; return ret; } -/** @brief Called on reception of a GetBaseReport20 message from the central */ -bool DefaultChargePointEventsHandler::onGetBaseReport20(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a GetBaseReport message from the central */ +bool DefaultChargePointEventsHandler::onGetBaseReport(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -290,16 +290,16 @@ bool DefaultChargePointEventsHandler::onGetBaseReport20(const ocpp::messages::oc cout << "GetBaseReport" << endl; - response.status = GenericDeviceModelStatusEnumType20::NotSupported; + response.status = GenericDeviceModelStatusEnumType::NotSupported; return ret; } -/** @brief Called on reception of a GetCertificateStatus20 message from the central */ -bool DefaultChargePointEventsHandler::onGetCertificateStatus20(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a GetCertificateStatus message from the central */ +bool DefaultChargePointEventsHandler::onGetCertificateStatus(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -309,16 +309,16 @@ bool DefaultChargePointEventsHandler::onGetCertificateStatus20(const ocpp::messa cout << "GetCertificateStatus" << endl; - response.status = GetCertificateStatusEnumType20::Failed; + response.status = GetCertificateStatusEnumType::Failed; return ret; } -/** @brief Called on reception of a GetChargingProfiles20 message from the central */ -bool DefaultChargePointEventsHandler::onGetChargingProfiles20(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a GetChargingProfiles message from the central */ +bool DefaultChargePointEventsHandler::onGetChargingProfiles(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -328,16 +328,16 @@ bool DefaultChargePointEventsHandler::onGetChargingProfiles20(const ocpp::messag cout << "GetChargingProfiles" << endl; - response.status = GetChargingProfileStatusEnumType20::NoProfiles; + response.status = GetChargingProfileStatusEnumType::NoProfiles; return ret; } -/** @brief Called on reception of a GetCompositeSchedule20 message from the central */ -bool DefaultChargePointEventsHandler::onGetCompositeSchedule20(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a GetCompositeSchedule message from the central */ +bool DefaultChargePointEventsHandler::onGetCompositeSchedule(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -347,16 +347,16 @@ bool DefaultChargePointEventsHandler::onGetCompositeSchedule20(const ocpp::messa cout << "GetCompositeSchedule" << endl; - response.status = GenericStatusEnumType20::Rejected; + response.status = GenericStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a GetDisplayMessages20 message from the central */ -bool DefaultChargePointEventsHandler::onGetDisplayMessages20(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a GetDisplayMessages message from the central */ +bool DefaultChargePointEventsHandler::onGetDisplayMessages(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -366,16 +366,16 @@ bool DefaultChargePointEventsHandler::onGetDisplayMessages20(const ocpp::message cout << "GetDisplayMessages" << endl; - response.status = GetDisplayMessagesStatusEnumType20::Unknown; + response.status = GetDisplayMessagesStatusEnumType::Unknown; return ret; } -/** @brief Called on reception of a GetInstalledCertificateIds20 message from the central */ -bool DefaultChargePointEventsHandler::onGetInstalledCertificateIds20(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a GetInstalledCertificateIds message from the central */ +bool DefaultChargePointEventsHandler::onGetInstalledCertificateIds(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -385,16 +385,16 @@ bool DefaultChargePointEventsHandler::onGetInstalledCertificateIds20(const ocpp: cout << "GetInstalledCertificateIds" << endl; - response.status = GetInstalledCertificateStatusEnumType20::NotFound; + response.status = GetInstalledCertificateStatusEnumType::NotFound; return ret; } -/** @brief Called on reception of a GetLocalListVersion20 message from the central */ -bool DefaultChargePointEventsHandler::onGetLocalListVersion20(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a GetLocalListVersion message from the central */ +bool DefaultChargePointEventsHandler::onGetLocalListVersion(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -409,11 +409,11 @@ bool DefaultChargePointEventsHandler::onGetLocalListVersion20(const ocpp::messag return ret; } -/** @brief Called on reception of a GetLog20 message from the central */ -bool DefaultChargePointEventsHandler::onGetLog20(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a GetLog message from the central */ +bool DefaultChargePointEventsHandler::onGetLog(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -423,16 +423,16 @@ bool DefaultChargePointEventsHandler::onGetLog20(const ocpp::messages::ocpp20::G cout << "GetLog" << endl; - response.status = LogStatusEnumType20::Rejected; + response.status = LogStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a GetMonitoringReport20 message from the central */ -bool DefaultChargePointEventsHandler::onGetMonitoringReport20(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a GetMonitoringReport message from the central */ +bool DefaultChargePointEventsHandler::onGetMonitoringReport(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -442,16 +442,16 @@ bool DefaultChargePointEventsHandler::onGetMonitoringReport20(const ocpp::messag cout << "GetMonitoringReport" << endl; - response.status = GenericDeviceModelStatusEnumType20::NotSupported; + response.status = GenericDeviceModelStatusEnumType::NotSupported; return ret; } -/** @brief Called on reception of a GetReport20 message from the central */ -bool DefaultChargePointEventsHandler::onGetReport20(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a GetReport message from the central */ +bool DefaultChargePointEventsHandler::onGetReport(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -461,16 +461,16 @@ bool DefaultChargePointEventsHandler::onGetReport20(const ocpp::messages::ocpp20 cout << "GetReport" << endl; - response.status = GenericDeviceModelStatusEnumType20::NotSupported; + response.status = GenericDeviceModelStatusEnumType::NotSupported; return ret; } -/** @brief Called on reception of a GetTransactionStatus20 message from the central */ -bool DefaultChargePointEventsHandler::onGetTransactionStatus20(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a GetTransactionStatus message from the central */ +bool DefaultChargePointEventsHandler::onGetTransactionStatus(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -485,11 +485,11 @@ bool DefaultChargePointEventsHandler::onGetTransactionStatus20(const ocpp::messa return ret; } -/** @brief Called on reception of a GetVariables20 message from the central */ -bool DefaultChargePointEventsHandler::onGetVariables20(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a GetVariables message from the central */ +bool DefaultChargePointEventsHandler::onGetVariables(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -502,19 +502,19 @@ bool DefaultChargePointEventsHandler::onGetVariables20(const ocpp::messages::ocp { (void)var_data; - GetVariableResultType20 result; - result.attributeStatus = GetVariableStatusEnumType20::UnknownVariable; + GetVariableResultType result; + result.attributeStatus = GetVariableStatusEnumType::UnknownVariable; response.getVariableResult.push_back(result); } return ret; } -/** @brief Called on reception of a InstallCertificate20 message from the central */ -bool DefaultChargePointEventsHandler::onInstallCertificate20(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a InstallCertificate message from the central */ +bool DefaultChargePointEventsHandler::onInstallCertificate(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -524,16 +524,16 @@ bool DefaultChargePointEventsHandler::onInstallCertificate20(const ocpp::message cout << "InstallCertificate" << endl; - response.status = InstallCertificateStatusEnumType20::Rejected; + response.status = InstallCertificateStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a PublishFirmware20 message from the central */ -bool DefaultChargePointEventsHandler::onPublishFirmware20(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a PublishFirmware message from the central */ +bool DefaultChargePointEventsHandler::onPublishFirmware(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -543,16 +543,16 @@ bool DefaultChargePointEventsHandler::onPublishFirmware20(const ocpp::messages:: cout << "PublishFirmware" << endl; - response.status = GenericStatusEnumType20::Rejected; + response.status = GenericStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a RequestStartTransaction20 message from the central */ -bool DefaultChargePointEventsHandler::onRequestStartTransaction20(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a RequestStartTransaction message from the central */ +bool DefaultChargePointEventsHandler::onRequestStartTransaction(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -562,16 +562,16 @@ bool DefaultChargePointEventsHandler::onRequestStartTransaction20(const ocpp::me cout << "RequestStartTransaction" << endl; - response.status = RequestStartStopStatusEnumType20::Rejected; + response.status = RequestStartStopStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a RequestStopTransaction20 message from the central */ -bool DefaultChargePointEventsHandler::onRequestStopTransaction20(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a RequestStopTransaction message from the central */ +bool DefaultChargePointEventsHandler::onRequestStopTransaction(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -581,16 +581,16 @@ bool DefaultChargePointEventsHandler::onRequestStopTransaction20(const ocpp::mes cout << "RequestStopTransaction" << endl; - response.status = RequestStartStopStatusEnumType20::Rejected; + response.status = RequestStartStopStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a ReserveNow20 message from the central */ -bool DefaultChargePointEventsHandler::onReserveNow20(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a ReserveNow message from the central */ +bool DefaultChargePointEventsHandler::onReserveNow(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -600,16 +600,16 @@ bool DefaultChargePointEventsHandler::onReserveNow20(const ocpp::messages::ocpp2 cout << "ReserveNow" << endl; - response.status = ReserveNowStatusEnumType20::Rejected; + response.status = ReserveNowStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a Reset20 message from the central */ -bool DefaultChargePointEventsHandler::onReset20(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a Reset message from the central */ +bool DefaultChargePointEventsHandler::onReset(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -619,16 +619,16 @@ bool DefaultChargePointEventsHandler::onReset20(const ocpp::messages::ocpp20::Re cout << "Reset" << endl; - response.status = ResetStatusEnumType20::Rejected; + response.status = ResetStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a SendLocalList20 message from the central */ -bool DefaultChargePointEventsHandler::onSendLocalList20(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a SendLocalList message from the central */ +bool DefaultChargePointEventsHandler::onSendLocalList(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -638,16 +638,16 @@ bool DefaultChargePointEventsHandler::onSendLocalList20(const ocpp::messages::oc cout << "SendLocalList" << endl; - response.status = SendLocalListStatusEnumType20::Failed; + response.status = SendLocalListStatusEnumType::Failed; return ret; } -/** @brief Called on reception of a SetChargingProfile20 message from the central */ -bool DefaultChargePointEventsHandler::onSetChargingProfile20(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a SetChargingProfile message from the central */ +bool DefaultChargePointEventsHandler::onSetChargingProfile(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -657,16 +657,16 @@ bool DefaultChargePointEventsHandler::onSetChargingProfile20(const ocpp::message cout << "SetChargingProfile" << endl; - response.status = ChargingProfileStatusEnumType20::Rejected; + response.status = ChargingProfileStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a SetDisplayMessage20 message from the central */ -bool DefaultChargePointEventsHandler::onSetDisplayMessage20(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a SetDisplayMessage message from the central */ +bool DefaultChargePointEventsHandler::onSetDisplayMessage(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -676,16 +676,16 @@ bool DefaultChargePointEventsHandler::onSetDisplayMessage20(const ocpp::messages cout << "SetDisplayMessage" << endl; - response.status = DisplayMessageStatusEnumType20::Rejected; + response.status = DisplayMessageStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a SetMonitoringBase20 message from the central */ -bool DefaultChargePointEventsHandler::onSetMonitoringBase20(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a SetMonitoringBase message from the central */ +bool DefaultChargePointEventsHandler::onSetMonitoringBase(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -695,16 +695,16 @@ bool DefaultChargePointEventsHandler::onSetMonitoringBase20(const ocpp::messages cout << "SetMonitoringBase" << endl; - response.status = GenericDeviceModelStatusEnumType20::Rejected; + response.status = GenericDeviceModelStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a SetMonitoringLevel20 message from the central */ -bool DefaultChargePointEventsHandler::onSetMonitoringLevel20(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a SetMonitoringLevel message from the central */ +bool DefaultChargePointEventsHandler::onSetMonitoringLevel(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -714,16 +714,16 @@ bool DefaultChargePointEventsHandler::onSetMonitoringLevel20(const ocpp::message cout << "SetMonitoringLevel" << endl; - response.status = GenericStatusEnumType20::Rejected; + response.status = GenericStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a SetNetworkProfile20 message from the central */ -bool DefaultChargePointEventsHandler::onSetNetworkProfile20(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a SetNetworkProfile message from the central */ +bool DefaultChargePointEventsHandler::onSetNetworkProfile(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -733,16 +733,16 @@ bool DefaultChargePointEventsHandler::onSetNetworkProfile20(const ocpp::messages cout << "SetNetworkProfile" << endl; - response.status = SetNetworkProfileStatusEnumType20::Rejected; + response.status = SetNetworkProfileStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a SetVariableMonitoring20 message from the central */ -bool DefaultChargePointEventsHandler::onSetVariableMonitoring20(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a SetVariableMonitoring message from the central */ +bool DefaultChargePointEventsHandler::onSetVariableMonitoring(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -755,8 +755,8 @@ bool DefaultChargePointEventsHandler::onSetVariableMonitoring20(const ocpp::mess { (void)data; - SetMonitoringResultType20 result; - result.status = SetMonitoringStatusEnumType20::Rejected; + SetMonitoringResultType result; + result.status = SetMonitoringStatusEnumType::Rejected; result.type = data.type; result.component = data.component; result.variable = data.variable; @@ -767,11 +767,11 @@ bool DefaultChargePointEventsHandler::onSetVariableMonitoring20(const ocpp::mess return ret; } -/** @brief Called on reception of a SetVariables20 message from the central */ -bool DefaultChargePointEventsHandler::onSetVariables20(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a SetVariables message from the central */ +bool DefaultChargePointEventsHandler::onSetVariables(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -783,8 +783,8 @@ bool DefaultChargePointEventsHandler::onSetVariables20(const ocpp::messages::ocp for (const auto& var_data : request.setVariableData) { - SetVariableResultType20 result; - result.attributeStatus = SetVariableStatusEnumType20::Rejected; + SetVariableResultType result; + result.attributeStatus = SetVariableStatusEnumType::Rejected; result.component = var_data.component; result.variable = var_data.variable; response.setVariableResult.push_back(result); @@ -793,11 +793,11 @@ bool DefaultChargePointEventsHandler::onSetVariables20(const ocpp::messages::ocp return ret; } -/** @brief Called on reception of a TriggerMessage20 message from the central */ -bool DefaultChargePointEventsHandler::onTriggerMessage20(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a TriggerMessage message from the central */ +bool DefaultChargePointEventsHandler::onTriggerMessage(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -807,16 +807,16 @@ bool DefaultChargePointEventsHandler::onTriggerMessage20(const ocpp::messages::o cout << "TriggerMessage" << endl; - response.status = TriggerMessageStatusEnumType20::Rejected; + response.status = TriggerMessageStatusEnumType::Rejected; return ret; } -/** @brief Called on reception of a UnlockConnector20 message from the central */ -bool DefaultChargePointEventsHandler::onUnlockConnector20(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a UnlockConnector message from the central */ +bool DefaultChargePointEventsHandler::onUnlockConnector(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -826,16 +826,16 @@ bool DefaultChargePointEventsHandler::onUnlockConnector20(const ocpp::messages:: cout << "UnlockConnector" << endl; - response.status = UnlockStatusEnumType20::UnknownConnector; + response.status = UnlockStatusEnumType::UnknownConnector; return ret; } -/** @brief Called on reception of a UnpublishFirmware20 message from the central */ -bool DefaultChargePointEventsHandler::onUnpublishFirmware20(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a UnpublishFirmware message from the central */ +bool DefaultChargePointEventsHandler::onUnpublishFirmware(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -845,16 +845,16 @@ bool DefaultChargePointEventsHandler::onUnpublishFirmware20(const ocpp::messages cout << "UnpublishFirmware" << endl; - response.status = UnpublishFirmwareStatusEnumType20::NoFirmware; + response.status = UnpublishFirmwareStatusEnumType::NoFirmware; return ret; } -/** @brief Called on reception of a UpdateFirmware20 message from the central */ -bool DefaultChargePointEventsHandler::onUpdateFirmware20(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error, - std::string& message) +/** @brief Called on reception of a UpdateFirmware message from the central */ +bool DefaultChargePointEventsHandler::onUpdateFirmware(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error, + std::string& message) { bool ret = true; @@ -864,7 +864,7 @@ bool DefaultChargePointEventsHandler::onUpdateFirmware20(const ocpp::messages::o cout << "UpdateFirmware" << endl; - response.status = UpdateFirmwareStatusEnumType20::Rejected; + response.status = UpdateFirmwareStatusEnumType::Rejected; return ret; } diff --git a/examples/ocpp20/common/DefaultChargePointEventsHandler.h b/examples/ocpp20/common/DefaultChargePointEventsHandler.h index 955b4e64..d9aeea6e 100644 --- a/examples/ocpp20/common/DefaultChargePointEventsHandler.h +++ b/examples/ocpp20/common/DefaultChargePointEventsHandler.h @@ -59,251 +59,251 @@ class DefaultChargePointEventsHandler : public ocpp::chargepoint::ocpp20::ICharg // OCPP operations - /** @brief Called on reception of a CancelReservation20 message from the central */ - bool onCancelReservation20(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a CancelReservation message from the central */ + bool onCancelReservation(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a CertificateSigned20 message from the central */ - bool onCertificateSigned20(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a CertificateSigned message from the central */ + bool onCertificateSigned(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a ChangeAvailability20 message from the central */ - bool onChangeAvailability20(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, + /** @brief Called on reception of a ChangeAvailability message from the central */ + bool onChangeAvailability(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a ClearCache message from the central */ + bool onClearCache(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a ClearChargingProfile message from the central */ + bool onClearChargingProfile(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a ClearCache20 message from the central */ - bool onClearCache20(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a ClearChargingProfile20 message from the central */ - bool onClearChargingProfile20(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a ClearDisplayMessage20 message from the central */ - bool onClearDisplayMessage20(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a ClearVariableMonitoring20 message from the central */ - bool onClearVariableMonitoring20(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a CustomerInformation20 message from the central */ - bool onCustomerInformation20(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a DataTransfer20 message from the central */ - bool onDataTransfer20(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a DeleteCertificate20 message from the central */ - bool onDeleteCertificate20(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, + /** @brief Called on reception of a ClearDisplayMessage message from the central */ + bool onClearDisplayMessage(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a Get15118EVCertificate20 message from the central */ - bool onGet15118EVCertificate20(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, + /** @brief Called on reception of a ClearVariableMonitoring message from the central */ + bool onClearVariableMonitoring(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a GetBaseReport20 message from the central */ - bool onGetBaseReport20(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a CustomerInformation message from the central */ + bool onCustomerInformation(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a GetCertificateStatus20 message from the central */ - bool onGetCertificateStatus20(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a DataTransfer message from the central */ + bool onDataTransfer(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a DeleteCertificate message from the central */ + bool onDeleteCertificate(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a GetChargingProfiles20 message from the central */ - bool onGetChargingProfiles20(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, + /** @brief Called on reception of a Get15118EVCertificate message from the central */ + bool onGet15118EVCertificate(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a GetCompositeSchedule20 message from the central */ - bool onGetCompositeSchedule20(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a GetBaseReport message from the central */ + bool onGetBaseReport(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a GetDisplayMessages20 message from the central */ - bool onGetDisplayMessages20(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, + /** @brief Called on reception of a GetCertificateStatus message from the central */ + bool onGetCertificateStatus(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a GetInstalledCertificateIds20 message from the central */ - bool onGetInstalledCertificateIds20(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a GetLocalListVersion20 message from the central */ - bool onGetLocalListVersion20(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a GetChargingProfiles message from the central */ + bool onGetChargingProfiles(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a GetLog20 message from the central */ - bool onGetLog20(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a GetCompositeSchedule message from the central */ + bool onGetCompositeSchedule(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a GetMonitoringReport20 message from the central */ - bool onGetMonitoringReport20(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a GetDisplayMessages message from the central */ + bool onGetDisplayMessages(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a GetInstalledCertificateIds message from the central */ + bool onGetInstalledCertificateIds(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a GetLocalListVersion message from the central */ + bool onGetLocalListVersion(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a GetReport20 message from the central */ - bool onGetReport20(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a GetLog message from the central */ + bool onGetLog(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a GetTransactionStatus20 message from the central */ - bool onGetTransactionStatus20(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a GetMonitoringReport message from the central */ + bool onGetMonitoringReport(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a GetVariables20 message from the central */ - bool onGetVariables20(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a GetReport message from the central */ + bool onGetReport(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a InstallCertificate20 message from the central */ - bool onInstallCertificate20(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, + /** @brief Called on reception of a GetTransactionStatus message from the central */ + bool onGetTransactionStatus(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a PublishFirmware20 message from the central */ - bool onPublishFirmware20(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a RequestStartTransaction20 message from the central */ - bool onRequestStartTransaction20(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a RequestStopTransaction20 message from the central */ - bool onRequestStopTransaction20(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a ReserveNow20 message from the central */ - bool onReserveNow20(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, + /** @brief Called on reception of a GetVariables message from the central */ + bool onGetVariables(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a Reset20 message from the central */ - bool onReset20(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a InstallCertificate message from the central */ + bool onInstallCertificate(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a SendLocalList20 message from the central */ - bool onSendLocalList20(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, + /** @brief Called on reception of a PublishFirmware message from the central */ + bool onPublishFirmware(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a SetChargingProfile20 message from the central */ - bool onSetChargingProfile20(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a RequestStartTransaction message from the central */ + bool onRequestStartTransaction(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a SetDisplayMessage20 message from the central */ - bool onSetDisplayMessage20(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a RequestStopTransaction message from the central */ + bool onRequestStopTransaction(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a SetMonitoringBase20 message from the central */ - bool onSetMonitoringBase20(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a ReserveNow message from the central */ + bool onReserveNow(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a Reset message from the central */ + bool onReset(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a SendLocalList message from the central */ + bool onSendLocalList(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a SetChargingProfile message from the central */ + bool onSetChargingProfile(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a SetDisplayMessage message from the central */ + bool onSetDisplayMessage(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a SetMonitoringLevel20 message from the central */ - bool onSetMonitoringLevel20(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a SetMonitoringBase message from the central */ + bool onSetMonitoringBase(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a SetNetworkProfile20 message from the central */ - bool onSetNetworkProfile20(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a SetMonitoringLevel message from the central */ + bool onSetMonitoringLevel(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a SetVariableMonitoring20 message from the central */ - bool onSetVariableMonitoring20(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a SetNetworkProfile message from the central */ + bool onSetNetworkProfile(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a SetVariables20 message from the central */ - bool onSetVariables20(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, + /** @brief Called on reception of a SetVariableMonitoring message from the central */ + bool onSetVariableMonitoring(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a SetVariables message from the central */ + bool onSetVariables(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error, + std::string& message) override; + + /** @brief Called on reception of a TriggerMessage message from the central */ + bool onTriggerMessage(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a TriggerMessage20 message from the central */ - bool onTriggerMessage20(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a UnlockConnector message from the central */ + bool onUnlockConnector(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error, + std::string& message) override; - /** @brief Called on reception of a UnlockConnector20 message from the central */ - bool onUnlockConnector20(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, + /** @brief Called on reception of a UnpublishFirmware message from the central */ + bool onUnpublishFirmware(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, std::string& error, std::string& message) override; - /** @brief Called on reception of a UnpublishFirmware20 message from the central */ - bool onUnpublishFirmware20(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error, - std::string& message) override; - - /** @brief Called on reception of a UpdateFirmware20 message from the central */ - bool onUpdateFirmware20(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error, - std::string& message) override; + /** @brief Called on reception of a UpdateFirmware message from the central */ + bool onUpdateFirmware(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error, + std::string& message) override; protected: /** @brief Get the configuration */ diff --git a/examples/ocpp20/common/DefaultLocalControllerEventsHandler.cpp b/examples/ocpp20/common/DefaultLocalControllerEventsHandler.cpp index 38baa021..bb348e98 100644 --- a/examples/ocpp20/common/DefaultLocalControllerEventsHandler.cpp +++ b/examples/ocpp20/common/DefaultLocalControllerEventsHandler.cpp @@ -73,10 +73,10 @@ void DefaultLocalControllerEventsHandler::chargePointConnected( std::weak_ptr p_chargepoint = chargepoint; // Specific handling of heartbeat message - auto heartbeat_handler = [p_chargepoint](const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, - std::string& error_code, - std::string& error_message) + auto heartbeat_handler = [p_chargepoint](const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error_code, + std::string& error_message) { bool ret = true; auto chargepoint = p_chargepoint.lock(); diff --git a/examples/ocpp20/quick_start_centralsystem/main.cpp b/examples/ocpp20/quick_start_centralsystem/main.cpp index 7a588914..fe4df572 100644 --- a/examples/ocpp20/quick_start_centralsystem/main.cpp +++ b/examples/ocpp20/quick_start_centralsystem/main.cpp @@ -134,19 +134,19 @@ int main(int argc, char* argv[]) std::cout << "---------------------------------------------" << std::endl; std::cout << "Read whole charge point configuration..." << std::endl; - GetBaseReport20Req get_base_report_req; - GetBaseReport20Conf get_base_report_conf; + GetBaseReportReq get_base_report_req; + GetBaseReportConf get_base_report_conf; get_base_report_req.requestId = std::chrono::system_clock::now().time_since_epoch().count(); - get_base_report_req.reportBase = ReportBaseEnumType20::ConfigurationInventory; + get_base_report_req.reportBase = ReportBaseEnumType::ConfigurationInventory; if (!chargepoint->call(get_base_report_req, get_base_report_conf, error, error_msg)) { std::cout << "Failed : error = " << error << " error_msg = " << error_msg << std::endl; } std::cout << "Configure heartbeat interval..." << std::endl; - SetVariables20Req set_vars_req; - SetVariables20Conf set_vars_conf; - SetVariableDataType20 var; + SetVariablesReq set_vars_req; + SetVariablesConf set_vars_conf; + SetVariableDataType var; var.variable.name.assign("HeartbeatInterval"); var.component.name.assign("OCPPCommCtrlr"); var.attributeValue.assign("10"); @@ -161,9 +161,9 @@ int main(int argc, char* argv[]) } std::cout << "Trigger status notification..." << std::endl; - TriggerMessage20Req trigger_msg_req; - TriggerMessage20Conf trigger_msg_conf; - trigger_msg_req.requestedMessage = MessageTriggerEnumType20::StatusNotification; + TriggerMessageReq trigger_msg_req; + TriggerMessageConf trigger_msg_conf; + trigger_msg_req.requestedMessage = MessageTriggerEnumType::StatusNotification; if (chargepoint->call(trigger_msg_req, trigger_msg_conf, error, error_msg)) { std::cout << "Done!" << std::endl; @@ -175,7 +175,7 @@ int main(int argc, char* argv[]) std::cout << "Trigger meter values on evse 1..." << std::endl; trigger_msg_req.evse.value().id = 1; - trigger_msg_req.requestedMessage = MessageTriggerEnumType20::MeterValues; + trigger_msg_req.requestedMessage = MessageTriggerEnumType::MeterValues; if (chargepoint->call(trigger_msg_req, trigger_msg_conf, error, error_msg)) { std::cout << "Done!" << std::endl; @@ -187,7 +187,7 @@ int main(int argc, char* argv[]) std::cout << "Trigger heartbeat..." << std::endl; trigger_msg_req.evse.clear(); - trigger_msg_req.requestedMessage = MessageTriggerEnumType20::Heartbeat; + trigger_msg_req.requestedMessage = MessageTriggerEnumType::Heartbeat; if (chargepoint->call(trigger_msg_req, trigger_msg_conf, error, error_msg)) { std::cout << "Done!" << std::endl; diff --git a/examples/ocpp20/quick_start_chargepoint/main.cpp b/examples/ocpp20/quick_start_chargepoint/main.cpp index e9d4c9df..befe2aa4 100644 --- a/examples/ocpp20/quick_start_chargepoint/main.cpp +++ b/examples/ocpp20/quick_start_chargepoint/main.cpp @@ -127,7 +127,7 @@ int main(int argc, char* argv[]) auto last_boot_notif = std::chrono::steady_clock::time_point(); std::chrono::seconds hb_boot_notif_interval = std::chrono::seconds(10); - RegistrationStatusEnumType20 registration_status = RegistrationStatusEnumType20::Rejected; + RegistrationStatusEnumType registration_status = RegistrationStatusEnumType::Rejected; unsigned int transaction_id = std::chrono::system_clock::now().time_since_epoch().count(); @@ -142,7 +142,7 @@ int main(int argc, char* argv[]) std::cout << "Connected to Central System!" << std::endl; // Wait to be accepted by Central System - while (registration_status != RegistrationStatusEnumType20::Accepted) + while (registration_status != RegistrationStatusEnumType::Accepted) { // Send boot notification message periodically auto now = std::chrono::steady_clock::now(); @@ -150,9 +150,9 @@ int main(int argc, char* argv[]) { std::cout << "Sending BootNotification request..." << std::endl; - BootNotification20Req boot_notif_req; - BootNotification20Conf boot_notif_conf; - boot_notif_req.reason = BootReasonEnumType20::PowerUp; + BootNotificationReq boot_notif_req; + BootNotificationConf boot_notif_conf; + boot_notif_req.reason = BootReasonEnumType::PowerUp; boot_notif_req.chargingStation.vendorName.assign("Open OCPP"); boot_notif_req.chargingStation.model.assign("Quick Start CS OCPP 2.0.1"); boot_notif_req.chargingStation.firmwareVersion.value().assign("1.2.3.4"); @@ -184,21 +184,21 @@ int main(int argc, char* argv[]) { // Ask for authorization on a tag std::cout << "Checking for id tag " << id_tag << " authorization..." << std::endl; - Authorize20Req authorize_req; - Authorize20Conf authorize_conf; + AuthorizeReq authorize_req; + AuthorizeConf authorize_conf; authorize_req.idToken.idToken.assign(id_tag); - authorize_req.idToken.type = IdTokenEnumType20::ISO14443; + authorize_req.idToken.type = IdTokenEnumType::ISO14443; if (charge_point->call(authorize_req, authorize_conf, error, error_msg)) { - if (authorize_conf.idTokenInfo.status == AuthorizationStatusEnumType20::Accepted) + if (authorize_conf.idTokenInfo.status == AuthorizationStatusEnumType::Accepted) { std::cout << "Id tag authorized" << std::endl; // Occupied state - StatusNotification20Req status_req; - StatusNotification20Conf status_conf; + StatusNotificationReq status_req; + StatusNotificationConf status_conf; status_req.timestamp = DateTime::now(); - status_req.connectorStatus = ConnectorStatusEnumType20::Occupied; + status_req.connectorStatus = ConnectorStatusEnumType::Occupied; status_req.evseId = evse_id; status_req.connectorId = connector_id; charge_point->call(status_req, status_conf, error, error_msg); @@ -207,41 +207,41 @@ int main(int argc, char* argv[]) // Try to start charging session transaction_id++; - TransactionEvent20Req tx_event_req; - TransactionEvent20Conf tx_event_conf; + TransactionEventReq tx_event_req; + TransactionEventConf tx_event_conf; tx_event_req.seqNo = 1; - tx_event_req.eventType = TransactionEventEnumType20::Started; + tx_event_req.eventType = TransactionEventEnumType::Started; tx_event_req.timestamp = DateTime::now(); - tx_event_req.triggerReason = TriggerReasonEnumType20::Authorized; + tx_event_req.triggerReason = TriggerReasonEnumType::Authorized; tx_event_req.evse.value().id = evse_id; tx_event_req.evse.value().connectorId = connector_id; tx_event_req.transactionInfo.transactionId.assign(std::to_string(transaction_id)); - tx_event_req.transactionInfo.chargingState.value() = ChargingStateEnumType20::EVConnected; + tx_event_req.transactionInfo.chargingState.value() = ChargingStateEnumType::EVConnected; tx_event_req.idToken.value().idToken.assign(id_tag); - tx_event_req.idToken.value().type = IdTokenEnumType20::ISO14443; + tx_event_req.idToken.value().type = IdTokenEnumType::ISO14443; if (charge_point->call(tx_event_req, tx_event_conf, error, error_msg)) { if (!tx_event_conf.idTokenInfo.isSet() || - (tx_event_conf.idTokenInfo.value().status == AuthorizationStatusEnumType20::Accepted)) + (tx_event_conf.idTokenInfo.value().status == AuthorizationStatusEnumType::Accepted)) { std::cout << "Transaction authorized, start charging" << std::endl; // Charging state tx_event_req.seqNo++; - tx_event_req.eventType = TransactionEventEnumType20::Updated; + tx_event_req.eventType = TransactionEventEnumType::Updated; tx_event_req.timestamp = DateTime::now(); - tx_event_req.triggerReason = TriggerReasonEnumType20::CablePluggedIn; - tx_event_req.transactionInfo.chargingState.value() = ChargingStateEnumType20::Charging; + tx_event_req.triggerReason = TriggerReasonEnumType::CablePluggedIn; + tx_event_req.transactionInfo.chargingState.value() = ChargingStateEnumType::Charging; tx_event_req.idToken.clear(); charge_point->call(tx_event_req, tx_event_conf, error, error_msg); std::this_thread::sleep_for(std::chrono::seconds(30u)); // End transaction tx_event_req.seqNo++; - tx_event_req.eventType = TransactionEventEnumType20::Ended; + tx_event_req.eventType = TransactionEventEnumType::Ended; tx_event_req.timestamp = DateTime::now(); - tx_event_req.triggerReason = TriggerReasonEnumType20::EnergyLimitReached; - tx_event_req.transactionInfo.chargingState.value() = ChargingStateEnumType20::Idle; + tx_event_req.triggerReason = TriggerReasonEnumType::EnergyLimitReached; + tx_event_req.transactionInfo.chargingState.value() = ChargingStateEnumType::Idle; charge_point->call(tx_event_req, tx_event_conf, error, error_msg); std::this_thread::sleep_for(std::chrono::seconds(1u)); @@ -249,7 +249,7 @@ int main(int argc, char* argv[]) else { std::cout << "Transaction not authorized by Central System : " - << AuthorizationStatusEnumType20Helper.toString(tx_event_conf.idTokenInfo.value().status) + << AuthorizationStatusEnumTypeHelper.toString(tx_event_conf.idTokenInfo.value().status) << std::endl; } } @@ -260,13 +260,13 @@ int main(int argc, char* argv[]) // Available state status_req.timestamp = DateTime::now(); - status_req.connectorStatus = ConnectorStatusEnumType20::Available; + status_req.connectorStatus = ConnectorStatusEnumType::Available; charge_point->call(status_req, status_conf, error, error_msg); } else { std::cout << "Id tag not authorized by Central System : " - << AuthorizationStatusEnumType20Helper.toString(authorize_conf.idTokenInfo.status) << std::endl; + << AuthorizationStatusEnumTypeHelper.toString(authorize_conf.idTokenInfo.status) << std::endl; } } else diff --git a/examples/ocpp20/quick_start_localcontroller/main.cpp b/examples/ocpp20/quick_start_localcontroller/main.cpp index fff6425f..1c0b9e54 100644 --- a/examples/ocpp20/quick_start_localcontroller/main.cpp +++ b/examples/ocpp20/quick_start_localcontroller/main.cpp @@ -138,19 +138,19 @@ int main(int argc, char* argv[]) std::cout << "---------------------------------------------" << std::endl; std::cout << "Read whole charge point configuration..." << std::endl; - GetBaseReport20Req get_base_report_req; - GetBaseReport20Conf get_base_report_conf; + GetBaseReportReq get_base_report_req; + GetBaseReportConf get_base_report_conf; get_base_report_req.requestId = std::chrono::system_clock::now().time_since_epoch().count(); - get_base_report_req.reportBase = ReportBaseEnumType20::ConfigurationInventory; + get_base_report_req.reportBase = ReportBaseEnumType::ConfigurationInventory; if (!chargepoint->call(get_base_report_req, get_base_report_conf, error, error_msg)) { std::cout << "Failed : error = " << error << " error_msg = " << error_msg << std::endl; } std::cout << "Configure heartbeat interval..." << std::endl; - SetVariables20Req set_vars_req; - SetVariables20Conf set_vars_conf; - SetVariableDataType20 var; + SetVariablesReq set_vars_req; + SetVariablesConf set_vars_conf; + SetVariableDataType var; var.variable.name.assign("HeartbeatInterval"); var.component.name.assign("OCPPCommCtrlr"); var.attributeValue.assign("10"); @@ -165,9 +165,9 @@ int main(int argc, char* argv[]) } std::cout << "Trigger status notification..." << std::endl; - TriggerMessage20Req trigger_msg_req; - TriggerMessage20Conf trigger_msg_conf; - trigger_msg_req.requestedMessage = MessageTriggerEnumType20::StatusNotification; + TriggerMessageReq trigger_msg_req; + TriggerMessageConf trigger_msg_conf; + trigger_msg_req.requestedMessage = MessageTriggerEnumType::StatusNotification; if (chargepoint->call(trigger_msg_req, trigger_msg_conf, error, error_msg)) { std::cout << "Done!" << std::endl; @@ -179,7 +179,7 @@ int main(int argc, char* argv[]) std::cout << "Trigger meter values on evse 1..." << std::endl; trigger_msg_req.evse.value().id = 1; - trigger_msg_req.requestedMessage = MessageTriggerEnumType20::MeterValues; + trigger_msg_req.requestedMessage = MessageTriggerEnumType::MeterValues; if (chargepoint->call(trigger_msg_req, trigger_msg_conf, error, error_msg)) { std::cout << "Done!" << std::endl; @@ -191,7 +191,7 @@ int main(int argc, char* argv[]) std::cout << "Trigger heartbeat..." << std::endl; trigger_msg_req.evse.clear(); - trigger_msg_req.requestedMessage = MessageTriggerEnumType20::Heartbeat; + trigger_msg_req.requestedMessage = MessageTriggerEnumType::Heartbeat; if (chargepoint->call(trigger_msg_req, trigger_msg_conf, error, error_msg)) { std::cout << "Done!" << std::endl; diff --git a/src/ocpp20/centralsystem/chargepoint/ChargePointHandler20.cpp b/src/ocpp20/centralsystem/chargepoint/ChargePointHandler20.cpp index fe3d5ee8..594984de 100644 --- a/src/ocpp20/centralsystem/chargepoint/ChargePointHandler20.cpp +++ b/src/ocpp20/centralsystem/chargepoint/ChargePointHandler20.cpp @@ -41,91 +41,85 @@ ChargePointHandler20::ChargePointHandler20(const std::string& const ocpp::messages::ocpp20::MessagesConverter20& messages_converter, ocpp::messages::MessageDispatcher& msg_dispatcher, const ocpp::config::ICentralSystemConfig20& stack_config) - : GenericMessageHandler(BOOTNOTIFICATION20_ACTION, messages_converter), - GenericMessageHandler(AUTHORIZE20_ACTION, messages_converter), - GenericMessageHandler(CLEAREDCHARGINGLIMIT20_ACTION, messages_converter), - GenericMessageHandler(COSTUPDATED20_ACTION, messages_converter), - GenericMessageHandler(DATATRANSFER20_ACTION, messages_converter), - GenericMessageHandler(FIRMWARESTATUSNOTIFICATION20_ACTION, - messages_converter), - GenericMessageHandler(HEARTBEAT20_ACTION, messages_converter), - GenericMessageHandler(LOGSTATUSNOTIFICATION20_ACTION, messages_converter), - GenericMessageHandler(METERVALUES20_ACTION, messages_converter), - GenericMessageHandler(NOTIFYCHARGINGLIMIT20_ACTION, messages_converter), - GenericMessageHandler(NOTIFYCUSTOMERINFORMATION20_ACTION, - messages_converter), - GenericMessageHandler(NOTIFYDISPLAYMESSAGES20_ACTION, messages_converter), - GenericMessageHandler(NOTIFYEVCHARGINGNEEDS20_ACTION, messages_converter), - GenericMessageHandler(NOTIFYEVCHARGINGSCHEDULE20_ACTION, + : GenericMessageHandler(BOOTNOTIFICATION_ACTION, messages_converter), + GenericMessageHandler(AUTHORIZE_ACTION, messages_converter), + GenericMessageHandler(CLEAREDCHARGINGLIMIT_ACTION, messages_converter), + GenericMessageHandler(COSTUPDATED_ACTION, messages_converter), + GenericMessageHandler(DATATRANSFER_ACTION, messages_converter), + GenericMessageHandler(FIRMWARESTATUSNOTIFICATION_ACTION, messages_converter), - GenericMessageHandler(NOTIFYEVENT20_ACTION, messages_converter), - GenericMessageHandler(NOTIFYMONITORINGREPORT20_ACTION, messages_converter), - GenericMessageHandler(NOTIFYREPORT20_ACTION, messages_converter), - GenericMessageHandler( - PUBLISHFIRMWARESTATUSNOTIFICATION20_ACTION, messages_converter), - GenericMessageHandler(REPORTCHARGINGPROFILES20_ACTION, messages_converter), - GenericMessageHandler(RESERVATIONSTATUSUPDATE20_ACTION, + GenericMessageHandler(HEARTBEAT_ACTION, messages_converter), + GenericMessageHandler(LOGSTATUSNOTIFICATION_ACTION, messages_converter), + GenericMessageHandler(METERVALUES_ACTION, messages_converter), + GenericMessageHandler(NOTIFYCHARGINGLIMIT_ACTION, messages_converter), + GenericMessageHandler(NOTIFYCUSTOMERINFORMATION_ACTION, messages_converter), - GenericMessageHandler(SECURITYEVENTNOTIFICATION20_ACTION, - messages_converter), - GenericMessageHandler(SIGNCERTIFICATE20_ACTION, messages_converter), - GenericMessageHandler(STATUSNOTIFICATION20_ACTION, messages_converter), - GenericMessageHandler(TRANSACTIONEVENT20_ACTION, messages_converter), + GenericMessageHandler(NOTIFYDISPLAYMESSAGES_ACTION, messages_converter), + GenericMessageHandler(NOTIFYEVCHARGINGNEEDS_ACTION, messages_converter), + GenericMessageHandler(NOTIFYEVCHARGINGSCHEDULE_ACTION, messages_converter), + GenericMessageHandler(NOTIFYEVENT_ACTION, messages_converter), + GenericMessageHandler(NOTIFYMONITORINGREPORT_ACTION, messages_converter), + GenericMessageHandler(NOTIFYREPORT_ACTION, messages_converter), + GenericMessageHandler( + PUBLISHFIRMWARESTATUSNOTIFICATION_ACTION, messages_converter), + GenericMessageHandler(REPORTCHARGINGPROFILES_ACTION, messages_converter), + GenericMessageHandler(RESERVATIONSTATUSUPDATE_ACTION, messages_converter), + GenericMessageHandler(SECURITYEVENTNOTIFICATION_ACTION, + messages_converter), + GenericMessageHandler(SIGNCERTIFICATE_ACTION, messages_converter), + GenericMessageHandler(STATUSNOTIFICATION_ACTION, messages_converter), + GenericMessageHandler(TRANSACTIONEVENT_ACTION, messages_converter), m_identifier(identifier), m_stack_config(stack_config), m_messages_converter(messages_converter), m_handler(nullptr) { - msg_dispatcher.registerHandler(BOOTNOTIFICATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(AUTHORIZE20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(CLEAREDCHARGINGLIMIT20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(COSTUPDATED20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(DATATRANSFER20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler( - FIRMWARESTATUSNOTIFICATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(HEARTBEAT20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(LOGSTATUSNOTIFICATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(METERVALUES20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(NOTIFYCHARGINGLIMIT20_ACTION, - *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(BOOTNOTIFICATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(AUTHORIZE_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(CLEAREDCHARGINGLIMIT_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(COSTUPDATED_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(DATATRANSFER_ACTION, *dynamic_cast*>(this)); msg_dispatcher.registerHandler( - NOTIFYCUSTOMERINFORMATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(NOTIFYDISPLAYMESSAGES20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(NOTIFYEVCHARGINGNEEDS20_ACTION, - *dynamic_cast*>(this)); + FIRMWARESTATUSNOTIFICATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(HEARTBEAT_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(LOGSTATUSNOTIFICATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(METERVALUES_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYCHARGINGLIMIT_ACTION, + *dynamic_cast*>(this)); msg_dispatcher.registerHandler( - NOTIFYEVCHARGINGSCHEDULE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(NOTIFYEVENT20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(NOTIFYMONITORINGREPORT20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(NOTIFYREPORT20_ACTION, - *dynamic_cast*>(this)); + NOTIFYCUSTOMERINFORMATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYDISPLAYMESSAGES_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYEVCHARGINGNEEDS_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYEVCHARGINGSCHEDULE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYEVENT_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYMONITORINGREPORT_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYREPORT_ACTION, *dynamic_cast*>(this)); msg_dispatcher.registerHandler( - PUBLISHFIRMWARESTATUSNOTIFICATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(REPORTCHARGINGPROFILES20_ACTION, - *dynamic_cast*>(this)); + PUBLISHFIRMWARESTATUSNOTIFICATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(REPORTCHARGINGPROFILES_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(RESERVATIONSTATUSUPDATE_ACTION, + *dynamic_cast*>(this)); msg_dispatcher.registerHandler( - RESERVATIONSTATUSUPDATE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler( - SECURITYEVENTNOTIFICATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(SIGNCERTIFICATE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(STATUSNOTIFICATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(TRANSACTIONEVENT20_ACTION, - *dynamic_cast*>(this)); + SECURITYEVENTNOTIFICATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(SIGNCERTIFICATE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(STATUSNOTIFICATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(TRANSACTIONEVENT_ACTION, + *dynamic_cast*>(this)); } /** @brief Destructor */ ChargePointHandler20::~ChargePointHandler20() { } @@ -136,21 +130,21 @@ ChargePointHandler20::~ChargePointHandler20() { } * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - BootNotification20 requested"; + LOG_INFO << "[" << m_identifier << "] - BootNotification requested"; // Notify request if (m_handler) { - ret = m_handler->onBootNotification20(request, response, error_code, error_message); + ret = m_handler->onBootNotification(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - BootNotification20 handled"; + LOG_INFO << "[" << m_identifier << "] - BootNotification handled"; } else { @@ -164,21 +158,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::BootNotif * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - Authorize20 requested"; + LOG_INFO << "[" << m_identifier << "] - Authorize requested"; // Notify request if (m_handler) { - ret = m_handler->onAuthorize20(request, response, error_code, error_message); + ret = m_handler->onAuthorize(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - Authorize20 handled"; + LOG_INFO << "[" << m_identifier << "] - Authorize handled"; } else { @@ -192,21 +186,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::Authorize * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - ClearedChargingLimit20 requested"; + LOG_INFO << "[" << m_identifier << "] - ClearedChargingLimit requested"; // Notify request if (m_handler) { - ret = m_handler->onClearedChargingLimit20(request, response, error_code, error_message); + ret = m_handler->onClearedChargingLimit(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - ClearedChargingLimit20 handled"; + LOG_INFO << "[" << m_identifier << "] - ClearedChargingLimit handled"; } else { @@ -220,21 +214,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ClearedCh * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - CostUpdated20 requested"; + LOG_INFO << "[" << m_identifier << "] - CostUpdated requested"; // Notify request if (m_handler) { - ret = m_handler->onCostUpdated20(request, response, error_code, error_message); + ret = m_handler->onCostUpdated(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - CostUpdated20 handled"; + LOG_INFO << "[" << m_identifier << "] - CostUpdated handled"; } else { @@ -248,21 +242,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::CostUpdat * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - DataTransfer20 requested"; + LOG_INFO << "[" << m_identifier << "] - DataTransfer requested"; // Notify request if (m_handler) { - ret = m_handler->onDataTransfer20(request, response, error_code, error_message); + ret = m_handler->onDataTransfer(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - DataTransfer20 handled"; + LOG_INFO << "[" << m_identifier << "] - DataTransfer handled"; } else { @@ -276,21 +270,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::DataTrans * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - FirmwareStatusNotification20 requested"; + LOG_INFO << "[" << m_identifier << "] - FirmwareStatusNotification requested"; // Notify request if (m_handler) { - ret = m_handler->onFirmwareStatusNotification20(request, response, error_code, error_message); + ret = m_handler->onFirmwareStatusNotification(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - FirmwareStatusNotification20 handled"; + LOG_INFO << "[" << m_identifier << "] - FirmwareStatusNotification handled"; } else { @@ -304,21 +298,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::FirmwareS * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - Heartbeat20 requested"; + LOG_INFO << "[" << m_identifier << "] - Heartbeat requested"; // Notify request if (m_handler) { - ret = m_handler->onHeartbeat20(request, response, error_code, error_message); + ret = m_handler->onHeartbeat(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - Heartbeat20 handled"; + LOG_INFO << "[" << m_identifier << "] - Heartbeat handled"; } else { @@ -332,21 +326,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::Heartbeat * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - LogStatusNotification20 requested"; + LOG_INFO << "[" << m_identifier << "] - LogStatusNotification requested"; // Notify request if (m_handler) { - ret = m_handler->onLogStatusNotification20(request, response, error_code, error_message); + ret = m_handler->onLogStatusNotification(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - LogStatusNotification20 handled"; + LOG_INFO << "[" << m_identifier << "] - LogStatusNotification handled"; } else { @@ -360,21 +354,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::LogStatus * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - MeterValues20 requested"; + LOG_INFO << "[" << m_identifier << "] - MeterValues requested"; // Notify request if (m_handler) { - ret = m_handler->onMeterValues20(request, response, error_code, error_message); + ret = m_handler->onMeterValues(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - MeterValues20 handled"; + LOG_INFO << "[" << m_identifier << "] - MeterValues handled"; } else { @@ -388,21 +382,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::MeterValu * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - NotifyChargingLimit20 requested"; + LOG_INFO << "[" << m_identifier << "] - NotifyChargingLimit requested"; // Notify request if (m_handler) { - ret = m_handler->onNotifyChargingLimit20(request, response, error_code, error_message); + ret = m_handler->onNotifyChargingLimit(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - NotifyChargingLimit20 handled"; + LOG_INFO << "[" << m_identifier << "] - NotifyChargingLimit handled"; } else { @@ -416,21 +410,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyCha * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - NotifyCustomerInformation20 requested"; + LOG_INFO << "[" << m_identifier << "] - NotifyCustomerInformation requested"; // Notify request if (m_handler) { - ret = m_handler->onNotifyCustomerInformation20(request, response, error_code, error_message); + ret = m_handler->onNotifyCustomerInformation(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - NotifyCustomerInformation20 handled"; + LOG_INFO << "[" << m_identifier << "] - NotifyCustomerInformation handled"; } else { @@ -444,21 +438,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyCus * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - NotifyDisplayMessages20 requested"; + LOG_INFO << "[" << m_identifier << "] - NotifyDisplayMessages requested"; // Notify request if (m_handler) { - ret = m_handler->onNotifyDisplayMessages20(request, response, error_code, error_message); + ret = m_handler->onNotifyDisplayMessages(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - NotifyDisplayMessages20 handled"; + LOG_INFO << "[" << m_identifier << "] - NotifyDisplayMessages handled"; } else { @@ -472,21 +466,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyDis * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - NotifyEVChargingNeeds20 requested"; + LOG_INFO << "[" << m_identifier << "] - NotifyEVChargingNeeds requested"; // Notify request if (m_handler) { - ret = m_handler->onNotifyEVChargingNeeds20(request, response, error_code, error_message); + ret = m_handler->onNotifyEVChargingNeeds(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - NotifyEVChargingNeeds20 handled"; + LOG_INFO << "[" << m_identifier << "] - NotifyEVChargingNeeds handled"; } else { @@ -500,21 +494,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEVC * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - NotifyEVChargingSchedule20 requested"; + LOG_INFO << "[" << m_identifier << "] - NotifyEVChargingSchedule requested"; // Notify request if (m_handler) { - ret = m_handler->onNotifyEVChargingSchedule20(request, response, error_code, error_message); + ret = m_handler->onNotifyEVChargingSchedule(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - NotifyEVChargingSchedule20 handled"; + LOG_INFO << "[" << m_identifier << "] - NotifyEVChargingSchedule handled"; } else { @@ -528,21 +522,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEVC * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - NotifyEvent20 requested"; + LOG_INFO << "[" << m_identifier << "] - NotifyEvent requested"; // Notify request if (m_handler) { - ret = m_handler->onNotifyEvent20(request, response, error_code, error_message); + ret = m_handler->onNotifyEvent(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - NotifyEvent20 handled"; + LOG_INFO << "[" << m_identifier << "] - NotifyEvent handled"; } else { @@ -556,21 +550,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEve * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - NotifyMonitoringReport20 requested"; + LOG_INFO << "[" << m_identifier << "] - NotifyMonitoringReport requested"; // Notify request if (m_handler) { - ret = m_handler->onNotifyMonitoringReport20(request, response, error_code, error_message); + ret = m_handler->onNotifyMonitoringReport(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - NotifyMonitoringReport20 handled"; + LOG_INFO << "[" << m_identifier << "] - NotifyMonitoringReport handled"; } else { @@ -584,21 +578,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyMon * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - NotifyReport20 requested"; + LOG_INFO << "[" << m_identifier << "] - NotifyReport requested"; // Notify request if (m_handler) { - ret = m_handler->onNotifyReport20(request, response, error_code, error_message); + ret = m_handler->onNotifyReport(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - NotifyReport20 handled"; + LOG_INFO << "[" << m_identifier << "] - NotifyReport handled"; } else { @@ -612,21 +606,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyRep * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - PublishFirmwareStatusNotification20 requested"; + LOG_INFO << "[" << m_identifier << "] - PublishFirmwareStatusNotification requested"; // Notify request if (m_handler) { - ret = m_handler->onPublishFirmwareStatusNotification20(request, response, error_code, error_message); + ret = m_handler->onPublishFirmwareStatusNotification(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - PublishFirmwareStatusNotification20 handled"; + LOG_INFO << "[" << m_identifier << "] - PublishFirmwareStatusNotification handled"; } else { @@ -640,21 +634,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::PublishFi * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - ReportChargingProfiles20 requested"; + LOG_INFO << "[" << m_identifier << "] - ReportChargingProfiles requested"; // Notify request if (m_handler) { - ret = m_handler->onReportChargingProfiles20(request, response, error_code, error_message); + ret = m_handler->onReportChargingProfiles(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - ReportChargingProfiles20 handled"; + LOG_INFO << "[" << m_identifier << "] - ReportChargingProfiles handled"; } else { @@ -668,21 +662,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ReportCha * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - ReservationStatusUpdate20 requested"; + LOG_INFO << "[" << m_identifier << "] - ReservationStatusUpdate requested"; // Notify request if (m_handler) { - ret = m_handler->onReservationStatusUpdate20(request, response, error_code, error_message); + ret = m_handler->onReservationStatusUpdate(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - ReservationStatusUpdate20 handled"; + LOG_INFO << "[" << m_identifier << "] - ReservationStatusUpdate handled"; } else { @@ -696,21 +690,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::Reservati * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - SecurityEventNotification20 requested"; + LOG_INFO << "[" << m_identifier << "] - SecurityEventNotification requested"; // Notify request if (m_handler) { - ret = m_handler->onSecurityEventNotification20(request, response, error_code, error_message); + ret = m_handler->onSecurityEventNotification(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - SecurityEventNotification20 handled"; + LOG_INFO << "[" << m_identifier << "] - SecurityEventNotification handled"; } else { @@ -724,21 +718,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::SecurityE * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - SignCertificate20 requested"; + LOG_INFO << "[" << m_identifier << "] - SignCertificate requested"; // Notify request if (m_handler) { - ret = m_handler->onSignCertificate20(request, response, error_code, error_message); + ret = m_handler->onSignCertificate(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - SignCertificate20 handled"; + LOG_INFO << "[" << m_identifier << "] - SignCertificate handled"; } else { @@ -752,21 +746,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::SignCerti * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - StatusNotification20 requested"; + LOG_INFO << "[" << m_identifier << "] - StatusNotification requested"; // Notify request if (m_handler) { - ret = m_handler->onStatusNotification20(request, response, error_code, error_message); + ret = m_handler->onStatusNotification(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - StatusNotification20 handled"; + LOG_INFO << "[" << m_identifier << "] - StatusNotification handled"; } else { @@ -780,21 +774,21 @@ bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::StatusNot * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::TransactionEventReq& request, + ocpp::messages::ocpp20::TransactionEventConf& response, + std::string& error_code, + std::string& error_message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - TransactionEvent20 requested"; + LOG_INFO << "[" << m_identifier << "] - TransactionEvent requested"; // Notify request if (m_handler) { - ret = m_handler->onTransactionEvent20(request, response, error_code, error_message); + ret = m_handler->onTransactionEvent(request, response, error_code, error_message); - LOG_INFO << "[" << m_identifier << "] - TransactionEvent20 handled"; + LOG_INFO << "[" << m_identifier << "] - TransactionEvent handled"; } else { diff --git a/src/ocpp20/centralsystem/chargepoint/ChargePointHandler20.h b/src/ocpp20/centralsystem/chargepoint/ChargePointHandler20.h index 76fbd6b8..407220e8 100644 --- a/src/ocpp20/centralsystem/chargepoint/ChargePointHandler20.h +++ b/src/ocpp20/centralsystem/chargepoint/ChargePointHandler20.h @@ -72,47 +72,46 @@ class IChargePointRequestHandler20; /** @brief Handler for charge point requests */ class ChargePointHandler20 - : public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler + : public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler { public: /** @@ -138,217 +137,217 @@ class ChargePointHandler20 * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::TransactionEventReq& request, + ocpp::messages::ocpp20::TransactionEventConf& response, + std::string& error_code, + std::string& error_message) override; private: /** @brief Charge point's identifier */ diff --git a/src/ocpp20/centralsystem/chargepoint/ChargePointProxy20.cpp b/src/ocpp20/centralsystem/chargepoint/ChargePointProxy20.cpp index 8c1e20d0..5db3859a 100644 --- a/src/ocpp20/centralsystem/chargepoint/ChargePointProxy20.cpp +++ b/src/ocpp20/centralsystem/chargepoint/ChargePointProxy20.cpp @@ -93,24 +93,24 @@ void ChargePointProxy20::registerHandler(IChargePointRequestHandler20& handler) // OCPP operations /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::CancelReservation20Req&, - ocpp::messages::ocpp20::CancelReservation20Conf&, + const ocpp::messages::ocpp20::CancelReservationReq&, + ocpp::messages::ocpp20::CancelReservationConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - CancelReservation20"; + LOG_INFO << "[" << m_identifier << "] - CancelReservation"; // Send request - CallResult res = m_msg_sender.call(CANCELRESERVATION20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(CANCELRESERVATION_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : CancelReservation20"; + LOG_INFO << "[" << m_identifier << "] - Call done : CancelReservation"; ret = true; } else @@ -121,24 +121,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CancelReservation20R return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::CertificateSigned20Req&, - ocpp::messages::ocpp20::CertificateSigned20Conf&, + const ocpp::messages::ocpp20::CertificateSignedReq&, + ocpp::messages::ocpp20::CertificateSignedConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - CertificateSigned20"; + LOG_INFO << "[" << m_identifier << "] - CertificateSigned"; // Send request - CallResult res = m_msg_sender.call(CERTIFICATESIGNED20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(CERTIFICATESIGNED_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : CertificateSigned20"; + LOG_INFO << "[" << m_identifier << "] - Call done : CertificateSigned"; ret = true; } else @@ -149,24 +149,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CertificateSigned20R return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::ChangeAvailability20Req&, - ocpp::messages::ocpp20::ChangeAvailability20Conf&, + const ocpp::messages::ocpp20::ChangeAvailabilityReq&, + ocpp::messages::ocpp20::ChangeAvailabilityConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - ChangeAvailability20"; + LOG_INFO << "[" << m_identifier << "] - ChangeAvailability"; // Send request - CallResult res = m_msg_sender.call(CHANGEAVAILABILITY20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(CHANGEAVAILABILITY_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : ChangeAvailability20"; + LOG_INFO << "[" << m_identifier << "] - Call done : ChangeAvailability"; ret = true; } else @@ -177,24 +177,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ChangeAvailability20 return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::ClearCache20Req&, - ocpp::messages::ocpp20::ClearCache20Conf&, + const ocpp::messages::ocpp20::ClearCacheReq&, + ocpp::messages::ocpp20::ClearCacheConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - ClearCache20"; + LOG_INFO << "[" << m_identifier << "] - ClearCache"; // Send request - CallResult res = m_msg_sender.call(CLEARCACHE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(CLEARCACHE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : ClearCache20"; + LOG_INFO << "[" << m_identifier << "] - Call done : ClearCache"; ret = true; } else @@ -205,24 +205,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearCache20Req& req return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::ClearChargingProfile20Req&, - ocpp::messages::ocpp20::ClearChargingProfile20Conf&, + const ocpp::messages::ocpp20::ClearChargingProfileReq&, + ocpp::messages::ocpp20::ClearChargingProfileConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - ClearChargingProfile20"; + LOG_INFO << "[" << m_identifier << "] - ClearChargingProfile"; // Send request - CallResult res = m_msg_sender.call(CLEARCHARGINGPROFILE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(CLEARCHARGINGPROFILE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : ClearChargingProfile20"; + LOG_INFO << "[" << m_identifier << "] - Call done : ClearChargingProfile"; ret = true; } else @@ -233,24 +233,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearChargingProfile return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::ClearDisplayMessage20Req&, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf&, + const ocpp::messages::ocpp20::ClearDisplayMessageReq&, + ocpp::messages::ocpp20::ClearDisplayMessageConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - ClearDisplayMessage20"; + LOG_INFO << "[" << m_identifier << "] - ClearDisplayMessage"; // Send request - CallResult res = m_msg_sender.call(CLEARDISPLAYMESSAGE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(CLEARDISPLAYMESSAGE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : ClearDisplayMessage20"; + LOG_INFO << "[" << m_identifier << "] - Call done : ClearDisplayMessage"; ret = true; } else @@ -261,24 +261,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearDisplayMessage2 return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::ClearVariableMonitoring20Req&, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf&, + const ocpp::messages::ocpp20::ClearVariableMonitoringReq&, + ocpp::messages::ocpp20::ClearVariableMonitoringConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - ClearVariableMonitoring20"; + LOG_INFO << "[" << m_identifier << "] - ClearVariableMonitoring"; // Send request - CallResult res = m_msg_sender.call(CLEARVARIABLEMONITORING20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(CLEARVARIABLEMONITORING_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : ClearVariableMonitoring20"; + LOG_INFO << "[" << m_identifier << "] - Call done : ClearVariableMonitoring"; ret = true; } else @@ -289,24 +289,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearVariableMonitor return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::CustomerInformation20Req&, - ocpp::messages::ocpp20::CustomerInformation20Conf&, + const ocpp::messages::ocpp20::CustomerInformationReq&, + ocpp::messages::ocpp20::CustomerInformationConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - CustomerInformation20"; + LOG_INFO << "[" << m_identifier << "] - CustomerInformation"; // Send request - CallResult res = m_msg_sender.call(CUSTOMERINFORMATION20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(CUSTOMERINFORMATION_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : CustomerInformation20"; + LOG_INFO << "[" << m_identifier << "] - Call done : CustomerInformation"; ret = true; } else @@ -317,24 +317,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CustomerInformation2 return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::DataTransfer20Req&, - ocpp::messages::ocpp20::DataTransfer20Conf&, + const ocpp::messages::ocpp20::DataTransferReq&, + ocpp::messages::ocpp20::DataTransferConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - DataTransfer20"; + LOG_INFO << "[" << m_identifier << "] - DataTransfer"; // Send request - CallResult res = m_msg_sender.call(DATATRANSFER20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(DATATRANSFER_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : DataTransfer20"; + LOG_INFO << "[" << m_identifier << "] - Call done : DataTransfer"; ret = true; } else @@ -345,24 +345,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::DataTransfer20Req& r return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::DeleteCertificate20Req&, - ocpp::messages::ocpp20::DeleteCertificate20Conf&, + const ocpp::messages::ocpp20::DeleteCertificateReq&, + ocpp::messages::ocpp20::DeleteCertificateConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - DeleteCertificate20"; + LOG_INFO << "[" << m_identifier << "] - DeleteCertificate"; // Send request - CallResult res = m_msg_sender.call(DELETECERTIFICATE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(DELETECERTIFICATE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : DeleteCertificate20"; + LOG_INFO << "[" << m_identifier << "] - Call done : DeleteCertificate"; ret = true; } else @@ -373,24 +373,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::DeleteCertificate20R return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::Get15118EVCertificate20Req&, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf&, + const ocpp::messages::ocpp20::Get15118EVCertificateReq&, + ocpp::messages::ocpp20::Get15118EVCertificateConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - Get15118EVCertificate20"; + LOG_INFO << "[" << m_identifier << "] - Get15118EVCertificate"; // Send request - CallResult res = m_msg_sender.call(GET15118EVCERTIFICATE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GET15118EVCERTIFICATE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : Get15118EVCertificate20"; + LOG_INFO << "[" << m_identifier << "] - Call done : Get15118EVCertificate"; ret = true; } else @@ -401,24 +401,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::Get15118EVCertificat return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetBaseReport20Req&, - ocpp::messages::ocpp20::GetBaseReport20Conf&, + const ocpp::messages::ocpp20::GetBaseReportReq&, + ocpp::messages::ocpp20::GetBaseReportConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - GetBaseReport20"; + LOG_INFO << "[" << m_identifier << "] - GetBaseReport"; // Send request - CallResult res = m_msg_sender.call(GETBASEREPORT20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GETBASEREPORT_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : GetBaseReport20"; + LOG_INFO << "[" << m_identifier << "] - Call done : GetBaseReport"; ret = true; } else @@ -429,24 +429,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetBaseReport20Req& return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetCertificateStatus20Req&, - ocpp::messages::ocpp20::GetCertificateStatus20Conf&, + const ocpp::messages::ocpp20::GetCertificateStatusReq&, + ocpp::messages::ocpp20::GetCertificateStatusConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - GetCertificateStatus20"; + LOG_INFO << "[" << m_identifier << "] - GetCertificateStatus"; // Send request - CallResult res = m_msg_sender.call(GETCERTIFICATESTATUS20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GETCERTIFICATESTATUS_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : GetCertificateStatus20"; + LOG_INFO << "[" << m_identifier << "] - Call done : GetCertificateStatus"; ret = true; } else @@ -457,24 +457,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetCertificateStatus return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetChargingProfiles20Req&, - ocpp::messages::ocpp20::GetChargingProfiles20Conf&, + const ocpp::messages::ocpp20::GetChargingProfilesReq&, + ocpp::messages::ocpp20::GetChargingProfilesConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - GetChargingProfiles20"; + LOG_INFO << "[" << m_identifier << "] - GetChargingProfiles"; // Send request - CallResult res = m_msg_sender.call(GETCHARGINGPROFILES20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GETCHARGINGPROFILES_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : GetChargingProfiles20"; + LOG_INFO << "[" << m_identifier << "] - Call done : GetChargingProfiles"; ret = true; } else @@ -485,24 +485,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetChargingProfiles2 return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetCompositeSchedule20Req&, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf&, + const ocpp::messages::ocpp20::GetCompositeScheduleReq&, + ocpp::messages::ocpp20::GetCompositeScheduleConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - GetCompositeSchedule20"; + LOG_INFO << "[" << m_identifier << "] - GetCompositeSchedule"; // Send request - CallResult res = m_msg_sender.call(GETCOMPOSITESCHEDULE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GETCOMPOSITESCHEDULE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : GetCompositeSchedule20"; + LOG_INFO << "[" << m_identifier << "] - Call done : GetCompositeSchedule"; ret = true; } else @@ -513,24 +513,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetCompositeSchedule return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetDisplayMessages20Req&, - ocpp::messages::ocpp20::GetDisplayMessages20Conf&, + const ocpp::messages::ocpp20::GetDisplayMessagesReq&, + ocpp::messages::ocpp20::GetDisplayMessagesConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - GetDisplayMessages20"; + LOG_INFO << "[" << m_identifier << "] - GetDisplayMessages"; // Send request - CallResult res = m_msg_sender.call(GETDISPLAYMESSAGES20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GETDISPLAYMESSAGES_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : GetDisplayMessages20"; + LOG_INFO << "[" << m_identifier << "] - Call done : GetDisplayMessages"; ret = true; } else @@ -541,24 +541,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetDisplayMessages20 return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req&, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf&, + const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq&, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - GetInstalledCertificateIds20"; + LOG_INFO << "[" << m_identifier << "] - GetInstalledCertificateIds"; // Send request - CallResult res = m_msg_sender.call(GETINSTALLEDCERTIFICATEIDS20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GETINSTALLEDCERTIFICATEIDS_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : GetInstalledCertificateIds20"; + LOG_INFO << "[" << m_identifier << "] - Call done : GetInstalledCertificateIds"; ret = true; } else @@ -569,24 +569,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetInstalledCertific return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetLocalListVersion20Req&, - ocpp::messages::ocpp20::GetLocalListVersion20Conf&, + const ocpp::messages::ocpp20::GetLocalListVersionReq&, + ocpp::messages::ocpp20::GetLocalListVersionConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - GetLocalListVersion20"; + LOG_INFO << "[" << m_identifier << "] - GetLocalListVersion"; // Send request - CallResult res = m_msg_sender.call(GETLOCALLISTVERSION20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GETLOCALLISTVERSION_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : GetLocalListVersion20"; + LOG_INFO << "[" << m_identifier << "] - Call done : GetLocalListVersion"; ret = true; } else @@ -597,24 +597,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetLocalListVersion2 return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetLog20Req&, - ocpp::messages::ocpp20::GetLog20Conf&, + const ocpp::messages::ocpp20::GetLogReq&, + ocpp::messages::ocpp20::GetLogConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - GetLog20"; + LOG_INFO << "[" << m_identifier << "] - GetLog"; // Send request - CallResult res = m_msg_sender.call(GETLOG20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GETLOG_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : GetLog20"; + LOG_INFO << "[" << m_identifier << "] - Call done : GetLog"; ret = true; } else @@ -625,24 +625,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetLog20Req& request return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetMonitoringReport20Req&, - ocpp::messages::ocpp20::GetMonitoringReport20Conf&, + const ocpp::messages::ocpp20::GetMonitoringReportReq&, + ocpp::messages::ocpp20::GetMonitoringReportConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - GetMonitoringReport20"; + LOG_INFO << "[" << m_identifier << "] - GetMonitoringReport"; // Send request - CallResult res = m_msg_sender.call(GETMONITORINGREPORT20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GETMONITORINGREPORT_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : GetMonitoringReport20"; + LOG_INFO << "[" << m_identifier << "] - Call done : GetMonitoringReport"; ret = true; } else @@ -653,24 +653,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetMonitoringReport2 return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetReport20Req&, - ocpp::messages::ocpp20::GetReport20Conf&, + const ocpp::messages::ocpp20::GetReportReq&, + ocpp::messages::ocpp20::GetReportConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - GetReport20"; + LOG_INFO << "[" << m_identifier << "] - GetReport"; // Send request - CallResult res = m_msg_sender.call(GETREPORT20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GETREPORT_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : GetReport20"; + LOG_INFO << "[" << m_identifier << "] - Call done : GetReport"; ret = true; } else @@ -681,24 +681,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetReport20Req& requ return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetTransactionStatus20Req&, - ocpp::messages::ocpp20::GetTransactionStatus20Conf&, + const ocpp::messages::ocpp20::GetTransactionStatusReq&, + ocpp::messages::ocpp20::GetTransactionStatusConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - GetTransactionStatus20"; + LOG_INFO << "[" << m_identifier << "] - GetTransactionStatus"; // Send request - CallResult res = m_msg_sender.call(GETTRANSACTIONSTATUS20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GETTRANSACTIONSTATUS_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : GetTransactionStatus20"; + LOG_INFO << "[" << m_identifier << "] - Call done : GetTransactionStatus"; ret = true; } else @@ -709,24 +709,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetTransactionStatus return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetVariables20Req&, - ocpp::messages::ocpp20::GetVariables20Conf&, + const ocpp::messages::ocpp20::GetVariablesReq&, + ocpp::messages::ocpp20::GetVariablesConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - GetVariables20"; + LOG_INFO << "[" << m_identifier << "] - GetVariables"; // Send request - CallResult res = m_msg_sender.call(GETVARIABLES20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(GETVARIABLES_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : GetVariables20"; + LOG_INFO << "[" << m_identifier << "] - Call done : GetVariables"; ret = true; } else @@ -737,24 +737,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetVariables20Req& r return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::InstallCertificate20Req&, - ocpp::messages::ocpp20::InstallCertificate20Conf&, + const ocpp::messages::ocpp20::InstallCertificateReq&, + ocpp::messages::ocpp20::InstallCertificateConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - InstallCertificate20"; + LOG_INFO << "[" << m_identifier << "] - InstallCertificate"; // Send request - CallResult res = m_msg_sender.call(INSTALLCERTIFICATE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(INSTALLCERTIFICATE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : InstallCertificate20"; + LOG_INFO << "[" << m_identifier << "] - Call done : InstallCertificate"; ret = true; } else @@ -765,24 +765,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::InstallCertificate20 return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::PublishFirmware20Req&, - ocpp::messages::ocpp20::PublishFirmware20Conf&, + const ocpp::messages::ocpp20::PublishFirmwareReq&, + ocpp::messages::ocpp20::PublishFirmwareConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - PublishFirmware20"; + LOG_INFO << "[" << m_identifier << "] - PublishFirmware"; // Send request - CallResult res = m_msg_sender.call(PUBLISHFIRMWARE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(PUBLISHFIRMWARE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : PublishFirmware20"; + LOG_INFO << "[" << m_identifier << "] - Call done : PublishFirmware"; ret = true; } else @@ -793,24 +793,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::PublishFirmware20Req return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::RequestStartTransaction20Req&, - ocpp::messages::ocpp20::RequestStartTransaction20Conf&, + const ocpp::messages::ocpp20::RequestStartTransactionReq&, + ocpp::messages::ocpp20::RequestStartTransactionConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - RequestStartTransaction20"; + LOG_INFO << "[" << m_identifier << "] - RequestStartTransaction"; // Send request - CallResult res = m_msg_sender.call(REQUESTSTARTTRANSACTION20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(REQUESTSTARTTRANSACTION_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : RequestStartTransaction20"; + LOG_INFO << "[" << m_identifier << "] - Call done : RequestStartTransaction"; ret = true; } else @@ -821,24 +821,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStartTransact return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::RequestStopTransaction20Req&, - ocpp::messages::ocpp20::RequestStopTransaction20Conf&, + const ocpp::messages::ocpp20::RequestStopTransactionReq&, + ocpp::messages::ocpp20::RequestStopTransactionConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - RequestStopTransaction20"; + LOG_INFO << "[" << m_identifier << "] - RequestStopTransaction"; // Send request - CallResult res = m_msg_sender.call(REQUESTSTOPTRANSACTION20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(REQUESTSTOPTRANSACTION_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : RequestStopTransaction20"; + LOG_INFO << "[" << m_identifier << "] - Call done : RequestStopTransaction"; ret = true; } else @@ -849,24 +849,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStopTransacti return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::ReserveNow20Req&, - ocpp::messages::ocpp20::ReserveNow20Conf&, + const ocpp::messages::ocpp20::ReserveNowReq&, + ocpp::messages::ocpp20::ReserveNowConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - ReserveNow20"; + LOG_INFO << "[" << m_identifier << "] - ReserveNow"; // Send request - CallResult res = m_msg_sender.call(RESERVENOW20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(RESERVENOW_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : ReserveNow20"; + LOG_INFO << "[" << m_identifier << "] - Call done : ReserveNow"; ret = true; } else @@ -877,24 +877,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ReserveNow20Req& req return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::Reset20Req&, - ocpp::messages::ocpp20::Reset20Conf&, + const ocpp::messages::ocpp20::ResetReq&, + ocpp::messages::ocpp20::ResetConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - Reset20"; + LOG_INFO << "[" << m_identifier << "] - Reset"; // Send request - CallResult res = m_msg_sender.call(RESET20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(RESET_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : Reset20"; + LOG_INFO << "[" << m_identifier << "] - Call done : Reset"; ret = true; } else @@ -905,24 +905,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::Reset20Req& request, return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SendLocalList20Req&, - ocpp::messages::ocpp20::SendLocalList20Conf&, + const ocpp::messages::ocpp20::SendLocalListReq&, + ocpp::messages::ocpp20::SendLocalListConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - SendLocalList20"; + LOG_INFO << "[" << m_identifier << "] - SendLocalList"; // Send request - CallResult res = m_msg_sender.call(SENDLOCALLIST20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(SENDLOCALLIST_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : SendLocalList20"; + LOG_INFO << "[" << m_identifier << "] - Call done : SendLocalList"; ret = true; } else @@ -933,24 +933,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SendLocalList20Req& return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetChargingProfile20Req&, - ocpp::messages::ocpp20::SetChargingProfile20Conf&, + const ocpp::messages::ocpp20::SetChargingProfileReq&, + ocpp::messages::ocpp20::SetChargingProfileConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - SetChargingProfile20"; + LOG_INFO << "[" << m_identifier << "] - SetChargingProfile"; // Send request - CallResult res = m_msg_sender.call(SETCHARGINGPROFILE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(SETCHARGINGPROFILE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : SetChargingProfile20"; + LOG_INFO << "[" << m_identifier << "] - Call done : SetChargingProfile"; ret = true; } else @@ -961,24 +961,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetChargingProfile20 return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetDisplayMessage20Req&, - ocpp::messages::ocpp20::SetDisplayMessage20Conf&, + const ocpp::messages::ocpp20::SetDisplayMessageReq&, + ocpp::messages::ocpp20::SetDisplayMessageConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - SetDisplayMessage20"; + LOG_INFO << "[" << m_identifier << "] - SetDisplayMessage"; // Send request - CallResult res = m_msg_sender.call(SETDISPLAYMESSAGE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(SETDISPLAYMESSAGE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : SetDisplayMessage20"; + LOG_INFO << "[" << m_identifier << "] - Call done : SetDisplayMessage"; ret = true; } else @@ -989,24 +989,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetDisplayMessage20R return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetMonitoringBase20Req&, - ocpp::messages::ocpp20::SetMonitoringBase20Conf&, + const ocpp::messages::ocpp20::SetMonitoringBaseReq&, + ocpp::messages::ocpp20::SetMonitoringBaseConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - SetMonitoringBase20"; + LOG_INFO << "[" << m_identifier << "] - SetMonitoringBase"; // Send request - CallResult res = m_msg_sender.call(SETMONITORINGBASE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(SETMONITORINGBASE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : SetMonitoringBase20"; + LOG_INFO << "[" << m_identifier << "] - Call done : SetMonitoringBase"; ret = true; } else @@ -1017,24 +1017,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringBase20R return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetMonitoringLevel20Req&, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf&, + const ocpp::messages::ocpp20::SetMonitoringLevelReq&, + ocpp::messages::ocpp20::SetMonitoringLevelConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - SetMonitoringLevel20"; + LOG_INFO << "[" << m_identifier << "] - SetMonitoringLevel"; // Send request - CallResult res = m_msg_sender.call(SETMONITORINGLEVEL20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(SETMONITORINGLEVEL_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : SetMonitoringLevel20"; + LOG_INFO << "[" << m_identifier << "] - Call done : SetMonitoringLevel"; ret = true; } else @@ -1045,24 +1045,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringLevel20 return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetNetworkProfile20Req&, - ocpp::messages::ocpp20::SetNetworkProfile20Conf&, + const ocpp::messages::ocpp20::SetNetworkProfileReq&, + ocpp::messages::ocpp20::SetNetworkProfileConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - SetNetworkProfile20"; + LOG_INFO << "[" << m_identifier << "] - SetNetworkProfile"; // Send request - CallResult res = m_msg_sender.call(SETNETWORKPROFILE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(SETNETWORKPROFILE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : SetNetworkProfile20"; + LOG_INFO << "[" << m_identifier << "] - Call done : SetNetworkProfile"; ret = true; } else @@ -1073,24 +1073,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetNetworkProfile20R return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetVariableMonitoring20Req&, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf&, + const ocpp::messages::ocpp20::SetVariableMonitoringReq&, + ocpp::messages::ocpp20::SetVariableMonitoringConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - SetVariableMonitoring20"; + LOG_INFO << "[" << m_identifier << "] - SetVariableMonitoring"; // Send request - CallResult res = m_msg_sender.call(SETVARIABLEMONITORING20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(SETVARIABLEMONITORING_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : SetVariableMonitoring20"; + LOG_INFO << "[" << m_identifier << "] - Call done : SetVariableMonitoring"; ret = true; } else @@ -1101,24 +1101,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariableMonitorin return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetVariables20Req&, - ocpp::messages::ocpp20::SetVariables20Conf&, + const ocpp::messages::ocpp20::SetVariablesReq&, + ocpp::messages::ocpp20::SetVariablesConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - SetVariables20"; + LOG_INFO << "[" << m_identifier << "] - SetVariables"; // Send request - CallResult res = m_msg_sender.call(SETVARIABLES20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(SETVARIABLES_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : SetVariables20"; + LOG_INFO << "[" << m_identifier << "] - Call done : SetVariables"; ret = true; } else @@ -1129,24 +1129,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariables20Req& r return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::TriggerMessage20Req&, - ocpp::messages::ocpp20::TriggerMessage20Conf&, + const ocpp::messages::ocpp20::TriggerMessageReq&, + ocpp::messages::ocpp20::TriggerMessageConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - TriggerMessage20"; + LOG_INFO << "[" << m_identifier << "] - TriggerMessage"; // Send request - CallResult res = m_msg_sender.call(TRIGGERMESSAGE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(TRIGGERMESSAGE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : TriggerMessage20"; + LOG_INFO << "[" << m_identifier << "] - Call done : TriggerMessage"; ret = true; } else @@ -1157,24 +1157,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::TriggerMessage20Req& return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::UnlockConnector20Req&, - ocpp::messages::ocpp20::UnlockConnector20Conf&, + const ocpp::messages::ocpp20::UnlockConnectorReq&, + ocpp::messages::ocpp20::UnlockConnectorConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - UnlockConnector20"; + LOG_INFO << "[" << m_identifier << "] - UnlockConnector"; // Send request - CallResult res = m_msg_sender.call(UNLOCKCONNECTOR20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(UNLOCKCONNECTOR_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : UnlockConnector20"; + LOG_INFO << "[" << m_identifier << "] - Call done : UnlockConnector"; ret = true; } else @@ -1185,24 +1185,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UnlockConnector20Req return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::UnpublishFirmware20Req&, - ocpp::messages::ocpp20::UnpublishFirmware20Conf&, + const ocpp::messages::ocpp20::UnpublishFirmwareReq&, + ocpp::messages::ocpp20::UnpublishFirmwareConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - UnpublishFirmware20"; + LOG_INFO << "[" << m_identifier << "] - UnpublishFirmware"; // Send request - CallResult res = m_msg_sender.call(UNPUBLISHFIRMWARE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(UNPUBLISHFIRMWARE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : UnpublishFirmware20"; + LOG_INFO << "[" << m_identifier << "] - Call done : UnpublishFirmware"; ret = true; } else @@ -1213,24 +1213,24 @@ bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UnpublishFirmware20R return ret; } /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::UpdateFirmware20Req&, - ocpp::messages::ocpp20::UpdateFirmware20Conf&, + const ocpp::messages::ocpp20::UpdateFirmwareReq&, + ocpp::messages::ocpp20::UpdateFirmwareConf&, std::string&, std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error, + std::string& message) { bool ret = false; - LOG_INFO << "[" << m_identifier << "] - UpdateFirmware20"; + LOG_INFO << "[" << m_identifier << "] - UpdateFirmware"; // Send request - CallResult res = m_msg_sender.call(UPDATEFIRMWARE20_ACTION, request, response, error, message); + CallResult res = m_msg_sender.call(UPDATEFIRMWARE_ACTION, request, response, error, message); if (res == CallResult::Ok) { - LOG_INFO << "[" << m_identifier << "] - Call done : UpdateFirmware20"; + LOG_INFO << "[" << m_identifier << "] - Call done : UpdateFirmware"; ret = true; } else diff --git a/src/ocpp20/centralsystem/chargepoint/ChargePointProxy20.h b/src/ocpp20/centralsystem/chargepoint/ChargePointProxy20.h index 4fd93cef..735c5f44 100644 --- a/src/ocpp20/centralsystem/chargepoint/ChargePointProxy20.h +++ b/src/ocpp20/centralsystem/chargepoint/ChargePointProxy20.h @@ -86,374 +86,374 @@ class ChargePointProxy20 : public ICentralSystem20::IChargePoint20, public ocpp: // OCPP operations /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::CancelReservation20Req&, - ocpp::messages::ocpp20::CancelReservation20Conf&, + const ocpp::messages::ocpp20::CancelReservationReq&, + ocpp::messages::ocpp20::CancelReservationConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::CertificateSigned20Req&, - ocpp::messages::ocpp20::CertificateSigned20Conf&, + const ocpp::messages::ocpp20::CertificateSignedReq&, + ocpp::messages::ocpp20::CertificateSignedConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::ChangeAvailability20Req&, - ocpp::messages::ocpp20::ChangeAvailability20Conf&, + const ocpp::messages::ocpp20::ChangeAvailabilityReq&, + ocpp::messages::ocpp20::ChangeAvailabilityConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::ClearCache20Req&, - ocpp::messages::ocpp20::ClearCache20Conf&, + const ocpp::messages::ocpp20::ClearCacheReq&, + ocpp::messages::ocpp20::ClearCacheConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::ClearChargingProfile20Req&, - ocpp::messages::ocpp20::ClearChargingProfile20Conf&, + const ocpp::messages::ocpp20::ClearChargingProfileReq&, + ocpp::messages::ocpp20::ClearChargingProfileConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::ClearDisplayMessage20Req&, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf&, + const ocpp::messages::ocpp20::ClearDisplayMessageReq&, + ocpp::messages::ocpp20::ClearDisplayMessageConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::ClearVariableMonitoring20Req&, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf&, + const ocpp::messages::ocpp20::ClearVariableMonitoringReq&, + ocpp::messages::ocpp20::ClearVariableMonitoringConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::CustomerInformation20Req&, - ocpp::messages::ocpp20::CustomerInformation20Conf&, + const ocpp::messages::ocpp20::CustomerInformationReq&, + ocpp::messages::ocpp20::CustomerInformationConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::DataTransfer20Req&, - ocpp::messages::ocpp20::DataTransfer20Conf&, + const ocpp::messages::ocpp20::DataTransferReq&, + ocpp::messages::ocpp20::DataTransferConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::DeleteCertificate20Req&, - ocpp::messages::ocpp20::DeleteCertificate20Conf&, + const ocpp::messages::ocpp20::DeleteCertificateReq&, + ocpp::messages::ocpp20::DeleteCertificateConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::Get15118EVCertificate20Req&, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf&, + const ocpp::messages::ocpp20::Get15118EVCertificateReq&, + ocpp::messages::ocpp20::Get15118EVCertificateConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetBaseReport20Req&, - ocpp::messages::ocpp20::GetBaseReport20Conf&, + const ocpp::messages::ocpp20::GetBaseReportReq&, + ocpp::messages::ocpp20::GetBaseReportConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetCertificateStatus20Req&, - ocpp::messages::ocpp20::GetCertificateStatus20Conf&, + const ocpp::messages::ocpp20::GetCertificateStatusReq&, + ocpp::messages::ocpp20::GetCertificateStatusConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetChargingProfiles20Req&, - ocpp::messages::ocpp20::GetChargingProfiles20Conf&, + const ocpp::messages::ocpp20::GetChargingProfilesReq&, + ocpp::messages::ocpp20::GetChargingProfilesConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetCompositeSchedule20Req&, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf&, + const ocpp::messages::ocpp20::GetCompositeScheduleReq&, + ocpp::messages::ocpp20::GetCompositeScheduleConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetDisplayMessages20Req&, - ocpp::messages::ocpp20::GetDisplayMessages20Conf&, + const ocpp::messages::ocpp20::GetDisplayMessagesReq&, + ocpp::messages::ocpp20::GetDisplayMessagesConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req&, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf&, + const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq&, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetLocalListVersion20Req&, - ocpp::messages::ocpp20::GetLocalListVersion20Conf&, + const ocpp::messages::ocpp20::GetLocalListVersionReq&, + ocpp::messages::ocpp20::GetLocalListVersionConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetLog20Req&, - ocpp::messages::ocpp20::GetLog20Conf&, + const ocpp::messages::ocpp20::GetLogReq&, + ocpp::messages::ocpp20::GetLogConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetMonitoringReport20Req&, - ocpp::messages::ocpp20::GetMonitoringReport20Conf&, + const ocpp::messages::ocpp20::GetMonitoringReportReq&, + ocpp::messages::ocpp20::GetMonitoringReportConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetReport20Req&, - ocpp::messages::ocpp20::GetReport20Conf&, + const ocpp::messages::ocpp20::GetReportReq&, + ocpp::messages::ocpp20::GetReportConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetTransactionStatus20Req&, - ocpp::messages::ocpp20::GetTransactionStatus20Conf&, + const ocpp::messages::ocpp20::GetTransactionStatusReq&, + ocpp::messages::ocpp20::GetTransactionStatusConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::GetVariables20Req&, - ocpp::messages::ocpp20::GetVariables20Conf&, + const ocpp::messages::ocpp20::GetVariablesReq&, + ocpp::messages::ocpp20::GetVariablesConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::InstallCertificate20Req&, - ocpp::messages::ocpp20::InstallCertificate20Conf&, + const ocpp::messages::ocpp20::InstallCertificateReq&, + ocpp::messages::ocpp20::InstallCertificateConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::PublishFirmware20Req&, - ocpp::messages::ocpp20::PublishFirmware20Conf&, + const ocpp::messages::ocpp20::PublishFirmwareReq&, + ocpp::messages::ocpp20::PublishFirmwareConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::RequestStartTransaction20Req&, - ocpp::messages::ocpp20::RequestStartTransaction20Conf&, + const ocpp::messages::ocpp20::RequestStartTransactionReq&, + ocpp::messages::ocpp20::RequestStartTransactionConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::RequestStopTransaction20Req&, - ocpp::messages::ocpp20::RequestStopTransaction20Conf&, + const ocpp::messages::ocpp20::RequestStopTransactionReq&, + ocpp::messages::ocpp20::RequestStopTransactionConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::ReserveNow20Req&, - ocpp::messages::ocpp20::ReserveNow20Conf&, + const ocpp::messages::ocpp20::ReserveNowReq&, + ocpp::messages::ocpp20::ReserveNowConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::Reset20Req&, - ocpp::messages::ocpp20::Reset20Conf&, + const ocpp::messages::ocpp20::ResetReq&, + ocpp::messages::ocpp20::ResetConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SendLocalList20Req&, - ocpp::messages::ocpp20::SendLocalList20Conf&, + const ocpp::messages::ocpp20::SendLocalListReq&, + ocpp::messages::ocpp20::SendLocalListConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetChargingProfile20Req&, - ocpp::messages::ocpp20::SetChargingProfile20Conf&, + const ocpp::messages::ocpp20::SetChargingProfileReq&, + ocpp::messages::ocpp20::SetChargingProfileConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetDisplayMessage20Req&, - ocpp::messages::ocpp20::SetDisplayMessage20Conf&, + const ocpp::messages::ocpp20::SetDisplayMessageReq&, + ocpp::messages::ocpp20::SetDisplayMessageConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetMonitoringBase20Req&, - ocpp::messages::ocpp20::SetMonitoringBase20Conf&, + const ocpp::messages::ocpp20::SetMonitoringBaseReq&, + ocpp::messages::ocpp20::SetMonitoringBaseConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetMonitoringLevel20Req&, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf&, + const ocpp::messages::ocpp20::SetMonitoringLevelReq&, + ocpp::messages::ocpp20::SetMonitoringLevelConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetNetworkProfile20Req&, - ocpp::messages::ocpp20::SetNetworkProfile20Conf&, + const ocpp::messages::ocpp20::SetNetworkProfileReq&, + ocpp::messages::ocpp20::SetNetworkProfileConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetVariableMonitoring20Req&, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf&, + const ocpp::messages::ocpp20::SetVariableMonitoringReq&, + ocpp::messages::ocpp20::SetVariableMonitoringConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::SetVariables20Req&, - ocpp::messages::ocpp20::SetVariables20Conf&, + const ocpp::messages::ocpp20::SetVariablesReq&, + ocpp::messages::ocpp20::SetVariablesConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, + bool call(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystem20::IChargePoint20::call( + const ocpp::messages::ocpp20::TriggerMessageReq&, + ocpp::messages::ocpp20::TriggerMessageConf&, + std::string&, + std::string&) */ + bool call(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, std::string& error, std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::TriggerMessage20Req&, - ocpp::messages::ocpp20::TriggerMessage20Conf&, + const ocpp::messages::ocpp20::UnlockConnectorReq&, + ocpp::messages::ocpp20::UnlockConnectorConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::UnlockConnector20Req&, - ocpp::messages::ocpp20::UnlockConnector20Conf&, + const ocpp::messages::ocpp20::UnpublishFirmwareReq&, + ocpp::messages::ocpp20::UnpublishFirmwareConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, + bool call(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, std::string& error, std::string& message) override; /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::UnpublishFirmware20Req&, - ocpp::messages::ocpp20::UnpublishFirmware20Conf&, + const ocpp::messages::ocpp20::UpdateFirmwareReq&, + ocpp::messages::ocpp20::UpdateFirmwareConf&, std::string&, std::string&) */ - bool call(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystem20::IChargePoint20::call( - const ocpp::messages::ocpp20::UpdateFirmware20Req&, - ocpp::messages::ocpp20::UpdateFirmware20Conf&, - std::string&, - std::string&) */ - bool call(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error, + std::string& message) override; // IRpc::IListener interface diff --git a/src/ocpp20/centralsystem/interface/ICentralSystem20.h b/src/ocpp20/centralsystem/interface/ICentralSystem20.h index dc13a9ea..166a5bb8 100644 --- a/src/ocpp20/centralsystem/interface/ICentralSystem20.h +++ b/src/ocpp20/centralsystem/interface/ICentralSystem20.h @@ -190,497 +190,497 @@ class ICentralSystem20 // OCPP operations /** - * @brief Send a CancelReservation20 message to the charge point + * @brief Send a CancelReservation message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a CertificateSigned20 message to the charge point + * @brief Send a CertificateSigned message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ChangeAvailability20 message to the charge point + * @brief Send a ChangeAvailability message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ClearCache20 message to the charge point + * @brief Send a ClearCache message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ClearChargingProfile20 message to the charge point + * @brief Send a ClearChargingProfile message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ClearDisplayMessage20 message to the charge point + * @brief Send a ClearDisplayMessage message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ClearVariableMonitoring20 message to the charge point + * @brief Send a ClearVariableMonitoring message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a CustomerInformation20 message to the charge point + * @brief Send a CustomerInformation message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a DataTransfer20 message to the charge point + * @brief Send a DataTransfer message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a DeleteCertificate20 message to the charge point + * @brief Send a DeleteCertificate message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a Get15118EVCertificate20 message to the charge point + * @brief Send a Get15118EVCertificate message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetBaseReport20 message to the charge point + * @brief Send a GetBaseReport message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetCertificateStatus20 message to the charge point + * @brief Send a GetCertificateStatus message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetChargingProfiles20 message to the charge point + * @brief Send a GetChargingProfiles message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetCompositeSchedule20 message to the charge point + * @brief Send a GetCompositeSchedule message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetDisplayMessages20 message to the charge point + * @brief Send a GetDisplayMessages message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetInstalledCertificateIds20 message to the charge point + * @brief Send a GetInstalledCertificateIds message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetLocalListVersion20 message to the charge point + * @brief Send a GetLocalListVersion message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetLog20 message to the charge point + * @brief Send a GetLog message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetMonitoringReport20 message to the charge point + * @brief Send a GetMonitoringReport message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetReport20 message to the charge point + * @brief Send a GetReport message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetTransactionStatus20 message to the charge point + * @brief Send a GetTransactionStatus message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetVariables20 message to the charge point + * @brief Send a GetVariables message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a InstallCertificate20 message to the charge point + * @brief Send a InstallCertificate message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a PublishFirmware20 message to the charge point + * @brief Send a PublishFirmware message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a RequestStartTransaction20 message to the charge point + * @brief Send a RequestStartTransaction message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a RequestStopTransaction20 message to the charge point + * @brief Send a RequestStopTransaction message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ReserveNow20 message to the charge point + * @brief Send a ReserveNow message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a Reset20 message to the charge point + * @brief Send a Reset message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SendLocalList20 message to the charge point + * @brief Send a SendLocalList message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetChargingProfile20 message to the charge point + * @brief Send a SetChargingProfile message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetDisplayMessage20 message to the charge point + * @brief Send a SetDisplayMessage message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetMonitoringBase20 message to the charge point + * @brief Send a SetMonitoringBase message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetMonitoringLevel20 message to the charge point + * @brief Send a SetMonitoringLevel message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetNetworkProfile20 message to the charge point + * @brief Send a SetNetworkProfile message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetVariableMonitoring20 message to the charge point + * @brief Send a SetVariableMonitoring message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetVariables20 message to the charge point + * @brief Send a SetVariables message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a TriggerMessage20 message to the charge point + * @brief Send a TriggerMessage message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a UnlockConnector20 message to the charge point + * @brief Send a UnlockConnector message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a UnpublishFirmware20 message to the charge point + * @brief Send a UnpublishFirmware message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a UpdateFirmware20 message to the charge point + * @brief Send a UpdateFirmware message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error, + std::string& message) = 0; }; }; diff --git a/src/ocpp20/centralsystem/interface/IChargePointRequestHandler20.h b/src/ocpp20/centralsystem/interface/IChargePointRequestHandler20.h index 22bf694d..8f41217d 100644 --- a/src/ocpp20/centralsystem/interface/IChargePointRequestHandler20.h +++ b/src/ocpp20/centralsystem/interface/IChargePointRequestHandler20.h @@ -64,293 +64,293 @@ class IChargePointRequestHandler20 /** @brief Called to notify the disconnection of the charge point */ virtual void disconnected() = 0; /** - * @brief Called on reception of a BootNotification20 request from the charge point + * @brief Called on reception of a BootNotification request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onBootNotification20(const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onBootNotification(const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a Authorize20 request from the charge point + * @brief Called on reception of a Authorize request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onAuthorize20(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onAuthorize(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a ClearedChargingLimit20 request from the charge point + * @brief Called on reception of a ClearedChargingLimit request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onClearedChargingLimit20(const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onClearedChargingLimit(const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a CostUpdated20 request from the charge point + * @brief Called on reception of a CostUpdated request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onCostUpdated20(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onCostUpdated(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a DataTransfer20 request from the charge point + * @brief Called on reception of a DataTransfer request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onDataTransfer20(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onDataTransfer(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a FirmwareStatusNotification20 request from the charge point + * @brief Called on reception of a FirmwareStatusNotification request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onFirmwareStatusNotification20(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onFirmwareStatusNotification(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a Heartbeat20 request from the charge point + * @brief Called on reception of a Heartbeat request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onHeartbeat20(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onHeartbeat(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a LogStatusNotification20 request from the charge point + * @brief Called on reception of a LogStatusNotification request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onLogStatusNotification20(const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onLogStatusNotification(const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a MeterValues20 request from the charge point + * @brief Called on reception of a MeterValues request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onMeterValues20(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onMeterValues(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a NotifyChargingLimit20 request from the charge point + * @brief Called on reception of a NotifyChargingLimit request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onNotifyChargingLimit20(const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onNotifyChargingLimit(const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a NotifyCustomerInformation20 request from the charge point + * @brief Called on reception of a NotifyCustomerInformation request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onNotifyCustomerInformation20(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onNotifyCustomerInformation(const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a NotifyDisplayMessages20 request from the charge point + * @brief Called on reception of a NotifyDisplayMessages request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onNotifyDisplayMessages20(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onNotifyDisplayMessages(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a NotifyEVChargingNeeds20 request from the charge point + * @brief Called on reception of a NotifyEVChargingNeeds request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onNotifyEVChargingNeeds20(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onNotifyEVChargingNeeds(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a NotifyEVChargingSchedule20 request from the charge point + * @brief Called on reception of a NotifyEVChargingSchedule request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onNotifyEVChargingSchedule20(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onNotifyEVChargingSchedule(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a NotifyEvent20 request from the charge point + * @brief Called on reception of a NotifyEvent request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onNotifyEvent20(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onNotifyEvent(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a NotifyMonitoringReport20 request from the charge point + * @brief Called on reception of a NotifyMonitoringReport request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onNotifyMonitoringReport20(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onNotifyMonitoringReport(const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a NotifyReport20 request from the charge point + * @brief Called on reception of a NotifyReport request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onNotifyReport20(const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onNotifyReport(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a PublishFirmwareStatusNotification20 request from the charge point + * @brief Called on reception of a PublishFirmwareStatusNotification request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onPublishFirmwareStatusNotification20(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onPublishFirmwareStatusNotification(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a ReportChargingProfiles20 request from the charge point + * @brief Called on reception of a ReportChargingProfiles request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onReportChargingProfiles20(const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onReportChargingProfiles(const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a ReservationStatusUpdate20 request from the charge point + * @brief Called on reception of a ReservationStatusUpdate request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onReservationStatusUpdate20(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onReservationStatusUpdate(const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a SecurityEventNotification20 request from the charge point + * @brief Called on reception of a SecurityEventNotification request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onSecurityEventNotification20(const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onSecurityEventNotification(const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a SignCertificate20 request from the charge point + * @brief Called on reception of a SignCertificate request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onSignCertificate20(const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onSignCertificate(const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a StatusNotification20 request from the charge point + * @brief Called on reception of a StatusNotification request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onStatusNotification20(const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onStatusNotification(const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a TransactionEvent20 request from the charge point + * @brief Called on reception of a TransactionEvent request from the charge point * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been handled and a response must be sent, false otherwise */ - virtual bool onTransactionEvent20(const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onTransactionEvent(const ocpp::messages::ocpp20::TransactionEventReq& request, + ocpp::messages::ocpp20::TransactionEventConf& response, + std::string& error, + std::string& message) = 0; }; } // namespace ocpp20 diff --git a/src/ocpp20/chargepoint/ChargePoint20.cpp b/src/ocpp20/chargepoint/ChargePoint20.cpp index 013d31ff..13001061 100644 --- a/src/ocpp20/chargepoint/ChargePoint20.cpp +++ b/src/ocpp20/chargepoint/ChargePoint20.cpp @@ -72,51 +72,48 @@ ChargePoint20::ChargePoint20(const ocpp::config::IChargePointConfig20& std::shared_ptr timer_pool, std::shared_ptr worker_pool, std::unique_ptr&& messages_converter) - : GenericMessageHandler(CANCELRESERVATION20_ACTION, *messages_converter), - GenericMessageHandler(CERTIFICATESIGNED20_ACTION, *messages_converter), - GenericMessageHandler(CHANGEAVAILABILITY20_ACTION, *messages_converter), - GenericMessageHandler(CLEARCACHE20_ACTION, *messages_converter), - GenericMessageHandler(CLEARCHARGINGPROFILE20_ACTION, *messages_converter), - GenericMessageHandler(CLEARDISPLAYMESSAGE20_ACTION, *messages_converter), - GenericMessageHandler(CLEARVARIABLEMONITORING20_ACTION, - *messages_converter), - GenericMessageHandler(CUSTOMERINFORMATION20_ACTION, *messages_converter), - GenericMessageHandler(DATATRANSFER20_ACTION, *messages_converter), - GenericMessageHandler(DELETECERTIFICATE20_ACTION, *messages_converter), - GenericMessageHandler(GET15118EVCERTIFICATE20_ACTION, *messages_converter), - GenericMessageHandler(GETBASEREPORT20_ACTION, *messages_converter), - GenericMessageHandler(GETCERTIFICATESTATUS20_ACTION, *messages_converter), - GenericMessageHandler(GETCHARGINGPROFILES20_ACTION, *messages_converter), - GenericMessageHandler(GETCOMPOSITESCHEDULE20_ACTION, *messages_converter), - GenericMessageHandler(GETDISPLAYMESSAGES20_ACTION, *messages_converter), - GenericMessageHandler(GETINSTALLEDCERTIFICATEIDS20_ACTION, - *messages_converter), - GenericMessageHandler(GETLOCALLISTVERSION20_ACTION, *messages_converter), - GenericMessageHandler(GETLOG20_ACTION, *messages_converter), - GenericMessageHandler(GETMONITORINGREPORT20_ACTION, *messages_converter), - GenericMessageHandler(GETREPORT20_ACTION, *messages_converter), - GenericMessageHandler(GETTRANSACTIONSTATUS20_ACTION, *messages_converter), - GenericMessageHandler(GETVARIABLES20_ACTION, *messages_converter), - GenericMessageHandler(INSTALLCERTIFICATE20_ACTION, *messages_converter), - GenericMessageHandler(PUBLISHFIRMWARE20_ACTION, *messages_converter), - GenericMessageHandler(REQUESTSTARTTRANSACTION20_ACTION, - *messages_converter), - GenericMessageHandler(REQUESTSTOPTRANSACTION20_ACTION, - *messages_converter), - GenericMessageHandler(RESERVENOW20_ACTION, *messages_converter), - GenericMessageHandler(RESET20_ACTION, *messages_converter), - GenericMessageHandler(SENDLOCALLIST20_ACTION, *messages_converter), - GenericMessageHandler(SETCHARGINGPROFILE20_ACTION, *messages_converter), - GenericMessageHandler(SETDISPLAYMESSAGE20_ACTION, *messages_converter), - GenericMessageHandler(SETMONITORINGBASE20_ACTION, *messages_converter), - GenericMessageHandler(SETMONITORINGLEVEL20_ACTION, *messages_converter), - GenericMessageHandler(SETNETWORKPROFILE20_ACTION, *messages_converter), - GenericMessageHandler(SETVARIABLEMONITORING20_ACTION, *messages_converter), - GenericMessageHandler(SETVARIABLES20_ACTION, *messages_converter), - GenericMessageHandler(TRIGGERMESSAGE20_ACTION, *messages_converter), - GenericMessageHandler(UNLOCKCONNECTOR20_ACTION, *messages_converter), - GenericMessageHandler(UNPUBLISHFIRMWARE20_ACTION, *messages_converter), - GenericMessageHandler(UPDATEFIRMWARE20_ACTION, *messages_converter), + : GenericMessageHandler(CANCELRESERVATION_ACTION, *messages_converter), + GenericMessageHandler(CERTIFICATESIGNED_ACTION, *messages_converter), + GenericMessageHandler(CHANGEAVAILABILITY_ACTION, *messages_converter), + GenericMessageHandler(CLEARCACHE_ACTION, *messages_converter), + GenericMessageHandler(CLEARCHARGINGPROFILE_ACTION, *messages_converter), + GenericMessageHandler(CLEARDISPLAYMESSAGE_ACTION, *messages_converter), + GenericMessageHandler(CLEARVARIABLEMONITORING_ACTION, *messages_converter), + GenericMessageHandler(CUSTOMERINFORMATION_ACTION, *messages_converter), + GenericMessageHandler(DATATRANSFER_ACTION, *messages_converter), + GenericMessageHandler(DELETECERTIFICATE_ACTION, *messages_converter), + GenericMessageHandler(GET15118EVCERTIFICATE_ACTION, *messages_converter), + GenericMessageHandler(GETBASEREPORT_ACTION, *messages_converter), + GenericMessageHandler(GETCERTIFICATESTATUS_ACTION, *messages_converter), + GenericMessageHandler(GETCHARGINGPROFILES_ACTION, *messages_converter), + GenericMessageHandler(GETCOMPOSITESCHEDULE_ACTION, *messages_converter), + GenericMessageHandler(GETDISPLAYMESSAGES_ACTION, *messages_converter), + GenericMessageHandler(GETINSTALLEDCERTIFICATEIDS_ACTION, + *messages_converter), + GenericMessageHandler(GETLOCALLISTVERSION_ACTION, *messages_converter), + GenericMessageHandler(GETLOG_ACTION, *messages_converter), + GenericMessageHandler(GETMONITORINGREPORT_ACTION, *messages_converter), + GenericMessageHandler(GETREPORT_ACTION, *messages_converter), + GenericMessageHandler(GETTRANSACTIONSTATUS_ACTION, *messages_converter), + GenericMessageHandler(GETVARIABLES_ACTION, *messages_converter), + GenericMessageHandler(INSTALLCERTIFICATE_ACTION, *messages_converter), + GenericMessageHandler(PUBLISHFIRMWARE_ACTION, *messages_converter), + GenericMessageHandler(REQUESTSTARTTRANSACTION_ACTION, *messages_converter), + GenericMessageHandler(REQUESTSTOPTRANSACTION_ACTION, *messages_converter), + GenericMessageHandler(RESERVENOW_ACTION, *messages_converter), + GenericMessageHandler(RESET_ACTION, *messages_converter), + GenericMessageHandler(SENDLOCALLIST_ACTION, *messages_converter), + GenericMessageHandler(SETCHARGINGPROFILE_ACTION, *messages_converter), + GenericMessageHandler(SETDISPLAYMESSAGE_ACTION, *messages_converter), + GenericMessageHandler(SETMONITORINGBASE_ACTION, *messages_converter), + GenericMessageHandler(SETMONITORINGLEVEL_ACTION, *messages_converter), + GenericMessageHandler(SETNETWORKPROFILE_ACTION, *messages_converter), + GenericMessageHandler(SETVARIABLEMONITORING_ACTION, *messages_converter), + GenericMessageHandler(SETVARIABLES_ACTION, *messages_converter), + GenericMessageHandler(TRIGGERMESSAGE_ACTION, *messages_converter), + GenericMessageHandler(UNLOCKCONNECTOR_ACTION, *messages_converter), + GenericMessageHandler(UNPUBLISHFIRMWARE_ACTION, *messages_converter), + GenericMessageHandler(UPDATEFIRMWARE_ACTION, *messages_converter), m_stack_config(stack_config), m_events_handler(events_handler), @@ -263,106 +260,95 @@ bool ChargePoint20::start() *m_rpc_client, *m_messages_converter, m_messages_validator, m_stack_config.callRequestTimeout()); // Register to Central System messages - m_msg_dispatcher->registerHandler(CANCELRESERVATION20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(CERTIFICATESIGNED20_ACTION, - *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(CANCELRESERVATION_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(CERTIFICATESIGNED_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(CHANGEAVAILABILITY_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(CLEARCACHE_ACTION, + *dynamic_cast*>(this)); m_msg_dispatcher->registerHandler( - CHANGEAVAILABILITY20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(CLEARCACHE20_ACTION, - *dynamic_cast*>(this)); + CLEARCHARGINGPROFILE_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(CLEARDISPLAYMESSAGE_ACTION, + *dynamic_cast*>(this)); m_msg_dispatcher->registerHandler( - CLEARCHARGINGPROFILE20_ACTION, - *dynamic_cast*>(this)); + CLEARVARIABLEMONITORING_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(CUSTOMERINFORMATION_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(DATATRANSFER_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(DELETECERTIFICATE_ACTION, + *dynamic_cast*>(this)); m_msg_dispatcher->registerHandler( - CLEARDISPLAYMESSAGE20_ACTION, - *dynamic_cast*>(this)); + GET15118EVCERTIFICATE_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(GETBASEREPORT_ACTION, + *dynamic_cast*>(this)); m_msg_dispatcher->registerHandler( - CLEARVARIABLEMONITORING20_ACTION, - *dynamic_cast*>(this)); + GETCERTIFICATESTATUS_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(GETCHARGINGPROFILES_ACTION, + *dynamic_cast*>(this)); m_msg_dispatcher->registerHandler( - CUSTOMERINFORMATION20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(DATATRANSFER20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(DELETECERTIFICATE20_ACTION, - *dynamic_cast*>(this)); + GETCOMPOSITESCHEDULE_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(GETDISPLAYMESSAGES_ACTION, + *dynamic_cast*>(this)); m_msg_dispatcher->registerHandler( - GET15118EVCERTIFICATE20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(GETBASEREPORT20_ACTION, - *dynamic_cast*>(this)); + GETINSTALLEDCERTIFICATEIDS_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(GETLOCALLISTVERSION_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(GETLOG_ACTION, *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(GETMONITORINGREPORT_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(GETREPORT_ACTION, *dynamic_cast*>(this)); m_msg_dispatcher->registerHandler( - GETCERTIFICATESTATUS20_ACTION, - *dynamic_cast*>(this)); + GETTRANSACTIONSTATUS_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(GETVARIABLES_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(INSTALLCERTIFICATE_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(PUBLISHFIRMWARE_ACTION, + *dynamic_cast*>(this)); m_msg_dispatcher->registerHandler( - GETCHARGINGPROFILES20_ACTION, - *dynamic_cast*>(this)); + REQUESTSTARTTRANSACTION_ACTION, + *dynamic_cast*>(this)); m_msg_dispatcher->registerHandler( - GETCOMPOSITESCHEDULE20_ACTION, - *dynamic_cast*>(this)); + REQUESTSTOPTRANSACTION_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(RESERVENOW_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(RESET_ACTION, *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(SENDLOCALLIST_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(SETCHARGINGPROFILE_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(SETDISPLAYMESSAGE_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(SETMONITORINGBASE_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(SETMONITORINGLEVEL_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(SETNETWORKPROFILE_ACTION, + *dynamic_cast*>(this)); m_msg_dispatcher->registerHandler( - GETDISPLAYMESSAGES20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler( - GETINSTALLEDCERTIFICATEIDS20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler( - GETLOCALLISTVERSION20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(GETLOG20_ACTION, *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler( - GETMONITORINGREPORT20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(GETREPORT20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler( - GETTRANSACTIONSTATUS20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(GETVARIABLES20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler( - INSTALLCERTIFICATE20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(PUBLISHFIRMWARE20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler( - REQUESTSTARTTRANSACTION20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler( - REQUESTSTOPTRANSACTION20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(RESERVENOW20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(RESET20_ACTION, *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(SENDLOCALLIST20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler( - SETCHARGINGPROFILE20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(SETDISPLAYMESSAGE20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(SETMONITORINGBASE20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler( - SETMONITORINGLEVEL20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(SETNETWORKPROFILE20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler( - SETVARIABLEMONITORING20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(SETVARIABLES20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(TRIGGERMESSAGE20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(UNLOCKCONNECTOR20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(UNPUBLISHFIRMWARE20_ACTION, - *dynamic_cast*>(this)); - m_msg_dispatcher->registerHandler(UPDATEFIRMWARE20_ACTION, - *dynamic_cast*>(this)); + SETVARIABLEMONITORING_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(SETVARIABLES_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(TRIGGERMESSAGE_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(UNLOCKCONNECTOR_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(UNPUBLISHFIRMWARE_ACTION, + *dynamic_cast*>(this)); + m_msg_dispatcher->registerHandler(UPDATEFIRMWARE_ACTION, + *dynamic_cast*>(this)); // Start connection m_stop_in_progress = false; @@ -508,292 +494,292 @@ void ChargePoint20::rcpMessageSent(const std::string& msg) // OCPP operations -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::BootNotification20Req&, - * ocpp::messages::ocpp20::BootNotification20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::BootNotificationReq&, + * ocpp::messages::ocpp20::BootNotificationConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error, + std::string& message) { - return call(BOOTNOTIFICATION20_ACTION, request, response, error, message); + return call(BOOTNOTIFICATION_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::Authorize20Req&, - * ocpp::messages::ocpp20::Authorize20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::AuthorizeReq&, + * ocpp::messages::ocpp20::AuthorizeConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error, + std::string& message) { - return call(AUTHORIZE20_ACTION, request, response, error, message); + return call(AUTHORIZE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::ClearedChargingLimit20Req&, - * ocpp::messages::ocpp20::ClearedChargingLimit20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::ClearedChargingLimitReq&, + * ocpp::messages::ocpp20::ClearedChargingLimitConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error, + std::string& message) { - return call(CLEAREDCHARGINGLIMIT20_ACTION, request, response, error, message); + return call(CLEAREDCHARGINGLIMIT_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::CostUpdated20Req&, - * ocpp::messages::ocpp20::CostUpdated20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::CostUpdatedReq&, + * ocpp::messages::ocpp20::CostUpdatedConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, + std::string& error, + std::string& message) { - return call(COSTUPDATED20_ACTION, request, response, error, message); + return call(COSTUPDATED_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::DataTransfer20Req&, - * ocpp::messages::ocpp20::DataTransfer20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::DataTransferReq&, + * ocpp::messages::ocpp20::DataTransferConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) { - return call(DATATRANSFER20_ACTION, request, response, error, message); + return call(DATATRANSFER_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req&, - * ocpp::messages::ocpp20::FirmwareStatusNotification20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq&, + * ocpp::messages::ocpp20::FirmwareStatusNotificationConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) { - return call(FIRMWARESTATUSNOTIFICATION20_ACTION, request, response, error, message); + return call(FIRMWARESTATUSNOTIFICATION_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::Heartbeat20Req&, - * ocpp::messages::ocpp20::Heartbeat20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::HeartbeatReq&, + * ocpp::messages::ocpp20::HeartbeatConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error, + std::string& message) { - return call(HEARTBEAT20_ACTION, request, response, error, message); + return call(HEARTBEAT_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::LogStatusNotification20Req&, - * ocpp::messages::ocpp20::LogStatusNotification20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::LogStatusNotificationReq&, + * ocpp::messages::ocpp20::LogStatusNotificationConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, + std::string& error, + std::string& message) { - return call(LOGSTATUSNOTIFICATION20_ACTION, request, response, error, message); + return call(LOGSTATUSNOTIFICATION_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::MeterValues20Req&, - * ocpp::messages::ocpp20::MeterValues20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::MeterValuesReq&, + * ocpp::messages::ocpp20::MeterValuesConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, + std::string& error, + std::string& message) { - return call(METERVALUES20_ACTION, request, response, error, message); + return call(METERVALUES_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyChargingLimit20Req&, - * ocpp::messages::ocpp20::NotifyChargingLimit20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyChargingLimitReq&, + * ocpp::messages::ocpp20::NotifyChargingLimitConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYCHARGINGLIMIT20_ACTION, request, response, error, message); + return call(NOTIFYCHARGINGLIMIT_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req&, - * ocpp::messages::ocpp20::NotifyCustomerInformation20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyCustomerInformationReq&, + * ocpp::messages::ocpp20::NotifyCustomerInformationConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYCUSTOMERINFORMATION20_ACTION, request, response, error, message); + return call(NOTIFYCUSTOMERINFORMATION_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req&, - * ocpp::messages::ocpp20::NotifyDisplayMessages20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq&, + * ocpp::messages::ocpp20::NotifyDisplayMessagesConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYDISPLAYMESSAGES20_ACTION, request, response, error, message); + return call(NOTIFYDISPLAYMESSAGES_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req&, - * ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq&, + * ocpp::messages::ocpp20::NotifyEVChargingNeedsConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYEVCHARGINGNEEDS20_ACTION, request, response, error, message); + return call(NOTIFYEVCHARGINGNEEDS_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req&, - * ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq&, + * ocpp::messages::ocpp20::NotifyEVChargingScheduleConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYEVCHARGINGSCHEDULE20_ACTION, request, response, error, message); + return call(NOTIFYEVCHARGINGSCHEDULE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyEvent20Req&, - * ocpp::messages::ocpp20::NotifyEvent20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyEventReq&, + * ocpp::messages::ocpp20::NotifyEventConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYEVENT20_ACTION, request, response, error, message); + return call(NOTIFYEVENT_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req&, - * ocpp::messages::ocpp20::NotifyMonitoringReport20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyMonitoringReportReq&, + * ocpp::messages::ocpp20::NotifyMonitoringReportConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYMONITORINGREPORT20_ACTION, request, response, error, message); + return call(NOTIFYMONITORINGREPORT_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyReport20Req&, - * ocpp::messages::ocpp20::NotifyReport20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::NotifyReportReq&, + * ocpp::messages::ocpp20::NotifyReportConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYREPORT20_ACTION, request, response, error, message); + return call(NOTIFYREPORT_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req&, - * ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq&, + * ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) { - return call(PUBLISHFIRMWARESTATUSNOTIFICATION20_ACTION, request, response, error, message); + return call(PUBLISHFIRMWARESTATUSNOTIFICATION_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::ReportChargingProfiles20Req&, - * ocpp::messages::ocpp20::ReportChargingProfiles20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::ReportChargingProfilesReq&, + * ocpp::messages::ocpp20::ReportChargingProfilesConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error, + std::string& message) { - return call(REPORTCHARGINGPROFILES20_ACTION, request, response, error, message); + return call(REPORTCHARGINGPROFILES_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req&, - * ocpp::messages::ocpp20::ReservationStatusUpdate20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::ReservationStatusUpdateReq&, + * ocpp::messages::ocpp20::ReservationStatusUpdateConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error, + std::string& message) { - return call(RESERVATIONSTATUSUPDATE20_ACTION, request, response, error, message); + return call(RESERVATIONSTATUSUPDATE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::SecurityEventNotification20Req&, - * ocpp::messages::ocpp20::SecurityEventNotification20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::SecurityEventNotificationReq&, + * ocpp::messages::ocpp20::SecurityEventNotificationConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, + std::string& error, + std::string& message) { - return call(SECURITYEVENTNOTIFICATION20_ACTION, request, response, error, message); + return call(SECURITYEVENTNOTIFICATION_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::SignCertificate20Req&, - * ocpp::messages::ocpp20::SignCertificate20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::SignCertificateReq&, + * ocpp::messages::ocpp20::SignCertificateConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error, + std::string& message) { - return call(SIGNCERTIFICATE20_ACTION, request, response, error, message); + return call(SIGNCERTIFICATE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::StatusNotification20Req&, - * ocpp::messages::ocpp20::StatusNotification20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::StatusNotificationReq&, + * ocpp::messages::ocpp20::StatusNotificationConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, + std::string& error, + std::string& message) { - return call(STATUSNOTIFICATION20_ACTION, request, response, error, message); + return call(STATUSNOTIFICATION_ACTION, request, response, error, message); } -/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::TransactionEvent20Req&, - * ocpp::messages::ocpp20::TransactionEvent20Conf&, +/** @copydoc bool IChargePoint20::call(const ocpp::messages::ocpp20::TransactionEventReq&, + * ocpp::messages::ocpp20::TransactionEventConf&, * std::string&, * std::string&) */ -bool ChargePoint20::call(const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, - std::string& error, - std::string& message) +bool ChargePoint20::call(const ocpp::messages::ocpp20::TransactionEventReq& request, + ocpp::messages::ocpp20::TransactionEventConf& response, + std::string& error, + std::string& message) { - return call(TRANSACTIONEVENT20_ACTION, request, response, error, message); + return call(TRANSACTIONEVENT_ACTION, request, response, error, message); } // OCPP handlers @@ -803,12 +789,12 @@ bool ChargePoint20::call(const ocpp::messages::ocpp20::TransactionEvent20Req& re * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onCancelReservation20(request, response, error_code, error_message); + return m_events_handler.onCancelReservation(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -816,12 +802,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::CancelReservatio * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onCertificateSigned20(request, response, error_code, error_message); + return m_events_handler.onCertificateSigned(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -829,12 +815,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::CertificateSigne * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onChangeAvailability20(request, response, error_code, error_message); + return m_events_handler.onChangeAvailability(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -842,12 +828,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ChangeAvailabili * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onClearCache20(request, response, error_code, error_message); + return m_events_handler.onClearCache(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -855,12 +841,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ClearCache20Req& * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onClearChargingProfile20(request, response, error_code, error_message); + return m_events_handler.onClearChargingProfile(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -868,12 +854,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ClearChargingPro * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onClearDisplayMessage20(request, response, error_code, error_message); + return m_events_handler.onClearDisplayMessage(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -881,12 +867,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ClearDisplayMess * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onClearVariableMonitoring20(request, response, error_code, error_message); + return m_events_handler.onClearVariableMonitoring(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -894,12 +880,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ClearVariableMon * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onCustomerInformation20(request, response, error_code, error_message); + return m_events_handler.onCustomerInformation(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -907,12 +893,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::CustomerInformat * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onDataTransfer20(request, response, error_code, error_message); + return m_events_handler.onDataTransfer(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -920,12 +906,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::DataTransfer20Re * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onDeleteCertificate20(request, response, error_code, error_message); + return m_events_handler.onDeleteCertificate(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -933,12 +919,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::DeleteCertificat * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGet15118EVCertificate20(request, response, error_code, error_message); + return m_events_handler.onGet15118EVCertificate(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -946,12 +932,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::Get15118EVCertif * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGetBaseReport20(request, response, error_code, error_message); + return m_events_handler.onGetBaseReport(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -959,12 +945,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetBaseReport20R * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGetCertificateStatus20(request, response, error_code, error_message); + return m_events_handler.onGetCertificateStatus(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -972,12 +958,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetCertificateSt * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGetChargingProfiles20(request, response, error_code, error_message); + return m_events_handler.onGetChargingProfiles(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -985,12 +971,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetChargingProfi * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGetCompositeSchedule20(request, response, error_code, error_message); + return m_events_handler.onGetCompositeSchedule(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -998,12 +984,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetCompositeSche * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGetDisplayMessages20(request, response, error_code, error_message); + return m_events_handler.onGetDisplayMessages(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1011,12 +997,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetDisplayMessag * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGetInstalledCertificateIds20(request, response, error_code, error_message); + return m_events_handler.onGetInstalledCertificateIds(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1024,12 +1010,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetInstalledCert * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGetLocalListVersion20(request, response, error_code, error_message); + return m_events_handler.onGetLocalListVersion(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1037,12 +1023,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetLocalListVers * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGetLog20(request, response, error_code, error_message); + return m_events_handler.onGetLog(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1050,12 +1036,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetLog20Req& req * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGetMonitoringReport20(request, response, error_code, error_message); + return m_events_handler.onGetMonitoringReport(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1063,12 +1049,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetMonitoringRep * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGetReport20(request, response, error_code, error_message); + return m_events_handler.onGetReport(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1076,12 +1062,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetReport20Req& * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGetTransactionStatus20(request, response, error_code, error_message); + return m_events_handler.onGetTransactionStatus(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1089,12 +1075,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetTransactionSt * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onGetVariables20(request, response, error_code, error_message); + return m_events_handler.onGetVariables(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1102,12 +1088,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::GetVariables20Re * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onInstallCertificate20(request, response, error_code, error_message); + return m_events_handler.onInstallCertificate(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1115,12 +1101,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::InstallCertifica * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onPublishFirmware20(request, response, error_code, error_message); + return m_events_handler.onPublishFirmware(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1128,12 +1114,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::PublishFirmware2 * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onRequestStartTransaction20(request, response, error_code, error_message); + return m_events_handler.onRequestStartTransaction(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1141,12 +1127,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::RequestStartTran * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onRequestStopTransaction20(request, response, error_code, error_message); + return m_events_handler.onRequestStopTransaction(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1154,12 +1140,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::RequestStopTrans * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onReserveNow20(request, response, error_code, error_message); + return m_events_handler.onReserveNow(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1167,12 +1153,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ReserveNow20Req& * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onReset20(request, response, error_code, error_message); + return m_events_handler.onReset(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1180,12 +1166,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::Reset20Req& requ * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onSendLocalList20(request, response, error_code, error_message); + return m_events_handler.onSendLocalList(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1193,12 +1179,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SendLocalList20R * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onSetChargingProfile20(request, response, error_code, error_message); + return m_events_handler.onSetChargingProfile(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1206,12 +1192,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetChargingProfi * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onSetDisplayMessage20(request, response, error_code, error_message); + return m_events_handler.onSetDisplayMessage(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1219,12 +1205,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetDisplayMessag * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onSetMonitoringBase20(request, response, error_code, error_message); + return m_events_handler.onSetMonitoringBase(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1232,12 +1218,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetMonitoringBas * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onSetMonitoringLevel20(request, response, error_code, error_message); + return m_events_handler.onSetMonitoringLevel(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1245,12 +1231,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetMonitoringLev * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onSetNetworkProfile20(request, response, error_code, error_message); + return m_events_handler.onSetNetworkProfile(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1258,12 +1244,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetNetworkProfil * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onSetVariableMonitoring20(request, response, error_code, error_message); + return m_events_handler.onSetVariableMonitoring(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1271,12 +1257,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetVariableMonit * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onSetVariables20(request, response, error_code, error_message); + return m_events_handler.onSetVariables(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1284,12 +1270,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::SetVariables20Re * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onTriggerMessage20(request, response, error_code, error_message); + return m_events_handler.onTriggerMessage(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1297,12 +1283,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::TriggerMessage20 * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onUnlockConnector20(request, response, error_code, error_message); + return m_events_handler.onUnlockConnector(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1310,12 +1296,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::UnlockConnector2 * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onUnpublishFirmware20(request, response, error_code, error_message); + return m_events_handler.onUnpublishFirmware(request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, @@ -1323,12 +1309,12 @@ bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::UnpublishFirmwar * std::string& error_code, * std::string& error_message) */ -bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePoint20::handleMessage(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error_code, + std::string& error_message) { - return m_events_handler.onUpdateFirmware20(request, response, error_code, error_message); + return m_events_handler.onUpdateFirmware(request, response, error_code, error_message); } /** @brief Initialize the database */ diff --git a/src/ocpp20/chargepoint/ChargePoint20.h b/src/ocpp20/chargepoint/ChargePoint20.h index 2199731b..bda22009 100644 --- a/src/ocpp20/chargepoint/ChargePoint20.h +++ b/src/ocpp20/chargepoint/ChargePoint20.h @@ -57,78 +57,74 @@ class ChargePoint20 public ocpp::rpc::RpcClient::IListener, // Central System messages - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler { public: /** @brief Constructor */ @@ -198,221 +194,221 @@ class ChargePoint20 // OCPP operations - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::BootNotification20Req&, - * ocpp::messages::ocpp20::BootNotification20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::BootNotificationReq&, + * ocpp::messages::ocpp20::BootNotificationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error, + std::string& message) override; + + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::AuthorizeReq&, + * ocpp::messages::ocpp20::AuthorizeConf&, + * std::string&, + * std::string&) */ + bool call(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::Authorize20Req&, - * ocpp::messages::ocpp20::Authorize20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ClearedChargingLimitReq&, + * ocpp::messages::ocpp20::ClearedChargingLimitConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, + bool call(const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error, + std::string& message) override; + + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::CostUpdatedReq&, + * ocpp::messages::ocpp20::CostUpdatedConf&, + * std::string&, + * std::string&) */ + bool call(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, std::string& error, std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ClearedChargingLimit20Req&, - * ocpp::messages::ocpp20::ClearedChargingLimit20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::DataTransferReq&, + * ocpp::messages::ocpp20::DataTransferConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::CostUpdated20Req&, - * ocpp::messages::ocpp20::CostUpdated20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq&, + * ocpp::messages::ocpp20::FirmwareStatusNotificationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::DataTransfer20Req&, - * ocpp::messages::ocpp20::DataTransfer20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::HeartbeatReq&, + * ocpp::messages::ocpp20::HeartbeatConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req&, - * ocpp::messages::ocpp20::FirmwareStatusNotification20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::LogStatusNotificationReq&, + * ocpp::messages::ocpp20::LogStatusNotificationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::Heartbeat20Req&, - * ocpp::messages::ocpp20::Heartbeat20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::MeterValuesReq&, + * ocpp::messages::ocpp20::MeterValuesConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, + bool call(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, std::string& error, std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::LogStatusNotification20Req&, - * ocpp::messages::ocpp20::LogStatusNotification20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyChargingLimitReq&, + * ocpp::messages::ocpp20::NotifyChargingLimitConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::MeterValues20Req&, - * ocpp::messages::ocpp20::MeterValues20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyCustomerInformationReq&, + * ocpp::messages::ocpp20::NotifyCustomerInformationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyChargingLimit20Req&, - * ocpp::messages::ocpp20::NotifyChargingLimit20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq&, + * ocpp::messages::ocpp20::NotifyDisplayMessagesConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, + bool call(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, std::string& error, std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req&, - * ocpp::messages::ocpp20::NotifyCustomerInformation20Conf&, - * std::string&, - * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error, - std::string& message) override; - - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req&, - * ocpp::messages::ocpp20::NotifyDisplayMessages20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq&, + * ocpp::messages::ocpp20::NotifyEVChargingNeedsConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req&, - * ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq&, + * ocpp::messages::ocpp20::NotifyEVChargingScheduleConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req&, - * ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEventReq&, + * ocpp::messages::ocpp20::NotifyEventConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEvent20Req&, - * ocpp::messages::ocpp20::NotifyEvent20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyMonitoringReportReq&, + * ocpp::messages::ocpp20::NotifyMonitoringReportConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req&, - * ocpp::messages::ocpp20::NotifyMonitoringReport20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyReportReq&, + * ocpp::messages::ocpp20::NotifyReportConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyReport20Req&, - * ocpp::messages::ocpp20::NotifyReport20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq&, + * ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req&, - * ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ReportChargingProfilesReq&, + * ocpp::messages::ocpp20::ReportChargingProfilesConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ReportChargingProfiles20Req&, - * ocpp::messages::ocpp20::ReportChargingProfiles20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ReservationStatusUpdateReq&, + * ocpp::messages::ocpp20::ReservationStatusUpdateConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req&, - * ocpp::messages::ocpp20::ReservationStatusUpdate20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::SecurityEventNotificationReq&, + * ocpp::messages::ocpp20::SecurityEventNotificationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, + bool call(const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, std::string& error, std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::SecurityEventNotification20Req&, - * ocpp::messages::ocpp20::SecurityEventNotification20Conf&, - * std::string&, - * std::string&) */ - bool call(const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error, - std::string& message) override; - - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::SignCertificate20Req&, - * ocpp::messages::ocpp20::SignCertificate20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::SignCertificateReq&, + * ocpp::messages::ocpp20::SignCertificateConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::StatusNotification20Req&, - * ocpp::messages::ocpp20::StatusNotification20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::StatusNotificationReq&, + * ocpp::messages::ocpp20::StatusNotificationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, + std::string& error, + std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::TransactionEvent20Req&, - * ocpp::messages::ocpp20::TransactionEvent20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::TransactionEventReq&, + * ocpp::messages::ocpp20::TransactionEventConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, - std::string& error, - std::string& message) override; + bool call(const ocpp::messages::ocpp20::TransactionEventReq& request, + ocpp::messages::ocpp20::TransactionEventConf& response, + std::string& error, + std::string& message) override; // OCPP handlers @@ -421,410 +417,410 @@ class ChargePoint20 * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error_code, + std::string& error_message) override; private: /** @brief Stack configuration */ diff --git a/src/ocpp20/chargepoint/interface/IChargePoint20.h b/src/ocpp20/chargepoint/interface/IChargePoint20.h index 7300f5f5..e5a0d256 100644 --- a/src/ocpp20/chargepoint/interface/IChargePoint20.h +++ b/src/ocpp20/chargepoint/interface/IChargePoint20.h @@ -134,293 +134,293 @@ class IChargePoint20 // OCPP operations /** - * @brief Send a BootNotification20 message to the central system + * @brief Send a BootNotification message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a Authorize20 message to the central system + * @brief Send a Authorize message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ClearedChargingLimit20 message to the central system + * @brief Send a ClearedChargingLimit message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a CostUpdated20 message to the central system + * @brief Send a CostUpdated message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a DataTransfer20 message to the central system + * @brief Send a DataTransfer message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a FirmwareStatusNotification20 message to the central system + * @brief Send a FirmwareStatusNotification message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a Heartbeat20 message to the central system + * @brief Send a Heartbeat message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a LogStatusNotification20 message to the central system + * @brief Send a LogStatusNotification message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a MeterValues20 message to the central system + * @brief Send a MeterValues message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyChargingLimit20 message to the central system + * @brief Send a NotifyChargingLimit message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyCustomerInformation20 message to the central system + * @brief Send a NotifyCustomerInformation message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyDisplayMessages20 message to the central system + * @brief Send a NotifyDisplayMessages message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyEVChargingNeeds20 message to the central system + * @brief Send a NotifyEVChargingNeeds message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyEVChargingSchedule20 message to the central system + * @brief Send a NotifyEVChargingSchedule message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyEvent20 message to the central system + * @brief Send a NotifyEvent message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyMonitoringReport20 message to the central system + * @brief Send a NotifyMonitoringReport message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyReport20 message to the central system + * @brief Send a NotifyReport message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a PublishFirmwareStatusNotification20 message to the central system + * @brief Send a PublishFirmwareStatusNotification message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ReportChargingProfiles20 message to the central system + * @brief Send a ReportChargingProfiles message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ReservationStatusUpdate20 message to the central system + * @brief Send a ReservationStatusUpdate message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SecurityEventNotification20 message to the central system + * @brief Send a SecurityEventNotification message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SignCertificate20 message to the central system + * @brief Send a SignCertificate message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a StatusNotification20 message to the central system + * @brief Send a StatusNotification message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a TransactionEvent20 message to the central system + * @brief Send a TransactionEvent message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::TransactionEventReq& request, + ocpp::messages::ocpp20::TransactionEventConf& response, + std::string& error, + std::string& message) = 0; }; } // namespace ocpp20 diff --git a/src/ocpp20/chargepoint/interface/IChargePointEventsHandler20.h b/src/ocpp20/chargepoint/interface/IChargePointEventsHandler20.h index 3c086350..da258e3d 100644 --- a/src/ocpp20/chargepoint/interface/IChargePointEventsHandler20.h +++ b/src/ocpp20/chargepoint/interface/IChargePointEventsHandler20.h @@ -87,497 +87,497 @@ class IChargePointEventsHandler20 // OCPP operations /** - * @brief Called on reception of a CancelReservation20 message from the central system + * @brief Called on reception of a CancelReservation message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onCancelReservation20(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onCancelReservation(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a CertificateSigned20 message from the central system + * @brief Called on reception of a CertificateSigned message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onCertificateSigned20(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onCertificateSigned(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a ChangeAvailability20 message from the central system + * @brief Called on reception of a ChangeAvailability message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onChangeAvailability20(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onChangeAvailability(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a ClearCache20 message from the central system + * @brief Called on reception of a ClearCache message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onClearCache20(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onClearCache(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a ClearChargingProfile20 message from the central system + * @brief Called on reception of a ClearChargingProfile message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onClearChargingProfile20(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onClearChargingProfile(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a ClearDisplayMessage20 message from the central system + * @brief Called on reception of a ClearDisplayMessage message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onClearDisplayMessage20(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onClearDisplayMessage(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a ClearVariableMonitoring20 message from the central system + * @brief Called on reception of a ClearVariableMonitoring message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onClearVariableMonitoring20(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onClearVariableMonitoring(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a CustomerInformation20 message from the central system + * @brief Called on reception of a CustomerInformation message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onCustomerInformation20(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onCustomerInformation(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a DataTransfer20 message from the central system + * @brief Called on reception of a DataTransfer message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onDataTransfer20(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onDataTransfer(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a DeleteCertificate20 message from the central system + * @brief Called on reception of a DeleteCertificate message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onDeleteCertificate20(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onDeleteCertificate(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a Get15118EVCertificate20 message from the central system + * @brief Called on reception of a Get15118EVCertificate message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGet15118EVCertificate20(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGet15118EVCertificate(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a GetBaseReport20 message from the central system + * @brief Called on reception of a GetBaseReport message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGetBaseReport20(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGetBaseReport(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a GetCertificateStatus20 message from the central system + * @brief Called on reception of a GetCertificateStatus message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGetCertificateStatus20(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGetCertificateStatus(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a GetChargingProfiles20 message from the central system + * @brief Called on reception of a GetChargingProfiles message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGetChargingProfiles20(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGetChargingProfiles(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a GetCompositeSchedule20 message from the central system + * @brief Called on reception of a GetCompositeSchedule message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGetCompositeSchedule20(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGetCompositeSchedule(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a GetDisplayMessages20 message from the central system + * @brief Called on reception of a GetDisplayMessages message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGetDisplayMessages20(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGetDisplayMessages(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a GetInstalledCertificateIds20 message from the central system + * @brief Called on reception of a GetInstalledCertificateIds message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGetInstalledCertificateIds20(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGetInstalledCertificateIds(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a GetLocalListVersion20 message from the central system + * @brief Called on reception of a GetLocalListVersion message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGetLocalListVersion20(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGetLocalListVersion(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a GetLog20 message from the central system + * @brief Called on reception of a GetLog message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGetLog20(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGetLog(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a GetMonitoringReport20 message from the central system + * @brief Called on reception of a GetMonitoringReport message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGetMonitoringReport20(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGetMonitoringReport(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a GetReport20 message from the central system + * @brief Called on reception of a GetReport message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGetReport20(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGetReport(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a GetTransactionStatus20 message from the central system + * @brief Called on reception of a GetTransactionStatus message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGetTransactionStatus20(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGetTransactionStatus(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a GetVariables20 message from the central system + * @brief Called on reception of a GetVariables message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onGetVariables20(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onGetVariables(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a InstallCertificate20 message from the central system + * @brief Called on reception of a InstallCertificate message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onInstallCertificate20(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onInstallCertificate(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a PublishFirmware20 message from the central system + * @brief Called on reception of a PublishFirmware message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onPublishFirmware20(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onPublishFirmware(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a RequestStartTransaction20 message from the central system + * @brief Called on reception of a RequestStartTransaction message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onRequestStartTransaction20(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onRequestStartTransaction(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a RequestStopTransaction20 message from the central system + * @brief Called on reception of a RequestStopTransaction message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onRequestStopTransaction20(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onRequestStopTransaction(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a ReserveNow20 message from the central system + * @brief Called on reception of a ReserveNow message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onReserveNow20(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onReserveNow(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a Reset20 message from the central system + * @brief Called on reception of a Reset message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onReset20(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onReset(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a SendLocalList20 message from the central system + * @brief Called on reception of a SendLocalList message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onSendLocalList20(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onSendLocalList(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a SetChargingProfile20 message from the central system + * @brief Called on reception of a SetChargingProfile message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onSetChargingProfile20(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onSetChargingProfile(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a SetDisplayMessage20 message from the central system + * @brief Called on reception of a SetDisplayMessage message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onSetDisplayMessage20(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onSetDisplayMessage(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a SetMonitoringBase20 message from the central system + * @brief Called on reception of a SetMonitoringBase message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onSetMonitoringBase20(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onSetMonitoringBase(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a SetMonitoringLevel20 message from the central system + * @brief Called on reception of a SetMonitoringLevel message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onSetMonitoringLevel20(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onSetMonitoringLevel(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a SetNetworkProfile20 message from the central system + * @brief Called on reception of a SetNetworkProfile message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onSetNetworkProfile20(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onSetNetworkProfile(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a SetVariableMonitoring20 message from the central system + * @brief Called on reception of a SetVariableMonitoring message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onSetVariableMonitoring20(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onSetVariableMonitoring(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a SetVariables20 message from the central system + * @brief Called on reception of a SetVariables message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onSetVariables20(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onSetVariables(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a TriggerMessage20 message from the central system + * @brief Called on reception of a TriggerMessage message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onTriggerMessage20(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onTriggerMessage(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a UnlockConnector20 message from the central system + * @brief Called on reception of a UnlockConnector message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onUnlockConnector20(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onUnlockConnector(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a UnpublishFirmware20 message from the central system + * @brief Called on reception of a UnpublishFirmware message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onUnpublishFirmware20(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onUnpublishFirmware(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Called on reception of a UpdateFirmware20 message from the central system + * @brief Called on reception of a UpdateFirmware message from the central system * @param request Request received * @param response Response to send * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool onUpdateFirmware20(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool onUpdateFirmware(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error, + std::string& message) = 0; }; } // namespace ocpp20 diff --git a/src/ocpp20/localcontroller/centralsystem/CentralSystemHandler20.cpp b/src/ocpp20/localcontroller/centralsystem/CentralSystemHandler20.cpp index e909621e..57f09ecb 100644 --- a/src/ocpp20/localcontroller/centralsystem/CentralSystemHandler20.cpp +++ b/src/ocpp20/localcontroller/centralsystem/CentralSystemHandler20.cpp @@ -39,134 +39,125 @@ namespace ocpp20 CentralSystemHandler20::CentralSystemHandler20(const std::string& identifier, const ocpp::messages::ocpp20::MessagesConverter20& messages_converter, ocpp::messages::MessageDispatcher& msg_dispatcher) - : GenericMessageHandler(CANCELRESERVATION20_ACTION, messages_converter), - GenericMessageHandler(CERTIFICATESIGNED20_ACTION, messages_converter), - GenericMessageHandler(CHANGEAVAILABILITY20_ACTION, messages_converter), - GenericMessageHandler(CLEARCACHE20_ACTION, messages_converter), - GenericMessageHandler(CLEARCHARGINGPROFILE20_ACTION, messages_converter), - GenericMessageHandler(CLEARDISPLAYMESSAGE20_ACTION, messages_converter), - GenericMessageHandler(CLEARVARIABLEMONITORING20_ACTION, - messages_converter), - GenericMessageHandler(CUSTOMERINFORMATION20_ACTION, messages_converter), - GenericMessageHandler(DATATRANSFER20_ACTION, messages_converter), - GenericMessageHandler(DELETECERTIFICATE20_ACTION, messages_converter), - GenericMessageHandler(GET15118EVCERTIFICATE20_ACTION, messages_converter), - GenericMessageHandler(GETBASEREPORT20_ACTION, messages_converter), - GenericMessageHandler(GETCERTIFICATESTATUS20_ACTION, messages_converter), - GenericMessageHandler(GETCHARGINGPROFILES20_ACTION, messages_converter), - GenericMessageHandler(GETCOMPOSITESCHEDULE20_ACTION, messages_converter), - GenericMessageHandler(GETDISPLAYMESSAGES20_ACTION, messages_converter), - GenericMessageHandler(GETINSTALLEDCERTIFICATEIDS20_ACTION, - messages_converter), - GenericMessageHandler(GETLOCALLISTVERSION20_ACTION, messages_converter), - GenericMessageHandler(GETLOG20_ACTION, messages_converter), - GenericMessageHandler(GETMONITORINGREPORT20_ACTION, messages_converter), - GenericMessageHandler(GETREPORT20_ACTION, messages_converter), - GenericMessageHandler(GETTRANSACTIONSTATUS20_ACTION, messages_converter), - GenericMessageHandler(GETVARIABLES20_ACTION, messages_converter), - GenericMessageHandler(INSTALLCERTIFICATE20_ACTION, messages_converter), - GenericMessageHandler(PUBLISHFIRMWARE20_ACTION, messages_converter), - GenericMessageHandler(REQUESTSTARTTRANSACTION20_ACTION, - messages_converter), - GenericMessageHandler(REQUESTSTOPTRANSACTION20_ACTION, messages_converter), - GenericMessageHandler(RESERVENOW20_ACTION, messages_converter), - GenericMessageHandler(RESET20_ACTION, messages_converter), - GenericMessageHandler(SENDLOCALLIST20_ACTION, messages_converter), - GenericMessageHandler(SETCHARGINGPROFILE20_ACTION, messages_converter), - GenericMessageHandler(SETDISPLAYMESSAGE20_ACTION, messages_converter), - GenericMessageHandler(SETMONITORINGBASE20_ACTION, messages_converter), - GenericMessageHandler(SETMONITORINGLEVEL20_ACTION, messages_converter), - GenericMessageHandler(SETNETWORKPROFILE20_ACTION, messages_converter), - GenericMessageHandler(SETVARIABLEMONITORING20_ACTION, messages_converter), - GenericMessageHandler(SETVARIABLES20_ACTION, messages_converter), - GenericMessageHandler(TRIGGERMESSAGE20_ACTION, messages_converter), - GenericMessageHandler(UNLOCKCONNECTOR20_ACTION, messages_converter), - GenericMessageHandler(UNPUBLISHFIRMWARE20_ACTION, messages_converter), - GenericMessageHandler(UPDATEFIRMWARE20_ACTION, messages_converter), + : GenericMessageHandler(CANCELRESERVATION_ACTION, messages_converter), + GenericMessageHandler(CERTIFICATESIGNED_ACTION, messages_converter), + GenericMessageHandler(CHANGEAVAILABILITY_ACTION, messages_converter), + GenericMessageHandler(CLEARCACHE_ACTION, messages_converter), + GenericMessageHandler(CLEARCHARGINGPROFILE_ACTION, messages_converter), + GenericMessageHandler(CLEARDISPLAYMESSAGE_ACTION, messages_converter), + GenericMessageHandler(CLEARVARIABLEMONITORING_ACTION, messages_converter), + GenericMessageHandler(CUSTOMERINFORMATION_ACTION, messages_converter), + GenericMessageHandler(DATATRANSFER_ACTION, messages_converter), + GenericMessageHandler(DELETECERTIFICATE_ACTION, messages_converter), + GenericMessageHandler(GET15118EVCERTIFICATE_ACTION, messages_converter), + GenericMessageHandler(GETBASEREPORT_ACTION, messages_converter), + GenericMessageHandler(GETCERTIFICATESTATUS_ACTION, messages_converter), + GenericMessageHandler(GETCHARGINGPROFILES_ACTION, messages_converter), + GenericMessageHandler(GETCOMPOSITESCHEDULE_ACTION, messages_converter), + GenericMessageHandler(GETDISPLAYMESSAGES_ACTION, messages_converter), + GenericMessageHandler(GETINSTALLEDCERTIFICATEIDS_ACTION, + messages_converter), + GenericMessageHandler(GETLOCALLISTVERSION_ACTION, messages_converter), + GenericMessageHandler(GETLOG_ACTION, messages_converter), + GenericMessageHandler(GETMONITORINGREPORT_ACTION, messages_converter), + GenericMessageHandler(GETREPORT_ACTION, messages_converter), + GenericMessageHandler(GETTRANSACTIONSTATUS_ACTION, messages_converter), + GenericMessageHandler(GETVARIABLES_ACTION, messages_converter), + GenericMessageHandler(INSTALLCERTIFICATE_ACTION, messages_converter), + GenericMessageHandler(PUBLISHFIRMWARE_ACTION, messages_converter), + GenericMessageHandler(REQUESTSTARTTRANSACTION_ACTION, messages_converter), + GenericMessageHandler(REQUESTSTOPTRANSACTION_ACTION, messages_converter), + GenericMessageHandler(RESERVENOW_ACTION, messages_converter), + GenericMessageHandler(RESET_ACTION, messages_converter), + GenericMessageHandler(SENDLOCALLIST_ACTION, messages_converter), + GenericMessageHandler(SETCHARGINGPROFILE_ACTION, messages_converter), + GenericMessageHandler(SETDISPLAYMESSAGE_ACTION, messages_converter), + GenericMessageHandler(SETMONITORINGBASE_ACTION, messages_converter), + GenericMessageHandler(SETMONITORINGLEVEL_ACTION, messages_converter), + GenericMessageHandler(SETNETWORKPROFILE_ACTION, messages_converter), + GenericMessageHandler(SETVARIABLEMONITORING_ACTION, messages_converter), + GenericMessageHandler(SETVARIABLES_ACTION, messages_converter), + GenericMessageHandler(TRIGGERMESSAGE_ACTION, messages_converter), + GenericMessageHandler(UNLOCKCONNECTOR_ACTION, messages_converter), + GenericMessageHandler(UNPUBLISHFIRMWARE_ACTION, messages_converter), + GenericMessageHandler(UPDATEFIRMWARE_ACTION, messages_converter), m_identifier(identifier), m_charge_point() { - msg_dispatcher.registerHandler(CANCELRESERVATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(CERTIFICATESIGNED20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(CHANGEAVAILABILITY20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(CLEARCACHE20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(CLEARCHARGINGPROFILE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(CLEARDISPLAYMESSAGE20_ACTION, - *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(CANCELRESERVATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(CERTIFICATESIGNED_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(CHANGEAVAILABILITY_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(CLEARCACHE_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(CLEARCHARGINGPROFILE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(CLEARDISPLAYMESSAGE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(CLEARVARIABLEMONITORING_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(CUSTOMERINFORMATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(DATATRANSFER_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(DELETECERTIFICATE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(GET15118EVCERTIFICATE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(GETBASEREPORT_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(GETCERTIFICATESTATUS_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(GETCHARGINGPROFILES_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(GETCOMPOSITESCHEDULE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(GETDISPLAYMESSAGES_ACTION, + *dynamic_cast*>(this)); msg_dispatcher.registerHandler( - CLEARVARIABLEMONITORING20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(CUSTOMERINFORMATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(DATATRANSFER20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(DELETECERTIFICATE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(GET15118EVCERTIFICATE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(GETBASEREPORT20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(GETCERTIFICATESTATUS20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(GETCHARGINGPROFILES20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(GETCOMPOSITESCHEDULE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(GETDISPLAYMESSAGES20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler( - GETINSTALLEDCERTIFICATEIDS20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(GETLOCALLISTVERSION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(GETLOG20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(GETMONITORINGREPORT20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(GETREPORT20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(GETTRANSACTIONSTATUS20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(GETVARIABLES20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(INSTALLCERTIFICATE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(PUBLISHFIRMWARE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler( - REQUESTSTARTTRANSACTION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(REQUESTSTOPTRANSACTION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(RESERVENOW20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(RESET20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(SENDLOCALLIST20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(SETCHARGINGPROFILE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(SETDISPLAYMESSAGE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(SETMONITORINGBASE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(SETMONITORINGLEVEL20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(SETNETWORKPROFILE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(SETVARIABLEMONITORING20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(SETVARIABLES20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(TRIGGERMESSAGE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(UNLOCKCONNECTOR20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(UNPUBLISHFIRMWARE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(UPDATEFIRMWARE20_ACTION, - *dynamic_cast*>(this)); + GETINSTALLEDCERTIFICATEIDS_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(GETLOCALLISTVERSION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(GETLOG_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(GETMONITORINGREPORT_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(GETREPORT_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(GETTRANSACTIONSTATUS_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(GETVARIABLES_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(INSTALLCERTIFICATE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(PUBLISHFIRMWARE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(REQUESTSTARTTRANSACTION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(REQUESTSTOPTRANSACTION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(RESERVENOW_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(RESET_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(SENDLOCALLIST_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(SETCHARGINGPROFILE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(SETDISPLAYMESSAGE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(SETMONITORINGBASE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(SETMONITORINGLEVEL_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(SETNETWORKPROFILE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(SETVARIABLEMONITORING_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(SETVARIABLES_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(TRIGGERMESSAGE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(UNLOCKCONNECTOR_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(UNPUBLISHFIRMWARE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(UPDATEFIRMWARE_ACTION, + *dynamic_cast*>(this)); } /** @brief Destructor */ @@ -178,492 +169,492 @@ CentralSystemHandler20::~CentralSystemHandler20() { } * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error_code, + std::string& error_message) { - return forward(CANCELRESERVATION20_ACTION, request, response, error_code, error_message); + return forward(CANCELRESERVATION_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error_code, + std::string& error_message) { - return forward(CERTIFICATESIGNED20_ACTION, request, response, error_code, error_message); + return forward(CERTIFICATESIGNED_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error_code, + std::string& error_message) { - return forward(CHANGEAVAILABILITY20_ACTION, request, response, error_code, error_message); + return forward(CHANGEAVAILABILITY_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error_code, + std::string& error_message) { - return forward(CLEARCACHE20_ACTION, request, response, error_code, error_message); + return forward(CLEARCACHE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, + std::string& error_code, + std::string& error_message) { - return forward(CLEARCHARGINGPROFILE20_ACTION, request, response, error_code, error_message); + return forward(CLEARCHARGINGPROFILE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, + std::string& error_code, + std::string& error_message) { - return forward(CLEARDISPLAYMESSAGE20_ACTION, request, response, error_code, error_message); + return forward(CLEARDISPLAYMESSAGE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, + std::string& error_code, + std::string& error_message) { - return forward(CLEARVARIABLEMONITORING20_ACTION, request, response, error_code, error_message); + return forward(CLEARVARIABLEMONITORING_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error_code, + std::string& error_message) { - return forward(CUSTOMERINFORMATION20_ACTION, request, response, error_code, error_message); + return forward(CUSTOMERINFORMATION_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error_code, + std::string& error_message) { - return forward(DATATRANSFER20_ACTION, request, response, error_code, error_message); + return forward(DATATRANSFER_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error_code, + std::string& error_message) { - return forward(DELETECERTIFICATE20_ACTION, request, response, error_code, error_message); + return forward(DELETECERTIFICATE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GET15118EVCERTIFICATE20_ACTION, request, response, error_code, error_message); + return forward(GET15118EVCERTIFICATE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GETBASEREPORT20_ACTION, request, response, error_code, error_message); + return forward(GETBASEREPORT_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GETCERTIFICATESTATUS20_ACTION, request, response, error_code, error_message); + return forward(GETCERTIFICATESTATUS_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GETCHARGINGPROFILES20_ACTION, request, response, error_code, error_message); + return forward(GETCHARGINGPROFILES_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GETCOMPOSITESCHEDULE20_ACTION, request, response, error_code, error_message); + return forward(GETCOMPOSITESCHEDULE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GETDISPLAYMESSAGES20_ACTION, request, response, error_code, error_message); + return forward(GETDISPLAYMESSAGES_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GETINSTALLEDCERTIFICATEIDS20_ACTION, request, response, error_code, error_message); + return forward(GETINSTALLEDCERTIFICATEIDS_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GETLOCALLISTVERSION20_ACTION, request, response, error_code, error_message); + return forward(GETLOCALLISTVERSION_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GETLOG20_ACTION, request, response, error_code, error_message); + return forward(GETLOG_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GETMONITORINGREPORT20_ACTION, request, response, error_code, error_message); + return forward(GETMONITORINGREPORT_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GETREPORT20_ACTION, request, response, error_code, error_message); + return forward(GETREPORT_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GETTRANSACTIONSTATUS20_ACTION, request, response, error_code, error_message); + return forward(GETTRANSACTIONSTATUS_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, + std::string& error_code, + std::string& error_message) { - return forward(GETVARIABLES20_ACTION, request, response, error_code, error_message); + return forward(GETVARIABLES_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error_code, + std::string& error_message) { - return forward(INSTALLCERTIFICATE20_ACTION, request, response, error_code, error_message); + return forward(INSTALLCERTIFICATE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, + std::string& error_code, + std::string& error_message) { - return forward(PUBLISHFIRMWARE20_ACTION, request, response, error_code, error_message); + return forward(PUBLISHFIRMWARE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error_code, + std::string& error_message) { - return forward(REQUESTSTARTTRANSACTION20_ACTION, request, response, error_code, error_message); + return forward(REQUESTSTARTTRANSACTION_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error_code, + std::string& error_message) { - return forward(REQUESTSTOPTRANSACTION20_ACTION, request, response, error_code, error_message); + return forward(REQUESTSTOPTRANSACTION_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error_code, + std::string& error_message) { - return forward(RESERVENOW20_ACTION, request, response, error_code, error_message); + return forward(RESERVENOW_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error_code, + std::string& error_message) { - return forward(RESET20_ACTION, request, response, error_code, error_message); + return forward(RESET_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error_code, + std::string& error_message) { - return forward(SENDLOCALLIST20_ACTION, request, response, error_code, error_message); + return forward(SENDLOCALLIST_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error_code, + std::string& error_message) { - return forward(SETCHARGINGPROFILE20_ACTION, request, response, error_code, error_message); + return forward(SETCHARGINGPROFILE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error_code, + std::string& error_message) { - return forward(SETDISPLAYMESSAGE20_ACTION, request, response, error_code, error_message); + return forward(SETDISPLAYMESSAGE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error_code, + std::string& error_message) { - return forward(SETMONITORINGBASE20_ACTION, request, response, error_code, error_message); + return forward(SETMONITORINGBASE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error_code, + std::string& error_message) { - return forward(SETMONITORINGLEVEL20_ACTION, request, response, error_code, error_message); + return forward(SETMONITORINGLEVEL_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error_code, + std::string& error_message) { - return forward(SETNETWORKPROFILE20_ACTION, request, response, error_code, error_message); + return forward(SETNETWORKPROFILE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error_code, + std::string& error_message) { - return forward(SETVARIABLEMONITORING20_ACTION, request, response, error_code, error_message); + return forward(SETVARIABLEMONITORING_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error_code, + std::string& error_message) { - return forward(SETVARIABLES20_ACTION, request, response, error_code, error_message); + return forward(SETVARIABLES_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, + std::string& error_code, + std::string& error_message) { - return forward(TRIGGERMESSAGE20_ACTION, request, response, error_code, error_message); + return forward(TRIGGERMESSAGE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error_code, + std::string& error_message) { - return forward(UNLOCKCONNECTOR20_ACTION, request, response, error_code, error_message); + return forward(UNLOCKCONNECTOR_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, + std::string& error_code, + std::string& error_message) { - return forward(UNPUBLISHFIRMWARE20_ACTION, request, response, error_code, error_message); + return forward(UNPUBLISHFIRMWARE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error_code, - std::string& error_message) +bool CentralSystemHandler20::handleMessage(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error_code, + std::string& error_message) { - return forward(UPDATEFIRMWARE20_ACTION, request, response, error_code, error_message); + return forward(UPDATEFIRMWARE_ACTION, request, response, error_code, error_message); } } // namespace ocpp20 diff --git a/src/ocpp20/localcontroller/centralsystem/CentralSystemHandler20.h b/src/ocpp20/localcontroller/centralsystem/CentralSystemHandler20.h index 2ede9a88..80a6737a 100644 --- a/src/ocpp20/localcontroller/centralsystem/CentralSystemHandler20.h +++ b/src/ocpp20/localcontroller/centralsystem/CentralSystemHandler20.h @@ -89,78 +89,74 @@ namespace ocpp20 /** @brief Handler for central system requests */ class CentralSystemHandler20 - : public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler + : public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler { public: /** @@ -189,370 +185,370 @@ class CentralSystemHandler20 * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error_code, + std::string& error_message) override; private: /** @brief Charge point's identifier */ diff --git a/src/ocpp20/localcontroller/centralsystem/CentralSystemProxy20.cpp b/src/ocpp20/localcontroller/centralsystem/CentralSystemProxy20.cpp index 01f65f1e..0c35f89a 100644 --- a/src/ocpp20/localcontroller/centralsystem/CentralSystemProxy20.cpp +++ b/src/ocpp20/localcontroller/centralsystem/CentralSystemProxy20.cpp @@ -115,630 +115,624 @@ bool CentralSystemProxy20::isConnected() const } // OCPP actions -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::BootNotification20Req&, - * ocpp::messages::ocpp20::BootNotification20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::BootNotificationReq&, + * ocpp::messages::ocpp20::BootNotificationConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error, + std::string& message) { - return call(BOOTNOTIFICATION20_ACTION, request, response, error, message); + return call(BOOTNOTIFICATION_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::Authorize20Req&, - * ocpp::messages::ocpp20::Authorize20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::AuthorizeReq&, + * ocpp::messages::ocpp20::AuthorizeConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error, + std::string& message) { - return call(AUTHORIZE20_ACTION, request, response, error, message); + return call(AUTHORIZE_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ClearedChargingLimit20Req&, - * ocpp::messages::ocpp20::ClearedChargingLimit20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ClearedChargingLimitReq&, + * ocpp::messages::ocpp20::ClearedChargingLimitConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error, + std::string& message) { - return call(CLEAREDCHARGINGLIMIT20_ACTION, request, response, error, message); + return call(CLEAREDCHARGINGLIMIT_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::CostUpdated20Req&, - * ocpp::messages::ocpp20::CostUpdated20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::CostUpdatedReq&, + * ocpp::messages::ocpp20::CostUpdatedConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, + std::string& error, + std::string& message) { - return call(COSTUPDATED20_ACTION, request, response, error, message); + return call(COSTUPDATED_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::DataTransfer20Req&, - * ocpp::messages::ocpp20::DataTransfer20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::DataTransferReq&, + * ocpp::messages::ocpp20::DataTransferConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) { - return call(DATATRANSFER20_ACTION, request, response, error, message); + return call(DATATRANSFER_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req&, - * ocpp::messages::ocpp20::FirmwareStatusNotification20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq&, + * ocpp::messages::ocpp20::FirmwareStatusNotificationConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) { - return call(FIRMWARESTATUSNOTIFICATION20_ACTION, request, response, error, message); + return call(FIRMWARESTATUSNOTIFICATION_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::Heartbeat20Req&, - * ocpp::messages::ocpp20::Heartbeat20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::HeartbeatReq&, + * ocpp::messages::ocpp20::HeartbeatConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error, + std::string& message) { - return call(HEARTBEAT20_ACTION, request, response, error, message); + return call(HEARTBEAT_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::LogStatusNotification20Req&, - * ocpp::messages::ocpp20::LogStatusNotification20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::LogStatusNotificationReq&, + * ocpp::messages::ocpp20::LogStatusNotificationConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, + std::string& error, + std::string& message) { - return call(LOGSTATUSNOTIFICATION20_ACTION, request, response, error, message); + return call(LOGSTATUSNOTIFICATION_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::MeterValues20Req&, - * ocpp::messages::ocpp20::MeterValues20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::MeterValuesReq&, + * ocpp::messages::ocpp20::MeterValuesConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, + std::string& error, + std::string& message) { - return call(METERVALUES20_ACTION, request, response, error, message); + return call(METERVALUES_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyChargingLimit20Req&, - * ocpp::messages::ocpp20::NotifyChargingLimit20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyChargingLimitReq&, + * ocpp::messages::ocpp20::NotifyChargingLimitConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYCHARGINGLIMIT20_ACTION, request, response, error, message); + return call(NOTIFYCHARGINGLIMIT_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req&, - * ocpp::messages::ocpp20::NotifyCustomerInformation20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyCustomerInformationReq&, + * ocpp::messages::ocpp20::NotifyCustomerInformationConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYCUSTOMERINFORMATION20_ACTION, request, response, error, message); + return call(NOTIFYCUSTOMERINFORMATION_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req&, - * ocpp::messages::ocpp20::NotifyDisplayMessages20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq&, + * ocpp::messages::ocpp20::NotifyDisplayMessagesConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYDISPLAYMESSAGES20_ACTION, request, response, error, message); + return call(NOTIFYDISPLAYMESSAGES_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req&, - * ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq&, + * ocpp::messages::ocpp20::NotifyEVChargingNeedsConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYEVCHARGINGNEEDS20_ACTION, request, response, error, message); + return call(NOTIFYEVCHARGINGNEEDS_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req&, - * ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq&, + * ocpp::messages::ocpp20::NotifyEVChargingScheduleConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYEVCHARGINGSCHEDULE20_ACTION, request, response, error, message); + return call(NOTIFYEVCHARGINGSCHEDULE_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEvent20Req&, - * ocpp::messages::ocpp20::NotifyEvent20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEventReq&, + * ocpp::messages::ocpp20::NotifyEventConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYEVENT20_ACTION, request, response, error, message); + return call(NOTIFYEVENT_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req&, - * ocpp::messages::ocpp20::NotifyMonitoringReport20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyMonitoringReportReq&, + * ocpp::messages::ocpp20::NotifyMonitoringReportConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYMONITORINGREPORT20_ACTION, request, response, error, message); + return call(NOTIFYMONITORINGREPORT_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyReport20Req&, - * ocpp::messages::ocpp20::NotifyReport20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyReportReq&, + * ocpp::messages::ocpp20::NotifyReportConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error, + std::string& message) { - return call(NOTIFYREPORT20_ACTION, request, response, error, message); + return call(NOTIFYREPORT_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req&, - * ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq&, + * ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) { - return call(PUBLISHFIRMWARESTATUSNOTIFICATION20_ACTION, request, response, error, message); + return call(PUBLISHFIRMWARESTATUSNOTIFICATION_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ReportChargingProfiles20Req&, - * ocpp::messages::ocpp20::ReportChargingProfiles20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ReportChargingProfilesReq&, + * ocpp::messages::ocpp20::ReportChargingProfilesConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error, + std::string& message) { - return call(REPORTCHARGINGPROFILES20_ACTION, request, response, error, message); + return call(REPORTCHARGINGPROFILES_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req&, - * ocpp::messages::ocpp20::ReservationStatusUpdate20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ReservationStatusUpdateReq&, + * ocpp::messages::ocpp20::ReservationStatusUpdateConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error, + std::string& message) { - return call(RESERVATIONSTATUSUPDATE20_ACTION, request, response, error, message); + return call(RESERVATIONSTATUSUPDATE_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::SecurityEventNotification20Req&, - * ocpp::messages::ocpp20::SecurityEventNotification20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::SecurityEventNotificationReq&, + * ocpp::messages::ocpp20::SecurityEventNotificationConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, + std::string& error, + std::string& message) { - return call(SECURITYEVENTNOTIFICATION20_ACTION, request, response, error, message); + return call(SECURITYEVENTNOTIFICATION_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::SignCertificate20Req&, - * ocpp::messages::ocpp20::SignCertificate20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::SignCertificateReq&, + * ocpp::messages::ocpp20::SignCertificateConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error, + std::string& message) { - return call(SIGNCERTIFICATE20_ACTION, request, response, error, message); + return call(SIGNCERTIFICATE_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::StatusNotification20Req&, - * ocpp::messages::ocpp20::StatusNotification20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::StatusNotificationReq&, + * ocpp::messages::ocpp20::StatusNotificationConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, + std::string& error, + std::string& message) { - return call(STATUSNOTIFICATION20_ACTION, request, response, error, message); + return call(STATUSNOTIFICATION_ACTION, request, response, error, message); } -/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::TransactionEvent20Req&, - * ocpp::messages::ocpp20::TransactionEvent20Conf&, +/** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::TransactionEventReq&, + * ocpp::messages::ocpp20::TransactionEventConf&, * std::string&, * std::string&) */ -bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, - std::string& error, - std::string& message) +bool CentralSystemProxy20::call(const ocpp::messages::ocpp20::TransactionEventReq& request, + ocpp::messages::ocpp20::TransactionEventConf& response, + std::string& error, + std::string& message) { - return call(TRANSACTIONEVENT20_ACTION, request, response, error, message); + return call(TRANSACTIONEVENT_ACTION, request, response, error, message); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function handler) + std::function) */ +bool CentralSystemProxy20::registerHandler( + std::function + handler) { - return registerHandler(CANCELRESERVATION20_ACTION, handler); + return registerHandler(CANCELRESERVATION_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function handler) + std::function) */ +bool CentralSystemProxy20::registerHandler( + std::function + handler) { - return registerHandler(CERTIFICATESIGNED20_ACTION, handler); + return registerHandler(CERTIFICATESIGNED_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function handler) + std::function) */ +bool CentralSystemProxy20::registerHandler( + std::function + handler) { - return registerHandler(CHANGEAVAILABILITY20_ACTION, handler); + return registerHandler(CHANGEAVAILABILITY_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( - std::function handler) + std::function + handler) { - return registerHandler(CLEARCACHE20_ACTION, handler); + return registerHandler(CLEARCACHE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(CLEARCHARGINGPROFILE20_ACTION, handler); + return registerHandler(CLEARCHARGINGPROFILE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(CLEARDISPLAYMESSAGE20_ACTION, handler); + return registerHandler(CLEARDISPLAYMESSAGE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(CLEARVARIABLEMONITORING20_ACTION, handler); + return registerHandler(CLEARVARIABLEMONITORING_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(CUSTOMERINFORMATION20_ACTION, handler); + return registerHandler(CUSTOMERINFORMATION_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( std::function handler) + const ocpp::messages::ocpp20::DataTransferReq&, ocpp::messages::ocpp20::DataTransferConf&, std::string&, std::string&)> handler) { - return registerHandler(DATATRANSFER20_ACTION, handler); + return registerHandler(DATATRANSFER_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function handler) + std::function) */ +bool CentralSystemProxy20::registerHandler( + std::function + handler) { - return registerHandler(DELETECERTIFICATE20_ACTION, handler); + return registerHandler(DELETECERTIFICATE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(GET15118EVCERTIFICATE20_ACTION, handler); + return registerHandler(GET15118EVCERTIFICATE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::GetBaseReport20Req&, ocpp::messages::ocpp20::GetBaseReport20Conf&, std::string&, std::string&)> - handler) + std::function handler) { - return registerHandler(GETBASEREPORT20_ACTION, handler); + return registerHandler(GETBASEREPORT_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(GETCERTIFICATESTATUS20_ACTION, handler); + return registerHandler(GETCERTIFICATESTATUS_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(GETCHARGINGPROFILES20_ACTION, handler); + return registerHandler(GETCHARGINGPROFILES_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(GETCOMPOSITESCHEDULE20_ACTION, handler); + return registerHandler(GETCOMPOSITESCHEDULE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function handler) + std::function) */ +bool CentralSystemProxy20::registerHandler( + std::function + handler) { - return registerHandler(GETDISPLAYMESSAGES20_ACTION, handler); + return registerHandler(GETDISPLAYMESSAGES_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(GETINSTALLEDCERTIFICATEIDS20_ACTION, handler); + return registerHandler(GETINSTALLEDCERTIFICATEIDS_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(GETLOCALLISTVERSION20_ACTION, handler); + return registerHandler(GETLOCALLISTVERSION_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( - std::function - handler) + std::function handler) { - return registerHandler(GETLOG20_ACTION, handler); + return registerHandler(GETLOG_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(GETMONITORINGREPORT20_ACTION, handler); + return registerHandler(GETMONITORINGREPORT_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( - std::function + std::function handler) { - return registerHandler(GETREPORT20_ACTION, handler); + return registerHandler(GETREPORT_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(GETTRANSACTIONSTATUS20_ACTION, handler); + return registerHandler(GETTRANSACTIONSTATUS_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( std::function handler) + const ocpp::messages::ocpp20::GetVariablesReq&, ocpp::messages::ocpp20::GetVariablesConf&, std::string&, std::string&)> handler) { - return registerHandler(GETVARIABLES20_ACTION, handler); + return registerHandler(GETVARIABLES_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function handler) + std::function) */ +bool CentralSystemProxy20::registerHandler( + std::function + handler) { - return registerHandler(INSTALLCERTIFICATE20_ACTION, handler); + return registerHandler(INSTALLCERTIFICATE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( - std::function + std::function< + bool(const ocpp::messages::ocpp20::PublishFirmwareReq&, ocpp::messages::ocpp20::PublishFirmwareConf&, std::string&, std::string&)> handler) { - return registerHandler(PUBLISHFIRMWARE20_ACTION, handler); + return registerHandler(PUBLISHFIRMWARE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(REQUESTSTARTTRANSACTION20_ACTION, handler); + return registerHandler(REQUESTSTARTTRANSACTION_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(REQUESTSTOPTRANSACTION20_ACTION, handler); + return registerHandler(REQUESTSTOPTRANSACTION_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( - std::function handler) + std::function + handler) { - return registerHandler(RESERVENOW20_ACTION, handler); + return registerHandler(RESERVENOW_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( - std::function - handler) + std::function handler) { - return registerHandler(RESET20_ACTION, handler); + return registerHandler(RESET_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::SendLocalList20Req&, ocpp::messages::ocpp20::SendLocalList20Conf&, std::string&, std::string&)> + std::function handler) +{ + return registerHandler(SENDLOCALLIST_ACTION, handler); +} +/** @copydoc bool ICentralSystemProxy20::registerHandler( + std::function) */ +bool CentralSystemProxy20::registerHandler( + std::function handler) { - return registerHandler(SENDLOCALLIST20_ACTION, handler); + return registerHandler(SETCHARGINGPROFILE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function handler) + std::function) */ +bool CentralSystemProxy20::registerHandler( + std::function + handler) { - return registerHandler(SETCHARGINGPROFILE20_ACTION, handler); + return registerHandler(SETDISPLAYMESSAGE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function handler) + std::function) */ +bool CentralSystemProxy20::registerHandler( + std::function + handler) { - return registerHandler(SETDISPLAYMESSAGE20_ACTION, handler); + return registerHandler(SETMONITORINGBASE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function handler) + std::function) */ +bool CentralSystemProxy20::registerHandler( + std::function + handler) { - return registerHandler(SETMONITORINGBASE20_ACTION, handler); + return registerHandler(SETMONITORINGLEVEL_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function handler) + std::function) */ +bool CentralSystemProxy20::registerHandler( + std::function + handler) { - return registerHandler(SETMONITORINGLEVEL20_ACTION, handler); + return registerHandler(SETNETWORKPROFILE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function) */ +bool CentralSystemProxy20::registerHandler(std::function handler) { - return registerHandler(SETNETWORKPROFILE20_ACTION, handler); + return registerHandler(SETVARIABLEMONITORING_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function handler) + std::function) */ +bool CentralSystemProxy20::registerHandler( + std::function handler) { - return registerHandler(SETVARIABLEMONITORING20_ACTION, handler); + return registerHandler(SETVARIABLES_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( std::function handler) + const ocpp::messages::ocpp20::TriggerMessageReq&, ocpp::messages::ocpp20::TriggerMessageConf&, std::string&, std::string&)> handler) { - return registerHandler(SETVARIABLES20_ACTION, handler); + return registerHandler(TRIGGERMESSAGE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( std::function< - bool(const ocpp::messages::ocpp20::TriggerMessage20Req&, ocpp::messages::ocpp20::TriggerMessage20Conf&, std::string&, std::string&)> + bool(const ocpp::messages::ocpp20::UnlockConnectorReq&, ocpp::messages::ocpp20::UnlockConnectorConf&, std::string&, std::string&)> handler) { - return registerHandler(TRIGGERMESSAGE20_ACTION, handler); + return registerHandler(UNLOCKCONNECTOR_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( std::function + const ocpp::messages::ocpp20::UnpublishFirmwareReq&, ocpp::messages::ocpp20::UnpublishFirmwareConf&, std::string&, std::string&)> handler) { - return registerHandler(UNLOCKCONNECTOR20_ACTION, handler); + return registerHandler(UNPUBLISHFIRMWARE_ACTION, handler); } /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ -bool CentralSystemProxy20::registerHandler(std::function handler) -{ - return registerHandler(UNPUBLISHFIRMWARE20_ACTION, handler); -} -/** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool CentralSystemProxy20::registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::UpdateFirmware20Req&, ocpp::messages::ocpp20::UpdateFirmware20Conf&, std::string&, std::string&)> - handler) + std::function handler) { - return registerHandler(UPDATEFIRMWARE20_ACTION, handler); + return registerHandler(UPDATEFIRMWARE_ACTION, handler); } // IRpc::IListener interface diff --git a/src/ocpp20/localcontroller/centralsystem/CentralSystemProxy20.h b/src/ocpp20/localcontroller/centralsystem/CentralSystemProxy20.h index 249266f9..d2b178cf 100644 --- a/src/ocpp20/localcontroller/centralsystem/CentralSystemProxy20.h +++ b/src/ocpp20/localcontroller/centralsystem/CentralSystemProxy20.h @@ -107,441 +107,440 @@ class CentralSystemProxy20 : public ICentralSystemProxy20, void registerListener(ILocalControllerProxyEventsHandler20& listener) override { m_listener = &listener; } // OCPP actions - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::BootNotification20Req&, - * ocpp::messages::ocpp20::BootNotification20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::BootNotificationReq&, + * ocpp::messages::ocpp20::BootNotificationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::Authorize20Req&, - * ocpp::messages::ocpp20::Authorize20Conf&, + bool call(const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::AuthorizeReq&, + * ocpp::messages::ocpp20::AuthorizeConf&, + * std::string&, + * std::string&) */ + bool call(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ClearedChargingLimitReq&, + * ocpp::messages::ocpp20::ClearedChargingLimitConf&, + * std::string&, + * std::string&) */ + bool call(const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::CostUpdatedReq&, + * ocpp::messages::ocpp20::CostUpdatedConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, + bool call(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, std::string& error, std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ClearedChargingLimit20Req&, - * ocpp::messages::ocpp20::ClearedChargingLimit20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::DataTransferReq&, + * ocpp::messages::ocpp20::DataTransferConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::CostUpdated20Req&, - * ocpp::messages::ocpp20::CostUpdated20Conf&, + bool call(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq&, + * ocpp::messages::ocpp20::FirmwareStatusNotificationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::DataTransfer20Req&, - * ocpp::messages::ocpp20::DataTransfer20Conf&, + bool call(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::HeartbeatReq&, + * ocpp::messages::ocpp20::HeartbeatConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req&, - * ocpp::messages::ocpp20::FirmwareStatusNotification20Conf&, + bool call(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::LogStatusNotificationReq&, + * ocpp::messages::ocpp20::LogStatusNotificationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::Heartbeat20Req&, - * ocpp::messages::ocpp20::Heartbeat20Conf&, + bool call(const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::MeterValuesReq&, + * ocpp::messages::ocpp20::MeterValuesConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, + bool call(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, std::string& error, std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::LogStatusNotification20Req&, - * ocpp::messages::ocpp20::LogStatusNotification20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyChargingLimitReq&, + * ocpp::messages::ocpp20::NotifyChargingLimitConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::MeterValues20Req&, - * ocpp::messages::ocpp20::MeterValues20Conf&, + bool call(const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyCustomerInformationReq&, + * ocpp::messages::ocpp20::NotifyCustomerInformationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyChargingLimit20Req&, - * ocpp::messages::ocpp20::NotifyChargingLimit20Conf&, + bool call(const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq&, + * ocpp::messages::ocpp20::NotifyDisplayMessagesConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, + bool call(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, std::string& error, std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req&, - * ocpp::messages::ocpp20::NotifyCustomerInformation20Conf&, - * std::string&, - * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req&, - * ocpp::messages::ocpp20::NotifyDisplayMessages20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq&, + * ocpp::messages::ocpp20::NotifyEVChargingNeedsConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req&, - * ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf&, + bool call(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq&, + * ocpp::messages::ocpp20::NotifyEVChargingScheduleConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req&, - * ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf&, + bool call(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEventReq&, + * ocpp::messages::ocpp20::NotifyEventConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyEvent20Req&, - * ocpp::messages::ocpp20::NotifyEvent20Conf&, + bool call(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyMonitoringReportReq&, + * ocpp::messages::ocpp20::NotifyMonitoringReportConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req&, - * ocpp::messages::ocpp20::NotifyMonitoringReport20Conf&, + bool call(const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyReportReq&, + * ocpp::messages::ocpp20::NotifyReportConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::NotifyReport20Req&, - * ocpp::messages::ocpp20::NotifyReport20Conf&, + bool call(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq&, + * ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req&, - * ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf&, + bool call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ReportChargingProfilesReq&, + * ocpp::messages::ocpp20::ReportChargingProfilesConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ReportChargingProfiles20Req&, - * ocpp::messages::ocpp20::ReportChargingProfiles20Conf&, + bool call(const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ReservationStatusUpdateReq&, + * ocpp::messages::ocpp20::ReservationStatusUpdateConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req&, - * ocpp::messages::ocpp20::ReservationStatusUpdate20Conf&, + bool call(const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::SecurityEventNotificationReq&, + * ocpp::messages::ocpp20::SecurityEventNotificationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, + bool call(const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, std::string& error, std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::SecurityEventNotification20Req&, - * ocpp::messages::ocpp20::SecurityEventNotification20Conf&, - * std::string&, - * std::string&) */ - bool call(const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::SignCertificate20Req&, - * ocpp::messages::ocpp20::SignCertificate20Conf&, - * std::string&, - * std::string&) */ - bool call(const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::StatusNotification20Req&, - * ocpp::messages::ocpp20::StatusNotification20Conf&, + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::SignCertificateReq&, + * ocpp::messages::ocpp20::SignCertificateConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::TransactionEvent20Req&, - * ocpp::messages::ocpp20::TransactionEvent20Conf&, + bool call(const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool ICentralSystemProxy20::call(const ocpp::messages::ocpp20::StatusNotificationReq&, + * ocpp::messages::ocpp20::StatusNotificationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, + bool call(const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, std::string& error, std::string& message) override; - /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( std::function handler) + const ocpp::messages::ocpp20::ClearCacheReq&, ocpp::messages::ocpp20::ClearCacheConf&, std::string&, std::string&)> handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::DataTransfer20Req&, ocpp::messages::ocpp20::DataTransfer20Conf&, std::string&, std::string&)> - handler) override; + std::function handler) + override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( - std::function + std::function< + bool(const ocpp::messages::ocpp20::GetBaseReportReq&, ocpp::messages::ocpp20::GetBaseReportConf&, std::string&, std::string&)> handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( - std::function + std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( - std::function handler) - override; + std::function + handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::GetVariables20Req&, ocpp::messages::ocpp20::GetVariables20Conf&, std::string&, std::string&)> - handler) override; + std::function handler) + override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function handler) override; + std::function) */ + bool registerHandler( + std::function + handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( std::function handler) + const ocpp::messages::ocpp20::ReserveNowReq&, ocpp::messages::ocpp20::ReserveNowConf&, std::string&, std::string&)> handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( - std::function + std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( - std::function + std::function< + bool(const ocpp::messages::ocpp20::SendLocalListReq&, ocpp::messages::ocpp20::SendLocalListConf&, std::string&, std::string&)> handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ + bool registerHandler( + std::function handler) + override; + /** @copydoc bool ICentralSystemProxy20::registerHandler( + std::function) */ bool registerHandler( std::function< - bool(const ocpp::messages::ocpp20::SetVariables20Req&, ocpp::messages::ocpp20::SetVariables20Conf&, std::string&, std::string&)> + bool(const ocpp::messages::ocpp20::TriggerMessageReq&, ocpp::messages::ocpp20::TriggerMessageConf&, std::string&, std::string&)> handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( std::function + const ocpp::messages::ocpp20::UnlockConnectorReq&, ocpp::messages::ocpp20::UnlockConnectorConf&, std::string&, std::string&)> handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function handler) override; - /** @copydoc bool ICentralSystemProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( - std::function + std::function< + bool(const ocpp::messages::ocpp20::UpdateFirmwareReq&, ocpp::messages::ocpp20::UpdateFirmwareConf&, std::string&, std::string&)> handler) override; // IRpc::IListener interface diff --git a/src/ocpp20/localcontroller/chargepoint/ChargePointHandler20.cpp b/src/ocpp20/localcontroller/chargepoint/ChargePointHandler20.cpp index f297c80c..ef3c9f49 100644 --- a/src/ocpp20/localcontroller/chargepoint/ChargePointHandler20.cpp +++ b/src/ocpp20/localcontroller/chargepoint/ChargePointHandler20.cpp @@ -40,89 +40,83 @@ ChargePointHandler20::ChargePointHandler20(const std::string& const ocpp::messages::ocpp20::MessagesConverter20& messages_converter, ocpp::messages::MessageDispatcher& msg_dispatcher, ICentralSystemProxy20& central_system) - : GenericMessageHandler(BOOTNOTIFICATION20_ACTION, messages_converter), - GenericMessageHandler(AUTHORIZE20_ACTION, messages_converter), - GenericMessageHandler(CLEAREDCHARGINGLIMIT20_ACTION, messages_converter), - GenericMessageHandler(COSTUPDATED20_ACTION, messages_converter), - GenericMessageHandler(DATATRANSFER20_ACTION, messages_converter), - GenericMessageHandler(FIRMWARESTATUSNOTIFICATION20_ACTION, - messages_converter), - GenericMessageHandler(HEARTBEAT20_ACTION, messages_converter), - GenericMessageHandler(LOGSTATUSNOTIFICATION20_ACTION, messages_converter), - GenericMessageHandler(METERVALUES20_ACTION, messages_converter), - GenericMessageHandler(NOTIFYCHARGINGLIMIT20_ACTION, messages_converter), - GenericMessageHandler(NOTIFYCUSTOMERINFORMATION20_ACTION, - messages_converter), - GenericMessageHandler(NOTIFYDISPLAYMESSAGES20_ACTION, messages_converter), - GenericMessageHandler(NOTIFYEVCHARGINGNEEDS20_ACTION, messages_converter), - GenericMessageHandler(NOTIFYEVCHARGINGSCHEDULE20_ACTION, + : GenericMessageHandler(BOOTNOTIFICATION_ACTION, messages_converter), + GenericMessageHandler(AUTHORIZE_ACTION, messages_converter), + GenericMessageHandler(CLEAREDCHARGINGLIMIT_ACTION, messages_converter), + GenericMessageHandler(COSTUPDATED_ACTION, messages_converter), + GenericMessageHandler(DATATRANSFER_ACTION, messages_converter), + GenericMessageHandler(FIRMWARESTATUSNOTIFICATION_ACTION, messages_converter), - GenericMessageHandler(NOTIFYEVENT20_ACTION, messages_converter), - GenericMessageHandler(NOTIFYMONITORINGREPORT20_ACTION, messages_converter), - GenericMessageHandler(NOTIFYREPORT20_ACTION, messages_converter), - GenericMessageHandler( - PUBLISHFIRMWARESTATUSNOTIFICATION20_ACTION, messages_converter), - GenericMessageHandler(REPORTCHARGINGPROFILES20_ACTION, messages_converter), - GenericMessageHandler(RESERVATIONSTATUSUPDATE20_ACTION, + GenericMessageHandler(HEARTBEAT_ACTION, messages_converter), + GenericMessageHandler(LOGSTATUSNOTIFICATION_ACTION, messages_converter), + GenericMessageHandler(METERVALUES_ACTION, messages_converter), + GenericMessageHandler(NOTIFYCHARGINGLIMIT_ACTION, messages_converter), + GenericMessageHandler(NOTIFYCUSTOMERINFORMATION_ACTION, messages_converter), - GenericMessageHandler(SECURITYEVENTNOTIFICATION20_ACTION, - messages_converter), - GenericMessageHandler(SIGNCERTIFICATE20_ACTION, messages_converter), - GenericMessageHandler(STATUSNOTIFICATION20_ACTION, messages_converter), - GenericMessageHandler(TRANSACTIONEVENT20_ACTION, messages_converter), + GenericMessageHandler(NOTIFYDISPLAYMESSAGES_ACTION, messages_converter), + GenericMessageHandler(NOTIFYEVCHARGINGNEEDS_ACTION, messages_converter), + GenericMessageHandler(NOTIFYEVCHARGINGSCHEDULE_ACTION, messages_converter), + GenericMessageHandler(NOTIFYEVENT_ACTION, messages_converter), + GenericMessageHandler(NOTIFYMONITORINGREPORT_ACTION, messages_converter), + GenericMessageHandler(NOTIFYREPORT_ACTION, messages_converter), + GenericMessageHandler( + PUBLISHFIRMWARESTATUSNOTIFICATION_ACTION, messages_converter), + GenericMessageHandler(REPORTCHARGINGPROFILES_ACTION, messages_converter), + GenericMessageHandler(RESERVATIONSTATUSUPDATE_ACTION, messages_converter), + GenericMessageHandler(SECURITYEVENTNOTIFICATION_ACTION, + messages_converter), + GenericMessageHandler(SIGNCERTIFICATE_ACTION, messages_converter), + GenericMessageHandler(STATUSNOTIFICATION_ACTION, messages_converter), + GenericMessageHandler(TRANSACTIONEVENT_ACTION, messages_converter), m_identifier(identifier), m_central_system(central_system) { - msg_dispatcher.registerHandler(BOOTNOTIFICATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(AUTHORIZE20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(CLEAREDCHARGINGLIMIT20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(COSTUPDATED20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(DATATRANSFER20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler( - FIRMWARESTATUSNOTIFICATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(HEARTBEAT20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(LOGSTATUSNOTIFICATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(METERVALUES20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(NOTIFYCHARGINGLIMIT20_ACTION, - *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(BOOTNOTIFICATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(AUTHORIZE_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(CLEAREDCHARGINGLIMIT_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(COSTUPDATED_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(DATATRANSFER_ACTION, *dynamic_cast*>(this)); msg_dispatcher.registerHandler( - NOTIFYCUSTOMERINFORMATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(NOTIFYDISPLAYMESSAGES20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(NOTIFYEVCHARGINGNEEDS20_ACTION, - *dynamic_cast*>(this)); + FIRMWARESTATUSNOTIFICATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(HEARTBEAT_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(LOGSTATUSNOTIFICATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(METERVALUES_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYCHARGINGLIMIT_ACTION, + *dynamic_cast*>(this)); msg_dispatcher.registerHandler( - NOTIFYEVCHARGINGSCHEDULE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(NOTIFYEVENT20_ACTION, *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(NOTIFYMONITORINGREPORT20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(NOTIFYREPORT20_ACTION, - *dynamic_cast*>(this)); + NOTIFYCUSTOMERINFORMATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYDISPLAYMESSAGES_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYEVCHARGINGNEEDS_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYEVCHARGINGSCHEDULE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYEVENT_ACTION, *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYMONITORINGREPORT_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(NOTIFYREPORT_ACTION, *dynamic_cast*>(this)); msg_dispatcher.registerHandler( - PUBLISHFIRMWARESTATUSNOTIFICATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(REPORTCHARGINGPROFILES20_ACTION, - *dynamic_cast*>(this)); + PUBLISHFIRMWARESTATUSNOTIFICATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(REPORTCHARGINGPROFILES_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(RESERVATIONSTATUSUPDATE_ACTION, + *dynamic_cast*>(this)); msg_dispatcher.registerHandler( - RESERVATIONSTATUSUPDATE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler( - SECURITYEVENTNOTIFICATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(SIGNCERTIFICATE20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(STATUSNOTIFICATION20_ACTION, - *dynamic_cast*>(this)); - msg_dispatcher.registerHandler(TRANSACTIONEVENT20_ACTION, - *dynamic_cast*>(this)); + SECURITYEVENTNOTIFICATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(SIGNCERTIFICATE_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(STATUSNOTIFICATION_ACTION, + *dynamic_cast*>(this)); + msg_dispatcher.registerHandler(TRANSACTIONEVENT_ACTION, + *dynamic_cast*>(this)); } /** @brief Destructor */ ChargePointHandler20::~ChargePointHandler20() { } @@ -133,288 +127,288 @@ ChargePointHandler20::~ChargePointHandler20() { } * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error_code, + std::string& error_message) { - return forward(BOOTNOTIFICATION20_ACTION, request, response, error_code, error_message); + return forward(BOOTNOTIFICATION_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error_code, + std::string& error_message) { - return forward(AUTHORIZE20_ACTION, request, response, error_code, error_message); + return forward(AUTHORIZE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error_code, + std::string& error_message) { - return forward(CLEAREDCHARGINGLIMIT20_ACTION, request, response, error_code, error_message); + return forward(CLEAREDCHARGINGLIMIT_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, + std::string& error_code, + std::string& error_message) { - return forward(COSTUPDATED20_ACTION, request, response, error_code, error_message); + return forward(COSTUPDATED_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error_code, + std::string& error_message) { - return forward(DATATRANSFER20_ACTION, request, response, error_code, error_message); + return forward(DATATRANSFER_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error_code, + std::string& error_message) { - return forward(FIRMWARESTATUSNOTIFICATION20_ACTION, request, response, error_code, error_message); + return forward(FIRMWARESTATUSNOTIFICATION_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error_code, + std::string& error_message) { - return forward(HEARTBEAT20_ACTION, request, response, error_code, error_message); + return forward(HEARTBEAT_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, + std::string& error_code, + std::string& error_message) { - return forward(LOGSTATUSNOTIFICATION20_ACTION, request, response, error_code, error_message); + return forward(LOGSTATUSNOTIFICATION_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, + std::string& error_code, + std::string& error_message) { - return forward(METERVALUES20_ACTION, request, response, error_code, error_message); + return forward(METERVALUES_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error_code, + std::string& error_message) { - return forward(NOTIFYCHARGINGLIMIT20_ACTION, request, response, error_code, error_message); + return forward(NOTIFYCHARGINGLIMIT_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error_code, + std::string& error_message) { - return forward(NOTIFYCUSTOMERINFORMATION20_ACTION, request, response, error_code, error_message); + return forward(NOTIFYCUSTOMERINFORMATION_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, + std::string& error_code, + std::string& error_message) { - return forward(NOTIFYDISPLAYMESSAGES20_ACTION, request, response, error_code, error_message); + return forward(NOTIFYDISPLAYMESSAGES_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error_code, + std::string& error_message) { - return forward(NOTIFYEVCHARGINGNEEDS20_ACTION, request, response, error_code, error_message); + return forward(NOTIFYEVCHARGINGNEEDS_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, + std::string& error_code, + std::string& error_message) { - return forward(NOTIFYEVCHARGINGSCHEDULE20_ACTION, request, response, error_code, error_message); + return forward(NOTIFYEVCHARGINGSCHEDULE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error_code, + std::string& error_message) { - return forward(NOTIFYEVENT20_ACTION, request, response, error_code, error_message); + return forward(NOTIFYEVENT_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error_code, + std::string& error_message) { - return forward(NOTIFYMONITORINGREPORT20_ACTION, request, response, error_code, error_message); + return forward(NOTIFYMONITORINGREPORT_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error_code, + std::string& error_message) { - return forward(NOTIFYREPORT20_ACTION, request, response, error_code, error_message); + return forward(NOTIFYREPORT_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error_code, + std::string& error_message) { - return forward(PUBLISHFIRMWARESTATUSNOTIFICATION20_ACTION, request, response, error_code, error_message); + return forward(PUBLISHFIRMWARESTATUSNOTIFICATION_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error_code, + std::string& error_message) { - return forward(REPORTCHARGINGPROFILES20_ACTION, request, response, error_code, error_message); + return forward(REPORTCHARGINGPROFILES_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error_code, + std::string& error_message) { - return forward(RESERVATIONSTATUSUPDATE20_ACTION, request, response, error_code, error_message); + return forward(RESERVATIONSTATUSUPDATE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, + std::string& error_code, + std::string& error_message) { - return forward(SECURITYEVENTNOTIFICATION20_ACTION, request, response, error_code, error_message); + return forward(SECURITYEVENTNOTIFICATION_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error_code, + std::string& error_message) { - return forward(SIGNCERTIFICATE20_ACTION, request, response, error_code, error_message); + return forward(SIGNCERTIFICATE_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, + std::string& error_code, + std::string& error_message) { - return forward(STATUSNOTIFICATION20_ACTION, request, response, error_code, error_message); + return forward(STATUSNOTIFICATION_ACTION, request, response, error_code, error_message); } /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ -bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, - std::string& error_code, - std::string& error_message) +bool ChargePointHandler20::handleMessage(const ocpp::messages::ocpp20::TransactionEventReq& request, + ocpp::messages::ocpp20::TransactionEventConf& response, + std::string& error_code, + std::string& error_message) { - return forward(TRANSACTIONEVENT20_ACTION, request, response, error_code, error_message); + return forward(TRANSACTIONEVENT_ACTION, request, response, error_code, error_message); } } // namespace ocpp20 diff --git a/src/ocpp20/localcontroller/chargepoint/ChargePointHandler20.h b/src/ocpp20/localcontroller/chargepoint/ChargePointHandler20.h index bb9594b1..b1822376 100644 --- a/src/ocpp20/localcontroller/chargepoint/ChargePointHandler20.h +++ b/src/ocpp20/localcontroller/chargepoint/ChargePointHandler20.h @@ -72,47 +72,46 @@ namespace ocpp20 /** @brief Handler for charge point requests */ class ChargePointHandler20 - : public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler, - public ocpp::messages::GenericMessageHandler + : public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler, + public ocpp::messages::GenericMessageHandler { public: /** @@ -136,217 +135,217 @@ class ChargePointHandler20 * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, + std::string& error_code, + std::string& error_message) override; /** @copydoc bool GenericMessageHandler::handleMessage(const RequestType& request, * ResponseType& response, * std::string& error_code, * std::string& error_message) */ - bool handleMessage(const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, - std::string& error_code, - std::string& error_message) override; + bool handleMessage(const ocpp::messages::ocpp20::TransactionEventReq& request, + ocpp::messages::ocpp20::TransactionEventConf& response, + std::string& error_code, + std::string& error_message) override; private: /** @brief Charge point's identifier */ diff --git a/src/ocpp20/localcontroller/chargepoint/ChargePointProxy20.cpp b/src/ocpp20/localcontroller/chargepoint/ChargePointProxy20.cpp index bbc30d4f..48233d7e 100644 --- a/src/ocpp20/localcontroller/chargepoint/ChargePointProxy20.cpp +++ b/src/ocpp20/localcontroller/chargepoint/ChargePointProxy20.cpp @@ -128,665 +128,665 @@ void ChargePointProxy20::disconnect() } // OCPP operations -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::CancelReservation20Req&, - * ocpp::messages::ocpp20::CancelReservation20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::CancelReservationReq&, + * ocpp::messages::ocpp20::CancelReservationConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error, + std::string& message) { - return call(CANCELRESERVATION20_ACTION, request, response, error, message); + return call(CANCELRESERVATION_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::CertificateSigned20Req&, - * ocpp::messages::ocpp20::CertificateSigned20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::CertificateSignedReq&, + * ocpp::messages::ocpp20::CertificateSignedConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error, + std::string& message) { - return call(CERTIFICATESIGNED20_ACTION, request, response, error, message); + return call(CERTIFICATESIGNED_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ChangeAvailability20Req&, - * ocpp::messages::ocpp20::ChangeAvailability20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ChangeAvailabilityReq&, + * ocpp::messages::ocpp20::ChangeAvailabilityConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error, + std::string& message) { - return call(CHANGEAVAILABILITY20_ACTION, request, response, error, message); + return call(CHANGEAVAILABILITY_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearCache20Req&, - * ocpp::messages::ocpp20::ClearCache20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearCacheReq&, + * ocpp::messages::ocpp20::ClearCacheConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error, + std::string& message) { - return call(CLEARCACHE20_ACTION, request, response, error, message); + return call(CLEARCACHE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearChargingProfile20Req&, - * ocpp::messages::ocpp20::ClearChargingProfile20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearChargingProfileReq&, + * ocpp::messages::ocpp20::ClearChargingProfileConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, + std::string& error, + std::string& message) { - return call(CLEARCHARGINGPROFILE20_ACTION, request, response, error, message); + return call(CLEARCHARGINGPROFILE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearDisplayMessage20Req&, - * ocpp::messages::ocpp20::ClearDisplayMessage20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearDisplayMessageReq&, + * ocpp::messages::ocpp20::ClearDisplayMessageConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, + std::string& error, + std::string& message) { - return call(CLEARDISPLAYMESSAGE20_ACTION, request, response, error, message); + return call(CLEARDISPLAYMESSAGE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req&, - * ocpp::messages::ocpp20::ClearVariableMonitoring20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearVariableMonitoringReq&, + * ocpp::messages::ocpp20::ClearVariableMonitoringConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, + std::string& error, + std::string& message) { - return call(CLEARVARIABLEMONITORING20_ACTION, request, response, error, message); + return call(CLEARVARIABLEMONITORING_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::CustomerInformation20Req&, - * ocpp::messages::ocpp20::CustomerInformation20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::CustomerInformationReq&, + * ocpp::messages::ocpp20::CustomerInformationConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error, + std::string& message) { - return call(CUSTOMERINFORMATION20_ACTION, request, response, error, message); + return call(CUSTOMERINFORMATION_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::DataTransfer20Req&, - * ocpp::messages::ocpp20::DataTransfer20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::DataTransferReq&, + * ocpp::messages::ocpp20::DataTransferConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) { - return call(DATATRANSFER20_ACTION, request, response, error, message); + return call(DATATRANSFER_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::DeleteCertificate20Req&, - * ocpp::messages::ocpp20::DeleteCertificate20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::DeleteCertificateReq&, + * ocpp::messages::ocpp20::DeleteCertificateConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error, + std::string& message) { - return call(DELETECERTIFICATE20_ACTION, request, response, error, message); + return call(DELETECERTIFICATE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::Get15118EVCertificate20Req&, - * ocpp::messages::ocpp20::Get15118EVCertificate20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::Get15118EVCertificateReq&, + * ocpp::messages::ocpp20::Get15118EVCertificateConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, + std::string& error, + std::string& message) { - return call(GET15118EVCERTIFICATE20_ACTION, request, response, error, message); + return call(GET15118EVCERTIFICATE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetBaseReport20Req&, - * ocpp::messages::ocpp20::GetBaseReport20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetBaseReportReq&, + * ocpp::messages::ocpp20::GetBaseReportConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error, + std::string& message) { - return call(GETBASEREPORT20_ACTION, request, response, error, message); + return call(GETBASEREPORT_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetCertificateStatus20Req&, - * ocpp::messages::ocpp20::GetCertificateStatus20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetCertificateStatusReq&, + * ocpp::messages::ocpp20::GetCertificateStatusConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, + std::string& error, + std::string& message) { - return call(GETCERTIFICATESTATUS20_ACTION, request, response, error, message); + return call(GETCERTIFICATESTATUS_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetChargingProfiles20Req&, - * ocpp::messages::ocpp20::GetChargingProfiles20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetChargingProfilesReq&, + * ocpp::messages::ocpp20::GetChargingProfilesConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error, + std::string& message) { - return call(GETCHARGINGPROFILES20_ACTION, request, response, error, message); + return call(GETCHARGINGPROFILES_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetCompositeSchedule20Req&, - * ocpp::messages::ocpp20::GetCompositeSchedule20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetCompositeScheduleReq&, + * ocpp::messages::ocpp20::GetCompositeScheduleConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error, + std::string& message) { - return call(GETCOMPOSITESCHEDULE20_ACTION, request, response, error, message); + return call(GETCOMPOSITESCHEDULE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetDisplayMessages20Req&, - * ocpp::messages::ocpp20::GetDisplayMessages20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetDisplayMessagesReq&, + * ocpp::messages::ocpp20::GetDisplayMessagesConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error, + std::string& message) { - return call(GETDISPLAYMESSAGES20_ACTION, request, response, error, message); + return call(GETDISPLAYMESSAGES_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req&, - * ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq&, + * ocpp::messages::ocpp20::GetInstalledCertificateIdsConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error, + std::string& message) { - return call(GETINSTALLEDCERTIFICATEIDS20_ACTION, request, response, error, message); + return call(GETINSTALLEDCERTIFICATEIDS_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetLocalListVersion20Req&, - * ocpp::messages::ocpp20::GetLocalListVersion20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetLocalListVersionReq&, + * ocpp::messages::ocpp20::GetLocalListVersionConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error, + std::string& message) { - return call(GETLOCALLISTVERSION20_ACTION, request, response, error, message); + return call(GETLOCALLISTVERSION_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetLog20Req&, - * ocpp::messages::ocpp20::GetLog20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetLogReq&, + * ocpp::messages::ocpp20::GetLogConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error, + std::string& message) { - return call(GETLOG20_ACTION, request, response, error, message); + return call(GETLOG_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetMonitoringReport20Req&, - * ocpp::messages::ocpp20::GetMonitoringReport20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetMonitoringReportReq&, + * ocpp::messages::ocpp20::GetMonitoringReportConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error, + std::string& message) { - return call(GETMONITORINGREPORT20_ACTION, request, response, error, message); + return call(GETMONITORINGREPORT_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetReport20Req&, - * ocpp::messages::ocpp20::GetReport20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetReportReq&, + * ocpp::messages::ocpp20::GetReportConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error, + std::string& message) { - return call(GETREPORT20_ACTION, request, response, error, message); + return call(GETREPORT_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetTransactionStatus20Req&, - * ocpp::messages::ocpp20::GetTransactionStatus20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetTransactionStatusReq&, + * ocpp::messages::ocpp20::GetTransactionStatusConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, + std::string& error, + std::string& message) { - return call(GETTRANSACTIONSTATUS20_ACTION, request, response, error, message); + return call(GETTRANSACTIONSTATUS_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetVariables20Req&, - * ocpp::messages::ocpp20::GetVariables20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetVariablesReq&, + * ocpp::messages::ocpp20::GetVariablesConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, + std::string& error, + std::string& message) { - return call(GETVARIABLES20_ACTION, request, response, error, message); + return call(GETVARIABLES_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::InstallCertificate20Req&, - * ocpp::messages::ocpp20::InstallCertificate20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::InstallCertificateReq&, + * ocpp::messages::ocpp20::InstallCertificateConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error, + std::string& message) { - return call(INSTALLCERTIFICATE20_ACTION, request, response, error, message); + return call(INSTALLCERTIFICATE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::PublishFirmware20Req&, - * ocpp::messages::ocpp20::PublishFirmware20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::PublishFirmwareReq&, + * ocpp::messages::ocpp20::PublishFirmwareConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, + std::string& error, + std::string& message) { - return call(PUBLISHFIRMWARE20_ACTION, request, response, error, message); + return call(PUBLISHFIRMWARE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStartTransaction20Req&, - * ocpp::messages::ocpp20::RequestStartTransaction20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStartTransactionReq&, + * ocpp::messages::ocpp20::RequestStartTransactionConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error, + std::string& message) { - return call(REQUESTSTARTTRANSACTION20_ACTION, request, response, error, message); + return call(REQUESTSTARTTRANSACTION_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStopTransaction20Req&, - * ocpp::messages::ocpp20::RequestStopTransaction20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStopTransactionReq&, + * ocpp::messages::ocpp20::RequestStopTransactionConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error, + std::string& message) { - return call(REQUESTSTOPTRANSACTION20_ACTION, request, response, error, message); + return call(REQUESTSTOPTRANSACTION_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ReserveNow20Req&, - * ocpp::messages::ocpp20::ReserveNow20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ReserveNowReq&, + * ocpp::messages::ocpp20::ReserveNowConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error, + std::string& message) { - return call(RESERVENOW20_ACTION, request, response, error, message); + return call(RESERVENOW_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::Reset20Req&, - * ocpp::messages::ocpp20::Reset20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ResetReq&, + * ocpp::messages::ocpp20::ResetConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error, + std::string& message) { - return call(RESET20_ACTION, request, response, error, message); + return call(RESET_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SendLocalList20Req&, - * ocpp::messages::ocpp20::SendLocalList20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SendLocalListReq&, + * ocpp::messages::ocpp20::SendLocalListConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error, + std::string& message) { - return call(SENDLOCALLIST20_ACTION, request, response, error, message); + return call(SENDLOCALLIST_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetChargingProfile20Req&, - * ocpp::messages::ocpp20::SetChargingProfile20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetChargingProfileReq&, + * ocpp::messages::ocpp20::SetChargingProfileConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error, + std::string& message) { - return call(SETCHARGINGPROFILE20_ACTION, request, response, error, message); + return call(SETCHARGINGPROFILE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetDisplayMessage20Req&, - * ocpp::messages::ocpp20::SetDisplayMessage20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetDisplayMessageReq&, + * ocpp::messages::ocpp20::SetDisplayMessageConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error, + std::string& message) { - return call(SETDISPLAYMESSAGE20_ACTION, request, response, error, message); + return call(SETDISPLAYMESSAGE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringBase20Req&, - * ocpp::messages::ocpp20::SetMonitoringBase20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringBaseReq&, + * ocpp::messages::ocpp20::SetMonitoringBaseConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error, + std::string& message) { - return call(SETMONITORINGBASE20_ACTION, request, response, error, message); + return call(SETMONITORINGBASE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringLevel20Req&, - * ocpp::messages::ocpp20::SetMonitoringLevel20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringLevelReq&, + * ocpp::messages::ocpp20::SetMonitoringLevelConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error, + std::string& message) { - return call(SETMONITORINGLEVEL20_ACTION, request, response, error, message); + return call(SETMONITORINGLEVEL_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetNetworkProfile20Req&, - * ocpp::messages::ocpp20::SetNetworkProfile20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetNetworkProfileReq&, + * ocpp::messages::ocpp20::SetNetworkProfileConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error, + std::string& message) { - return call(SETNETWORKPROFILE20_ACTION, request, response, error, message); + return call(SETNETWORKPROFILE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariableMonitoring20Req&, - * ocpp::messages::ocpp20::SetVariableMonitoring20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariableMonitoringReq&, + * ocpp::messages::ocpp20::SetVariableMonitoringConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error, + std::string& message) { - return call(SETVARIABLEMONITORING20_ACTION, request, response, error, message); + return call(SETVARIABLEMONITORING_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariables20Req&, - * ocpp::messages::ocpp20::SetVariables20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariablesReq&, + * ocpp::messages::ocpp20::SetVariablesConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error, + std::string& message) { - return call(SETVARIABLES20_ACTION, request, response, error, message); + return call(SETVARIABLES_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::TriggerMessage20Req&, - * ocpp::messages::ocpp20::TriggerMessage20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::TriggerMessageReq&, + * ocpp::messages::ocpp20::TriggerMessageConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, + std::string& error, + std::string& message) { - return call(TRIGGERMESSAGE20_ACTION, request, response, error, message); + return call(TRIGGERMESSAGE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::UnlockConnector20Req&, - * ocpp::messages::ocpp20::UnlockConnector20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::UnlockConnectorReq&, + * ocpp::messages::ocpp20::UnlockConnectorConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error, + std::string& message) { - return call(UNLOCKCONNECTOR20_ACTION, request, response, error, message); + return call(UNLOCKCONNECTOR_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::UnpublishFirmware20Req&, - * ocpp::messages::ocpp20::UnpublishFirmware20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::UnpublishFirmwareReq&, + * ocpp::messages::ocpp20::UnpublishFirmwareConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, + std::string& error, + std::string& message) { - return call(UNPUBLISHFIRMWARE20_ACTION, request, response, error, message); + return call(UNPUBLISHFIRMWARE_ACTION, request, response, error, message); } -/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::UpdateFirmware20Req&, - * ocpp::messages::ocpp20::UpdateFirmware20Conf&, +/** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::UpdateFirmwareReq&, + * ocpp::messages::ocpp20::UpdateFirmwareConf&, * std::string&, * std::string&) */ -bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error, - std::string& message) +bool ChargePointProxy20::call(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error, + std::string& message) { - return call(UPDATEFIRMWARE20_ACTION, request, response, error, message); + return call(UPDATEFIRMWARE_ACTION, request, response, error, message); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool ChargePointProxy20::registerHandler( - std::function + std::function< + bool(const ocpp::messages::ocpp20::BootNotificationReq&, ocpp::messages::ocpp20::BootNotificationConf&, std::string&, std::string&)> handler) { - return registerHandler(BOOTNOTIFICATION20_ACTION, handler); + return registerHandler(BOOTNOTIFICATION_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool ChargePointProxy20::registerHandler( - std::function + std::function handler) { - return registerHandler(AUTHORIZE20_ACTION, handler); + return registerHandler(AUTHORIZE_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(CLEAREDCHARGINGLIMIT20_ACTION, handler); + return registerHandler(CLEAREDCHARGINGLIMIT_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool ChargePointProxy20::registerHandler( - std::function handler) + std::function + handler) { - return registerHandler(COSTUPDATED20_ACTION, handler); + return registerHandler(COSTUPDATED_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool ChargePointProxy20::registerHandler( std::function handler) + const ocpp::messages::ocpp20::DataTransferReq&, ocpp::messages::ocpp20::DataTransferConf&, std::string&, std::string&)> handler) { - return registerHandler(DATATRANSFER20_ACTION, handler); + return registerHandler(DATATRANSFER_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(FIRMWARESTATUSNOTIFICATION20_ACTION, handler); + return registerHandler(FIRMWARESTATUSNOTIFICATION_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool ChargePointProxy20::registerHandler( - std::function + std::function handler) { - return registerHandler(HEARTBEAT20_ACTION, handler); + return registerHandler(HEARTBEAT_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(LOGSTATUSNOTIFICATION20_ACTION, handler); + return registerHandler(LOGSTATUSNOTIFICATION_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool ChargePointProxy20::registerHandler( - std::function handler) + std::function + handler) { - return registerHandler(METERVALUES20_ACTION, handler); + return registerHandler(METERVALUES_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(NOTIFYCHARGINGLIMIT20_ACTION, handler); + return registerHandler(NOTIFYCHARGINGLIMIT_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(NOTIFYCUSTOMERINFORMATION20_ACTION, handler); + return registerHandler(NOTIFYCUSTOMERINFORMATION_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(NOTIFYDISPLAYMESSAGES20_ACTION, handler); + return registerHandler(NOTIFYDISPLAYMESSAGES_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(NOTIFYEVCHARGINGNEEDS20_ACTION, handler); + return registerHandler(NOTIFYEVCHARGINGNEEDS_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(NOTIFYEVCHARGINGSCHEDULE20_ACTION, handler); + return registerHandler(NOTIFYEVCHARGINGSCHEDULE_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool ChargePointProxy20::registerHandler( - std::function handler) + std::function + handler) { - return registerHandler(NOTIFYEVENT20_ACTION, handler); + return registerHandler(NOTIFYEVENT_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(NOTIFYMONITORINGREPORT20_ACTION, handler); + return registerHandler(NOTIFYMONITORINGREPORT_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool ChargePointProxy20::registerHandler( std::function handler) + const ocpp::messages::ocpp20::NotifyReportReq&, ocpp::messages::ocpp20::NotifyReportConf&, std::string&, std::string&)> handler) { - return registerHandler(NOTIFYREPORT20_ACTION, handler); + return registerHandler(NOTIFYREPORT_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(PUBLISHFIRMWARESTATUSNOTIFICATION20_ACTION, handler); + return registerHandler(PUBLISHFIRMWARESTATUSNOTIFICATION_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(REPORTCHARGINGPROFILES20_ACTION, handler); + return registerHandler(REPORTCHARGINGPROFILES_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(RESERVATIONSTATUSUPDATE20_ACTION, handler); + return registerHandler(RESERVATIONSTATUSUPDATE_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function) */ +bool ChargePointProxy20::registerHandler(std::function handler) { - return registerHandler(SECURITYEVENTNOTIFICATION20_ACTION, handler); + return registerHandler(SECURITYEVENTNOTIFICATION_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool ChargePointProxy20::registerHandler( - std::function + std::function< + bool(const ocpp::messages::ocpp20::SignCertificateReq&, ocpp::messages::ocpp20::SignCertificateConf&, std::string&, std::string&)> handler) { - return registerHandler(SIGNCERTIFICATE20_ACTION, handler); + return registerHandler(SIGNCERTIFICATE_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ -bool ChargePointProxy20::registerHandler(std::function handler) + std::function) */ +bool ChargePointProxy20::registerHandler( + std::function + handler) { - return registerHandler(STATUSNOTIFICATION20_ACTION, handler); + return registerHandler(STATUSNOTIFICATION_ACTION, handler); } /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool ChargePointProxy20::registerHandler( - std::function + std::function< + bool(const ocpp::messages::ocpp20::TransactionEventReq&, ocpp::messages::ocpp20::TransactionEventConf&, std::string&, std::string&)> handler) { - return registerHandler(TRANSACTIONEVENT20_ACTION, handler); + return registerHandler(TRANSACTIONEVENT_ACTION, handler); } // IRpc::IListener interface diff --git a/src/ocpp20/localcontroller/chargepoint/ChargePointProxy20.h b/src/ocpp20/localcontroller/chargepoint/ChargePointProxy20.h index 6b15a8e5..7bd134c6 100644 --- a/src/ocpp20/localcontroller/chargepoint/ChargePointProxy20.h +++ b/src/ocpp20/localcontroller/chargepoint/ChargePointProxy20.h @@ -88,478 +88,476 @@ class ChargePointProxy20 : public IChargePointProxy20, public ocpp::rpc::IRpc::I } // OCPP operations - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::CancelReservation20Req&, - * ocpp::messages::ocpp20::CancelReservation20Conf&, + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::CancelReservationReq&, + * ocpp::messages::ocpp20::CancelReservationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::CertificateSigned20Req&, - * ocpp::messages::ocpp20::CertificateSigned20Conf&, - * std::string&, - * std::string&) */ - bool call(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ChangeAvailability20Req&, - * ocpp::messages::ocpp20::ChangeAvailability20Conf&, - * std::string&, - * std::string&) */ - bool call(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearCache20Req&, - * ocpp::messages::ocpp20::ClearCache20Conf&, - * std::string&, - * std::string&) */ - bool call(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearChargingProfile20Req&, - * ocpp::messages::ocpp20::ClearChargingProfile20Conf&, - * std::string&, - * std::string&) */ - bool call(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearDisplayMessage20Req&, - * ocpp::messages::ocpp20::ClearDisplayMessage20Conf&, + bool call(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::CertificateSignedReq&, + * ocpp::messages::ocpp20::CertificateSignedConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req&, - * ocpp::messages::ocpp20::ClearVariableMonitoring20Conf&, + bool call(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ChangeAvailabilityReq&, + * ocpp::messages::ocpp20::ChangeAvailabilityConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::CustomerInformation20Req&, - * ocpp::messages::ocpp20::CustomerInformation20Conf&, + bool call(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearCacheReq&, + * ocpp::messages::ocpp20::ClearCacheConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::DataTransfer20Req&, - * ocpp::messages::ocpp20::DataTransfer20Conf&, + bool call(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearChargingProfileReq&, + * ocpp::messages::ocpp20::ClearChargingProfileConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::DeleteCertificate20Req&, - * ocpp::messages::ocpp20::DeleteCertificate20Conf&, + bool call(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearDisplayMessageReq&, + * ocpp::messages::ocpp20::ClearDisplayMessageConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, + bool call(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, std::string& error, std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::Get15118EVCertificate20Req&, - * ocpp::messages::ocpp20::Get15118EVCertificate20Conf&, + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ClearVariableMonitoringReq&, + * ocpp::messages::ocpp20::ClearVariableMonitoringConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, + bool call(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, std::string& error, std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetBaseReport20Req&, - * ocpp::messages::ocpp20::GetBaseReport20Conf&, + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::CustomerInformationReq&, + * ocpp::messages::ocpp20::CustomerInformationConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetCertificateStatus20Req&, - * ocpp::messages::ocpp20::GetCertificateStatus20Conf&, + bool call(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::DataTransferReq&, + * ocpp::messages::ocpp20::DataTransferConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetChargingProfiles20Req&, - * ocpp::messages::ocpp20::GetChargingProfiles20Conf&, + bool call(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::DeleteCertificateReq&, + * ocpp::messages::ocpp20::DeleteCertificateConf&, + * std::string&, + * std::string&) */ + bool call(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::Get15118EVCertificateReq&, + * ocpp::messages::ocpp20::Get15118EVCertificateConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, + bool call(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, std::string& error, std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetCompositeSchedule20Req&, - * ocpp::messages::ocpp20::GetCompositeSchedule20Conf&, + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetBaseReportReq&, + * ocpp::messages::ocpp20::GetBaseReportConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetDisplayMessages20Req&, - * ocpp::messages::ocpp20::GetDisplayMessages20Conf&, + bool call(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetCertificateStatusReq&, + * ocpp::messages::ocpp20::GetCertificateStatusConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, + bool call(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, std::string& error, std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req&, - * ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf&, + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetChargingProfilesReq&, + * ocpp::messages::ocpp20::GetChargingProfilesConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetLocalListVersion20Req&, - * ocpp::messages::ocpp20::GetLocalListVersion20Conf&, + bool call(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetCompositeScheduleReq&, + * ocpp::messages::ocpp20::GetCompositeScheduleConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetLog20Req&, - * ocpp::messages::ocpp20::GetLog20Conf&, + bool call(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetDisplayMessagesReq&, + * ocpp::messages::ocpp20::GetDisplayMessagesConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetMonitoringReport20Req&, - * ocpp::messages::ocpp20::GetMonitoringReport20Conf&, + bool call(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq&, + * ocpp::messages::ocpp20::GetInstalledCertificateIdsConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetReport20Req&, - * ocpp::messages::ocpp20::GetReport20Conf&, + bool call(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetLocalListVersionReq&, + * ocpp::messages::ocpp20::GetLocalListVersionConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetTransactionStatus20Req&, - * ocpp::messages::ocpp20::GetTransactionStatus20Conf&, + bool call(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetLogReq&, + * ocpp::messages::ocpp20::GetLogConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetVariables20Req&, - * ocpp::messages::ocpp20::GetVariables20Conf&, + bool call(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetMonitoringReportReq&, + * ocpp::messages::ocpp20::GetMonitoringReportConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::InstallCertificate20Req&, - * ocpp::messages::ocpp20::InstallCertificate20Conf&, + bool call(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetReportReq&, + * ocpp::messages::ocpp20::GetReportConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, + bool call(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetTransactionStatusReq&, + * ocpp::messages::ocpp20::GetTransactionStatusConf&, + * std::string&, + * std::string&) */ + bool call(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, std::string& error, std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::PublishFirmware20Req&, - * ocpp::messages::ocpp20::PublishFirmware20Conf&, + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::GetVariablesReq&, + * ocpp::messages::ocpp20::GetVariablesConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStartTransaction20Req&, - * ocpp::messages::ocpp20::RequestStartTransaction20Conf&, + bool call(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::InstallCertificateReq&, + * ocpp::messages::ocpp20::InstallCertificateConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStopTransaction20Req&, - * ocpp::messages::ocpp20::RequestStopTransaction20Conf&, + bool call(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::PublishFirmwareReq&, + * ocpp::messages::ocpp20::PublishFirmwareConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ReserveNow20Req&, - * ocpp::messages::ocpp20::ReserveNow20Conf&, + bool call(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStartTransactionReq&, + * ocpp::messages::ocpp20::RequestStartTransactionConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::Reset20Req&, - * ocpp::messages::ocpp20::Reset20Conf&, + bool call(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::RequestStopTransactionReq&, + * ocpp::messages::ocpp20::RequestStopTransactionConf&, + * std::string&, + * std::string&) */ + bool call(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ReserveNowReq&, + * ocpp::messages::ocpp20::ReserveNowConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SendLocalList20Req&, - * ocpp::messages::ocpp20::SendLocalList20Conf&, + bool call(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::ResetReq&, + * ocpp::messages::ocpp20::ResetConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetChargingProfile20Req&, - * ocpp::messages::ocpp20::SetChargingProfile20Conf&, + bool call(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SendLocalListReq&, + * ocpp::messages::ocpp20::SendLocalListConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetDisplayMessage20Req&, - * ocpp::messages::ocpp20::SetDisplayMessage20Conf&, + bool call(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetChargingProfileReq&, + * ocpp::messages::ocpp20::SetChargingProfileConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringBase20Req&, - * ocpp::messages::ocpp20::SetMonitoringBase20Conf&, + bool call(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetDisplayMessageReq&, + * ocpp::messages::ocpp20::SetDisplayMessageConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringLevel20Req&, - * ocpp::messages::ocpp20::SetMonitoringLevel20Conf&, + bool call(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringBaseReq&, + * ocpp::messages::ocpp20::SetMonitoringBaseConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetNetworkProfile20Req&, - * ocpp::messages::ocpp20::SetNetworkProfile20Conf&, + bool call(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetMonitoringLevelReq&, + * ocpp::messages::ocpp20::SetMonitoringLevelConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariableMonitoring20Req&, - * ocpp::messages::ocpp20::SetVariableMonitoring20Conf&, + bool call(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetNetworkProfileReq&, + * ocpp::messages::ocpp20::SetNetworkProfileConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariables20Req&, - * ocpp::messages::ocpp20::SetVariables20Conf&, + bool call(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariableMonitoringReq&, + * ocpp::messages::ocpp20::SetVariableMonitoringConf&, + * std::string&, + * std::string&) */ + bool call(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::SetVariablesReq&, + * ocpp::messages::ocpp20::SetVariablesConf&, + * std::string&, + * std::string&) */ + bool call(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::TriggerMessageReq&, + * ocpp::messages::ocpp20::TriggerMessageConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, + bool call(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, std::string& error, std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::TriggerMessage20Req&, - * ocpp::messages::ocpp20::TriggerMessage20Conf&, + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::UnlockConnectorReq&, + * ocpp::messages::ocpp20::UnlockConnectorConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::UnlockConnector20Req&, - * ocpp::messages::ocpp20::UnlockConnector20Conf&, + bool call(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error, + std::string& message) override; + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::UnpublishFirmwareReq&, + * ocpp::messages::ocpp20::UnpublishFirmwareConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, + bool call(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, std::string& error, std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::UnpublishFirmware20Req&, - * ocpp::messages::ocpp20::UnpublishFirmware20Conf&, + /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::UpdateFirmwareReq&, + * ocpp::messages::ocpp20::UpdateFirmwareConf&, * std::string&, * std::string&) */ - bool call(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::call(const ocpp::messages::ocpp20::UpdateFirmware20Req&, - * ocpp::messages::ocpp20::UpdateFirmware20Conf&, - * std::string&, - * std::string&) */ - bool call(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error, - std::string& message) override; - /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function handler) override; + bool call(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error, + std::string& message) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( std::function handler) - override; - /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function handler) override; - /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::CostUpdated20Req&, ocpp::messages::ocpp20::CostUpdated20Conf&, std::string&, std::string&)> + const ocpp::messages::ocpp20::BootNotificationReq&, ocpp::messages::ocpp20::BootNotificationConf&, std::string&, std::string&)> handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::DataTransfer20Req&, ocpp::messages::ocpp20::DataTransfer20Conf&, std::string&, std::string&)> + std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( std::function handler) + const ocpp::messages::ocpp20::CostUpdatedReq&, ocpp::messages::ocpp20::CostUpdatedConf&, std::string&, std::string&)> handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler( + std::function handler) + override; + /** @copydoc bool IChargePointProxy20::registerHandler( + std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::MeterValues20Req&, ocpp::messages::ocpp20::MeterValues20Conf&, std::string&, std::string&)> + std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler( + std::function handler) + override; + /** @copydoc bool IChargePointProxy20::registerHandler( + std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::NotifyEvent20Req&, ocpp::messages::ocpp20::NotifyEvent20Conf&, std::string&, std::string&)> - handler) override; - /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ + std::function) */ bool registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::NotifyReport20Req&, ocpp::messages::ocpp20::NotifyReport20Conf&, std::string&, std::string&)> - handler) override; + std::function handler) + override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function handler) override; + std::function) */ + bool registerHandler( + std::function handler) + override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler(std::function handler) override; /** @copydoc bool IChargePointProxy20::registerHandler( - std::function) */ - bool registerHandler(std::function) */ + bool registerHandler( + std::function + handler) override; + /** @copydoc bool IChargePointProxy20::registerHandler( + std::function) */ + bool registerHandler(std::function handler) override; + /** @copydoc bool IChargePointProxy20::registerHandler( + std::function) */ + bool registerHandler( + std::function + handler) override; // IRpc::IListener interface diff --git a/src/ocpp20/localcontroller/interface/ICentralSystemProxy20.h b/src/ocpp20/localcontroller/interface/ICentralSystemProxy20.h index d0f7e1e6..55dd5999 100644 --- a/src/ocpp20/localcontroller/interface/ICentralSystemProxy20.h +++ b/src/ocpp20/localcontroller/interface/ICentralSystemProxy20.h @@ -149,659 +149,658 @@ class ICentralSystemProxy20 // OCPP operations /** - * @brief Send a BootNotification20 message to the central system + * @brief Send a BootNotification message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::BootNotification20Req& request, - ocpp::messages::ocpp20::BootNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::BootNotificationReq& request, + ocpp::messages::ocpp20::BootNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a Authorize20 message to the central system + * @brief Send a Authorize message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::Authorize20Req& request, - ocpp::messages::ocpp20::Authorize20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::AuthorizeReq& request, + ocpp::messages::ocpp20::AuthorizeConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ClearedChargingLimit20 message to the central system + * @brief Send a ClearedChargingLimit message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ClearedChargingLimit20Req& request, - ocpp::messages::ocpp20::ClearedChargingLimit20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ClearedChargingLimitReq& request, + ocpp::messages::ocpp20::ClearedChargingLimitConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a CostUpdated20 message to the central system + * @brief Send a CostUpdated message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::CostUpdated20Req& request, - ocpp::messages::ocpp20::CostUpdated20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::CostUpdatedReq& request, + ocpp::messages::ocpp20::CostUpdatedConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a DataTransfer20 message to the central system + * @brief Send a DataTransfer message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a FirmwareStatusNotification20 message to the central system + * @brief Send a FirmwareStatusNotification message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::FirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::FirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::FirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::FirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a Heartbeat20 message to the central system + * @brief Send a Heartbeat message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::Heartbeat20Req& request, - ocpp::messages::ocpp20::Heartbeat20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::HeartbeatReq& request, + ocpp::messages::ocpp20::HeartbeatConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a LogStatusNotification20 message to the central system + * @brief Send a LogStatusNotification message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::LogStatusNotification20Req& request, - ocpp::messages::ocpp20::LogStatusNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::LogStatusNotificationReq& request, + ocpp::messages::ocpp20::LogStatusNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a MeterValues20 message to the central system + * @brief Send a MeterValues message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::MeterValues20Req& request, - ocpp::messages::ocpp20::MeterValues20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::MeterValuesReq& request, + ocpp::messages::ocpp20::MeterValuesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyChargingLimit20 message to the central system + * @brief Send a NotifyChargingLimit message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyChargingLimit20Req& request, - ocpp::messages::ocpp20::NotifyChargingLimit20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyChargingLimitReq& request, + ocpp::messages::ocpp20::NotifyChargingLimitConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyCustomerInformation20 message to the central system + * @brief Send a NotifyCustomerInformation message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyCustomerInformation20Req& request, - ocpp::messages::ocpp20::NotifyCustomerInformation20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyCustomerInformationReq& request, + ocpp::messages::ocpp20::NotifyCustomerInformationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyDisplayMessages20 message to the central system + * @brief Send a NotifyDisplayMessages message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyDisplayMessages20Req& request, - ocpp::messages::ocpp20::NotifyDisplayMessages20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyDisplayMessagesReq& request, + ocpp::messages::ocpp20::NotifyDisplayMessagesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyEVChargingNeeds20 message to the central system + * @brief Send a NotifyEVChargingNeeds message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyEVChargingNeeds20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingNeeds20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyEVChargingNeedsReq& request, + ocpp::messages::ocpp20::NotifyEVChargingNeedsConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyEVChargingSchedule20 message to the central system + * @brief Send a NotifyEVChargingSchedule message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyEVChargingSchedule20Req& request, - ocpp::messages::ocpp20::NotifyEVChargingSchedule20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyEVChargingScheduleReq& request, + ocpp::messages::ocpp20::NotifyEVChargingScheduleConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyEvent20 message to the central system + * @brief Send a NotifyEvent message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyEvent20Req& request, - ocpp::messages::ocpp20::NotifyEvent20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyEventReq& request, + ocpp::messages::ocpp20::NotifyEventConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyMonitoringReport20 message to the central system + * @brief Send a NotifyMonitoringReport message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyMonitoringReport20Req& request, - ocpp::messages::ocpp20::NotifyMonitoringReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyMonitoringReportReq& request, + ocpp::messages::ocpp20::NotifyMonitoringReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a NotifyReport20 message to the central system + * @brief Send a NotifyReport message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::NotifyReport20Req& request, - ocpp::messages::ocpp20::NotifyReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::NotifyReportReq& request, + ocpp::messages::ocpp20::NotifyReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a PublishFirmwareStatusNotification20 message to the central system + * @brief Send a PublishFirmwareStatusNotification message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Req& request, - ocpp::messages::ocpp20::PublishFirmwareStatusNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::PublishFirmwareStatusNotificationReq& request, + ocpp::messages::ocpp20::PublishFirmwareStatusNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ReportChargingProfiles20 message to the central system + * @brief Send a ReportChargingProfiles message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ReportChargingProfiles20Req& request, - ocpp::messages::ocpp20::ReportChargingProfiles20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ReportChargingProfilesReq& request, + ocpp::messages::ocpp20::ReportChargingProfilesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ReservationStatusUpdate20 message to the central system + * @brief Send a ReservationStatusUpdate message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ReservationStatusUpdate20Req& request, - ocpp::messages::ocpp20::ReservationStatusUpdate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ReservationStatusUpdateReq& request, + ocpp::messages::ocpp20::ReservationStatusUpdateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SecurityEventNotification20 message to the central system + * @brief Send a SecurityEventNotification message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SecurityEventNotification20Req& request, - ocpp::messages::ocpp20::SecurityEventNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SecurityEventNotificationReq& request, + ocpp::messages::ocpp20::SecurityEventNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SignCertificate20 message to the central system + * @brief Send a SignCertificate message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SignCertificate20Req& request, - ocpp::messages::ocpp20::SignCertificate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SignCertificateReq& request, + ocpp::messages::ocpp20::SignCertificateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a StatusNotification20 message to the central system + * @brief Send a StatusNotification message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::StatusNotification20Req& request, - ocpp::messages::ocpp20::StatusNotification20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::StatusNotificationReq& request, + ocpp::messages::ocpp20::StatusNotificationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a TransactionEvent20 message to the central system + * @brief Send a TransactionEvent message to the central system * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::TransactionEvent20Req& request, - ocpp::messages::ocpp20::TransactionEvent20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::TransactionEventReq& request, + ocpp::messages::ocpp20::TransactionEventConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Register a handler for the CancelReservation20 request from the central system + * @brief Register a handler for the CancelReservation request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the CertificateSigned20 request from the central system + * @brief Register a handler for the CertificateSigned request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the ChangeAvailability20 request from the central system + * @brief Register a handler for the ChangeAvailability request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the ClearCache20 request from the central system + * @brief Register a handler for the ClearCache request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( std::function< - bool(const ocpp::messages::ocpp20::ClearCache20Req&, ocpp::messages::ocpp20::ClearCache20Conf&, std::string&, std::string&)> + bool(const ocpp::messages::ocpp20::ClearCacheReq&, ocpp::messages::ocpp20::ClearCacheConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the ClearChargingProfile20 request from the central system + * @brief Register a handler for the ClearChargingProfile request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the ClearDisplayMessage20 request from the central system + * @brief Register a handler for the ClearDisplayMessage request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the ClearVariableMonitoring20 request from the central system + * @brief Register a handler for the ClearVariableMonitoring request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the CustomerInformation20 request from the central system + * @brief Register a handler for the CustomerInformation request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the DataTransfer20 request from the central system + * @brief Register a handler for the DataTransfer request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( std::function< - bool(const ocpp::messages::ocpp20::DataTransfer20Req&, ocpp::messages::ocpp20::DataTransfer20Conf&, std::string&, std::string&)> + bool(const ocpp::messages::ocpp20::DataTransferReq&, ocpp::messages::ocpp20::DataTransferConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the DeleteCertificate20 request from the central system + * @brief Register a handler for the DeleteCertificate request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the Get15118EVCertificate20 request from the central system + * @brief Register a handler for the Get15118EVCertificate request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the GetBaseReport20 request from the central system + * @brief Register a handler for the GetBaseReport request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( - std::function + std::function< + bool(const ocpp::messages::ocpp20::GetBaseReportReq&, ocpp::messages::ocpp20::GetBaseReportConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the GetCertificateStatus20 request from the central system + * @brief Register a handler for the GetCertificateStatus request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the GetChargingProfiles20 request from the central system + * @brief Register a handler for the GetChargingProfiles request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the GetCompositeSchedule20 request from the central system + * @brief Register a handler for the GetCompositeSchedule request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the GetDisplayMessages20 request from the central system + * @brief Register a handler for the GetDisplayMessages request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the GetInstalledCertificateIds20 request from the central system + * @brief Register a handler for the GetInstalledCertificateIds request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the GetLocalListVersion20 request from the central system + * @brief Register a handler for the GetLocalListVersion request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the GetLog20 request from the central system + * @brief Register a handler for the GetLog request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( - std::function + std::function handler) = 0; /** - * @brief Register a handler for the GetMonitoringReport20 request from the central system + * @brief Register a handler for the GetMonitoringReport request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the GetReport20 request from the central system + * @brief Register a handler for the GetReport request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::GetReport20Req&, ocpp::messages::ocpp20::GetReport20Conf&, std::string&, std::string&)> + std::function handler) = 0; /** - * @brief Register a handler for the GetTransactionStatus20 request from the central system + * @brief Register a handler for the GetTransactionStatus request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the GetVariables20 request from the central system + * @brief Register a handler for the GetVariables request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( std::function< - bool(const ocpp::messages::ocpp20::GetVariables20Req&, ocpp::messages::ocpp20::GetVariables20Conf&, std::string&, std::string&)> + bool(const ocpp::messages::ocpp20::GetVariablesReq&, ocpp::messages::ocpp20::GetVariablesConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the InstallCertificate20 request from the central system + * @brief Register a handler for the InstallCertificate request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the PublishFirmware20 request from the central system + * @brief Register a handler for the PublishFirmware request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; + virtual bool registerHandler( + std::function + handler) = 0; /** - * @brief Register a handler for the RequestStartTransaction20 request from the central system + * @brief Register a handler for the RequestStartTransaction request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the RequestStopTransaction20 request from the central system + * @brief Register a handler for the RequestStopTransaction request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the ReserveNow20 request from the central system + * @brief Register a handler for the ReserveNow request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( std::function< - bool(const ocpp::messages::ocpp20::ReserveNow20Req&, ocpp::messages::ocpp20::ReserveNow20Conf&, std::string&, std::string&)> + bool(const ocpp::messages::ocpp20::ReserveNowReq&, ocpp::messages::ocpp20::ReserveNowConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the Reset20 request from the central system + * @brief Register a handler for the Reset request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( - std::function + std::function handler) = 0; /** - * @brief Register a handler for the SendLocalList20 request from the central system + * @brief Register a handler for the SendLocalList request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( - std::function + std::function< + bool(const ocpp::messages::ocpp20::SendLocalListReq&, ocpp::messages::ocpp20::SendLocalListConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the SetChargingProfile20 request from the central system + * @brief Register a handler for the SetChargingProfile request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the SetDisplayMessage20 request from the central system + * @brief Register a handler for the SetDisplayMessage request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the SetMonitoringBase20 request from the central system + * @brief Register a handler for the SetMonitoringBase request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the SetMonitoringLevel20 request from the central system + * @brief Register a handler for the SetMonitoringLevel request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the SetNetworkProfile20 request from the central system + * @brief Register a handler for the SetNetworkProfile request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the SetVariableMonitoring20 request from the central system + * @brief Register a handler for the SetVariableMonitoring request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the SetVariables20 request from the central system + * @brief Register a handler for the SetVariables request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( std::function< - bool(const ocpp::messages::ocpp20::SetVariables20Req&, ocpp::messages::ocpp20::SetVariables20Conf&, std::string&, std::string&)> + bool(const ocpp::messages::ocpp20::SetVariablesReq&, ocpp::messages::ocpp20::SetVariablesConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the TriggerMessage20 request from the central system + * @brief Register a handler for the TriggerMessage request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( - std::function + std::function< + bool(const ocpp::messages::ocpp20::TriggerMessageReq&, ocpp::messages::ocpp20::TriggerMessageConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the UnlockConnector20 request from the central system + * @brief Register a handler for the UnlockConnector request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; + virtual bool registerHandler( + std::function + handler) = 0; /** - * @brief Register a handler for the UnpublishFirmware20 request from the central system + * @brief Register a handler for the UnpublishFirmware request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the UpdateFirmware20 request from the central system + * @brief Register a handler for the UpdateFirmware request from the central system * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( - std::function + std::function< + bool(const ocpp::messages::ocpp20::UpdateFirmwareReq&, ocpp::messages::ocpp20::UpdateFirmwareConf&, std::string&, std::string&)> handler) = 0; }; diff --git a/src/ocpp20/localcontroller/interface/IChargePointProxy20.h b/src/ocpp20/localcontroller/interface/IChargePointProxy20.h index 5a53d5c0..73a28d5c 100644 --- a/src/ocpp20/localcontroller/interface/IChargePointProxy20.h +++ b/src/ocpp20/localcontroller/interface/IChargePointProxy20.h @@ -130,713 +130,711 @@ class IChargePointProxy20 // OCPP operations /** - * @brief Send a CancelReservation20 message to the charge point + * @brief Send a CancelReservation message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::CancelReservation20Req& request, - ocpp::messages::ocpp20::CancelReservation20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::CancelReservationReq& request, + ocpp::messages::ocpp20::CancelReservationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a CertificateSigned20 message to the charge point + * @brief Send a CertificateSigned message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::CertificateSigned20Req& request, - ocpp::messages::ocpp20::CertificateSigned20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::CertificateSignedReq& request, + ocpp::messages::ocpp20::CertificateSignedConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ChangeAvailability20 message to the charge point + * @brief Send a ChangeAvailability message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ChangeAvailability20Req& request, - ocpp::messages::ocpp20::ChangeAvailability20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ChangeAvailabilityReq& request, + ocpp::messages::ocpp20::ChangeAvailabilityConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ClearCache20 message to the charge point + * @brief Send a ClearCache message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ClearCache20Req& request, - ocpp::messages::ocpp20::ClearCache20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ClearCacheReq& request, + ocpp::messages::ocpp20::ClearCacheConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ClearChargingProfile20 message to the charge point + * @brief Send a ClearChargingProfile message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ClearChargingProfile20Req& request, - ocpp::messages::ocpp20::ClearChargingProfile20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ClearChargingProfileReq& request, + ocpp::messages::ocpp20::ClearChargingProfileConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ClearDisplayMessage20 message to the charge point + * @brief Send a ClearDisplayMessage message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ClearDisplayMessage20Req& request, - ocpp::messages::ocpp20::ClearDisplayMessage20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ClearDisplayMessageReq& request, + ocpp::messages::ocpp20::ClearDisplayMessageConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ClearVariableMonitoring20 message to the charge point + * @brief Send a ClearVariableMonitoring message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ClearVariableMonitoring20Req& request, - ocpp::messages::ocpp20::ClearVariableMonitoring20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ClearVariableMonitoringReq& request, + ocpp::messages::ocpp20::ClearVariableMonitoringConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a CustomerInformation20 message to the charge point + * @brief Send a CustomerInformation message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::CustomerInformation20Req& request, - ocpp::messages::ocpp20::CustomerInformation20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::CustomerInformationReq& request, + ocpp::messages::ocpp20::CustomerInformationConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a DataTransfer20 message to the charge point + * @brief Send a DataTransfer message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::DataTransfer20Req& request, - ocpp::messages::ocpp20::DataTransfer20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::DataTransferReq& request, + ocpp::messages::ocpp20::DataTransferConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a DeleteCertificate20 message to the charge point + * @brief Send a DeleteCertificate message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::DeleteCertificate20Req& request, - ocpp::messages::ocpp20::DeleteCertificate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::DeleteCertificateReq& request, + ocpp::messages::ocpp20::DeleteCertificateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a Get15118EVCertificate20 message to the charge point + * @brief Send a Get15118EVCertificate message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::Get15118EVCertificate20Req& request, - ocpp::messages::ocpp20::Get15118EVCertificate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::Get15118EVCertificateReq& request, + ocpp::messages::ocpp20::Get15118EVCertificateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetBaseReport20 message to the charge point + * @brief Send a GetBaseReport message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetBaseReport20Req& request, - ocpp::messages::ocpp20::GetBaseReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetBaseReportReq& request, + ocpp::messages::ocpp20::GetBaseReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetCertificateStatus20 message to the charge point + * @brief Send a GetCertificateStatus message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetCertificateStatus20Req& request, - ocpp::messages::ocpp20::GetCertificateStatus20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetCertificateStatusReq& request, + ocpp::messages::ocpp20::GetCertificateStatusConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetChargingProfiles20 message to the charge point + * @brief Send a GetChargingProfiles message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetChargingProfiles20Req& request, - ocpp::messages::ocpp20::GetChargingProfiles20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetChargingProfilesReq& request, + ocpp::messages::ocpp20::GetChargingProfilesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetCompositeSchedule20 message to the charge point + * @brief Send a GetCompositeSchedule message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetCompositeSchedule20Req& request, - ocpp::messages::ocpp20::GetCompositeSchedule20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetCompositeScheduleReq& request, + ocpp::messages::ocpp20::GetCompositeScheduleConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetDisplayMessages20 message to the charge point + * @brief Send a GetDisplayMessages message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetDisplayMessages20Req& request, - ocpp::messages::ocpp20::GetDisplayMessages20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetDisplayMessagesReq& request, + ocpp::messages::ocpp20::GetDisplayMessagesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetInstalledCertificateIds20 message to the charge point + * @brief Send a GetInstalledCertificateIds message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetInstalledCertificateIds20Req& request, - ocpp::messages::ocpp20::GetInstalledCertificateIds20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetInstalledCertificateIdsReq& request, + ocpp::messages::ocpp20::GetInstalledCertificateIdsConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetLocalListVersion20 message to the charge point + * @brief Send a GetLocalListVersion message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetLocalListVersion20Req& request, - ocpp::messages::ocpp20::GetLocalListVersion20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetLocalListVersionReq& request, + ocpp::messages::ocpp20::GetLocalListVersionConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetLog20 message to the charge point + * @brief Send a GetLog message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetLog20Req& request, - ocpp::messages::ocpp20::GetLog20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetLogReq& request, + ocpp::messages::ocpp20::GetLogConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetMonitoringReport20 message to the charge point + * @brief Send a GetMonitoringReport message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetMonitoringReport20Req& request, - ocpp::messages::ocpp20::GetMonitoringReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetMonitoringReportReq& request, + ocpp::messages::ocpp20::GetMonitoringReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetReport20 message to the charge point + * @brief Send a GetReport message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetReport20Req& request, - ocpp::messages::ocpp20::GetReport20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetReportReq& request, + ocpp::messages::ocpp20::GetReportConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetTransactionStatus20 message to the charge point + * @brief Send a GetTransactionStatus message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetTransactionStatus20Req& request, - ocpp::messages::ocpp20::GetTransactionStatus20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetTransactionStatusReq& request, + ocpp::messages::ocpp20::GetTransactionStatusConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a GetVariables20 message to the charge point + * @brief Send a GetVariables message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::GetVariables20Req& request, - ocpp::messages::ocpp20::GetVariables20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::GetVariablesReq& request, + ocpp::messages::ocpp20::GetVariablesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a InstallCertificate20 message to the charge point + * @brief Send a InstallCertificate message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::InstallCertificate20Req& request, - ocpp::messages::ocpp20::InstallCertificate20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::InstallCertificateReq& request, + ocpp::messages::ocpp20::InstallCertificateConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a PublishFirmware20 message to the charge point + * @brief Send a PublishFirmware message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::PublishFirmware20Req& request, - ocpp::messages::ocpp20::PublishFirmware20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::PublishFirmwareReq& request, + ocpp::messages::ocpp20::PublishFirmwareConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a RequestStartTransaction20 message to the charge point + * @brief Send a RequestStartTransaction message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::RequestStartTransaction20Req& request, - ocpp::messages::ocpp20::RequestStartTransaction20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::RequestStartTransactionReq& request, + ocpp::messages::ocpp20::RequestStartTransactionConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a RequestStopTransaction20 message to the charge point + * @brief Send a RequestStopTransaction message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::RequestStopTransaction20Req& request, - ocpp::messages::ocpp20::RequestStopTransaction20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::RequestStopTransactionReq& request, + ocpp::messages::ocpp20::RequestStopTransactionConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a ReserveNow20 message to the charge point + * @brief Send a ReserveNow message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::ReserveNow20Req& request, - ocpp::messages::ocpp20::ReserveNow20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ReserveNowReq& request, + ocpp::messages::ocpp20::ReserveNowConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a Reset20 message to the charge point + * @brief Send a Reset message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::Reset20Req& request, - ocpp::messages::ocpp20::Reset20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::ResetReq& request, + ocpp::messages::ocpp20::ResetConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SendLocalList20 message to the charge point + * @brief Send a SendLocalList message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SendLocalList20Req& request, - ocpp::messages::ocpp20::SendLocalList20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SendLocalListReq& request, + ocpp::messages::ocpp20::SendLocalListConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetChargingProfile20 message to the charge point + * @brief Send a SetChargingProfile message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetChargingProfile20Req& request, - ocpp::messages::ocpp20::SetChargingProfile20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetChargingProfileReq& request, + ocpp::messages::ocpp20::SetChargingProfileConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetDisplayMessage20 message to the charge point + * @brief Send a SetDisplayMessage message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetDisplayMessage20Req& request, - ocpp::messages::ocpp20::SetDisplayMessage20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetDisplayMessageReq& request, + ocpp::messages::ocpp20::SetDisplayMessageConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetMonitoringBase20 message to the charge point + * @brief Send a SetMonitoringBase message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetMonitoringBase20Req& request, - ocpp::messages::ocpp20::SetMonitoringBase20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetMonitoringBaseReq& request, + ocpp::messages::ocpp20::SetMonitoringBaseConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetMonitoringLevel20 message to the charge point + * @brief Send a SetMonitoringLevel message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetMonitoringLevel20Req& request, - ocpp::messages::ocpp20::SetMonitoringLevel20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetMonitoringLevelReq& request, + ocpp::messages::ocpp20::SetMonitoringLevelConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetNetworkProfile20 message to the charge point + * @brief Send a SetNetworkProfile message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetNetworkProfile20Req& request, - ocpp::messages::ocpp20::SetNetworkProfile20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetNetworkProfileReq& request, + ocpp::messages::ocpp20::SetNetworkProfileConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetVariableMonitoring20 message to the charge point + * @brief Send a SetVariableMonitoring message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetVariableMonitoring20Req& request, - ocpp::messages::ocpp20::SetVariableMonitoring20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetVariableMonitoringReq& request, + ocpp::messages::ocpp20::SetVariableMonitoringConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a SetVariables20 message to the charge point + * @brief Send a SetVariables message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::SetVariables20Req& request, - ocpp::messages::ocpp20::SetVariables20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::SetVariablesReq& request, + ocpp::messages::ocpp20::SetVariablesConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a TriggerMessage20 message to the charge point + * @brief Send a TriggerMessage message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::TriggerMessage20Req& request, - ocpp::messages::ocpp20::TriggerMessage20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::TriggerMessageReq& request, + ocpp::messages::ocpp20::TriggerMessageConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a UnlockConnector20 message to the charge point + * @brief Send a UnlockConnector message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::UnlockConnector20Req& request, - ocpp::messages::ocpp20::UnlockConnector20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::UnlockConnectorReq& request, + ocpp::messages::ocpp20::UnlockConnectorConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a UnpublishFirmware20 message to the charge point + * @brief Send a UnpublishFirmware message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::UnpublishFirmware20Req& request, - ocpp::messages::ocpp20::UnpublishFirmware20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::UnpublishFirmwareReq& request, + ocpp::messages::ocpp20::UnpublishFirmwareConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Send a UpdateFirmware20 message to the charge point + * @brief Send a UpdateFirmware message to the charge point * @param request Request to send * @param response Received response * @param error Error (Empty if not a CallError) * @param message Error message (Empty if not a CallError) * @return true if the request has been sent and a response has been received, false otherwise */ - virtual bool call(const ocpp::messages::ocpp20::UpdateFirmware20Req& request, - ocpp::messages::ocpp20::UpdateFirmware20Conf& response, - std::string& error, - std::string& message) = 0; + virtual bool call(const ocpp::messages::ocpp20::UpdateFirmwareReq& request, + ocpp::messages::ocpp20::UpdateFirmwareConf& response, + std::string& error, + std::string& message) = 0; /** - * @brief Register a handler for the BootNotification20 request from the charge point + * @brief Register a handler for the BootNotification request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; + virtual bool registerHandler( + std::function + handler) = 0; /** - * @brief Register a handler for the Authorize20 request from the charge point + * @brief Register a handler for the Authorize request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::Authorize20Req&, ocpp::messages::ocpp20::Authorize20Conf&, std::string&, std::string&)> + std::function handler) = 0; /** - * @brief Register a handler for the ClearedChargingLimit20 request from the charge point + * @brief Register a handler for the ClearedChargingLimit request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the CostUpdated20 request from the charge point + * @brief Register a handler for the CostUpdated request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( std::function< - bool(const ocpp::messages::ocpp20::CostUpdated20Req&, ocpp::messages::ocpp20::CostUpdated20Conf&, std::string&, std::string&)> + bool(const ocpp::messages::ocpp20::CostUpdatedReq&, ocpp::messages::ocpp20::CostUpdatedConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the DataTransfer20 request from the charge point + * @brief Register a handler for the DataTransfer request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( std::function< - bool(const ocpp::messages::ocpp20::DataTransfer20Req&, ocpp::messages::ocpp20::DataTransfer20Conf&, std::string&, std::string&)> + bool(const ocpp::messages::ocpp20::DataTransferReq&, ocpp::messages::ocpp20::DataTransferConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the FirmwareStatusNotification20 request from the charge point + * @brief Register a handler for the FirmwareStatusNotification request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the Heartbeat20 request from the charge point + * @brief Register a handler for the Heartbeat request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( - std::function< - bool(const ocpp::messages::ocpp20::Heartbeat20Req&, ocpp::messages::ocpp20::Heartbeat20Conf&, std::string&, std::string&)> + std::function handler) = 0; /** - * @brief Register a handler for the LogStatusNotification20 request from the charge point + * @brief Register a handler for the LogStatusNotification request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the MeterValues20 request from the charge point + * @brief Register a handler for the MeterValues request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( std::function< - bool(const ocpp::messages::ocpp20::MeterValues20Req&, ocpp::messages::ocpp20::MeterValues20Conf&, std::string&, std::string&)> + bool(const ocpp::messages::ocpp20::MeterValuesReq&, ocpp::messages::ocpp20::MeterValuesConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the NotifyChargingLimit20 request from the charge point + * @brief Register a handler for the NotifyChargingLimit request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the NotifyCustomerInformation20 request from the charge point + * @brief Register a handler for the NotifyCustomerInformation request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the NotifyDisplayMessages20 request from the charge point + * @brief Register a handler for the NotifyDisplayMessages request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the NotifyEVChargingNeeds20 request from the charge point + * @brief Register a handler for the NotifyEVChargingNeeds request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the NotifyEVChargingSchedule20 request from the charge point + * @brief Register a handler for the NotifyEVChargingSchedule request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the NotifyEvent20 request from the charge point + * @brief Register a handler for the NotifyEvent request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( std::function< - bool(const ocpp::messages::ocpp20::NotifyEvent20Req&, ocpp::messages::ocpp20::NotifyEvent20Conf&, std::string&, std::string&)> + bool(const ocpp::messages::ocpp20::NotifyEventReq&, ocpp::messages::ocpp20::NotifyEventConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the NotifyMonitoringReport20 request from the charge point + * @brief Register a handler for the NotifyMonitoringReport request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the NotifyReport20 request from the charge point + * @brief Register a handler for the NotifyReport request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ virtual bool registerHandler( std::function< - bool(const ocpp::messages::ocpp20::NotifyReport20Req&, ocpp::messages::ocpp20::NotifyReport20Conf&, std::string&, std::string&)> + bool(const ocpp::messages::ocpp20::NotifyReportReq&, ocpp::messages::ocpp20::NotifyReportConf&, std::string&, std::string&)> handler) = 0; /** - * @brief Register a handler for the PublishFirmwareStatusNotification20 request from the charge point + * @brief Register a handler for the PublishFirmwareStatusNotification request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the ReportChargingProfiles20 request from the charge point + * @brief Register a handler for the ReportChargingProfiles request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the ReservationStatusUpdate20 request from the charge point + * @brief Register a handler for the ReservationStatusUpdate request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the SecurityEventNotification20 request from the charge point + * @brief Register a handler for the SecurityEventNotification request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the SignCertificate20 request from the charge point + * @brief Register a handler for the SignCertificate request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; + virtual bool registerHandler( + std::function + handler) = 0; /** - * @brief Register a handler for the StatusNotification20 request from the charge point + * @brief Register a handler for the StatusNotification request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; /** - * @brief Register a handler for the TransactionEvent20 request from the charge point + * @brief Register a handler for the TransactionEvent request from the charge point * @param handler Handler function * @return true if the handler has been registered, false otherwise */ - virtual bool registerHandler(std::function handler) = 0; + virtual bool registerHandler( + std::function + handler) = 0; }; } // namespace ocpp20 diff --git a/src/ocpp20/messages/Authorize20.cpp b/src/ocpp20/messages/Authorize20.cpp index 765477bb..4acaeee8 100644 --- a/src/ocpp20/messages/Authorize20.cpp +++ b/src/ocpp20/messages/Authorize20.cpp @@ -32,23 +32,20 @@ namespace messages namespace ocpp20 { -/** @brief Convert a Authorize20Req from a JSON representation */ -bool Authorize20ReqConverter::fromJson(const rapidjson::Value& json, - Authorize20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a AuthorizeReq from a JSON representation */ +bool AuthorizeReqConverter::fromJson(const rapidjson::Value& json, AuthorizeReq& data, std::string& error_code, std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // idToken - ocpp::types::ocpp20::IdTokenType20Converter idToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter idToken_converter; ret = ret && idToken_converter.fromJson(json["idToken"], data.idToken, error_code, error_message); // certificate @@ -57,11 +54,11 @@ bool Authorize20ReqConverter::fromJson(const rapidjson::Value& json, // iso15118CertificateHashData if (json.HasMember("iso15118CertificateHashData")) { - const rapidjson::Value& iso15118CertificateHashData_json = json["iso15118CertificateHashData"]; - ocpp::types::ocpp20::OCSPRequestDataType20Converter iso15118CertificateHashData_converter; + const rapidjson::Value& iso15118CertificateHashData_json = json["iso15118CertificateHashData"]; + ocpp::types::ocpp20::OCSPRequestDataTypeConverter iso15118CertificateHashData_converter; for (auto it = iso15118CertificateHashData_json.Begin(); ret && (it != iso15118CertificateHashData_json.End()); ++it) { - ocpp::types::ocpp20::OCSPRequestDataType20& item = data.iso15118CertificateHashData.emplace_back(); + ocpp::types::ocpp20::OCSPRequestDataType& item = data.iso15118CertificateHashData.emplace_back(); ret = ret && iso15118CertificateHashData_converter.fromJson(*it, item, error_code, error_message); } } @@ -74,15 +71,15 @@ bool Authorize20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a Authorize20Req to a JSON representation */ -bool Authorize20ReqConverter::toJson(const Authorize20Req& data, rapidjson::Document& json) +/** @brief Convert a AuthorizeReq to a JSON representation */ +bool AuthorizeReqConverter::toJson(const AuthorizeReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -91,7 +88,7 @@ bool Authorize20ReqConverter::toJson(const Authorize20Req& data, rapidjson::Docu } // idToken - ocpp::types::ocpp20::IdTokenType20Converter idToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter idToken_converter; idToken_converter.setAllocator(allocator); rapidjson::Document idToken_doc; idToken_doc.Parse("{}"); @@ -105,10 +102,10 @@ bool Authorize20ReqConverter::toJson(const Authorize20Req& data, rapidjson::Docu if (!data.iso15118CertificateHashData.empty()) { - rapidjson::Value iso15118CertificateHashData_json(rapidjson::kArrayType); - ocpp::types::ocpp20::OCSPRequestDataType20Converter iso15118CertificateHashData_converter; + rapidjson::Value iso15118CertificateHashData_json(rapidjson::kArrayType); + ocpp::types::ocpp20::OCSPRequestDataTypeConverter iso15118CertificateHashData_converter; iso15118CertificateHashData_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::OCSPRequestDataType20& item : data.iso15118CertificateHashData) + for (const ocpp::types::ocpp20::OCSPRequestDataType& item : data.iso15118CertificateHashData) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -121,30 +118,30 @@ bool Authorize20ReqConverter::toJson(const Authorize20Req& data, rapidjson::Docu return ret; } -/** @brief Convert a Authorize20Conf from a JSON representation */ -bool Authorize20ConfConverter::fromJson(const rapidjson::Value& json, - Authorize20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a AuthorizeConf from a JSON representation */ +bool AuthorizeConfConverter::fromJson(const rapidjson::Value& json, + AuthorizeConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // idTokenInfo - ocpp::types::ocpp20::IdTokenInfoType20Converter idTokenInfo_converter; + ocpp::types::ocpp20::IdTokenInfoTypeConverter idTokenInfo_converter; ret = ret && idTokenInfo_converter.fromJson(json["idTokenInfo"], data.idTokenInfo, error_code, error_message); // certificateStatus if (json.HasMember("certificateStatus")) { data.certificateStatus = - ocpp::types::ocpp20::AuthorizeCertificateStatusEnumType20Helper.fromString(json["certificateStatus"].GetString()); + ocpp::types::ocpp20::AuthorizeCertificateStatusEnumTypeHelper.fromString(json["certificateStatus"].GetString()); } if (!ret) @@ -155,15 +152,15 @@ bool Authorize20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a Authorize20Conf to a JSON representation */ -bool Authorize20ConfConverter::toJson(const Authorize20Conf& data, rapidjson::Document& json) +/** @brief Convert a AuthorizeConf to a JSON representation */ +bool AuthorizeConfConverter::toJson(const AuthorizeConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -172,7 +169,7 @@ bool Authorize20ConfConverter::toJson(const Authorize20Conf& data, rapidjson::Do } // idTokenInfo - ocpp::types::ocpp20::IdTokenInfoType20Converter idTokenInfo_converter; + ocpp::types::ocpp20::IdTokenInfoTypeConverter idTokenInfo_converter; idTokenInfo_converter.setAllocator(allocator); rapidjson::Document idTokenInfo_doc; idTokenInfo_doc.Parse("{}"); @@ -182,7 +179,7 @@ bool Authorize20ConfConverter::toJson(const Authorize20Conf& data, rapidjson::Do // certificateStatus if (data.certificateStatus.isSet()) { - fill(json, "certificateStatus", ocpp::types::ocpp20::AuthorizeCertificateStatusEnumType20Helper.toString(data.certificateStatus)); + fill(json, "certificateStatus", ocpp::types::ocpp20::AuthorizeCertificateStatusEnumTypeHelper.toString(data.certificateStatus)); } return ret; diff --git a/src/ocpp20/messages/Authorize20.h b/src/ocpp20/messages/Authorize20.h index 8901be7d..eeae02fb 100644 --- a/src/ocpp20/messages/Authorize20.h +++ b/src/ocpp20/messages/Authorize20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_AUTHORIZE20_H -#define OPENOCPP_AUTHORIZE20_H +#ifndef OPENOCPP_OCPP20_AUTHORIZE_H +#define OPENOCPP_OCPP20_AUTHORIZE_H #include "IMessageConverter.h" @@ -39,38 +39,38 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the Authorize20 messages */ -static const std::string AUTHORIZE20_ACTION = "Authorize"; +/** @brief Action corresponding to the Authorize messages */ +static const std::string AUTHORIZE_ACTION = "Authorize"; -/** @brief Authorize20Req message */ -struct Authorize20Req +/** @brief AuthorizeReq message */ +struct AuthorizeReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::IdTokenType20 idToken; + ocpp::types::ocpp20::IdTokenType idToken; /** @brief The X.509 certificated presented by EV and encoded in PEM format. */ ocpp::types::Optional> certificate; /** @brief */ - std::vector iso15118CertificateHashData; + std::vector iso15118CertificateHashData; }; -/** @brief Authorize20Conf message */ -struct Authorize20Conf +/** @brief AuthorizeConf message */ +struct AuthorizeConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::IdTokenInfoType20 idTokenInfo; + ocpp::types::ocpp20::IdTokenInfoType idTokenInfo; /** @brief */ - ocpp::types::Optional certificateStatus; + ocpp::types::Optional certificateStatus; }; // Message converters -MESSAGE_CONVERTERS(Authorize20) +MESSAGE_CONVERTERS(Authorize) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_AUTHORIZE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_AUTHORIZE_H \ No newline at end of file diff --git a/src/ocpp20/messages/BootNotification20.cpp b/src/ocpp20/messages/BootNotification20.cpp index c19471dd..7c5bf745 100644 --- a/src/ocpp20/messages/BootNotification20.cpp +++ b/src/ocpp20/messages/BootNotification20.cpp @@ -32,27 +32,27 @@ namespace messages namespace ocpp20 { -/** @brief Convert a BootNotification20Req from a JSON representation */ -bool BootNotification20ReqConverter::fromJson(const rapidjson::Value& json, - BootNotification20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a BootNotificationReq from a JSON representation */ +bool BootNotificationReqConverter::fromJson(const rapidjson::Value& json, + BootNotificationReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // chargingStation - ocpp::types::ocpp20::ChargingStationType20Converter chargingStation_converter; + ocpp::types::ocpp20::ChargingStationTypeConverter chargingStation_converter; ret = ret && chargingStation_converter.fromJson(json["chargingStation"], data.chargingStation, error_code, error_message); // reason - data.reason = ocpp::types::ocpp20::BootReasonEnumType20Helper.fromString(json["reason"].GetString()); + data.reason = ocpp::types::ocpp20::BootReasonEnumTypeHelper.fromString(json["reason"].GetString()); if (!ret) { @@ -62,15 +62,15 @@ bool BootNotification20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a BootNotification20Req to a JSON representation */ -bool BootNotification20ReqConverter::toJson(const BootNotification20Req& data, rapidjson::Document& json) +/** @brief Convert a BootNotificationReq to a JSON representation */ +bool BootNotificationReqConverter::toJson(const BootNotificationReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -79,7 +79,7 @@ bool BootNotification20ReqConverter::toJson(const BootNotification20Req& data, r } // chargingStation - ocpp::types::ocpp20::ChargingStationType20Converter chargingStation_converter; + ocpp::types::ocpp20::ChargingStationTypeConverter chargingStation_converter; chargingStation_converter.setAllocator(allocator); rapidjson::Document chargingStation_doc; chargingStation_doc.Parse("{}"); @@ -87,23 +87,23 @@ bool BootNotification20ReqConverter::toJson(const BootNotification20Req& data, r json.AddMember(rapidjson::StringRef("chargingStation"), chargingStation_doc.Move(), *allocator); // reason - fill(json, "reason", ocpp::types::ocpp20::BootReasonEnumType20Helper.toString(data.reason)); + fill(json, "reason", ocpp::types::ocpp20::BootReasonEnumTypeHelper.toString(data.reason)); return ret; } -/** @brief Convert a BootNotification20Conf from a JSON representation */ -bool BootNotification20ConfConverter::fromJson(const rapidjson::Value& json, - BootNotification20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a BootNotificationConf from a JSON representation */ +bool BootNotificationConfConverter::fromJson(const rapidjson::Value& json, + BootNotificationConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -114,12 +114,12 @@ bool BootNotification20ConfConverter::fromJson(const rapidjson::Value& json, extract(json, "interval", data.interval); // status - data.status = ocpp::types::ocpp20::RegistrationStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::RegistrationStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -131,15 +131,15 @@ bool BootNotification20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a BootNotification20Conf to a JSON representation */ -bool BootNotification20ConfConverter::toJson(const BootNotification20Conf& data, rapidjson::Document& json) +/** @brief Convert a BootNotificationConf to a JSON representation */ +bool BootNotificationConfConverter::toJson(const BootNotificationConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -154,12 +154,12 @@ bool BootNotification20ConfConverter::toJson(const BootNotification20Conf& data, fill(json, "interval", data.interval); // status - fill(json, "status", ocpp::types::ocpp20::RegistrationStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::RegistrationStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/BootNotification20.h b/src/ocpp20/messages/BootNotification20.h index ca5377e1..3b3cdbf7 100644 --- a/src/ocpp20/messages/BootNotification20.h +++ b/src/ocpp20/messages/BootNotification20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_BOOTNOTIFICATION20_H -#define OPENOCPP_BOOTNOTIFICATION20_H +#ifndef OPENOCPP_OCPP20_BOOTNOTIFICATION_H +#define OPENOCPP_OCPP20_BOOTNOTIFICATION_H #include "IMessageConverter.h" @@ -39,40 +39,40 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the BootNotification20 messages */ -static const std::string BOOTNOTIFICATION20_ACTION = "BootNotification"; +/** @brief Action corresponding to the BootNotification messages */ +static const std::string BOOTNOTIFICATION_ACTION = "BootNotification"; -/** @brief BootNotification20Req message */ -struct BootNotification20Req +/** @brief BootNotificationReq message */ +struct BootNotificationReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::ChargingStationType20 chargingStation; + ocpp::types::ocpp20::ChargingStationType chargingStation; /** @brief */ - ocpp::types::ocpp20::BootReasonEnumType20 reason; + ocpp::types::ocpp20::BootReasonEnumType reason; }; -/** @brief BootNotification20Conf message */ -struct BootNotification20Conf +/** @brief BootNotificationConf message */ +struct BootNotificationConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief This contains the CSMS’s current time. */ ocpp::types::DateTime currentTime; /** @brief When <<cmn_registrationstatusenumtype,Status>> is Accepted, this contains the heartbeat interval in seconds. If the CSMS returns something other than Accepted, the value of the interval field indicates the minimum wait time before sending a next BootNotification request. */ int interval; /** @brief */ - ocpp::types::ocpp20::RegistrationStatusEnumType20 status; + ocpp::types::ocpp20::RegistrationStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(BootNotification20) +MESSAGE_CONVERTERS(BootNotification) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_BOOTNOTIFICATION20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_BOOTNOTIFICATION_H \ No newline at end of file diff --git a/src/ocpp20/messages/CancelReservation20.cpp b/src/ocpp20/messages/CancelReservation20.cpp index 9c6c514d..2dfa8965 100644 --- a/src/ocpp20/messages/CancelReservation20.cpp +++ b/src/ocpp20/messages/CancelReservation20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a CancelReservation20Req from a JSON representation */ -bool CancelReservation20ReqConverter::fromJson(const rapidjson::Value& json, - CancelReservation20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a CancelReservationReq from a JSON representation */ +bool CancelReservationReqConverter::fromJson(const rapidjson::Value& json, + CancelReservationReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -58,15 +58,15 @@ bool CancelReservation20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a CancelReservation20Req to a JSON representation */ -bool CancelReservation20ReqConverter::toJson(const CancelReservation20Req& data, rapidjson::Document& json) +/** @brief Convert a CancelReservationReq to a JSON representation */ +bool CancelReservationReqConverter::toJson(const CancelReservationReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -80,28 +80,28 @@ bool CancelReservation20ReqConverter::toJson(const CancelReservation20Req& data, return ret; } -/** @brief Convert a CancelReservation20Conf from a JSON representation */ -bool CancelReservation20ConfConverter::fromJson(const rapidjson::Value& json, - CancelReservation20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a CancelReservationConf from a JSON representation */ +bool CancelReservationConfConverter::fromJson(const rapidjson::Value& json, + CancelReservationConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::CancelReservationStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::CancelReservationStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -113,15 +113,15 @@ bool CancelReservation20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a CancelReservation20Conf to a JSON representation */ -bool CancelReservation20ConfConverter::toJson(const CancelReservation20Conf& data, rapidjson::Document& json) +/** @brief Convert a CancelReservationConf to a JSON representation */ +bool CancelReservationConfConverter::toJson(const CancelReservationConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -130,12 +130,12 @@ bool CancelReservation20ConfConverter::toJson(const CancelReservation20Conf& dat } // status - fill(json, "status", ocpp::types::ocpp20::CancelReservationStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::CancelReservationStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/CancelReservation20.h b/src/ocpp20/messages/CancelReservation20.h index b32b4265..ced2b621 100644 --- a/src/ocpp20/messages/CancelReservation20.h +++ b/src/ocpp20/messages/CancelReservation20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CANCELRESERVATION20_H -#define OPENOCPP_CANCELRESERVATION20_H +#ifndef OPENOCPP_OCPP20_CANCELRESERVATION_H +#define OPENOCPP_OCPP20_CANCELRESERVATION_H #include "IMessageConverter.h" @@ -37,34 +37,34 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the CancelReservation20 messages */ -static const std::string CANCELRESERVATION20_ACTION = "CancelReservation"; +/** @brief Action corresponding to the CancelReservation messages */ +static const std::string CANCELRESERVATION_ACTION = "CancelReservation"; -/** @brief CancelReservation20Req message */ -struct CancelReservation20Req +/** @brief CancelReservationReq message */ +struct CancelReservationReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Id of the reservation to cancel. */ int reservationId; }; -/** @brief CancelReservation20Conf message */ -struct CancelReservation20Conf +/** @brief CancelReservationConf message */ +struct CancelReservationConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::CancelReservationStatusEnumType20 status; + ocpp::types::ocpp20::CancelReservationStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(CancelReservation20) +MESSAGE_CONVERTERS(CancelReservation) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_CANCELRESERVATION20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CANCELRESERVATION_H \ No newline at end of file diff --git a/src/ocpp20/messages/CertificateSigned20.cpp b/src/ocpp20/messages/CertificateSigned20.cpp index 0beab8a2..2a21e0b5 100644 --- a/src/ocpp20/messages/CertificateSigned20.cpp +++ b/src/ocpp20/messages/CertificateSigned20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a CertificateSigned20Req from a JSON representation */ -bool CertificateSigned20ReqConverter::fromJson(const rapidjson::Value& json, - CertificateSigned20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a CertificateSignedReq from a JSON representation */ +bool CertificateSignedReqConverter::fromJson(const rapidjson::Value& json, + CertificateSignedReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -53,7 +53,7 @@ bool CertificateSigned20ReqConverter::fromJson(const rapidjson::Value& json, // certificateType if (json.HasMember("certificateType")) { - data.certificateType = ocpp::types::ocpp20::CertificateSigningUseEnumType20Helper.fromString(json["certificateType"].GetString()); + data.certificateType = ocpp::types::ocpp20::CertificateSigningUseEnumTypeHelper.fromString(json["certificateType"].GetString()); } if (!ret) @@ -64,15 +64,15 @@ bool CertificateSigned20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a CertificateSigned20Req to a JSON representation */ -bool CertificateSigned20ReqConverter::toJson(const CertificateSigned20Req& data, rapidjson::Document& json) +/** @brief Convert a CertificateSignedReq to a JSON representation */ +bool CertificateSignedReqConverter::toJson(const CertificateSignedReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -86,34 +86,34 @@ bool CertificateSigned20ReqConverter::toJson(const CertificateSigned20Req& data, // certificateType if (data.certificateType.isSet()) { - fill(json, "certificateType", ocpp::types::ocpp20::CertificateSigningUseEnumType20Helper.toString(data.certificateType)); + fill(json, "certificateType", ocpp::types::ocpp20::CertificateSigningUseEnumTypeHelper.toString(data.certificateType)); } return ret; } -/** @brief Convert a CertificateSigned20Conf from a JSON representation */ -bool CertificateSigned20ConfConverter::fromJson(const rapidjson::Value& json, - CertificateSigned20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a CertificateSignedConf from a JSON representation */ +bool CertificateSignedConfConverter::fromJson(const rapidjson::Value& json, + CertificateSignedConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::CertificateSignedStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::CertificateSignedStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -125,15 +125,15 @@ bool CertificateSigned20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a CertificateSigned20Conf to a JSON representation */ -bool CertificateSigned20ConfConverter::toJson(const CertificateSigned20Conf& data, rapidjson::Document& json) +/** @brief Convert a CertificateSignedConf to a JSON representation */ +bool CertificateSignedConfConverter::toJson(const CertificateSignedConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -142,12 +142,12 @@ bool CertificateSigned20ConfConverter::toJson(const CertificateSigned20Conf& dat } // status - fill(json, "status", ocpp::types::ocpp20::CertificateSignedStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::CertificateSignedStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/CertificateSigned20.h b/src/ocpp20/messages/CertificateSigned20.h index b4b4ee63..0f5cb7c8 100644 --- a/src/ocpp20/messages/CertificateSigned20.h +++ b/src/ocpp20/messages/CertificateSigned20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CERTIFICATESIGNED20_H -#define OPENOCPP_CERTIFICATESIGNED20_H +#ifndef OPENOCPP_OCPP20_CERTIFICATESIGNED_H +#define OPENOCPP_OCPP20_CERTIFICATESIGNED_H #include "IMessageConverter.h" @@ -38,38 +38,38 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the CertificateSigned20 messages */ -static const std::string CERTIFICATESIGNED20_ACTION = "CertificateSigned"; +/** @brief Action corresponding to the CertificateSigned messages */ +static const std::string CERTIFICATESIGNED_ACTION = "CertificateSigned"; -/** @brief CertificateSigned20Req message */ -struct CertificateSigned20Req +/** @brief CertificateSignedReq message */ +struct CertificateSignedReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief The signed PEM encoded X.509 certificate. This can also contain the necessary sub CA certificates. In that case, the order of the bundle should follow the certificate chain, starting from the leaf certificate. The Configuration Variable <<configkey-max-certificate-chain-size,MaxCertificateChainSize>> can be used to limit the maximum size of this field. */ ocpp::types::CiStringType<10000u> certificateChain; /** @brief */ - ocpp::types::Optional certificateType; + ocpp::types::Optional certificateType; }; -/** @brief CertificateSigned20Conf message */ -struct CertificateSigned20Conf +/** @brief CertificateSignedConf message */ +struct CertificateSignedConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::CertificateSignedStatusEnumType20 status; + ocpp::types::ocpp20::CertificateSignedStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(CertificateSigned20) +MESSAGE_CONVERTERS(CertificateSigned) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_CERTIFICATESIGNED20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CERTIFICATESIGNED_H \ No newline at end of file diff --git a/src/ocpp20/messages/ChangeAvailability20.cpp b/src/ocpp20/messages/ChangeAvailability20.cpp index 74d7e74e..00ab545d 100644 --- a/src/ocpp20/messages/ChangeAvailability20.cpp +++ b/src/ocpp20/messages/ChangeAvailability20.cpp @@ -32,30 +32,30 @@ namespace messages namespace ocpp20 { -/** @brief Convert a ChangeAvailability20Req from a JSON representation */ -bool ChangeAvailability20ReqConverter::fromJson(const rapidjson::Value& json, - ChangeAvailability20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ChangeAvailabilityReq from a JSON representation */ +bool ChangeAvailabilityReqConverter::fromJson(const rapidjson::Value& json, + ChangeAvailabilityReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // evse if (json.HasMember("evse")) { - ocpp::types::ocpp20::EVSEType20Converter evse_converter; + ocpp::types::ocpp20::EVSETypeConverter evse_converter; ret = ret && evse_converter.fromJson(json["evse"], data.evse, error_code, error_message); } // operationalStatus - data.operationalStatus = ocpp::types::ocpp20::OperationalStatusEnumType20Helper.fromString(json["operationalStatus"].GetString()); + data.operationalStatus = ocpp::types::ocpp20::OperationalStatusEnumTypeHelper.fromString(json["operationalStatus"].GetString()); if (!ret) { @@ -65,15 +65,15 @@ bool ChangeAvailability20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a ChangeAvailability20Req to a JSON representation */ -bool ChangeAvailability20ReqConverter::toJson(const ChangeAvailability20Req& data, rapidjson::Document& json) +/** @brief Convert a ChangeAvailabilityReq to a JSON representation */ +bool ChangeAvailabilityReqConverter::toJson(const ChangeAvailabilityReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -84,7 +84,7 @@ bool ChangeAvailability20ReqConverter::toJson(const ChangeAvailability20Req& dat // evse if (data.evse.isSet()) { - ocpp::types::ocpp20::EVSEType20Converter evse_converter; + ocpp::types::ocpp20::EVSETypeConverter evse_converter; evse_converter.setAllocator(allocator); rapidjson::Document evse_doc; evse_doc.Parse("{}"); @@ -93,33 +93,33 @@ bool ChangeAvailability20ReqConverter::toJson(const ChangeAvailability20Req& dat } // operationalStatus - fill(json, "operationalStatus", ocpp::types::ocpp20::OperationalStatusEnumType20Helper.toString(data.operationalStatus)); + fill(json, "operationalStatus", ocpp::types::ocpp20::OperationalStatusEnumTypeHelper.toString(data.operationalStatus)); return ret; } -/** @brief Convert a ChangeAvailability20Conf from a JSON representation */ -bool ChangeAvailability20ConfConverter::fromJson(const rapidjson::Value& json, - ChangeAvailability20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ChangeAvailabilityConf from a JSON representation */ +bool ChangeAvailabilityConfConverter::fromJson(const rapidjson::Value& json, + ChangeAvailabilityConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::ChangeAvailabilityStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::ChangeAvailabilityStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -131,15 +131,15 @@ bool ChangeAvailability20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a ChangeAvailability20Conf to a JSON representation */ -bool ChangeAvailability20ConfConverter::toJson(const ChangeAvailability20Conf& data, rapidjson::Document& json) +/** @brief Convert a ChangeAvailabilityConf to a JSON representation */ +bool ChangeAvailabilityConfConverter::toJson(const ChangeAvailabilityConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -148,12 +148,12 @@ bool ChangeAvailability20ConfConverter::toJson(const ChangeAvailability20Conf& d } // status - fill(json, "status", ocpp::types::ocpp20::ChangeAvailabilityStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::ChangeAvailabilityStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/ChangeAvailability20.h b/src/ocpp20/messages/ChangeAvailability20.h index fd06ecfb..992cdb81 100644 --- a/src/ocpp20/messages/ChangeAvailability20.h +++ b/src/ocpp20/messages/ChangeAvailability20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHANGEAVAILABILITY20_H -#define OPENOCPP_CHANGEAVAILABILITY20_H +#ifndef OPENOCPP_OCPP20_CHANGEAVAILABILITY_H +#define OPENOCPP_OCPP20_CHANGEAVAILABILITY_H #include "IMessageConverter.h" @@ -39,36 +39,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the ChangeAvailability20 messages */ -static const std::string CHANGEAVAILABILITY20_ACTION = "ChangeAvailability"; +/** @brief Action corresponding to the ChangeAvailability messages */ +static const std::string CHANGEAVAILABILITY_ACTION = "ChangeAvailability"; -/** @brief ChangeAvailability20Req message */ -struct ChangeAvailability20Req +/** @brief ChangeAvailabilityReq message */ +struct ChangeAvailabilityReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional evse; + ocpp::types::Optional evse; /** @brief */ - ocpp::types::ocpp20::OperationalStatusEnumType20 operationalStatus; + ocpp::types::ocpp20::OperationalStatusEnumType operationalStatus; }; -/** @brief ChangeAvailability20Conf message */ -struct ChangeAvailability20Conf +/** @brief ChangeAvailabilityConf message */ +struct ChangeAvailabilityConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::ChangeAvailabilityStatusEnumType20 status; + ocpp::types::ocpp20::ChangeAvailabilityStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(ChangeAvailability20) +MESSAGE_CONVERTERS(ChangeAvailability) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_CHANGEAVAILABILITY20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHANGEAVAILABILITY_H \ No newline at end of file diff --git a/src/ocpp20/messages/ClearCache20.cpp b/src/ocpp20/messages/ClearCache20.cpp index 9d3d078b..be3290d7 100644 --- a/src/ocpp20/messages/ClearCache20.cpp +++ b/src/ocpp20/messages/ClearCache20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a ClearCache20Req from a JSON representation */ -bool ClearCache20ReqConverter::fromJson(const rapidjson::Value& json, - ClearCache20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ClearCacheReq from a JSON representation */ +bool ClearCacheReqConverter::fromJson(const rapidjson::Value& json, + ClearCacheReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -55,15 +55,15 @@ bool ClearCache20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a ClearCache20Req to a JSON representation */ -bool ClearCache20ReqConverter::toJson(const ClearCache20Req& data, rapidjson::Document& json) +/** @brief Convert a ClearCacheReq to a JSON representation */ +bool ClearCacheReqConverter::toJson(const ClearCacheReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -74,28 +74,28 @@ bool ClearCache20ReqConverter::toJson(const ClearCache20Req& data, rapidjson::Do return ret; } -/** @brief Convert a ClearCache20Conf from a JSON representation */ -bool ClearCache20ConfConverter::fromJson(const rapidjson::Value& json, - ClearCache20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ClearCacheConf from a JSON representation */ +bool ClearCacheConfConverter::fromJson(const rapidjson::Value& json, + ClearCacheConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::ClearCacheStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::ClearCacheStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -107,15 +107,15 @@ bool ClearCache20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a ClearCache20Conf to a JSON representation */ -bool ClearCache20ConfConverter::toJson(const ClearCache20Conf& data, rapidjson::Document& json) +/** @brief Convert a ClearCacheConf to a JSON representation */ +bool ClearCacheConfConverter::toJson(const ClearCacheConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -124,12 +124,12 @@ bool ClearCache20ConfConverter::toJson(const ClearCache20Conf& data, rapidjson:: } // status - fill(json, "status", ocpp::types::ocpp20::ClearCacheStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::ClearCacheStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/ClearCache20.h b/src/ocpp20/messages/ClearCache20.h index ce169fe9..35d25638 100644 --- a/src/ocpp20/messages/ClearCache20.h +++ b/src/ocpp20/messages/ClearCache20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CLEARCACHE20_H -#define OPENOCPP_CLEARCACHE20_H +#ifndef OPENOCPP_OCPP20_CLEARCACHE_H +#define OPENOCPP_OCPP20_CLEARCACHE_H #include "IMessageConverter.h" @@ -37,32 +37,32 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the ClearCache20 messages */ -static const std::string CLEARCACHE20_ACTION = "ClearCache"; +/** @brief Action corresponding to the ClearCache messages */ +static const std::string CLEARCACHE_ACTION = "ClearCache"; -/** @brief ClearCache20Req message */ -struct ClearCache20Req +/** @brief ClearCacheReq message */ +struct ClearCacheReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; -/** @brief ClearCache20Conf message */ -struct ClearCache20Conf +/** @brief ClearCacheConf message */ +struct ClearCacheConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::ClearCacheStatusEnumType20 status; + ocpp::types::ocpp20::ClearCacheStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(ClearCache20) +MESSAGE_CONVERTERS(ClearCache) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_CLEARCACHE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CLEARCACHE_H \ No newline at end of file diff --git a/src/ocpp20/messages/ClearChargingProfile20.cpp b/src/ocpp20/messages/ClearChargingProfile20.cpp index 3058a91b..bdf5fcfb 100644 --- a/src/ocpp20/messages/ClearChargingProfile20.cpp +++ b/src/ocpp20/messages/ClearChargingProfile20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a ClearChargingProfile20Req from a JSON representation */ -bool ClearChargingProfile20ReqConverter::fromJson(const rapidjson::Value& json, - ClearChargingProfile20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ClearChargingProfileReq from a JSON representation */ +bool ClearChargingProfileReqConverter::fromJson(const rapidjson::Value& json, + ClearChargingProfileReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -53,7 +53,7 @@ bool ClearChargingProfile20ReqConverter::fromJson(const rapidjson::Value& jso // chargingProfileCriteria if (json.HasMember("chargingProfileCriteria")) { - ocpp::types::ocpp20::ClearChargingProfileType20Converter chargingProfileCriteria_converter; + ocpp::types::ocpp20::ClearChargingProfileTypeConverter chargingProfileCriteria_converter; ret = ret && chargingProfileCriteria_converter.fromJson( json["chargingProfileCriteria"], data.chargingProfileCriteria, error_code, error_message); } @@ -66,15 +66,15 @@ bool ClearChargingProfile20ReqConverter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a ClearChargingProfile20Req to a JSON representation */ -bool ClearChargingProfile20ReqConverter::toJson(const ClearChargingProfile20Req& data, rapidjson::Document& json) +/** @brief Convert a ClearChargingProfileReq to a JSON representation */ +bool ClearChargingProfileReqConverter::toJson(const ClearChargingProfileReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -88,7 +88,7 @@ bool ClearChargingProfile20ReqConverter::toJson(const ClearChargingProfile20Req& // chargingProfileCriteria if (data.chargingProfileCriteria.isSet()) { - ocpp::types::ocpp20::ClearChargingProfileType20Converter chargingProfileCriteria_converter; + ocpp::types::ocpp20::ClearChargingProfileTypeConverter chargingProfileCriteria_converter; chargingProfileCriteria_converter.setAllocator(allocator); rapidjson::Document chargingProfileCriteria_doc; chargingProfileCriteria_doc.Parse("{}"); @@ -99,28 +99,28 @@ bool ClearChargingProfile20ReqConverter::toJson(const ClearChargingProfile20Req& return ret; } -/** @brief Convert a ClearChargingProfile20Conf from a JSON representation */ -bool ClearChargingProfile20ConfConverter::fromJson(const rapidjson::Value& json, - ClearChargingProfile20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ClearChargingProfileConf from a JSON representation */ +bool ClearChargingProfileConfConverter::fromJson(const rapidjson::Value& json, + ClearChargingProfileConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::ClearChargingProfileStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::ClearChargingProfileStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -132,15 +132,15 @@ bool ClearChargingProfile20ConfConverter::fromJson(const rapidjson::Value& j return ret; } -/** @brief Convert a ClearChargingProfile20Conf to a JSON representation */ -bool ClearChargingProfile20ConfConverter::toJson(const ClearChargingProfile20Conf& data, rapidjson::Document& json) +/** @brief Convert a ClearChargingProfileConf to a JSON representation */ +bool ClearChargingProfileConfConverter::toJson(const ClearChargingProfileConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -149,12 +149,12 @@ bool ClearChargingProfile20ConfConverter::toJson(const ClearChargingProfile20Con } // status - fill(json, "status", ocpp::types::ocpp20::ClearChargingProfileStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::ClearChargingProfileStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/ClearChargingProfile20.h b/src/ocpp20/messages/ClearChargingProfile20.h index eade8283..53b1bb49 100644 --- a/src/ocpp20/messages/ClearChargingProfile20.h +++ b/src/ocpp20/messages/ClearChargingProfile20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CLEARCHARGINGPROFILE20_H -#define OPENOCPP_CLEARCHARGINGPROFILE20_H +#ifndef OPENOCPP_OCPP20_CLEARCHARGINGPROFILE_H +#define OPENOCPP_OCPP20_CLEARCHARGINGPROFILE_H #include "IMessageConverter.h" @@ -38,36 +38,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the ClearChargingProfile20 messages */ -static const std::string CLEARCHARGINGPROFILE20_ACTION = "ClearChargingProfile"; +/** @brief Action corresponding to the ClearChargingProfile messages */ +static const std::string CLEARCHARGINGPROFILE_ACTION = "ClearChargingProfile"; -/** @brief ClearChargingProfile20Req message */ -struct ClearChargingProfile20Req +/** @brief ClearChargingProfileReq message */ +struct ClearChargingProfileReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief The Id of the charging profile to clear. */ ocpp::types::Optional chargingProfileId; /** @brief */ - ocpp::types::Optional chargingProfileCriteria; + ocpp::types::Optional chargingProfileCriteria; }; -/** @brief ClearChargingProfile20Conf message */ -struct ClearChargingProfile20Conf +/** @brief ClearChargingProfileConf message */ +struct ClearChargingProfileConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::ClearChargingProfileStatusEnumType20 status; + ocpp::types::ocpp20::ClearChargingProfileStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(ClearChargingProfile20) +MESSAGE_CONVERTERS(ClearChargingProfile) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_CLEARCHARGINGPROFILE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CLEARCHARGINGPROFILE_H \ No newline at end of file diff --git a/src/ocpp20/messages/ClearDisplayMessage20.cpp b/src/ocpp20/messages/ClearDisplayMessage20.cpp index bf867fb3..7d5ebdea 100644 --- a/src/ocpp20/messages/ClearDisplayMessage20.cpp +++ b/src/ocpp20/messages/ClearDisplayMessage20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a ClearDisplayMessage20Req from a JSON representation */ -bool ClearDisplayMessage20ReqConverter::fromJson(const rapidjson::Value& json, - ClearDisplayMessage20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ClearDisplayMessageReq from a JSON representation */ +bool ClearDisplayMessageReqConverter::fromJson(const rapidjson::Value& json, + ClearDisplayMessageReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -58,15 +58,15 @@ bool ClearDisplayMessage20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a ClearDisplayMessage20Req to a JSON representation */ -bool ClearDisplayMessage20ReqConverter::toJson(const ClearDisplayMessage20Req& data, rapidjson::Document& json) +/** @brief Convert a ClearDisplayMessageReq to a JSON representation */ +bool ClearDisplayMessageReqConverter::toJson(const ClearDisplayMessageReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -80,28 +80,28 @@ bool ClearDisplayMessage20ReqConverter::toJson(const ClearDisplayMessage20Req& d return ret; } -/** @brief Convert a ClearDisplayMessage20Conf from a JSON representation */ -bool ClearDisplayMessage20ConfConverter::fromJson(const rapidjson::Value& json, - ClearDisplayMessage20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ClearDisplayMessageConf from a JSON representation */ +bool ClearDisplayMessageConfConverter::fromJson(const rapidjson::Value& json, + ClearDisplayMessageConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::ClearMessageStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::ClearMessageStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -113,15 +113,15 @@ bool ClearDisplayMessage20ConfConverter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a ClearDisplayMessage20Conf to a JSON representation */ -bool ClearDisplayMessage20ConfConverter::toJson(const ClearDisplayMessage20Conf& data, rapidjson::Document& json) +/** @brief Convert a ClearDisplayMessageConf to a JSON representation */ +bool ClearDisplayMessageConfConverter::toJson(const ClearDisplayMessageConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -130,12 +130,12 @@ bool ClearDisplayMessage20ConfConverter::toJson(const ClearDisplayMessage20Conf& } // status - fill(json, "status", ocpp::types::ocpp20::ClearMessageStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::ClearMessageStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/ClearDisplayMessage20.h b/src/ocpp20/messages/ClearDisplayMessage20.h index b6b71e14..b9b89903 100644 --- a/src/ocpp20/messages/ClearDisplayMessage20.h +++ b/src/ocpp20/messages/ClearDisplayMessage20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CLEARDISPLAYMESSAGE20_H -#define OPENOCPP_CLEARDISPLAYMESSAGE20_H +#ifndef OPENOCPP_OCPP20_CLEARDISPLAYMESSAGE_H +#define OPENOCPP_OCPP20_CLEARDISPLAYMESSAGE_H #include "IMessageConverter.h" @@ -37,34 +37,34 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the ClearDisplayMessage20 messages */ -static const std::string CLEARDISPLAYMESSAGE20_ACTION = "ClearDisplayMessage"; +/** @brief Action corresponding to the ClearDisplayMessage messages */ +static const std::string CLEARDISPLAYMESSAGE_ACTION = "ClearDisplayMessage"; -/** @brief ClearDisplayMessage20Req message */ -struct ClearDisplayMessage20Req +/** @brief ClearDisplayMessageReq message */ +struct ClearDisplayMessageReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Id of the message that SHALL be removed from the Charging Station. */ int id; }; -/** @brief ClearDisplayMessage20Conf message */ -struct ClearDisplayMessage20Conf +/** @brief ClearDisplayMessageConf message */ +struct ClearDisplayMessageConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::ClearMessageStatusEnumType20 status; + ocpp::types::ocpp20::ClearMessageStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(ClearDisplayMessage20) +MESSAGE_CONVERTERS(ClearDisplayMessage) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_CLEARDISPLAYMESSAGE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CLEARDISPLAYMESSAGE_H \ No newline at end of file diff --git a/src/ocpp20/messages/ClearVariableMonitoring20.cpp b/src/ocpp20/messages/ClearVariableMonitoring20.cpp index bab79f06..58131804 100644 --- a/src/ocpp20/messages/ClearVariableMonitoring20.cpp +++ b/src/ocpp20/messages/ClearVariableMonitoring20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a ClearVariableMonitoring20Req from a JSON representation */ -bool ClearVariableMonitoring20ReqConverter::fromJson(const rapidjson::Value& json, - ClearVariableMonitoring20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ClearVariableMonitoringReq from a JSON representation */ +bool ClearVariableMonitoringReqConverter::fromJson(const rapidjson::Value& json, + ClearVariableMonitoringReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -66,15 +66,15 @@ bool ClearVariableMonitoring20ReqConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a ClearVariableMonitoring20Req to a JSON representation */ -bool ClearVariableMonitoring20ReqConverter::toJson(const ClearVariableMonitoring20Req& data, rapidjson::Document& json) +/** @brief Convert a ClearVariableMonitoringReq to a JSON representation */ +bool ClearVariableMonitoringReqConverter::toJson(const ClearVariableMonitoringReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -94,29 +94,29 @@ bool ClearVariableMonitoring20ReqConverter::toJson(const ClearVariableMonitoring return ret; } -/** @brief Convert a ClearVariableMonitoring20Conf from a JSON representation */ -bool ClearVariableMonitoring20ConfConverter::fromJson(const rapidjson::Value& json, - ClearVariableMonitoring20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ClearVariableMonitoringConf from a JSON representation */ +bool ClearVariableMonitoringConfConverter::fromJson(const rapidjson::Value& json, + ClearVariableMonitoringConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // clearMonitoringResult if (json.HasMember("clearMonitoringResult")) { - const rapidjson::Value& clearMonitoringResult_json = json["clearMonitoringResult"]; - ocpp::types::ocpp20::ClearMonitoringResultType20Converter clearMonitoringResult_converter; + const rapidjson::Value& clearMonitoringResult_json = json["clearMonitoringResult"]; + ocpp::types::ocpp20::ClearMonitoringResultTypeConverter clearMonitoringResult_converter; for (auto it = clearMonitoringResult_json.Begin(); ret && (it != clearMonitoringResult_json.End()); ++it) { - ocpp::types::ocpp20::ClearMonitoringResultType20& item = data.clearMonitoringResult.emplace_back(); + ocpp::types::ocpp20::ClearMonitoringResultType& item = data.clearMonitoringResult.emplace_back(); ret = ret && clearMonitoringResult_converter.fromJson(*it, item, error_code, error_message); } } @@ -129,15 +129,15 @@ bool ClearVariableMonitoring20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a ClearVariableMonitoring20Conf to a JSON representation */ -bool ClearVariableMonitoring20ConfConverter::toJson(const ClearVariableMonitoring20Conf& data, rapidjson::Document& json) +/** @brief Convert a ClearVariableMonitoringConf to a JSON representation */ +bool ClearVariableMonitoringConfConverter::toJson(const ClearVariableMonitoringConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -147,10 +147,10 @@ bool ClearVariableMonitoring20ConfConverter::toJson(const ClearVariableMonitorin // clearMonitoringResult - rapidjson::Value clearMonitoringResult_json(rapidjson::kArrayType); - ocpp::types::ocpp20::ClearMonitoringResultType20Converter clearMonitoringResult_converter; + rapidjson::Value clearMonitoringResult_json(rapidjson::kArrayType); + ocpp::types::ocpp20::ClearMonitoringResultTypeConverter clearMonitoringResult_converter; clearMonitoringResult_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::ClearMonitoringResultType20& item : data.clearMonitoringResult) + for (const ocpp::types::ocpp20::ClearMonitoringResultType& item : data.clearMonitoringResult) { rapidjson::Document item_doc; item_doc.Parse("{}"); diff --git a/src/ocpp20/messages/ClearVariableMonitoring20.h b/src/ocpp20/messages/ClearVariableMonitoring20.h index f200155d..c34dbc67 100644 --- a/src/ocpp20/messages/ClearVariableMonitoring20.h +++ b/src/ocpp20/messages/ClearVariableMonitoring20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CLEARVARIABLEMONITORING20_H -#define OPENOCPP_CLEARVARIABLEMONITORING20_H +#ifndef OPENOCPP_OCPP20_CLEARVARIABLEMONITORING_H +#define OPENOCPP_OCPP20_CLEARVARIABLEMONITORING_H #include "IMessageConverter.h" @@ -36,32 +36,32 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the ClearVariableMonitoring20 messages */ -static const std::string CLEARVARIABLEMONITORING20_ACTION = "ClearVariableMonitoring"; +/** @brief Action corresponding to the ClearVariableMonitoring messages */ +static const std::string CLEARVARIABLEMONITORING_ACTION = "ClearVariableMonitoring"; -/** @brief ClearVariableMonitoring20Req message */ -struct ClearVariableMonitoring20Req +/** @brief ClearVariableMonitoringReq message */ +struct ClearVariableMonitoringReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief List of the monitors to be cleared, identified by there Id. */ std::vector id; }; -/** @brief ClearVariableMonitoring20Conf message */ -struct ClearVariableMonitoring20Conf +/** @brief ClearVariableMonitoringConf message */ +struct ClearVariableMonitoringConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector clearMonitoringResult; + std::vector clearMonitoringResult; }; // Message converters -MESSAGE_CONVERTERS(ClearVariableMonitoring20) +MESSAGE_CONVERTERS(ClearVariableMonitoring) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_CLEARVARIABLEMONITORING20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CLEARVARIABLEMONITORING_H \ No newline at end of file diff --git a/src/ocpp20/messages/ClearedChargingLimit20.cpp b/src/ocpp20/messages/ClearedChargingLimit20.cpp index 43f8d169..3c0abce2 100644 --- a/src/ocpp20/messages/ClearedChargingLimit20.cpp +++ b/src/ocpp20/messages/ClearedChargingLimit20.cpp @@ -32,23 +32,23 @@ namespace messages namespace ocpp20 { -/** @brief Convert a ClearedChargingLimit20Req from a JSON representation */ -bool ClearedChargingLimit20ReqConverter::fromJson(const rapidjson::Value& json, - ClearedChargingLimit20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ClearedChargingLimitReq from a JSON representation */ +bool ClearedChargingLimitReqConverter::fromJson(const rapidjson::Value& json, + ClearedChargingLimitReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // chargingLimitSource - data.chargingLimitSource = ocpp::types::ocpp20::ChargingLimitSourceEnumType20Helper.fromString(json["chargingLimitSource"].GetString()); + data.chargingLimitSource = ocpp::types::ocpp20::ChargingLimitSourceEnumTypeHelper.fromString(json["chargingLimitSource"].GetString()); // evseId extract(json, "evseId", data.evseId); @@ -61,15 +61,15 @@ bool ClearedChargingLimit20ReqConverter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a ClearedChargingLimit20Req to a JSON representation */ -bool ClearedChargingLimit20ReqConverter::toJson(const ClearedChargingLimit20Req& data, rapidjson::Document& json) +/** @brief Convert a ClearedChargingLimitReq to a JSON representation */ +bool ClearedChargingLimitReqConverter::toJson(const ClearedChargingLimitReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -78,7 +78,7 @@ bool ClearedChargingLimit20ReqConverter::toJson(const ClearedChargingLimit20Req& } // chargingLimitSource - fill(json, "chargingLimitSource", ocpp::types::ocpp20::ChargingLimitSourceEnumType20Helper.toString(data.chargingLimitSource)); + fill(json, "chargingLimitSource", ocpp::types::ocpp20::ChargingLimitSourceEnumTypeHelper.toString(data.chargingLimitSource)); // evseId fill(json, "evseId", data.evseId); @@ -86,18 +86,18 @@ bool ClearedChargingLimit20ReqConverter::toJson(const ClearedChargingLimit20Req& return ret; } -/** @brief Convert a ClearedChargingLimit20Conf from a JSON representation */ -bool ClearedChargingLimit20ConfConverter::fromJson(const rapidjson::Value& json, - ClearedChargingLimit20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ClearedChargingLimitConf from a JSON representation */ +bool ClearedChargingLimitConfConverter::fromJson(const rapidjson::Value& json, + ClearedChargingLimitConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -109,15 +109,15 @@ bool ClearedChargingLimit20ConfConverter::fromJson(const rapidjson::Value& j return ret; } -/** @brief Convert a ClearedChargingLimit20Conf to a JSON representation */ -bool ClearedChargingLimit20ConfConverter::toJson(const ClearedChargingLimit20Conf& data, rapidjson::Document& json) +/** @brief Convert a ClearedChargingLimitConf to a JSON representation */ +bool ClearedChargingLimitConfConverter::toJson(const ClearedChargingLimitConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/ClearedChargingLimit20.h b/src/ocpp20/messages/ClearedChargingLimit20.h index f4767b4d..6374d13c 100644 --- a/src/ocpp20/messages/ClearedChargingLimit20.h +++ b/src/ocpp20/messages/ClearedChargingLimit20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CLEAREDCHARGINGLIMIT20_H -#define OPENOCPP_CLEAREDCHARGINGLIMIT20_H +#ifndef OPENOCPP_OCPP20_CLEAREDCHARGINGLIMIT_H +#define OPENOCPP_OCPP20_CLEAREDCHARGINGLIMIT_H #include "IMessageConverter.h" @@ -36,32 +36,32 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the ClearedChargingLimit20 messages */ -static const std::string CLEAREDCHARGINGLIMIT20_ACTION = "ClearedChargingLimit"; +/** @brief Action corresponding to the ClearedChargingLimit messages */ +static const std::string CLEAREDCHARGINGLIMIT_ACTION = "ClearedChargingLimit"; -/** @brief ClearedChargingLimit20Req message */ -struct ClearedChargingLimit20Req +/** @brief ClearedChargingLimitReq message */ +struct ClearedChargingLimitReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::ChargingLimitSourceEnumType20 chargingLimitSource; + ocpp::types::ocpp20::ChargingLimitSourceEnumType chargingLimitSource; /** @brief EVSE Identifier. */ ocpp::types::Optional evseId; }; -/** @brief ClearedChargingLimit20Conf message */ -struct ClearedChargingLimit20Conf +/** @brief ClearedChargingLimitConf message */ +struct ClearedChargingLimitConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(ClearedChargingLimit20) +MESSAGE_CONVERTERS(ClearedChargingLimit) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_CLEAREDCHARGINGLIMIT20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CLEAREDCHARGINGLIMIT_H \ No newline at end of file diff --git a/src/ocpp20/messages/CostUpdated20.cpp b/src/ocpp20/messages/CostUpdated20.cpp index 946a4cd0..fbf1b33d 100644 --- a/src/ocpp20/messages/CostUpdated20.cpp +++ b/src/ocpp20/messages/CostUpdated20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a CostUpdated20Req from a JSON representation */ -bool CostUpdated20ReqConverter::fromJson(const rapidjson::Value& json, - CostUpdated20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a CostUpdatedReq from a JSON representation */ +bool CostUpdatedReqConverter::fromJson(const rapidjson::Value& json, + CostUpdatedReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -61,15 +61,15 @@ bool CostUpdated20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a CostUpdated20Req to a JSON representation */ -bool CostUpdated20ReqConverter::toJson(const CostUpdated20Req& data, rapidjson::Document& json) +/** @brief Convert a CostUpdatedReq to a JSON representation */ +bool CostUpdatedReqConverter::toJson(const CostUpdatedReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -86,18 +86,18 @@ bool CostUpdated20ReqConverter::toJson(const CostUpdated20Req& data, rapidjson:: return ret; } -/** @brief Convert a CostUpdated20Conf from a JSON representation */ -bool CostUpdated20ConfConverter::fromJson(const rapidjson::Value& json, - CostUpdated20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a CostUpdatedConf from a JSON representation */ +bool CostUpdatedConfConverter::fromJson(const rapidjson::Value& json, + CostUpdatedConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -109,15 +109,15 @@ bool CostUpdated20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a CostUpdated20Conf to a JSON representation */ -bool CostUpdated20ConfConverter::toJson(const CostUpdated20Conf& data, rapidjson::Document& json) +/** @brief Convert a CostUpdatedConf to a JSON representation */ +bool CostUpdatedConfConverter::toJson(const CostUpdatedConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/CostUpdated20.h b/src/ocpp20/messages/CostUpdated20.h index 762c6b0a..6a9ec23f 100644 --- a/src/ocpp20/messages/CostUpdated20.h +++ b/src/ocpp20/messages/CostUpdated20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_COSTUPDATED20_H -#define OPENOCPP_COSTUPDATED20_H +#ifndef OPENOCPP_OCPP20_COSTUPDATED_H +#define OPENOCPP_OCPP20_COSTUPDATED_H #include "IMessageConverter.h" @@ -35,32 +35,32 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the CostUpdated20 messages */ -static const std::string COSTUPDATED20_ACTION = "CostUpdated"; +/** @brief Action corresponding to the CostUpdated messages */ +static const std::string COSTUPDATED_ACTION = "CostUpdated"; -/** @brief CostUpdated20Req message */ -struct CostUpdated20Req +/** @brief CostUpdatedReq message */ +struct CostUpdatedReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Current total cost, based on the information known by the CSMS, of the transaction including taxes. In the currency configured with the configuration Variable: [<<configkey-currency, Currency>>] */ float totalCost; /** @brief Transaction Id of the transaction the current cost are asked for. */ ocpp::types::CiStringType<36u> transactionId; }; -/** @brief CostUpdated20Conf message */ -struct CostUpdated20Conf +/** @brief CostUpdatedConf message */ +struct CostUpdatedConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(CostUpdated20) +MESSAGE_CONVERTERS(CostUpdated) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_COSTUPDATED20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_COSTUPDATED_H \ No newline at end of file diff --git a/src/ocpp20/messages/CustomerInformation20.cpp b/src/ocpp20/messages/CustomerInformation20.cpp index f7c87927..8b08a99b 100644 --- a/src/ocpp20/messages/CustomerInformation20.cpp +++ b/src/ocpp20/messages/CustomerInformation20.cpp @@ -32,25 +32,25 @@ namespace messages namespace ocpp20 { -/** @brief Convert a CustomerInformation20Req from a JSON representation */ -bool CustomerInformation20ReqConverter::fromJson(const rapidjson::Value& json, - CustomerInformation20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a CustomerInformationReq from a JSON representation */ +bool CustomerInformationReqConverter::fromJson(const rapidjson::Value& json, + CustomerInformationReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // customerCertificate if (json.HasMember("customerCertificate")) { - ocpp::types::ocpp20::CertificateHashDataType20Converter customerCertificate_converter; + ocpp::types::ocpp20::CertificateHashDataTypeConverter customerCertificate_converter; ret = ret && customerCertificate_converter.fromJson(json["customerCertificate"], data.customerCertificate, error_code, error_message); } @@ -58,7 +58,7 @@ bool CustomerInformation20ReqConverter::fromJson(const rapidjson::Value& json, // idToken if (json.HasMember("idToken")) { - ocpp::types::ocpp20::IdTokenType20Converter idToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter idToken_converter; ret = ret && idToken_converter.fromJson(json["idToken"], data.idToken, error_code, error_message); } @@ -82,15 +82,15 @@ bool CustomerInformation20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a CustomerInformation20Req to a JSON representation */ -bool CustomerInformation20ReqConverter::toJson(const CustomerInformation20Req& data, rapidjson::Document& json) +/** @brief Convert a CustomerInformationReq to a JSON representation */ +bool CustomerInformationReqConverter::toJson(const CustomerInformationReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -101,7 +101,7 @@ bool CustomerInformation20ReqConverter::toJson(const CustomerInformation20Req& d // customerCertificate if (data.customerCertificate.isSet()) { - ocpp::types::ocpp20::CertificateHashDataType20Converter customerCertificate_converter; + ocpp::types::ocpp20::CertificateHashDataTypeConverter customerCertificate_converter; customerCertificate_converter.setAllocator(allocator); rapidjson::Document customerCertificate_doc; customerCertificate_doc.Parse("{}"); @@ -112,7 +112,7 @@ bool CustomerInformation20ReqConverter::toJson(const CustomerInformation20Req& d // idToken if (data.idToken.isSet()) { - ocpp::types::ocpp20::IdTokenType20Converter idToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter idToken_converter; idToken_converter.setAllocator(allocator); rapidjson::Document idToken_doc; idToken_doc.Parse("{}"); @@ -135,28 +135,28 @@ bool CustomerInformation20ReqConverter::toJson(const CustomerInformation20Req& d return ret; } -/** @brief Convert a CustomerInformation20Conf from a JSON representation */ -bool CustomerInformation20ConfConverter::fromJson(const rapidjson::Value& json, - CustomerInformation20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a CustomerInformationConf from a JSON representation */ +bool CustomerInformationConfConverter::fromJson(const rapidjson::Value& json, + CustomerInformationConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::CustomerInformationStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::CustomerInformationStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -168,15 +168,15 @@ bool CustomerInformation20ConfConverter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a CustomerInformation20Conf to a JSON representation */ -bool CustomerInformation20ConfConverter::toJson(const CustomerInformation20Conf& data, rapidjson::Document& json) +/** @brief Convert a CustomerInformationConf to a JSON representation */ +bool CustomerInformationConfConverter::toJson(const CustomerInformationConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -185,12 +185,12 @@ bool CustomerInformation20ConfConverter::toJson(const CustomerInformation20Conf& } // status - fill(json, "status", ocpp::types::ocpp20::CustomerInformationStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::CustomerInformationStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/CustomerInformation20.h b/src/ocpp20/messages/CustomerInformation20.h index 3da3747a..3e139a84 100644 --- a/src/ocpp20/messages/CustomerInformation20.h +++ b/src/ocpp20/messages/CustomerInformation20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CUSTOMERINFORMATION20_H -#define OPENOCPP_CUSTOMERINFORMATION20_H +#ifndef OPENOCPP_OCPP20_CUSTOMERINFORMATION_H +#define OPENOCPP_OCPP20_CUSTOMERINFORMATION_H #include "IMessageConverter.h" @@ -39,18 +39,18 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the CustomerInformation20 messages */ -static const std::string CUSTOMERINFORMATION20_ACTION = "CustomerInformation"; +/** @brief Action corresponding to the CustomerInformation messages */ +static const std::string CUSTOMERINFORMATION_ACTION = "CustomerInformation"; -/** @brief CustomerInformation20Req message */ -struct CustomerInformation20Req +/** @brief CustomerInformationReq message */ +struct CustomerInformationReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional customerCertificate; + ocpp::types::Optional customerCertificate; /** @brief */ - ocpp::types::Optional idToken; + ocpp::types::Optional idToken; /** @brief The Id of the request. */ int requestId; /** @brief Flag indicating whether the Charging Station should return NotifyCustomerInformationRequest messages containing information about the customer referred to. */ @@ -62,22 +62,22 @@ One of the possible identifiers (customerIdentifier, customerIdToken or customer ocpp::types::Optional> customerIdentifier; }; -/** @brief CustomerInformation20Conf message */ -struct CustomerInformation20Conf +/** @brief CustomerInformationConf message */ +struct CustomerInformationConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::CustomerInformationStatusEnumType20 status; + ocpp::types::ocpp20::CustomerInformationStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(CustomerInformation20) +MESSAGE_CONVERTERS(CustomerInformation) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_CUSTOMERINFORMATION20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CUSTOMERINFORMATION_H \ No newline at end of file diff --git a/src/ocpp20/messages/DataTransfer20.cpp b/src/ocpp20/messages/DataTransfer20.cpp index dbbb9356..03974e15 100644 --- a/src/ocpp20/messages/DataTransfer20.cpp +++ b/src/ocpp20/messages/DataTransfer20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a DataTransfer20Req from a JSON representation */ -bool DataTransfer20ReqConverter::fromJson(const rapidjson::Value& json, - DataTransfer20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a DataTransferReq from a JSON representation */ +bool DataTransferReqConverter::fromJson(const rapidjson::Value& json, + DataTransferReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -64,15 +64,15 @@ bool DataTransfer20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a DataTransfer20Req to a JSON representation */ -bool DataTransfer20ReqConverter::toJson(const DataTransfer20Req& data, rapidjson::Document& json) +/** @brief Convert a DataTransferReq to a JSON representation */ +bool DataTransferReqConverter::toJson(const DataTransferReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -92,28 +92,28 @@ bool DataTransfer20ReqConverter::toJson(const DataTransfer20Req& data, rapidjson return ret; } -/** @brief Convert a DataTransfer20Conf from a JSON representation */ -bool DataTransfer20ConfConverter::fromJson(const rapidjson::Value& json, - DataTransfer20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a DataTransferConf from a JSON representation */ +bool DataTransferConfConverter::fromJson(const rapidjson::Value& json, + DataTransferConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::DataTransferStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::DataTransferStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -128,15 +128,15 @@ bool DataTransfer20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a DataTransfer20Conf to a JSON representation */ -bool DataTransfer20ConfConverter::toJson(const DataTransfer20Conf& data, rapidjson::Document& json) +/** @brief Convert a DataTransferConf to a JSON representation */ +bool DataTransferConfConverter::toJson(const DataTransferConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -145,12 +145,12 @@ bool DataTransfer20ConfConverter::toJson(const DataTransfer20Conf& data, rapidjs } // status - fill(json, "status", ocpp::types::ocpp20::DataTransferStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::DataTransferStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/DataTransfer20.h b/src/ocpp20/messages/DataTransfer20.h index 6ea41e19..4c2372af 100644 --- a/src/ocpp20/messages/DataTransfer20.h +++ b/src/ocpp20/messages/DataTransfer20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_DATATRANSFER20_H -#define OPENOCPP_DATATRANSFER20_H +#ifndef OPENOCPP_OCPP20_DATATRANSFER_H +#define OPENOCPP_OCPP20_DATATRANSFER_H #include "IMessageConverter.h" @@ -37,14 +37,14 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the DataTransfer20 messages */ -static const std::string DATATRANSFER20_ACTION = "DataTransfer"; +/** @brief Action corresponding to the DataTransfer messages */ +static const std::string DATATRANSFER_ACTION = "DataTransfer"; -/** @brief DataTransfer20Req message */ -struct DataTransfer20Req +/** @brief DataTransferReq message */ +struct DataTransferReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief May be used to indicate a specific message or implementation. */ ocpp::types::Optional> messageId; /** @brief Data without specified length or format. This needs to be decided by both parties (Open to implementation). */ @@ -53,24 +53,24 @@ struct DataTransfer20Req ocpp::types::CiStringType<255u> vendorId; }; -/** @brief DataTransfer20Conf message */ -struct DataTransfer20Conf +/** @brief DataTransferConf message */ +struct DataTransferConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::DataTransferStatusEnumType20 status; + ocpp::types::ocpp20::DataTransferStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; /** @brief Data without specified length or format, in response to request. */ ocpp::types::Optional data; }; // Message converters -MESSAGE_CONVERTERS(DataTransfer20) +MESSAGE_CONVERTERS(DataTransfer) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_DATATRANSFER20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_DATATRANSFER_H \ No newline at end of file diff --git a/src/ocpp20/messages/DeleteCertificate20.cpp b/src/ocpp20/messages/DeleteCertificate20.cpp index ab2e9db0..74b13ad5 100644 --- a/src/ocpp20/messages/DeleteCertificate20.cpp +++ b/src/ocpp20/messages/DeleteCertificate20.cpp @@ -32,23 +32,23 @@ namespace messages namespace ocpp20 { -/** @brief Convert a DeleteCertificate20Req from a JSON representation */ -bool DeleteCertificate20ReqConverter::fromJson(const rapidjson::Value& json, - DeleteCertificate20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a DeleteCertificateReq from a JSON representation */ +bool DeleteCertificateReqConverter::fromJson(const rapidjson::Value& json, + DeleteCertificateReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // certificateHashData - ocpp::types::ocpp20::CertificateHashDataType20Converter certificateHashData_converter; + ocpp::types::ocpp20::CertificateHashDataTypeConverter certificateHashData_converter; ret = ret && certificateHashData_converter.fromJson(json["certificateHashData"], data.certificateHashData, error_code, error_message); if (!ret) @@ -59,15 +59,15 @@ bool DeleteCertificate20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a DeleteCertificate20Req to a JSON representation */ -bool DeleteCertificate20ReqConverter::toJson(const DeleteCertificate20Req& data, rapidjson::Document& json) +/** @brief Convert a DeleteCertificateReq to a JSON representation */ +bool DeleteCertificateReqConverter::toJson(const DeleteCertificateReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -76,7 +76,7 @@ bool DeleteCertificate20ReqConverter::toJson(const DeleteCertificate20Req& data, } // certificateHashData - ocpp::types::ocpp20::CertificateHashDataType20Converter certificateHashData_converter; + ocpp::types::ocpp20::CertificateHashDataTypeConverter certificateHashData_converter; certificateHashData_converter.setAllocator(allocator); rapidjson::Document certificateHashData_doc; certificateHashData_doc.Parse("{}"); @@ -86,28 +86,28 @@ bool DeleteCertificate20ReqConverter::toJson(const DeleteCertificate20Req& data, return ret; } -/** @brief Convert a DeleteCertificate20Conf from a JSON representation */ -bool DeleteCertificate20ConfConverter::fromJson(const rapidjson::Value& json, - DeleteCertificate20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a DeleteCertificateConf from a JSON representation */ +bool DeleteCertificateConfConverter::fromJson(const rapidjson::Value& json, + DeleteCertificateConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::DeleteCertificateStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::DeleteCertificateStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -119,15 +119,15 @@ bool DeleteCertificate20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a DeleteCertificate20Conf to a JSON representation */ -bool DeleteCertificate20ConfConverter::toJson(const DeleteCertificate20Conf& data, rapidjson::Document& json) +/** @brief Convert a DeleteCertificateConf to a JSON representation */ +bool DeleteCertificateConfConverter::toJson(const DeleteCertificateConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -136,12 +136,12 @@ bool DeleteCertificate20ConfConverter::toJson(const DeleteCertificate20Conf& dat } // status - fill(json, "status", ocpp::types::ocpp20::DeleteCertificateStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::DeleteCertificateStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/DeleteCertificate20.h b/src/ocpp20/messages/DeleteCertificate20.h index 3480b2db..53ea96e0 100644 --- a/src/ocpp20/messages/DeleteCertificate20.h +++ b/src/ocpp20/messages/DeleteCertificate20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_DELETECERTIFICATE20_H -#define OPENOCPP_DELETECERTIFICATE20_H +#ifndef OPENOCPP_OCPP20_DELETECERTIFICATE_H +#define OPENOCPP_OCPP20_DELETECERTIFICATE_H #include "IMessageConverter.h" @@ -38,34 +38,34 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the DeleteCertificate20 messages */ -static const std::string DELETECERTIFICATE20_ACTION = "DeleteCertificate"; +/** @brief Action corresponding to the DeleteCertificate messages */ +static const std::string DELETECERTIFICATE_ACTION = "DeleteCertificate"; -/** @brief DeleteCertificate20Req message */ -struct DeleteCertificate20Req +/** @brief DeleteCertificateReq message */ +struct DeleteCertificateReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::CertificateHashDataType20 certificateHashData; + ocpp::types::ocpp20::CertificateHashDataType certificateHashData; }; -/** @brief DeleteCertificate20Conf message */ -struct DeleteCertificate20Conf +/** @brief DeleteCertificateConf message */ +struct DeleteCertificateConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::DeleteCertificateStatusEnumType20 status; + ocpp::types::ocpp20::DeleteCertificateStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(DeleteCertificate20) +MESSAGE_CONVERTERS(DeleteCertificate) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_DELETECERTIFICATE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_DELETECERTIFICATE_H \ No newline at end of file diff --git a/src/ocpp20/messages/FirmwareStatusNotification20.cpp b/src/ocpp20/messages/FirmwareStatusNotification20.cpp index 44aa1b89..1d3cc89a 100644 --- a/src/ocpp20/messages/FirmwareStatusNotification20.cpp +++ b/src/ocpp20/messages/FirmwareStatusNotification20.cpp @@ -32,23 +32,23 @@ namespace messages namespace ocpp20 { -/** @brief Convert a FirmwareStatusNotification20Req from a JSON representation */ -bool FirmwareStatusNotification20ReqConverter::fromJson(const rapidjson::Value& json, - FirmwareStatusNotification20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a FirmwareStatusNotificationReq from a JSON representation */ +bool FirmwareStatusNotificationReqConverter::fromJson(const rapidjson::Value& json, + FirmwareStatusNotificationReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::FirmwareStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::FirmwareStatusEnumTypeHelper.fromString(json["status"].GetString()); // requestId extract(json, "requestId", data.requestId); @@ -61,15 +61,15 @@ bool FirmwareStatusNotification20ReqConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a FirmwareStatusNotification20Req to a JSON representation */ -bool FirmwareStatusNotification20ReqConverter::toJson(const FirmwareStatusNotification20Req& data, rapidjson::Document& json) +/** @brief Convert a FirmwareStatusNotificationReq to a JSON representation */ +bool FirmwareStatusNotificationReqConverter::toJson(const FirmwareStatusNotificationReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -78,7 +78,7 @@ bool FirmwareStatusNotification20ReqConverter::toJson(const FirmwareStatusNotifi } // status - fill(json, "status", ocpp::types::ocpp20::FirmwareStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::FirmwareStatusEnumTypeHelper.toString(data.status)); // requestId fill(json, "requestId", data.requestId); @@ -86,18 +86,18 @@ bool FirmwareStatusNotification20ReqConverter::toJson(const FirmwareStatusNotifi return ret; } -/** @brief Convert a FirmwareStatusNotification20Conf from a JSON representation */ -bool FirmwareStatusNotification20ConfConverter::fromJson(const rapidjson::Value& json, - FirmwareStatusNotification20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a FirmwareStatusNotificationConf from a JSON representation */ +bool FirmwareStatusNotificationConfConverter::fromJson(const rapidjson::Value& json, + FirmwareStatusNotificationConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -109,15 +109,15 @@ bool FirmwareStatusNotification20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a FirmwareStatusNotification20Conf to a JSON representation */ -bool FirmwareStatusNotification20ConfConverter::toJson(const FirmwareStatusNotification20Conf& data, rapidjson::Document& json) +/** @brief Convert a FirmwareStatusNotificationConf to a JSON representation */ +bool FirmwareStatusNotificationConfConverter::toJson(const FirmwareStatusNotificationConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/FirmwareStatusNotification20.h b/src/ocpp20/messages/FirmwareStatusNotification20.h index a8c2d087..b7b3da4e 100644 --- a/src/ocpp20/messages/FirmwareStatusNotification20.h +++ b/src/ocpp20/messages/FirmwareStatusNotification20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_FIRMWARESTATUSNOTIFICATION20_H -#define OPENOCPP_FIRMWARESTATUSNOTIFICATION20_H +#ifndef OPENOCPP_OCPP20_FIRMWARESTATUSNOTIFICATION_H +#define OPENOCPP_OCPP20_FIRMWARESTATUSNOTIFICATION_H #include "IMessageConverter.h" @@ -36,34 +36,34 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the FirmwareStatusNotification20 messages */ -static const std::string FIRMWARESTATUSNOTIFICATION20_ACTION = "FirmwareStatusNotification"; +/** @brief Action corresponding to the FirmwareStatusNotification messages */ +static const std::string FIRMWARESTATUSNOTIFICATION_ACTION = "FirmwareStatusNotification"; -/** @brief FirmwareStatusNotification20Req message */ -struct FirmwareStatusNotification20Req +/** @brief FirmwareStatusNotificationReq message */ +struct FirmwareStatusNotificationReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::FirmwareStatusEnumType20 status; + ocpp::types::ocpp20::FirmwareStatusEnumType status; /** @brief The request id that was provided in the UpdateFirmwareRequest that started this firmware update. This field is mandatory, unless the message was triggered by a TriggerMessageRequest AND there is no firmware update ongoing. */ ocpp::types::Optional requestId; }; -/** @brief FirmwareStatusNotification20Conf message */ -struct FirmwareStatusNotification20Conf +/** @brief FirmwareStatusNotificationConf message */ +struct FirmwareStatusNotificationConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(FirmwareStatusNotification20) +MESSAGE_CONVERTERS(FirmwareStatusNotification) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_FIRMWARESTATUSNOTIFICATION20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_FIRMWARESTATUSNOTIFICATION_H \ No newline at end of file diff --git a/src/ocpp20/messages/Get15118EVCertificate20.cpp b/src/ocpp20/messages/Get15118EVCertificate20.cpp index 91d3bc6c..59a59368 100644 --- a/src/ocpp20/messages/Get15118EVCertificate20.cpp +++ b/src/ocpp20/messages/Get15118EVCertificate20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a Get15118EVCertificate20Req from a JSON representation */ -bool Get15118EVCertificate20ReqConverter::fromJson(const rapidjson::Value& json, - Get15118EVCertificate20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a Get15118EVCertificateReq from a JSON representation */ +bool Get15118EVCertificateReqConverter::fromJson(const rapidjson::Value& json, + Get15118EVCertificateReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -51,7 +51,7 @@ bool Get15118EVCertificate20ReqConverter::fromJson(const rapidjson::Value& j extract(json, "iso15118SchemaVersion", data.iso15118SchemaVersion); // action - data.action = ocpp::types::ocpp20::CertificateActionEnumType20Helper.fromString(json["action"].GetString()); + data.action = ocpp::types::ocpp20::CertificateActionEnumTypeHelper.fromString(json["action"].GetString()); // exiRequest extract(json, "exiRequest", data.exiRequest); @@ -64,15 +64,15 @@ bool Get15118EVCertificate20ReqConverter::fromJson(const rapidjson::Value& j return ret; } -/** @brief Convert a Get15118EVCertificate20Req to a JSON representation */ -bool Get15118EVCertificate20ReqConverter::toJson(const Get15118EVCertificate20Req& data, rapidjson::Document& json) +/** @brief Convert a Get15118EVCertificateReq to a JSON representation */ +bool Get15118EVCertificateReqConverter::toJson(const Get15118EVCertificateReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -84,7 +84,7 @@ bool Get15118EVCertificate20ReqConverter::toJson(const Get15118EVCertificate20Re fill(json, "iso15118SchemaVersion", data.iso15118SchemaVersion); // action - fill(json, "action", ocpp::types::ocpp20::CertificateActionEnumType20Helper.toString(data.action)); + fill(json, "action", ocpp::types::ocpp20::CertificateActionEnumTypeHelper.toString(data.action)); // exiRequest fill(json, "exiRequest", data.exiRequest); @@ -92,28 +92,28 @@ bool Get15118EVCertificate20ReqConverter::toJson(const Get15118EVCertificate20Re return ret; } -/** @brief Convert a Get15118EVCertificate20Conf from a JSON representation */ -bool Get15118EVCertificate20ConfConverter::fromJson(const rapidjson::Value& json, - Get15118EVCertificate20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a Get15118EVCertificateConf from a JSON representation */ +bool Get15118EVCertificateConfConverter::fromJson(const rapidjson::Value& json, + Get15118EVCertificateConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::Iso15118EVCertificateStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::Iso15118EVCertificateStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -128,15 +128,15 @@ bool Get15118EVCertificate20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a Get15118EVCertificate20Conf to a JSON representation */ -bool Get15118EVCertificate20ConfConverter::toJson(const Get15118EVCertificate20Conf& data, rapidjson::Document& json) +/** @brief Convert a Get15118EVCertificateConf to a JSON representation */ +bool Get15118EVCertificateConfConverter::toJson(const Get15118EVCertificateConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -145,12 +145,12 @@ bool Get15118EVCertificate20ConfConverter::toJson(const Get15118EVCertificate20C } // status - fill(json, "status", ocpp::types::ocpp20::Iso15118EVCertificateStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::Iso15118EVCertificateStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/Get15118EVCertificate20.h b/src/ocpp20/messages/Get15118EVCertificate20.h index 94cf419a..88d5e6c4 100644 --- a/src/ocpp20/messages/Get15118EVCertificate20.h +++ b/src/ocpp20/messages/Get15118EVCertificate20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GET15118EVCERTIFICATE20_H -#define OPENOCPP_GET15118EVCERTIFICATE20_H +#ifndef OPENOCPP_OCPP20_GET15118EVCERTIFICATE_H +#define OPENOCPP_OCPP20_GET15118EVCERTIFICATE_H #include "IMessageConverter.h" @@ -38,40 +38,40 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the Get15118EVCertificate20 messages */ -static const std::string GET15118EVCERTIFICATE20_ACTION = "Get15118EVCertificate"; +/** @brief Action corresponding to the Get15118EVCertificate messages */ +static const std::string GET15118EVCERTIFICATE_ACTION = "Get15118EVCertificate"; -/** @brief Get15118EVCertificate20Req message */ -struct Get15118EVCertificate20Req +/** @brief Get15118EVCertificateReq message */ +struct Get15118EVCertificateReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Schema version currently used for the 15118 session between EV and Charging Station. Needed for parsing of the EXI stream by the CSMS. */ ocpp::types::CiStringType<50u> iso15118SchemaVersion; /** @brief */ - ocpp::types::ocpp20::CertificateActionEnumType20 action; + ocpp::types::ocpp20::CertificateActionEnumType action; /** @brief Raw CertificateInstallationReq request from EV, Base64 encoded. */ ocpp::types::CiStringType<5600u> exiRequest; }; -/** @brief Get15118EVCertificate20Conf message */ -struct Get15118EVCertificate20Conf +/** @brief Get15118EVCertificateConf message */ +struct Get15118EVCertificateConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::Iso15118EVCertificateStatusEnumType20 status; + ocpp::types::ocpp20::Iso15118EVCertificateStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; /** @brief Raw CertificateInstallationRes response for the EV, Base64 encoded. */ ocpp::types::CiStringType<5600u> exiResponse; }; // Message converters -MESSAGE_CONVERTERS(Get15118EVCertificate20) +MESSAGE_CONVERTERS(Get15118EVCertificate) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GET15118EVCERTIFICATE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GET15118EVCERTIFICATE_H \ No newline at end of file diff --git a/src/ocpp20/messages/GetBaseReport20.cpp b/src/ocpp20/messages/GetBaseReport20.cpp index 4766b9ed..5694e3fa 100644 --- a/src/ocpp20/messages/GetBaseReport20.cpp +++ b/src/ocpp20/messages/GetBaseReport20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a GetBaseReport20Req from a JSON representation */ -bool GetBaseReport20ReqConverter::fromJson(const rapidjson::Value& json, - GetBaseReport20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetBaseReportReq from a JSON representation */ +bool GetBaseReportReqConverter::fromJson(const rapidjson::Value& json, + GetBaseReportReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -51,7 +51,7 @@ bool GetBaseReport20ReqConverter::fromJson(const rapidjson::Value& json, extract(json, "requestId", data.requestId); // reportBase - data.reportBase = ocpp::types::ocpp20::ReportBaseEnumType20Helper.fromString(json["reportBase"].GetString()); + data.reportBase = ocpp::types::ocpp20::ReportBaseEnumTypeHelper.fromString(json["reportBase"].GetString()); if (!ret) { @@ -61,15 +61,15 @@ bool GetBaseReport20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a GetBaseReport20Req to a JSON representation */ -bool GetBaseReport20ReqConverter::toJson(const GetBaseReport20Req& data, rapidjson::Document& json) +/** @brief Convert a GetBaseReportReq to a JSON representation */ +bool GetBaseReportReqConverter::toJson(const GetBaseReportReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -81,33 +81,33 @@ bool GetBaseReport20ReqConverter::toJson(const GetBaseReport20Req& data, rapidjs fill(json, "requestId", data.requestId); // reportBase - fill(json, "reportBase", ocpp::types::ocpp20::ReportBaseEnumType20Helper.toString(data.reportBase)); + fill(json, "reportBase", ocpp::types::ocpp20::ReportBaseEnumTypeHelper.toString(data.reportBase)); return ret; } -/** @brief Convert a GetBaseReport20Conf from a JSON representation */ -bool GetBaseReport20ConfConverter::fromJson(const rapidjson::Value& json, - GetBaseReport20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetBaseReportConf from a JSON representation */ +bool GetBaseReportConfConverter::fromJson(const rapidjson::Value& json, + GetBaseReportConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GenericDeviceModelStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GenericDeviceModelStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -119,15 +119,15 @@ bool GetBaseReport20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a GetBaseReport20Conf to a JSON representation */ -bool GetBaseReport20ConfConverter::toJson(const GetBaseReport20Conf& data, rapidjson::Document& json) +/** @brief Convert a GetBaseReportConf to a JSON representation */ +bool GetBaseReportConfConverter::toJson(const GetBaseReportConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -136,12 +136,12 @@ bool GetBaseReport20ConfConverter::toJson(const GetBaseReport20Conf& data, rapid } // status - fill(json, "status", ocpp::types::ocpp20::GenericDeviceModelStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GenericDeviceModelStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/GetBaseReport20.h b/src/ocpp20/messages/GetBaseReport20.h index b4654a30..52e2161a 100644 --- a/src/ocpp20/messages/GetBaseReport20.h +++ b/src/ocpp20/messages/GetBaseReport20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETBASEREPORT20_H -#define OPENOCPP_GETBASEREPORT20_H +#ifndef OPENOCPP_OCPP20_GETBASEREPORT_H +#define OPENOCPP_OCPP20_GETBASEREPORT_H #include "IMessageConverter.h" @@ -38,36 +38,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the GetBaseReport20 messages */ -static const std::string GETBASEREPORT20_ACTION = "GetBaseReport"; +/** @brief Action corresponding to the GetBaseReport messages */ +static const std::string GETBASEREPORT_ACTION = "GetBaseReport"; -/** @brief GetBaseReport20Req message */ -struct GetBaseReport20Req +/** @brief GetBaseReportReq message */ +struct GetBaseReportReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief The Id of the request. */ int requestId; /** @brief */ - ocpp::types::ocpp20::ReportBaseEnumType20 reportBase; + ocpp::types::ocpp20::ReportBaseEnumType reportBase; }; -/** @brief GetBaseReport20Conf message */ -struct GetBaseReport20Conf +/** @brief GetBaseReportConf message */ +struct GetBaseReportConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GenericDeviceModelStatusEnumType20 status; + ocpp::types::ocpp20::GenericDeviceModelStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(GetBaseReport20) +MESSAGE_CONVERTERS(GetBaseReport) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GETBASEREPORT20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETBASEREPORT_H \ No newline at end of file diff --git a/src/ocpp20/messages/GetCertificateStatus20.cpp b/src/ocpp20/messages/GetCertificateStatus20.cpp index bc936f65..a16e9052 100644 --- a/src/ocpp20/messages/GetCertificateStatus20.cpp +++ b/src/ocpp20/messages/GetCertificateStatus20.cpp @@ -32,23 +32,23 @@ namespace messages namespace ocpp20 { -/** @brief Convert a GetCertificateStatus20Req from a JSON representation */ -bool GetCertificateStatus20ReqConverter::fromJson(const rapidjson::Value& json, - GetCertificateStatus20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetCertificateStatusReq from a JSON representation */ +bool GetCertificateStatusReqConverter::fromJson(const rapidjson::Value& json, + GetCertificateStatusReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // ocspRequestData - ocpp::types::ocpp20::OCSPRequestDataType20Converter ocspRequestData_converter; + ocpp::types::ocpp20::OCSPRequestDataTypeConverter ocspRequestData_converter; ret = ret && ocspRequestData_converter.fromJson(json["ocspRequestData"], data.ocspRequestData, error_code, error_message); if (!ret) @@ -59,15 +59,15 @@ bool GetCertificateStatus20ReqConverter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a GetCertificateStatus20Req to a JSON representation */ -bool GetCertificateStatus20ReqConverter::toJson(const GetCertificateStatus20Req& data, rapidjson::Document& json) +/** @brief Convert a GetCertificateStatusReq to a JSON representation */ +bool GetCertificateStatusReqConverter::toJson(const GetCertificateStatusReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -76,7 +76,7 @@ bool GetCertificateStatus20ReqConverter::toJson(const GetCertificateStatus20Req& } // ocspRequestData - ocpp::types::ocpp20::OCSPRequestDataType20Converter ocspRequestData_converter; + ocpp::types::ocpp20::OCSPRequestDataTypeConverter ocspRequestData_converter; ocspRequestData_converter.setAllocator(allocator); rapidjson::Document ocspRequestData_doc; ocspRequestData_doc.Parse("{}"); @@ -86,28 +86,28 @@ bool GetCertificateStatus20ReqConverter::toJson(const GetCertificateStatus20Req& return ret; } -/** @brief Convert a GetCertificateStatus20Conf from a JSON representation */ -bool GetCertificateStatus20ConfConverter::fromJson(const rapidjson::Value& json, - GetCertificateStatus20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetCertificateStatusConf from a JSON representation */ +bool GetCertificateStatusConfConverter::fromJson(const rapidjson::Value& json, + GetCertificateStatusConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GetCertificateStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GetCertificateStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -122,15 +122,15 @@ bool GetCertificateStatus20ConfConverter::fromJson(const rapidjson::Value& j return ret; } -/** @brief Convert a GetCertificateStatus20Conf to a JSON representation */ -bool GetCertificateStatus20ConfConverter::toJson(const GetCertificateStatus20Conf& data, rapidjson::Document& json) +/** @brief Convert a GetCertificateStatusConf to a JSON representation */ +bool GetCertificateStatusConfConverter::toJson(const GetCertificateStatusConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -139,12 +139,12 @@ bool GetCertificateStatus20ConfConverter::toJson(const GetCertificateStatus20Con } // status - fill(json, "status", ocpp::types::ocpp20::GetCertificateStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GetCertificateStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/GetCertificateStatus20.h b/src/ocpp20/messages/GetCertificateStatus20.h index aacac032..b9b6ed3c 100644 --- a/src/ocpp20/messages/GetCertificateStatus20.h +++ b/src/ocpp20/messages/GetCertificateStatus20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETCERTIFICATESTATUS20_H -#define OPENOCPP_GETCERTIFICATESTATUS20_H +#ifndef OPENOCPP_OCPP20_GETCERTIFICATESTATUS_H +#define OPENOCPP_OCPP20_GETCERTIFICATESTATUS_H #include "IMessageConverter.h" @@ -38,36 +38,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the GetCertificateStatus20 messages */ -static const std::string GETCERTIFICATESTATUS20_ACTION = "GetCertificateStatus"; +/** @brief Action corresponding to the GetCertificateStatus messages */ +static const std::string GETCERTIFICATESTATUS_ACTION = "GetCertificateStatus"; -/** @brief GetCertificateStatus20Req message */ -struct GetCertificateStatus20Req +/** @brief GetCertificateStatusReq message */ +struct GetCertificateStatusReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::OCSPRequestDataType20 ocspRequestData; + ocpp::types::ocpp20::OCSPRequestDataType ocspRequestData; }; -/** @brief GetCertificateStatus20Conf message */ -struct GetCertificateStatus20Conf +/** @brief GetCertificateStatusConf message */ +struct GetCertificateStatusConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GetCertificateStatusEnumType20 status; + ocpp::types::ocpp20::GetCertificateStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; /** @brief OCSPResponse class as defined in <<ref-ocpp_security_24, IETF RFC 6960>>. DER encoded (as defined in <<ref-ocpp_security_24, IETF RFC 6960>>), and then base64 encoded. MAY only be omitted when status is not Accepted. */ ocpp::types::Optional> ocspResult; }; // Message converters -MESSAGE_CONVERTERS(GetCertificateStatus20) +MESSAGE_CONVERTERS(GetCertificateStatus) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GETCERTIFICATESTATUS20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETCERTIFICATESTATUS_H \ No newline at end of file diff --git a/src/ocpp20/messages/GetChargingProfiles20.cpp b/src/ocpp20/messages/GetChargingProfiles20.cpp index dfeb4b52..865abf42 100644 --- a/src/ocpp20/messages/GetChargingProfiles20.cpp +++ b/src/ocpp20/messages/GetChargingProfiles20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a GetChargingProfiles20Req from a JSON representation */ -bool GetChargingProfiles20ReqConverter::fromJson(const rapidjson::Value& json, - GetChargingProfiles20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetChargingProfilesReq from a JSON representation */ +bool GetChargingProfilesReqConverter::fromJson(const rapidjson::Value& json, + GetChargingProfilesReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -54,7 +54,7 @@ bool GetChargingProfiles20ReqConverter::fromJson(const rapidjson::Value& json, extract(json, "evseId", data.evseId); // chargingProfile - ocpp::types::ocpp20::ChargingProfileCriterionType20Converter chargingProfile_converter; + ocpp::types::ocpp20::ChargingProfileCriterionTypeConverter chargingProfile_converter; ret = ret && chargingProfile_converter.fromJson(json["chargingProfile"], data.chargingProfile, error_code, error_message); if (!ret) @@ -65,15 +65,15 @@ bool GetChargingProfiles20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a GetChargingProfiles20Req to a JSON representation */ -bool GetChargingProfiles20ReqConverter::toJson(const GetChargingProfiles20Req& data, rapidjson::Document& json) +/** @brief Convert a GetChargingProfilesReq to a JSON representation */ +bool GetChargingProfilesReqConverter::toJson(const GetChargingProfilesReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -88,7 +88,7 @@ bool GetChargingProfiles20ReqConverter::toJson(const GetChargingProfiles20Req& d fill(json, "evseId", data.evseId); // chargingProfile - ocpp::types::ocpp20::ChargingProfileCriterionType20Converter chargingProfile_converter; + ocpp::types::ocpp20::ChargingProfileCriterionTypeConverter chargingProfile_converter; chargingProfile_converter.setAllocator(allocator); rapidjson::Document chargingProfile_doc; chargingProfile_doc.Parse("{}"); @@ -98,28 +98,28 @@ bool GetChargingProfiles20ReqConverter::toJson(const GetChargingProfiles20Req& d return ret; } -/** @brief Convert a GetChargingProfiles20Conf from a JSON representation */ -bool GetChargingProfiles20ConfConverter::fromJson(const rapidjson::Value& json, - GetChargingProfiles20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetChargingProfilesConf from a JSON representation */ +bool GetChargingProfilesConfConverter::fromJson(const rapidjson::Value& json, + GetChargingProfilesConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GetChargingProfileStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GetChargingProfileStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -131,15 +131,15 @@ bool GetChargingProfiles20ConfConverter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a GetChargingProfiles20Conf to a JSON representation */ -bool GetChargingProfiles20ConfConverter::toJson(const GetChargingProfiles20Conf& data, rapidjson::Document& json) +/** @brief Convert a GetChargingProfilesConf to a JSON representation */ +bool GetChargingProfilesConfConverter::toJson(const GetChargingProfilesConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -148,12 +148,12 @@ bool GetChargingProfiles20ConfConverter::toJson(const GetChargingProfiles20Conf& } // status - fill(json, "status", ocpp::types::ocpp20::GetChargingProfileStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GetChargingProfileStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/GetChargingProfiles20.h b/src/ocpp20/messages/GetChargingProfiles20.h index ffded4b4..a5a93282 100644 --- a/src/ocpp20/messages/GetChargingProfiles20.h +++ b/src/ocpp20/messages/GetChargingProfiles20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETCHARGINGPROFILES20_H -#define OPENOCPP_GETCHARGINGPROFILES20_H +#ifndef OPENOCPP_OCPP20_GETCHARGINGPROFILES_H +#define OPENOCPP_OCPP20_GETCHARGINGPROFILES_H #include "IMessageConverter.h" @@ -38,38 +38,38 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the GetChargingProfiles20 messages */ -static const std::string GETCHARGINGPROFILES20_ACTION = "GetChargingProfiles"; +/** @brief Action corresponding to the GetChargingProfiles messages */ +static const std::string GETCHARGINGPROFILES_ACTION = "GetChargingProfiles"; -/** @brief GetChargingProfiles20Req message */ -struct GetChargingProfiles20Req +/** @brief GetChargingProfilesReq message */ +struct GetChargingProfilesReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Reference identification that is to be used by the Charging Station in the <<reportchargingprofilesrequest, ReportChargingProfilesRequest>> when provided. */ int requestId; /** @brief For which EVSE installed charging profiles SHALL be reported. If 0, only charging profiles installed on the Charging Station itself (the grid connection) SHALL be reported. If omitted, all installed charging profiles SHALL be reported. */ ocpp::types::Optional evseId; /** @brief */ - ocpp::types::ocpp20::ChargingProfileCriterionType20 chargingProfile; + ocpp::types::ocpp20::ChargingProfileCriterionType chargingProfile; }; -/** @brief GetChargingProfiles20Conf message */ -struct GetChargingProfiles20Conf +/** @brief GetChargingProfilesConf message */ +struct GetChargingProfilesConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GetChargingProfileStatusEnumType20 status; + ocpp::types::ocpp20::GetChargingProfileStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(GetChargingProfiles20) +MESSAGE_CONVERTERS(GetChargingProfiles) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GETCHARGINGPROFILES20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETCHARGINGPROFILES_H \ No newline at end of file diff --git a/src/ocpp20/messages/GetCompositeSchedule20.cpp b/src/ocpp20/messages/GetCompositeSchedule20.cpp index ebd50f0c..31d922ae 100644 --- a/src/ocpp20/messages/GetCompositeSchedule20.cpp +++ b/src/ocpp20/messages/GetCompositeSchedule20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a GetCompositeSchedule20Req from a JSON representation */ -bool GetCompositeSchedule20ReqConverter::fromJson(const rapidjson::Value& json, - GetCompositeSchedule20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetCompositeScheduleReq from a JSON representation */ +bool GetCompositeScheduleReqConverter::fromJson(const rapidjson::Value& json, + GetCompositeScheduleReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -53,7 +53,7 @@ bool GetCompositeSchedule20ReqConverter::fromJson(const rapidjson::Value& jso // chargingRateUnit if (json.HasMember("chargingRateUnit")) { - data.chargingRateUnit = ocpp::types::ocpp20::ChargingRateUnitEnumType20Helper.fromString(json["chargingRateUnit"].GetString()); + data.chargingRateUnit = ocpp::types::ocpp20::ChargingRateUnitEnumTypeHelper.fromString(json["chargingRateUnit"].GetString()); } // evseId @@ -67,15 +67,15 @@ bool GetCompositeSchedule20ReqConverter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a GetCompositeSchedule20Req to a JSON representation */ -bool GetCompositeSchedule20ReqConverter::toJson(const GetCompositeSchedule20Req& data, rapidjson::Document& json) +/** @brief Convert a GetCompositeScheduleReq to a JSON representation */ +bool GetCompositeScheduleReqConverter::toJson(const GetCompositeScheduleReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -89,7 +89,7 @@ bool GetCompositeSchedule20ReqConverter::toJson(const GetCompositeSchedule20Req& // chargingRateUnit if (data.chargingRateUnit.isSet()) { - fill(json, "chargingRateUnit", ocpp::types::ocpp20::ChargingRateUnitEnumType20Helper.toString(data.chargingRateUnit)); + fill(json, "chargingRateUnit", ocpp::types::ocpp20::ChargingRateUnitEnumTypeHelper.toString(data.chargingRateUnit)); } // evseId @@ -98,35 +98,35 @@ bool GetCompositeSchedule20ReqConverter::toJson(const GetCompositeSchedule20Req& return ret; } -/** @brief Convert a GetCompositeSchedule20Conf from a JSON representation */ -bool GetCompositeSchedule20ConfConverter::fromJson(const rapidjson::Value& json, - GetCompositeSchedule20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetCompositeScheduleConf from a JSON representation */ +bool GetCompositeScheduleConfConverter::fromJson(const rapidjson::Value& json, + GetCompositeScheduleConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GenericStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GenericStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } // schedule if (json.HasMember("schedule")) { - ocpp::types::ocpp20::CompositeScheduleType20Converter schedule_converter; + ocpp::types::ocpp20::CompositeScheduleTypeConverter schedule_converter; ret = ret && schedule_converter.fromJson(json["schedule"], data.schedule, error_code, error_message); } @@ -138,15 +138,15 @@ bool GetCompositeSchedule20ConfConverter::fromJson(const rapidjson::Value& j return ret; } -/** @brief Convert a GetCompositeSchedule20Conf to a JSON representation */ -bool GetCompositeSchedule20ConfConverter::toJson(const GetCompositeSchedule20Conf& data, rapidjson::Document& json) +/** @brief Convert a GetCompositeScheduleConf to a JSON representation */ +bool GetCompositeScheduleConfConverter::toJson(const GetCompositeScheduleConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -155,12 +155,12 @@ bool GetCompositeSchedule20ConfConverter::toJson(const GetCompositeSchedule20Con } // status - fill(json, "status", ocpp::types::ocpp20::GenericStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GenericStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); @@ -171,7 +171,7 @@ bool GetCompositeSchedule20ConfConverter::toJson(const GetCompositeSchedule20Con // schedule if (data.schedule.isSet()) { - ocpp::types::ocpp20::CompositeScheduleType20Converter schedule_converter; + ocpp::types::ocpp20::CompositeScheduleTypeConverter schedule_converter; schedule_converter.setAllocator(allocator); rapidjson::Document schedule_doc; schedule_doc.Parse("{}"); diff --git a/src/ocpp20/messages/GetCompositeSchedule20.h b/src/ocpp20/messages/GetCompositeSchedule20.h index 1712fc5d..b898477e 100644 --- a/src/ocpp20/messages/GetCompositeSchedule20.h +++ b/src/ocpp20/messages/GetCompositeSchedule20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETCOMPOSITESCHEDULE20_H -#define OPENOCPP_GETCOMPOSITESCHEDULE20_H +#ifndef OPENOCPP_OCPP20_GETCOMPOSITESCHEDULE_H +#define OPENOCPP_OCPP20_GETCOMPOSITESCHEDULE_H #include "IMessageConverter.h" @@ -39,40 +39,40 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the GetCompositeSchedule20 messages */ -static const std::string GETCOMPOSITESCHEDULE20_ACTION = "GetCompositeSchedule"; +/** @brief Action corresponding to the GetCompositeSchedule messages */ +static const std::string GETCOMPOSITESCHEDULE_ACTION = "GetCompositeSchedule"; -/** @brief GetCompositeSchedule20Req message */ -struct GetCompositeSchedule20Req +/** @brief GetCompositeScheduleReq message */ +struct GetCompositeScheduleReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Length of the requested schedule in seconds. */ int duration; /** @brief */ - ocpp::types::Optional chargingRateUnit; + ocpp::types::Optional chargingRateUnit; /** @brief The ID of the EVSE for which the schedule is requested. When evseid=0, the Charging Station will calculate the expected consumption for the grid connection. */ int evseId; }; -/** @brief GetCompositeSchedule20Conf message */ -struct GetCompositeSchedule20Conf +/** @brief GetCompositeScheduleConf message */ +struct GetCompositeScheduleConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GenericStatusEnumType20 status; + ocpp::types::ocpp20::GenericStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; /** @brief */ - ocpp::types::Optional schedule; + ocpp::types::Optional schedule; }; // Message converters -MESSAGE_CONVERTERS(GetCompositeSchedule20) +MESSAGE_CONVERTERS(GetCompositeSchedule) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GETCOMPOSITESCHEDULE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETCOMPOSITESCHEDULE_H \ No newline at end of file diff --git a/src/ocpp20/messages/GetDisplayMessages20.cpp b/src/ocpp20/messages/GetDisplayMessages20.cpp index 0b4900d2..2a65850c 100644 --- a/src/ocpp20/messages/GetDisplayMessages20.cpp +++ b/src/ocpp20/messages/GetDisplayMessages20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a GetDisplayMessages20Req from a JSON representation */ -bool GetDisplayMessages20ReqConverter::fromJson(const rapidjson::Value& json, - GetDisplayMessages20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetDisplayMessagesReq from a JSON representation */ +bool GetDisplayMessagesReqConverter::fromJson(const rapidjson::Value& json, + GetDisplayMessagesReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -64,13 +64,13 @@ bool GetDisplayMessages20ReqConverter::fromJson(const rapidjson::Value& json, // priority if (json.HasMember("priority")) { - data.priority = ocpp::types::ocpp20::MessagePriorityEnumType20Helper.fromString(json["priority"].GetString()); + data.priority = ocpp::types::ocpp20::MessagePriorityEnumTypeHelper.fromString(json["priority"].GetString()); } // state if (json.HasMember("state")) { - data.state = ocpp::types::ocpp20::MessageStateEnumType20Helper.fromString(json["state"].GetString()); + data.state = ocpp::types::ocpp20::MessageStateEnumTypeHelper.fromString(json["state"].GetString()); } if (!ret) @@ -81,15 +81,15 @@ bool GetDisplayMessages20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a GetDisplayMessages20Req to a JSON representation */ -bool GetDisplayMessages20ReqConverter::toJson(const GetDisplayMessages20Req& data, rapidjson::Document& json) +/** @brief Convert a GetDisplayMessagesReq to a JSON representation */ +bool GetDisplayMessagesReqConverter::toJson(const GetDisplayMessagesReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -115,40 +115,40 @@ bool GetDisplayMessages20ReqConverter::toJson(const GetDisplayMessages20Req& dat // priority if (data.priority.isSet()) { - fill(json, "priority", ocpp::types::ocpp20::MessagePriorityEnumType20Helper.toString(data.priority)); + fill(json, "priority", ocpp::types::ocpp20::MessagePriorityEnumTypeHelper.toString(data.priority)); } // state if (data.state.isSet()) { - fill(json, "state", ocpp::types::ocpp20::MessageStateEnumType20Helper.toString(data.state)); + fill(json, "state", ocpp::types::ocpp20::MessageStateEnumTypeHelper.toString(data.state)); } return ret; } -/** @brief Convert a GetDisplayMessages20Conf from a JSON representation */ -bool GetDisplayMessages20ConfConverter::fromJson(const rapidjson::Value& json, - GetDisplayMessages20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetDisplayMessagesConf from a JSON representation */ +bool GetDisplayMessagesConfConverter::fromJson(const rapidjson::Value& json, + GetDisplayMessagesConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GetDisplayMessagesStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GetDisplayMessagesStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -160,15 +160,15 @@ bool GetDisplayMessages20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a GetDisplayMessages20Conf to a JSON representation */ -bool GetDisplayMessages20ConfConverter::toJson(const GetDisplayMessages20Conf& data, rapidjson::Document& json) +/** @brief Convert a GetDisplayMessagesConf to a JSON representation */ +bool GetDisplayMessagesConfConverter::toJson(const GetDisplayMessagesConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -177,12 +177,12 @@ bool GetDisplayMessages20ConfConverter::toJson(const GetDisplayMessages20Conf& d } // status - fill(json, "status", ocpp::types::ocpp20::GetDisplayMessagesStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GetDisplayMessagesStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/GetDisplayMessages20.h b/src/ocpp20/messages/GetDisplayMessages20.h index 15e07685..b6eb1df6 100644 --- a/src/ocpp20/messages/GetDisplayMessages20.h +++ b/src/ocpp20/messages/GetDisplayMessages20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETDISPLAYMESSAGES20_H -#define OPENOCPP_GETDISPLAYMESSAGES20_H +#ifndef OPENOCPP_OCPP20_GETDISPLAYMESSAGES_H +#define OPENOCPP_OCPP20_GETDISPLAYMESSAGES_H #include "IMessageConverter.h" @@ -39,40 +39,40 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the GetDisplayMessages20 messages */ -static const std::string GETDISPLAYMESSAGES20_ACTION = "GetDisplayMessages"; +/** @brief Action corresponding to the GetDisplayMessages messages */ +static const std::string GETDISPLAYMESSAGES_ACTION = "GetDisplayMessages"; -/** @brief GetDisplayMessages20Req message */ -struct GetDisplayMessages20Req +/** @brief GetDisplayMessagesReq message */ +struct GetDisplayMessagesReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief If provided the Charging Station shall return Display Messages of the given ids. This field SHALL NOT contain more ids than set in <<configkey-number-of-display-messages,NumberOfDisplayMessages.maxLimit>> */ std::vector id; /** @brief The Id of this request. */ int requestId; /** @brief */ - ocpp::types::Optional priority; + ocpp::types::Optional priority; /** @brief */ - ocpp::types::Optional state; + ocpp::types::Optional state; }; -/** @brief GetDisplayMessages20Conf message */ -struct GetDisplayMessages20Conf +/** @brief GetDisplayMessagesConf message */ +struct GetDisplayMessagesConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GetDisplayMessagesStatusEnumType20 status; + ocpp::types::ocpp20::GetDisplayMessagesStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(GetDisplayMessages20) +MESSAGE_CONVERTERS(GetDisplayMessages) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GETDISPLAYMESSAGES20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETDISPLAYMESSAGES_H \ No newline at end of file diff --git a/src/ocpp20/messages/GetInstalledCertificateIds20.cpp b/src/ocpp20/messages/GetInstalledCertificateIds20.cpp index 387668ce..aa8df396 100644 --- a/src/ocpp20/messages/GetInstalledCertificateIds20.cpp +++ b/src/ocpp20/messages/GetInstalledCertificateIds20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a GetInstalledCertificateIds20Req from a JSON representation */ -bool GetInstalledCertificateIds20ReqConverter::fromJson(const rapidjson::Value& json, - GetInstalledCertificateIds20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetInstalledCertificateIdsReq from a JSON representation */ +bool GetInstalledCertificateIdsReqConverter::fromJson(const rapidjson::Value& json, + GetInstalledCertificateIdsReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -53,8 +53,8 @@ bool GetInstalledCertificateIds20ReqConverter::fromJson(const rapidjson::Value& const rapidjson::Value& certificateType_json = json["certificateType"]; for (auto it = certificateType_json.Begin(); ret && (it != certificateType_json.End()); ++it) { - ocpp::types::ocpp20::GetCertificateIdUseEnumType20& item = data.certificateType.emplace_back(); - item = ocpp::types::ocpp20::GetCertificateIdUseEnumType20Helper.fromString(it->GetString()); + ocpp::types::ocpp20::GetCertificateIdUseEnumType& item = data.certificateType.emplace_back(); + item = ocpp::types::ocpp20::GetCertificateIdUseEnumTypeHelper.fromString(it->GetString()); } } @@ -66,15 +66,15 @@ bool GetInstalledCertificateIds20ReqConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a GetInstalledCertificateIds20Req to a JSON representation */ -bool GetInstalledCertificateIds20ReqConverter::toJson(const GetInstalledCertificateIds20Req& data, rapidjson::Document& json) +/** @brief Convert a GetInstalledCertificateIdsReq to a JSON representation */ +bool GetInstalledCertificateIdsReqConverter::toJson(const GetInstalledCertificateIdsReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -87,10 +87,10 @@ bool GetInstalledCertificateIds20ReqConverter::toJson(const GetInstalledCertific { rapidjson::Value certificateType_json(rapidjson::kArrayType); - for (const ocpp::types::ocpp20::GetCertificateIdUseEnumType20& item : data.certificateType) + for (const ocpp::types::ocpp20::GetCertificateIdUseEnumType& item : data.certificateType) { certificateType_json.PushBack( - rapidjson::Value(ocpp::types::ocpp20::GetCertificateIdUseEnumType20Helper.toString(item).c_str(), *allocator).Move(), + rapidjson::Value(ocpp::types::ocpp20::GetCertificateIdUseEnumTypeHelper.toString(item).c_str(), *allocator).Move(), *allocator); } json.AddMember(rapidjson::StringRef("certificateType"), certificateType_json.Move(), *allocator); @@ -99,39 +99,39 @@ bool GetInstalledCertificateIds20ReqConverter::toJson(const GetInstalledCertific return ret; } -/** @brief Convert a GetInstalledCertificateIds20Conf from a JSON representation */ -bool GetInstalledCertificateIds20ConfConverter::fromJson(const rapidjson::Value& json, - GetInstalledCertificateIds20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetInstalledCertificateIdsConf from a JSON representation */ +bool GetInstalledCertificateIdsConfConverter::fromJson(const rapidjson::Value& json, + GetInstalledCertificateIdsConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GetInstalledCertificateStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GetInstalledCertificateStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } // certificateHashDataChain if (json.HasMember("certificateHashDataChain")) { - const rapidjson::Value& certificateHashDataChain_json = json["certificateHashDataChain"]; - ocpp::types::ocpp20::CertificateHashDataChainType20Converter certificateHashDataChain_converter; + const rapidjson::Value& certificateHashDataChain_json = json["certificateHashDataChain"]; + ocpp::types::ocpp20::CertificateHashDataChainTypeConverter certificateHashDataChain_converter; for (auto it = certificateHashDataChain_json.Begin(); ret && (it != certificateHashDataChain_json.End()); ++it) { - ocpp::types::ocpp20::CertificateHashDataChainType20& item = data.certificateHashDataChain.emplace_back(); + ocpp::types::ocpp20::CertificateHashDataChainType& item = data.certificateHashDataChain.emplace_back(); ret = ret && certificateHashDataChain_converter.fromJson(*it, item, error_code, error_message); } } @@ -144,15 +144,15 @@ bool GetInstalledCertificateIds20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a GetInstalledCertificateIds20Conf to a JSON representation */ -bool GetInstalledCertificateIds20ConfConverter::toJson(const GetInstalledCertificateIds20Conf& data, rapidjson::Document& json) +/** @brief Convert a GetInstalledCertificateIdsConf to a JSON representation */ +bool GetInstalledCertificateIdsConfConverter::toJson(const GetInstalledCertificateIdsConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -161,12 +161,12 @@ bool GetInstalledCertificateIds20ConfConverter::toJson(const GetInstalledCertifi } // status - fill(json, "status", ocpp::types::ocpp20::GetInstalledCertificateStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GetInstalledCertificateStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); @@ -178,10 +178,10 @@ bool GetInstalledCertificateIds20ConfConverter::toJson(const GetInstalledCertifi if (!data.certificateHashDataChain.empty()) { - rapidjson::Value certificateHashDataChain_json(rapidjson::kArrayType); - ocpp::types::ocpp20::CertificateHashDataChainType20Converter certificateHashDataChain_converter; + rapidjson::Value certificateHashDataChain_json(rapidjson::kArrayType); + ocpp::types::ocpp20::CertificateHashDataChainTypeConverter certificateHashDataChain_converter; certificateHashDataChain_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::CertificateHashDataChainType20& item : data.certificateHashDataChain) + for (const ocpp::types::ocpp20::CertificateHashDataChainType& item : data.certificateHashDataChain) { rapidjson::Document item_doc; item_doc.Parse("{}"); diff --git a/src/ocpp20/messages/GetInstalledCertificateIds20.h b/src/ocpp20/messages/GetInstalledCertificateIds20.h index 6327dfda..e32f473a 100644 --- a/src/ocpp20/messages/GetInstalledCertificateIds20.h +++ b/src/ocpp20/messages/GetInstalledCertificateIds20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETINSTALLEDCERTIFICATEIDS20_H -#define OPENOCPP_GETINSTALLEDCERTIFICATEIDS20_H +#ifndef OPENOCPP_OCPP20_GETINSTALLEDCERTIFICATEIDS_H +#define OPENOCPP_OCPP20_GETINSTALLEDCERTIFICATEIDS_H #include "IMessageConverter.h" @@ -39,36 +39,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the GetInstalledCertificateIds20 messages */ -static const std::string GETINSTALLEDCERTIFICATEIDS20_ACTION = "GetInstalledCertificateIds"; +/** @brief Action corresponding to the GetInstalledCertificateIds messages */ +static const std::string GETINSTALLEDCERTIFICATEIDS_ACTION = "GetInstalledCertificateIds"; -/** @brief GetInstalledCertificateIds20Req message */ -struct GetInstalledCertificateIds20Req +/** @brief GetInstalledCertificateIdsReq message */ +struct GetInstalledCertificateIdsReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Indicates the type of certificates requested. When omitted, all certificate types are requested. */ - std::vector certificateType; + std::vector certificateType; }; -/** @brief GetInstalledCertificateIds20Conf message */ -struct GetInstalledCertificateIds20Conf +/** @brief GetInstalledCertificateIdsConf message */ +struct GetInstalledCertificateIdsConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GetInstalledCertificateStatusEnumType20 status; + ocpp::types::ocpp20::GetInstalledCertificateStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; /** @brief */ - std::vector certificateHashDataChain; + std::vector certificateHashDataChain; }; // Message converters -MESSAGE_CONVERTERS(GetInstalledCertificateIds20) +MESSAGE_CONVERTERS(GetInstalledCertificateIds) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GETINSTALLEDCERTIFICATEIDS20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETINSTALLEDCERTIFICATEIDS_H \ No newline at end of file diff --git a/src/ocpp20/messages/GetLocalListVersion20.cpp b/src/ocpp20/messages/GetLocalListVersion20.cpp index 8e0eb4ef..6cc6c15d 100644 --- a/src/ocpp20/messages/GetLocalListVersion20.cpp +++ b/src/ocpp20/messages/GetLocalListVersion20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a GetLocalListVersion20Req from a JSON representation */ -bool GetLocalListVersion20ReqConverter::fromJson(const rapidjson::Value& json, - GetLocalListVersion20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetLocalListVersionReq from a JSON representation */ +bool GetLocalListVersionReqConverter::fromJson(const rapidjson::Value& json, + GetLocalListVersionReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -55,15 +55,15 @@ bool GetLocalListVersion20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a GetLocalListVersion20Req to a JSON representation */ -bool GetLocalListVersion20ReqConverter::toJson(const GetLocalListVersion20Req& data, rapidjson::Document& json) +/** @brief Convert a GetLocalListVersionReq to a JSON representation */ +bool GetLocalListVersionReqConverter::toJson(const GetLocalListVersionReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -74,18 +74,18 @@ bool GetLocalListVersion20ReqConverter::toJson(const GetLocalListVersion20Req& d return ret; } -/** @brief Convert a GetLocalListVersion20Conf from a JSON representation */ -bool GetLocalListVersion20ConfConverter::fromJson(const rapidjson::Value& json, - GetLocalListVersion20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetLocalListVersionConf from a JSON representation */ +bool GetLocalListVersionConfConverter::fromJson(const rapidjson::Value& json, + GetLocalListVersionConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -100,15 +100,15 @@ bool GetLocalListVersion20ConfConverter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a GetLocalListVersion20Conf to a JSON representation */ -bool GetLocalListVersion20ConfConverter::toJson(const GetLocalListVersion20Conf& data, rapidjson::Document& json) +/** @brief Convert a GetLocalListVersionConf to a JSON representation */ +bool GetLocalListVersionConfConverter::toJson(const GetLocalListVersionConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/GetLocalListVersion20.h b/src/ocpp20/messages/GetLocalListVersion20.h index 96ca11d0..3b733821 100644 --- a/src/ocpp20/messages/GetLocalListVersion20.h +++ b/src/ocpp20/messages/GetLocalListVersion20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETLOCALLISTVERSION20_H -#define OPENOCPP_GETLOCALLISTVERSION20_H +#ifndef OPENOCPP_OCPP20_GETLOCALLISTVERSION_H +#define OPENOCPP_OCPP20_GETLOCALLISTVERSION_H #include "IMessageConverter.h" @@ -35,30 +35,30 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the GetLocalListVersion20 messages */ -static const std::string GETLOCALLISTVERSION20_ACTION = "GetLocalListVersion"; +/** @brief Action corresponding to the GetLocalListVersion messages */ +static const std::string GETLOCALLISTVERSION_ACTION = "GetLocalListVersion"; -/** @brief GetLocalListVersion20Req message */ -struct GetLocalListVersion20Req +/** @brief GetLocalListVersionReq message */ +struct GetLocalListVersionReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; -/** @brief GetLocalListVersion20Conf message */ -struct GetLocalListVersion20Conf +/** @brief GetLocalListVersionConf message */ +struct GetLocalListVersionConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief This contains the current version number of the local authorization list in the Charging Station. */ int versionNumber; }; // Message converters -MESSAGE_CONVERTERS(GetLocalListVersion20) +MESSAGE_CONVERTERS(GetLocalListVersion) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GETLOCALLISTVERSION20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETLOCALLISTVERSION_H \ No newline at end of file diff --git a/src/ocpp20/messages/GetLog20.cpp b/src/ocpp20/messages/GetLog20.cpp index 1c6a4801..78e41956 100644 --- a/src/ocpp20/messages/GetLog20.cpp +++ b/src/ocpp20/messages/GetLog20.cpp @@ -32,24 +32,24 @@ namespace messages namespace ocpp20 { -/** @brief Convert a GetLog20Req from a JSON representation */ -bool GetLog20ReqConverter::fromJson(const rapidjson::Value& json, GetLog20Req& data, std::string& error_code, std::string& error_message) +/** @brief Convert a GetLogReq from a JSON representation */ +bool GetLogReqConverter::fromJson(const rapidjson::Value& json, GetLogReq& data, std::string& error_code, std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // log - ocpp::types::ocpp20::LogParametersType20Converter log_converter; + ocpp::types::ocpp20::LogParametersTypeConverter log_converter; ret = ret && log_converter.fromJson(json["log"], data.log, error_code, error_message); // logType - data.logType = ocpp::types::ocpp20::LogEnumType20Helper.fromString(json["logType"].GetString()); + data.logType = ocpp::types::ocpp20::LogEnumTypeHelper.fromString(json["logType"].GetString()); // requestId extract(json, "requestId", data.requestId); @@ -68,15 +68,15 @@ bool GetLog20ReqConverter::fromJson(const rapidjson::Value& json, GetLog20Req& d return ret; } -/** @brief Convert a GetLog20Req to a JSON representation */ -bool GetLog20ReqConverter::toJson(const GetLog20Req& data, rapidjson::Document& json) +/** @brief Convert a GetLogReq to a JSON representation */ +bool GetLogReqConverter::toJson(const GetLogReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -85,7 +85,7 @@ bool GetLog20ReqConverter::toJson(const GetLog20Req& data, rapidjson::Document& } // log - ocpp::types::ocpp20::LogParametersType20Converter log_converter; + ocpp::types::ocpp20::LogParametersTypeConverter log_converter; log_converter.setAllocator(allocator); rapidjson::Document log_doc; log_doc.Parse("{}"); @@ -93,7 +93,7 @@ bool GetLog20ReqConverter::toJson(const GetLog20Req& data, rapidjson::Document& json.AddMember(rapidjson::StringRef("log"), log_doc.Move(), *allocator); // logType - fill(json, "logType", ocpp::types::ocpp20::LogEnumType20Helper.toString(data.logType)); + fill(json, "logType", ocpp::types::ocpp20::LogEnumTypeHelper.toString(data.logType)); // requestId fill(json, "requestId", data.requestId); @@ -107,25 +107,25 @@ bool GetLog20ReqConverter::toJson(const GetLog20Req& data, rapidjson::Document& return ret; } -/** @brief Convert a GetLog20Conf from a JSON representation */ -bool GetLog20ConfConverter::fromJson(const rapidjson::Value& json, GetLog20Conf& data, std::string& error_code, std::string& error_message) +/** @brief Convert a GetLogConf from a JSON representation */ +bool GetLogConfConverter::fromJson(const rapidjson::Value& json, GetLogConf& data, std::string& error_code, std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::LogStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::LogStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -140,15 +140,15 @@ bool GetLog20ConfConverter::fromJson(const rapidjson::Value& json, GetLog20Conf& return ret; } -/** @brief Convert a GetLog20Conf to a JSON representation */ -bool GetLog20ConfConverter::toJson(const GetLog20Conf& data, rapidjson::Document& json) +/** @brief Convert a GetLogConf to a JSON representation */ +bool GetLogConfConverter::toJson(const GetLogConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -157,12 +157,12 @@ bool GetLog20ConfConverter::toJson(const GetLog20Conf& data, rapidjson::Document } // status - fill(json, "status", ocpp::types::ocpp20::LogStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::LogStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/GetLog20.h b/src/ocpp20/messages/GetLog20.h index d8ad0087..8011577b 100644 --- a/src/ocpp20/messages/GetLog20.h +++ b/src/ocpp20/messages/GetLog20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETLOG20_H -#define OPENOCPP_GETLOG20_H +#ifndef OPENOCPP_OCPP20_GETLOG_H +#define OPENOCPP_OCPP20_GETLOG_H #include "IMessageConverter.h" @@ -39,18 +39,18 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the GetLog20 messages */ -static const std::string GETLOG20_ACTION = "GetLog"; +/** @brief Action corresponding to the GetLog messages */ +static const std::string GETLOG_ACTION = "GetLog"; -/** @brief GetLog20Req message */ -struct GetLog20Req +/** @brief GetLogReq message */ +struct GetLogReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::LogParametersType20 log; + ocpp::types::ocpp20::LogParametersType log; /** @brief */ - ocpp::types::ocpp20::LogEnumType20 logType; + ocpp::types::ocpp20::LogEnumType logType; /** @brief The Id of this request */ int requestId; /** @brief This specifies how many times the Charging Station must try to upload the log before giving up. If this field is not present, it is left to Charging Station to decide how many times it wants to retry. */ @@ -59,24 +59,24 @@ struct GetLog20Req ocpp::types::Optional retryInterval; }; -/** @brief GetLog20Conf message */ -struct GetLog20Conf +/** @brief GetLogConf message */ +struct GetLogConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::LogStatusEnumType20 status; + ocpp::types::ocpp20::LogStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; /** @brief This contains the name of the log file that will be uploaded. This field is not present when no logging information is available. */ ocpp::types::Optional> filename; }; // Message converters -MESSAGE_CONVERTERS(GetLog20) +MESSAGE_CONVERTERS(GetLog) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GETLOG20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETLOG_H \ No newline at end of file diff --git a/src/ocpp20/messages/GetMonitoringReport20.cpp b/src/ocpp20/messages/GetMonitoringReport20.cpp index 702125a5..56824d8b 100644 --- a/src/ocpp20/messages/GetMonitoringReport20.cpp +++ b/src/ocpp20/messages/GetMonitoringReport20.cpp @@ -32,29 +32,29 @@ namespace messages namespace ocpp20 { -/** @brief Convert a GetMonitoringReport20Req from a JSON representation */ -bool GetMonitoringReport20ReqConverter::fromJson(const rapidjson::Value& json, - GetMonitoringReport20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetMonitoringReportReq from a JSON representation */ +bool GetMonitoringReportReqConverter::fromJson(const rapidjson::Value& json, + GetMonitoringReportReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // componentVariable if (json.HasMember("componentVariable")) { - const rapidjson::Value& componentVariable_json = json["componentVariable"]; - ocpp::types::ocpp20::ComponentVariableType20Converter componentVariable_converter; + const rapidjson::Value& componentVariable_json = json["componentVariable"]; + ocpp::types::ocpp20::ComponentVariableTypeConverter componentVariable_converter; for (auto it = componentVariable_json.Begin(); ret && (it != componentVariable_json.End()); ++it) { - ocpp::types::ocpp20::ComponentVariableType20& item = data.componentVariable.emplace_back(); + ocpp::types::ocpp20::ComponentVariableType& item = data.componentVariable.emplace_back(); ret = ret && componentVariable_converter.fromJson(*it, item, error_code, error_message); } } @@ -68,8 +68,8 @@ bool GetMonitoringReport20ReqConverter::fromJson(const rapidjson::Value& json, const rapidjson::Value& monitoringCriteria_json = json["monitoringCriteria"]; for (auto it = monitoringCriteria_json.Begin(); ret && (it != monitoringCriteria_json.End()); ++it) { - ocpp::types::ocpp20::MonitoringCriterionEnumType20& item = data.monitoringCriteria.emplace_back(); - item = ocpp::types::ocpp20::MonitoringCriterionEnumType20Helper.fromString(it->GetString()); + ocpp::types::ocpp20::MonitoringCriterionEnumType& item = data.monitoringCriteria.emplace_back(); + item = ocpp::types::ocpp20::MonitoringCriterionEnumTypeHelper.fromString(it->GetString()); } } @@ -81,15 +81,15 @@ bool GetMonitoringReport20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a GetMonitoringReport20Req to a JSON representation */ -bool GetMonitoringReport20ReqConverter::toJson(const GetMonitoringReport20Req& data, rapidjson::Document& json) +/** @brief Convert a GetMonitoringReportReq to a JSON representation */ +bool GetMonitoringReportReqConverter::toJson(const GetMonitoringReportReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -101,10 +101,10 @@ bool GetMonitoringReport20ReqConverter::toJson(const GetMonitoringReport20Req& d if (!data.componentVariable.empty()) { - rapidjson::Value componentVariable_json(rapidjson::kArrayType); - ocpp::types::ocpp20::ComponentVariableType20Converter componentVariable_converter; + rapidjson::Value componentVariable_json(rapidjson::kArrayType); + ocpp::types::ocpp20::ComponentVariableTypeConverter componentVariable_converter; componentVariable_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::ComponentVariableType20& item : data.componentVariable) + for (const ocpp::types::ocpp20::ComponentVariableType& item : data.componentVariable) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -122,10 +122,10 @@ bool GetMonitoringReport20ReqConverter::toJson(const GetMonitoringReport20Req& d { rapidjson::Value monitoringCriteria_json(rapidjson::kArrayType); - for (const ocpp::types::ocpp20::MonitoringCriterionEnumType20& item : data.monitoringCriteria) + for (const ocpp::types::ocpp20::MonitoringCriterionEnumType& item : data.monitoringCriteria) { monitoringCriteria_json.PushBack( - rapidjson::Value(ocpp::types::ocpp20::MonitoringCriterionEnumType20Helper.toString(item).c_str(), *allocator).Move(), + rapidjson::Value(ocpp::types::ocpp20::MonitoringCriterionEnumTypeHelper.toString(item).c_str(), *allocator).Move(), *allocator); } json.AddMember(rapidjson::StringRef("monitoringCriteria"), monitoringCriteria_json.Move(), *allocator); @@ -134,28 +134,28 @@ bool GetMonitoringReport20ReqConverter::toJson(const GetMonitoringReport20Req& d return ret; } -/** @brief Convert a GetMonitoringReport20Conf from a JSON representation */ -bool GetMonitoringReport20ConfConverter::fromJson(const rapidjson::Value& json, - GetMonitoringReport20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetMonitoringReportConf from a JSON representation */ +bool GetMonitoringReportConfConverter::fromJson(const rapidjson::Value& json, + GetMonitoringReportConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GenericDeviceModelStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GenericDeviceModelStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -167,15 +167,15 @@ bool GetMonitoringReport20ConfConverter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a GetMonitoringReport20Conf to a JSON representation */ -bool GetMonitoringReport20ConfConverter::toJson(const GetMonitoringReport20Conf& data, rapidjson::Document& json) +/** @brief Convert a GetMonitoringReportConf to a JSON representation */ +bool GetMonitoringReportConfConverter::toJson(const GetMonitoringReportConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -184,12 +184,12 @@ bool GetMonitoringReport20ConfConverter::toJson(const GetMonitoringReport20Conf& } // status - fill(json, "status", ocpp::types::ocpp20::GenericDeviceModelStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GenericDeviceModelStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/GetMonitoringReport20.h b/src/ocpp20/messages/GetMonitoringReport20.h index faa5bb70..e4b1f777 100644 --- a/src/ocpp20/messages/GetMonitoringReport20.h +++ b/src/ocpp20/messages/GetMonitoringReport20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETMONITORINGREPORT20_H -#define OPENOCPP_GETMONITORINGREPORT20_H +#ifndef OPENOCPP_OCPP20_GETMONITORINGREPORT_H +#define OPENOCPP_OCPP20_GETMONITORINGREPORT_H #include "IMessageConverter.h" @@ -39,38 +39,38 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the GetMonitoringReport20 messages */ -static const std::string GETMONITORINGREPORT20_ACTION = "GetMonitoringReport"; +/** @brief Action corresponding to the GetMonitoringReport messages */ +static const std::string GETMONITORINGREPORT_ACTION = "GetMonitoringReport"; -/** @brief GetMonitoringReport20Req message */ -struct GetMonitoringReport20Req +/** @brief GetMonitoringReportReq message */ +struct GetMonitoringReportReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector componentVariable; + std::vector componentVariable; /** @brief The Id of the request. */ int requestId; /** @brief This field contains criteria for components for which a monitoring report is requested */ - std::vector monitoringCriteria; + std::vector monitoringCriteria; }; -/** @brief GetMonitoringReport20Conf message */ -struct GetMonitoringReport20Conf +/** @brief GetMonitoringReportConf message */ +struct GetMonitoringReportConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GenericDeviceModelStatusEnumType20 status; + ocpp::types::ocpp20::GenericDeviceModelStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(GetMonitoringReport20) +MESSAGE_CONVERTERS(GetMonitoringReport) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GETMONITORINGREPORT20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETMONITORINGREPORT_H \ No newline at end of file diff --git a/src/ocpp20/messages/GetReport20.cpp b/src/ocpp20/messages/GetReport20.cpp index 40bbb281..2646f276 100644 --- a/src/ocpp20/messages/GetReport20.cpp +++ b/src/ocpp20/messages/GetReport20.cpp @@ -32,29 +32,26 @@ namespace messages namespace ocpp20 { -/** @brief Convert a GetReport20Req from a JSON representation */ -bool GetReport20ReqConverter::fromJson(const rapidjson::Value& json, - GetReport20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetReportReq from a JSON representation */ +bool GetReportReqConverter::fromJson(const rapidjson::Value& json, GetReportReq& data, std::string& error_code, std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // componentVariable if (json.HasMember("componentVariable")) { - const rapidjson::Value& componentVariable_json = json["componentVariable"]; - ocpp::types::ocpp20::ComponentVariableType20Converter componentVariable_converter; + const rapidjson::Value& componentVariable_json = json["componentVariable"]; + ocpp::types::ocpp20::ComponentVariableTypeConverter componentVariable_converter; for (auto it = componentVariable_json.Begin(); ret && (it != componentVariable_json.End()); ++it) { - ocpp::types::ocpp20::ComponentVariableType20& item = data.componentVariable.emplace_back(); + ocpp::types::ocpp20::ComponentVariableType& item = data.componentVariable.emplace_back(); ret = ret && componentVariable_converter.fromJson(*it, item, error_code, error_message); } } @@ -68,8 +65,8 @@ bool GetReport20ReqConverter::fromJson(const rapidjson::Value& json, const rapidjson::Value& componentCriteria_json = json["componentCriteria"]; for (auto it = componentCriteria_json.Begin(); ret && (it != componentCriteria_json.End()); ++it) { - ocpp::types::ocpp20::ComponentCriterionEnumType20& item = data.componentCriteria.emplace_back(); - item = ocpp::types::ocpp20::ComponentCriterionEnumType20Helper.fromString(it->GetString()); + ocpp::types::ocpp20::ComponentCriterionEnumType& item = data.componentCriteria.emplace_back(); + item = ocpp::types::ocpp20::ComponentCriterionEnumTypeHelper.fromString(it->GetString()); } } @@ -81,15 +78,15 @@ bool GetReport20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a GetReport20Req to a JSON representation */ -bool GetReport20ReqConverter::toJson(const GetReport20Req& data, rapidjson::Document& json) +/** @brief Convert a GetReportReq to a JSON representation */ +bool GetReportReqConverter::toJson(const GetReportReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -101,10 +98,10 @@ bool GetReport20ReqConverter::toJson(const GetReport20Req& data, rapidjson::Docu if (!data.componentVariable.empty()) { - rapidjson::Value componentVariable_json(rapidjson::kArrayType); - ocpp::types::ocpp20::ComponentVariableType20Converter componentVariable_converter; + rapidjson::Value componentVariable_json(rapidjson::kArrayType); + ocpp::types::ocpp20::ComponentVariableTypeConverter componentVariable_converter; componentVariable_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::ComponentVariableType20& item : data.componentVariable) + for (const ocpp::types::ocpp20::ComponentVariableType& item : data.componentVariable) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -122,10 +119,10 @@ bool GetReport20ReqConverter::toJson(const GetReport20Req& data, rapidjson::Docu { rapidjson::Value componentCriteria_json(rapidjson::kArrayType); - for (const ocpp::types::ocpp20::ComponentCriterionEnumType20& item : data.componentCriteria) + for (const ocpp::types::ocpp20::ComponentCriterionEnumType& item : data.componentCriteria) { componentCriteria_json.PushBack( - rapidjson::Value(ocpp::types::ocpp20::ComponentCriterionEnumType20Helper.toString(item).c_str(), *allocator).Move(), + rapidjson::Value(ocpp::types::ocpp20::ComponentCriterionEnumTypeHelper.toString(item).c_str(), *allocator).Move(), *allocator); } json.AddMember(rapidjson::StringRef("componentCriteria"), componentCriteria_json.Move(), *allocator); @@ -134,28 +131,28 @@ bool GetReport20ReqConverter::toJson(const GetReport20Req& data, rapidjson::Docu return ret; } -/** @brief Convert a GetReport20Conf from a JSON representation */ -bool GetReport20ConfConverter::fromJson(const rapidjson::Value& json, - GetReport20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetReportConf from a JSON representation */ +bool GetReportConfConverter::fromJson(const rapidjson::Value& json, + GetReportConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GenericDeviceModelStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GenericDeviceModelStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -167,15 +164,15 @@ bool GetReport20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a GetReport20Conf to a JSON representation */ -bool GetReport20ConfConverter::toJson(const GetReport20Conf& data, rapidjson::Document& json) +/** @brief Convert a GetReportConf to a JSON representation */ +bool GetReportConfConverter::toJson(const GetReportConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -184,12 +181,12 @@ bool GetReport20ConfConverter::toJson(const GetReport20Conf& data, rapidjson::Do } // status - fill(json, "status", ocpp::types::ocpp20::GenericDeviceModelStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GenericDeviceModelStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/GetReport20.h b/src/ocpp20/messages/GetReport20.h index 9fb1e9aa..c4ba158e 100644 --- a/src/ocpp20/messages/GetReport20.h +++ b/src/ocpp20/messages/GetReport20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETREPORT20_H -#define OPENOCPP_GETREPORT20_H +#ifndef OPENOCPP_OCPP20_GETREPORT_H +#define OPENOCPP_OCPP20_GETREPORT_H #include "IMessageConverter.h" @@ -39,38 +39,38 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the GetReport20 messages */ -static const std::string GETREPORT20_ACTION = "GetReport"; +/** @brief Action corresponding to the GetReport messages */ +static const std::string GETREPORT_ACTION = "GetReport"; -/** @brief GetReport20Req message */ -struct GetReport20Req +/** @brief GetReportReq message */ +struct GetReportReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector componentVariable; + std::vector componentVariable; /** @brief The Id of the request. */ int requestId; /** @brief This field contains criteria for components for which a report is requested */ - std::vector componentCriteria; + std::vector componentCriteria; }; -/** @brief GetReport20Conf message */ -struct GetReport20Conf +/** @brief GetReportConf message */ +struct GetReportConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GenericDeviceModelStatusEnumType20 status; + ocpp::types::ocpp20::GenericDeviceModelStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(GetReport20) +MESSAGE_CONVERTERS(GetReport) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GETREPORT20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETREPORT_H \ No newline at end of file diff --git a/src/ocpp20/messages/GetTransactionStatus20.cpp b/src/ocpp20/messages/GetTransactionStatus20.cpp index b2eb7c56..adecc05d 100644 --- a/src/ocpp20/messages/GetTransactionStatus20.cpp +++ b/src/ocpp20/messages/GetTransactionStatus20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a GetTransactionStatus20Req from a JSON representation */ -bool GetTransactionStatus20ReqConverter::fromJson(const rapidjson::Value& json, - GetTransactionStatus20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetTransactionStatusReq from a JSON representation */ +bool GetTransactionStatusReqConverter::fromJson(const rapidjson::Value& json, + GetTransactionStatusReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -58,15 +58,15 @@ bool GetTransactionStatus20ReqConverter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a GetTransactionStatus20Req to a JSON representation */ -bool GetTransactionStatus20ReqConverter::toJson(const GetTransactionStatus20Req& data, rapidjson::Document& json) +/** @brief Convert a GetTransactionStatusReq to a JSON representation */ +bool GetTransactionStatusReqConverter::toJson(const GetTransactionStatusReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -80,18 +80,18 @@ bool GetTransactionStatus20ReqConverter::toJson(const GetTransactionStatus20Req& return ret; } -/** @brief Convert a GetTransactionStatus20Conf from a JSON representation */ -bool GetTransactionStatus20ConfConverter::fromJson(const rapidjson::Value& json, - GetTransactionStatus20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetTransactionStatusConf from a JSON representation */ +bool GetTransactionStatusConfConverter::fromJson(const rapidjson::Value& json, + GetTransactionStatusConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -109,15 +109,15 @@ bool GetTransactionStatus20ConfConverter::fromJson(const rapidjson::Value& j return ret; } -/** @brief Convert a GetTransactionStatus20Conf to a JSON representation */ -bool GetTransactionStatus20ConfConverter::toJson(const GetTransactionStatus20Conf& data, rapidjson::Document& json) +/** @brief Convert a GetTransactionStatusConf to a JSON representation */ +bool GetTransactionStatusConfConverter::toJson(const GetTransactionStatusConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/GetTransactionStatus20.h b/src/ocpp20/messages/GetTransactionStatus20.h index 02fef70b..4f06f871 100644 --- a/src/ocpp20/messages/GetTransactionStatus20.h +++ b/src/ocpp20/messages/GetTransactionStatus20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETTRANSACTIONSTATUS20_H -#define OPENOCPP_GETTRANSACTIONSTATUS20_H +#ifndef OPENOCPP_OCPP20_GETTRANSACTIONSTATUS_H +#define OPENOCPP_OCPP20_GETTRANSACTIONSTATUS_H #include "IMessageConverter.h" @@ -35,23 +35,23 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the GetTransactionStatus20 messages */ -static const std::string GETTRANSACTIONSTATUS20_ACTION = "GetTransactionStatus"; +/** @brief Action corresponding to the GetTransactionStatus messages */ +static const std::string GETTRANSACTIONSTATUS_ACTION = "GetTransactionStatus"; -/** @brief GetTransactionStatus20Req message */ -struct GetTransactionStatus20Req +/** @brief GetTransactionStatusReq message */ +struct GetTransactionStatusReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief The Id of the transaction for which the status is requested. */ ocpp::types::Optional> transactionId; }; -/** @brief GetTransactionStatus20Conf message */ -struct GetTransactionStatus20Conf +/** @brief GetTransactionStatusConf message */ +struct GetTransactionStatusConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Whether the transaction is still ongoing. */ ocpp::types::Optional ongoingIndicator; /** @brief Whether there are still message to be delivered. */ @@ -59,10 +59,10 @@ struct GetTransactionStatus20Conf }; // Message converters -MESSAGE_CONVERTERS(GetTransactionStatus20) +MESSAGE_CONVERTERS(GetTransactionStatus) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GETTRANSACTIONSTATUS20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETTRANSACTIONSTATUS_H \ No newline at end of file diff --git a/src/ocpp20/messages/GetVariables20.cpp b/src/ocpp20/messages/GetVariables20.cpp index fff6e020..5d549574 100644 --- a/src/ocpp20/messages/GetVariables20.cpp +++ b/src/ocpp20/messages/GetVariables20.cpp @@ -32,29 +32,29 @@ namespace messages namespace ocpp20 { -/** @brief Convert a GetVariables20Req from a JSON representation */ -bool GetVariables20ReqConverter::fromJson(const rapidjson::Value& json, - GetVariables20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetVariablesReq from a JSON representation */ +bool GetVariablesReqConverter::fromJson(const rapidjson::Value& json, + GetVariablesReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // getVariableData if (json.HasMember("getVariableData")) { - const rapidjson::Value& getVariableData_json = json["getVariableData"]; - ocpp::types::ocpp20::GetVariableDataType20Converter getVariableData_converter; + const rapidjson::Value& getVariableData_json = json["getVariableData"]; + ocpp::types::ocpp20::GetVariableDataTypeConverter getVariableData_converter; for (auto it = getVariableData_json.Begin(); ret && (it != getVariableData_json.End()); ++it) { - ocpp::types::ocpp20::GetVariableDataType20& item = data.getVariableData.emplace_back(); + ocpp::types::ocpp20::GetVariableDataType& item = data.getVariableData.emplace_back(); ret = ret && getVariableData_converter.fromJson(*it, item, error_code, error_message); } } @@ -67,15 +67,15 @@ bool GetVariables20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a GetVariables20Req to a JSON representation */ -bool GetVariables20ReqConverter::toJson(const GetVariables20Req& data, rapidjson::Document& json) +/** @brief Convert a GetVariablesReq to a JSON representation */ +bool GetVariablesReqConverter::toJson(const GetVariablesReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -85,10 +85,10 @@ bool GetVariables20ReqConverter::toJson(const GetVariables20Req& data, rapidjson // getVariableData - rapidjson::Value getVariableData_json(rapidjson::kArrayType); - ocpp::types::ocpp20::GetVariableDataType20Converter getVariableData_converter; + rapidjson::Value getVariableData_json(rapidjson::kArrayType); + ocpp::types::ocpp20::GetVariableDataTypeConverter getVariableData_converter; getVariableData_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::GetVariableDataType20& item : data.getVariableData) + for (const ocpp::types::ocpp20::GetVariableDataType& item : data.getVariableData) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -100,29 +100,29 @@ bool GetVariables20ReqConverter::toJson(const GetVariables20Req& data, rapidjson return ret; } -/** @brief Convert a GetVariables20Conf from a JSON representation */ -bool GetVariables20ConfConverter::fromJson(const rapidjson::Value& json, - GetVariables20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a GetVariablesConf from a JSON representation */ +bool GetVariablesConfConverter::fromJson(const rapidjson::Value& json, + GetVariablesConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // getVariableResult if (json.HasMember("getVariableResult")) { - const rapidjson::Value& getVariableResult_json = json["getVariableResult"]; - ocpp::types::ocpp20::GetVariableResultType20Converter getVariableResult_converter; + const rapidjson::Value& getVariableResult_json = json["getVariableResult"]; + ocpp::types::ocpp20::GetVariableResultTypeConverter getVariableResult_converter; for (auto it = getVariableResult_json.Begin(); ret && (it != getVariableResult_json.End()); ++it) { - ocpp::types::ocpp20::GetVariableResultType20& item = data.getVariableResult.emplace_back(); + ocpp::types::ocpp20::GetVariableResultType& item = data.getVariableResult.emplace_back(); ret = ret && getVariableResult_converter.fromJson(*it, item, error_code, error_message); } } @@ -135,15 +135,15 @@ bool GetVariables20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a GetVariables20Conf to a JSON representation */ -bool GetVariables20ConfConverter::toJson(const GetVariables20Conf& data, rapidjson::Document& json) +/** @brief Convert a GetVariablesConf to a JSON representation */ +bool GetVariablesConfConverter::toJson(const GetVariablesConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -153,10 +153,10 @@ bool GetVariables20ConfConverter::toJson(const GetVariables20Conf& data, rapidjs // getVariableResult - rapidjson::Value getVariableResult_json(rapidjson::kArrayType); - ocpp::types::ocpp20::GetVariableResultType20Converter getVariableResult_converter; + rapidjson::Value getVariableResult_json(rapidjson::kArrayType); + ocpp::types::ocpp20::GetVariableResultTypeConverter getVariableResult_converter; getVariableResult_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::GetVariableResultType20& item : data.getVariableResult) + for (const ocpp::types::ocpp20::GetVariableResultType& item : data.getVariableResult) { rapidjson::Document item_doc; item_doc.Parse("{}"); diff --git a/src/ocpp20/messages/GetVariables20.h b/src/ocpp20/messages/GetVariables20.h index 861b47cf..e165e1e5 100644 --- a/src/ocpp20/messages/GetVariables20.h +++ b/src/ocpp20/messages/GetVariables20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETVARIABLES20_H -#define OPENOCPP_GETVARIABLES20_H +#ifndef OPENOCPP_OCPP20_GETVARIABLES_H +#define OPENOCPP_OCPP20_GETVARIABLES_H #include "IMessageConverter.h" @@ -37,32 +37,32 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the GetVariables20 messages */ -static const std::string GETVARIABLES20_ACTION = "GetVariables"; +/** @brief Action corresponding to the GetVariables messages */ +static const std::string GETVARIABLES_ACTION = "GetVariables"; -/** @brief GetVariables20Req message */ -struct GetVariables20Req +/** @brief GetVariablesReq message */ +struct GetVariablesReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector getVariableData; + std::vector getVariableData; }; -/** @brief GetVariables20Conf message */ -struct GetVariables20Conf +/** @brief GetVariablesConf message */ +struct GetVariablesConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector getVariableResult; + std::vector getVariableResult; }; // Message converters -MESSAGE_CONVERTERS(GetVariables20) +MESSAGE_CONVERTERS(GetVariables) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_GETVARIABLES20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETVARIABLES_H \ No newline at end of file diff --git a/src/ocpp20/messages/Heartbeat20.cpp b/src/ocpp20/messages/Heartbeat20.cpp index 0d2b26cb..31a7ceb2 100644 --- a/src/ocpp20/messages/Heartbeat20.cpp +++ b/src/ocpp20/messages/Heartbeat20.cpp @@ -32,18 +32,15 @@ namespace messages namespace ocpp20 { -/** @brief Convert a Heartbeat20Req from a JSON representation */ -bool Heartbeat20ReqConverter::fromJson(const rapidjson::Value& json, - Heartbeat20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a HeartbeatReq from a JSON representation */ +bool HeartbeatReqConverter::fromJson(const rapidjson::Value& json, HeartbeatReq& data, std::string& error_code, std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -55,15 +52,15 @@ bool Heartbeat20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a Heartbeat20Req to a JSON representation */ -bool Heartbeat20ReqConverter::toJson(const Heartbeat20Req& data, rapidjson::Document& json) +/** @brief Convert a HeartbeatReq to a JSON representation */ +bool HeartbeatReqConverter::toJson(const HeartbeatReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -74,18 +71,18 @@ bool Heartbeat20ReqConverter::toJson(const Heartbeat20Req& data, rapidjson::Docu return ret; } -/** @brief Convert a Heartbeat20Conf from a JSON representation */ -bool Heartbeat20ConfConverter::fromJson(const rapidjson::Value& json, - Heartbeat20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a HeartbeatConf from a JSON representation */ +bool HeartbeatConfConverter::fromJson(const rapidjson::Value& json, + HeartbeatConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -100,15 +97,15 @@ bool Heartbeat20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a Heartbeat20Conf to a JSON representation */ -bool Heartbeat20ConfConverter::toJson(const Heartbeat20Conf& data, rapidjson::Document& json) +/** @brief Convert a HeartbeatConf to a JSON representation */ +bool HeartbeatConfConverter::toJson(const HeartbeatConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/Heartbeat20.h b/src/ocpp20/messages/Heartbeat20.h index c52d7069..6b39d28e 100644 --- a/src/ocpp20/messages/Heartbeat20.h +++ b/src/ocpp20/messages/Heartbeat20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_HEARTBEAT20_H -#define OPENOCPP_HEARTBEAT20_H +#ifndef OPENOCPP_OCPP20_HEARTBEAT_H +#define OPENOCPP_OCPP20_HEARTBEAT_H #include "IMessageConverter.h" @@ -35,30 +35,30 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the Heartbeat20 messages */ -static const std::string HEARTBEAT20_ACTION = "Heartbeat"; +/** @brief Action corresponding to the Heartbeat messages */ +static const std::string HEARTBEAT_ACTION = "Heartbeat"; -/** @brief Heartbeat20Req message */ -struct Heartbeat20Req +/** @brief HeartbeatReq message */ +struct HeartbeatReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; -/** @brief Heartbeat20Conf message */ -struct Heartbeat20Conf +/** @brief HeartbeatConf message */ +struct HeartbeatConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Contains the current time of the CSMS. */ ocpp::types::DateTime currentTime; }; // Message converters -MESSAGE_CONVERTERS(Heartbeat20) +MESSAGE_CONVERTERS(Heartbeat) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_HEARTBEAT20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_HEARTBEAT_H \ No newline at end of file diff --git a/src/ocpp20/messages/InstallCertificate20.cpp b/src/ocpp20/messages/InstallCertificate20.cpp index a1041832..66f64293 100644 --- a/src/ocpp20/messages/InstallCertificate20.cpp +++ b/src/ocpp20/messages/InstallCertificate20.cpp @@ -32,23 +32,23 @@ namespace messages namespace ocpp20 { -/** @brief Convert a InstallCertificate20Req from a JSON representation */ -bool InstallCertificate20ReqConverter::fromJson(const rapidjson::Value& json, - InstallCertificate20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a InstallCertificateReq from a JSON representation */ +bool InstallCertificateReqConverter::fromJson(const rapidjson::Value& json, + InstallCertificateReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // certificateType - data.certificateType = ocpp::types::ocpp20::InstallCertificateUseEnumType20Helper.fromString(json["certificateType"].GetString()); + data.certificateType = ocpp::types::ocpp20::InstallCertificateUseEnumTypeHelper.fromString(json["certificateType"].GetString()); // certificate extract(json, "certificate", data.certificate); @@ -61,15 +61,15 @@ bool InstallCertificate20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a InstallCertificate20Req to a JSON representation */ -bool InstallCertificate20ReqConverter::toJson(const InstallCertificate20Req& data, rapidjson::Document& json) +/** @brief Convert a InstallCertificateReq to a JSON representation */ +bool InstallCertificateReqConverter::toJson(const InstallCertificateReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -78,7 +78,7 @@ bool InstallCertificate20ReqConverter::toJson(const InstallCertificate20Req& dat } // certificateType - fill(json, "certificateType", ocpp::types::ocpp20::InstallCertificateUseEnumType20Helper.toString(data.certificateType)); + fill(json, "certificateType", ocpp::types::ocpp20::InstallCertificateUseEnumTypeHelper.toString(data.certificateType)); // certificate fill(json, "certificate", data.certificate); @@ -86,28 +86,28 @@ bool InstallCertificate20ReqConverter::toJson(const InstallCertificate20Req& dat return ret; } -/** @brief Convert a InstallCertificate20Conf from a JSON representation */ -bool InstallCertificate20ConfConverter::fromJson(const rapidjson::Value& json, - InstallCertificate20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a InstallCertificateConf from a JSON representation */ +bool InstallCertificateConfConverter::fromJson(const rapidjson::Value& json, + InstallCertificateConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::InstallCertificateStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::InstallCertificateStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -119,15 +119,15 @@ bool InstallCertificate20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a InstallCertificate20Conf to a JSON representation */ -bool InstallCertificate20ConfConverter::toJson(const InstallCertificate20Conf& data, rapidjson::Document& json) +/** @brief Convert a InstallCertificateConf to a JSON representation */ +bool InstallCertificateConfConverter::toJson(const InstallCertificateConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -136,12 +136,12 @@ bool InstallCertificate20ConfConverter::toJson(const InstallCertificate20Conf& d } // status - fill(json, "status", ocpp::types::ocpp20::InstallCertificateStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::InstallCertificateStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/InstallCertificate20.h b/src/ocpp20/messages/InstallCertificate20.h index 09ec95ad..254041ac 100644 --- a/src/ocpp20/messages/InstallCertificate20.h +++ b/src/ocpp20/messages/InstallCertificate20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_INSTALLCERTIFICATE20_H -#define OPENOCPP_INSTALLCERTIFICATE20_H +#ifndef OPENOCPP_OCPP20_INSTALLCERTIFICATE_H +#define OPENOCPP_OCPP20_INSTALLCERTIFICATE_H #include "IMessageConverter.h" @@ -38,36 +38,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the InstallCertificate20 messages */ -static const std::string INSTALLCERTIFICATE20_ACTION = "InstallCertificate"; +/** @brief Action corresponding to the InstallCertificate messages */ +static const std::string INSTALLCERTIFICATE_ACTION = "InstallCertificate"; -/** @brief InstallCertificate20Req message */ -struct InstallCertificate20Req +/** @brief InstallCertificateReq message */ +struct InstallCertificateReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::InstallCertificateUseEnumType20 certificateType; + ocpp::types::ocpp20::InstallCertificateUseEnumType certificateType; /** @brief A PEM encoded X.509 certificate. */ ocpp::types::CiStringType<5500u> certificate; }; -/** @brief InstallCertificate20Conf message */ -struct InstallCertificate20Conf +/** @brief InstallCertificateConf message */ +struct InstallCertificateConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::InstallCertificateStatusEnumType20 status; + ocpp::types::ocpp20::InstallCertificateStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(InstallCertificate20) +MESSAGE_CONVERTERS(InstallCertificate) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_INSTALLCERTIFICATE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_INSTALLCERTIFICATE_H \ No newline at end of file diff --git a/src/ocpp20/messages/LogStatusNotification20.cpp b/src/ocpp20/messages/LogStatusNotification20.cpp index 6b1fa183..9d5dffc2 100644 --- a/src/ocpp20/messages/LogStatusNotification20.cpp +++ b/src/ocpp20/messages/LogStatusNotification20.cpp @@ -32,23 +32,23 @@ namespace messages namespace ocpp20 { -/** @brief Convert a LogStatusNotification20Req from a JSON representation */ -bool LogStatusNotification20ReqConverter::fromJson(const rapidjson::Value& json, - LogStatusNotification20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a LogStatusNotificationReq from a JSON representation */ +bool LogStatusNotificationReqConverter::fromJson(const rapidjson::Value& json, + LogStatusNotificationReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::UploadLogStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::UploadLogStatusEnumTypeHelper.fromString(json["status"].GetString()); // requestId extract(json, "requestId", data.requestId); @@ -61,15 +61,15 @@ bool LogStatusNotification20ReqConverter::fromJson(const rapidjson::Value& j return ret; } -/** @brief Convert a LogStatusNotification20Req to a JSON representation */ -bool LogStatusNotification20ReqConverter::toJson(const LogStatusNotification20Req& data, rapidjson::Document& json) +/** @brief Convert a LogStatusNotificationReq to a JSON representation */ +bool LogStatusNotificationReqConverter::toJson(const LogStatusNotificationReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -78,7 +78,7 @@ bool LogStatusNotification20ReqConverter::toJson(const LogStatusNotification20Re } // status - fill(json, "status", ocpp::types::ocpp20::UploadLogStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::UploadLogStatusEnumTypeHelper.toString(data.status)); // requestId fill(json, "requestId", data.requestId); @@ -86,18 +86,18 @@ bool LogStatusNotification20ReqConverter::toJson(const LogStatusNotification20Re return ret; } -/** @brief Convert a LogStatusNotification20Conf from a JSON representation */ -bool LogStatusNotification20ConfConverter::fromJson(const rapidjson::Value& json, - LogStatusNotification20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a LogStatusNotificationConf from a JSON representation */ +bool LogStatusNotificationConfConverter::fromJson(const rapidjson::Value& json, + LogStatusNotificationConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -109,15 +109,15 @@ bool LogStatusNotification20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a LogStatusNotification20Conf to a JSON representation */ -bool LogStatusNotification20ConfConverter::toJson(const LogStatusNotification20Conf& data, rapidjson::Document& json) +/** @brief Convert a LogStatusNotificationConf to a JSON representation */ +bool LogStatusNotificationConfConverter::toJson(const LogStatusNotificationConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/LogStatusNotification20.h b/src/ocpp20/messages/LogStatusNotification20.h index b39c5b56..ee20a7ec 100644 --- a/src/ocpp20/messages/LogStatusNotification20.h +++ b/src/ocpp20/messages/LogStatusNotification20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_LOGSTATUSNOTIFICATION20_H -#define OPENOCPP_LOGSTATUSNOTIFICATION20_H +#ifndef OPENOCPP_OCPP20_LOGSTATUSNOTIFICATION_H +#define OPENOCPP_OCPP20_LOGSTATUSNOTIFICATION_H #include "IMessageConverter.h" @@ -36,33 +36,33 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the LogStatusNotification20 messages */ -static const std::string LOGSTATUSNOTIFICATION20_ACTION = "LogStatusNotification"; +/** @brief Action corresponding to the LogStatusNotification messages */ +static const std::string LOGSTATUSNOTIFICATION_ACTION = "LogStatusNotification"; -/** @brief LogStatusNotification20Req message */ -struct LogStatusNotification20Req +/** @brief LogStatusNotificationReq message */ +struct LogStatusNotificationReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::UploadLogStatusEnumType20 status; + ocpp::types::ocpp20::UploadLogStatusEnumType status; /** @brief The request id that was provided in GetLogRequest that started this log upload. This field is mandatory, unless the message was triggered by a TriggerMessageRequest AND there is no log upload ongoing. */ ocpp::types::Optional requestId; }; -/** @brief LogStatusNotification20Conf message */ -struct LogStatusNotification20Conf +/** @brief LogStatusNotificationConf message */ +struct LogStatusNotificationConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(LogStatusNotification20) +MESSAGE_CONVERTERS(LogStatusNotification) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_LOGSTATUSNOTIFICATION20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_LOGSTATUSNOTIFICATION_H \ No newline at end of file diff --git a/src/ocpp20/messages/MessagesConverter20.cpp b/src/ocpp20/messages/MessagesConverter20.cpp index 910c44a1..34667142 100644 --- a/src/ocpp20/messages/MessagesConverter20.cpp +++ b/src/ocpp20/messages/MessagesConverter20.cpp @@ -83,14 +83,14 @@ along with OpenOCPP. If not, see . #include "UpdateFirmware20.h" /** @brief Macro to register a message converter for an OCPP action */ -#define REGISTER_CONVERTER(action) \ - registerRequestConverter(#action, *new action##20ReqConverter()); \ - registerResponseConverter(#action, *new action##20ConfConverter()) +#define REGISTER_CONVERTER(action) \ + registerRequestConverter(#action, *new action##ReqConverter()); \ + registerResponseConverter(#action, *new action##ConfConverter()) /** @brief Macro to delete a message converter for an OCPP action */ -#define DELETE_CONVERTER(action) \ - deleteRequestConverter(#action); \ - deleteResponseConverter(#action) +#define DELETE_CONVERTER(action) \ + deleteRequestConverter(#action); \ + deleteResponseConverter(#action) namespace ocpp { diff --git a/src/ocpp20/messages/MessagesValidator20.cpp b/src/ocpp20/messages/MessagesValidator20.cpp index a822353d..048f8e67 100644 --- a/src/ocpp20/messages/MessagesValidator20.cpp +++ b/src/ocpp20/messages/MessagesValidator20.cpp @@ -106,71 +106,71 @@ bool MessagesValidator20::load(const std::string& schemas_path) // Load validators for all the messages m_req_validators.clear(); m_resp_validators.clear(); - ret = addValidator(schemas_path, CANCELRESERVATION20_ACTION) && ret; - ret = addValidator(schemas_path, CERTIFICATESIGNED20_ACTION) && ret; - ret = addValidator(schemas_path, CHANGEAVAILABILITY20_ACTION) && ret; - ret = addValidator(schemas_path, CLEARCACHE20_ACTION) && ret; - ret = addValidator(schemas_path, CLEARCHARGINGPROFILE20_ACTION) && ret; - ret = addValidator(schemas_path, CLEARDISPLAYMESSAGE20_ACTION) && ret; - ret = addValidator(schemas_path, CLEARVARIABLEMONITORING20_ACTION) && ret; - ret = addValidator(schemas_path, CUSTOMERINFORMATION20_ACTION) && ret; - ret = addValidator(schemas_path, DATATRANSFER20_ACTION) && ret; - ret = addValidator(schemas_path, DELETECERTIFICATE20_ACTION) && ret; - ret = addValidator(schemas_path, GET15118EVCERTIFICATE20_ACTION) && ret; - ret = addValidator(schemas_path, GETBASEREPORT20_ACTION) && ret; - ret = addValidator(schemas_path, GETCERTIFICATESTATUS20_ACTION) && ret; - ret = addValidator(schemas_path, GETCHARGINGPROFILES20_ACTION) && ret; - ret = addValidator(schemas_path, GETCOMPOSITESCHEDULE20_ACTION) && ret; - ret = addValidator(schemas_path, GETDISPLAYMESSAGES20_ACTION) && ret; - ret = addValidator(schemas_path, GETINSTALLEDCERTIFICATEIDS20_ACTION) && ret; - ret = addValidator(schemas_path, GETLOCALLISTVERSION20_ACTION) && ret; - ret = addValidator(schemas_path, GETLOG20_ACTION) && ret; - ret = addValidator(schemas_path, GETMONITORINGREPORT20_ACTION) && ret; - ret = addValidator(schemas_path, GETREPORT20_ACTION) && ret; - ret = addValidator(schemas_path, GETTRANSACTIONSTATUS20_ACTION) && ret; - ret = addValidator(schemas_path, GETVARIABLES20_ACTION) && ret; - ret = addValidator(schemas_path, INSTALLCERTIFICATE20_ACTION) && ret; - ret = addValidator(schemas_path, PUBLISHFIRMWARE20_ACTION) && ret; - ret = addValidator(schemas_path, REQUESTSTARTTRANSACTION20_ACTION) && ret; - ret = addValidator(schemas_path, REQUESTSTOPTRANSACTION20_ACTION) && ret; - ret = addValidator(schemas_path, RESERVENOW20_ACTION) && ret; - ret = addValidator(schemas_path, RESET20_ACTION) && ret; - ret = addValidator(schemas_path, SENDLOCALLIST20_ACTION) && ret; - ret = addValidator(schemas_path, SETCHARGINGPROFILE20_ACTION) && ret; - ret = addValidator(schemas_path, SETDISPLAYMESSAGE20_ACTION) && ret; - ret = addValidator(schemas_path, SETMONITORINGBASE20_ACTION) && ret; - ret = addValidator(schemas_path, SETMONITORINGLEVEL20_ACTION) && ret; - ret = addValidator(schemas_path, SETNETWORKPROFILE20_ACTION) && ret; - ret = addValidator(schemas_path, SETVARIABLEMONITORING20_ACTION) && ret; - ret = addValidator(schemas_path, SETVARIABLES20_ACTION) && ret; - ret = addValidator(schemas_path, TRIGGERMESSAGE20_ACTION) && ret; - ret = addValidator(schemas_path, UNLOCKCONNECTOR20_ACTION) && ret; - ret = addValidator(schemas_path, UNPUBLISHFIRMWARE20_ACTION) && ret; - ret = addValidator(schemas_path, UPDATEFIRMWARE20_ACTION) && ret; - ret = addValidator(schemas_path, BOOTNOTIFICATION20_ACTION) && ret; - ret = addValidator(schemas_path, AUTHORIZE20_ACTION) && ret; - ret = addValidator(schemas_path, CLEAREDCHARGINGLIMIT20_ACTION) && ret; - ret = addValidator(schemas_path, COSTUPDATED20_ACTION) && ret; - ret = addValidator(schemas_path, DATATRANSFER20_ACTION) && ret; - ret = addValidator(schemas_path, FIRMWARESTATUSNOTIFICATION20_ACTION) && ret; - ret = addValidator(schemas_path, HEARTBEAT20_ACTION) && ret; - ret = addValidator(schemas_path, LOGSTATUSNOTIFICATION20_ACTION) && ret; - ret = addValidator(schemas_path, METERVALUES20_ACTION) && ret; - ret = addValidator(schemas_path, NOTIFYCHARGINGLIMIT20_ACTION) && ret; - ret = addValidator(schemas_path, NOTIFYCUSTOMERINFORMATION20_ACTION) && ret; - ret = addValidator(schemas_path, NOTIFYDISPLAYMESSAGES20_ACTION) && ret; - ret = addValidator(schemas_path, NOTIFYEVCHARGINGNEEDS20_ACTION) && ret; - ret = addValidator(schemas_path, NOTIFYEVCHARGINGSCHEDULE20_ACTION) && ret; - ret = addValidator(schemas_path, NOTIFYEVENT20_ACTION) && ret; - ret = addValidator(schemas_path, NOTIFYMONITORINGREPORT20_ACTION) && ret; - ret = addValidator(schemas_path, NOTIFYREPORT20_ACTION) && ret; - ret = addValidator(schemas_path, PUBLISHFIRMWARESTATUSNOTIFICATION20_ACTION) && ret; - ret = addValidator(schemas_path, REPORTCHARGINGPROFILES20_ACTION) && ret; - ret = addValidator(schemas_path, RESERVATIONSTATUSUPDATE20_ACTION) && ret; - ret = addValidator(schemas_path, SECURITYEVENTNOTIFICATION20_ACTION) && ret; - ret = addValidator(schemas_path, SIGNCERTIFICATE20_ACTION) && ret; - ret = addValidator(schemas_path, STATUSNOTIFICATION20_ACTION) && ret; - ret = addValidator(schemas_path, TRANSACTIONEVENT20_ACTION) && ret; + ret = addValidator(schemas_path, CANCELRESERVATION_ACTION) && ret; + ret = addValidator(schemas_path, CERTIFICATESIGNED_ACTION) && ret; + ret = addValidator(schemas_path, CHANGEAVAILABILITY_ACTION) && ret; + ret = addValidator(schemas_path, CLEARCACHE_ACTION) && ret; + ret = addValidator(schemas_path, CLEARCHARGINGPROFILE_ACTION) && ret; + ret = addValidator(schemas_path, CLEARDISPLAYMESSAGE_ACTION) && ret; + ret = addValidator(schemas_path, CLEARVARIABLEMONITORING_ACTION) && ret; + ret = addValidator(schemas_path, CUSTOMERINFORMATION_ACTION) && ret; + ret = addValidator(schemas_path, DATATRANSFER_ACTION) && ret; + ret = addValidator(schemas_path, DELETECERTIFICATE_ACTION) && ret; + ret = addValidator(schemas_path, GET15118EVCERTIFICATE_ACTION) && ret; + ret = addValidator(schemas_path, GETBASEREPORT_ACTION) && ret; + ret = addValidator(schemas_path, GETCERTIFICATESTATUS_ACTION) && ret; + ret = addValidator(schemas_path, GETCHARGINGPROFILES_ACTION) && ret; + ret = addValidator(schemas_path, GETCOMPOSITESCHEDULE_ACTION) && ret; + ret = addValidator(schemas_path, GETDISPLAYMESSAGES_ACTION) && ret; + ret = addValidator(schemas_path, GETINSTALLEDCERTIFICATEIDS_ACTION) && ret; + ret = addValidator(schemas_path, GETLOCALLISTVERSION_ACTION) && ret; + ret = addValidator(schemas_path, GETLOG_ACTION) && ret; + ret = addValidator(schemas_path, GETMONITORINGREPORT_ACTION) && ret; + ret = addValidator(schemas_path, GETREPORT_ACTION) && ret; + ret = addValidator(schemas_path, GETTRANSACTIONSTATUS_ACTION) && ret; + ret = addValidator(schemas_path, GETVARIABLES_ACTION) && ret; + ret = addValidator(schemas_path, INSTALLCERTIFICATE_ACTION) && ret; + ret = addValidator(schemas_path, PUBLISHFIRMWARE_ACTION) && ret; + ret = addValidator(schemas_path, REQUESTSTARTTRANSACTION_ACTION) && ret; + ret = addValidator(schemas_path, REQUESTSTOPTRANSACTION_ACTION) && ret; + ret = addValidator(schemas_path, RESERVENOW_ACTION) && ret; + ret = addValidator(schemas_path, RESET_ACTION) && ret; + ret = addValidator(schemas_path, SENDLOCALLIST_ACTION) && ret; + ret = addValidator(schemas_path, SETCHARGINGPROFILE_ACTION) && ret; + ret = addValidator(schemas_path, SETDISPLAYMESSAGE_ACTION) && ret; + ret = addValidator(schemas_path, SETMONITORINGBASE_ACTION) && ret; + ret = addValidator(schemas_path, SETMONITORINGLEVEL_ACTION) && ret; + ret = addValidator(schemas_path, SETNETWORKPROFILE_ACTION) && ret; + ret = addValidator(schemas_path, SETVARIABLEMONITORING_ACTION) && ret; + ret = addValidator(schemas_path, SETVARIABLES_ACTION) && ret; + ret = addValidator(schemas_path, TRIGGERMESSAGE_ACTION) && ret; + ret = addValidator(schemas_path, UNLOCKCONNECTOR_ACTION) && ret; + ret = addValidator(schemas_path, UNPUBLISHFIRMWARE_ACTION) && ret; + ret = addValidator(schemas_path, UPDATEFIRMWARE_ACTION) && ret; + ret = addValidator(schemas_path, BOOTNOTIFICATION_ACTION) && ret; + ret = addValidator(schemas_path, AUTHORIZE_ACTION) && ret; + ret = addValidator(schemas_path, CLEAREDCHARGINGLIMIT_ACTION) && ret; + ret = addValidator(schemas_path, COSTUPDATED_ACTION) && ret; + ret = addValidator(schemas_path, DATATRANSFER_ACTION) && ret; + ret = addValidator(schemas_path, FIRMWARESTATUSNOTIFICATION_ACTION) && ret; + ret = addValidator(schemas_path, HEARTBEAT_ACTION) && ret; + ret = addValidator(schemas_path, LOGSTATUSNOTIFICATION_ACTION) && ret; + ret = addValidator(schemas_path, METERVALUES_ACTION) && ret; + ret = addValidator(schemas_path, NOTIFYCHARGINGLIMIT_ACTION) && ret; + ret = addValidator(schemas_path, NOTIFYCUSTOMERINFORMATION_ACTION) && ret; + ret = addValidator(schemas_path, NOTIFYDISPLAYMESSAGES_ACTION) && ret; + ret = addValidator(schemas_path, NOTIFYEVCHARGINGNEEDS_ACTION) && ret; + ret = addValidator(schemas_path, NOTIFYEVCHARGINGSCHEDULE_ACTION) && ret; + ret = addValidator(schemas_path, NOTIFYEVENT_ACTION) && ret; + ret = addValidator(schemas_path, NOTIFYMONITORINGREPORT_ACTION) && ret; + ret = addValidator(schemas_path, NOTIFYREPORT_ACTION) && ret; + ret = addValidator(schemas_path, PUBLISHFIRMWARESTATUSNOTIFICATION_ACTION) && ret; + ret = addValidator(schemas_path, REPORTCHARGINGPROFILES_ACTION) && ret; + ret = addValidator(schemas_path, RESERVATIONSTATUSUPDATE_ACTION) && ret; + ret = addValidator(schemas_path, SECURITYEVENTNOTIFICATION_ACTION) && ret; + ret = addValidator(schemas_path, SIGNCERTIFICATE_ACTION) && ret; + ret = addValidator(schemas_path, STATUSNOTIFICATION_ACTION) && ret; + ret = addValidator(schemas_path, TRANSACTIONEVENT_ACTION) && ret; return ret; } diff --git a/src/ocpp20/messages/MeterValues20.cpp b/src/ocpp20/messages/MeterValues20.cpp index 54e709dd..e9a8528e 100644 --- a/src/ocpp20/messages/MeterValues20.cpp +++ b/src/ocpp20/messages/MeterValues20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a MeterValues20Req from a JSON representation */ -bool MeterValues20ReqConverter::fromJson(const rapidjson::Value& json, - MeterValues20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a MeterValuesReq from a JSON representation */ +bool MeterValuesReqConverter::fromJson(const rapidjson::Value& json, + MeterValuesReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -53,12 +53,12 @@ bool MeterValues20ReqConverter::fromJson(const rapidjson::Value& json, // meterValue if (json.HasMember("meterValue")) { - const rapidjson::Value& meterValue_json = json["meterValue"]; - ocpp::types::ocpp20::MeterValueType20Converter meterValue_converter; + const rapidjson::Value& meterValue_json = json["meterValue"]; + ocpp::types::ocpp20::MeterValueTypeConverter meterValue_converter; for (auto it = meterValue_json.Begin(); ret && (it != meterValue_json.End()); ++it) { - ocpp::types::ocpp20::MeterValueType20& item = data.meterValue.emplace_back(); - ret = ret && meterValue_converter.fromJson(*it, item, error_code, error_message); + ocpp::types::ocpp20::MeterValueType& item = data.meterValue.emplace_back(); + ret = ret && meterValue_converter.fromJson(*it, item, error_code, error_message); } } @@ -70,15 +70,15 @@ bool MeterValues20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a MeterValues20Req to a JSON representation */ -bool MeterValues20ReqConverter::toJson(const MeterValues20Req& data, rapidjson::Document& json) +/** @brief Convert a MeterValuesReq to a JSON representation */ +bool MeterValuesReqConverter::toJson(const MeterValuesReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -91,10 +91,10 @@ bool MeterValues20ReqConverter::toJson(const MeterValues20Req& data, rapidjson:: // meterValue - rapidjson::Value meterValue_json(rapidjson::kArrayType); - ocpp::types::ocpp20::MeterValueType20Converter meterValue_converter; + rapidjson::Value meterValue_json(rapidjson::kArrayType); + ocpp::types::ocpp20::MeterValueTypeConverter meterValue_converter; meterValue_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::MeterValueType20& item : data.meterValue) + for (const ocpp::types::ocpp20::MeterValueType& item : data.meterValue) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -106,18 +106,18 @@ bool MeterValues20ReqConverter::toJson(const MeterValues20Req& data, rapidjson:: return ret; } -/** @brief Convert a MeterValues20Conf from a JSON representation */ -bool MeterValues20ConfConverter::fromJson(const rapidjson::Value& json, - MeterValues20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a MeterValuesConf from a JSON representation */ +bool MeterValuesConfConverter::fromJson(const rapidjson::Value& json, + MeterValuesConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -129,15 +129,15 @@ bool MeterValues20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a MeterValues20Conf to a JSON representation */ -bool MeterValues20ConfConverter::toJson(const MeterValues20Conf& data, rapidjson::Document& json) +/** @brief Convert a MeterValuesConf to a JSON representation */ +bool MeterValuesConfConverter::toJson(const MeterValuesConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/MeterValues20.h b/src/ocpp20/messages/MeterValues20.h index a59563be..05542541 100644 --- a/src/ocpp20/messages/MeterValues20.h +++ b/src/ocpp20/messages/MeterValues20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_METERVALUES20_H -#define OPENOCPP_METERVALUES20_H +#ifndef OPENOCPP_OCPP20_METERVALUES_H +#define OPENOCPP_OCPP20_METERVALUES_H #include "IMessageConverter.h" @@ -36,34 +36,34 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the MeterValues20 messages */ -static const std::string METERVALUES20_ACTION = "MeterValues"; +/** @brief Action corresponding to the MeterValues messages */ +static const std::string METERVALUES_ACTION = "MeterValues"; -/** @brief MeterValues20Req message */ -struct MeterValues20Req +/** @brief MeterValuesReq message */ +struct MeterValuesReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Request_ Body. EVSEID. Numeric_ Identifier urn:x-enexis:ecdm:uid:1:571101 This contains a number (>0) designating an EVSE of the Charging Station. ‘0’ (zero) is used to designate the main power meter. */ int evseId; /** @brief */ - std::vector meterValue; + std::vector meterValue; }; -/** @brief MeterValues20Conf message */ -struct MeterValues20Conf +/** @brief MeterValuesConf message */ +struct MeterValuesConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(MeterValues20) +MESSAGE_CONVERTERS(MeterValues) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_METERVALUES20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_METERVALUES_H \ No newline at end of file diff --git a/src/ocpp20/messages/NotifyChargingLimit20.cpp b/src/ocpp20/messages/NotifyChargingLimit20.cpp index edd5ec38..df2bf671 100644 --- a/src/ocpp20/messages/NotifyChargingLimit20.cpp +++ b/src/ocpp20/messages/NotifyChargingLimit20.cpp @@ -32,29 +32,29 @@ namespace messages namespace ocpp20 { -/** @brief Convert a NotifyChargingLimit20Req from a JSON representation */ -bool NotifyChargingLimit20ReqConverter::fromJson(const rapidjson::Value& json, - NotifyChargingLimit20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyChargingLimitReq from a JSON representation */ +bool NotifyChargingLimitReqConverter::fromJson(const rapidjson::Value& json, + NotifyChargingLimitReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // chargingSchedule if (json.HasMember("chargingSchedule")) { - const rapidjson::Value& chargingSchedule_json = json["chargingSchedule"]; - ocpp::types::ocpp20::ChargingScheduleType20Converter chargingSchedule_converter; + const rapidjson::Value& chargingSchedule_json = json["chargingSchedule"]; + ocpp::types::ocpp20::ChargingScheduleTypeConverter chargingSchedule_converter; for (auto it = chargingSchedule_json.Begin(); ret && (it != chargingSchedule_json.End()); ++it) { - ocpp::types::ocpp20::ChargingScheduleType20& item = data.chargingSchedule.emplace_back(); + ocpp::types::ocpp20::ChargingScheduleType& item = data.chargingSchedule.emplace_back(); ret = ret && chargingSchedule_converter.fromJson(*it, item, error_code, error_message); } } @@ -63,7 +63,7 @@ bool NotifyChargingLimit20ReqConverter::fromJson(const rapidjson::Value& json, extract(json, "evseId", data.evseId); // chargingLimit - ocpp::types::ocpp20::ChargingLimitType20Converter chargingLimit_converter; + ocpp::types::ocpp20::ChargingLimitTypeConverter chargingLimit_converter; ret = ret && chargingLimit_converter.fromJson(json["chargingLimit"], data.chargingLimit, error_code, error_message); if (!ret) @@ -74,15 +74,15 @@ bool NotifyChargingLimit20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a NotifyChargingLimit20Req to a JSON representation */ -bool NotifyChargingLimit20ReqConverter::toJson(const NotifyChargingLimit20Req& data, rapidjson::Document& json) +/** @brief Convert a NotifyChargingLimitReq to a JSON representation */ +bool NotifyChargingLimitReqConverter::toJson(const NotifyChargingLimitReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -94,10 +94,10 @@ bool NotifyChargingLimit20ReqConverter::toJson(const NotifyChargingLimit20Req& d if (!data.chargingSchedule.empty()) { - rapidjson::Value chargingSchedule_json(rapidjson::kArrayType); - ocpp::types::ocpp20::ChargingScheduleType20Converter chargingSchedule_converter; + rapidjson::Value chargingSchedule_json(rapidjson::kArrayType); + ocpp::types::ocpp20::ChargingScheduleTypeConverter chargingSchedule_converter; chargingSchedule_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::ChargingScheduleType20& item : data.chargingSchedule) + for (const ocpp::types::ocpp20::ChargingScheduleType& item : data.chargingSchedule) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -111,7 +111,7 @@ bool NotifyChargingLimit20ReqConverter::toJson(const NotifyChargingLimit20Req& d fill(json, "evseId", data.evseId); // chargingLimit - ocpp::types::ocpp20::ChargingLimitType20Converter chargingLimit_converter; + ocpp::types::ocpp20::ChargingLimitTypeConverter chargingLimit_converter; chargingLimit_converter.setAllocator(allocator); rapidjson::Document chargingLimit_doc; chargingLimit_doc.Parse("{}"); @@ -121,18 +121,18 @@ bool NotifyChargingLimit20ReqConverter::toJson(const NotifyChargingLimit20Req& d return ret; } -/** @brief Convert a NotifyChargingLimit20Conf from a JSON representation */ -bool NotifyChargingLimit20ConfConverter::fromJson(const rapidjson::Value& json, - NotifyChargingLimit20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyChargingLimitConf from a JSON representation */ +bool NotifyChargingLimitConfConverter::fromJson(const rapidjson::Value& json, + NotifyChargingLimitConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -144,15 +144,15 @@ bool NotifyChargingLimit20ConfConverter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a NotifyChargingLimit20Conf to a JSON representation */ -bool NotifyChargingLimit20ConfConverter::toJson(const NotifyChargingLimit20Conf& data, rapidjson::Document& json) +/** @brief Convert a NotifyChargingLimitConf to a JSON representation */ +bool NotifyChargingLimitConfConverter::toJson(const NotifyChargingLimitConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/NotifyChargingLimit20.h b/src/ocpp20/messages/NotifyChargingLimit20.h index 3da35032..db97c874 100644 --- a/src/ocpp20/messages/NotifyChargingLimit20.h +++ b/src/ocpp20/messages/NotifyChargingLimit20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_NOTIFYCHARGINGLIMIT20_H -#define OPENOCPP_NOTIFYCHARGINGLIMIT20_H +#ifndef OPENOCPP_OCPP20_NOTIFYCHARGINGLIMIT_H +#define OPENOCPP_OCPP20_NOTIFYCHARGINGLIMIT_H #include "IMessageConverter.h" @@ -37,34 +37,34 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the NotifyChargingLimit20 messages */ -static const std::string NOTIFYCHARGINGLIMIT20_ACTION = "NotifyChargingLimit"; +/** @brief Action corresponding to the NotifyChargingLimit messages */ +static const std::string NOTIFYCHARGINGLIMIT_ACTION = "NotifyChargingLimit"; -/** @brief NotifyChargingLimit20Req message */ -struct NotifyChargingLimit20Req +/** @brief NotifyChargingLimitReq message */ +struct NotifyChargingLimitReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector chargingSchedule; + std::vector chargingSchedule; /** @brief The charging schedule contained in this notification applies to an EVSE. evseId must be > 0. */ ocpp::types::Optional evseId; /** @brief */ - ocpp::types::ocpp20::ChargingLimitType20 chargingLimit; + ocpp::types::ocpp20::ChargingLimitType chargingLimit; }; -/** @brief NotifyChargingLimit20Conf message */ -struct NotifyChargingLimit20Conf +/** @brief NotifyChargingLimitConf message */ +struct NotifyChargingLimitConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(NotifyChargingLimit20) +MESSAGE_CONVERTERS(NotifyChargingLimit) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_NOTIFYCHARGINGLIMIT20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_NOTIFYCHARGINGLIMIT_H \ No newline at end of file diff --git a/src/ocpp20/messages/NotifyCustomerInformation20.cpp b/src/ocpp20/messages/NotifyCustomerInformation20.cpp index b19aaa79..dcfe75db 100644 --- a/src/ocpp20/messages/NotifyCustomerInformation20.cpp +++ b/src/ocpp20/messages/NotifyCustomerInformation20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a NotifyCustomerInformation20Req from a JSON representation */ -bool NotifyCustomerInformation20ReqConverter::fromJson(const rapidjson::Value& json, - NotifyCustomerInformation20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyCustomerInformationReq from a JSON representation */ +bool NotifyCustomerInformationReqConverter::fromJson(const rapidjson::Value& json, + NotifyCustomerInformationReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -70,15 +70,15 @@ bool NotifyCustomerInformation20ReqConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a NotifyCustomerInformation20Req to a JSON representation */ -bool NotifyCustomerInformation20ReqConverter::toJson(const NotifyCustomerInformation20Req& data, rapidjson::Document& json) +/** @brief Convert a NotifyCustomerInformationReq to a JSON representation */ +bool NotifyCustomerInformationReqConverter::toJson(const NotifyCustomerInformationReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -104,18 +104,18 @@ bool NotifyCustomerInformation20ReqConverter::toJson(const NotifyCustomerInforma return ret; } -/** @brief Convert a NotifyCustomerInformation20Conf from a JSON representation */ -bool NotifyCustomerInformation20ConfConverter::fromJson(const rapidjson::Value& json, - NotifyCustomerInformation20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyCustomerInformationConf from a JSON representation */ +bool NotifyCustomerInformationConfConverter::fromJson(const rapidjson::Value& json, + NotifyCustomerInformationConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -127,15 +127,15 @@ bool NotifyCustomerInformation20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a NotifyCustomerInformation20Conf to a JSON representation */ -bool NotifyCustomerInformation20ConfConverter::toJson(const NotifyCustomerInformation20Conf& data, rapidjson::Document& json) +/** @brief Convert a NotifyCustomerInformationConf to a JSON representation */ +bool NotifyCustomerInformationConfConverter::toJson(const NotifyCustomerInformationConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/NotifyCustomerInformation20.h b/src/ocpp20/messages/NotifyCustomerInformation20.h index d975738b..63ec0c6c 100644 --- a/src/ocpp20/messages/NotifyCustomerInformation20.h +++ b/src/ocpp20/messages/NotifyCustomerInformation20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_NOTIFYCUSTOMERINFORMATION20_H -#define OPENOCPP_NOTIFYCUSTOMERINFORMATION20_H +#ifndef OPENOCPP_OCPP20_NOTIFYCUSTOMERINFORMATION_H +#define OPENOCPP_OCPP20_NOTIFYCUSTOMERINFORMATION_H #include "IMessageConverter.h" @@ -35,14 +35,14 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the NotifyCustomerInformation20 messages */ -static const std::string NOTIFYCUSTOMERINFORMATION20_ACTION = "NotifyCustomerInformation"; +/** @brief Action corresponding to the NotifyCustomerInformation messages */ +static const std::string NOTIFYCUSTOMERINFORMATION_ACTION = "NotifyCustomerInformation"; -/** @brief NotifyCustomerInformation20Req message */ -struct NotifyCustomerInformation20Req +/** @brief NotifyCustomerInformationReq message */ +struct NotifyCustomerInformationReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief (Part of) the requested data. No format specified in which the data is returned. Should be human readable. */ ocpp::types::CiStringType<512u> data; /** @brief “to be continued” indicator. Indicates whether another part of the monitoringData follows in an upcoming notifyMonitoringReportRequest message. Default value when omitted is false. */ @@ -55,18 +55,18 @@ struct NotifyCustomerInformation20Req int requestId; }; -/** @brief NotifyCustomerInformation20Conf message */ -struct NotifyCustomerInformation20Conf +/** @brief NotifyCustomerInformationConf message */ +struct NotifyCustomerInformationConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(NotifyCustomerInformation20) +MESSAGE_CONVERTERS(NotifyCustomerInformation) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_NOTIFYCUSTOMERINFORMATION20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_NOTIFYCUSTOMERINFORMATION_H \ No newline at end of file diff --git a/src/ocpp20/messages/NotifyDisplayMessages20.cpp b/src/ocpp20/messages/NotifyDisplayMessages20.cpp index 4ddac221..d7b9425a 100644 --- a/src/ocpp20/messages/NotifyDisplayMessages20.cpp +++ b/src/ocpp20/messages/NotifyDisplayMessages20.cpp @@ -32,30 +32,30 @@ namespace messages namespace ocpp20 { -/** @brief Convert a NotifyDisplayMessages20Req from a JSON representation */ -bool NotifyDisplayMessages20ReqConverter::fromJson(const rapidjson::Value& json, - NotifyDisplayMessages20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyDisplayMessagesReq from a JSON representation */ +bool NotifyDisplayMessagesReqConverter::fromJson(const rapidjson::Value& json, + NotifyDisplayMessagesReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // messageInfo if (json.HasMember("messageInfo")) { - const rapidjson::Value& messageInfo_json = json["messageInfo"]; - ocpp::types::ocpp20::MessageInfoType20Converter messageInfo_converter; + const rapidjson::Value& messageInfo_json = json["messageInfo"]; + ocpp::types::ocpp20::MessageInfoTypeConverter messageInfo_converter; for (auto it = messageInfo_json.Begin(); ret && (it != messageInfo_json.End()); ++it) { - ocpp::types::ocpp20::MessageInfoType20& item = data.messageInfo.emplace_back(); - ret = ret && messageInfo_converter.fromJson(*it, item, error_code, error_message); + ocpp::types::ocpp20::MessageInfoType& item = data.messageInfo.emplace_back(); + ret = ret && messageInfo_converter.fromJson(*it, item, error_code, error_message); } } @@ -73,15 +73,15 @@ bool NotifyDisplayMessages20ReqConverter::fromJson(const rapidjson::Value& j return ret; } -/** @brief Convert a NotifyDisplayMessages20Req to a JSON representation */ -bool NotifyDisplayMessages20ReqConverter::toJson(const NotifyDisplayMessages20Req& data, rapidjson::Document& json) +/** @brief Convert a NotifyDisplayMessagesReq to a JSON representation */ +bool NotifyDisplayMessagesReqConverter::toJson(const NotifyDisplayMessagesReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -93,10 +93,10 @@ bool NotifyDisplayMessages20ReqConverter::toJson(const NotifyDisplayMessages20Re if (!data.messageInfo.empty()) { - rapidjson::Value messageInfo_json(rapidjson::kArrayType); - ocpp::types::ocpp20::MessageInfoType20Converter messageInfo_converter; + rapidjson::Value messageInfo_json(rapidjson::kArrayType); + ocpp::types::ocpp20::MessageInfoTypeConverter messageInfo_converter; messageInfo_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::MessageInfoType20& item : data.messageInfo) + for (const ocpp::types::ocpp20::MessageInfoType& item : data.messageInfo) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -115,18 +115,18 @@ bool NotifyDisplayMessages20ReqConverter::toJson(const NotifyDisplayMessages20Re return ret; } -/** @brief Convert a NotifyDisplayMessages20Conf from a JSON representation */ -bool NotifyDisplayMessages20ConfConverter::fromJson(const rapidjson::Value& json, - NotifyDisplayMessages20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyDisplayMessagesConf from a JSON representation */ +bool NotifyDisplayMessagesConfConverter::fromJson(const rapidjson::Value& json, + NotifyDisplayMessagesConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -138,15 +138,15 @@ bool NotifyDisplayMessages20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a NotifyDisplayMessages20Conf to a JSON representation */ -bool NotifyDisplayMessages20ConfConverter::toJson(const NotifyDisplayMessages20Conf& data, rapidjson::Document& json) +/** @brief Convert a NotifyDisplayMessagesConf to a JSON representation */ +bool NotifyDisplayMessagesConfConverter::toJson(const NotifyDisplayMessagesConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/NotifyDisplayMessages20.h b/src/ocpp20/messages/NotifyDisplayMessages20.h index ca58bbcd..db87582b 100644 --- a/src/ocpp20/messages/NotifyDisplayMessages20.h +++ b/src/ocpp20/messages/NotifyDisplayMessages20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_NOTIFYDISPLAYMESSAGES20_H -#define OPENOCPP_NOTIFYDISPLAYMESSAGES20_H +#ifndef OPENOCPP_OCPP20_NOTIFYDISPLAYMESSAGES_H +#define OPENOCPP_OCPP20_NOTIFYDISPLAYMESSAGES_H #include "IMessageConverter.h" @@ -36,34 +36,34 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the NotifyDisplayMessages20 messages */ -static const std::string NOTIFYDISPLAYMESSAGES20_ACTION = "NotifyDisplayMessages"; +/** @brief Action corresponding to the NotifyDisplayMessages messages */ +static const std::string NOTIFYDISPLAYMESSAGES_ACTION = "NotifyDisplayMessages"; -/** @brief NotifyDisplayMessages20Req message */ -struct NotifyDisplayMessages20Req +/** @brief NotifyDisplayMessagesReq message */ +struct NotifyDisplayMessagesReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector messageInfo; + std::vector messageInfo; /** @brief The id of the <<getdisplaymessagesrequest,GetDisplayMessagesRequest>> that requested this message. */ int requestId; /** @brief "to be continued" indicator. Indicates whether another part of the report follows in an upcoming NotifyDisplayMessagesRequest message. Default value when omitted is false. */ ocpp::types::Optional tbc; }; -/** @brief NotifyDisplayMessages20Conf message */ -struct NotifyDisplayMessages20Conf +/** @brief NotifyDisplayMessagesConf message */ +struct NotifyDisplayMessagesConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(NotifyDisplayMessages20) +MESSAGE_CONVERTERS(NotifyDisplayMessages) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_NOTIFYDISPLAYMESSAGES20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_NOTIFYDISPLAYMESSAGES_H \ No newline at end of file diff --git a/src/ocpp20/messages/NotifyEVChargingNeeds20.cpp b/src/ocpp20/messages/NotifyEVChargingNeeds20.cpp index 8f83ab68..1978f462 100644 --- a/src/ocpp20/messages/NotifyEVChargingNeeds20.cpp +++ b/src/ocpp20/messages/NotifyEVChargingNeeds20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a NotifyEVChargingNeeds20Req from a JSON representation */ -bool NotifyEVChargingNeeds20ReqConverter::fromJson(const rapidjson::Value& json, - NotifyEVChargingNeeds20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyEVChargingNeedsReq from a JSON representation */ +bool NotifyEVChargingNeedsReqConverter::fromJson(const rapidjson::Value& json, + NotifyEVChargingNeedsReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -51,7 +51,7 @@ bool NotifyEVChargingNeeds20ReqConverter::fromJson(const rapidjson::Value& j extract(json, "maxScheduleTuples", data.maxScheduleTuples); // chargingNeeds - ocpp::types::ocpp20::ChargingNeedsType20Converter chargingNeeds_converter; + ocpp::types::ocpp20::ChargingNeedsTypeConverter chargingNeeds_converter; ret = ret && chargingNeeds_converter.fromJson(json["chargingNeeds"], data.chargingNeeds, error_code, error_message); // evseId @@ -65,15 +65,15 @@ bool NotifyEVChargingNeeds20ReqConverter::fromJson(const rapidjson::Value& j return ret; } -/** @brief Convert a NotifyEVChargingNeeds20Req to a JSON representation */ -bool NotifyEVChargingNeeds20ReqConverter::toJson(const NotifyEVChargingNeeds20Req& data, rapidjson::Document& json) +/** @brief Convert a NotifyEVChargingNeedsReq to a JSON representation */ +bool NotifyEVChargingNeedsReqConverter::toJson(const NotifyEVChargingNeedsReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -85,7 +85,7 @@ bool NotifyEVChargingNeeds20ReqConverter::toJson(const NotifyEVChargingNeeds20Re fill(json, "maxScheduleTuples", data.maxScheduleTuples); // chargingNeeds - ocpp::types::ocpp20::ChargingNeedsType20Converter chargingNeeds_converter; + ocpp::types::ocpp20::ChargingNeedsTypeConverter chargingNeeds_converter; chargingNeeds_converter.setAllocator(allocator); rapidjson::Document chargingNeeds_doc; chargingNeeds_doc.Parse("{}"); @@ -98,28 +98,28 @@ bool NotifyEVChargingNeeds20ReqConverter::toJson(const NotifyEVChargingNeeds20Re return ret; } -/** @brief Convert a NotifyEVChargingNeeds20Conf from a JSON representation */ -bool NotifyEVChargingNeeds20ConfConverter::fromJson(const rapidjson::Value& json, - NotifyEVChargingNeeds20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyEVChargingNeedsConf from a JSON representation */ +bool NotifyEVChargingNeedsConfConverter::fromJson(const rapidjson::Value& json, + NotifyEVChargingNeedsConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::NotifyEVChargingNeedsStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::NotifyEVChargingNeedsStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -131,15 +131,15 @@ bool NotifyEVChargingNeeds20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a NotifyEVChargingNeeds20Conf to a JSON representation */ -bool NotifyEVChargingNeeds20ConfConverter::toJson(const NotifyEVChargingNeeds20Conf& data, rapidjson::Document& json) +/** @brief Convert a NotifyEVChargingNeedsConf to a JSON representation */ +bool NotifyEVChargingNeedsConfConverter::toJson(const NotifyEVChargingNeedsConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -148,12 +148,12 @@ bool NotifyEVChargingNeeds20ConfConverter::toJson(const NotifyEVChargingNeeds20C } // status - fill(json, "status", ocpp::types::ocpp20::NotifyEVChargingNeedsStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::NotifyEVChargingNeedsStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/NotifyEVChargingNeeds20.h b/src/ocpp20/messages/NotifyEVChargingNeeds20.h index ad14cb14..8ca55c87 100644 --- a/src/ocpp20/messages/NotifyEVChargingNeeds20.h +++ b/src/ocpp20/messages/NotifyEVChargingNeeds20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_NOTIFYEVCHARGINGNEEDS20_H -#define OPENOCPP_NOTIFYEVCHARGINGNEEDS20_H +#ifndef OPENOCPP_OCPP20_NOTIFYEVCHARGINGNEEDS_H +#define OPENOCPP_OCPP20_NOTIFYEVCHARGINGNEEDS_H #include "IMessageConverter.h" @@ -38,38 +38,38 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the NotifyEVChargingNeeds20 messages */ -static const std::string NOTIFYEVCHARGINGNEEDS20_ACTION = "NotifyEVChargingNeeds"; +/** @brief Action corresponding to the NotifyEVChargingNeeds messages */ +static const std::string NOTIFYEVCHARGINGNEEDS_ACTION = "NotifyEVChargingNeeds"; -/** @brief NotifyEVChargingNeeds20Req message */ -struct NotifyEVChargingNeeds20Req +/** @brief NotifyEVChargingNeedsReq message */ +struct NotifyEVChargingNeedsReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Contains the maximum schedule tuples the car supports per schedule. */ ocpp::types::Optional maxScheduleTuples; /** @brief */ - ocpp::types::ocpp20::ChargingNeedsType20 chargingNeeds; + ocpp::types::ocpp20::ChargingNeedsType chargingNeeds; /** @brief Defines the EVSE and connector to which the EV is connected. EvseId may not be 0. */ int evseId; }; -/** @brief NotifyEVChargingNeeds20Conf message */ -struct NotifyEVChargingNeeds20Conf +/** @brief NotifyEVChargingNeedsConf message */ +struct NotifyEVChargingNeedsConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::NotifyEVChargingNeedsStatusEnumType20 status; + ocpp::types::ocpp20::NotifyEVChargingNeedsStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(NotifyEVChargingNeeds20) +MESSAGE_CONVERTERS(NotifyEVChargingNeeds) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_NOTIFYEVCHARGINGNEEDS20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_NOTIFYEVCHARGINGNEEDS_H \ No newline at end of file diff --git a/src/ocpp20/messages/NotifyEVChargingSchedule20.cpp b/src/ocpp20/messages/NotifyEVChargingSchedule20.cpp index 460c8a6a..f7557862 100644 --- a/src/ocpp20/messages/NotifyEVChargingSchedule20.cpp +++ b/src/ocpp20/messages/NotifyEVChargingSchedule20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a NotifyEVChargingSchedule20Req from a JSON representation */ -bool NotifyEVChargingSchedule20ReqConverter::fromJson(const rapidjson::Value& json, - NotifyEVChargingSchedule20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyEVChargingScheduleReq from a JSON representation */ +bool NotifyEVChargingScheduleReqConverter::fromJson(const rapidjson::Value& json, + NotifyEVChargingScheduleReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -51,7 +51,7 @@ bool NotifyEVChargingSchedule20ReqConverter::fromJson(const rapidjson::Value& ret = ret && extract(json, "timeBase", data.timeBase, error_message); // chargingSchedule - ocpp::types::ocpp20::ChargingScheduleType20Converter chargingSchedule_converter; + ocpp::types::ocpp20::ChargingScheduleTypeConverter chargingSchedule_converter; ret = ret && chargingSchedule_converter.fromJson(json["chargingSchedule"], data.chargingSchedule, error_code, error_message); // evseId @@ -65,15 +65,15 @@ bool NotifyEVChargingSchedule20ReqConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a NotifyEVChargingSchedule20Req to a JSON representation */ -bool NotifyEVChargingSchedule20ReqConverter::toJson(const NotifyEVChargingSchedule20Req& data, rapidjson::Document& json) +/** @brief Convert a NotifyEVChargingScheduleReq to a JSON representation */ +bool NotifyEVChargingScheduleReqConverter::toJson(const NotifyEVChargingScheduleReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -85,7 +85,7 @@ bool NotifyEVChargingSchedule20ReqConverter::toJson(const NotifyEVChargingSchedu fill(json, "timeBase", data.timeBase); // chargingSchedule - ocpp::types::ocpp20::ChargingScheduleType20Converter chargingSchedule_converter; + ocpp::types::ocpp20::ChargingScheduleTypeConverter chargingSchedule_converter; chargingSchedule_converter.setAllocator(allocator); rapidjson::Document chargingSchedule_doc; chargingSchedule_doc.Parse("{}"); @@ -98,28 +98,28 @@ bool NotifyEVChargingSchedule20ReqConverter::toJson(const NotifyEVChargingSchedu return ret; } -/** @brief Convert a NotifyEVChargingSchedule20Conf from a JSON representation */ -bool NotifyEVChargingSchedule20ConfConverter::fromJson(const rapidjson::Value& json, - NotifyEVChargingSchedule20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyEVChargingScheduleConf from a JSON representation */ +bool NotifyEVChargingScheduleConfConverter::fromJson(const rapidjson::Value& json, + NotifyEVChargingScheduleConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GenericStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GenericStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -131,15 +131,15 @@ bool NotifyEVChargingSchedule20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a NotifyEVChargingSchedule20Conf to a JSON representation */ -bool NotifyEVChargingSchedule20ConfConverter::toJson(const NotifyEVChargingSchedule20Conf& data, rapidjson::Document& json) +/** @brief Convert a NotifyEVChargingScheduleConf to a JSON representation */ +bool NotifyEVChargingScheduleConfConverter::toJson(const NotifyEVChargingScheduleConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -148,12 +148,12 @@ bool NotifyEVChargingSchedule20ConfConverter::toJson(const NotifyEVChargingSched } // status - fill(json, "status", ocpp::types::ocpp20::GenericStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GenericStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/NotifyEVChargingSchedule20.h b/src/ocpp20/messages/NotifyEVChargingSchedule20.h index 45a2dc0d..80d5298c 100644 --- a/src/ocpp20/messages/NotifyEVChargingSchedule20.h +++ b/src/ocpp20/messages/NotifyEVChargingSchedule20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_NOTIFYEVCHARGINGSCHEDULE20_H -#define OPENOCPP_NOTIFYEVCHARGINGSCHEDULE20_H +#ifndef OPENOCPP_OCPP20_NOTIFYEVCHARGINGSCHEDULE_H +#define OPENOCPP_OCPP20_NOTIFYEVCHARGINGSCHEDULE_H #include "IMessageConverter.h" @@ -38,38 +38,38 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the NotifyEVChargingSchedule20 messages */ -static const std::string NOTIFYEVCHARGINGSCHEDULE20_ACTION = "NotifyEVChargingSchedule"; +/** @brief Action corresponding to the NotifyEVChargingSchedule messages */ +static const std::string NOTIFYEVCHARGINGSCHEDULE_ACTION = "NotifyEVChargingSchedule"; -/** @brief NotifyEVChargingSchedule20Req message */ -struct NotifyEVChargingSchedule20Req +/** @brief NotifyEVChargingScheduleReq message */ +struct NotifyEVChargingScheduleReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Periods contained in the charging profile are relative to this point in time. */ ocpp::types::DateTime timeBase; /** @brief */ - ocpp::types::ocpp20::ChargingScheduleType20 chargingSchedule; + ocpp::types::ocpp20::ChargingScheduleType chargingSchedule; /** @brief The charging schedule contained in this notification applies to an EVSE. EvseId must be > 0. */ int evseId; }; -/** @brief NotifyEVChargingSchedule20Conf message */ -struct NotifyEVChargingSchedule20Conf +/** @brief NotifyEVChargingScheduleConf message */ +struct NotifyEVChargingScheduleConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GenericStatusEnumType20 status; + ocpp::types::ocpp20::GenericStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(NotifyEVChargingSchedule20) +MESSAGE_CONVERTERS(NotifyEVChargingSchedule) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_NOTIFYEVCHARGINGSCHEDULE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_NOTIFYEVCHARGINGSCHEDULE_H \ No newline at end of file diff --git a/src/ocpp20/messages/NotifyEvent20.cpp b/src/ocpp20/messages/NotifyEvent20.cpp index 5f7fb2a7..840801c8 100644 --- a/src/ocpp20/messages/NotifyEvent20.cpp +++ b/src/ocpp20/messages/NotifyEvent20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a NotifyEvent20Req from a JSON representation */ -bool NotifyEvent20ReqConverter::fromJson(const rapidjson::Value& json, - NotifyEvent20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyEventReq from a JSON representation */ +bool NotifyEventReqConverter::fromJson(const rapidjson::Value& json, + NotifyEventReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -59,12 +59,12 @@ bool NotifyEvent20ReqConverter::fromJson(const rapidjson::Value& json, // eventData if (json.HasMember("eventData")) { - const rapidjson::Value& eventData_json = json["eventData"]; - ocpp::types::ocpp20::EventDataType20Converter eventData_converter; + const rapidjson::Value& eventData_json = json["eventData"]; + ocpp::types::ocpp20::EventDataTypeConverter eventData_converter; for (auto it = eventData_json.Begin(); ret && (it != eventData_json.End()); ++it) { - ocpp::types::ocpp20::EventDataType20& item = data.eventData.emplace_back(); - ret = ret && eventData_converter.fromJson(*it, item, error_code, error_message); + ocpp::types::ocpp20::EventDataType& item = data.eventData.emplace_back(); + ret = ret && eventData_converter.fromJson(*it, item, error_code, error_message); } } @@ -76,15 +76,15 @@ bool NotifyEvent20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a NotifyEvent20Req to a JSON representation */ -bool NotifyEvent20ReqConverter::toJson(const NotifyEvent20Req& data, rapidjson::Document& json) +/** @brief Convert a NotifyEventReq to a JSON representation */ +bool NotifyEventReqConverter::toJson(const NotifyEventReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -103,10 +103,10 @@ bool NotifyEvent20ReqConverter::toJson(const NotifyEvent20Req& data, rapidjson:: // eventData - rapidjson::Value eventData_json(rapidjson::kArrayType); - ocpp::types::ocpp20::EventDataType20Converter eventData_converter; + rapidjson::Value eventData_json(rapidjson::kArrayType); + ocpp::types::ocpp20::EventDataTypeConverter eventData_converter; eventData_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::EventDataType20& item : data.eventData) + for (const ocpp::types::ocpp20::EventDataType& item : data.eventData) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -118,18 +118,18 @@ bool NotifyEvent20ReqConverter::toJson(const NotifyEvent20Req& data, rapidjson:: return ret; } -/** @brief Convert a NotifyEvent20Conf from a JSON representation */ -bool NotifyEvent20ConfConverter::fromJson(const rapidjson::Value& json, - NotifyEvent20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyEventConf from a JSON representation */ +bool NotifyEventConfConverter::fromJson(const rapidjson::Value& json, + NotifyEventConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -141,15 +141,15 @@ bool NotifyEvent20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a NotifyEvent20Conf to a JSON representation */ -bool NotifyEvent20ConfConverter::toJson(const NotifyEvent20Conf& data, rapidjson::Document& json) +/** @brief Convert a NotifyEventConf to a JSON representation */ +bool NotifyEventConfConverter::toJson(const NotifyEventConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/NotifyEvent20.h b/src/ocpp20/messages/NotifyEvent20.h index ccc3f895..89576e8c 100644 --- a/src/ocpp20/messages/NotifyEvent20.h +++ b/src/ocpp20/messages/NotifyEvent20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_NOTIFYEVENT20_H -#define OPENOCPP_NOTIFYEVENT20_H +#ifndef OPENOCPP_OCPP20_NOTIFYEVENT_H +#define OPENOCPP_OCPP20_NOTIFYEVENT_H #include "IMessageConverter.h" @@ -36,14 +36,14 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the NotifyEvent20 messages */ -static const std::string NOTIFYEVENT20_ACTION = "NotifyEvent"; +/** @brief Action corresponding to the NotifyEvent messages */ +static const std::string NOTIFYEVENT_ACTION = "NotifyEvent"; -/** @brief NotifyEvent20Req message */ -struct NotifyEvent20Req +/** @brief NotifyEventReq message */ +struct NotifyEventReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Timestamp of the moment this message was generated at the Charging Station. */ ocpp::types::DateTime generatedAt; /** @brief “to be continued” indicator. Indicates whether another part of the report follows in an upcoming notifyEventRequest message. Default value when omitted is false. */ @@ -51,21 +51,21 @@ struct NotifyEvent20Req /** @brief Sequence number of this message. First message starts at 0. */ int seqNo; /** @brief */ - std::vector eventData; + std::vector eventData; }; -/** @brief NotifyEvent20Conf message */ -struct NotifyEvent20Conf +/** @brief NotifyEventConf message */ +struct NotifyEventConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(NotifyEvent20) +MESSAGE_CONVERTERS(NotifyEvent) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_NOTIFYEVENT20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_NOTIFYEVENT_H \ No newline at end of file diff --git a/src/ocpp20/messages/NotifyMonitoringReport20.cpp b/src/ocpp20/messages/NotifyMonitoringReport20.cpp index 282d728b..03685337 100644 --- a/src/ocpp20/messages/NotifyMonitoringReport20.cpp +++ b/src/ocpp20/messages/NotifyMonitoringReport20.cpp @@ -32,30 +32,30 @@ namespace messages namespace ocpp20 { -/** @brief Convert a NotifyMonitoringReport20Req from a JSON representation */ -bool NotifyMonitoringReport20ReqConverter::fromJson(const rapidjson::Value& json, - NotifyMonitoringReport20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyMonitoringReportReq from a JSON representation */ +bool NotifyMonitoringReportReqConverter::fromJson(const rapidjson::Value& json, + NotifyMonitoringReportReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // monitor if (json.HasMember("monitor")) { - const rapidjson::Value& monitor_json = json["monitor"]; - ocpp::types::ocpp20::MonitoringDataType20Converter monitor_converter; + const rapidjson::Value& monitor_json = json["monitor"]; + ocpp::types::ocpp20::MonitoringDataTypeConverter monitor_converter; for (auto it = monitor_json.Begin(); ret && (it != monitor_json.End()); ++it) { - ocpp::types::ocpp20::MonitoringDataType20& item = data.monitor.emplace_back(); - ret = ret && monitor_converter.fromJson(*it, item, error_code, error_message); + ocpp::types::ocpp20::MonitoringDataType& item = data.monitor.emplace_back(); + ret = ret && monitor_converter.fromJson(*it, item, error_code, error_message); } } @@ -79,15 +79,15 @@ bool NotifyMonitoringReport20ReqConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a NotifyMonitoringReport20Req to a JSON representation */ -bool NotifyMonitoringReport20ReqConverter::toJson(const NotifyMonitoringReport20Req& data, rapidjson::Document& json) +/** @brief Convert a NotifyMonitoringReportReq to a JSON representation */ +bool NotifyMonitoringReportReqConverter::toJson(const NotifyMonitoringReportReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -99,10 +99,10 @@ bool NotifyMonitoringReport20ReqConverter::toJson(const NotifyMonitoringReport20 if (!data.monitor.empty()) { - rapidjson::Value monitor_json(rapidjson::kArrayType); - ocpp::types::ocpp20::MonitoringDataType20Converter monitor_converter; + rapidjson::Value monitor_json(rapidjson::kArrayType); + ocpp::types::ocpp20::MonitoringDataTypeConverter monitor_converter; monitor_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::MonitoringDataType20& item : data.monitor) + for (const ocpp::types::ocpp20::MonitoringDataType& item : data.monitor) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -127,18 +127,18 @@ bool NotifyMonitoringReport20ReqConverter::toJson(const NotifyMonitoringReport20 return ret; } -/** @brief Convert a NotifyMonitoringReport20Conf from a JSON representation */ -bool NotifyMonitoringReport20ConfConverter::fromJson(const rapidjson::Value& json, - NotifyMonitoringReport20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyMonitoringReportConf from a JSON representation */ +bool NotifyMonitoringReportConfConverter::fromJson(const rapidjson::Value& json, + NotifyMonitoringReportConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -150,15 +150,15 @@ bool NotifyMonitoringReport20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a NotifyMonitoringReport20Conf to a JSON representation */ -bool NotifyMonitoringReport20ConfConverter::toJson(const NotifyMonitoringReport20Conf& data, rapidjson::Document& json) +/** @brief Convert a NotifyMonitoringReportConf to a JSON representation */ +bool NotifyMonitoringReportConfConverter::toJson(const NotifyMonitoringReportConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/NotifyMonitoringReport20.h b/src/ocpp20/messages/NotifyMonitoringReport20.h index f316df9c..bdc1452f 100644 --- a/src/ocpp20/messages/NotifyMonitoringReport20.h +++ b/src/ocpp20/messages/NotifyMonitoringReport20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_NOTIFYMONITORINGREPORT20_H -#define OPENOCPP_NOTIFYMONITORINGREPORT20_H +#ifndef OPENOCPP_OCPP20_NOTIFYMONITORINGREPORT_H +#define OPENOCPP_OCPP20_NOTIFYMONITORINGREPORT_H #include "IMessageConverter.h" @@ -36,16 +36,16 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the NotifyMonitoringReport20 messages */ -static const std::string NOTIFYMONITORINGREPORT20_ACTION = "NotifyMonitoringReport"; +/** @brief Action corresponding to the NotifyMonitoringReport messages */ +static const std::string NOTIFYMONITORINGREPORT_ACTION = "NotifyMonitoringReport"; -/** @brief NotifyMonitoringReport20Req message */ -struct NotifyMonitoringReport20Req +/** @brief NotifyMonitoringReportReq message */ +struct NotifyMonitoringReportReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector monitor; + std::vector monitor; /** @brief The id of the GetMonitoringRequest that requested this report. */ int requestId; /** @brief “to be continued” indicator. Indicates whether another part of the monitoringData follows in an upcoming notifyMonitoringReportRequest message. Default value when omitted is false. */ @@ -56,18 +56,18 @@ struct NotifyMonitoringReport20Req ocpp::types::DateTime generatedAt; }; -/** @brief NotifyMonitoringReport20Conf message */ -struct NotifyMonitoringReport20Conf +/** @brief NotifyMonitoringReportConf message */ +struct NotifyMonitoringReportConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(NotifyMonitoringReport20) +MESSAGE_CONVERTERS(NotifyMonitoringReport) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_NOTIFYMONITORINGREPORT20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_NOTIFYMONITORINGREPORT_H \ No newline at end of file diff --git a/src/ocpp20/messages/NotifyReport20.cpp b/src/ocpp20/messages/NotifyReport20.cpp index 48597ad4..4bc4576d 100644 --- a/src/ocpp20/messages/NotifyReport20.cpp +++ b/src/ocpp20/messages/NotifyReport20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a NotifyReport20Req from a JSON representation */ -bool NotifyReport20ReqConverter::fromJson(const rapidjson::Value& json, - NotifyReport20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyReportReq from a JSON representation */ +bool NotifyReportReqConverter::fromJson(const rapidjson::Value& json, + NotifyReportReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -56,12 +56,12 @@ bool NotifyReport20ReqConverter::fromJson(const rapidjson::Value& json, // reportData if (json.HasMember("reportData")) { - const rapidjson::Value& reportData_json = json["reportData"]; - ocpp::types::ocpp20::ReportDataType20Converter reportData_converter; + const rapidjson::Value& reportData_json = json["reportData"]; + ocpp::types::ocpp20::ReportDataTypeConverter reportData_converter; for (auto it = reportData_json.Begin(); ret && (it != reportData_json.End()); ++it) { - ocpp::types::ocpp20::ReportDataType20& item = data.reportData.emplace_back(); - ret = ret && reportData_converter.fromJson(*it, item, error_code, error_message); + ocpp::types::ocpp20::ReportDataType& item = data.reportData.emplace_back(); + ret = ret && reportData_converter.fromJson(*it, item, error_code, error_message); } } @@ -79,15 +79,15 @@ bool NotifyReport20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a NotifyReport20Req to a JSON representation */ -bool NotifyReport20ReqConverter::toJson(const NotifyReport20Req& data, rapidjson::Document& json) +/** @brief Convert a NotifyReportReq to a JSON representation */ +bool NotifyReportReqConverter::toJson(const NotifyReportReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -105,10 +105,10 @@ bool NotifyReport20ReqConverter::toJson(const NotifyReport20Req& data, rapidjson if (!data.reportData.empty()) { - rapidjson::Value reportData_json(rapidjson::kArrayType); - ocpp::types::ocpp20::ReportDataType20Converter reportData_converter; + rapidjson::Value reportData_json(rapidjson::kArrayType); + ocpp::types::ocpp20::ReportDataTypeConverter reportData_converter; reportData_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::ReportDataType20& item : data.reportData) + for (const ocpp::types::ocpp20::ReportDataType& item : data.reportData) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -127,18 +127,18 @@ bool NotifyReport20ReqConverter::toJson(const NotifyReport20Req& data, rapidjson return ret; } -/** @brief Convert a NotifyReport20Conf from a JSON representation */ -bool NotifyReport20ConfConverter::fromJson(const rapidjson::Value& json, - NotifyReport20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a NotifyReportConf from a JSON representation */ +bool NotifyReportConfConverter::fromJson(const rapidjson::Value& json, + NotifyReportConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -150,15 +150,15 @@ bool NotifyReport20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a NotifyReport20Conf to a JSON representation */ -bool NotifyReport20ConfConverter::toJson(const NotifyReport20Conf& data, rapidjson::Document& json) +/** @brief Convert a NotifyReportConf to a JSON representation */ +bool NotifyReportConfConverter::toJson(const NotifyReportConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/NotifyReport20.h b/src/ocpp20/messages/NotifyReport20.h index 49c53df4..e18b3d19 100644 --- a/src/ocpp20/messages/NotifyReport20.h +++ b/src/ocpp20/messages/NotifyReport20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_NOTIFYREPORT20_H -#define OPENOCPP_NOTIFYREPORT20_H +#ifndef OPENOCPP_OCPP20_NOTIFYREPORT_H +#define OPENOCPP_OCPP20_NOTIFYREPORT_H #include "IMessageConverter.h" @@ -36,38 +36,38 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the NotifyReport20 messages */ -static const std::string NOTIFYREPORT20_ACTION = "NotifyReport"; +/** @brief Action corresponding to the NotifyReport messages */ +static const std::string NOTIFYREPORT_ACTION = "NotifyReport"; -/** @brief NotifyReport20Req message */ -struct NotifyReport20Req +/** @brief NotifyReportReq message */ +struct NotifyReportReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief The id of the GetReportRequest or GetBaseReportRequest that requested this report */ int requestId; /** @brief Timestamp of the moment this message was generated at the Charging Station. */ ocpp::types::DateTime generatedAt; /** @brief */ - std::vector reportData; + std::vector reportData; /** @brief “to be continued” indicator. Indicates whether another part of the report follows in an upcoming notifyReportRequest message. Default value when omitted is false. */ ocpp::types::Optional tbc; /** @brief Sequence number of this message. First message starts at 0. */ int seqNo; }; -/** @brief NotifyReport20Conf message */ -struct NotifyReport20Conf +/** @brief NotifyReportConf message */ +struct NotifyReportConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(NotifyReport20) +MESSAGE_CONVERTERS(NotifyReport) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_NOTIFYREPORT20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_NOTIFYREPORT_H \ No newline at end of file diff --git a/src/ocpp20/messages/PublishFirmware20.cpp b/src/ocpp20/messages/PublishFirmware20.cpp index 8a3c64cc..6c9d38f2 100644 --- a/src/ocpp20/messages/PublishFirmware20.cpp +++ b/src/ocpp20/messages/PublishFirmware20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a PublishFirmware20Req from a JSON representation */ -bool PublishFirmware20ReqConverter::fromJson(const rapidjson::Value& json, - PublishFirmware20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a PublishFirmwareReq from a JSON representation */ +bool PublishFirmwareReqConverter::fromJson(const rapidjson::Value& json, + PublishFirmwareReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -70,15 +70,15 @@ bool PublishFirmware20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a PublishFirmware20Req to a JSON representation */ -bool PublishFirmware20ReqConverter::toJson(const PublishFirmware20Req& data, rapidjson::Document& json) +/** @brief Convert a PublishFirmwareReq to a JSON representation */ +bool PublishFirmwareReqConverter::toJson(const PublishFirmwareReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -104,28 +104,28 @@ bool PublishFirmware20ReqConverter::toJson(const PublishFirmware20Req& data, rap return ret; } -/** @brief Convert a PublishFirmware20Conf from a JSON representation */ -bool PublishFirmware20ConfConverter::fromJson(const rapidjson::Value& json, - PublishFirmware20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a PublishFirmwareConf from a JSON representation */ +bool PublishFirmwareConfConverter::fromJson(const rapidjson::Value& json, + PublishFirmwareConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GenericStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GenericStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -137,15 +137,15 @@ bool PublishFirmware20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a PublishFirmware20Conf to a JSON representation */ -bool PublishFirmware20ConfConverter::toJson(const PublishFirmware20Conf& data, rapidjson::Document& json) +/** @brief Convert a PublishFirmwareConf to a JSON representation */ +bool PublishFirmwareConfConverter::toJson(const PublishFirmwareConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -154,12 +154,12 @@ bool PublishFirmware20ConfConverter::toJson(const PublishFirmware20Conf& data, r } // status - fill(json, "status", ocpp::types::ocpp20::GenericStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GenericStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/PublishFirmware20.h b/src/ocpp20/messages/PublishFirmware20.h index 200cd250..32d5f04f 100644 --- a/src/ocpp20/messages/PublishFirmware20.h +++ b/src/ocpp20/messages/PublishFirmware20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_PUBLISHFIRMWARE20_H -#define OPENOCPP_PUBLISHFIRMWARE20_H +#ifndef OPENOCPP_OCPP20_PUBLISHFIRMWARE_H +#define OPENOCPP_OCPP20_PUBLISHFIRMWARE_H #include "IMessageConverter.h" @@ -37,14 +37,14 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the PublishFirmware20 messages */ -static const std::string PUBLISHFIRMWARE20_ACTION = "PublishFirmware"; +/** @brief Action corresponding to the PublishFirmware messages */ +static const std::string PUBLISHFIRMWARE_ACTION = "PublishFirmware"; -/** @brief PublishFirmware20Req message */ -struct PublishFirmware20Req +/** @brief PublishFirmwareReq message */ +struct PublishFirmwareReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief This contains a string containing a URI pointing to a location from which to retrieve the firmware. */ ocpp::types::CiStringType<512u> location; @@ -65,22 +65,22 @@ between attempts. */ ocpp::types::Optional retryInterval; }; -/** @brief PublishFirmware20Conf message */ -struct PublishFirmware20Conf +/** @brief PublishFirmwareConf message */ +struct PublishFirmwareConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GenericStatusEnumType20 status; + ocpp::types::ocpp20::GenericStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(PublishFirmware20) +MESSAGE_CONVERTERS(PublishFirmware) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_PUBLISHFIRMWARE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_PUBLISHFIRMWARE_H \ No newline at end of file diff --git a/src/ocpp20/messages/PublishFirmwareStatusNotification20.cpp b/src/ocpp20/messages/PublishFirmwareStatusNotification20.cpp index c4110d69..c57086c7 100644 --- a/src/ocpp20/messages/PublishFirmwareStatusNotification20.cpp +++ b/src/ocpp20/messages/PublishFirmwareStatusNotification20.cpp @@ -32,23 +32,23 @@ namespace messages namespace ocpp20 { -/** @brief Convert a PublishFirmwareStatusNotification20Req from a JSON representation */ -bool PublishFirmwareStatusNotification20ReqConverter::fromJson(const rapidjson::Value& json, - PublishFirmwareStatusNotification20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a PublishFirmwareStatusNotificationReq from a JSON representation */ +bool PublishFirmwareStatusNotificationReqConverter::fromJson(const rapidjson::Value& json, + PublishFirmwareStatusNotificationReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::PublishFirmwareStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::PublishFirmwareStatusEnumTypeHelper.fromString(json["status"].GetString()); // location if (json.HasMember("location")) @@ -72,15 +72,15 @@ bool PublishFirmwareStatusNotification20ReqConverter::fromJson(const rapidjson:: return ret; } -/** @brief Convert a PublishFirmwareStatusNotification20Req to a JSON representation */ -bool PublishFirmwareStatusNotification20ReqConverter::toJson(const PublishFirmwareStatusNotification20Req& data, rapidjson::Document& json) +/** @brief Convert a PublishFirmwareStatusNotificationReq to a JSON representation */ +bool PublishFirmwareStatusNotificationReqConverter::toJson(const PublishFirmwareStatusNotificationReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -89,7 +89,7 @@ bool PublishFirmwareStatusNotification20ReqConverter::toJson(const PublishFirmwa } // status - fill(json, "status", ocpp::types::ocpp20::PublishFirmwareStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::PublishFirmwareStatusEnumTypeHelper.toString(data.status)); // location if (!data.location.empty()) @@ -109,18 +109,18 @@ bool PublishFirmwareStatusNotification20ReqConverter::toJson(const PublishFirmwa return ret; } -/** @brief Convert a PublishFirmwareStatusNotification20Conf from a JSON representation */ -bool PublishFirmwareStatusNotification20ConfConverter::fromJson(const rapidjson::Value& json, - PublishFirmwareStatusNotification20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a PublishFirmwareStatusNotificationConf from a JSON representation */ +bool PublishFirmwareStatusNotificationConfConverter::fromJson(const rapidjson::Value& json, + PublishFirmwareStatusNotificationConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -132,16 +132,15 @@ bool PublishFirmwareStatusNotification20ConfConverter::fromJson(const rapidjson: return ret; } -/** @brief Convert a PublishFirmwareStatusNotification20Conf to a JSON representation */ -bool PublishFirmwareStatusNotification20ConfConverter::toJson(const PublishFirmwareStatusNotification20Conf& data, - rapidjson::Document& json) +/** @brief Convert a PublishFirmwareStatusNotificationConf to a JSON representation */ +bool PublishFirmwareStatusNotificationConfConverter::toJson(const PublishFirmwareStatusNotificationConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/PublishFirmwareStatusNotification20.h b/src/ocpp20/messages/PublishFirmwareStatusNotification20.h index 6ddbcfd2..4a3085a0 100644 --- a/src/ocpp20/messages/PublishFirmwareStatusNotification20.h +++ b/src/ocpp20/messages/PublishFirmwareStatusNotification20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_PUBLISHFIRMWARESTATUSNOTIFICATION20_H -#define OPENOCPP_PUBLISHFIRMWARESTATUSNOTIFICATION20_H +#ifndef OPENOCPP_OCPP20_PUBLISHFIRMWARESTATUSNOTIFICATION_H +#define OPENOCPP_OCPP20_PUBLISHFIRMWARESTATUSNOTIFICATION_H #include "IMessageConverter.h" @@ -36,16 +36,16 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the PublishFirmwareStatusNotification20 messages */ -static const std::string PUBLISHFIRMWARESTATUSNOTIFICATION20_ACTION = "PublishFirmwareStatusNotification"; +/** @brief Action corresponding to the PublishFirmwareStatusNotification messages */ +static const std::string PUBLISHFIRMWARESTATUSNOTIFICATION_ACTION = "PublishFirmwareStatusNotification"; -/** @brief PublishFirmwareStatusNotification20Req message */ -struct PublishFirmwareStatusNotification20Req +/** @brief PublishFirmwareStatusNotificationReq message */ +struct PublishFirmwareStatusNotificationReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::PublishFirmwareStatusEnumType20 status; + ocpp::types::ocpp20::PublishFirmwareStatusEnumType status; /** @brief Required if status is Published. Can be multiple URI’s, if the Local Controller supports e.g. HTTP, HTTPS, and FTP. */ std::vector location; /** @brief The request id that was @@ -55,18 +55,18 @@ triggered this action. */ ocpp::types::Optional requestId; }; -/** @brief PublishFirmwareStatusNotification20Conf message */ -struct PublishFirmwareStatusNotification20Conf +/** @brief PublishFirmwareStatusNotificationConf message */ +struct PublishFirmwareStatusNotificationConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(PublishFirmwareStatusNotification20) +MESSAGE_CONVERTERS(PublishFirmwareStatusNotification) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_PUBLISHFIRMWARESTATUSNOTIFICATION20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_PUBLISHFIRMWARESTATUSNOTIFICATION_H \ No newline at end of file diff --git a/src/ocpp20/messages/ReportChargingProfiles20.cpp b/src/ocpp20/messages/ReportChargingProfiles20.cpp index 3635ce1d..4c3ea174 100644 --- a/src/ocpp20/messages/ReportChargingProfiles20.cpp +++ b/src/ocpp20/messages/ReportChargingProfiles20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a ReportChargingProfiles20Req from a JSON representation */ -bool ReportChargingProfiles20ReqConverter::fromJson(const rapidjson::Value& json, - ReportChargingProfiles20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ReportChargingProfilesReq from a JSON representation */ +bool ReportChargingProfilesReqConverter::fromJson(const rapidjson::Value& json, + ReportChargingProfilesReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -51,16 +51,16 @@ bool ReportChargingProfiles20ReqConverter::fromJson(const rapidjson::Value& extract(json, "requestId", data.requestId); // chargingLimitSource - data.chargingLimitSource = ocpp::types::ocpp20::ChargingLimitSourceEnumType20Helper.fromString(json["chargingLimitSource"].GetString()); + data.chargingLimitSource = ocpp::types::ocpp20::ChargingLimitSourceEnumTypeHelper.fromString(json["chargingLimitSource"].GetString()); // chargingProfile if (json.HasMember("chargingProfile")) { - const rapidjson::Value& chargingProfile_json = json["chargingProfile"]; - ocpp::types::ocpp20::ChargingProfileType20Converter chargingProfile_converter; + const rapidjson::Value& chargingProfile_json = json["chargingProfile"]; + ocpp::types::ocpp20::ChargingProfileTypeConverter chargingProfile_converter; for (auto it = chargingProfile_json.Begin(); ret && (it != chargingProfile_json.End()); ++it) { - ocpp::types::ocpp20::ChargingProfileType20& item = data.chargingProfile.emplace_back(); + ocpp::types::ocpp20::ChargingProfileType& item = data.chargingProfile.emplace_back(); ret = ret && chargingProfile_converter.fromJson(*it, item, error_code, error_message); } } @@ -79,15 +79,15 @@ bool ReportChargingProfiles20ReqConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a ReportChargingProfiles20Req to a JSON representation */ -bool ReportChargingProfiles20ReqConverter::toJson(const ReportChargingProfiles20Req& data, rapidjson::Document& json) +/** @brief Convert a ReportChargingProfilesReq to a JSON representation */ +bool ReportChargingProfilesReqConverter::toJson(const ReportChargingProfilesReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -99,14 +99,14 @@ bool ReportChargingProfiles20ReqConverter::toJson(const ReportChargingProfiles20 fill(json, "requestId", data.requestId); // chargingLimitSource - fill(json, "chargingLimitSource", ocpp::types::ocpp20::ChargingLimitSourceEnumType20Helper.toString(data.chargingLimitSource)); + fill(json, "chargingLimitSource", ocpp::types::ocpp20::ChargingLimitSourceEnumTypeHelper.toString(data.chargingLimitSource)); // chargingProfile - rapidjson::Value chargingProfile_json(rapidjson::kArrayType); - ocpp::types::ocpp20::ChargingProfileType20Converter chargingProfile_converter; + rapidjson::Value chargingProfile_json(rapidjson::kArrayType); + ocpp::types::ocpp20::ChargingProfileTypeConverter chargingProfile_converter; chargingProfile_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::ChargingProfileType20& item : data.chargingProfile) + for (const ocpp::types::ocpp20::ChargingProfileType& item : data.chargingProfile) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -124,18 +124,18 @@ bool ReportChargingProfiles20ReqConverter::toJson(const ReportChargingProfiles20 return ret; } -/** @brief Convert a ReportChargingProfiles20Conf from a JSON representation */ -bool ReportChargingProfiles20ConfConverter::fromJson(const rapidjson::Value& json, - ReportChargingProfiles20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ReportChargingProfilesConf from a JSON representation */ +bool ReportChargingProfilesConfConverter::fromJson(const rapidjson::Value& json, + ReportChargingProfilesConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -147,15 +147,15 @@ bool ReportChargingProfiles20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a ReportChargingProfiles20Conf to a JSON representation */ -bool ReportChargingProfiles20ConfConverter::toJson(const ReportChargingProfiles20Conf& data, rapidjson::Document& json) +/** @brief Convert a ReportChargingProfilesConf to a JSON representation */ +bool ReportChargingProfilesConfConverter::toJson(const ReportChargingProfilesConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/ReportChargingProfiles20.h b/src/ocpp20/messages/ReportChargingProfiles20.h index 78b34c76..eec02ff1 100644 --- a/src/ocpp20/messages/ReportChargingProfiles20.h +++ b/src/ocpp20/messages/ReportChargingProfiles20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_REPORTCHARGINGPROFILES20_H -#define OPENOCPP_REPORTCHARGINGPROFILES20_H +#ifndef OPENOCPP_OCPP20_REPORTCHARGINGPROFILES_H +#define OPENOCPP_OCPP20_REPORTCHARGINGPROFILES_H #include "IMessageConverter.h" @@ -37,38 +37,38 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the ReportChargingProfiles20 messages */ -static const std::string REPORTCHARGINGPROFILES20_ACTION = "ReportChargingProfiles"; +/** @brief Action corresponding to the ReportChargingProfiles messages */ +static const std::string REPORTCHARGINGPROFILES_ACTION = "ReportChargingProfiles"; -/** @brief ReportChargingProfiles20Req message */ -struct ReportChargingProfiles20Req +/** @brief ReportChargingProfilesReq message */ +struct ReportChargingProfilesReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Id used to match the <<getchargingprofilesrequest, GetChargingProfilesRequest>> message with the resulting ReportChargingProfilesRequest messages. When the CSMS provided a requestId in the <<getchargingprofilesrequest, GetChargingProfilesRequest>>, this field SHALL contain the same value. */ int requestId; /** @brief */ - ocpp::types::ocpp20::ChargingLimitSourceEnumType20 chargingLimitSource; + ocpp::types::ocpp20::ChargingLimitSourceEnumType chargingLimitSource; /** @brief */ - std::vector chargingProfile; + std::vector chargingProfile; /** @brief To Be Continued. Default value when omitted: false. false indicates that there are no further messages as part of this report. */ ocpp::types::Optional tbc; /** @brief The evse to which the charging profile applies. If evseId = 0, the message contains an overall limit for the Charging Station. */ int evseId; }; -/** @brief ReportChargingProfiles20Conf message */ -struct ReportChargingProfiles20Conf +/** @brief ReportChargingProfilesConf message */ +struct ReportChargingProfilesConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(ReportChargingProfiles20) +MESSAGE_CONVERTERS(ReportChargingProfiles) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_REPORTCHARGINGPROFILES20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_REPORTCHARGINGPROFILES_H \ No newline at end of file diff --git a/src/ocpp20/messages/RequestStartTransaction20.cpp b/src/ocpp20/messages/RequestStartTransaction20.cpp index 9a2dba5c..7e7c2144 100644 --- a/src/ocpp20/messages/RequestStartTransaction20.cpp +++ b/src/ocpp20/messages/RequestStartTransaction20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a RequestStartTransaction20Req from a JSON representation */ -bool RequestStartTransaction20ReqConverter::fromJson(const rapidjson::Value& json, - RequestStartTransaction20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a RequestStartTransactionReq from a JSON representation */ +bool RequestStartTransactionReqConverter::fromJson(const rapidjson::Value& json, + RequestStartTransactionReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -53,12 +53,12 @@ bool RequestStartTransaction20ReqConverter::fromJson(const rapidjson::Value& // groupIdToken if (json.HasMember("groupIdToken")) { - ocpp::types::ocpp20::IdTokenType20Converter groupIdToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter groupIdToken_converter; ret = ret && groupIdToken_converter.fromJson(json["groupIdToken"], data.groupIdToken, error_code, error_message); } // idToken - ocpp::types::ocpp20::IdTokenType20Converter idToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter idToken_converter; ret = ret && idToken_converter.fromJson(json["idToken"], data.idToken, error_code, error_message); // remoteStartId @@ -67,7 +67,7 @@ bool RequestStartTransaction20ReqConverter::fromJson(const rapidjson::Value& // chargingProfile if (json.HasMember("chargingProfile")) { - ocpp::types::ocpp20::ChargingProfileType20Converter chargingProfile_converter; + ocpp::types::ocpp20::ChargingProfileTypeConverter chargingProfile_converter; ret = ret && chargingProfile_converter.fromJson(json["chargingProfile"], data.chargingProfile, error_code, error_message); } @@ -79,15 +79,15 @@ bool RequestStartTransaction20ReqConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a RequestStartTransaction20Req to a JSON representation */ -bool RequestStartTransaction20ReqConverter::toJson(const RequestStartTransaction20Req& data, rapidjson::Document& json) +/** @brief Convert a RequestStartTransactionReq to a JSON representation */ +bool RequestStartTransactionReqConverter::toJson(const RequestStartTransactionReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -101,7 +101,7 @@ bool RequestStartTransaction20ReqConverter::toJson(const RequestStartTransaction // groupIdToken if (data.groupIdToken.isSet()) { - ocpp::types::ocpp20::IdTokenType20Converter groupIdToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter groupIdToken_converter; groupIdToken_converter.setAllocator(allocator); rapidjson::Document groupIdToken_doc; groupIdToken_doc.Parse("{}"); @@ -110,7 +110,7 @@ bool RequestStartTransaction20ReqConverter::toJson(const RequestStartTransaction } // idToken - ocpp::types::ocpp20::IdTokenType20Converter idToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter idToken_converter; idToken_converter.setAllocator(allocator); rapidjson::Document idToken_doc; idToken_doc.Parse("{}"); @@ -123,7 +123,7 @@ bool RequestStartTransaction20ReqConverter::toJson(const RequestStartTransaction // chargingProfile if (data.chargingProfile.isSet()) { - ocpp::types::ocpp20::ChargingProfileType20Converter chargingProfile_converter; + ocpp::types::ocpp20::ChargingProfileTypeConverter chargingProfile_converter; chargingProfile_converter.setAllocator(allocator); rapidjson::Document chargingProfile_doc; chargingProfile_doc.Parse("{}"); @@ -134,28 +134,28 @@ bool RequestStartTransaction20ReqConverter::toJson(const RequestStartTransaction return ret; } -/** @brief Convert a RequestStartTransaction20Conf from a JSON representation */ -bool RequestStartTransaction20ConfConverter::fromJson(const rapidjson::Value& json, - RequestStartTransaction20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a RequestStartTransactionConf from a JSON representation */ +bool RequestStartTransactionConfConverter::fromJson(const rapidjson::Value& json, + RequestStartTransactionConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::RequestStartStopStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::RequestStartStopStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -170,15 +170,15 @@ bool RequestStartTransaction20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a RequestStartTransaction20Conf to a JSON representation */ -bool RequestStartTransaction20ConfConverter::toJson(const RequestStartTransaction20Conf& data, rapidjson::Document& json) +/** @brief Convert a RequestStartTransactionConf to a JSON representation */ +bool RequestStartTransactionConfConverter::toJson(const RequestStartTransactionConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -187,12 +187,12 @@ bool RequestStartTransaction20ConfConverter::toJson(const RequestStartTransactio } // status - fill(json, "status", ocpp::types::ocpp20::RequestStartStopStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::RequestStartStopStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/RequestStartTransaction20.h b/src/ocpp20/messages/RequestStartTransaction20.h index 65aba33f..8ebc6dc4 100644 --- a/src/ocpp20/messages/RequestStartTransaction20.h +++ b/src/ocpp20/messages/RequestStartTransaction20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_REQUESTSTARTTRANSACTION20_H -#define OPENOCPP_REQUESTSTARTTRANSACTION20_H +#ifndef OPENOCPP_OCPP20_REQUESTSTARTTRANSACTION_H +#define OPENOCPP_OCPP20_REQUESTSTARTTRANSACTION_H #include "IMessageConverter.h" @@ -39,44 +39,44 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the RequestStartTransaction20 messages */ -static const std::string REQUESTSTARTTRANSACTION20_ACTION = "RequestStartTransaction"; +/** @brief Action corresponding to the RequestStartTransaction messages */ +static const std::string REQUESTSTARTTRANSACTION_ACTION = "RequestStartTransaction"; -/** @brief RequestStartTransaction20Req message */ -struct RequestStartTransaction20Req +/** @brief RequestStartTransactionReq message */ +struct RequestStartTransactionReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Number of the EVSE on which to start the transaction. EvseId SHALL be > 0 */ ocpp::types::Optional evseId; /** @brief */ - ocpp::types::Optional groupIdToken; + ocpp::types::Optional groupIdToken; /** @brief */ - ocpp::types::ocpp20::IdTokenType20 idToken; + ocpp::types::ocpp20::IdTokenType idToken; /** @brief Id given by the server to this start request. The Charging Station might return this in the <<transactioneventrequest, TransactionEventRequest>>, letting the server know which transaction was started for this request. Use to start a transaction. */ int remoteStartId; /** @brief */ - ocpp::types::Optional chargingProfile; + ocpp::types::Optional chargingProfile; }; -/** @brief RequestStartTransaction20Conf message */ -struct RequestStartTransaction20Conf +/** @brief RequestStartTransactionConf message */ +struct RequestStartTransactionConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::RequestStartStopStatusEnumType20 status; + ocpp::types::ocpp20::RequestStartStopStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; /** @brief When the transaction was already started by the Charging Station before the RequestStartTransactionRequest was received, for example: cable plugged in first. This contains the transactionId of the already started transaction. */ ocpp::types::Optional> transactionId; }; // Message converters -MESSAGE_CONVERTERS(RequestStartTransaction20) +MESSAGE_CONVERTERS(RequestStartTransaction) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_REQUESTSTARTTRANSACTION20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_REQUESTSTARTTRANSACTION_H \ No newline at end of file diff --git a/src/ocpp20/messages/RequestStopTransaction20.cpp b/src/ocpp20/messages/RequestStopTransaction20.cpp index 318b6b66..eef313b6 100644 --- a/src/ocpp20/messages/RequestStopTransaction20.cpp +++ b/src/ocpp20/messages/RequestStopTransaction20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a RequestStopTransaction20Req from a JSON representation */ -bool RequestStopTransaction20ReqConverter::fromJson(const rapidjson::Value& json, - RequestStopTransaction20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a RequestStopTransactionReq from a JSON representation */ +bool RequestStopTransactionReqConverter::fromJson(const rapidjson::Value& json, + RequestStopTransactionReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -58,15 +58,15 @@ bool RequestStopTransaction20ReqConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a RequestStopTransaction20Req to a JSON representation */ -bool RequestStopTransaction20ReqConverter::toJson(const RequestStopTransaction20Req& data, rapidjson::Document& json) +/** @brief Convert a RequestStopTransactionReq to a JSON representation */ +bool RequestStopTransactionReqConverter::toJson(const RequestStopTransactionReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -80,28 +80,28 @@ bool RequestStopTransaction20ReqConverter::toJson(const RequestStopTransaction20 return ret; } -/** @brief Convert a RequestStopTransaction20Conf from a JSON representation */ -bool RequestStopTransaction20ConfConverter::fromJson(const rapidjson::Value& json, - RequestStopTransaction20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a RequestStopTransactionConf from a JSON representation */ +bool RequestStopTransactionConfConverter::fromJson(const rapidjson::Value& json, + RequestStopTransactionConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::RequestStartStopStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::RequestStartStopStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -113,15 +113,15 @@ bool RequestStopTransaction20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a RequestStopTransaction20Conf to a JSON representation */ -bool RequestStopTransaction20ConfConverter::toJson(const RequestStopTransaction20Conf& data, rapidjson::Document& json) +/** @brief Convert a RequestStopTransactionConf to a JSON representation */ +bool RequestStopTransactionConfConverter::toJson(const RequestStopTransactionConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -130,12 +130,12 @@ bool RequestStopTransaction20ConfConverter::toJson(const RequestStopTransaction2 } // status - fill(json, "status", ocpp::types::ocpp20::RequestStartStopStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::RequestStartStopStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/RequestStopTransaction20.h b/src/ocpp20/messages/RequestStopTransaction20.h index b050a01b..c3f85e8f 100644 --- a/src/ocpp20/messages/RequestStopTransaction20.h +++ b/src/ocpp20/messages/RequestStopTransaction20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_REQUESTSTOPTRANSACTION20_H -#define OPENOCPP_REQUESTSTOPTRANSACTION20_H +#ifndef OPENOCPP_OCPP20_REQUESTSTOPTRANSACTION_H +#define OPENOCPP_OCPP20_REQUESTSTOPTRANSACTION_H #include "IMessageConverter.h" @@ -37,34 +37,34 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the RequestStopTransaction20 messages */ -static const std::string REQUESTSTOPTRANSACTION20_ACTION = "RequestStopTransaction"; +/** @brief Action corresponding to the RequestStopTransaction messages */ +static const std::string REQUESTSTOPTRANSACTION_ACTION = "RequestStopTransaction"; -/** @brief RequestStopTransaction20Req message */ -struct RequestStopTransaction20Req +/** @brief RequestStopTransactionReq message */ +struct RequestStopTransactionReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief The identifier of the transaction which the Charging Station is requested to stop. */ ocpp::types::CiStringType<36u> transactionId; }; -/** @brief RequestStopTransaction20Conf message */ -struct RequestStopTransaction20Conf +/** @brief RequestStopTransactionConf message */ +struct RequestStopTransactionConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::RequestStartStopStatusEnumType20 status; + ocpp::types::ocpp20::RequestStartStopStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(RequestStopTransaction20) +MESSAGE_CONVERTERS(RequestStopTransaction) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_REQUESTSTOPTRANSACTION20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_REQUESTSTOPTRANSACTION_H \ No newline at end of file diff --git a/src/ocpp20/messages/ReservationStatusUpdate20.cpp b/src/ocpp20/messages/ReservationStatusUpdate20.cpp index c7e94e8a..87b303ef 100644 --- a/src/ocpp20/messages/ReservationStatusUpdate20.cpp +++ b/src/ocpp20/messages/ReservationStatusUpdate20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a ReservationStatusUpdate20Req from a JSON representation */ -bool ReservationStatusUpdate20ReqConverter::fromJson(const rapidjson::Value& json, - ReservationStatusUpdate20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ReservationStatusUpdateReq from a JSON representation */ +bool ReservationStatusUpdateReqConverter::fromJson(const rapidjson::Value& json, + ReservationStatusUpdateReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -52,7 +52,7 @@ bool ReservationStatusUpdate20ReqConverter::fromJson(const rapidjson::Value& // reservationUpdateStatus data.reservationUpdateStatus = - ocpp::types::ocpp20::ReservationUpdateStatusEnumType20Helper.fromString(json["reservationUpdateStatus"].GetString()); + ocpp::types::ocpp20::ReservationUpdateStatusEnumTypeHelper.fromString(json["reservationUpdateStatus"].GetString()); if (!ret) { @@ -62,15 +62,15 @@ bool ReservationStatusUpdate20ReqConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a ReservationStatusUpdate20Req to a JSON representation */ -bool ReservationStatusUpdate20ReqConverter::toJson(const ReservationStatusUpdate20Req& data, rapidjson::Document& json) +/** @brief Convert a ReservationStatusUpdateReq to a JSON representation */ +bool ReservationStatusUpdateReqConverter::toJson(const ReservationStatusUpdateReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -82,25 +82,24 @@ bool ReservationStatusUpdate20ReqConverter::toJson(const ReservationStatusUpdate fill(json, "reservationId", data.reservationId); // reservationUpdateStatus - fill(json, - "reservationUpdateStatus", - ocpp::types::ocpp20::ReservationUpdateStatusEnumType20Helper.toString(data.reservationUpdateStatus)); + fill( + json, "reservationUpdateStatus", ocpp::types::ocpp20::ReservationUpdateStatusEnumTypeHelper.toString(data.reservationUpdateStatus)); return ret; } -/** @brief Convert a ReservationStatusUpdate20Conf from a JSON representation */ -bool ReservationStatusUpdate20ConfConverter::fromJson(const rapidjson::Value& json, - ReservationStatusUpdate20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ReservationStatusUpdateConf from a JSON representation */ +bool ReservationStatusUpdateConfConverter::fromJson(const rapidjson::Value& json, + ReservationStatusUpdateConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -112,15 +111,15 @@ bool ReservationStatusUpdate20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a ReservationStatusUpdate20Conf to a JSON representation */ -bool ReservationStatusUpdate20ConfConverter::toJson(const ReservationStatusUpdate20Conf& data, rapidjson::Document& json) +/** @brief Convert a ReservationStatusUpdateConf to a JSON representation */ +bool ReservationStatusUpdateConfConverter::toJson(const ReservationStatusUpdateConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/ReservationStatusUpdate20.h b/src/ocpp20/messages/ReservationStatusUpdate20.h index 8af65b80..850a0b47 100644 --- a/src/ocpp20/messages/ReservationStatusUpdate20.h +++ b/src/ocpp20/messages/ReservationStatusUpdate20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_RESERVATIONSTATUSUPDATE20_H -#define OPENOCPP_RESERVATIONSTATUSUPDATE20_H +#ifndef OPENOCPP_OCPP20_RESERVATIONSTATUSUPDATE_H +#define OPENOCPP_OCPP20_RESERVATIONSTATUSUPDATE_H #include "IMessageConverter.h" @@ -36,32 +36,32 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the ReservationStatusUpdate20 messages */ -static const std::string RESERVATIONSTATUSUPDATE20_ACTION = "ReservationStatusUpdate"; +/** @brief Action corresponding to the ReservationStatusUpdate messages */ +static const std::string RESERVATIONSTATUSUPDATE_ACTION = "ReservationStatusUpdate"; -/** @brief ReservationStatusUpdate20Req message */ -struct ReservationStatusUpdate20Req +/** @brief ReservationStatusUpdateReq message */ +struct ReservationStatusUpdateReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief The ID of the reservation. */ int reservationId; /** @brief */ - ocpp::types::ocpp20::ReservationUpdateStatusEnumType20 reservationUpdateStatus; + ocpp::types::ocpp20::ReservationUpdateStatusEnumType reservationUpdateStatus; }; -/** @brief ReservationStatusUpdate20Conf message */ -struct ReservationStatusUpdate20Conf +/** @brief ReservationStatusUpdateConf message */ +struct ReservationStatusUpdateConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(ReservationStatusUpdate20) +MESSAGE_CONVERTERS(ReservationStatusUpdate) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_RESERVATIONSTATUSUPDATE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_RESERVATIONSTATUSUPDATE_H \ No newline at end of file diff --git a/src/ocpp20/messages/ReserveNow20.cpp b/src/ocpp20/messages/ReserveNow20.cpp index 9186e837..18657c2b 100644 --- a/src/ocpp20/messages/ReserveNow20.cpp +++ b/src/ocpp20/messages/ReserveNow20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a ReserveNow20Req from a JSON representation */ -bool ReserveNow20ReqConverter::fromJson(const rapidjson::Value& json, - ReserveNow20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ReserveNowReq from a JSON representation */ +bool ReserveNowReqConverter::fromJson(const rapidjson::Value& json, + ReserveNowReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -56,11 +56,11 @@ bool ReserveNow20ReqConverter::fromJson(const rapidjson::Value& json, // connectorType if (json.HasMember("connectorType")) { - data.connectorType = ocpp::types::ocpp20::ConnectorEnumType20Helper.fromString(json["connectorType"].GetString()); + data.connectorType = ocpp::types::ocpp20::ConnectorEnumTypeHelper.fromString(json["connectorType"].GetString()); } // idToken - ocpp::types::ocpp20::IdTokenType20Converter idToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter idToken_converter; ret = ret && idToken_converter.fromJson(json["idToken"], data.idToken, error_code, error_message); // evseId @@ -69,7 +69,7 @@ bool ReserveNow20ReqConverter::fromJson(const rapidjson::Value& json, // groupIdToken if (json.HasMember("groupIdToken")) { - ocpp::types::ocpp20::IdTokenType20Converter groupIdToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter groupIdToken_converter; ret = ret && groupIdToken_converter.fromJson(json["groupIdToken"], data.groupIdToken, error_code, error_message); } @@ -81,15 +81,15 @@ bool ReserveNow20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a ReserveNow20Req to a JSON representation */ -bool ReserveNow20ReqConverter::toJson(const ReserveNow20Req& data, rapidjson::Document& json) +/** @brief Convert a ReserveNowReq to a JSON representation */ +bool ReserveNowReqConverter::toJson(const ReserveNowReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -106,11 +106,11 @@ bool ReserveNow20ReqConverter::toJson(const ReserveNow20Req& data, rapidjson::Do // connectorType if (data.connectorType.isSet()) { - fill(json, "connectorType", ocpp::types::ocpp20::ConnectorEnumType20Helper.toString(data.connectorType)); + fill(json, "connectorType", ocpp::types::ocpp20::ConnectorEnumTypeHelper.toString(data.connectorType)); } // idToken - ocpp::types::ocpp20::IdTokenType20Converter idToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter idToken_converter; idToken_converter.setAllocator(allocator); rapidjson::Document idToken_doc; idToken_doc.Parse("{}"); @@ -123,7 +123,7 @@ bool ReserveNow20ReqConverter::toJson(const ReserveNow20Req& data, rapidjson::Do // groupIdToken if (data.groupIdToken.isSet()) { - ocpp::types::ocpp20::IdTokenType20Converter groupIdToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter groupIdToken_converter; groupIdToken_converter.setAllocator(allocator); rapidjson::Document groupIdToken_doc; groupIdToken_doc.Parse("{}"); @@ -134,28 +134,28 @@ bool ReserveNow20ReqConverter::toJson(const ReserveNow20Req& data, rapidjson::Do return ret; } -/** @brief Convert a ReserveNow20Conf from a JSON representation */ -bool ReserveNow20ConfConverter::fromJson(const rapidjson::Value& json, - ReserveNow20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a ReserveNowConf from a JSON representation */ +bool ReserveNowConfConverter::fromJson(const rapidjson::Value& json, + ReserveNowConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::ReserveNowStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::ReserveNowStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -167,15 +167,15 @@ bool ReserveNow20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a ReserveNow20Conf to a JSON representation */ -bool ReserveNow20ConfConverter::toJson(const ReserveNow20Conf& data, rapidjson::Document& json) +/** @brief Convert a ReserveNowConf to a JSON representation */ +bool ReserveNowConfConverter::toJson(const ReserveNowConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -184,12 +184,12 @@ bool ReserveNow20ConfConverter::toJson(const ReserveNow20Conf& data, rapidjson:: } // status - fill(json, "status", ocpp::types::ocpp20::ReserveNowStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::ReserveNowStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/ReserveNow20.h b/src/ocpp20/messages/ReserveNow20.h index 80514173..ae905c8b 100644 --- a/src/ocpp20/messages/ReserveNow20.h +++ b/src/ocpp20/messages/ReserveNow20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_RESERVENOW20_H -#define OPENOCPP_RESERVENOW20_H +#ifndef OPENOCPP_OCPP20_RESERVENOW_H +#define OPENOCPP_OCPP20_RESERVENOW_H #include "IMessageConverter.h" @@ -39,44 +39,44 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the ReserveNow20 messages */ -static const std::string RESERVENOW20_ACTION = "ReserveNow"; +/** @brief Action corresponding to the ReserveNow messages */ +static const std::string RESERVENOW_ACTION = "ReserveNow"; -/** @brief ReserveNow20Req message */ -struct ReserveNow20Req +/** @brief ReserveNowReq message */ +struct ReserveNowReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Id of reservation. */ int id; /** @brief Date and time at which the reservation expires. */ ocpp::types::DateTime expiryDateTime; /** @brief */ - ocpp::types::Optional connectorType; + ocpp::types::Optional connectorType; /** @brief */ - ocpp::types::ocpp20::IdTokenType20 idToken; + ocpp::types::ocpp20::IdTokenType idToken; /** @brief This contains ID of the evse to be reserved. */ ocpp::types::Optional evseId; /** @brief */ - ocpp::types::Optional groupIdToken; + ocpp::types::Optional groupIdToken; }; -/** @brief ReserveNow20Conf message */ -struct ReserveNow20Conf +/** @brief ReserveNowConf message */ +struct ReserveNowConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::ReserveNowStatusEnumType20 status; + ocpp::types::ocpp20::ReserveNowStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(ReserveNow20) +MESSAGE_CONVERTERS(ReserveNow) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_RESERVENOW20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_RESERVENOW_H \ No newline at end of file diff --git a/src/ocpp20/messages/Reset20.cpp b/src/ocpp20/messages/Reset20.cpp index f2ae9ba5..d9d0fad2 100644 --- a/src/ocpp20/messages/Reset20.cpp +++ b/src/ocpp20/messages/Reset20.cpp @@ -32,20 +32,20 @@ namespace messages namespace ocpp20 { -/** @brief Convert a Reset20Req from a JSON representation */ -bool Reset20ReqConverter::fromJson(const rapidjson::Value& json, Reset20Req& data, std::string& error_code, std::string& error_message) +/** @brief Convert a ResetReq from a JSON representation */ +bool ResetReqConverter::fromJson(const rapidjson::Value& json, ResetReq& data, std::string& error_code, std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // type - data.type = ocpp::types::ocpp20::ResetEnumType20Helper.fromString(json["type"].GetString()); + data.type = ocpp::types::ocpp20::ResetEnumTypeHelper.fromString(json["type"].GetString()); // evseId extract(json, "evseId", data.evseId); @@ -58,15 +58,15 @@ bool Reset20ReqConverter::fromJson(const rapidjson::Value& json, Reset20Req& dat return ret; } -/** @brief Convert a Reset20Req to a JSON representation */ -bool Reset20ReqConverter::toJson(const Reset20Req& data, rapidjson::Document& json) +/** @brief Convert a ResetReq to a JSON representation */ +bool ResetReqConverter::toJson(const ResetReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -75,7 +75,7 @@ bool Reset20ReqConverter::toJson(const Reset20Req& data, rapidjson::Document& js } // type - fill(json, "type", ocpp::types::ocpp20::ResetEnumType20Helper.toString(data.type)); + fill(json, "type", ocpp::types::ocpp20::ResetEnumTypeHelper.toString(data.type)); // evseId fill(json, "evseId", data.evseId); @@ -83,25 +83,25 @@ bool Reset20ReqConverter::toJson(const Reset20Req& data, rapidjson::Document& js return ret; } -/** @brief Convert a Reset20Conf from a JSON representation */ -bool Reset20ConfConverter::fromJson(const rapidjson::Value& json, Reset20Conf& data, std::string& error_code, std::string& error_message) +/** @brief Convert a ResetConf from a JSON representation */ +bool ResetConfConverter::fromJson(const rapidjson::Value& json, ResetConf& data, std::string& error_code, std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::ResetStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::ResetStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -113,15 +113,15 @@ bool Reset20ConfConverter::fromJson(const rapidjson::Value& json, Reset20Conf& d return ret; } -/** @brief Convert a Reset20Conf to a JSON representation */ -bool Reset20ConfConverter::toJson(const Reset20Conf& data, rapidjson::Document& json) +/** @brief Convert a ResetConf to a JSON representation */ +bool ResetConfConverter::toJson(const ResetConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -130,12 +130,12 @@ bool Reset20ConfConverter::toJson(const Reset20Conf& data, rapidjson::Document& } // status - fill(json, "status", ocpp::types::ocpp20::ResetStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::ResetStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/Reset20.h b/src/ocpp20/messages/Reset20.h index 922d0f59..ddfa78c9 100644 --- a/src/ocpp20/messages/Reset20.h +++ b/src/ocpp20/messages/Reset20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_RESET20_H -#define OPENOCPP_RESET20_H +#ifndef OPENOCPP_OCPP20_RESET_H +#define OPENOCPP_OCPP20_RESET_H #include "IMessageConverter.h" @@ -38,36 +38,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the Reset20 messages */ -static const std::string RESET20_ACTION = "Reset"; +/** @brief Action corresponding to the Reset messages */ +static const std::string RESET_ACTION = "Reset"; -/** @brief Reset20Req message */ -struct Reset20Req +/** @brief ResetReq message */ +struct ResetReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::ResetEnumType20 type; + ocpp::types::ocpp20::ResetEnumType type; /** @brief This contains the ID of a specific EVSE that needs to be reset, instead of the entire Charging Station. */ ocpp::types::Optional evseId; }; -/** @brief Reset20Conf message */ -struct Reset20Conf +/** @brief ResetConf message */ +struct ResetConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::ResetStatusEnumType20 status; + ocpp::types::ocpp20::ResetStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(Reset20) +MESSAGE_CONVERTERS(Reset) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_RESET20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_RESET_H \ No newline at end of file diff --git a/src/ocpp20/messages/SecurityEventNotification20.cpp b/src/ocpp20/messages/SecurityEventNotification20.cpp index 16268bc6..7959f3e9 100644 --- a/src/ocpp20/messages/SecurityEventNotification20.cpp +++ b/src/ocpp20/messages/SecurityEventNotification20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a SecurityEventNotification20Req from a JSON representation */ -bool SecurityEventNotification20ReqConverter::fromJson(const rapidjson::Value& json, - SecurityEventNotification20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SecurityEventNotificationReq from a JSON representation */ +bool SecurityEventNotificationReqConverter::fromJson(const rapidjson::Value& json, + SecurityEventNotificationReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -64,15 +64,15 @@ bool SecurityEventNotification20ReqConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a SecurityEventNotification20Req to a JSON representation */ -bool SecurityEventNotification20ReqConverter::toJson(const SecurityEventNotification20Req& data, rapidjson::Document& json) +/** @brief Convert a SecurityEventNotificationReq to a JSON representation */ +bool SecurityEventNotificationReqConverter::toJson(const SecurityEventNotificationReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -92,18 +92,18 @@ bool SecurityEventNotification20ReqConverter::toJson(const SecurityEventNotifica return ret; } -/** @brief Convert a SecurityEventNotification20Conf from a JSON representation */ -bool SecurityEventNotification20ConfConverter::fromJson(const rapidjson::Value& json, - SecurityEventNotification20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SecurityEventNotificationConf from a JSON representation */ +bool SecurityEventNotificationConfConverter::fromJson(const rapidjson::Value& json, + SecurityEventNotificationConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -115,15 +115,15 @@ bool SecurityEventNotification20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a SecurityEventNotification20Conf to a JSON representation */ -bool SecurityEventNotification20ConfConverter::toJson(const SecurityEventNotification20Conf& data, rapidjson::Document& json) +/** @brief Convert a SecurityEventNotificationConf to a JSON representation */ +bool SecurityEventNotificationConfConverter::toJson(const SecurityEventNotificationConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/SecurityEventNotification20.h b/src/ocpp20/messages/SecurityEventNotification20.h index 42a563e7..02f84d6a 100644 --- a/src/ocpp20/messages/SecurityEventNotification20.h +++ b/src/ocpp20/messages/SecurityEventNotification20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SECURITYEVENTNOTIFICATION20_H -#define OPENOCPP_SECURITYEVENTNOTIFICATION20_H +#ifndef OPENOCPP_OCPP20_SECURITYEVENTNOTIFICATION_H +#define OPENOCPP_OCPP20_SECURITYEVENTNOTIFICATION_H #include "IMessageConverter.h" @@ -35,14 +35,14 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the SecurityEventNotification20 messages */ -static const std::string SECURITYEVENTNOTIFICATION20_ACTION = "SecurityEventNotification"; +/** @brief Action corresponding to the SecurityEventNotification messages */ +static const std::string SECURITYEVENTNOTIFICATION_ACTION = "SecurityEventNotification"; -/** @brief SecurityEventNotification20Req message */ -struct SecurityEventNotification20Req +/** @brief SecurityEventNotificationReq message */ +struct SecurityEventNotificationReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Type of the security event. This value should be taken from the Security events list. */ ocpp::types::CiStringType<50u> type; /** @brief Date and time at which the event occurred. */ @@ -51,18 +51,18 @@ struct SecurityEventNotification20Req ocpp::types::Optional> techInfo; }; -/** @brief SecurityEventNotification20Conf message */ -struct SecurityEventNotification20Conf +/** @brief SecurityEventNotificationConf message */ +struct SecurityEventNotificationConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(SecurityEventNotification20) +MESSAGE_CONVERTERS(SecurityEventNotification) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_SECURITYEVENTNOTIFICATION20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SECURITYEVENTNOTIFICATION_H \ No newline at end of file diff --git a/src/ocpp20/messages/SendLocalList20.cpp b/src/ocpp20/messages/SendLocalList20.cpp index b90f48fe..e71b4b59 100644 --- a/src/ocpp20/messages/SendLocalList20.cpp +++ b/src/ocpp20/messages/SendLocalList20.cpp @@ -32,29 +32,29 @@ namespace messages namespace ocpp20 { -/** @brief Convert a SendLocalList20Req from a JSON representation */ -bool SendLocalList20ReqConverter::fromJson(const rapidjson::Value& json, - SendLocalList20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SendLocalListReq from a JSON representation */ +bool SendLocalListReqConverter::fromJson(const rapidjson::Value& json, + SendLocalListReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // localAuthorizationList if (json.HasMember("localAuthorizationList")) { - const rapidjson::Value& localAuthorizationList_json = json["localAuthorizationList"]; - ocpp::types::ocpp20::AuthorizationData20Converter localAuthorizationList_converter; + const rapidjson::Value& localAuthorizationList_json = json["localAuthorizationList"]; + ocpp::types::ocpp20::AuthorizationDataConverter localAuthorizationList_converter; for (auto it = localAuthorizationList_json.Begin(); ret && (it != localAuthorizationList_json.End()); ++it) { - ocpp::types::ocpp20::AuthorizationData20& item = data.localAuthorizationList.emplace_back(); + ocpp::types::ocpp20::AuthorizationData& item = data.localAuthorizationList.emplace_back(); ret = ret && localAuthorizationList_converter.fromJson(*it, item, error_code, error_message); } } @@ -63,7 +63,7 @@ bool SendLocalList20ReqConverter::fromJson(const rapidjson::Value& json, extract(json, "versionNumber", data.versionNumber); // updateType - data.updateType = ocpp::types::ocpp20::UpdateEnumType20Helper.fromString(json["updateType"].GetString()); + data.updateType = ocpp::types::ocpp20::UpdateEnumTypeHelper.fromString(json["updateType"].GetString()); if (!ret) { @@ -73,15 +73,15 @@ bool SendLocalList20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SendLocalList20Req to a JSON representation */ -bool SendLocalList20ReqConverter::toJson(const SendLocalList20Req& data, rapidjson::Document& json) +/** @brief Convert a SendLocalListReq to a JSON representation */ +bool SendLocalListReqConverter::toJson(const SendLocalListReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -93,10 +93,10 @@ bool SendLocalList20ReqConverter::toJson(const SendLocalList20Req& data, rapidjs if (!data.localAuthorizationList.empty()) { - rapidjson::Value localAuthorizationList_json(rapidjson::kArrayType); - ocpp::types::ocpp20::AuthorizationData20Converter localAuthorizationList_converter; + rapidjson::Value localAuthorizationList_json(rapidjson::kArrayType); + ocpp::types::ocpp20::AuthorizationDataConverter localAuthorizationList_converter; localAuthorizationList_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::AuthorizationData20& item : data.localAuthorizationList) + for (const ocpp::types::ocpp20::AuthorizationData& item : data.localAuthorizationList) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -110,33 +110,33 @@ bool SendLocalList20ReqConverter::toJson(const SendLocalList20Req& data, rapidjs fill(json, "versionNumber", data.versionNumber); // updateType - fill(json, "updateType", ocpp::types::ocpp20::UpdateEnumType20Helper.toString(data.updateType)); + fill(json, "updateType", ocpp::types::ocpp20::UpdateEnumTypeHelper.toString(data.updateType)); return ret; } -/** @brief Convert a SendLocalList20Conf from a JSON representation */ -bool SendLocalList20ConfConverter::fromJson(const rapidjson::Value& json, - SendLocalList20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SendLocalListConf from a JSON representation */ +bool SendLocalListConfConverter::fromJson(const rapidjson::Value& json, + SendLocalListConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::SendLocalListStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::SendLocalListStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -148,15 +148,15 @@ bool SendLocalList20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SendLocalList20Conf to a JSON representation */ -bool SendLocalList20ConfConverter::toJson(const SendLocalList20Conf& data, rapidjson::Document& json) +/** @brief Convert a SendLocalListConf to a JSON representation */ +bool SendLocalListConfConverter::toJson(const SendLocalListConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -165,12 +165,12 @@ bool SendLocalList20ConfConverter::toJson(const SendLocalList20Conf& data, rapid } // status - fill(json, "status", ocpp::types::ocpp20::SendLocalListStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::SendLocalListStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/SendLocalList20.h b/src/ocpp20/messages/SendLocalList20.h index 940dacab..ff4491fd 100644 --- a/src/ocpp20/messages/SendLocalList20.h +++ b/src/ocpp20/messages/SendLocalList20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SENDLOCALLIST20_H -#define OPENOCPP_SENDLOCALLIST20_H +#ifndef OPENOCPP_OCPP20_SENDLOCALLIST_H +#define OPENOCPP_OCPP20_SENDLOCALLIST_H #include "IMessageConverter.h" @@ -39,38 +39,38 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the SendLocalList20 messages */ -static const std::string SENDLOCALLIST20_ACTION = "SendLocalList"; +/** @brief Action corresponding to the SendLocalList messages */ +static const std::string SENDLOCALLIST_ACTION = "SendLocalList"; -/** @brief SendLocalList20Req message */ -struct SendLocalList20Req +/** @brief SendLocalListReq message */ +struct SendLocalListReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector localAuthorizationList; + std::vector localAuthorizationList; /** @brief In case of a full update this is the version number of the full list. In case of a differential update it is the version number of the list after the update has been applied. */ int versionNumber; /** @brief */ - ocpp::types::ocpp20::UpdateEnumType20 updateType; + ocpp::types::ocpp20::UpdateEnumType updateType; }; -/** @brief SendLocalList20Conf message */ -struct SendLocalList20Conf +/** @brief SendLocalListConf message */ +struct SendLocalListConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::SendLocalListStatusEnumType20 status; + ocpp::types::ocpp20::SendLocalListStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(SendLocalList20) +MESSAGE_CONVERTERS(SendLocalList) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_SENDLOCALLIST20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SENDLOCALLIST_H \ No newline at end of file diff --git a/src/ocpp20/messages/SetChargingProfile20.cpp b/src/ocpp20/messages/SetChargingProfile20.cpp index 40ff35ea..42a95694 100644 --- a/src/ocpp20/messages/SetChargingProfile20.cpp +++ b/src/ocpp20/messages/SetChargingProfile20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a SetChargingProfile20Req from a JSON representation */ -bool SetChargingProfile20ReqConverter::fromJson(const rapidjson::Value& json, - SetChargingProfile20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetChargingProfileReq from a JSON representation */ +bool SetChargingProfileReqConverter::fromJson(const rapidjson::Value& json, + SetChargingProfileReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -51,7 +51,7 @@ bool SetChargingProfile20ReqConverter::fromJson(const rapidjson::Value& json, extract(json, "evseId", data.evseId); // chargingProfile - ocpp::types::ocpp20::ChargingProfileType20Converter chargingProfile_converter; + ocpp::types::ocpp20::ChargingProfileTypeConverter chargingProfile_converter; ret = ret && chargingProfile_converter.fromJson(json["chargingProfile"], data.chargingProfile, error_code, error_message); if (!ret) @@ -62,15 +62,15 @@ bool SetChargingProfile20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SetChargingProfile20Req to a JSON representation */ -bool SetChargingProfile20ReqConverter::toJson(const SetChargingProfile20Req& data, rapidjson::Document& json) +/** @brief Convert a SetChargingProfileReq to a JSON representation */ +bool SetChargingProfileReqConverter::toJson(const SetChargingProfileReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -82,7 +82,7 @@ bool SetChargingProfile20ReqConverter::toJson(const SetChargingProfile20Req& dat fill(json, "evseId", data.evseId); // chargingProfile - ocpp::types::ocpp20::ChargingProfileType20Converter chargingProfile_converter; + ocpp::types::ocpp20::ChargingProfileTypeConverter chargingProfile_converter; chargingProfile_converter.setAllocator(allocator); rapidjson::Document chargingProfile_doc; chargingProfile_doc.Parse("{}"); @@ -92,28 +92,28 @@ bool SetChargingProfile20ReqConverter::toJson(const SetChargingProfile20Req& dat return ret; } -/** @brief Convert a SetChargingProfile20Conf from a JSON representation */ -bool SetChargingProfile20ConfConverter::fromJson(const rapidjson::Value& json, - SetChargingProfile20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetChargingProfileConf from a JSON representation */ +bool SetChargingProfileConfConverter::fromJson(const rapidjson::Value& json, + SetChargingProfileConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::ChargingProfileStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::ChargingProfileStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -125,15 +125,15 @@ bool SetChargingProfile20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SetChargingProfile20Conf to a JSON representation */ -bool SetChargingProfile20ConfConverter::toJson(const SetChargingProfile20Conf& data, rapidjson::Document& json) +/** @brief Convert a SetChargingProfileConf to a JSON representation */ +bool SetChargingProfileConfConverter::toJson(const SetChargingProfileConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -142,12 +142,12 @@ bool SetChargingProfile20ConfConverter::toJson(const SetChargingProfile20Conf& d } // status - fill(json, "status", ocpp::types::ocpp20::ChargingProfileStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::ChargingProfileStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/SetChargingProfile20.h b/src/ocpp20/messages/SetChargingProfile20.h index 6c43150e..89e2df9f 100644 --- a/src/ocpp20/messages/SetChargingProfile20.h +++ b/src/ocpp20/messages/SetChargingProfile20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETCHARGINGPROFILE20_H -#define OPENOCPP_SETCHARGINGPROFILE20_H +#ifndef OPENOCPP_OCPP20_SETCHARGINGPROFILE_H +#define OPENOCPP_OCPP20_SETCHARGINGPROFILE_H #include "IMessageConverter.h" @@ -38,36 +38,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the SetChargingProfile20 messages */ -static const std::string SETCHARGINGPROFILE20_ACTION = "SetChargingProfile"; +/** @brief Action corresponding to the SetChargingProfile messages */ +static const std::string SETCHARGINGPROFILE_ACTION = "SetChargingProfile"; -/** @brief SetChargingProfile20Req message */ -struct SetChargingProfile20Req +/** @brief SetChargingProfileReq message */ +struct SetChargingProfileReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief For TxDefaultProfile an evseId=0 applies the profile to each individual evse. For ChargingStationMaxProfile and ChargingStationExternalConstraints an evseId=0 contains an overal limit for the whole Charging Station. */ int evseId; /** @brief */ - ocpp::types::ocpp20::ChargingProfileType20 chargingProfile; + ocpp::types::ocpp20::ChargingProfileType chargingProfile; }; -/** @brief SetChargingProfile20Conf message */ -struct SetChargingProfile20Conf +/** @brief SetChargingProfileConf message */ +struct SetChargingProfileConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::ChargingProfileStatusEnumType20 status; + ocpp::types::ocpp20::ChargingProfileStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(SetChargingProfile20) +MESSAGE_CONVERTERS(SetChargingProfile) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_SETCHARGINGPROFILE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETCHARGINGPROFILE_H \ No newline at end of file diff --git a/src/ocpp20/messages/SetDisplayMessage20.cpp b/src/ocpp20/messages/SetDisplayMessage20.cpp index d7f3f2a6..ba45ccde 100644 --- a/src/ocpp20/messages/SetDisplayMessage20.cpp +++ b/src/ocpp20/messages/SetDisplayMessage20.cpp @@ -32,23 +32,23 @@ namespace messages namespace ocpp20 { -/** @brief Convert a SetDisplayMessage20Req from a JSON representation */ -bool SetDisplayMessage20ReqConverter::fromJson(const rapidjson::Value& json, - SetDisplayMessage20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetDisplayMessageReq from a JSON representation */ +bool SetDisplayMessageReqConverter::fromJson(const rapidjson::Value& json, + SetDisplayMessageReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // message - ocpp::types::ocpp20::MessageInfoType20Converter message_converter; + ocpp::types::ocpp20::MessageInfoTypeConverter message_converter; ret = ret && message_converter.fromJson(json["message"], data.message, error_code, error_message); if (!ret) @@ -59,15 +59,15 @@ bool SetDisplayMessage20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SetDisplayMessage20Req to a JSON representation */ -bool SetDisplayMessage20ReqConverter::toJson(const SetDisplayMessage20Req& data, rapidjson::Document& json) +/** @brief Convert a SetDisplayMessageReq to a JSON representation */ +bool SetDisplayMessageReqConverter::toJson(const SetDisplayMessageReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -76,7 +76,7 @@ bool SetDisplayMessage20ReqConverter::toJson(const SetDisplayMessage20Req& data, } // message - ocpp::types::ocpp20::MessageInfoType20Converter message_converter; + ocpp::types::ocpp20::MessageInfoTypeConverter message_converter; message_converter.setAllocator(allocator); rapidjson::Document message_doc; message_doc.Parse("{}"); @@ -86,28 +86,28 @@ bool SetDisplayMessage20ReqConverter::toJson(const SetDisplayMessage20Req& data, return ret; } -/** @brief Convert a SetDisplayMessage20Conf from a JSON representation */ -bool SetDisplayMessage20ConfConverter::fromJson(const rapidjson::Value& json, - SetDisplayMessage20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetDisplayMessageConf from a JSON representation */ +bool SetDisplayMessageConfConverter::fromJson(const rapidjson::Value& json, + SetDisplayMessageConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::DisplayMessageStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::DisplayMessageStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -119,15 +119,15 @@ bool SetDisplayMessage20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SetDisplayMessage20Conf to a JSON representation */ -bool SetDisplayMessage20ConfConverter::toJson(const SetDisplayMessage20Conf& data, rapidjson::Document& json) +/** @brief Convert a SetDisplayMessageConf to a JSON representation */ +bool SetDisplayMessageConfConverter::toJson(const SetDisplayMessageConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -136,12 +136,12 @@ bool SetDisplayMessage20ConfConverter::toJson(const SetDisplayMessage20Conf& dat } // status - fill(json, "status", ocpp::types::ocpp20::DisplayMessageStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::DisplayMessageStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/SetDisplayMessage20.h b/src/ocpp20/messages/SetDisplayMessage20.h index 2216f930..3ed92982 100644 --- a/src/ocpp20/messages/SetDisplayMessage20.h +++ b/src/ocpp20/messages/SetDisplayMessage20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETDISPLAYMESSAGE20_H -#define OPENOCPP_SETDISPLAYMESSAGE20_H +#ifndef OPENOCPP_OCPP20_SETDISPLAYMESSAGE_H +#define OPENOCPP_OCPP20_SETDISPLAYMESSAGE_H #include "IMessageConverter.h" @@ -38,34 +38,34 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the SetDisplayMessage20 messages */ -static const std::string SETDISPLAYMESSAGE20_ACTION = "SetDisplayMessage"; +/** @brief Action corresponding to the SetDisplayMessage messages */ +static const std::string SETDISPLAYMESSAGE_ACTION = "SetDisplayMessage"; -/** @brief SetDisplayMessage20Req message */ -struct SetDisplayMessage20Req +/** @brief SetDisplayMessageReq message */ +struct SetDisplayMessageReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::MessageInfoType20 message; + ocpp::types::ocpp20::MessageInfoType message; }; -/** @brief SetDisplayMessage20Conf message */ -struct SetDisplayMessage20Conf +/** @brief SetDisplayMessageConf message */ +struct SetDisplayMessageConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::DisplayMessageStatusEnumType20 status; + ocpp::types::ocpp20::DisplayMessageStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(SetDisplayMessage20) +MESSAGE_CONVERTERS(SetDisplayMessage) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_SETDISPLAYMESSAGE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETDISPLAYMESSAGE_H \ No newline at end of file diff --git a/src/ocpp20/messages/SetMonitoringBase20.cpp b/src/ocpp20/messages/SetMonitoringBase20.cpp index eb1ad477..75002ccd 100644 --- a/src/ocpp20/messages/SetMonitoringBase20.cpp +++ b/src/ocpp20/messages/SetMonitoringBase20.cpp @@ -32,23 +32,23 @@ namespace messages namespace ocpp20 { -/** @brief Convert a SetMonitoringBase20Req from a JSON representation */ -bool SetMonitoringBase20ReqConverter::fromJson(const rapidjson::Value& json, - SetMonitoringBase20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetMonitoringBaseReq from a JSON representation */ +bool SetMonitoringBaseReqConverter::fromJson(const rapidjson::Value& json, + SetMonitoringBaseReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // monitoringBase - data.monitoringBase = ocpp::types::ocpp20::MonitoringBaseEnumType20Helper.fromString(json["monitoringBase"].GetString()); + data.monitoringBase = ocpp::types::ocpp20::MonitoringBaseEnumTypeHelper.fromString(json["monitoringBase"].GetString()); if (!ret) { @@ -58,15 +58,15 @@ bool SetMonitoringBase20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SetMonitoringBase20Req to a JSON representation */ -bool SetMonitoringBase20ReqConverter::toJson(const SetMonitoringBase20Req& data, rapidjson::Document& json) +/** @brief Convert a SetMonitoringBaseReq to a JSON representation */ +bool SetMonitoringBaseReqConverter::toJson(const SetMonitoringBaseReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -75,33 +75,33 @@ bool SetMonitoringBase20ReqConverter::toJson(const SetMonitoringBase20Req& data, } // monitoringBase - fill(json, "monitoringBase", ocpp::types::ocpp20::MonitoringBaseEnumType20Helper.toString(data.monitoringBase)); + fill(json, "monitoringBase", ocpp::types::ocpp20::MonitoringBaseEnumTypeHelper.toString(data.monitoringBase)); return ret; } -/** @brief Convert a SetMonitoringBase20Conf from a JSON representation */ -bool SetMonitoringBase20ConfConverter::fromJson(const rapidjson::Value& json, - SetMonitoringBase20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetMonitoringBaseConf from a JSON representation */ +bool SetMonitoringBaseConfConverter::fromJson(const rapidjson::Value& json, + SetMonitoringBaseConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GenericDeviceModelStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GenericDeviceModelStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -113,15 +113,15 @@ bool SetMonitoringBase20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SetMonitoringBase20Conf to a JSON representation */ -bool SetMonitoringBase20ConfConverter::toJson(const SetMonitoringBase20Conf& data, rapidjson::Document& json) +/** @brief Convert a SetMonitoringBaseConf to a JSON representation */ +bool SetMonitoringBaseConfConverter::toJson(const SetMonitoringBaseConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -130,12 +130,12 @@ bool SetMonitoringBase20ConfConverter::toJson(const SetMonitoringBase20Conf& dat } // status - fill(json, "status", ocpp::types::ocpp20::GenericDeviceModelStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GenericDeviceModelStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/SetMonitoringBase20.h b/src/ocpp20/messages/SetMonitoringBase20.h index 6242e644..ac79942b 100644 --- a/src/ocpp20/messages/SetMonitoringBase20.h +++ b/src/ocpp20/messages/SetMonitoringBase20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETMONITORINGBASE20_H -#define OPENOCPP_SETMONITORINGBASE20_H +#ifndef OPENOCPP_OCPP20_SETMONITORINGBASE_H +#define OPENOCPP_OCPP20_SETMONITORINGBASE_H #include "IMessageConverter.h" @@ -38,34 +38,34 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the SetMonitoringBase20 messages */ -static const std::string SETMONITORINGBASE20_ACTION = "SetMonitoringBase"; +/** @brief Action corresponding to the SetMonitoringBase messages */ +static const std::string SETMONITORINGBASE_ACTION = "SetMonitoringBase"; -/** @brief SetMonitoringBase20Req message */ -struct SetMonitoringBase20Req +/** @brief SetMonitoringBaseReq message */ +struct SetMonitoringBaseReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::MonitoringBaseEnumType20 monitoringBase; + ocpp::types::ocpp20::MonitoringBaseEnumType monitoringBase; }; -/** @brief SetMonitoringBase20Conf message */ -struct SetMonitoringBase20Conf +/** @brief SetMonitoringBaseConf message */ +struct SetMonitoringBaseConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GenericDeviceModelStatusEnumType20 status; + ocpp::types::ocpp20::GenericDeviceModelStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(SetMonitoringBase20) +MESSAGE_CONVERTERS(SetMonitoringBase) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_SETMONITORINGBASE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETMONITORINGBASE_H \ No newline at end of file diff --git a/src/ocpp20/messages/SetMonitoringLevel20.cpp b/src/ocpp20/messages/SetMonitoringLevel20.cpp index 402392ff..c6b0ba90 100644 --- a/src/ocpp20/messages/SetMonitoringLevel20.cpp +++ b/src/ocpp20/messages/SetMonitoringLevel20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a SetMonitoringLevel20Req from a JSON representation */ -bool SetMonitoringLevel20ReqConverter::fromJson(const rapidjson::Value& json, - SetMonitoringLevel20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetMonitoringLevelReq from a JSON representation */ +bool SetMonitoringLevelReqConverter::fromJson(const rapidjson::Value& json, + SetMonitoringLevelReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -58,15 +58,15 @@ bool SetMonitoringLevel20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SetMonitoringLevel20Req to a JSON representation */ -bool SetMonitoringLevel20ReqConverter::toJson(const SetMonitoringLevel20Req& data, rapidjson::Document& json) +/** @brief Convert a SetMonitoringLevelReq to a JSON representation */ +bool SetMonitoringLevelReqConverter::toJson(const SetMonitoringLevelReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -80,28 +80,28 @@ bool SetMonitoringLevel20ReqConverter::toJson(const SetMonitoringLevel20Req& dat return ret; } -/** @brief Convert a SetMonitoringLevel20Conf from a JSON representation */ -bool SetMonitoringLevel20ConfConverter::fromJson(const rapidjson::Value& json, - SetMonitoringLevel20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetMonitoringLevelConf from a JSON representation */ +bool SetMonitoringLevelConfConverter::fromJson(const rapidjson::Value& json, + SetMonitoringLevelConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GenericStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GenericStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -113,15 +113,15 @@ bool SetMonitoringLevel20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SetMonitoringLevel20Conf to a JSON representation */ -bool SetMonitoringLevel20ConfConverter::toJson(const SetMonitoringLevel20Conf& data, rapidjson::Document& json) +/** @brief Convert a SetMonitoringLevelConf to a JSON representation */ +bool SetMonitoringLevelConfConverter::toJson(const SetMonitoringLevelConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -130,12 +130,12 @@ bool SetMonitoringLevel20ConfConverter::toJson(const SetMonitoringLevel20Conf& d } // status - fill(json, "status", ocpp::types::ocpp20::GenericStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GenericStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/SetMonitoringLevel20.h b/src/ocpp20/messages/SetMonitoringLevel20.h index ccbc083f..c290618d 100644 --- a/src/ocpp20/messages/SetMonitoringLevel20.h +++ b/src/ocpp20/messages/SetMonitoringLevel20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETMONITORINGLEVEL20_H -#define OPENOCPP_SETMONITORINGLEVEL20_H +#ifndef OPENOCPP_OCPP20_SETMONITORINGLEVEL_H +#define OPENOCPP_OCPP20_SETMONITORINGLEVEL_H #include "IMessageConverter.h" @@ -37,14 +37,14 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the SetMonitoringLevel20 messages */ -static const std::string SETMONITORINGLEVEL20_ACTION = "SetMonitoringLevel"; +/** @brief Action corresponding to the SetMonitoringLevel messages */ +static const std::string SETMONITORINGLEVEL_ACTION = "SetMonitoringLevel"; -/** @brief SetMonitoringLevel20Req message */ -struct SetMonitoringLevel20Req +/** @brief SetMonitoringLevelReq message */ +struct SetMonitoringLevelReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief The Charging Station SHALL only report events with a severity number lower than or equal to this severity. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level. @@ -72,22 +72,22 @@ Indicates information useful to developers for debugging, not useful during oper int severity; }; -/** @brief SetMonitoringLevel20Conf message */ -struct SetMonitoringLevel20Conf +/** @brief SetMonitoringLevelConf message */ +struct SetMonitoringLevelConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GenericStatusEnumType20 status; + ocpp::types::ocpp20::GenericStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(SetMonitoringLevel20) +MESSAGE_CONVERTERS(SetMonitoringLevel) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_SETMONITORINGLEVEL20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETMONITORINGLEVEL_H \ No newline at end of file diff --git a/src/ocpp20/messages/SetNetworkProfile20.cpp b/src/ocpp20/messages/SetNetworkProfile20.cpp index cc7bdf3e..d7c6d586 100644 --- a/src/ocpp20/messages/SetNetworkProfile20.cpp +++ b/src/ocpp20/messages/SetNetworkProfile20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a SetNetworkProfile20Req from a JSON representation */ -bool SetNetworkProfile20ReqConverter::fromJson(const rapidjson::Value& json, - SetNetworkProfile20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetNetworkProfileReq from a JSON representation */ +bool SetNetworkProfileReqConverter::fromJson(const rapidjson::Value& json, + SetNetworkProfileReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -51,7 +51,7 @@ bool SetNetworkProfile20ReqConverter::fromJson(const rapidjson::Value& json, extract(json, "configurationSlot", data.configurationSlot); // connectionData - ocpp::types::ocpp20::NetworkConnectionProfileType20Converter connectionData_converter; + ocpp::types::ocpp20::NetworkConnectionProfileTypeConverter connectionData_converter; ret = ret && connectionData_converter.fromJson(json["connectionData"], data.connectionData, error_code, error_message); if (!ret) @@ -62,15 +62,15 @@ bool SetNetworkProfile20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SetNetworkProfile20Req to a JSON representation */ -bool SetNetworkProfile20ReqConverter::toJson(const SetNetworkProfile20Req& data, rapidjson::Document& json) +/** @brief Convert a SetNetworkProfileReq to a JSON representation */ +bool SetNetworkProfileReqConverter::toJson(const SetNetworkProfileReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -82,7 +82,7 @@ bool SetNetworkProfile20ReqConverter::toJson(const SetNetworkProfile20Req& data, fill(json, "configurationSlot", data.configurationSlot); // connectionData - ocpp::types::ocpp20::NetworkConnectionProfileType20Converter connectionData_converter; + ocpp::types::ocpp20::NetworkConnectionProfileTypeConverter connectionData_converter; connectionData_converter.setAllocator(allocator); rapidjson::Document connectionData_doc; connectionData_doc.Parse("{}"); @@ -92,28 +92,28 @@ bool SetNetworkProfile20ReqConverter::toJson(const SetNetworkProfile20Req& data, return ret; } -/** @brief Convert a SetNetworkProfile20Conf from a JSON representation */ -bool SetNetworkProfile20ConfConverter::fromJson(const rapidjson::Value& json, - SetNetworkProfile20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetNetworkProfileConf from a JSON representation */ +bool SetNetworkProfileConfConverter::fromJson(const rapidjson::Value& json, + SetNetworkProfileConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::SetNetworkProfileStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::SetNetworkProfileStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -125,15 +125,15 @@ bool SetNetworkProfile20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SetNetworkProfile20Conf to a JSON representation */ -bool SetNetworkProfile20ConfConverter::toJson(const SetNetworkProfile20Conf& data, rapidjson::Document& json) +/** @brief Convert a SetNetworkProfileConf to a JSON representation */ +bool SetNetworkProfileConfConverter::toJson(const SetNetworkProfileConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -142,12 +142,12 @@ bool SetNetworkProfile20ConfConverter::toJson(const SetNetworkProfile20Conf& dat } // status - fill(json, "status", ocpp::types::ocpp20::SetNetworkProfileStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::SetNetworkProfileStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/SetNetworkProfile20.h b/src/ocpp20/messages/SetNetworkProfile20.h index 0ab90ea6..34a4e174 100644 --- a/src/ocpp20/messages/SetNetworkProfile20.h +++ b/src/ocpp20/messages/SetNetworkProfile20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETNETWORKPROFILE20_H -#define OPENOCPP_SETNETWORKPROFILE20_H +#ifndef OPENOCPP_OCPP20_SETNETWORKPROFILE_H +#define OPENOCPP_OCPP20_SETNETWORKPROFILE_H #include "IMessageConverter.h" @@ -38,36 +38,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the SetNetworkProfile20 messages */ -static const std::string SETNETWORKPROFILE20_ACTION = "SetNetworkProfile"; +/** @brief Action corresponding to the SetNetworkProfile messages */ +static const std::string SETNETWORKPROFILE_ACTION = "SetNetworkProfile"; -/** @brief SetNetworkProfile20Req message */ -struct SetNetworkProfile20Req +/** @brief SetNetworkProfileReq message */ +struct SetNetworkProfileReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Slot in which the configuration should be stored. */ int configurationSlot; /** @brief */ - ocpp::types::ocpp20::NetworkConnectionProfileType20 connectionData; + ocpp::types::ocpp20::NetworkConnectionProfileType connectionData; }; -/** @brief SetNetworkProfile20Conf message */ -struct SetNetworkProfile20Conf +/** @brief SetNetworkProfileConf message */ +struct SetNetworkProfileConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::SetNetworkProfileStatusEnumType20 status; + ocpp::types::ocpp20::SetNetworkProfileStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(SetNetworkProfile20) +MESSAGE_CONVERTERS(SetNetworkProfile) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_SETNETWORKPROFILE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETNETWORKPROFILE_H \ No newline at end of file diff --git a/src/ocpp20/messages/SetVariableMonitoring20.cpp b/src/ocpp20/messages/SetVariableMonitoring20.cpp index bf86f12e..8b022612 100644 --- a/src/ocpp20/messages/SetVariableMonitoring20.cpp +++ b/src/ocpp20/messages/SetVariableMonitoring20.cpp @@ -32,29 +32,29 @@ namespace messages namespace ocpp20 { -/** @brief Convert a SetVariableMonitoring20Req from a JSON representation */ -bool SetVariableMonitoring20ReqConverter::fromJson(const rapidjson::Value& json, - SetVariableMonitoring20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetVariableMonitoringReq from a JSON representation */ +bool SetVariableMonitoringReqConverter::fromJson(const rapidjson::Value& json, + SetVariableMonitoringReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // setMonitoringData if (json.HasMember("setMonitoringData")) { - const rapidjson::Value& setMonitoringData_json = json["setMonitoringData"]; - ocpp::types::ocpp20::SetMonitoringDataType20Converter setMonitoringData_converter; + const rapidjson::Value& setMonitoringData_json = json["setMonitoringData"]; + ocpp::types::ocpp20::SetMonitoringDataTypeConverter setMonitoringData_converter; for (auto it = setMonitoringData_json.Begin(); ret && (it != setMonitoringData_json.End()); ++it) { - ocpp::types::ocpp20::SetMonitoringDataType20& item = data.setMonitoringData.emplace_back(); + ocpp::types::ocpp20::SetMonitoringDataType& item = data.setMonitoringData.emplace_back(); ret = ret && setMonitoringData_converter.fromJson(*it, item, error_code, error_message); } } @@ -67,15 +67,15 @@ bool SetVariableMonitoring20ReqConverter::fromJson(const rapidjson::Value& j return ret; } -/** @brief Convert a SetVariableMonitoring20Req to a JSON representation */ -bool SetVariableMonitoring20ReqConverter::toJson(const SetVariableMonitoring20Req& data, rapidjson::Document& json) +/** @brief Convert a SetVariableMonitoringReq to a JSON representation */ +bool SetVariableMonitoringReqConverter::toJson(const SetVariableMonitoringReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -85,10 +85,10 @@ bool SetVariableMonitoring20ReqConverter::toJson(const SetVariableMonitoring20Re // setMonitoringData - rapidjson::Value setMonitoringData_json(rapidjson::kArrayType); - ocpp::types::ocpp20::SetMonitoringDataType20Converter setMonitoringData_converter; + rapidjson::Value setMonitoringData_json(rapidjson::kArrayType); + ocpp::types::ocpp20::SetMonitoringDataTypeConverter setMonitoringData_converter; setMonitoringData_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::SetMonitoringDataType20& item : data.setMonitoringData) + for (const ocpp::types::ocpp20::SetMonitoringDataType& item : data.setMonitoringData) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -100,29 +100,29 @@ bool SetVariableMonitoring20ReqConverter::toJson(const SetVariableMonitoring20Re return ret; } -/** @brief Convert a SetVariableMonitoring20Conf from a JSON representation */ -bool SetVariableMonitoring20ConfConverter::fromJson(const rapidjson::Value& json, - SetVariableMonitoring20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetVariableMonitoringConf from a JSON representation */ +bool SetVariableMonitoringConfConverter::fromJson(const rapidjson::Value& json, + SetVariableMonitoringConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // setMonitoringResult if (json.HasMember("setMonitoringResult")) { - const rapidjson::Value& setMonitoringResult_json = json["setMonitoringResult"]; - ocpp::types::ocpp20::SetMonitoringResultType20Converter setMonitoringResult_converter; + const rapidjson::Value& setMonitoringResult_json = json["setMonitoringResult"]; + ocpp::types::ocpp20::SetMonitoringResultTypeConverter setMonitoringResult_converter; for (auto it = setMonitoringResult_json.Begin(); ret && (it != setMonitoringResult_json.End()); ++it) { - ocpp::types::ocpp20::SetMonitoringResultType20& item = data.setMonitoringResult.emplace_back(); + ocpp::types::ocpp20::SetMonitoringResultType& item = data.setMonitoringResult.emplace_back(); ret = ret && setMonitoringResult_converter.fromJson(*it, item, error_code, error_message); } } @@ -135,15 +135,15 @@ bool SetVariableMonitoring20ConfConverter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a SetVariableMonitoring20Conf to a JSON representation */ -bool SetVariableMonitoring20ConfConverter::toJson(const SetVariableMonitoring20Conf& data, rapidjson::Document& json) +/** @brief Convert a SetVariableMonitoringConf to a JSON representation */ +bool SetVariableMonitoringConfConverter::toJson(const SetVariableMonitoringConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -153,10 +153,10 @@ bool SetVariableMonitoring20ConfConverter::toJson(const SetVariableMonitoring20C // setMonitoringResult - rapidjson::Value setMonitoringResult_json(rapidjson::kArrayType); - ocpp::types::ocpp20::SetMonitoringResultType20Converter setMonitoringResult_converter; + rapidjson::Value setMonitoringResult_json(rapidjson::kArrayType); + ocpp::types::ocpp20::SetMonitoringResultTypeConverter setMonitoringResult_converter; setMonitoringResult_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::SetMonitoringResultType20& item : data.setMonitoringResult) + for (const ocpp::types::ocpp20::SetMonitoringResultType& item : data.setMonitoringResult) { rapidjson::Document item_doc; item_doc.Parse("{}"); diff --git a/src/ocpp20/messages/SetVariableMonitoring20.h b/src/ocpp20/messages/SetVariableMonitoring20.h index fd5883cf..2105d5af 100644 --- a/src/ocpp20/messages/SetVariableMonitoring20.h +++ b/src/ocpp20/messages/SetVariableMonitoring20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETVARIABLEMONITORING20_H -#define OPENOCPP_SETVARIABLEMONITORING20_H +#ifndef OPENOCPP_OCPP20_SETVARIABLEMONITORING_H +#define OPENOCPP_OCPP20_SETVARIABLEMONITORING_H #include "IMessageConverter.h" @@ -37,32 +37,32 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the SetVariableMonitoring20 messages */ -static const std::string SETVARIABLEMONITORING20_ACTION = "SetVariableMonitoring"; +/** @brief Action corresponding to the SetVariableMonitoring messages */ +static const std::string SETVARIABLEMONITORING_ACTION = "SetVariableMonitoring"; -/** @brief SetVariableMonitoring20Req message */ -struct SetVariableMonitoring20Req +/** @brief SetVariableMonitoringReq message */ +struct SetVariableMonitoringReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector setMonitoringData; + std::vector setMonitoringData; }; -/** @brief SetVariableMonitoring20Conf message */ -struct SetVariableMonitoring20Conf +/** @brief SetVariableMonitoringConf message */ +struct SetVariableMonitoringConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector setMonitoringResult; + std::vector setMonitoringResult; }; // Message converters -MESSAGE_CONVERTERS(SetVariableMonitoring20) +MESSAGE_CONVERTERS(SetVariableMonitoring) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_SETVARIABLEMONITORING20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETVARIABLEMONITORING_H \ No newline at end of file diff --git a/src/ocpp20/messages/SetVariables20.cpp b/src/ocpp20/messages/SetVariables20.cpp index 858d1eab..2bf08fa7 100644 --- a/src/ocpp20/messages/SetVariables20.cpp +++ b/src/ocpp20/messages/SetVariables20.cpp @@ -32,29 +32,29 @@ namespace messages namespace ocpp20 { -/** @brief Convert a SetVariables20Req from a JSON representation */ -bool SetVariables20ReqConverter::fromJson(const rapidjson::Value& json, - SetVariables20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetVariablesReq from a JSON representation */ +bool SetVariablesReqConverter::fromJson(const rapidjson::Value& json, + SetVariablesReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // setVariableData if (json.HasMember("setVariableData")) { - const rapidjson::Value& setVariableData_json = json["setVariableData"]; - ocpp::types::ocpp20::SetVariableDataType20Converter setVariableData_converter; + const rapidjson::Value& setVariableData_json = json["setVariableData"]; + ocpp::types::ocpp20::SetVariableDataTypeConverter setVariableData_converter; for (auto it = setVariableData_json.Begin(); ret && (it != setVariableData_json.End()); ++it) { - ocpp::types::ocpp20::SetVariableDataType20& item = data.setVariableData.emplace_back(); + ocpp::types::ocpp20::SetVariableDataType& item = data.setVariableData.emplace_back(); ret = ret && setVariableData_converter.fromJson(*it, item, error_code, error_message); } } @@ -67,15 +67,15 @@ bool SetVariables20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SetVariables20Req to a JSON representation */ -bool SetVariables20ReqConverter::toJson(const SetVariables20Req& data, rapidjson::Document& json) +/** @brief Convert a SetVariablesReq to a JSON representation */ +bool SetVariablesReqConverter::toJson(const SetVariablesReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -85,10 +85,10 @@ bool SetVariables20ReqConverter::toJson(const SetVariables20Req& data, rapidjson // setVariableData - rapidjson::Value setVariableData_json(rapidjson::kArrayType); - ocpp::types::ocpp20::SetVariableDataType20Converter setVariableData_converter; + rapidjson::Value setVariableData_json(rapidjson::kArrayType); + ocpp::types::ocpp20::SetVariableDataTypeConverter setVariableData_converter; setVariableData_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::SetVariableDataType20& item : data.setVariableData) + for (const ocpp::types::ocpp20::SetVariableDataType& item : data.setVariableData) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -100,29 +100,29 @@ bool SetVariables20ReqConverter::toJson(const SetVariables20Req& data, rapidjson return ret; } -/** @brief Convert a SetVariables20Conf from a JSON representation */ -bool SetVariables20ConfConverter::fromJson(const rapidjson::Value& json, - SetVariables20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SetVariablesConf from a JSON representation */ +bool SetVariablesConfConverter::fromJson(const rapidjson::Value& json, + SetVariablesConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // setVariableResult if (json.HasMember("setVariableResult")) { - const rapidjson::Value& setVariableResult_json = json["setVariableResult"]; - ocpp::types::ocpp20::SetVariableResultType20Converter setVariableResult_converter; + const rapidjson::Value& setVariableResult_json = json["setVariableResult"]; + ocpp::types::ocpp20::SetVariableResultTypeConverter setVariableResult_converter; for (auto it = setVariableResult_json.Begin(); ret && (it != setVariableResult_json.End()); ++it) { - ocpp::types::ocpp20::SetVariableResultType20& item = data.setVariableResult.emplace_back(); + ocpp::types::ocpp20::SetVariableResultType& item = data.setVariableResult.emplace_back(); ret = ret && setVariableResult_converter.fromJson(*it, item, error_code, error_message); } } @@ -135,15 +135,15 @@ bool SetVariables20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SetVariables20Conf to a JSON representation */ -bool SetVariables20ConfConverter::toJson(const SetVariables20Conf& data, rapidjson::Document& json) +/** @brief Convert a SetVariablesConf to a JSON representation */ +bool SetVariablesConfConverter::toJson(const SetVariablesConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -153,10 +153,10 @@ bool SetVariables20ConfConverter::toJson(const SetVariables20Conf& data, rapidjs // setVariableResult - rapidjson::Value setVariableResult_json(rapidjson::kArrayType); - ocpp::types::ocpp20::SetVariableResultType20Converter setVariableResult_converter; + rapidjson::Value setVariableResult_json(rapidjson::kArrayType); + ocpp::types::ocpp20::SetVariableResultTypeConverter setVariableResult_converter; setVariableResult_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::SetVariableResultType20& item : data.setVariableResult) + for (const ocpp::types::ocpp20::SetVariableResultType& item : data.setVariableResult) { rapidjson::Document item_doc; item_doc.Parse("{}"); diff --git a/src/ocpp20/messages/SetVariables20.h b/src/ocpp20/messages/SetVariables20.h index f99fb2a9..3db99c3f 100644 --- a/src/ocpp20/messages/SetVariables20.h +++ b/src/ocpp20/messages/SetVariables20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETVARIABLES20_H -#define OPENOCPP_SETVARIABLES20_H +#ifndef OPENOCPP_OCPP20_SETVARIABLES_H +#define OPENOCPP_OCPP20_SETVARIABLES_H #include "IMessageConverter.h" @@ -37,32 +37,32 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the SetVariables20 messages */ -static const std::string SETVARIABLES20_ACTION = "SetVariables"; +/** @brief Action corresponding to the SetVariables messages */ +static const std::string SETVARIABLES_ACTION = "SetVariables"; -/** @brief SetVariables20Req message */ -struct SetVariables20Req +/** @brief SetVariablesReq message */ +struct SetVariablesReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector setVariableData; + std::vector setVariableData; }; -/** @brief SetVariables20Conf message */ -struct SetVariables20Conf +/** @brief SetVariablesConf message */ +struct SetVariablesConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector setVariableResult; + std::vector setVariableResult; }; // Message converters -MESSAGE_CONVERTERS(SetVariables20) +MESSAGE_CONVERTERS(SetVariables) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_SETVARIABLES20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETVARIABLES_H \ No newline at end of file diff --git a/src/ocpp20/messages/SignCertificate20.cpp b/src/ocpp20/messages/SignCertificate20.cpp index f5dc6b14..7d91d631 100644 --- a/src/ocpp20/messages/SignCertificate20.cpp +++ b/src/ocpp20/messages/SignCertificate20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a SignCertificate20Req from a JSON representation */ -bool SignCertificate20ReqConverter::fromJson(const rapidjson::Value& json, - SignCertificate20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SignCertificateReq from a JSON representation */ +bool SignCertificateReqConverter::fromJson(const rapidjson::Value& json, + SignCertificateReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -53,7 +53,7 @@ bool SignCertificate20ReqConverter::fromJson(const rapidjson::Value& json, // certificateType if (json.HasMember("certificateType")) { - data.certificateType = ocpp::types::ocpp20::CertificateSigningUseEnumType20Helper.fromString(json["certificateType"].GetString()); + data.certificateType = ocpp::types::ocpp20::CertificateSigningUseEnumTypeHelper.fromString(json["certificateType"].GetString()); } if (!ret) @@ -64,15 +64,15 @@ bool SignCertificate20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SignCertificate20Req to a JSON representation */ -bool SignCertificate20ReqConverter::toJson(const SignCertificate20Req& data, rapidjson::Document& json) +/** @brief Convert a SignCertificateReq to a JSON representation */ +bool SignCertificateReqConverter::toJson(const SignCertificateReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -86,34 +86,34 @@ bool SignCertificate20ReqConverter::toJson(const SignCertificate20Req& data, rap // certificateType if (data.certificateType.isSet()) { - fill(json, "certificateType", ocpp::types::ocpp20::CertificateSigningUseEnumType20Helper.toString(data.certificateType)); + fill(json, "certificateType", ocpp::types::ocpp20::CertificateSigningUseEnumTypeHelper.toString(data.certificateType)); } return ret; } -/** @brief Convert a SignCertificate20Conf from a JSON representation */ -bool SignCertificate20ConfConverter::fromJson(const rapidjson::Value& json, - SignCertificate20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a SignCertificateConf from a JSON representation */ +bool SignCertificateConfConverter::fromJson(const rapidjson::Value& json, + SignCertificateConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::GenericStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::GenericStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -125,15 +125,15 @@ bool SignCertificate20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SignCertificate20Conf to a JSON representation */ -bool SignCertificate20ConfConverter::toJson(const SignCertificate20Conf& data, rapidjson::Document& json) +/** @brief Convert a SignCertificateConf to a JSON representation */ +bool SignCertificateConfConverter::toJson(const SignCertificateConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -142,12 +142,12 @@ bool SignCertificate20ConfConverter::toJson(const SignCertificate20Conf& data, r } // status - fill(json, "status", ocpp::types::ocpp20::GenericStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::GenericStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/SignCertificate20.h b/src/ocpp20/messages/SignCertificate20.h index 322bdaf3..93ed081b 100644 --- a/src/ocpp20/messages/SignCertificate20.h +++ b/src/ocpp20/messages/SignCertificate20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SIGNCERTIFICATE20_H -#define OPENOCPP_SIGNCERTIFICATE20_H +#ifndef OPENOCPP_OCPP20_SIGNCERTIFICATE_H +#define OPENOCPP_OCPP20_SIGNCERTIFICATE_H #include "IMessageConverter.h" @@ -38,36 +38,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the SignCertificate20 messages */ -static const std::string SIGNCERTIFICATE20_ACTION = "SignCertificate"; +/** @brief Action corresponding to the SignCertificate messages */ +static const std::string SIGNCERTIFICATE_ACTION = "SignCertificate"; -/** @brief SignCertificate20Req message */ -struct SignCertificate20Req +/** @brief SignCertificateReq message */ +struct SignCertificateReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief The Charging Station SHALL send the public key in form of a Certificate Signing Request (CSR) as described in RFC 2986 [22] and then PEM encoded, using the <<signcertificaterequest,SignCertificateRequest>> message. */ ocpp::types::CiStringType<5500u> csr; /** @brief */ - ocpp::types::Optional certificateType; + ocpp::types::Optional certificateType; }; -/** @brief SignCertificate20Conf message */ -struct SignCertificate20Conf +/** @brief SignCertificateConf message */ +struct SignCertificateConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::GenericStatusEnumType20 status; + ocpp::types::ocpp20::GenericStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(SignCertificate20) +MESSAGE_CONVERTERS(SignCertificate) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_SIGNCERTIFICATE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SIGNCERTIFICATE_H \ No newline at end of file diff --git a/src/ocpp20/messages/StatusNotification20.cpp b/src/ocpp20/messages/StatusNotification20.cpp index 996adb8a..f607183d 100644 --- a/src/ocpp20/messages/StatusNotification20.cpp +++ b/src/ocpp20/messages/StatusNotification20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a StatusNotification20Req from a JSON representation */ -bool StatusNotification20ReqConverter::fromJson(const rapidjson::Value& json, - StatusNotification20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a StatusNotificationReq from a JSON representation */ +bool StatusNotificationReqConverter::fromJson(const rapidjson::Value& json, + StatusNotificationReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -51,7 +51,7 @@ bool StatusNotification20ReqConverter::fromJson(const rapidjson::Value& json, ret = ret && extract(json, "timestamp", data.timestamp, error_message); // connectorStatus - data.connectorStatus = ocpp::types::ocpp20::ConnectorStatusEnumType20Helper.fromString(json["connectorStatus"].GetString()); + data.connectorStatus = ocpp::types::ocpp20::ConnectorStatusEnumTypeHelper.fromString(json["connectorStatus"].GetString()); // evseId extract(json, "evseId", data.evseId); @@ -67,15 +67,15 @@ bool StatusNotification20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a StatusNotification20Req to a JSON representation */ -bool StatusNotification20ReqConverter::toJson(const StatusNotification20Req& data, rapidjson::Document& json) +/** @brief Convert a StatusNotificationReq to a JSON representation */ +bool StatusNotificationReqConverter::toJson(const StatusNotificationReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -87,7 +87,7 @@ bool StatusNotification20ReqConverter::toJson(const StatusNotification20Req& dat fill(json, "timestamp", data.timestamp); // connectorStatus - fill(json, "connectorStatus", ocpp::types::ocpp20::ConnectorStatusEnumType20Helper.toString(data.connectorStatus)); + fill(json, "connectorStatus", ocpp::types::ocpp20::ConnectorStatusEnumTypeHelper.toString(data.connectorStatus)); // evseId fill(json, "evseId", data.evseId); @@ -98,18 +98,18 @@ bool StatusNotification20ReqConverter::toJson(const StatusNotification20Req& dat return ret; } -/** @brief Convert a StatusNotification20Conf from a JSON representation */ -bool StatusNotification20ConfConverter::fromJson(const rapidjson::Value& json, - StatusNotification20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a StatusNotificationConf from a JSON representation */ +bool StatusNotificationConfConverter::fromJson(const rapidjson::Value& json, + StatusNotificationConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -121,15 +121,15 @@ bool StatusNotification20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a StatusNotification20Conf to a JSON representation */ -bool StatusNotification20ConfConverter::toJson(const StatusNotification20Conf& data, rapidjson::Document& json) +/** @brief Convert a StatusNotificationConf to a JSON representation */ +bool StatusNotificationConfConverter::toJson(const StatusNotificationConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/messages/StatusNotification20.h b/src/ocpp20/messages/StatusNotification20.h index 6c07e83e..0ec796ac 100644 --- a/src/ocpp20/messages/StatusNotification20.h +++ b/src/ocpp20/messages/StatusNotification20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_STATUSNOTIFICATION20_H -#define OPENOCPP_STATUSNOTIFICATION20_H +#ifndef OPENOCPP_OCPP20_STATUSNOTIFICATION_H +#define OPENOCPP_OCPP20_STATUSNOTIFICATION_H #include "IMessageConverter.h" @@ -36,36 +36,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the StatusNotification20 messages */ -static const std::string STATUSNOTIFICATION20_ACTION = "StatusNotification"; +/** @brief Action corresponding to the StatusNotification messages */ +static const std::string STATUSNOTIFICATION_ACTION = "StatusNotification"; -/** @brief StatusNotification20Req message */ -struct StatusNotification20Req +/** @brief StatusNotificationReq message */ +struct StatusNotificationReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief The time for which the status is reported. If absent time of receipt of the message will be assumed. */ ocpp::types::DateTime timestamp; /** @brief */ - ocpp::types::ocpp20::ConnectorStatusEnumType20 connectorStatus; + ocpp::types::ocpp20::ConnectorStatusEnumType connectorStatus; /** @brief The id of the EVSE to which the connector belongs for which the the status is reported. */ int evseId; /** @brief The id of the connector within the EVSE for which the status is reported. */ int connectorId; }; -/** @brief StatusNotification20Conf message */ -struct StatusNotification20Conf +/** @brief StatusNotificationConf message */ +struct StatusNotificationConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; }; // Message converters -MESSAGE_CONVERTERS(StatusNotification20) +MESSAGE_CONVERTERS(StatusNotification) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_STATUSNOTIFICATION20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_STATUSNOTIFICATION_H \ No newline at end of file diff --git a/src/ocpp20/messages/TransactionEvent20.cpp b/src/ocpp20/messages/TransactionEvent20.cpp index b80d457c..e8ce4564 100644 --- a/src/ocpp20/messages/TransactionEvent20.cpp +++ b/src/ocpp20/messages/TransactionEvent20.cpp @@ -32,33 +32,33 @@ namespace messages namespace ocpp20 { -/** @brief Convert a TransactionEvent20Req from a JSON representation */ -bool TransactionEvent20ReqConverter::fromJson(const rapidjson::Value& json, - TransactionEvent20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a TransactionEventReq from a JSON representation */ +bool TransactionEventReqConverter::fromJson(const rapidjson::Value& json, + TransactionEventReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // eventType - data.eventType = ocpp::types::ocpp20::TransactionEventEnumType20Helper.fromString(json["eventType"].GetString()); + data.eventType = ocpp::types::ocpp20::TransactionEventEnumTypeHelper.fromString(json["eventType"].GetString()); // meterValue if (json.HasMember("meterValue")) { - const rapidjson::Value& meterValue_json = json["meterValue"]; - ocpp::types::ocpp20::MeterValueType20Converter meterValue_converter; + const rapidjson::Value& meterValue_json = json["meterValue"]; + ocpp::types::ocpp20::MeterValueTypeConverter meterValue_converter; for (auto it = meterValue_json.Begin(); ret && (it != meterValue_json.End()); ++it) { - ocpp::types::ocpp20::MeterValueType20& item = data.meterValue.emplace_back(); - ret = ret && meterValue_converter.fromJson(*it, item, error_code, error_message); + ocpp::types::ocpp20::MeterValueType& item = data.meterValue.emplace_back(); + ret = ret && meterValue_converter.fromJson(*it, item, error_code, error_message); } } @@ -66,7 +66,7 @@ bool TransactionEvent20ReqConverter::fromJson(const rapidjson::Value& json, ret = ret && extract(json, "timestamp", data.timestamp, error_message); // triggerReason - data.triggerReason = ocpp::types::ocpp20::TriggerReasonEnumType20Helper.fromString(json["triggerReason"].GetString()); + data.triggerReason = ocpp::types::ocpp20::TriggerReasonEnumTypeHelper.fromString(json["triggerReason"].GetString()); // seqNo extract(json, "seqNo", data.seqNo); @@ -84,20 +84,20 @@ bool TransactionEvent20ReqConverter::fromJson(const rapidjson::Value& json, extract(json, "reservationId", data.reservationId); // transactionInfo - ocpp::types::ocpp20::TransactionType20Converter transactionInfo_converter; + ocpp::types::ocpp20::TransactionTypeConverter transactionInfo_converter; ret = ret && transactionInfo_converter.fromJson(json["transactionInfo"], data.transactionInfo, error_code, error_message); // evse if (json.HasMember("evse")) { - ocpp::types::ocpp20::EVSEType20Converter evse_converter; + ocpp::types::ocpp20::EVSETypeConverter evse_converter; ret = ret && evse_converter.fromJson(json["evse"], data.evse, error_code, error_message); } // idToken if (json.HasMember("idToken")) { - ocpp::types::ocpp20::IdTokenType20Converter idToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter idToken_converter; ret = ret && idToken_converter.fromJson(json["idToken"], data.idToken, error_code, error_message); } @@ -109,15 +109,15 @@ bool TransactionEvent20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a TransactionEvent20Req to a JSON representation */ -bool TransactionEvent20ReqConverter::toJson(const TransactionEvent20Req& data, rapidjson::Document& json) +/** @brief Convert a TransactionEventReq to a JSON representation */ +bool TransactionEventReqConverter::toJson(const TransactionEventReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -126,16 +126,16 @@ bool TransactionEvent20ReqConverter::toJson(const TransactionEvent20Req& data, r } // eventType - fill(json, "eventType", ocpp::types::ocpp20::TransactionEventEnumType20Helper.toString(data.eventType)); + fill(json, "eventType", ocpp::types::ocpp20::TransactionEventEnumTypeHelper.toString(data.eventType)); // meterValue if (!data.meterValue.empty()) { - rapidjson::Value meterValue_json(rapidjson::kArrayType); - ocpp::types::ocpp20::MeterValueType20Converter meterValue_converter; + rapidjson::Value meterValue_json(rapidjson::kArrayType); + ocpp::types::ocpp20::MeterValueTypeConverter meterValue_converter; meterValue_converter.setAllocator(allocator); - for (const ocpp::types::ocpp20::MeterValueType20& item : data.meterValue) + for (const ocpp::types::ocpp20::MeterValueType& item : data.meterValue) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -149,7 +149,7 @@ bool TransactionEvent20ReqConverter::toJson(const TransactionEvent20Req& data, r fill(json, "timestamp", data.timestamp); // triggerReason - fill(json, "triggerReason", ocpp::types::ocpp20::TriggerReasonEnumType20Helper.toString(data.triggerReason)); + fill(json, "triggerReason", ocpp::types::ocpp20::TriggerReasonEnumTypeHelper.toString(data.triggerReason)); // seqNo fill(json, "seqNo", data.seqNo); @@ -167,7 +167,7 @@ bool TransactionEvent20ReqConverter::toJson(const TransactionEvent20Req& data, r fill(json, "reservationId", data.reservationId); // transactionInfo - ocpp::types::ocpp20::TransactionType20Converter transactionInfo_converter; + ocpp::types::ocpp20::TransactionTypeConverter transactionInfo_converter; transactionInfo_converter.setAllocator(allocator); rapidjson::Document transactionInfo_doc; transactionInfo_doc.Parse("{}"); @@ -177,7 +177,7 @@ bool TransactionEvent20ReqConverter::toJson(const TransactionEvent20Req& data, r // evse if (data.evse.isSet()) { - ocpp::types::ocpp20::EVSEType20Converter evse_converter; + ocpp::types::ocpp20::EVSETypeConverter evse_converter; evse_converter.setAllocator(allocator); rapidjson::Document evse_doc; evse_doc.Parse("{}"); @@ -188,7 +188,7 @@ bool TransactionEvent20ReqConverter::toJson(const TransactionEvent20Req& data, r // idToken if (data.idToken.isSet()) { - ocpp::types::ocpp20::IdTokenType20Converter idToken_converter; + ocpp::types::ocpp20::IdTokenTypeConverter idToken_converter; idToken_converter.setAllocator(allocator); rapidjson::Document idToken_doc; idToken_doc.Parse("{}"); @@ -199,18 +199,18 @@ bool TransactionEvent20ReqConverter::toJson(const TransactionEvent20Req& data, r return ret; } -/** @brief Convert a TransactionEvent20Conf from a JSON representation */ -bool TransactionEvent20ConfConverter::fromJson(const rapidjson::Value& json, - TransactionEvent20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a TransactionEventConf from a JSON representation */ +bool TransactionEventConfConverter::fromJson(const rapidjson::Value& json, + TransactionEventConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -223,14 +223,14 @@ bool TransactionEvent20ConfConverter::fromJson(const rapidjson::Value& json, // idTokenInfo if (json.HasMember("idTokenInfo")) { - ocpp::types::ocpp20::IdTokenInfoType20Converter idTokenInfo_converter; + ocpp::types::ocpp20::IdTokenInfoTypeConverter idTokenInfo_converter; ret = ret && idTokenInfo_converter.fromJson(json["idTokenInfo"], data.idTokenInfo, error_code, error_message); } // updatedPersonalMessage if (json.HasMember("updatedPersonalMessage")) { - ocpp::types::ocpp20::MessageContentType20Converter updatedPersonalMessage_converter; + ocpp::types::ocpp20::MessageContentTypeConverter updatedPersonalMessage_converter; ret = ret && updatedPersonalMessage_converter.fromJson( json["updatedPersonalMessage"], data.updatedPersonalMessage, error_code, error_message); } @@ -243,15 +243,15 @@ bool TransactionEvent20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a TransactionEvent20Conf to a JSON representation */ -bool TransactionEvent20ConfConverter::toJson(const TransactionEvent20Conf& data, rapidjson::Document& json) +/** @brief Convert a TransactionEventConf to a JSON representation */ +bool TransactionEventConfConverter::toJson(const TransactionEventConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -268,7 +268,7 @@ bool TransactionEvent20ConfConverter::toJson(const TransactionEvent20Conf& data, // idTokenInfo if (data.idTokenInfo.isSet()) { - ocpp::types::ocpp20::IdTokenInfoType20Converter idTokenInfo_converter; + ocpp::types::ocpp20::IdTokenInfoTypeConverter idTokenInfo_converter; idTokenInfo_converter.setAllocator(allocator); rapidjson::Document idTokenInfo_doc; idTokenInfo_doc.Parse("{}"); @@ -279,7 +279,7 @@ bool TransactionEvent20ConfConverter::toJson(const TransactionEvent20Conf& data, // updatedPersonalMessage if (data.updatedPersonalMessage.isSet()) { - ocpp::types::ocpp20::MessageContentType20Converter updatedPersonalMessage_converter; + ocpp::types::ocpp20::MessageContentTypeConverter updatedPersonalMessage_converter; updatedPersonalMessage_converter.setAllocator(allocator); rapidjson::Document updatedPersonalMessage_doc; updatedPersonalMessage_doc.Parse("{}"); diff --git a/src/ocpp20/messages/TransactionEvent20.h b/src/ocpp20/messages/TransactionEvent20.h index 915127f3..caaf1a84 100644 --- a/src/ocpp20/messages/TransactionEvent20.h +++ b/src/ocpp20/messages/TransactionEvent20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_TRANSACTIONEVENT20_H -#define OPENOCPP_TRANSACTIONEVENT20_H +#ifndef OPENOCPP_OCPP20_TRANSACTIONEVENT_H +#define OPENOCPP_OCPP20_TRANSACTIONEVENT_H #include "IMessageConverter.h" @@ -43,22 +43,22 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the TransactionEvent20 messages */ -static const std::string TRANSACTIONEVENT20_ACTION = "TransactionEvent"; +/** @brief Action corresponding to the TransactionEvent messages */ +static const std::string TRANSACTIONEVENT_ACTION = "TransactionEvent"; -/** @brief TransactionEvent20Req message */ -struct TransactionEvent20Req +/** @brief TransactionEventReq message */ +struct TransactionEventReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::TransactionEventEnumType20 eventType; + ocpp::types::ocpp20::TransactionEventEnumType eventType; /** @brief */ - std::vector meterValue; + std::vector meterValue; /** @brief The date and time at which this transaction event occurred. */ ocpp::types::DateTime timestamp; /** @brief */ - ocpp::types::ocpp20::TriggerReasonEnumType20 triggerReason; + ocpp::types::ocpp20::TriggerReasonEnumType triggerReason; /** @brief Incremental sequence number, helps with determining if all messages of a transaction have been received. */ int seqNo; /** @brief Indication that this transaction event happened when the Charging Station was offline. Default = false, meaning: the event occurred when the Charging Station was online. */ @@ -70,33 +70,33 @@ struct TransactionEvent20Req /** @brief This contains the Id of the reservation that terminates as a result of this transaction. */ ocpp::types::Optional reservationId; /** @brief */ - ocpp::types::ocpp20::TransactionType20 transactionInfo; + ocpp::types::ocpp20::TransactionType transactionInfo; /** @brief */ - ocpp::types::Optional evse; + ocpp::types::Optional evse; /** @brief */ - ocpp::types::Optional idToken; + ocpp::types::Optional idToken; }; -/** @brief TransactionEvent20Conf message */ -struct TransactionEvent20Conf +/** @brief TransactionEventConf message */ +struct TransactionEventConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief SHALL only be sent when charging has ended. Final total cost of this transaction, including taxes. In the currency configured with the Configuration Variable: <<configkey-currency,`Currency`>>. When omitted, the transaction was NOT free. To indicate a free transaction, the CSMS SHALL send 0.00. */ ocpp::types::Optional totalCost; /** @brief Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in <<transactioneventresponse,TransactionEventResponse>> is temporarily, so it may not be set in the <<cmn_idtokeninfotype,IdTokenInfoType>> afterwards. Also the chargingPriority in <<transactioneventresponse,TransactionEventResponse>> overrules the one in <<cmn_idtokeninfotype,IdTokenInfoType>>. */ ocpp::types::Optional chargingPriority; /** @brief */ - ocpp::types::Optional idTokenInfo; + ocpp::types::Optional idTokenInfo; /** @brief */ - ocpp::types::Optional updatedPersonalMessage; + ocpp::types::Optional updatedPersonalMessage; }; // Message converters -MESSAGE_CONVERTERS(TransactionEvent20) +MESSAGE_CONVERTERS(TransactionEvent) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_TRANSACTIONEVENT20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_TRANSACTIONEVENT_H \ No newline at end of file diff --git a/src/ocpp20/messages/TriggerMessage20.cpp b/src/ocpp20/messages/TriggerMessage20.cpp index 34d2fb49..8f54d5bc 100644 --- a/src/ocpp20/messages/TriggerMessage20.cpp +++ b/src/ocpp20/messages/TriggerMessage20.cpp @@ -32,30 +32,30 @@ namespace messages namespace ocpp20 { -/** @brief Convert a TriggerMessage20Req from a JSON representation */ -bool TriggerMessage20ReqConverter::fromJson(const rapidjson::Value& json, - TriggerMessage20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a TriggerMessageReq from a JSON representation */ +bool TriggerMessageReqConverter::fromJson(const rapidjson::Value& json, + TriggerMessageReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // evse if (json.HasMember("evse")) { - ocpp::types::ocpp20::EVSEType20Converter evse_converter; + ocpp::types::ocpp20::EVSETypeConverter evse_converter; ret = ret && evse_converter.fromJson(json["evse"], data.evse, error_code, error_message); } // requestedMessage - data.requestedMessage = ocpp::types::ocpp20::MessageTriggerEnumType20Helper.fromString(json["requestedMessage"].GetString()); + data.requestedMessage = ocpp::types::ocpp20::MessageTriggerEnumTypeHelper.fromString(json["requestedMessage"].GetString()); if (!ret) { @@ -65,15 +65,15 @@ bool TriggerMessage20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a TriggerMessage20Req to a JSON representation */ -bool TriggerMessage20ReqConverter::toJson(const TriggerMessage20Req& data, rapidjson::Document& json) +/** @brief Convert a TriggerMessageReq to a JSON representation */ +bool TriggerMessageReqConverter::toJson(const TriggerMessageReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -84,7 +84,7 @@ bool TriggerMessage20ReqConverter::toJson(const TriggerMessage20Req& data, rapid // evse if (data.evse.isSet()) { - ocpp::types::ocpp20::EVSEType20Converter evse_converter; + ocpp::types::ocpp20::EVSETypeConverter evse_converter; evse_converter.setAllocator(allocator); rapidjson::Document evse_doc; evse_doc.Parse("{}"); @@ -93,33 +93,33 @@ bool TriggerMessage20ReqConverter::toJson(const TriggerMessage20Req& data, rapid } // requestedMessage - fill(json, "requestedMessage", ocpp::types::ocpp20::MessageTriggerEnumType20Helper.toString(data.requestedMessage)); + fill(json, "requestedMessage", ocpp::types::ocpp20::MessageTriggerEnumTypeHelper.toString(data.requestedMessage)); return ret; } -/** @brief Convert a TriggerMessage20Conf from a JSON representation */ -bool TriggerMessage20ConfConverter::fromJson(const rapidjson::Value& json, - TriggerMessage20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a TriggerMessageConf from a JSON representation */ +bool TriggerMessageConfConverter::fromJson(const rapidjson::Value& json, + TriggerMessageConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::TriggerMessageStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::TriggerMessageStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -131,15 +131,15 @@ bool TriggerMessage20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a TriggerMessage20Conf to a JSON representation */ -bool TriggerMessage20ConfConverter::toJson(const TriggerMessage20Conf& data, rapidjson::Document& json) +/** @brief Convert a TriggerMessageConf to a JSON representation */ +bool TriggerMessageConfConverter::toJson(const TriggerMessageConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -148,12 +148,12 @@ bool TriggerMessage20ConfConverter::toJson(const TriggerMessage20Conf& data, rap } // status - fill(json, "status", ocpp::types::ocpp20::TriggerMessageStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::TriggerMessageStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/TriggerMessage20.h b/src/ocpp20/messages/TriggerMessage20.h index 650b5fc9..1ac87dba 100644 --- a/src/ocpp20/messages/TriggerMessage20.h +++ b/src/ocpp20/messages/TriggerMessage20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_TRIGGERMESSAGE20_H -#define OPENOCPP_TRIGGERMESSAGE20_H +#ifndef OPENOCPP_OCPP20_TRIGGERMESSAGE_H +#define OPENOCPP_OCPP20_TRIGGERMESSAGE_H #include "IMessageConverter.h" @@ -39,36 +39,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the TriggerMessage20 messages */ -static const std::string TRIGGERMESSAGE20_ACTION = "TriggerMessage"; +/** @brief Action corresponding to the TriggerMessage messages */ +static const std::string TRIGGERMESSAGE_ACTION = "TriggerMessage"; -/** @brief TriggerMessage20Req message */ -struct TriggerMessage20Req +/** @brief TriggerMessageReq message */ +struct TriggerMessageReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional evse; + ocpp::types::Optional evse; /** @brief */ - ocpp::types::ocpp20::MessageTriggerEnumType20 requestedMessage; + ocpp::types::ocpp20::MessageTriggerEnumType requestedMessage; }; -/** @brief TriggerMessage20Conf message */ -struct TriggerMessage20Conf +/** @brief TriggerMessageConf message */ +struct TriggerMessageConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::TriggerMessageStatusEnumType20 status; + ocpp::types::ocpp20::TriggerMessageStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(TriggerMessage20) +MESSAGE_CONVERTERS(TriggerMessage) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_TRIGGERMESSAGE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_TRIGGERMESSAGE_H \ No newline at end of file diff --git a/src/ocpp20/messages/UnlockConnector20.cpp b/src/ocpp20/messages/UnlockConnector20.cpp index f5721c75..d71590c1 100644 --- a/src/ocpp20/messages/UnlockConnector20.cpp +++ b/src/ocpp20/messages/UnlockConnector20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a UnlockConnector20Req from a JSON representation */ -bool UnlockConnector20ReqConverter::fromJson(const rapidjson::Value& json, - UnlockConnector20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a UnlockConnectorReq from a JSON representation */ +bool UnlockConnectorReqConverter::fromJson(const rapidjson::Value& json, + UnlockConnectorReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -61,15 +61,15 @@ bool UnlockConnector20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a UnlockConnector20Req to a JSON representation */ -bool UnlockConnector20ReqConverter::toJson(const UnlockConnector20Req& data, rapidjson::Document& json) +/** @brief Convert a UnlockConnectorReq to a JSON representation */ +bool UnlockConnectorReqConverter::toJson(const UnlockConnectorReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -86,28 +86,28 @@ bool UnlockConnector20ReqConverter::toJson(const UnlockConnector20Req& data, rap return ret; } -/** @brief Convert a UnlockConnector20Conf from a JSON representation */ -bool UnlockConnector20ConfConverter::fromJson(const rapidjson::Value& json, - UnlockConnector20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a UnlockConnectorConf from a JSON representation */ +bool UnlockConnectorConfConverter::fromJson(const rapidjson::Value& json, + UnlockConnectorConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::UnlockStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::UnlockStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -119,15 +119,15 @@ bool UnlockConnector20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a UnlockConnector20Conf to a JSON representation */ -bool UnlockConnector20ConfConverter::toJson(const UnlockConnector20Conf& data, rapidjson::Document& json) +/** @brief Convert a UnlockConnectorConf to a JSON representation */ +bool UnlockConnectorConfConverter::toJson(const UnlockConnectorConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -136,12 +136,12 @@ bool UnlockConnector20ConfConverter::toJson(const UnlockConnector20Conf& data, r } // status - fill(json, "status", ocpp::types::ocpp20::UnlockStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::UnlockStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/UnlockConnector20.h b/src/ocpp20/messages/UnlockConnector20.h index b58a48d3..1effbc07 100644 --- a/src/ocpp20/messages/UnlockConnector20.h +++ b/src/ocpp20/messages/UnlockConnector20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_UNLOCKCONNECTOR20_H -#define OPENOCPP_UNLOCKCONNECTOR20_H +#ifndef OPENOCPP_OCPP20_UNLOCKCONNECTOR_H +#define OPENOCPP_OCPP20_UNLOCKCONNECTOR_H #include "IMessageConverter.h" @@ -37,36 +37,36 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the UnlockConnector20 messages */ -static const std::string UNLOCKCONNECTOR20_ACTION = "UnlockConnector"; +/** @brief Action corresponding to the UnlockConnector messages */ +static const std::string UNLOCKCONNECTOR_ACTION = "UnlockConnector"; -/** @brief UnlockConnector20Req message */ -struct UnlockConnector20Req +/** @brief UnlockConnectorReq message */ +struct UnlockConnectorReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief This contains the identifier of the EVSE for which a connector needs to be unlocked. */ int evseId; /** @brief This contains the identifier of the connector that needs to be unlocked. */ int connectorId; }; -/** @brief UnlockConnector20Conf message */ -struct UnlockConnector20Conf +/** @brief UnlockConnectorConf message */ +struct UnlockConnectorConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::UnlockStatusEnumType20 status; + ocpp::types::ocpp20::UnlockStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(UnlockConnector20) +MESSAGE_CONVERTERS(UnlockConnector) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_UNLOCKCONNECTOR20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_UNLOCKCONNECTOR_H \ No newline at end of file diff --git a/src/ocpp20/messages/UnpublishFirmware20.cpp b/src/ocpp20/messages/UnpublishFirmware20.cpp index 372bc8e6..87917cdc 100644 --- a/src/ocpp20/messages/UnpublishFirmware20.cpp +++ b/src/ocpp20/messages/UnpublishFirmware20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a UnpublishFirmware20Req from a JSON representation */ -bool UnpublishFirmware20ReqConverter::fromJson(const rapidjson::Value& json, - UnpublishFirmware20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a UnpublishFirmwareReq from a JSON representation */ +bool UnpublishFirmwareReqConverter::fromJson(const rapidjson::Value& json, + UnpublishFirmwareReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -58,15 +58,15 @@ bool UnpublishFirmware20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a UnpublishFirmware20Req to a JSON representation */ -bool UnpublishFirmware20ReqConverter::toJson(const UnpublishFirmware20Req& data, rapidjson::Document& json) +/** @brief Convert a UnpublishFirmwareReq to a JSON representation */ +bool UnpublishFirmwareReqConverter::toJson(const UnpublishFirmwareReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -80,23 +80,23 @@ bool UnpublishFirmware20ReqConverter::toJson(const UnpublishFirmware20Req& data, return ret; } -/** @brief Convert a UnpublishFirmware20Conf from a JSON representation */ -bool UnpublishFirmware20ConfConverter::fromJson(const rapidjson::Value& json, - UnpublishFirmware20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a UnpublishFirmwareConf from a JSON representation */ +bool UnpublishFirmwareConfConverter::fromJson(const rapidjson::Value& json, + UnpublishFirmwareConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::UnpublishFirmwareStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::UnpublishFirmwareStatusEnumTypeHelper.fromString(json["status"].GetString()); if (!ret) { @@ -106,15 +106,15 @@ bool UnpublishFirmware20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a UnpublishFirmware20Conf to a JSON representation */ -bool UnpublishFirmware20ConfConverter::toJson(const UnpublishFirmware20Conf& data, rapidjson::Document& json) +/** @brief Convert a UnpublishFirmwareConf to a JSON representation */ +bool UnpublishFirmwareConfConverter::toJson(const UnpublishFirmwareConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -123,7 +123,7 @@ bool UnpublishFirmware20ConfConverter::toJson(const UnpublishFirmware20Conf& dat } // status - fill(json, "status", ocpp::types::ocpp20::UnpublishFirmwareStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::UnpublishFirmwareStatusEnumTypeHelper.toString(data.status)); return ret; } diff --git a/src/ocpp20/messages/UnpublishFirmware20.h b/src/ocpp20/messages/UnpublishFirmware20.h index bafb0771..3949f6de 100644 --- a/src/ocpp20/messages/UnpublishFirmware20.h +++ b/src/ocpp20/messages/UnpublishFirmware20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_UNPUBLISHFIRMWARE20_H -#define OPENOCPP_UNPUBLISHFIRMWARE20_H +#ifndef OPENOCPP_OCPP20_UNPUBLISHFIRMWARE_H +#define OPENOCPP_OCPP20_UNPUBLISHFIRMWARE_H #include "IMessageConverter.h" @@ -36,32 +36,32 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the UnpublishFirmware20 messages */ -static const std::string UNPUBLISHFIRMWARE20_ACTION = "UnpublishFirmware"; +/** @brief Action corresponding to the UnpublishFirmware messages */ +static const std::string UNPUBLISHFIRMWARE_ACTION = "UnpublishFirmware"; -/** @brief UnpublishFirmware20Req message */ -struct UnpublishFirmware20Req +/** @brief UnpublishFirmwareReq message */ +struct UnpublishFirmwareReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief The MD5 checksum over the entire firmware file as a hexadecimal string of length 32. */ ocpp::types::CiStringType<32u> checksum; }; -/** @brief UnpublishFirmware20Conf message */ -struct UnpublishFirmware20Conf +/** @brief UnpublishFirmwareConf message */ +struct UnpublishFirmwareConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::UnpublishFirmwareStatusEnumType20 status; + ocpp::types::ocpp20::UnpublishFirmwareStatusEnumType status; }; // Message converters -MESSAGE_CONVERTERS(UnpublishFirmware20) +MESSAGE_CONVERTERS(UnpublishFirmware) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_UNPUBLISHFIRMWARE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_UNPUBLISHFIRMWARE_H \ No newline at end of file diff --git a/src/ocpp20/messages/UpdateFirmware20.cpp b/src/ocpp20/messages/UpdateFirmware20.cpp index fba3f363..ec6ee7de 100644 --- a/src/ocpp20/messages/UpdateFirmware20.cpp +++ b/src/ocpp20/messages/UpdateFirmware20.cpp @@ -32,18 +32,18 @@ namespace messages namespace ocpp20 { -/** @brief Convert a UpdateFirmware20Req from a JSON representation */ -bool UpdateFirmware20ReqConverter::fromJson(const rapidjson::Value& json, - UpdateFirmware20Req& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a UpdateFirmwareReq from a JSON representation */ +bool UpdateFirmwareReqConverter::fromJson(const rapidjson::Value& json, + UpdateFirmwareReq& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -57,7 +57,7 @@ bool UpdateFirmware20ReqConverter::fromJson(const rapidjson::Value& json, extract(json, "requestId", data.requestId); // firmware - ocpp::types::ocpp20::FirmwareType20Converter firmware_converter; + ocpp::types::ocpp20::FirmwareTypeConverter firmware_converter; ret = ret && firmware_converter.fromJson(json["firmware"], data.firmware, error_code, error_message); if (!ret) @@ -68,15 +68,15 @@ bool UpdateFirmware20ReqConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a UpdateFirmware20Req to a JSON representation */ -bool UpdateFirmware20ReqConverter::toJson(const UpdateFirmware20Req& data, rapidjson::Document& json) +/** @brief Convert a UpdateFirmwareReq to a JSON representation */ +bool UpdateFirmwareReqConverter::toJson(const UpdateFirmwareReq& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -94,7 +94,7 @@ bool UpdateFirmware20ReqConverter::toJson(const UpdateFirmware20Req& data, rapid fill(json, "requestId", data.requestId); // firmware - ocpp::types::ocpp20::FirmwareType20Converter firmware_converter; + ocpp::types::ocpp20::FirmwareTypeConverter firmware_converter; firmware_converter.setAllocator(allocator); rapidjson::Document firmware_doc; firmware_doc.Parse("{}"); @@ -104,28 +104,28 @@ bool UpdateFirmware20ReqConverter::toJson(const UpdateFirmware20Req& data, rapid return ret; } -/** @brief Convert a UpdateFirmware20Conf from a JSON representation */ -bool UpdateFirmware20ConfConverter::fromJson(const rapidjson::Value& json, - UpdateFirmware20Conf& data, - std::string& error_code, - std::string& error_message) +/** @brief Convert a UpdateFirmwareConf from a JSON representation */ +bool UpdateFirmwareConfConverter::fromJson(const rapidjson::Value& json, + UpdateFirmwareConf& data, + std::string& error_code, + std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ocpp::types::ocpp20::UpdateFirmwareStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ocpp::types::ocpp20::UpdateFirmwareStatusEnumTypeHelper.fromString(json["status"].GetString()); // statusInfo if (json.HasMember("statusInfo")) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -137,15 +137,15 @@ bool UpdateFirmware20ConfConverter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a UpdateFirmware20Conf to a JSON representation */ -bool UpdateFirmware20ConfConverter::toJson(const UpdateFirmware20Conf& data, rapidjson::Document& json) +/** @brief Convert a UpdateFirmwareConf to a JSON representation */ +bool UpdateFirmwareConfConverter::toJson(const UpdateFirmwareConf& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - ocpp::types::ocpp20::CustomDataType20Converter customData_converter; + ocpp::types::ocpp20::CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -154,12 +154,12 @@ bool UpdateFirmware20ConfConverter::toJson(const UpdateFirmware20Conf& data, rap } // status - fill(json, "status", ocpp::types::ocpp20::UpdateFirmwareStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ocpp::types::ocpp20::UpdateFirmwareStatusEnumTypeHelper.toString(data.status)); // statusInfo if (data.statusInfo.isSet()) { - ocpp::types::ocpp20::StatusInfoType20Converter statusInfo_converter; + ocpp::types::ocpp20::StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/messages/UpdateFirmware20.h b/src/ocpp20/messages/UpdateFirmware20.h index f561eeec..3a1c5f3c 100644 --- a/src/ocpp20/messages/UpdateFirmware20.h +++ b/src/ocpp20/messages/UpdateFirmware20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_UPDATEFIRMWARE20_H -#define OPENOCPP_UPDATEFIRMWARE20_H +#ifndef OPENOCPP_OCPP20_UPDATEFIRMWARE_H +#define OPENOCPP_OCPP20_UPDATEFIRMWARE_H #include "IMessageConverter.h" @@ -38,14 +38,14 @@ namespace messages namespace ocpp20 { -/** @brief Action corresponding to the UpdateFirmware20 messages */ -static const std::string UPDATEFIRMWARE20_ACTION = "UpdateFirmware"; +/** @brief Action corresponding to the UpdateFirmware messages */ +static const std::string UPDATEFIRMWARE_ACTION = "UpdateFirmware"; -/** @brief UpdateFirmware20Req message */ -struct UpdateFirmware20Req +/** @brief UpdateFirmwareReq message */ +struct UpdateFirmwareReq { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief This specifies how many times Charging Station must try to download the firmware before giving up. If this field is not present, it is left to Charging Station to decide how many times it wants to retry. */ ocpp::types::Optional retries; /** @brief The interval in seconds after which a retry may be attempted. If this field is not present, it is left to Charging Station to decide how long to wait between attempts. */ @@ -53,25 +53,25 @@ struct UpdateFirmware20Req /** @brief The Id of this request */ int requestId; /** @brief */ - ocpp::types::ocpp20::FirmwareType20 firmware; + ocpp::types::ocpp20::FirmwareType firmware; }; -/** @brief UpdateFirmware20Conf message */ -struct UpdateFirmware20Conf +/** @brief UpdateFirmwareConf message */ +struct UpdateFirmwareConf { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::ocpp20::UpdateFirmwareStatusEnumType20 status; + ocpp::types::ocpp20::UpdateFirmwareStatusEnumType status; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; // Message converters -MESSAGE_CONVERTERS(UpdateFirmware20) +MESSAGE_CONVERTERS(UpdateFirmware) } // namespace ocpp20 } // namespace messages } // namespace ocpp -#endif // OPENOCPP_UPDATEFIRMWARE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_UPDATEFIRMWARE_H \ No newline at end of file diff --git a/src/ocpp20/types/ACChargingParametersType20.cpp b/src/ocpp20/types/ACChargingParametersType20.cpp index bb61a8ea..6311c7c2 100644 --- a/src/ocpp20/types/ACChargingParametersType20.cpp +++ b/src/ocpp20/types/ACChargingParametersType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a ACChargingParametersType20 from a JSON representation */ -bool ACChargingParametersType20Converter::fromJson(const rapidjson::Value& json, - ACChargingParametersType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ACChargingParametersType from a JSON representation */ +bool ACChargingParametersTypeConverter::fromJson(const rapidjson::Value& json, + ACChargingParametersType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -67,15 +67,15 @@ bool ACChargingParametersType20Converter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a ACChargingParametersType20 to a JSON representation */ -bool ACChargingParametersType20Converter::toJson(const ACChargingParametersType20& data, rapidjson::Document& json) +/** @brief Convert a ACChargingParametersType to a JSON representation */ +bool ACChargingParametersTypeConverter::toJson(const ACChargingParametersType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/ACChargingParametersType20.h b/src/ocpp20/types/ACChargingParametersType20.h index e1dda051..143fec00 100644 --- a/src/ocpp20/types/ACChargingParametersType20.h +++ b/src/ocpp20/types/ACChargingParametersType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_ACCHARGINGPARAMETERSTYPE20_H -#define OPENOCPP_ACCHARGINGPARAMETERSTYPE20_H +#ifndef OPENOCPP_OCPP20_ACCHARGINGPARAMETERSTYPE_H +#define OPENOCPP_OCPP20_ACCHARGINGPARAMETERSTYPE_H #include "CustomDataType20.h" @@ -41,10 +41,10 @@ urn:x-oca:ocpp:uid:2:233250 EV AC charging parameters. */ -struct ACChargingParametersType20 +struct ACChargingParametersType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief AC_ Charging_ Parameters. Energy_ Amount. Energy_ Amount urn:x-oca:ocpp:uid:1:569211 Amount of energy requested (in Wh). This includes energy required for preconditioning. */ @@ -63,28 +63,25 @@ Maximum voltage supported by the electric vehicle */ int evMaxVoltage; }; -/** @brief Converter class for ACChargingParametersType20 type */ -class ACChargingParametersType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ACChargingParametersType type */ +class ACChargingParametersTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override - { - return new ACChargingParametersType20Converter(); - } + ocpp::messages::IMessageConverter* clone() const override { return new ACChargingParametersTypeConverter(); } - /** @brief Convert a ACChargingParametersType20 from a JSON representation */ + /** @brief Convert a ACChargingParametersType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ACChargingParametersType20& data, + ACChargingParametersType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ACChargingParametersType20 to a JSON representation */ - bool toJson(const ACChargingParametersType20& data, rapidjson::Document& json) override; + /** @brief Convert a ACChargingParametersType to a JSON representation */ + bool toJson(const ACChargingParametersType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_ACCHARGINGPARAMETERSTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_ACCHARGINGPARAMETERSTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/APNAuthenticationEnumType20.cpp b/src/ocpp20/types/APNAuthenticationEnumType20.cpp index ea9b9090..b511e393 100644 --- a/src/ocpp20/types/APNAuthenticationEnumType20.cpp +++ b/src/ocpp20/types/APNAuthenticationEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a APNAuthenticationEnumType20 enum to string */ -const EnumToStringFromString APNAuthenticationEnumType20Helper = { - {APNAuthenticationEnumType20::CHAP, "CHAP"}, - {APNAuthenticationEnumType20::NONE, "NONE"}, - {APNAuthenticationEnumType20::PAP, "PAP"}, - {APNAuthenticationEnumType20::AUTO, "AUTO"}, +/** @brief Helper to convert a APNAuthenticationEnumType enum to string */ +const EnumToStringFromString APNAuthenticationEnumTypeHelper = { + {APNAuthenticationEnumType::CHAP, "CHAP"}, + {APNAuthenticationEnumType::NONE, "NONE"}, + {APNAuthenticationEnumType::PAP, "PAP"}, + {APNAuthenticationEnumType::AUTO, "AUTO"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/APNAuthenticationEnumType20.h b/src/ocpp20/types/APNAuthenticationEnumType20.h index d039e205..6a3259e5 100644 --- a/src/ocpp20/types/APNAuthenticationEnumType20.h +++ b/src/ocpp20/types/APNAuthenticationEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_APNAUTHENTICATIONENUMTYPE20_H -#define OPENOCPP_APNAUTHENTICATIONENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_APNAUTHENTICATIONENUMTYPE_H +#define OPENOCPP_OCPP20_APNAUTHENTICATIONENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief APN. APN_ Authentication. APN_ Authentication_ Code urn:x-oca:ocpp:uid:1:568828 Authentication method. */ -enum class APNAuthenticationEnumType20 +enum class APNAuthenticationEnumType { CHAP, NONE, @@ -44,11 +44,11 @@ enum class APNAuthenticationEnumType20 AUTO, }; -/** @brief Helper to convert a APNAuthenticationEnumType20 enum to string */ -extern const EnumToStringFromString APNAuthenticationEnumType20Helper; +/** @brief Helper to convert a APNAuthenticationEnumType enum to string */ +extern const EnumToStringFromString APNAuthenticationEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_APNAUTHENTICATIONENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_APNAUTHENTICATIONENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/APNType20.cpp b/src/ocpp20/types/APNType20.cpp index 631c6535..dbfb5805 100644 --- a/src/ocpp20/types/APNType20.cpp +++ b/src/ocpp20/types/APNType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a APNType20 from a JSON representation */ -bool APNType20Converter::fromJson(const rapidjson::Value& json, - APNType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a APNType from a JSON representation */ +bool APNTypeConverter::fromJson(const rapidjson::Value& json, + APNType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -66,7 +66,7 @@ bool APNType20Converter::fromJson(const rapidjson::Value& json, extract(json, "useOnlyPreferredNetwork", data.useOnlyPreferredNetwork); // apnAuthentication - data.apnAuthentication = APNAuthenticationEnumType20Helper.fromString(json["apnAuthentication"].GetString()); + data.apnAuthentication = APNAuthenticationEnumTypeHelper.fromString(json["apnAuthentication"].GetString()); if (!ret) { @@ -76,15 +76,15 @@ bool APNType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a APNType20 to a JSON representation */ -bool APNType20Converter::toJson(const APNType20& data, rapidjson::Document& json) +/** @brief Convert a APNType to a JSON representation */ +bool APNTypeConverter::toJson(const APNType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -111,7 +111,7 @@ bool APNType20Converter::toJson(const APNType20& data, rapidjson::Document& json fill(json, "useOnlyPreferredNetwork", data.useOnlyPreferredNetwork); // apnAuthentication - fill(json, "apnAuthentication", APNAuthenticationEnumType20Helper.toString(data.apnAuthentication)); + fill(json, "apnAuthentication", APNAuthenticationEnumTypeHelper.toString(data.apnAuthentication)); return ret; } diff --git a/src/ocpp20/types/APNType20.h b/src/ocpp20/types/APNType20.h index 80aa6821..22d60e1d 100644 --- a/src/ocpp20/types/APNType20.h +++ b/src/ocpp20/types/APNType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_APNTYPE20_H -#define OPENOCPP_APNTYPE20_H +#ifndef OPENOCPP_OCPP20_APNTYPE_H +#define OPENOCPP_OCPP20_APNTYPE_H #include "APNAuthenticationEnumType20.h" #include "CustomDataType20.h" @@ -44,10 +44,10 @@ Collection of configuration data needed to make a data-connection over a cellula NOTE: When asking a GSM modem to dial in, it is possible to specify which mobile operator should be used. This can be done with the mobile country code (MCC) in combination with a mobile network code (MNC). Example: If your preferred network is Vodafone Netherlands, the MCC=204 and the MNC=04 which means the key PreferredNetwork = 20404 Some modems allows to specify a preferred network, which means, if this network is not available, a different network is used. If you specify UseOnlyPreferredNetwork and this network is not available, the modem will not dial in. */ -struct APNType20 +struct APNType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief APN. APN. URI urn:x-oca:ocpp:uid:1:568814 The Access Point Name as an URL. */ @@ -74,28 +74,28 @@ Default: false. Use only the preferred Network, do not dial in when not available. See Note. */ ocpp::types::Optional useOnlyPreferredNetwork; /** @brief */ - APNAuthenticationEnumType20 apnAuthentication; + APNAuthenticationEnumType apnAuthentication; }; -/** @brief Converter class for APNType20 type */ -class APNType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for APNType type */ +class APNTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new APNType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new APNTypeConverter(); } - /** @brief Convert a APNType20 from a JSON representation */ + /** @brief Convert a APNType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - APNType20& data, + APNType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a APNType20 to a JSON representation */ - bool toJson(const APNType20& data, rapidjson::Document& json) override; + /** @brief Convert a APNType to a JSON representation */ + bool toJson(const APNType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_APNTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_APNTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/AdditionalInfoType20.cpp b/src/ocpp20/types/AdditionalInfoType20.cpp index 205feec0..e69b7ddf 100644 --- a/src/ocpp20/types/AdditionalInfoType20.cpp +++ b/src/ocpp20/types/AdditionalInfoType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a AdditionalInfoType20 from a JSON representation */ -bool AdditionalInfoType20Converter::fromJson(const rapidjson::Value& json, - AdditionalInfoType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a AdditionalInfoType from a JSON representation */ +bool AdditionalInfoTypeConverter::fromJson(const rapidjson::Value& json, + AdditionalInfoType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -61,15 +61,15 @@ bool AdditionalInfoType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a AdditionalInfoType20 to a JSON representation */ -bool AdditionalInfoType20Converter::toJson(const AdditionalInfoType20& data, rapidjson::Document& json) +/** @brief Convert a AdditionalInfoType to a JSON representation */ +bool AdditionalInfoTypeConverter::toJson(const AdditionalInfoType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/AdditionalInfoType20.h b/src/ocpp20/types/AdditionalInfoType20.h index ca1fa5a3..4ed20dc5 100644 --- a/src/ocpp20/types/AdditionalInfoType20.h +++ b/src/ocpp20/types/AdditionalInfoType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_ADDITIONALINFOTYPE20_H -#define OPENOCPP_ADDITIONALINFOTYPE20_H +#ifndef OPENOCPP_OCPP20_ADDITIONALINFOTYPE_H +#define OPENOCPP_OCPP20_ADDITIONALINFOTYPE_H #include "CustomDataType20.h" @@ -39,35 +39,35 @@ namespace ocpp20 /** @brief Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. */ -struct AdditionalInfoType20 +struct AdditionalInfoType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief This field specifies the additional IdToken. */ ocpp::types::CiStringType<36u> additionalIdToken; /** @brief This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties. */ ocpp::types::CiStringType<50u> type; }; -/** @brief Converter class for AdditionalInfoType20 type */ -class AdditionalInfoType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for AdditionalInfoType type */ +class AdditionalInfoTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new AdditionalInfoType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new AdditionalInfoTypeConverter(); } - /** @brief Convert a AdditionalInfoType20 from a JSON representation */ + /** @brief Convert a AdditionalInfoType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - AdditionalInfoType20& data, + AdditionalInfoType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a AdditionalInfoType20 to a JSON representation */ - bool toJson(const AdditionalInfoType20& data, rapidjson::Document& json) override; + /** @brief Convert a AdditionalInfoType to a JSON representation */ + bool toJson(const AdditionalInfoType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_ADDITIONALINFOTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_ADDITIONALINFOTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/AttributeEnumType20.cpp b/src/ocpp20/types/AttributeEnumType20.cpp index 8e7a0849..4af53a48 100644 --- a/src/ocpp20/types/AttributeEnumType20.cpp +++ b/src/ocpp20/types/AttributeEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a AttributeEnumType20 enum to string */ -const EnumToStringFromString AttributeEnumType20Helper = { - {AttributeEnumType20::Actual, "Actual"}, - {AttributeEnumType20::Target, "Target"}, - {AttributeEnumType20::MinSet, "MinSet"}, - {AttributeEnumType20::MaxSet, "MaxSet"}, +/** @brief Helper to convert a AttributeEnumType enum to string */ +const EnumToStringFromString AttributeEnumTypeHelper = { + {AttributeEnumType::Actual, "Actual"}, + {AttributeEnumType::Target, "Target"}, + {AttributeEnumType::MinSet, "MinSet"}, + {AttributeEnumType::MaxSet, "MaxSet"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/AttributeEnumType20.h b/src/ocpp20/types/AttributeEnumType20.h index 3c1f4ce3..6f3dd447 100644 --- a/src/ocpp20/types/AttributeEnumType20.h +++ b/src/ocpp20/types/AttributeEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_ATTRIBUTEENUMTYPE20_H -#define OPENOCPP_ATTRIBUTEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_ATTRIBUTEENUMTYPE_H +#define OPENOCPP_OCPP20_ATTRIBUTEENUMTYPE_H #include "EnumToStringFromString.h" @@ -35,7 +35,7 @@ namespace ocpp20 /** @brief Attribute: Actual, MinSet, MaxSet, etc. Defaults to Actual if absent. */ -enum class AttributeEnumType20 +enum class AttributeEnumType { Actual, Target, @@ -43,11 +43,11 @@ enum class AttributeEnumType20 MaxSet, }; -/** @brief Helper to convert a AttributeEnumType20 enum to string */ -extern const EnumToStringFromString AttributeEnumType20Helper; +/** @brief Helper to convert a AttributeEnumType enum to string */ +extern const EnumToStringFromString AttributeEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_ATTRIBUTEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_ATTRIBUTEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/AuthorizationData20.cpp b/src/ocpp20/types/AuthorizationData20.cpp index 8e23891c..085f2815 100644 --- a/src/ocpp20/types/AuthorizationData20.cpp +++ b/src/ocpp20/types/AuthorizationData20.cpp @@ -32,29 +32,29 @@ namespace types namespace ocpp20 { -/** @brief Convert a AuthorizationData20 from a JSON representation */ -bool AuthorizationData20Converter::fromJson(const rapidjson::Value& json, - AuthorizationData20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a AuthorizationData from a JSON representation */ +bool AuthorizationDataConverter::fromJson(const rapidjson::Value& json, + AuthorizationData& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // idToken - IdTokenType20Converter idToken_converter; + IdTokenTypeConverter idToken_converter; ret = ret && idToken_converter.fromJson(json["idToken"], data.idToken, error_code, error_message); // idTokenInfo if (json.HasMember("idTokenInfo")) { - IdTokenInfoType20Converter idTokenInfo_converter; + IdTokenInfoTypeConverter idTokenInfo_converter; ret = ret && idTokenInfo_converter.fromJson(json["idTokenInfo"], data.idTokenInfo, error_code, error_message); } @@ -66,15 +66,15 @@ bool AuthorizationData20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a AuthorizationData20 to a JSON representation */ -bool AuthorizationData20Converter::toJson(const AuthorizationData20& data, rapidjson::Document& json) +/** @brief Convert a AuthorizationData to a JSON representation */ +bool AuthorizationDataConverter::toJson(const AuthorizationData& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -83,7 +83,7 @@ bool AuthorizationData20Converter::toJson(const AuthorizationData20& data, rapid } // idToken - IdTokenType20Converter idToken_converter; + IdTokenTypeConverter idToken_converter; idToken_converter.setAllocator(allocator); rapidjson::Document idToken_doc; idToken_doc.Parse("{}"); @@ -93,7 +93,7 @@ bool AuthorizationData20Converter::toJson(const AuthorizationData20& data, rapid // idTokenInfo if (data.idTokenInfo.isSet()) { - IdTokenInfoType20Converter idTokenInfo_converter; + IdTokenInfoTypeConverter idTokenInfo_converter; idTokenInfo_converter.setAllocator(allocator); rapidjson::Document idTokenInfo_doc; idTokenInfo_doc.Parse("{}"); diff --git a/src/ocpp20/types/AuthorizationData20.h b/src/ocpp20/types/AuthorizationData20.h index c1f8fd9b..f742f3a3 100644 --- a/src/ocpp20/types/AuthorizationData20.h +++ b/src/ocpp20/types/AuthorizationData20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_AUTHORIZATIONDATA20_H -#define OPENOCPP_AUTHORIZATIONDATA20_H +#ifndef OPENOCPP_OCPP20_AUTHORIZATIONDATA_H +#define OPENOCPP_OCPP20_AUTHORIZATIONDATA_H #include "CustomDataType20.h" #include "IdTokenInfoType20.h" @@ -40,35 +40,35 @@ namespace ocpp20 /** @brief Contains the identifier to use for authorization. */ -struct AuthorizationData20 +struct AuthorizationData { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - IdTokenType20 idToken; + IdTokenType idToken; /** @brief */ - ocpp::types::Optional idTokenInfo; + ocpp::types::Optional idTokenInfo; }; -/** @brief Converter class for AuthorizationData20 type */ -class AuthorizationData20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for AuthorizationData type */ +class AuthorizationDataConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new AuthorizationData20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new AuthorizationDataConverter(); } - /** @brief Convert a AuthorizationData20 from a JSON representation */ + /** @brief Convert a AuthorizationData from a JSON representation */ bool fromJson(const rapidjson::Value& json, - AuthorizationData20& data, + AuthorizationData& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a AuthorizationData20 to a JSON representation */ - bool toJson(const AuthorizationData20& data, rapidjson::Document& json) override; + /** @brief Convert a AuthorizationData to a JSON representation */ + bool toJson(const AuthorizationData& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_AUTHORIZATIONDATA20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_AUTHORIZATIONDATA_H \ No newline at end of file diff --git a/src/ocpp20/types/AuthorizationStatusEnumType20.cpp b/src/ocpp20/types/AuthorizationStatusEnumType20.cpp index dcb5466a..be8c1198 100644 --- a/src/ocpp20/types/AuthorizationStatusEnumType20.cpp +++ b/src/ocpp20/types/AuthorizationStatusEnumType20.cpp @@ -30,18 +30,18 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a AuthorizationStatusEnumType20 enum to string */ -const EnumToStringFromString AuthorizationStatusEnumType20Helper = { - {AuthorizationStatusEnumType20::Accepted, "Accepted"}, - {AuthorizationStatusEnumType20::Blocked, "Blocked"}, - {AuthorizationStatusEnumType20::ConcurrentTx, "ConcurrentTx"}, - {AuthorizationStatusEnumType20::Expired, "Expired"}, - {AuthorizationStatusEnumType20::Invalid, "Invalid"}, - {AuthorizationStatusEnumType20::NoCredit, "NoCredit"}, - {AuthorizationStatusEnumType20::NotAllowedTypeEVSE, "NotAllowedTypeEVSE"}, - {AuthorizationStatusEnumType20::NotAtThisLocation, "NotAtThisLocation"}, - {AuthorizationStatusEnumType20::NotAtThisTime, "NotAtThisTime"}, - {AuthorizationStatusEnumType20::Unknown, "Unknown"}, +/** @brief Helper to convert a AuthorizationStatusEnumType enum to string */ +const EnumToStringFromString AuthorizationStatusEnumTypeHelper = { + {AuthorizationStatusEnumType::Accepted, "Accepted"}, + {AuthorizationStatusEnumType::Blocked, "Blocked"}, + {AuthorizationStatusEnumType::ConcurrentTx, "ConcurrentTx"}, + {AuthorizationStatusEnumType::Expired, "Expired"}, + {AuthorizationStatusEnumType::Invalid, "Invalid"}, + {AuthorizationStatusEnumType::NoCredit, "NoCredit"}, + {AuthorizationStatusEnumType::NotAllowedTypeEVSE, "NotAllowedTypeEVSE"}, + {AuthorizationStatusEnumType::NotAtThisLocation, "NotAtThisLocation"}, + {AuthorizationStatusEnumType::NotAtThisTime, "NotAtThisTime"}, + {AuthorizationStatusEnumType::Unknown, "Unknown"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/AuthorizationStatusEnumType20.h b/src/ocpp20/types/AuthorizationStatusEnumType20.h index 1540799f..3ffbd49c 100644 --- a/src/ocpp20/types/AuthorizationStatusEnumType20.h +++ b/src/ocpp20/types/AuthorizationStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_AUTHORIZATIONSTATUSENUMTYPE20_H -#define OPENOCPP_AUTHORIZATIONSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_AUTHORIZATIONSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_AUTHORIZATIONSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief ID_ Token. Status. Authorization_ Status urn:x-oca:ocpp:uid:1:569372 Current status of the ID Token. */ -enum class AuthorizationStatusEnumType20 +enum class AuthorizationStatusEnumType { Accepted, Blocked, @@ -50,11 +50,11 @@ enum class AuthorizationStatusEnumType20 Unknown, }; -/** @brief Helper to convert a AuthorizationStatusEnumType20 enum to string */ -extern const EnumToStringFromString AuthorizationStatusEnumType20Helper; +/** @brief Helper to convert a AuthorizationStatusEnumType enum to string */ +extern const EnumToStringFromString AuthorizationStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_AUTHORIZATIONSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_AUTHORIZATIONSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/AuthorizeCertificateStatusEnumType20.cpp b/src/ocpp20/types/AuthorizeCertificateStatusEnumType20.cpp index a35c8338..d229b712 100644 --- a/src/ocpp20/types/AuthorizeCertificateStatusEnumType20.cpp +++ b/src/ocpp20/types/AuthorizeCertificateStatusEnumType20.cpp @@ -30,15 +30,15 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a AuthorizeCertificateStatusEnumType20 enum to string */ -const EnumToStringFromString AuthorizeCertificateStatusEnumType20Helper = { - {AuthorizeCertificateStatusEnumType20::Accepted, "Accepted"}, - {AuthorizeCertificateStatusEnumType20::SignatureError, "SignatureError"}, - {AuthorizeCertificateStatusEnumType20::CertificateExpired, "CertificateExpired"}, - {AuthorizeCertificateStatusEnumType20::CertificateRevoked, "CertificateRevoked"}, - {AuthorizeCertificateStatusEnumType20::NoCertificateAvailable, "NoCertificateAvailable"}, - {AuthorizeCertificateStatusEnumType20::CertChainError, "CertChainError"}, - {AuthorizeCertificateStatusEnumType20::ContractCancelled, "ContractCancelled"}, +/** @brief Helper to convert a AuthorizeCertificateStatusEnumType enum to string */ +const EnumToStringFromString AuthorizeCertificateStatusEnumTypeHelper = { + {AuthorizeCertificateStatusEnumType::Accepted, "Accepted"}, + {AuthorizeCertificateStatusEnumType::SignatureError, "SignatureError"}, + {AuthorizeCertificateStatusEnumType::CertificateExpired, "CertificateExpired"}, + {AuthorizeCertificateStatusEnumType::CertificateRevoked, "CertificateRevoked"}, + {AuthorizeCertificateStatusEnumType::NoCertificateAvailable, "NoCertificateAvailable"}, + {AuthorizeCertificateStatusEnumType::CertChainError, "CertChainError"}, + {AuthorizeCertificateStatusEnumType::ContractCancelled, "ContractCancelled"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/AuthorizeCertificateStatusEnumType20.h b/src/ocpp20/types/AuthorizeCertificateStatusEnumType20.h index 8828db60..0360f845 100644 --- a/src/ocpp20/types/AuthorizeCertificateStatusEnumType20.h +++ b/src/ocpp20/types/AuthorizeCertificateStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_AUTHORIZECERTIFICATESTATUSENUMTYPE20_H -#define OPENOCPP_AUTHORIZECERTIFICATESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_AUTHORIZECERTIFICATESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_AUTHORIZECERTIFICATESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief Certificate status information. - if all certificates are valid: return 'Accepted'. - if one of the certificates was revoked, return 'CertificateRevoked'. */ -enum class AuthorizeCertificateStatusEnumType20 +enum class AuthorizeCertificateStatusEnumType { Accepted, SignatureError, @@ -47,11 +47,11 @@ enum class AuthorizeCertificateStatusEnumType20 ContractCancelled, }; -/** @brief Helper to convert a AuthorizeCertificateStatusEnumType20 enum to string */ -extern const EnumToStringFromString AuthorizeCertificateStatusEnumType20Helper; +/** @brief Helper to convert a AuthorizeCertificateStatusEnumType enum to string */ +extern const EnumToStringFromString AuthorizeCertificateStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_AUTHORIZECERTIFICATESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_AUTHORIZECERTIFICATESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/BootReasonEnumType20.cpp b/src/ocpp20/types/BootReasonEnumType20.cpp index 994e2c83..2a499eaf 100644 --- a/src/ocpp20/types/BootReasonEnumType20.cpp +++ b/src/ocpp20/types/BootReasonEnumType20.cpp @@ -30,17 +30,17 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a BootReasonEnumType20 enum to string */ -const EnumToStringFromString BootReasonEnumType20Helper = { - {BootReasonEnumType20::ApplicationReset, "ApplicationReset"}, - {BootReasonEnumType20::FirmwareUpdate, "FirmwareUpdate"}, - {BootReasonEnumType20::LocalReset, "LocalReset"}, - {BootReasonEnumType20::PowerUp, "PowerUp"}, - {BootReasonEnumType20::RemoteReset, "RemoteReset"}, - {BootReasonEnumType20::ScheduledReset, "ScheduledReset"}, - {BootReasonEnumType20::Triggered, "Triggered"}, - {BootReasonEnumType20::Unknown, "Unknown"}, - {BootReasonEnumType20::Watchdog, "Watchdog"}, +/** @brief Helper to convert a BootReasonEnumType enum to string */ +const EnumToStringFromString BootReasonEnumTypeHelper = { + {BootReasonEnumType::ApplicationReset, "ApplicationReset"}, + {BootReasonEnumType::FirmwareUpdate, "FirmwareUpdate"}, + {BootReasonEnumType::LocalReset, "LocalReset"}, + {BootReasonEnumType::PowerUp, "PowerUp"}, + {BootReasonEnumType::RemoteReset, "RemoteReset"}, + {BootReasonEnumType::ScheduledReset, "ScheduledReset"}, + {BootReasonEnumType::Triggered, "Triggered"}, + {BootReasonEnumType::Unknown, "Unknown"}, + {BootReasonEnumType::Watchdog, "Watchdog"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/BootReasonEnumType20.h b/src/ocpp20/types/BootReasonEnumType20.h index 545c3a8f..f06ea861 100644 --- a/src/ocpp20/types/BootReasonEnumType20.h +++ b/src/ocpp20/types/BootReasonEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_BOOTREASONENUMTYPE20_H -#define OPENOCPP_BOOTREASONENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_BOOTREASONENUMTYPE_H +#define OPENOCPP_OCPP20_BOOTREASONENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief This contains the reason for sending this message to the CSMS. */ -enum class BootReasonEnumType20 +enum class BootReasonEnumType { ApplicationReset, FirmwareUpdate, @@ -47,11 +47,11 @@ enum class BootReasonEnumType20 Watchdog, }; -/** @brief Helper to convert a BootReasonEnumType20 enum to string */ -extern const EnumToStringFromString BootReasonEnumType20Helper; +/** @brief Helper to convert a BootReasonEnumType enum to string */ +extern const EnumToStringFromString BootReasonEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_BOOTREASONENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_BOOTREASONENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/CancelReservationStatusEnumType20.cpp b/src/ocpp20/types/CancelReservationStatusEnumType20.cpp index 4134f6d0..98091c8a 100644 --- a/src/ocpp20/types/CancelReservationStatusEnumType20.cpp +++ b/src/ocpp20/types/CancelReservationStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a CancelReservationStatusEnumType20 enum to string */ -const EnumToStringFromString CancelReservationStatusEnumType20Helper = { - {CancelReservationStatusEnumType20::Accepted, "Accepted"}, - {CancelReservationStatusEnumType20::Rejected, "Rejected"}, +/** @brief Helper to convert a CancelReservationStatusEnumType enum to string */ +const EnumToStringFromString CancelReservationStatusEnumTypeHelper = { + {CancelReservationStatusEnumType::Accepted, "Accepted"}, + {CancelReservationStatusEnumType::Rejected, "Rejected"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/CancelReservationStatusEnumType20.h b/src/ocpp20/types/CancelReservationStatusEnumType20.h index 5b95a0b9..17873344 100644 --- a/src/ocpp20/types/CancelReservationStatusEnumType20.h +++ b/src/ocpp20/types/CancelReservationStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CANCELRESERVATIONSTATUSENUMTYPE20_H -#define OPENOCPP_CANCELRESERVATIONSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CANCELRESERVATIONSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_CANCELRESERVATIONSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief This indicates the success or failure of the canceling of a reservation by CSMS. */ -enum class CancelReservationStatusEnumType20 +enum class CancelReservationStatusEnumType { Accepted, Rejected, }; -/** @brief Helper to convert a CancelReservationStatusEnumType20 enum to string */ -extern const EnumToStringFromString CancelReservationStatusEnumType20Helper; +/** @brief Helper to convert a CancelReservationStatusEnumType enum to string */ +extern const EnumToStringFromString CancelReservationStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CANCELRESERVATIONSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CANCELRESERVATIONSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/CertificateActionEnumType20.cpp b/src/ocpp20/types/CertificateActionEnumType20.cpp index 037e546e..da15c632 100644 --- a/src/ocpp20/types/CertificateActionEnumType20.cpp +++ b/src/ocpp20/types/CertificateActionEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a CertificateActionEnumType20 enum to string */ -const EnumToStringFromString CertificateActionEnumType20Helper = { - {CertificateActionEnumType20::Install, "Install"}, - {CertificateActionEnumType20::Update, "Update"}, +/** @brief Helper to convert a CertificateActionEnumType enum to string */ +const EnumToStringFromString CertificateActionEnumTypeHelper = { + {CertificateActionEnumType::Install, "Install"}, + {CertificateActionEnumType::Update, "Update"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/CertificateActionEnumType20.h b/src/ocpp20/types/CertificateActionEnumType20.h index 42574ad5..47d6ae44 100644 --- a/src/ocpp20/types/CertificateActionEnumType20.h +++ b/src/ocpp20/types/CertificateActionEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CERTIFICATEACTIONENUMTYPE20_H -#define OPENOCPP_CERTIFICATEACTIONENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CERTIFICATEACTIONENUMTYPE_H +#define OPENOCPP_OCPP20_CERTIFICATEACTIONENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief Defines whether certificate needs to be installed or updated. */ -enum class CertificateActionEnumType20 +enum class CertificateActionEnumType { Install, Update, }; -/** @brief Helper to convert a CertificateActionEnumType20 enum to string */ -extern const EnumToStringFromString CertificateActionEnumType20Helper; +/** @brief Helper to convert a CertificateActionEnumType enum to string */ +extern const EnumToStringFromString CertificateActionEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CERTIFICATEACTIONENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CERTIFICATEACTIONENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/CertificateHashDataChainType20.cpp b/src/ocpp20/types/CertificateHashDataChainType20.cpp index c11efa71..a5e5e454 100644 --- a/src/ocpp20/types/CertificateHashDataChainType20.cpp +++ b/src/ocpp20/types/CertificateHashDataChainType20.cpp @@ -32,37 +32,37 @@ namespace types namespace ocpp20 { -/** @brief Convert a CertificateHashDataChainType20 from a JSON representation */ -bool CertificateHashDataChainType20Converter::fromJson(const rapidjson::Value& json, - CertificateHashDataChainType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a CertificateHashDataChainType from a JSON representation */ +bool CertificateHashDataChainTypeConverter::fromJson(const rapidjson::Value& json, + CertificateHashDataChainType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // certificateHashData - CertificateHashDataType20Converter certificateHashData_converter; + CertificateHashDataTypeConverter certificateHashData_converter; ret = ret && certificateHashData_converter.fromJson(json["certificateHashData"], data.certificateHashData, error_code, error_message); // certificateType - data.certificateType = GetCertificateIdUseEnumType20Helper.fromString(json["certificateType"].GetString()); + data.certificateType = GetCertificateIdUseEnumTypeHelper.fromString(json["certificateType"].GetString()); // childCertificateHashData if (json.HasMember("childCertificateHashData")) { - const rapidjson::Value& childCertificateHashData_json = json["childCertificateHashData"]; - CertificateHashDataType20Converter childCertificateHashData_converter; + const rapidjson::Value& childCertificateHashData_json = json["childCertificateHashData"]; + CertificateHashDataTypeConverter childCertificateHashData_converter; for (auto it = childCertificateHashData_json.Begin(); ret && (it != childCertificateHashData_json.End()); ++it) { - CertificateHashDataType20& item = data.childCertificateHashData.emplace_back(); - ret = ret && childCertificateHashData_converter.fromJson(*it, item, error_code, error_message); + CertificateHashDataType& item = data.childCertificateHashData.emplace_back(); + ret = ret && childCertificateHashData_converter.fromJson(*it, item, error_code, error_message); } } @@ -74,15 +74,15 @@ bool CertificateHashDataChainType20Converter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a CertificateHashDataChainType20 to a JSON representation */ -bool CertificateHashDataChainType20Converter::toJson(const CertificateHashDataChainType20& data, rapidjson::Document& json) +/** @brief Convert a CertificateHashDataChainType to a JSON representation */ +bool CertificateHashDataChainTypeConverter::toJson(const CertificateHashDataChainType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -91,7 +91,7 @@ bool CertificateHashDataChainType20Converter::toJson(const CertificateHashDataCh } // certificateHashData - CertificateHashDataType20Converter certificateHashData_converter; + CertificateHashDataTypeConverter certificateHashData_converter; certificateHashData_converter.setAllocator(allocator); rapidjson::Document certificateHashData_doc; certificateHashData_doc.Parse("{}"); @@ -99,16 +99,16 @@ bool CertificateHashDataChainType20Converter::toJson(const CertificateHashDataCh json.AddMember(rapidjson::StringRef("certificateHashData"), certificateHashData_doc.Move(), *allocator); // certificateType - fill(json, "certificateType", GetCertificateIdUseEnumType20Helper.toString(data.certificateType)); + fill(json, "certificateType", GetCertificateIdUseEnumTypeHelper.toString(data.certificateType)); // childCertificateHashData if (!data.childCertificateHashData.empty()) { - rapidjson::Value childCertificateHashData_json(rapidjson::kArrayType); - CertificateHashDataType20Converter childCertificateHashData_converter; + rapidjson::Value childCertificateHashData_json(rapidjson::kArrayType); + CertificateHashDataTypeConverter childCertificateHashData_converter; childCertificateHashData_converter.setAllocator(allocator); - for (const CertificateHashDataType20& item : data.childCertificateHashData) + for (const CertificateHashDataType& item : data.childCertificateHashData) { rapidjson::Document item_doc; item_doc.Parse("{}"); diff --git a/src/ocpp20/types/CertificateHashDataChainType20.h b/src/ocpp20/types/CertificateHashDataChainType20.h index d45e1d8b..bda3261c 100644 --- a/src/ocpp20/types/CertificateHashDataChainType20.h +++ b/src/ocpp20/types/CertificateHashDataChainType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CERTIFICATEHASHDATACHAINTYPE20_H -#define OPENOCPP_CERTIFICATEHASHDATACHAINTYPE20_H +#ifndef OPENOCPP_OCPP20_CERTIFICATEHASHDATACHAINTYPE_H +#define OPENOCPP_OCPP20_CERTIFICATEHASHDATACHAINTYPE_H #include "CertificateHashDataType20.h" #include "CustomDataType20.h" @@ -40,40 +40,40 @@ namespace ocpp20 { /** @brief */ -struct CertificateHashDataChainType20 +struct CertificateHashDataChainType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - CertificateHashDataType20 certificateHashData; + CertificateHashDataType certificateHashData; /** @brief */ - GetCertificateIdUseEnumType20 certificateType; + GetCertificateIdUseEnumType certificateType; /** @brief */ - std::vector childCertificateHashData; + std::vector childCertificateHashData; }; -/** @brief Converter class for CertificateHashDataChainType20 type */ -class CertificateHashDataChainType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for CertificateHashDataChainType type */ +class CertificateHashDataChainTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override + ocpp::messages::IMessageConverter* clone() const override { - return new CertificateHashDataChainType20Converter(); + return new CertificateHashDataChainTypeConverter(); } - /** @brief Convert a CertificateHashDataChainType20 from a JSON representation */ - bool fromJson(const rapidjson::Value& json, - CertificateHashDataChainType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) override; + /** @brief Convert a CertificateHashDataChainType from a JSON representation */ + bool fromJson(const rapidjson::Value& json, + CertificateHashDataChainType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a CertificateHashDataChainType20 to a JSON representation */ - bool toJson(const CertificateHashDataChainType20& data, rapidjson::Document& json) override; + /** @brief Convert a CertificateHashDataChainType to a JSON representation */ + bool toJson(const CertificateHashDataChainType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CERTIFICATEHASHDATACHAINTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CERTIFICATEHASHDATACHAINTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/CertificateHashDataType20.cpp b/src/ocpp20/types/CertificateHashDataType20.cpp index 8b56de20..0b665f4d 100644 --- a/src/ocpp20/types/CertificateHashDataType20.cpp +++ b/src/ocpp20/types/CertificateHashDataType20.cpp @@ -32,23 +32,23 @@ namespace types namespace ocpp20 { -/** @brief Convert a CertificateHashDataType20 from a JSON representation */ -bool CertificateHashDataType20Converter::fromJson(const rapidjson::Value& json, - CertificateHashDataType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a CertificateHashDataType from a JSON representation */ +bool CertificateHashDataTypeConverter::fromJson(const rapidjson::Value& json, + CertificateHashDataType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // hashAlgorithm - data.hashAlgorithm = HashAlgorithmEnumType20Helper.fromString(json["hashAlgorithm"].GetString()); + data.hashAlgorithm = HashAlgorithmEnumTypeHelper.fromString(json["hashAlgorithm"].GetString()); // issuerNameHash extract(json, "issuerNameHash", data.issuerNameHash); @@ -67,15 +67,15 @@ bool CertificateHashDataType20Converter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a CertificateHashDataType20 to a JSON representation */ -bool CertificateHashDataType20Converter::toJson(const CertificateHashDataType20& data, rapidjson::Document& json) +/** @brief Convert a CertificateHashDataType to a JSON representation */ +bool CertificateHashDataTypeConverter::toJson(const CertificateHashDataType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -84,7 +84,7 @@ bool CertificateHashDataType20Converter::toJson(const CertificateHashDataType20& } // hashAlgorithm - fill(json, "hashAlgorithm", HashAlgorithmEnumType20Helper.toString(data.hashAlgorithm)); + fill(json, "hashAlgorithm", HashAlgorithmEnumTypeHelper.toString(data.hashAlgorithm)); // issuerNameHash fill(json, "issuerNameHash", data.issuerNameHash); diff --git a/src/ocpp20/types/CertificateHashDataType20.h b/src/ocpp20/types/CertificateHashDataType20.h index ff1ab484..3e0945c3 100644 --- a/src/ocpp20/types/CertificateHashDataType20.h +++ b/src/ocpp20/types/CertificateHashDataType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CERTIFICATEHASHDATATYPE20_H -#define OPENOCPP_CERTIFICATEHASHDATATYPE20_H +#ifndef OPENOCPP_OCPP20_CERTIFICATEHASHDATATYPE_H +#define OPENOCPP_OCPP20_CERTIFICATEHASHDATATYPE_H #include "CustomDataType20.h" #include "HashAlgorithmEnumType20.h" @@ -39,12 +39,12 @@ namespace ocpp20 { /** @brief */ -struct CertificateHashDataType20 +struct CertificateHashDataType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - HashAlgorithmEnumType20 hashAlgorithm; + HashAlgorithmEnumType hashAlgorithm; /** @brief Hashed value of the Issuer DN (Distinguished Name). */ ocpp::types::CiStringType<128u> issuerNameHash; /** @brief Hashed value of the issuers public key */ @@ -53,28 +53,25 @@ struct CertificateHashDataType20 ocpp::types::CiStringType<40u> serialNumber; }; -/** @brief Converter class for CertificateHashDataType20 type */ -class CertificateHashDataType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for CertificateHashDataType type */ +class CertificateHashDataTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override - { - return new CertificateHashDataType20Converter(); - } + ocpp::messages::IMessageConverter* clone() const override { return new CertificateHashDataTypeConverter(); } - /** @brief Convert a CertificateHashDataType20 from a JSON representation */ + /** @brief Convert a CertificateHashDataType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - CertificateHashDataType20& data, + CertificateHashDataType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a CertificateHashDataType20 to a JSON representation */ - bool toJson(const CertificateHashDataType20& data, rapidjson::Document& json) override; + /** @brief Convert a CertificateHashDataType to a JSON representation */ + bool toJson(const CertificateHashDataType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CERTIFICATEHASHDATATYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CERTIFICATEHASHDATATYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/CertificateSignedStatusEnumType20.cpp b/src/ocpp20/types/CertificateSignedStatusEnumType20.cpp index dc4bc798..330f633d 100644 --- a/src/ocpp20/types/CertificateSignedStatusEnumType20.cpp +++ b/src/ocpp20/types/CertificateSignedStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a CertificateSignedStatusEnumType20 enum to string */ -const EnumToStringFromString CertificateSignedStatusEnumType20Helper = { - {CertificateSignedStatusEnumType20::Accepted, "Accepted"}, - {CertificateSignedStatusEnumType20::Rejected, "Rejected"}, +/** @brief Helper to convert a CertificateSignedStatusEnumType enum to string */ +const EnumToStringFromString CertificateSignedStatusEnumTypeHelper = { + {CertificateSignedStatusEnumType::Accepted, "Accepted"}, + {CertificateSignedStatusEnumType::Rejected, "Rejected"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/CertificateSignedStatusEnumType20.h b/src/ocpp20/types/CertificateSignedStatusEnumType20.h index 50c8ff59..0bd7ff5a 100644 --- a/src/ocpp20/types/CertificateSignedStatusEnumType20.h +++ b/src/ocpp20/types/CertificateSignedStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CERTIFICATESIGNEDSTATUSENUMTYPE20_H -#define OPENOCPP_CERTIFICATESIGNEDSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CERTIFICATESIGNEDSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_CERTIFICATESIGNEDSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief Returns whether certificate signing has been accepted, otherwise rejected. */ -enum class CertificateSignedStatusEnumType20 +enum class CertificateSignedStatusEnumType { Accepted, Rejected, }; -/** @brief Helper to convert a CertificateSignedStatusEnumType20 enum to string */ -extern const EnumToStringFromString CertificateSignedStatusEnumType20Helper; +/** @brief Helper to convert a CertificateSignedStatusEnumType enum to string */ +extern const EnumToStringFromString CertificateSignedStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CERTIFICATESIGNEDSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CERTIFICATESIGNEDSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/CertificateSigningUseEnumType20.cpp b/src/ocpp20/types/CertificateSigningUseEnumType20.cpp index 0c17ed35..8074a17b 100644 --- a/src/ocpp20/types/CertificateSigningUseEnumType20.cpp +++ b/src/ocpp20/types/CertificateSigningUseEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a CertificateSigningUseEnumType20 enum to string */ -const EnumToStringFromString CertificateSigningUseEnumType20Helper = { - {CertificateSigningUseEnumType20::ChargingStationCertificate, "ChargingStationCertificate"}, - {CertificateSigningUseEnumType20::V2GCertificate, "V2GCertificate"}, +/** @brief Helper to convert a CertificateSigningUseEnumType enum to string */ +const EnumToStringFromString CertificateSigningUseEnumTypeHelper = { + {CertificateSigningUseEnumType::ChargingStationCertificate, "ChargingStationCertificate"}, + {CertificateSigningUseEnumType::V2GCertificate, "V2GCertificate"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/CertificateSigningUseEnumType20.h b/src/ocpp20/types/CertificateSigningUseEnumType20.h index cd835f5e..99d3aa6d 100644 --- a/src/ocpp20/types/CertificateSigningUseEnumType20.h +++ b/src/ocpp20/types/CertificateSigningUseEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CERTIFICATESIGNINGUSEENUMTYPE20_H -#define OPENOCPP_CERTIFICATESIGNINGUSEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CERTIFICATESIGNINGUSEENUMTYPE_H +#define OPENOCPP_OCPP20_CERTIFICATESIGNINGUSEENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief Indicates the type of certificate that is to be signed. When omitted the certificate is to be used for both the 15118 connection (if implemented) and the Charging Station to CSMS connection. */ -enum class CertificateSigningUseEnumType20 +enum class CertificateSigningUseEnumType { ChargingStationCertificate, V2GCertificate, }; -/** @brief Helper to convert a CertificateSigningUseEnumType20 enum to string */ -extern const EnumToStringFromString CertificateSigningUseEnumType20Helper; +/** @brief Helper to convert a CertificateSigningUseEnumType enum to string */ +extern const EnumToStringFromString CertificateSigningUseEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CERTIFICATESIGNINGUSEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CERTIFICATESIGNINGUSEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChangeAvailabilityStatusEnumType20.cpp b/src/ocpp20/types/ChangeAvailabilityStatusEnumType20.cpp index da05ef03..ef987c39 100644 --- a/src/ocpp20/types/ChangeAvailabilityStatusEnumType20.cpp +++ b/src/ocpp20/types/ChangeAvailabilityStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ChangeAvailabilityStatusEnumType20 enum to string */ -const EnumToStringFromString ChangeAvailabilityStatusEnumType20Helper = { - {ChangeAvailabilityStatusEnumType20::Accepted, "Accepted"}, - {ChangeAvailabilityStatusEnumType20::Rejected, "Rejected"}, - {ChangeAvailabilityStatusEnumType20::Scheduled, "Scheduled"}, +/** @brief Helper to convert a ChangeAvailabilityStatusEnumType enum to string */ +const EnumToStringFromString ChangeAvailabilityStatusEnumTypeHelper = { + {ChangeAvailabilityStatusEnumType::Accepted, "Accepted"}, + {ChangeAvailabilityStatusEnumType::Rejected, "Rejected"}, + {ChangeAvailabilityStatusEnumType::Scheduled, "Scheduled"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ChangeAvailabilityStatusEnumType20.h b/src/ocpp20/types/ChangeAvailabilityStatusEnumType20.h index 6e54a810..23cc2438 100644 --- a/src/ocpp20/types/ChangeAvailabilityStatusEnumType20.h +++ b/src/ocpp20/types/ChangeAvailabilityStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHANGEAVAILABILITYSTATUSENUMTYPE20_H -#define OPENOCPP_CHANGEAVAILABILITYSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CHANGEAVAILABILITYSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_CHANGEAVAILABILITYSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief This indicates whether the Charging Station is able to perform the availability change. */ -enum class ChangeAvailabilityStatusEnumType20 +enum class ChangeAvailabilityStatusEnumType { Accepted, Rejected, Scheduled, }; -/** @brief Helper to convert a ChangeAvailabilityStatusEnumType20 enum to string */ -extern const EnumToStringFromString ChangeAvailabilityStatusEnumType20Helper; +/** @brief Helper to convert a ChangeAvailabilityStatusEnumType enum to string */ +extern const EnumToStringFromString ChangeAvailabilityStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHANGEAVAILABILITYSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHANGEAVAILABILITYSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingLimitSourceEnumType20.cpp b/src/ocpp20/types/ChargingLimitSourceEnumType20.cpp index acc76b6e..363a3268 100644 --- a/src/ocpp20/types/ChargingLimitSourceEnumType20.cpp +++ b/src/ocpp20/types/ChargingLimitSourceEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ChargingLimitSourceEnumType20 enum to string */ -const EnumToStringFromString ChargingLimitSourceEnumType20Helper = { - {ChargingLimitSourceEnumType20::EMS, "EMS"}, - {ChargingLimitSourceEnumType20::Other, "Other"}, - {ChargingLimitSourceEnumType20::SO, "SO"}, - {ChargingLimitSourceEnumType20::CSO, "CSO"}, +/** @brief Helper to convert a ChargingLimitSourceEnumType enum to string */ +const EnumToStringFromString ChargingLimitSourceEnumTypeHelper = { + {ChargingLimitSourceEnumType::EMS, "EMS"}, + {ChargingLimitSourceEnumType::Other, "Other"}, + {ChargingLimitSourceEnumType::SO, "SO"}, + {ChargingLimitSourceEnumType::CSO, "CSO"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ChargingLimitSourceEnumType20.h b/src/ocpp20/types/ChargingLimitSourceEnumType20.h index 4f016120..b1479e9a 100644 --- a/src/ocpp20/types/ChargingLimitSourceEnumType20.h +++ b/src/ocpp20/types/ChargingLimitSourceEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGLIMITSOURCEENUMTYPE20_H -#define OPENOCPP_CHARGINGLIMITSOURCEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGLIMITSOURCEENUMTYPE_H +#define OPENOCPP_OCPP20_CHARGINGLIMITSOURCEENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief */ -enum class ChargingLimitSourceEnumType20 +enum class ChargingLimitSourceEnumType { EMS, Other, @@ -42,11 +42,11 @@ enum class ChargingLimitSourceEnumType20 CSO, }; -/** @brief Helper to convert a ChargingLimitSourceEnumType20 enum to string */ -extern const EnumToStringFromString ChargingLimitSourceEnumType20Helper; +/** @brief Helper to convert a ChargingLimitSourceEnumType enum to string */ +extern const EnumToStringFromString ChargingLimitSourceEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGLIMITSOURCEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGLIMITSOURCEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingLimitType20.cpp b/src/ocpp20/types/ChargingLimitType20.cpp index ad40d105..9b7408e6 100644 --- a/src/ocpp20/types/ChargingLimitType20.cpp +++ b/src/ocpp20/types/ChargingLimitType20.cpp @@ -32,23 +32,23 @@ namespace types namespace ocpp20 { -/** @brief Convert a ChargingLimitType20 from a JSON representation */ -bool ChargingLimitType20Converter::fromJson(const rapidjson::Value& json, - ChargingLimitType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ChargingLimitType from a JSON representation */ +bool ChargingLimitTypeConverter::fromJson(const rapidjson::Value& json, + ChargingLimitType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // chargingLimitSource - data.chargingLimitSource = ChargingLimitSourceEnumType20Helper.fromString(json["chargingLimitSource"].GetString()); + data.chargingLimitSource = ChargingLimitSourceEnumTypeHelper.fromString(json["chargingLimitSource"].GetString()); // isGridCritical extract(json, "isGridCritical", data.isGridCritical); @@ -61,15 +61,15 @@ bool ChargingLimitType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a ChargingLimitType20 to a JSON representation */ -bool ChargingLimitType20Converter::toJson(const ChargingLimitType20& data, rapidjson::Document& json) +/** @brief Convert a ChargingLimitType to a JSON representation */ +bool ChargingLimitTypeConverter::toJson(const ChargingLimitType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -78,7 +78,7 @@ bool ChargingLimitType20Converter::toJson(const ChargingLimitType20& data, rapid } // chargingLimitSource - fill(json, "chargingLimitSource", ChargingLimitSourceEnumType20Helper.toString(data.chargingLimitSource)); + fill(json, "chargingLimitSource", ChargingLimitSourceEnumTypeHelper.toString(data.chargingLimitSource)); // isGridCritical fill(json, "isGridCritical", data.isGridCritical); diff --git a/src/ocpp20/types/ChargingLimitType20.h b/src/ocpp20/types/ChargingLimitType20.h index 51d78852..6098acdd 100644 --- a/src/ocpp20/types/ChargingLimitType20.h +++ b/src/ocpp20/types/ChargingLimitType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGLIMITTYPE20_H -#define OPENOCPP_CHARGINGLIMITTYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGLIMITTYPE_H +#define OPENOCPP_OCPP20_CHARGINGLIMITTYPE_H #include "ChargingLimitSourceEnumType20.h" #include "CustomDataType20.h" @@ -40,37 +40,37 @@ namespace ocpp20 /** @brief Charging_ Limit urn:x-enexis:ecdm:uid:2:234489 */ -struct ChargingLimitType20 +struct ChargingLimitType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ChargingLimitSourceEnumType20 chargingLimitSource; + ChargingLimitSourceEnumType chargingLimitSource; /** @brief Charging_ Limit. Is_ Grid_ Critical. Indicator urn:x-enexis:ecdm:uid:1:570847 Indicates whether the charging limit is critical for the grid. */ ocpp::types::Optional isGridCritical; }; -/** @brief Converter class for ChargingLimitType20 type */ -class ChargingLimitType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ChargingLimitType type */ +class ChargingLimitTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new ChargingLimitType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new ChargingLimitTypeConverter(); } - /** @brief Convert a ChargingLimitType20 from a JSON representation */ + /** @brief Convert a ChargingLimitType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ChargingLimitType20& data, + ChargingLimitType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ChargingLimitType20 to a JSON representation */ - bool toJson(const ChargingLimitType20& data, rapidjson::Document& json) override; + /** @brief Convert a ChargingLimitType to a JSON representation */ + bool toJson(const ChargingLimitType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGLIMITTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGLIMITTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingNeedsType20.cpp b/src/ocpp20/types/ChargingNeedsType20.cpp index 104bc6cf..345e8a21 100644 --- a/src/ocpp20/types/ChargingNeedsType20.cpp +++ b/src/ocpp20/types/ChargingNeedsType20.cpp @@ -32,25 +32,25 @@ namespace types namespace ocpp20 { -/** @brief Convert a ChargingNeedsType20 from a JSON representation */ -bool ChargingNeedsType20Converter::fromJson(const rapidjson::Value& json, - ChargingNeedsType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ChargingNeedsType from a JSON representation */ +bool ChargingNeedsTypeConverter::fromJson(const rapidjson::Value& json, + ChargingNeedsType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // acChargingParameters if (json.HasMember("acChargingParameters")) { - ACChargingParametersType20Converter acChargingParameters_converter; + ACChargingParametersTypeConverter acChargingParameters_converter; ret = ret && acChargingParameters_converter.fromJson(json["acChargingParameters"], data.acChargingParameters, error_code, error_message); } @@ -58,13 +58,13 @@ bool ChargingNeedsType20Converter::fromJson(const rapidjson::Value& json, // dcChargingParameters if (json.HasMember("dcChargingParameters")) { - DCChargingParametersType20Converter dcChargingParameters_converter; + DCChargingParametersTypeConverter dcChargingParameters_converter; ret = ret && dcChargingParameters_converter.fromJson(json["dcChargingParameters"], data.dcChargingParameters, error_code, error_message); } // requestedEnergyTransfer - data.requestedEnergyTransfer = EnergyTransferModeEnumType20Helper.fromString(json["requestedEnergyTransfer"].GetString()); + data.requestedEnergyTransfer = EnergyTransferModeEnumTypeHelper.fromString(json["requestedEnergyTransfer"].GetString()); // departureTime ret = ret && extract(json, "departureTime", data.departureTime, error_message); @@ -77,15 +77,15 @@ bool ChargingNeedsType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a ChargingNeedsType20 to a JSON representation */ -bool ChargingNeedsType20Converter::toJson(const ChargingNeedsType20& data, rapidjson::Document& json) +/** @brief Convert a ChargingNeedsType to a JSON representation */ +bool ChargingNeedsTypeConverter::toJson(const ChargingNeedsType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -96,7 +96,7 @@ bool ChargingNeedsType20Converter::toJson(const ChargingNeedsType20& data, rapid // acChargingParameters if (data.acChargingParameters.isSet()) { - ACChargingParametersType20Converter acChargingParameters_converter; + ACChargingParametersTypeConverter acChargingParameters_converter; acChargingParameters_converter.setAllocator(allocator); rapidjson::Document acChargingParameters_doc; acChargingParameters_doc.Parse("{}"); @@ -107,7 +107,7 @@ bool ChargingNeedsType20Converter::toJson(const ChargingNeedsType20& data, rapid // dcChargingParameters if (data.dcChargingParameters.isSet()) { - DCChargingParametersType20Converter dcChargingParameters_converter; + DCChargingParametersTypeConverter dcChargingParameters_converter; dcChargingParameters_converter.setAllocator(allocator); rapidjson::Document dcChargingParameters_doc; dcChargingParameters_doc.Parse("{}"); @@ -116,7 +116,7 @@ bool ChargingNeedsType20Converter::toJson(const ChargingNeedsType20& data, rapid } // requestedEnergyTransfer - fill(json, "requestedEnergyTransfer", EnergyTransferModeEnumType20Helper.toString(data.requestedEnergyTransfer)); + fill(json, "requestedEnergyTransfer", EnergyTransferModeEnumTypeHelper.toString(data.requestedEnergyTransfer)); // departureTime fill(json, "departureTime", data.departureTime); diff --git a/src/ocpp20/types/ChargingNeedsType20.h b/src/ocpp20/types/ChargingNeedsType20.h index 2005afce..5ac2aa92 100644 --- a/src/ocpp20/types/ChargingNeedsType20.h +++ b/src/ocpp20/types/ChargingNeedsType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGNEEDSTYPE20_H -#define OPENOCPP_CHARGINGNEEDSTYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGNEEDSTYPE_H +#define OPENOCPP_OCPP20_CHARGINGNEEDSTYPE_H #include "ACChargingParametersType20.h" #include "CustomDataType20.h" @@ -43,41 +43,41 @@ namespace ocpp20 /** @brief Charging_ Needs urn:x-oca:ocpp:uid:2:233249 */ -struct ChargingNeedsType20 +struct ChargingNeedsType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional acChargingParameters; + ocpp::types::Optional acChargingParameters; /** @brief */ - ocpp::types::Optional dcChargingParameters; + ocpp::types::Optional dcChargingParameters; /** @brief */ - EnergyTransferModeEnumType20 requestedEnergyTransfer; + EnergyTransferModeEnumType requestedEnergyTransfer; /** @brief Charging_ Needs. Departure_ Time. Date_ Time urn:x-oca:ocpp:uid:1:569223 Estimated departure time of the EV. */ ocpp::types::Optional departureTime; }; -/** @brief Converter class for ChargingNeedsType20 type */ -class ChargingNeedsType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ChargingNeedsType type */ +class ChargingNeedsTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new ChargingNeedsType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new ChargingNeedsTypeConverter(); } - /** @brief Convert a ChargingNeedsType20 from a JSON representation */ + /** @brief Convert a ChargingNeedsType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ChargingNeedsType20& data, + ChargingNeedsType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ChargingNeedsType20 to a JSON representation */ - bool toJson(const ChargingNeedsType20& data, rapidjson::Document& json) override; + /** @brief Convert a ChargingNeedsType to a JSON representation */ + bool toJson(const ChargingNeedsType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGNEEDSTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGNEEDSTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingProfileCriterionType20.cpp b/src/ocpp20/types/ChargingProfileCriterionType20.cpp index 6be76815..c61c4e4c 100644 --- a/src/ocpp20/types/ChargingProfileCriterionType20.cpp +++ b/src/ocpp20/types/ChargingProfileCriterionType20.cpp @@ -32,25 +32,25 @@ namespace types namespace ocpp20 { -/** @brief Convert a ChargingProfileCriterionType20 from a JSON representation */ -bool ChargingProfileCriterionType20Converter::fromJson(const rapidjson::Value& json, - ChargingProfileCriterionType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ChargingProfileCriterionType from a JSON representation */ +bool ChargingProfileCriterionTypeConverter::fromJson(const rapidjson::Value& json, + ChargingProfileCriterionType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // chargingProfilePurpose if (json.HasMember("chargingProfilePurpose")) { - data.chargingProfilePurpose = ChargingProfilePurposeEnumType20Helper.fromString(json["chargingProfilePurpose"].GetString()); + data.chargingProfilePurpose = ChargingProfilePurposeEnumTypeHelper.fromString(json["chargingProfilePurpose"].GetString()); } // stackLevel @@ -73,8 +73,8 @@ bool ChargingProfileCriterionType20Converter::fromJson(const rapidjson::Value& const rapidjson::Value& chargingLimitSource_json = json["chargingLimitSource"]; for (auto it = chargingLimitSource_json.Begin(); ret && (it != chargingLimitSource_json.End()); ++it) { - ChargingLimitSourceEnumType20& item = data.chargingLimitSource.emplace_back(); - item = ChargingLimitSourceEnumType20Helper.fromString(it->GetString()); + ChargingLimitSourceEnumType& item = data.chargingLimitSource.emplace_back(); + item = ChargingLimitSourceEnumTypeHelper.fromString(it->GetString()); } } @@ -86,15 +86,15 @@ bool ChargingProfileCriterionType20Converter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a ChargingProfileCriterionType20 to a JSON representation */ -bool ChargingProfileCriterionType20Converter::toJson(const ChargingProfileCriterionType20& data, rapidjson::Document& json) +/** @brief Convert a ChargingProfileCriterionType to a JSON representation */ +bool ChargingProfileCriterionTypeConverter::toJson(const ChargingProfileCriterionType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -105,7 +105,7 @@ bool ChargingProfileCriterionType20Converter::toJson(const ChargingProfileCriter // chargingProfilePurpose if (data.chargingProfilePurpose.isSet()) { - fill(json, "chargingProfilePurpose", ChargingProfilePurposeEnumType20Helper.toString(data.chargingProfilePurpose)); + fill(json, "chargingProfilePurpose", ChargingProfilePurposeEnumTypeHelper.toString(data.chargingProfilePurpose)); } // stackLevel @@ -128,10 +128,10 @@ bool ChargingProfileCriterionType20Converter::toJson(const ChargingProfileCriter { rapidjson::Value chargingLimitSource_json(rapidjson::kArrayType); - for (const ChargingLimitSourceEnumType20& item : data.chargingLimitSource) + for (const ChargingLimitSourceEnumType& item : data.chargingLimitSource) { - chargingLimitSource_json.PushBack( - rapidjson::Value(ChargingLimitSourceEnumType20Helper.toString(item).c_str(), *allocator).Move(), *allocator); + chargingLimitSource_json.PushBack(rapidjson::Value(ChargingLimitSourceEnumTypeHelper.toString(item).c_str(), *allocator).Move(), + *allocator); } json.AddMember(rapidjson::StringRef("chargingLimitSource"), chargingLimitSource_json.Move(), *allocator); } diff --git a/src/ocpp20/types/ChargingProfileCriterionType20.h b/src/ocpp20/types/ChargingProfileCriterionType20.h index b5dbb4ab..71c27300 100644 --- a/src/ocpp20/types/ChargingProfileCriterionType20.h +++ b/src/ocpp20/types/ChargingProfileCriterionType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGPROFILECRITERIONTYPE20_H -#define OPENOCPP_CHARGINGPROFILECRITERIONTYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGPROFILECRITERIONTYPE_H +#define OPENOCPP_OCPP20_CHARGINGPROFILECRITERIONTYPE_H #include "ChargingLimitSourceEnumType20.h" #include "ChargingProfilePurposeEnumType20.h" @@ -43,12 +43,12 @@ namespace ocpp20 urn:x-oca:ocpp:uid:2:233255 A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval. */ -struct ChargingProfileCriterionType20 +struct ChargingProfileCriterionType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional chargingProfilePurpose; + ocpp::types::Optional chargingProfilePurpose; /** @brief Charging_ Profile. Stack_ Level. Counter urn:x-oca:ocpp:uid:1:569230 Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0. */ @@ -56,31 +56,31 @@ Value determining level in hierarchy stack of profiles. Higher values have prece /** @brief List of all the chargingProfileIds requested. Any ChargingProfile that matches one of these profiles will be reported. If omitted, the Charging Station SHALL not filter on chargingProfileId. This field SHALL NOT contain more ids than set in <<configkey-charging-profile-entries,ChargingProfileEntries.maxLimit>> */ std::vector chargingProfileId; /** @brief For which charging limit sources, charging profiles SHALL be reported. If omitted, the Charging Station SHALL not filter on chargingLimitSource. */ - std::vector chargingLimitSource; + std::vector chargingLimitSource; }; -/** @brief Converter class for ChargingProfileCriterionType20 type */ -class ChargingProfileCriterionType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ChargingProfileCriterionType type */ +class ChargingProfileCriterionTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override + ocpp::messages::IMessageConverter* clone() const override { - return new ChargingProfileCriterionType20Converter(); + return new ChargingProfileCriterionTypeConverter(); } - /** @brief Convert a ChargingProfileCriterionType20 from a JSON representation */ - bool fromJson(const rapidjson::Value& json, - ChargingProfileCriterionType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) override; + /** @brief Convert a ChargingProfileCriterionType from a JSON representation */ + bool fromJson(const rapidjson::Value& json, + ChargingProfileCriterionType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ChargingProfileCriterionType20 to a JSON representation */ - bool toJson(const ChargingProfileCriterionType20& data, rapidjson::Document& json) override; + /** @brief Convert a ChargingProfileCriterionType to a JSON representation */ + bool toJson(const ChargingProfileCriterionType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGPROFILECRITERIONTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGPROFILECRITERIONTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingProfileKindEnumType20.cpp b/src/ocpp20/types/ChargingProfileKindEnumType20.cpp index 040b28a6..4ba7ae33 100644 --- a/src/ocpp20/types/ChargingProfileKindEnumType20.cpp +++ b/src/ocpp20/types/ChargingProfileKindEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ChargingProfileKindEnumType20 enum to string */ -const EnumToStringFromString ChargingProfileKindEnumType20Helper = { - {ChargingProfileKindEnumType20::Absolute, "Absolute"}, - {ChargingProfileKindEnumType20::Recurring, "Recurring"}, - {ChargingProfileKindEnumType20::Relative, "Relative"}, +/** @brief Helper to convert a ChargingProfileKindEnumType enum to string */ +const EnumToStringFromString ChargingProfileKindEnumTypeHelper = { + {ChargingProfileKindEnumType::Absolute, "Absolute"}, + {ChargingProfileKindEnumType::Recurring, "Recurring"}, + {ChargingProfileKindEnumType::Relative, "Relative"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ChargingProfileKindEnumType20.h b/src/ocpp20/types/ChargingProfileKindEnumType20.h index af09cdb5..fbae1ffb 100644 --- a/src/ocpp20/types/ChargingProfileKindEnumType20.h +++ b/src/ocpp20/types/ChargingProfileKindEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGPROFILEKINDENUMTYPE20_H -#define OPENOCPP_CHARGINGPROFILEKINDENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGPROFILEKINDENUMTYPE_H +#define OPENOCPP_OCPP20_CHARGINGPROFILEKINDENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,18 +36,18 @@ namespace ocpp20 /** @brief Charging_ Profile. Charging_ Profile_ Kind. Charging_ Profile_ Kind_ Code urn:x-oca:ocpp:uid:1:569232 Indicates the kind of schedule. */ -enum class ChargingProfileKindEnumType20 +enum class ChargingProfileKindEnumType { Absolute, Recurring, Relative, }; -/** @brief Helper to convert a ChargingProfileKindEnumType20 enum to string */ -extern const EnumToStringFromString ChargingProfileKindEnumType20Helper; +/** @brief Helper to convert a ChargingProfileKindEnumType enum to string */ +extern const EnumToStringFromString ChargingProfileKindEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGPROFILEKINDENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGPROFILEKINDENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingProfilePurposeEnumType20.cpp b/src/ocpp20/types/ChargingProfilePurposeEnumType20.cpp index f96a0078..71b153c3 100644 --- a/src/ocpp20/types/ChargingProfilePurposeEnumType20.cpp +++ b/src/ocpp20/types/ChargingProfilePurposeEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ChargingProfilePurposeEnumType20 enum to string */ -const EnumToStringFromString ChargingProfilePurposeEnumType20Helper = { - {ChargingProfilePurposeEnumType20::ChargingStationExternalConstraints, "ChargingStationExternalConstraints"}, - {ChargingProfilePurposeEnumType20::ChargingStationMaxProfile, "ChargingStationMaxProfile"}, - {ChargingProfilePurposeEnumType20::TxDefaultProfile, "TxDefaultProfile"}, - {ChargingProfilePurposeEnumType20::TxProfile, "TxProfile"}, +/** @brief Helper to convert a ChargingProfilePurposeEnumType enum to string */ +const EnumToStringFromString ChargingProfilePurposeEnumTypeHelper = { + {ChargingProfilePurposeEnumType::ChargingStationExternalConstraints, "ChargingStationExternalConstraints"}, + {ChargingProfilePurposeEnumType::ChargingStationMaxProfile, "ChargingStationMaxProfile"}, + {ChargingProfilePurposeEnumType::TxDefaultProfile, "TxDefaultProfile"}, + {ChargingProfilePurposeEnumType::TxProfile, "TxProfile"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ChargingProfilePurposeEnumType20.h b/src/ocpp20/types/ChargingProfilePurposeEnumType20.h index bbad00f4..ba19b91b 100644 --- a/src/ocpp20/types/ChargingProfilePurposeEnumType20.h +++ b/src/ocpp20/types/ChargingProfilePurposeEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGPROFILEPURPOSEENUMTYPE20_H -#define OPENOCPP_CHARGINGPROFILEPURPOSEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGPROFILEPURPOSEENUMTYPE_H +#define OPENOCPP_OCPP20_CHARGINGPROFILEPURPOSEENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief Charging_ Profile. Charging_ Profile_ Purpose. Charging_ Profile_ Purpose_ Code urn:x-oca:ocpp:uid:1:569231 Defines the purpose of the schedule transferred by this profile */ -enum class ChargingProfilePurposeEnumType20 +enum class ChargingProfilePurposeEnumType { ChargingStationExternalConstraints, ChargingStationMaxProfile, @@ -44,11 +44,11 @@ enum class ChargingProfilePurposeEnumType20 TxProfile, }; -/** @brief Helper to convert a ChargingProfilePurposeEnumType20 enum to string */ -extern const EnumToStringFromString ChargingProfilePurposeEnumType20Helper; +/** @brief Helper to convert a ChargingProfilePurposeEnumType enum to string */ +extern const EnumToStringFromString ChargingProfilePurposeEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGPROFILEPURPOSEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGPROFILEPURPOSEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingProfileStatusEnumType20.cpp b/src/ocpp20/types/ChargingProfileStatusEnumType20.cpp index 248ecb32..bb8ab3c0 100644 --- a/src/ocpp20/types/ChargingProfileStatusEnumType20.cpp +++ b/src/ocpp20/types/ChargingProfileStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ChargingProfileStatusEnumType20 enum to string */ -const EnumToStringFromString ChargingProfileStatusEnumType20Helper = { - {ChargingProfileStatusEnumType20::Accepted, "Accepted"}, - {ChargingProfileStatusEnumType20::Rejected, "Rejected"}, +/** @brief Helper to convert a ChargingProfileStatusEnumType enum to string */ +const EnumToStringFromString ChargingProfileStatusEnumTypeHelper = { + {ChargingProfileStatusEnumType::Accepted, "Accepted"}, + {ChargingProfileStatusEnumType::Rejected, "Rejected"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ChargingProfileStatusEnumType20.h b/src/ocpp20/types/ChargingProfileStatusEnumType20.h index c813ca5d..dd388d07 100644 --- a/src/ocpp20/types/ChargingProfileStatusEnumType20.h +++ b/src/ocpp20/types/ChargingProfileStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGPROFILESTATUSENUMTYPE20_H -#define OPENOCPP_CHARGINGPROFILESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGPROFILESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_CHARGINGPROFILESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief Returns whether the Charging Station has been able to process the message successfully. This does not guarantee the schedule will be followed to the letter. There might be other constraints the Charging Station may need to take into account. */ -enum class ChargingProfileStatusEnumType20 +enum class ChargingProfileStatusEnumType { Accepted, Rejected, }; -/** @brief Helper to convert a ChargingProfileStatusEnumType20 enum to string */ -extern const EnumToStringFromString ChargingProfileStatusEnumType20Helper; +/** @brief Helper to convert a ChargingProfileStatusEnumType enum to string */ +extern const EnumToStringFromString ChargingProfileStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGPROFILESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGPROFILESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingProfileType20.cpp b/src/ocpp20/types/ChargingProfileType20.cpp index a9763a42..776c0dcd 100644 --- a/src/ocpp20/types/ChargingProfileType20.cpp +++ b/src/ocpp20/types/ChargingProfileType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a ChargingProfileType20 from a JSON representation */ -bool ChargingProfileType20Converter::fromJson(const rapidjson::Value& json, - ChargingProfileType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ChargingProfileType from a JSON representation */ +bool ChargingProfileTypeConverter::fromJson(const rapidjson::Value& json, + ChargingProfileType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -54,15 +54,15 @@ bool ChargingProfileType20Converter::fromJson(const rapidjson::Value& json extract(json, "stackLevel", data.stackLevel); // chargingProfilePurpose - data.chargingProfilePurpose = ChargingProfilePurposeEnumType20Helper.fromString(json["chargingProfilePurpose"].GetString()); + data.chargingProfilePurpose = ChargingProfilePurposeEnumTypeHelper.fromString(json["chargingProfilePurpose"].GetString()); // chargingProfileKind - data.chargingProfileKind = ChargingProfileKindEnumType20Helper.fromString(json["chargingProfileKind"].GetString()); + data.chargingProfileKind = ChargingProfileKindEnumTypeHelper.fromString(json["chargingProfileKind"].GetString()); // recurrencyKind if (json.HasMember("recurrencyKind")) { - data.recurrencyKind = RecurrencyKindEnumType20Helper.fromString(json["recurrencyKind"].GetString()); + data.recurrencyKind = RecurrencyKindEnumTypeHelper.fromString(json["recurrencyKind"].GetString()); } // validFrom @@ -74,12 +74,12 @@ bool ChargingProfileType20Converter::fromJson(const rapidjson::Value& json // chargingSchedule if (json.HasMember("chargingSchedule")) { - const rapidjson::Value& chargingSchedule_json = json["chargingSchedule"]; - ChargingScheduleType20Converter chargingSchedule_converter; + const rapidjson::Value& chargingSchedule_json = json["chargingSchedule"]; + ChargingScheduleTypeConverter chargingSchedule_converter; for (auto it = chargingSchedule_json.Begin(); ret && (it != chargingSchedule_json.End()); ++it) { - ChargingScheduleType20& item = data.chargingSchedule.emplace_back(); - ret = ret && chargingSchedule_converter.fromJson(*it, item, error_code, error_message); + ChargingScheduleType& item = data.chargingSchedule.emplace_back(); + ret = ret && chargingSchedule_converter.fromJson(*it, item, error_code, error_message); } } @@ -94,15 +94,15 @@ bool ChargingProfileType20Converter::fromJson(const rapidjson::Value& json return ret; } -/** @brief Convert a ChargingProfileType20 to a JSON representation */ -bool ChargingProfileType20Converter::toJson(const ChargingProfileType20& data, rapidjson::Document& json) +/** @brief Convert a ChargingProfileType to a JSON representation */ +bool ChargingProfileTypeConverter::toJson(const ChargingProfileType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -117,15 +117,15 @@ bool ChargingProfileType20Converter::toJson(const ChargingProfileType20& data, r fill(json, "stackLevel", data.stackLevel); // chargingProfilePurpose - fill(json, "chargingProfilePurpose", ChargingProfilePurposeEnumType20Helper.toString(data.chargingProfilePurpose)); + fill(json, "chargingProfilePurpose", ChargingProfilePurposeEnumTypeHelper.toString(data.chargingProfilePurpose)); // chargingProfileKind - fill(json, "chargingProfileKind", ChargingProfileKindEnumType20Helper.toString(data.chargingProfileKind)); + fill(json, "chargingProfileKind", ChargingProfileKindEnumTypeHelper.toString(data.chargingProfileKind)); // recurrencyKind if (data.recurrencyKind.isSet()) { - fill(json, "recurrencyKind", RecurrencyKindEnumType20Helper.toString(data.recurrencyKind)); + fill(json, "recurrencyKind", RecurrencyKindEnumTypeHelper.toString(data.recurrencyKind)); } // validFrom @@ -136,10 +136,10 @@ bool ChargingProfileType20Converter::toJson(const ChargingProfileType20& data, r // chargingSchedule - rapidjson::Value chargingSchedule_json(rapidjson::kArrayType); - ChargingScheduleType20Converter chargingSchedule_converter; + rapidjson::Value chargingSchedule_json(rapidjson::kArrayType); + ChargingScheduleTypeConverter chargingSchedule_converter; chargingSchedule_converter.setAllocator(allocator); - for (const ChargingScheduleType20& item : data.chargingSchedule) + for (const ChargingScheduleType& item : data.chargingSchedule) { rapidjson::Document item_doc; item_doc.Parse("{}"); diff --git a/src/ocpp20/types/ChargingProfileType20.h b/src/ocpp20/types/ChargingProfileType20.h index 5d6d3895..708ab8ef 100644 --- a/src/ocpp20/types/ChargingProfileType20.h +++ b/src/ocpp20/types/ChargingProfileType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGPROFILETYPE20_H -#define OPENOCPP_CHARGINGPROFILETYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGPROFILETYPE_H +#define OPENOCPP_OCPP20_CHARGINGPROFILETYPE_H #include "ChargingProfileKindEnumType20.h" #include "ChargingProfilePurposeEnumType20.h" @@ -47,10 +47,10 @@ namespace ocpp20 urn:x-oca:ocpp:uid:2:233255 A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval. */ -struct ChargingProfileType20 +struct ChargingProfileType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Identified_ Object. MRID. Numeric_ Identifier urn:x-enexis:ecdm:uid:1:569198 Id of ChargingProfile. */ @@ -60,11 +60,11 @@ urn:x-oca:ocpp:uid:1:569230 Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0. */ int stackLevel; /** @brief */ - ChargingProfilePurposeEnumType20 chargingProfilePurpose; + ChargingProfilePurposeEnumType chargingProfilePurpose; /** @brief */ - ChargingProfileKindEnumType20 chargingProfileKind; + ChargingProfileKindEnumType chargingProfileKind; /** @brief */ - ocpp::types::Optional recurrencyKind; + ocpp::types::Optional recurrencyKind; /** @brief Charging_ Profile. Valid_ From. Date_ Time urn:x-oca:ocpp:uid:1:569234 Point in time at which the profile starts to be valid. If absent, the profile is valid as soon as it is received by the Charging Station. */ @@ -74,30 +74,30 @@ urn:x-oca:ocpp:uid:1:569235 Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile. */ ocpp::types::Optional validTo; /** @brief */ - std::vector chargingSchedule; + std::vector chargingSchedule; /** @brief SHALL only be included if ChargingProfilePurpose is set to TxProfile. The transactionId is used to match the profile to a specific transaction. */ ocpp::types::Optional> transactionId; }; -/** @brief Converter class for ChargingProfileType20 type */ -class ChargingProfileType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ChargingProfileType type */ +class ChargingProfileTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new ChargingProfileType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new ChargingProfileTypeConverter(); } - /** @brief Convert a ChargingProfileType20 from a JSON representation */ + /** @brief Convert a ChargingProfileType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ChargingProfileType20& data, + ChargingProfileType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ChargingProfileType20 to a JSON representation */ - bool toJson(const ChargingProfileType20& data, rapidjson::Document& json) override; + /** @brief Convert a ChargingProfileType to a JSON representation */ + bool toJson(const ChargingProfileType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGPROFILETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGPROFILETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingRateUnitEnumType20.cpp b/src/ocpp20/types/ChargingRateUnitEnumType20.cpp index e85c1f19..16b83351 100644 --- a/src/ocpp20/types/ChargingRateUnitEnumType20.cpp +++ b/src/ocpp20/types/ChargingRateUnitEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ChargingRateUnitEnumType20 enum to string */ -const EnumToStringFromString ChargingRateUnitEnumType20Helper = { - {ChargingRateUnitEnumType20::W, "W"}, - {ChargingRateUnitEnumType20::A, "A"}, +/** @brief Helper to convert a ChargingRateUnitEnumType enum to string */ +const EnumToStringFromString ChargingRateUnitEnumTypeHelper = { + {ChargingRateUnitEnumType::W, "W"}, + {ChargingRateUnitEnumType::A, "A"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ChargingRateUnitEnumType20.h b/src/ocpp20/types/ChargingRateUnitEnumType20.h index 804c9722..01d4ea26 100644 --- a/src/ocpp20/types/ChargingRateUnitEnumType20.h +++ b/src/ocpp20/types/ChargingRateUnitEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGRATEUNITENUMTYPE20_H -#define OPENOCPP_CHARGINGRATEUNITENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGRATEUNITENUMTYPE_H +#define OPENOCPP_OCPP20_CHARGINGRATEUNITENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,17 +36,17 @@ namespace ocpp20 /** @brief Charging_ Schedule. Charging_ Rate_ Unit. Charging_ Rate_ Unit_ Code urn:x-oca:ocpp:uid:1:569238 The unit of measure Limit is expressed in. */ -enum class ChargingRateUnitEnumType20 +enum class ChargingRateUnitEnumType { W, A, }; -/** @brief Helper to convert a ChargingRateUnitEnumType20 enum to string */ -extern const EnumToStringFromString ChargingRateUnitEnumType20Helper; +/** @brief Helper to convert a ChargingRateUnitEnumType enum to string */ +extern const EnumToStringFromString ChargingRateUnitEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGRATEUNITENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGRATEUNITENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingSchedulePeriodType20.cpp b/src/ocpp20/types/ChargingSchedulePeriodType20.cpp index 749f787e..4d349eda 100644 --- a/src/ocpp20/types/ChargingSchedulePeriodType20.cpp +++ b/src/ocpp20/types/ChargingSchedulePeriodType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a ChargingSchedulePeriodType20 from a JSON representation */ -bool ChargingSchedulePeriodType20Converter::fromJson(const rapidjson::Value& json, - ChargingSchedulePeriodType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ChargingSchedulePeriodType from a JSON representation */ +bool ChargingSchedulePeriodTypeConverter::fromJson(const rapidjson::Value& json, + ChargingSchedulePeriodType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -67,15 +67,15 @@ bool ChargingSchedulePeriodType20Converter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a ChargingSchedulePeriodType20 to a JSON representation */ -bool ChargingSchedulePeriodType20Converter::toJson(const ChargingSchedulePeriodType20& data, rapidjson::Document& json) +/** @brief Convert a ChargingSchedulePeriodType to a JSON representation */ +bool ChargingSchedulePeriodTypeConverter::toJson(const ChargingSchedulePeriodType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/ChargingSchedulePeriodType20.h b/src/ocpp20/types/ChargingSchedulePeriodType20.h index 16185989..7ed16f1d 100644 --- a/src/ocpp20/types/ChargingSchedulePeriodType20.h +++ b/src/ocpp20/types/ChargingSchedulePeriodType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGSCHEDULEPERIODTYPE20_H -#define OPENOCPP_CHARGINGSCHEDULEPERIODTYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGSCHEDULEPERIODTYPE_H +#define OPENOCPP_OCPP20_CHARGINGSCHEDULEPERIODTYPE_H #include "CustomDataType20.h" @@ -40,10 +40,10 @@ namespace ocpp20 urn:x-oca:ocpp:uid:2:233257 Charging schedule period structure defines a time period in a charging schedule. */ -struct ChargingSchedulePeriodType20 +struct ChargingSchedulePeriodType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Charging_ Schedule_ Period. Start_ Period. Elapsed_ Time urn:x-oca:ocpp:uid:1:569240 Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period. */ @@ -60,28 +60,28 @@ The number of phases that can be used for charging. If a number of phases is nee ocpp::types::Optional phaseToUse; }; -/** @brief Converter class for ChargingSchedulePeriodType20 type */ -class ChargingSchedulePeriodType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ChargingSchedulePeriodType type */ +class ChargingSchedulePeriodTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override + ocpp::messages::IMessageConverter* clone() const override { - return new ChargingSchedulePeriodType20Converter(); + return new ChargingSchedulePeriodTypeConverter(); } - /** @brief Convert a ChargingSchedulePeriodType20 from a JSON representation */ + /** @brief Convert a ChargingSchedulePeriodType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ChargingSchedulePeriodType20& data, + ChargingSchedulePeriodType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ChargingSchedulePeriodType20 to a JSON representation */ - bool toJson(const ChargingSchedulePeriodType20& data, rapidjson::Document& json) override; + /** @brief Convert a ChargingSchedulePeriodType to a JSON representation */ + bool toJson(const ChargingSchedulePeriodType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGSCHEDULEPERIODTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGSCHEDULEPERIODTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingScheduleType20.cpp b/src/ocpp20/types/ChargingScheduleType20.cpp index 15145154..d043e53e 100644 --- a/src/ocpp20/types/ChargingScheduleType20.cpp +++ b/src/ocpp20/types/ChargingScheduleType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a ChargingScheduleType20 from a JSON representation */ -bool ChargingScheduleType20Converter::fromJson(const rapidjson::Value& json, - ChargingScheduleType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ChargingScheduleType from a JSON representation */ +bool ChargingScheduleTypeConverter::fromJson(const rapidjson::Value& json, + ChargingScheduleType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -57,17 +57,17 @@ bool ChargingScheduleType20Converter::fromJson(const rapidjson::Value& jso extract(json, "duration", data.duration); // chargingRateUnit - data.chargingRateUnit = ChargingRateUnitEnumType20Helper.fromString(json["chargingRateUnit"].GetString()); + data.chargingRateUnit = ChargingRateUnitEnumTypeHelper.fromString(json["chargingRateUnit"].GetString()); // chargingSchedulePeriod if (json.HasMember("chargingSchedulePeriod")) { - const rapidjson::Value& chargingSchedulePeriod_json = json["chargingSchedulePeriod"]; - ChargingSchedulePeriodType20Converter chargingSchedulePeriod_converter; + const rapidjson::Value& chargingSchedulePeriod_json = json["chargingSchedulePeriod"]; + ChargingSchedulePeriodTypeConverter chargingSchedulePeriod_converter; for (auto it = chargingSchedulePeriod_json.Begin(); ret && (it != chargingSchedulePeriod_json.End()); ++it) { - ChargingSchedulePeriodType20& item = data.chargingSchedulePeriod.emplace_back(); - ret = ret && chargingSchedulePeriod_converter.fromJson(*it, item, error_code, error_message); + ChargingSchedulePeriodType& item = data.chargingSchedulePeriod.emplace_back(); + ret = ret && chargingSchedulePeriod_converter.fromJson(*it, item, error_code, error_message); } } @@ -77,7 +77,7 @@ bool ChargingScheduleType20Converter::fromJson(const rapidjson::Value& jso // salesTariff if (json.HasMember("salesTariff")) { - SalesTariffType20Converter salesTariff_converter; + SalesTariffTypeConverter salesTariff_converter; ret = ret && salesTariff_converter.fromJson(json["salesTariff"], data.salesTariff, error_code, error_message); } @@ -89,15 +89,15 @@ bool ChargingScheduleType20Converter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a ChargingScheduleType20 to a JSON representation */ -bool ChargingScheduleType20Converter::toJson(const ChargingScheduleType20& data, rapidjson::Document& json) +/** @brief Convert a ChargingScheduleType to a JSON representation */ +bool ChargingScheduleTypeConverter::toJson(const ChargingScheduleType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -115,14 +115,14 @@ bool ChargingScheduleType20Converter::toJson(const ChargingScheduleType20& data, fill(json, "duration", data.duration); // chargingRateUnit - fill(json, "chargingRateUnit", ChargingRateUnitEnumType20Helper.toString(data.chargingRateUnit)); + fill(json, "chargingRateUnit", ChargingRateUnitEnumTypeHelper.toString(data.chargingRateUnit)); // chargingSchedulePeriod - rapidjson::Value chargingSchedulePeriod_json(rapidjson::kArrayType); - ChargingSchedulePeriodType20Converter chargingSchedulePeriod_converter; + rapidjson::Value chargingSchedulePeriod_json(rapidjson::kArrayType); + ChargingSchedulePeriodTypeConverter chargingSchedulePeriod_converter; chargingSchedulePeriod_converter.setAllocator(allocator); - for (const ChargingSchedulePeriodType20& item : data.chargingSchedulePeriod) + for (const ChargingSchedulePeriodType& item : data.chargingSchedulePeriod) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -137,7 +137,7 @@ bool ChargingScheduleType20Converter::toJson(const ChargingScheduleType20& data, // salesTariff if (data.salesTariff.isSet()) { - SalesTariffType20Converter salesTariff_converter; + SalesTariffTypeConverter salesTariff_converter; salesTariff_converter.setAllocator(allocator); rapidjson::Document salesTariff_doc; salesTariff_doc.Parse("{}"); diff --git a/src/ocpp20/types/ChargingScheduleType20.h b/src/ocpp20/types/ChargingScheduleType20.h index d1ef96a8..f4309c4f 100644 --- a/src/ocpp20/types/ChargingScheduleType20.h +++ b/src/ocpp20/types/ChargingScheduleType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGSCHEDULETYPE20_H -#define OPENOCPP_CHARGINGSCHEDULETYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGSCHEDULETYPE_H +#define OPENOCPP_OCPP20_CHARGINGSCHEDULETYPE_H #include "ChargingRateUnitEnumType20.h" #include "ChargingSchedulePeriodType20.h" @@ -45,10 +45,10 @@ namespace ocpp20 urn:x-oca:ocpp:uid:2:233256 Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile. */ -struct ChargingScheduleType20 +struct ChargingScheduleType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Identifies the ChargingSchedule. */ int id; /** @brief Charging_ Schedule. Start_ Schedule. Date_ Time @@ -60,36 +60,36 @@ urn:x-oca:ocpp:uid:1:569236 Duration of the charging schedule in seconds. If the duration is left empty, the last period will continue indefinitely or until end of the transaction if chargingProfilePurpose = TxProfile. */ ocpp::types::Optional duration; /** @brief */ - ChargingRateUnitEnumType20 chargingRateUnit; + ChargingRateUnitEnumType chargingRateUnit; /** @brief */ - std::vector chargingSchedulePeriod; + std::vector chargingSchedulePeriod; /** @brief Charging_ Schedule. Min_ Charging_ Rate. Numeric urn:x-oca:ocpp:uid:1:569239 Minimum charging rate supported by the EV. The unit of measure is defined by the chargingRateUnit. This parameter is intended to be used by a local smart charging algorithm to optimize the power allocation for in the case a charging process is inefficient at lower charging rates. Accepts at most one digit fraction (e.g. 8.1) */ ocpp::types::Optional minChargingRate; /** @brief */ - ocpp::types::Optional salesTariff; + ocpp::types::Optional salesTariff; }; -/** @brief Converter class for ChargingScheduleType20 type */ -class ChargingScheduleType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ChargingScheduleType type */ +class ChargingScheduleTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new ChargingScheduleType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new ChargingScheduleTypeConverter(); } - /** @brief Convert a ChargingScheduleType20 from a JSON representation */ + /** @brief Convert a ChargingScheduleType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ChargingScheduleType20& data, + ChargingScheduleType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ChargingScheduleType20 to a JSON representation */ - bool toJson(const ChargingScheduleType20& data, rapidjson::Document& json) override; + /** @brief Convert a ChargingScheduleType to a JSON representation */ + bool toJson(const ChargingScheduleType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGSCHEDULETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGSCHEDULETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingStateEnumType20.cpp b/src/ocpp20/types/ChargingStateEnumType20.cpp index e2c9ee35..fe96af73 100644 --- a/src/ocpp20/types/ChargingStateEnumType20.cpp +++ b/src/ocpp20/types/ChargingStateEnumType20.cpp @@ -30,13 +30,13 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ChargingStateEnumType20 enum to string */ -const EnumToStringFromString ChargingStateEnumType20Helper = { - {ChargingStateEnumType20::Charging, "Charging"}, - {ChargingStateEnumType20::EVConnected, "EVConnected"}, - {ChargingStateEnumType20::SuspendedEV, "SuspendedEV"}, - {ChargingStateEnumType20::SuspendedEVSE, "SuspendedEVSE"}, - {ChargingStateEnumType20::Idle, "Idle"}, +/** @brief Helper to convert a ChargingStateEnumType enum to string */ +const EnumToStringFromString ChargingStateEnumTypeHelper = { + {ChargingStateEnumType::Charging, "Charging"}, + {ChargingStateEnumType::EVConnected, "EVConnected"}, + {ChargingStateEnumType::SuspendedEV, "SuspendedEV"}, + {ChargingStateEnumType::SuspendedEVSE, "SuspendedEVSE"}, + {ChargingStateEnumType::Idle, "Idle"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ChargingStateEnumType20.h b/src/ocpp20/types/ChargingStateEnumType20.h index a796d5cd..6e1656d5 100644 --- a/src/ocpp20/types/ChargingStateEnumType20.h +++ b/src/ocpp20/types/ChargingStateEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGSTATEENUMTYPE20_H -#define OPENOCPP_CHARGINGSTATEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGSTATEENUMTYPE_H +#define OPENOCPP_OCPP20_CHARGINGSTATEENUMTYPE_H #include "EnumToStringFromString.h" @@ -37,7 +37,7 @@ namespace ocpp20 urn:x-oca:ocpp:uid:1:569419 Current charging state, is required when state has changed. */ -enum class ChargingStateEnumType20 +enum class ChargingStateEnumType { Charging, EVConnected, @@ -46,11 +46,11 @@ enum class ChargingStateEnumType20 Idle, }; -/** @brief Helper to convert a ChargingStateEnumType20 enum to string */ -extern const EnumToStringFromString ChargingStateEnumType20Helper; +/** @brief Helper to convert a ChargingStateEnumType enum to string */ +extern const EnumToStringFromString ChargingStateEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGSTATEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGSTATEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ChargingStationType20.cpp b/src/ocpp20/types/ChargingStationType20.cpp index f0dc9335..5628f5d1 100644 --- a/src/ocpp20/types/ChargingStationType20.cpp +++ b/src/ocpp20/types/ChargingStationType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a ChargingStationType20 from a JSON representation */ -bool ChargingStationType20Converter::fromJson(const rapidjson::Value& json, - ChargingStationType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ChargingStationType from a JSON representation */ +bool ChargingStationTypeConverter::fromJson(const rapidjson::Value& json, + ChargingStationType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -56,7 +56,7 @@ bool ChargingStationType20Converter::fromJson(const rapidjson::Value& json // modem if (json.HasMember("modem")) { - ModemType20Converter modem_converter; + ModemTypeConverter modem_converter; ret = ret && modem_converter.fromJson(json["modem"], data.modem, error_code, error_message); } @@ -74,15 +74,15 @@ bool ChargingStationType20Converter::fromJson(const rapidjson::Value& json return ret; } -/** @brief Convert a ChargingStationType20 to a JSON representation */ -bool ChargingStationType20Converter::toJson(const ChargingStationType20& data, rapidjson::Document& json) +/** @brief Convert a ChargingStationType to a JSON representation */ +bool ChargingStationTypeConverter::toJson(const ChargingStationType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -99,7 +99,7 @@ bool ChargingStationType20Converter::toJson(const ChargingStationType20& data, r // modem if (data.modem.isSet()) { - ModemType20Converter modem_converter; + ModemTypeConverter modem_converter; modem_converter.setAllocator(allocator); rapidjson::Document modem_doc; modem_doc.Parse("{}"); diff --git a/src/ocpp20/types/ChargingStationType20.h b/src/ocpp20/types/ChargingStationType20.h index 76e920d9..fb955464 100644 --- a/src/ocpp20/types/ChargingStationType20.h +++ b/src/ocpp20/types/ChargingStationType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CHARGINGSTATIONTYPE20_H -#define OPENOCPP_CHARGINGSTATIONTYPE20_H +#ifndef OPENOCPP_OCPP20_CHARGINGSTATIONTYPE_H +#define OPENOCPP_OCPP20_CHARGINGSTATIONTYPE_H #include "CustomDataType20.h" #include "ModemType20.h" @@ -42,10 +42,10 @@ namespace ocpp20 urn:x-oca:ocpp:uid:2:233122 The physical system where an Electrical Vehicle (EV) can be charged. */ -struct ChargingStationType20 +struct ChargingStationType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Device. Serial_ Number. Serial_ Number urn:x-oca:ocpp:uid:1:569324 Vendor-specific device identifier. */ @@ -55,32 +55,32 @@ urn:x-oca:ocpp:uid:1:569325 Defines the model of the device. */ ocpp::types::CiStringType<20u> model; /** @brief */ - ocpp::types::Optional modem; + ocpp::types::Optional modem; /** @brief Identifies the vendor (not necessarily in a unique manner). */ ocpp::types::CiStringType<50u> vendorName; /** @brief This contains the firmware version of the Charging Station. */ ocpp::types::Optional> firmwareVersion; }; -/** @brief Converter class for ChargingStationType20 type */ -class ChargingStationType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ChargingStationType type */ +class ChargingStationTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new ChargingStationType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new ChargingStationTypeConverter(); } - /** @brief Convert a ChargingStationType20 from a JSON representation */ + /** @brief Convert a ChargingStationType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ChargingStationType20& data, + ChargingStationType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ChargingStationType20 to a JSON representation */ - bool toJson(const ChargingStationType20& data, rapidjson::Document& json) override; + /** @brief Convert a ChargingStationType to a JSON representation */ + bool toJson(const ChargingStationType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CHARGINGSTATIONTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CHARGINGSTATIONTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ClearCacheStatusEnumType20.cpp b/src/ocpp20/types/ClearCacheStatusEnumType20.cpp index 6f682f60..4485a4db 100644 --- a/src/ocpp20/types/ClearCacheStatusEnumType20.cpp +++ b/src/ocpp20/types/ClearCacheStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ClearCacheStatusEnumType20 enum to string */ -const EnumToStringFromString ClearCacheStatusEnumType20Helper = { - {ClearCacheStatusEnumType20::Accepted, "Accepted"}, - {ClearCacheStatusEnumType20::Rejected, "Rejected"}, +/** @brief Helper to convert a ClearCacheStatusEnumType enum to string */ +const EnumToStringFromString ClearCacheStatusEnumTypeHelper = { + {ClearCacheStatusEnumType::Accepted, "Accepted"}, + {ClearCacheStatusEnumType::Rejected, "Rejected"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ClearCacheStatusEnumType20.h b/src/ocpp20/types/ClearCacheStatusEnumType20.h index c3ffa603..eadf8c6a 100644 --- a/src/ocpp20/types/ClearCacheStatusEnumType20.h +++ b/src/ocpp20/types/ClearCacheStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CLEARCACHESTATUSENUMTYPE20_H -#define OPENOCPP_CLEARCACHESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CLEARCACHESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_CLEARCACHESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief Accepted if the Charging Station has executed the request, otherwise rejected. */ -enum class ClearCacheStatusEnumType20 +enum class ClearCacheStatusEnumType { Accepted, Rejected, }; -/** @brief Helper to convert a ClearCacheStatusEnumType20 enum to string */ -extern const EnumToStringFromString ClearCacheStatusEnumType20Helper; +/** @brief Helper to convert a ClearCacheStatusEnumType enum to string */ +extern const EnumToStringFromString ClearCacheStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CLEARCACHESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CLEARCACHESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ClearChargingProfileStatusEnumType20.cpp b/src/ocpp20/types/ClearChargingProfileStatusEnumType20.cpp index 408d13f0..c49c9ec4 100644 --- a/src/ocpp20/types/ClearChargingProfileStatusEnumType20.cpp +++ b/src/ocpp20/types/ClearChargingProfileStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ClearChargingProfileStatusEnumType20 enum to string */ -const EnumToStringFromString ClearChargingProfileStatusEnumType20Helper = { - {ClearChargingProfileStatusEnumType20::Accepted, "Accepted"}, - {ClearChargingProfileStatusEnumType20::Unknown, "Unknown"}, +/** @brief Helper to convert a ClearChargingProfileStatusEnumType enum to string */ +const EnumToStringFromString ClearChargingProfileStatusEnumTypeHelper = { + {ClearChargingProfileStatusEnumType::Accepted, "Accepted"}, + {ClearChargingProfileStatusEnumType::Unknown, "Unknown"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ClearChargingProfileStatusEnumType20.h b/src/ocpp20/types/ClearChargingProfileStatusEnumType20.h index 36ec377e..1283accf 100644 --- a/src/ocpp20/types/ClearChargingProfileStatusEnumType20.h +++ b/src/ocpp20/types/ClearChargingProfileStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CLEARCHARGINGPROFILESTATUSENUMTYPE20_H -#define OPENOCPP_CLEARCHARGINGPROFILESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CLEARCHARGINGPROFILESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_CLEARCHARGINGPROFILESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief Indicates if the Charging Station was able to execute the request. */ -enum class ClearChargingProfileStatusEnumType20 +enum class ClearChargingProfileStatusEnumType { Accepted, Unknown, }; -/** @brief Helper to convert a ClearChargingProfileStatusEnumType20 enum to string */ -extern const EnumToStringFromString ClearChargingProfileStatusEnumType20Helper; +/** @brief Helper to convert a ClearChargingProfileStatusEnumType enum to string */ +extern const EnumToStringFromString ClearChargingProfileStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CLEARCHARGINGPROFILESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CLEARCHARGINGPROFILESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ClearChargingProfileType20.cpp b/src/ocpp20/types/ClearChargingProfileType20.cpp index d6ff6767..5ad27b36 100644 --- a/src/ocpp20/types/ClearChargingProfileType20.cpp +++ b/src/ocpp20/types/ClearChargingProfileType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a ClearChargingProfileType20 from a JSON representation */ -bool ClearChargingProfileType20Converter::fromJson(const rapidjson::Value& json, - ClearChargingProfileType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ClearChargingProfileType from a JSON representation */ +bool ClearChargingProfileTypeConverter::fromJson(const rapidjson::Value& json, + ClearChargingProfileType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -53,7 +53,7 @@ bool ClearChargingProfileType20Converter::fromJson(const rapidjson::Value& // chargingProfilePurpose if (json.HasMember("chargingProfilePurpose")) { - data.chargingProfilePurpose = ChargingProfilePurposeEnumType20Helper.fromString(json["chargingProfilePurpose"].GetString()); + data.chargingProfilePurpose = ChargingProfilePurposeEnumTypeHelper.fromString(json["chargingProfilePurpose"].GetString()); } // stackLevel @@ -67,15 +67,15 @@ bool ClearChargingProfileType20Converter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a ClearChargingProfileType20 to a JSON representation */ -bool ClearChargingProfileType20Converter::toJson(const ClearChargingProfileType20& data, rapidjson::Document& json) +/** @brief Convert a ClearChargingProfileType to a JSON representation */ +bool ClearChargingProfileTypeConverter::toJson(const ClearChargingProfileType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -89,7 +89,7 @@ bool ClearChargingProfileType20Converter::toJson(const ClearChargingProfileType2 // chargingProfilePurpose if (data.chargingProfilePurpose.isSet()) { - fill(json, "chargingProfilePurpose", ChargingProfilePurposeEnumType20Helper.toString(data.chargingProfilePurpose)); + fill(json, "chargingProfilePurpose", ChargingProfilePurposeEnumTypeHelper.toString(data.chargingProfilePurpose)); } // stackLevel diff --git a/src/ocpp20/types/ClearChargingProfileType20.h b/src/ocpp20/types/ClearChargingProfileType20.h index c9d7e6fe..a9e331fc 100644 --- a/src/ocpp20/types/ClearChargingProfileType20.h +++ b/src/ocpp20/types/ClearChargingProfileType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CLEARCHARGINGPROFILETYPE20_H -#define OPENOCPP_CLEARCHARGINGPROFILETYPE20_H +#ifndef OPENOCPP_OCPP20_CLEARCHARGINGPROFILETYPE_H +#define OPENOCPP_OCPP20_CLEARCHARGINGPROFILETYPE_H #include "ChargingProfilePurposeEnumType20.h" #include "CustomDataType20.h" @@ -41,44 +41,41 @@ namespace ocpp20 urn:x-oca:ocpp:uid:2:233255 A ChargingProfile consists of a ChargingSchedule, describing the amount of power or current that can be delivered per time interval. */ -struct ClearChargingProfileType20 +struct ClearChargingProfileType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Identified_ Object. MRID. Numeric_ Identifier urn:x-enexis:ecdm:uid:1:569198 Specifies the id of the EVSE for which to clear charging profiles. An evseId of zero (0) specifies the charging profile for the overall Charging Station. Absence of this parameter means the clearing applies to all charging profiles that match the other criteria in the request. */ ocpp::types::Optional evseId; /** @brief */ - ocpp::types::Optional chargingProfilePurpose; + ocpp::types::Optional chargingProfilePurpose; /** @brief Charging_ Profile. Stack_ Level. Counter urn:x-oca:ocpp:uid:1:569230 Specifies the stackLevel for which charging profiles will be cleared, if they meet the other criteria in the request. */ ocpp::types::Optional stackLevel; }; -/** @brief Converter class for ClearChargingProfileType20 type */ -class ClearChargingProfileType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ClearChargingProfileType type */ +class ClearChargingProfileTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override - { - return new ClearChargingProfileType20Converter(); - } + ocpp::messages::IMessageConverter* clone() const override { return new ClearChargingProfileTypeConverter(); } - /** @brief Convert a ClearChargingProfileType20 from a JSON representation */ + /** @brief Convert a ClearChargingProfileType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ClearChargingProfileType20& data, + ClearChargingProfileType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ClearChargingProfileType20 to a JSON representation */ - bool toJson(const ClearChargingProfileType20& data, rapidjson::Document& json) override; + /** @brief Convert a ClearChargingProfileType to a JSON representation */ + bool toJson(const ClearChargingProfileType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CLEARCHARGINGPROFILETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CLEARCHARGINGPROFILETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ClearMessageStatusEnumType20.cpp b/src/ocpp20/types/ClearMessageStatusEnumType20.cpp index cb2b1331..2df64cdc 100644 --- a/src/ocpp20/types/ClearMessageStatusEnumType20.cpp +++ b/src/ocpp20/types/ClearMessageStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ClearMessageStatusEnumType20 enum to string */ -const EnumToStringFromString ClearMessageStatusEnumType20Helper = { - {ClearMessageStatusEnumType20::Accepted, "Accepted"}, - {ClearMessageStatusEnumType20::Unknown, "Unknown"}, +/** @brief Helper to convert a ClearMessageStatusEnumType enum to string */ +const EnumToStringFromString ClearMessageStatusEnumTypeHelper = { + {ClearMessageStatusEnumType::Accepted, "Accepted"}, + {ClearMessageStatusEnumType::Unknown, "Unknown"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ClearMessageStatusEnumType20.h b/src/ocpp20/types/ClearMessageStatusEnumType20.h index 21054e71..d59599db 100644 --- a/src/ocpp20/types/ClearMessageStatusEnumType20.h +++ b/src/ocpp20/types/ClearMessageStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CLEARMESSAGESTATUSENUMTYPE20_H -#define OPENOCPP_CLEARMESSAGESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CLEARMESSAGESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_CLEARMESSAGESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief Returns whether the Charging Station has been able to remove the message. */ -enum class ClearMessageStatusEnumType20 +enum class ClearMessageStatusEnumType { Accepted, Unknown, }; -/** @brief Helper to convert a ClearMessageStatusEnumType20 enum to string */ -extern const EnumToStringFromString ClearMessageStatusEnumType20Helper; +/** @brief Helper to convert a ClearMessageStatusEnumType enum to string */ +extern const EnumToStringFromString ClearMessageStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CLEARMESSAGESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CLEARMESSAGESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ClearMonitoringResultType20.cpp b/src/ocpp20/types/ClearMonitoringResultType20.cpp index de8c4522..8ca058dd 100644 --- a/src/ocpp20/types/ClearMonitoringResultType20.cpp +++ b/src/ocpp20/types/ClearMonitoringResultType20.cpp @@ -32,23 +32,23 @@ namespace types namespace ocpp20 { -/** @brief Convert a ClearMonitoringResultType20 from a JSON representation */ -bool ClearMonitoringResultType20Converter::fromJson(const rapidjson::Value& json, - ClearMonitoringResultType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ClearMonitoringResultType from a JSON representation */ +bool ClearMonitoringResultTypeConverter::fromJson(const rapidjson::Value& json, + ClearMonitoringResultType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = ClearMonitoringStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = ClearMonitoringStatusEnumTypeHelper.fromString(json["status"].GetString()); // id extract(json, "id", data.id); @@ -56,7 +56,7 @@ bool ClearMonitoringResultType20Converter::fromJson(const rapidjson::Value& // statusInfo if (json.HasMember("statusInfo")) { - StatusInfoType20Converter statusInfo_converter; + StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } @@ -68,15 +68,15 @@ bool ClearMonitoringResultType20Converter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a ClearMonitoringResultType20 to a JSON representation */ -bool ClearMonitoringResultType20Converter::toJson(const ClearMonitoringResultType20& data, rapidjson::Document& json) +/** @brief Convert a ClearMonitoringResultType to a JSON representation */ +bool ClearMonitoringResultTypeConverter::toJson(const ClearMonitoringResultType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -85,7 +85,7 @@ bool ClearMonitoringResultType20Converter::toJson(const ClearMonitoringResultTyp } // status - fill(json, "status", ClearMonitoringStatusEnumType20Helper.toString(data.status)); + fill(json, "status", ClearMonitoringStatusEnumTypeHelper.toString(data.status)); // id fill(json, "id", data.id); @@ -93,7 +93,7 @@ bool ClearMonitoringResultType20Converter::toJson(const ClearMonitoringResultTyp // statusInfo if (data.statusInfo.isSet()) { - StatusInfoType20Converter statusInfo_converter; + StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); diff --git a/src/ocpp20/types/ClearMonitoringResultType20.h b/src/ocpp20/types/ClearMonitoringResultType20.h index 6b01e969..889e3f27 100644 --- a/src/ocpp20/types/ClearMonitoringResultType20.h +++ b/src/ocpp20/types/ClearMonitoringResultType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CLEARMONITORINGRESULTTYPE20_H -#define OPENOCPP_CLEARMONITORINGRESULTTYPE20_H +#ifndef OPENOCPP_OCPP20_CLEARMONITORINGRESULTTYPE_H +#define OPENOCPP_OCPP20_CLEARMONITORINGRESULTTYPE_H #include "ClearMonitoringStatusEnumType20.h" #include "CustomDataType20.h" @@ -39,40 +39,40 @@ namespace ocpp20 { /** @brief */ -struct ClearMonitoringResultType20 +struct ClearMonitoringResultType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ClearMonitoringStatusEnumType20 status; + ClearMonitoringStatusEnumType status; /** @brief Id of the monitor of which a clear was requested. */ int id; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; }; -/** @brief Converter class for ClearMonitoringResultType20 type */ -class ClearMonitoringResultType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ClearMonitoringResultType type */ +class ClearMonitoringResultTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override + ocpp::messages::IMessageConverter* clone() const override { - return new ClearMonitoringResultType20Converter(); + return new ClearMonitoringResultTypeConverter(); } - /** @brief Convert a ClearMonitoringResultType20 from a JSON representation */ + /** @brief Convert a ClearMonitoringResultType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ClearMonitoringResultType20& data, + ClearMonitoringResultType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ClearMonitoringResultType20 to a JSON representation */ - bool toJson(const ClearMonitoringResultType20& data, rapidjson::Document& json) override; + /** @brief Convert a ClearMonitoringResultType to a JSON representation */ + bool toJson(const ClearMonitoringResultType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CLEARMONITORINGRESULTTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CLEARMONITORINGRESULTTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ClearMonitoringStatusEnumType20.cpp b/src/ocpp20/types/ClearMonitoringStatusEnumType20.cpp index f0c1856e..de2d4466 100644 --- a/src/ocpp20/types/ClearMonitoringStatusEnumType20.cpp +++ b/src/ocpp20/types/ClearMonitoringStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ClearMonitoringStatusEnumType20 enum to string */ -const EnumToStringFromString ClearMonitoringStatusEnumType20Helper = { - {ClearMonitoringStatusEnumType20::Accepted, "Accepted"}, - {ClearMonitoringStatusEnumType20::Rejected, "Rejected"}, - {ClearMonitoringStatusEnumType20::NotFound, "NotFound"}, +/** @brief Helper to convert a ClearMonitoringStatusEnumType enum to string */ +const EnumToStringFromString ClearMonitoringStatusEnumTypeHelper = { + {ClearMonitoringStatusEnumType::Accepted, "Accepted"}, + {ClearMonitoringStatusEnumType::Rejected, "Rejected"}, + {ClearMonitoringStatusEnumType::NotFound, "NotFound"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ClearMonitoringStatusEnumType20.h b/src/ocpp20/types/ClearMonitoringStatusEnumType20.h index b91e3324..0e7fb099 100644 --- a/src/ocpp20/types/ClearMonitoringStatusEnumType20.h +++ b/src/ocpp20/types/ClearMonitoringStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CLEARMONITORINGSTATUSENUMTYPE20_H -#define OPENOCPP_CLEARMONITORINGSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CLEARMONITORINGSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_CLEARMONITORINGSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief Result of the clear request for this monitor, identified by its Id. */ -enum class ClearMonitoringStatusEnumType20 +enum class ClearMonitoringStatusEnumType { Accepted, Rejected, NotFound, }; -/** @brief Helper to convert a ClearMonitoringStatusEnumType20 enum to string */ -extern const EnumToStringFromString ClearMonitoringStatusEnumType20Helper; +/** @brief Helper to convert a ClearMonitoringStatusEnumType enum to string */ +extern const EnumToStringFromString ClearMonitoringStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CLEARMONITORINGSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CLEARMONITORINGSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ComponentCriterionEnumType20.cpp b/src/ocpp20/types/ComponentCriterionEnumType20.cpp index 15b46175..e9f8af44 100644 --- a/src/ocpp20/types/ComponentCriterionEnumType20.cpp +++ b/src/ocpp20/types/ComponentCriterionEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ComponentCriterionEnumType20 enum to string */ -const EnumToStringFromString ComponentCriterionEnumType20Helper = { - {ComponentCriterionEnumType20::Active, "Active"}, - {ComponentCriterionEnumType20::Available, "Available"}, - {ComponentCriterionEnumType20::Enabled, "Enabled"}, - {ComponentCriterionEnumType20::Problem, "Problem"}, +/** @brief Helper to convert a ComponentCriterionEnumType enum to string */ +const EnumToStringFromString ComponentCriterionEnumTypeHelper = { + {ComponentCriterionEnumType::Active, "Active"}, + {ComponentCriterionEnumType::Available, "Available"}, + {ComponentCriterionEnumType::Enabled, "Enabled"}, + {ComponentCriterionEnumType::Problem, "Problem"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ComponentCriterionEnumType20.h b/src/ocpp20/types/ComponentCriterionEnumType20.h index c40df92b..e72f0871 100644 --- a/src/ocpp20/types/ComponentCriterionEnumType20.h +++ b/src/ocpp20/types/ComponentCriterionEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_COMPONENTCRITERIONENUMTYPE20_H -#define OPENOCPP_COMPONENTCRITERIONENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_COMPONENTCRITERIONENUMTYPE_H +#define OPENOCPP_OCPP20_COMPONENTCRITERIONENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief */ -enum class ComponentCriterionEnumType20 +enum class ComponentCriterionEnumType { Active, Available, @@ -42,11 +42,11 @@ enum class ComponentCriterionEnumType20 Problem, }; -/** @brief Helper to convert a ComponentCriterionEnumType20 enum to string */ -extern const EnumToStringFromString ComponentCriterionEnumType20Helper; +/** @brief Helper to convert a ComponentCriterionEnumType enum to string */ +extern const EnumToStringFromString ComponentCriterionEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_COMPONENTCRITERIONENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_COMPONENTCRITERIONENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ComponentType20.cpp b/src/ocpp20/types/ComponentType20.cpp index d39a7ac4..cdbec199 100644 --- a/src/ocpp20/types/ComponentType20.cpp +++ b/src/ocpp20/types/ComponentType20.cpp @@ -32,25 +32,25 @@ namespace types namespace ocpp20 { -/** @brief Convert a ComponentType20 from a JSON representation */ -bool ComponentType20Converter::fromJson(const rapidjson::Value& json, - ComponentType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ComponentType from a JSON representation */ +bool ComponentTypeConverter::fromJson(const rapidjson::Value& json, + ComponentType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // evse if (json.HasMember("evse")) { - EVSEType20Converter evse_converter; + EVSETypeConverter evse_converter; ret = ret && evse_converter.fromJson(json["evse"], data.evse, error_code, error_message); } @@ -68,15 +68,15 @@ bool ComponentType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a ComponentType20 to a JSON representation */ -bool ComponentType20Converter::toJson(const ComponentType20& data, rapidjson::Document& json) +/** @brief Convert a ComponentType to a JSON representation */ +bool ComponentTypeConverter::toJson(const ComponentType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -87,7 +87,7 @@ bool ComponentType20Converter::toJson(const ComponentType20& data, rapidjson::Do // evse if (data.evse.isSet()) { - EVSEType20Converter evse_converter; + EVSETypeConverter evse_converter; evse_converter.setAllocator(allocator); rapidjson::Document evse_doc; evse_doc.Parse("{}"); diff --git a/src/ocpp20/types/ComponentType20.h b/src/ocpp20/types/ComponentType20.h index 7686976a..ab9d88dc 100644 --- a/src/ocpp20/types/ComponentType20.h +++ b/src/ocpp20/types/ComponentType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_COMPONENTTYPE20_H -#define OPENOCPP_COMPONENTTYPE20_H +#ifndef OPENOCPP_OCPP20_COMPONENTTYPE_H +#define OPENOCPP_OCPP20_COMPONENTTYPE_H #include "CustomDataType20.h" #include "EVSEType20.h" @@ -40,37 +40,37 @@ namespace ocpp20 /** @brief A physical or logical component */ -struct ComponentType20 +struct ComponentType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional evse; + ocpp::types::Optional evse; /** @brief Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. */ ocpp::types::CiStringType<50u> name; /** @brief Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. */ ocpp::types::Optional> instance; }; -/** @brief Converter class for ComponentType20 type */ -class ComponentType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ComponentType type */ +class ComponentTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new ComponentType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new ComponentTypeConverter(); } - /** @brief Convert a ComponentType20 from a JSON representation */ + /** @brief Convert a ComponentType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ComponentType20& data, + ComponentType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ComponentType20 to a JSON representation */ - bool toJson(const ComponentType20& data, rapidjson::Document& json) override; + /** @brief Convert a ComponentType to a JSON representation */ + bool toJson(const ComponentType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_COMPONENTTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_COMPONENTTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ComponentVariableType20.cpp b/src/ocpp20/types/ComponentVariableType20.cpp index f074f72b..2ef8d88c 100644 --- a/src/ocpp20/types/ComponentVariableType20.cpp +++ b/src/ocpp20/types/ComponentVariableType20.cpp @@ -32,29 +32,29 @@ namespace types namespace ocpp20 { -/** @brief Convert a ComponentVariableType20 from a JSON representation */ -bool ComponentVariableType20Converter::fromJson(const rapidjson::Value& json, - ComponentVariableType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ComponentVariableType from a JSON representation */ +bool ComponentVariableTypeConverter::fromJson(const rapidjson::Value& json, + ComponentVariableType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; ret = ret && component_converter.fromJson(json["component"], data.component, error_code, error_message); // variable if (json.HasMember("variable")) { - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; ret = ret && variable_converter.fromJson(json["variable"], data.variable, error_code, error_message); } @@ -66,15 +66,15 @@ bool ComponentVariableType20Converter::fromJson(const rapidjson::Value& js return ret; } -/** @brief Convert a ComponentVariableType20 to a JSON representation */ -bool ComponentVariableType20Converter::toJson(const ComponentVariableType20& data, rapidjson::Document& json) +/** @brief Convert a ComponentVariableType to a JSON representation */ +bool ComponentVariableTypeConverter::toJson(const ComponentVariableType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -83,7 +83,7 @@ bool ComponentVariableType20Converter::toJson(const ComponentVariableType20& dat } // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; component_converter.setAllocator(allocator); rapidjson::Document component_doc; component_doc.Parse("{}"); @@ -93,7 +93,7 @@ bool ComponentVariableType20Converter::toJson(const ComponentVariableType20& dat // variable if (data.variable.isSet()) { - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; variable_converter.setAllocator(allocator); rapidjson::Document variable_doc; variable_doc.Parse("{}"); diff --git a/src/ocpp20/types/ComponentVariableType20.h b/src/ocpp20/types/ComponentVariableType20.h index c2261bfe..36cbb995 100644 --- a/src/ocpp20/types/ComponentVariableType20.h +++ b/src/ocpp20/types/ComponentVariableType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_COMPONENTVARIABLETYPE20_H -#define OPENOCPP_COMPONENTVARIABLETYPE20_H +#ifndef OPENOCPP_OCPP20_COMPONENTVARIABLETYPE_H +#define OPENOCPP_OCPP20_COMPONENTVARIABLETYPE_H #include "ComponentType20.h" #include "CustomDataType20.h" @@ -40,35 +40,35 @@ namespace ocpp20 /** @brief Class to report components, variables and variable attributes and characteristics. */ -struct ComponentVariableType20 +struct ComponentVariableType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ComponentType20 component; + ComponentType component; /** @brief */ - ocpp::types::Optional variable; + ocpp::types::Optional variable; }; -/** @brief Converter class for ComponentVariableType20 type */ -class ComponentVariableType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ComponentVariableType type */ +class ComponentVariableTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new ComponentVariableType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new ComponentVariableTypeConverter(); } - /** @brief Convert a ComponentVariableType20 from a JSON representation */ + /** @brief Convert a ComponentVariableType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ComponentVariableType20& data, + ComponentVariableType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ComponentVariableType20 to a JSON representation */ - bool toJson(const ComponentVariableType20& data, rapidjson::Document& json) override; + /** @brief Convert a ComponentVariableType to a JSON representation */ + bool toJson(const ComponentVariableType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_COMPONENTVARIABLETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_COMPONENTVARIABLETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/CompositeScheduleType20.cpp b/src/ocpp20/types/CompositeScheduleType20.cpp index 0693f2e9..517aad00 100644 --- a/src/ocpp20/types/CompositeScheduleType20.cpp +++ b/src/ocpp20/types/CompositeScheduleType20.cpp @@ -32,30 +32,30 @@ namespace types namespace ocpp20 { -/** @brief Convert a CompositeScheduleType20 from a JSON representation */ -bool CompositeScheduleType20Converter::fromJson(const rapidjson::Value& json, - CompositeScheduleType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a CompositeScheduleType from a JSON representation */ +bool CompositeScheduleTypeConverter::fromJson(const rapidjson::Value& json, + CompositeScheduleType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // chargingSchedulePeriod if (json.HasMember("chargingSchedulePeriod")) { - const rapidjson::Value& chargingSchedulePeriod_json = json["chargingSchedulePeriod"]; - ChargingSchedulePeriodType20Converter chargingSchedulePeriod_converter; + const rapidjson::Value& chargingSchedulePeriod_json = json["chargingSchedulePeriod"]; + ChargingSchedulePeriodTypeConverter chargingSchedulePeriod_converter; for (auto it = chargingSchedulePeriod_json.Begin(); ret && (it != chargingSchedulePeriod_json.End()); ++it) { - ChargingSchedulePeriodType20& item = data.chargingSchedulePeriod.emplace_back(); - ret = ret && chargingSchedulePeriod_converter.fromJson(*it, item, error_code, error_message); + ChargingSchedulePeriodType& item = data.chargingSchedulePeriod.emplace_back(); + ret = ret && chargingSchedulePeriod_converter.fromJson(*it, item, error_code, error_message); } } @@ -69,7 +69,7 @@ bool CompositeScheduleType20Converter::fromJson(const rapidjson::Value& js ret = ret && extract(json, "scheduleStart", data.scheduleStart, error_message); // chargingRateUnit - data.chargingRateUnit = ChargingRateUnitEnumType20Helper.fromString(json["chargingRateUnit"].GetString()); + data.chargingRateUnit = ChargingRateUnitEnumTypeHelper.fromString(json["chargingRateUnit"].GetString()); if (!ret) { @@ -79,15 +79,15 @@ bool CompositeScheduleType20Converter::fromJson(const rapidjson::Value& js return ret; } -/** @brief Convert a CompositeScheduleType20 to a JSON representation */ -bool CompositeScheduleType20Converter::toJson(const CompositeScheduleType20& data, rapidjson::Document& json) +/** @brief Convert a CompositeScheduleType to a JSON representation */ +bool CompositeScheduleTypeConverter::toJson(const CompositeScheduleType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -97,10 +97,10 @@ bool CompositeScheduleType20Converter::toJson(const CompositeScheduleType20& dat // chargingSchedulePeriod - rapidjson::Value chargingSchedulePeriod_json(rapidjson::kArrayType); - ChargingSchedulePeriodType20Converter chargingSchedulePeriod_converter; + rapidjson::Value chargingSchedulePeriod_json(rapidjson::kArrayType); + ChargingSchedulePeriodTypeConverter chargingSchedulePeriod_converter; chargingSchedulePeriod_converter.setAllocator(allocator); - for (const ChargingSchedulePeriodType20& item : data.chargingSchedulePeriod) + for (const ChargingSchedulePeriodType& item : data.chargingSchedulePeriod) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -119,7 +119,7 @@ bool CompositeScheduleType20Converter::toJson(const CompositeScheduleType20& dat fill(json, "scheduleStart", data.scheduleStart); // chargingRateUnit - fill(json, "chargingRateUnit", ChargingRateUnitEnumType20Helper.toString(data.chargingRateUnit)); + fill(json, "chargingRateUnit", ChargingRateUnitEnumTypeHelper.toString(data.chargingRateUnit)); return ret; } diff --git a/src/ocpp20/types/CompositeScheduleType20.h b/src/ocpp20/types/CompositeScheduleType20.h index 3204baf6..421496f2 100644 --- a/src/ocpp20/types/CompositeScheduleType20.h +++ b/src/ocpp20/types/CompositeScheduleType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_COMPOSITESCHEDULETYPE20_H -#define OPENOCPP_COMPOSITESCHEDULETYPE20_H +#ifndef OPENOCPP_OCPP20_COMPOSITESCHEDULETYPE_H +#define OPENOCPP_OCPP20_COMPOSITESCHEDULETYPE_H #include "ChargingRateUnitEnumType20.h" #include "ChargingSchedulePeriodType20.h" @@ -43,12 +43,12 @@ namespace ocpp20 /** @brief Composite_ Schedule urn:x-oca:ocpp:uid:2:233362 */ -struct CompositeScheduleType20 +struct CompositeScheduleType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector chargingSchedulePeriod; + std::vector chargingSchedulePeriod; /** @brief The ID of the EVSE for which the schedule is requested. When evseid=0, the Charging Station calculated the expected @@ -61,28 +61,28 @@ urn:x-oca:ocpp:uid:1:569456 Date and time at which the schedule becomes active. All time measurements within the schedule are relative to this timestamp. */ ocpp::types::DateTime scheduleStart; /** @brief */ - ChargingRateUnitEnumType20 chargingRateUnit; + ChargingRateUnitEnumType chargingRateUnit; }; -/** @brief Converter class for CompositeScheduleType20 type */ -class CompositeScheduleType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for CompositeScheduleType type */ +class CompositeScheduleTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new CompositeScheduleType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new CompositeScheduleTypeConverter(); } - /** @brief Convert a CompositeScheduleType20 from a JSON representation */ + /** @brief Convert a CompositeScheduleType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - CompositeScheduleType20& data, + CompositeScheduleType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a CompositeScheduleType20 to a JSON representation */ - bool toJson(const CompositeScheduleType20& data, rapidjson::Document& json) override; + /** @brief Convert a CompositeScheduleType to a JSON representation */ + bool toJson(const CompositeScheduleType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_COMPOSITESCHEDULETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_COMPOSITESCHEDULETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ConnectorEnumType20.cpp b/src/ocpp20/types/ConnectorEnumType20.cpp index d2b5bf6e..e09b87ae 100644 --- a/src/ocpp20/types/ConnectorEnumType20.cpp +++ b/src/ocpp20/types/ConnectorEnumType20.cpp @@ -30,30 +30,30 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ConnectorEnumType20 enum to string */ -const EnumToStringFromString ConnectorEnumType20Helper = { - {ConnectorEnumType20::cCCS1, "cCCS1"}, - {ConnectorEnumType20::cCCS2, "cCCS2"}, - {ConnectorEnumType20::cG105, "cG105"}, - {ConnectorEnumType20::cTesla, "cTesla"}, - {ConnectorEnumType20::cType1, "cType1"}, - {ConnectorEnumType20::cType2, "cType2"}, - {ConnectorEnumType20::s309_1P_16A, "s309-1P-16A"}, - {ConnectorEnumType20::s309_1P_32A, "s309-1P-32A"}, - {ConnectorEnumType20::s309_3P_16A, "s309-3P-16A"}, - {ConnectorEnumType20::s309_3P_32A, "s309-3P-32A"}, - {ConnectorEnumType20::sBS1361, "sBS1361"}, - {ConnectorEnumType20::sCEE_7_7, "sCEE-7-7"}, - {ConnectorEnumType20::sType2, "sType2"}, - {ConnectorEnumType20::sType3, "sType3"}, - {ConnectorEnumType20::Other1PhMax16A, "Other1PhMax16A"}, - {ConnectorEnumType20::Other1PhOver16A, "Other1PhOver16A"}, - {ConnectorEnumType20::Other3Ph, "Other3Ph"}, - {ConnectorEnumType20::Pan, "Pan"}, - {ConnectorEnumType20::wInductive, "wInductive"}, - {ConnectorEnumType20::wResonant, "wResonant"}, - {ConnectorEnumType20::Undetermined, "Undetermined"}, - {ConnectorEnumType20::Unknown, "Unknown"}, +/** @brief Helper to convert a ConnectorEnumType enum to string */ +const EnumToStringFromString ConnectorEnumTypeHelper = { + {ConnectorEnumType::cCCS1, "cCCS1"}, + {ConnectorEnumType::cCCS2, "cCCS2"}, + {ConnectorEnumType::cG105, "cG105"}, + {ConnectorEnumType::cTesla, "cTesla"}, + {ConnectorEnumType::cType1, "cType1"}, + {ConnectorEnumType::cType2, "cType2"}, + {ConnectorEnumType::s309_1P_16A, "s309-1P-16A"}, + {ConnectorEnumType::s309_1P_32A, "s309-1P-32A"}, + {ConnectorEnumType::s309_3P_16A, "s309-3P-16A"}, + {ConnectorEnumType::s309_3P_32A, "s309-3P-32A"}, + {ConnectorEnumType::sBS1361, "sBS1361"}, + {ConnectorEnumType::sCEE_7_7, "sCEE-7-7"}, + {ConnectorEnumType::sType2, "sType2"}, + {ConnectorEnumType::sType3, "sType3"}, + {ConnectorEnumType::Other1PhMax16A, "Other1PhMax16A"}, + {ConnectorEnumType::Other1PhOver16A, "Other1PhOver16A"}, + {ConnectorEnumType::Other3Ph, "Other3Ph"}, + {ConnectorEnumType::Pan, "Pan"}, + {ConnectorEnumType::wInductive, "wInductive"}, + {ConnectorEnumType::wResonant, "wResonant"}, + {ConnectorEnumType::Undetermined, "Undetermined"}, + {ConnectorEnumType::Unknown, "Unknown"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ConnectorEnumType20.h b/src/ocpp20/types/ConnectorEnumType20.h index 1166eddf..5c9dacdf 100644 --- a/src/ocpp20/types/ConnectorEnumType20.h +++ b/src/ocpp20/types/ConnectorEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CONNECTORENUMTYPE20_H -#define OPENOCPP_CONNECTORENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CONNECTORENUMTYPE_H +#define OPENOCPP_OCPP20_CONNECTORENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief This field specifies the connector type. */ -enum class ConnectorEnumType20 +enum class ConnectorEnumType { cCCS1, cCCS2, @@ -60,11 +60,11 @@ enum class ConnectorEnumType20 Unknown, }; -/** @brief Helper to convert a ConnectorEnumType20 enum to string */ -extern const EnumToStringFromString ConnectorEnumType20Helper; +/** @brief Helper to convert a ConnectorEnumType enum to string */ +extern const EnumToStringFromString ConnectorEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CONNECTORENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CONNECTORENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ConnectorStatusEnumType20.cpp b/src/ocpp20/types/ConnectorStatusEnumType20.cpp index d0e3da8b..b19e4cfc 100644 --- a/src/ocpp20/types/ConnectorStatusEnumType20.cpp +++ b/src/ocpp20/types/ConnectorStatusEnumType20.cpp @@ -30,13 +30,13 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ConnectorStatusEnumType20 enum to string */ -const EnumToStringFromString ConnectorStatusEnumType20Helper = { - {ConnectorStatusEnumType20::Available, "Available"}, - {ConnectorStatusEnumType20::Occupied, "Occupied"}, - {ConnectorStatusEnumType20::Reserved, "Reserved"}, - {ConnectorStatusEnumType20::Unavailable, "Unavailable"}, - {ConnectorStatusEnumType20::Faulted, "Faulted"}, +/** @brief Helper to convert a ConnectorStatusEnumType enum to string */ +const EnumToStringFromString ConnectorStatusEnumTypeHelper = { + {ConnectorStatusEnumType::Available, "Available"}, + {ConnectorStatusEnumType::Occupied, "Occupied"}, + {ConnectorStatusEnumType::Reserved, "Reserved"}, + {ConnectorStatusEnumType::Unavailable, "Unavailable"}, + {ConnectorStatusEnumType::Faulted, "Faulted"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ConnectorStatusEnumType20.h b/src/ocpp20/types/ConnectorStatusEnumType20.h index 77e74097..87a6b744 100644 --- a/src/ocpp20/types/ConnectorStatusEnumType20.h +++ b/src/ocpp20/types/ConnectorStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CONNECTORSTATUSENUMTYPE20_H -#define OPENOCPP_CONNECTORSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CONNECTORSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_CONNECTORSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief This contains the current status of the Connector. */ -enum class ConnectorStatusEnumType20 +enum class ConnectorStatusEnumType { Available, Occupied, @@ -43,11 +43,11 @@ enum class ConnectorStatusEnumType20 Faulted, }; -/** @brief Helper to convert a ConnectorStatusEnumType20 enum to string */ -extern const EnumToStringFromString ConnectorStatusEnumType20Helper; +/** @brief Helper to convert a ConnectorStatusEnumType enum to string */ +extern const EnumToStringFromString ConnectorStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CONNECTORSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CONNECTORSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ConsumptionCostType20.cpp b/src/ocpp20/types/ConsumptionCostType20.cpp index 9dd905cd..4592914f 100644 --- a/src/ocpp20/types/ConsumptionCostType20.cpp +++ b/src/ocpp20/types/ConsumptionCostType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a ConsumptionCostType20 from a JSON representation */ -bool ConsumptionCostType20Converter::fromJson(const rapidjson::Value& json, - ConsumptionCostType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ConsumptionCostType from a JSON representation */ +bool ConsumptionCostTypeConverter::fromJson(const rapidjson::Value& json, + ConsumptionCostType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -54,11 +54,11 @@ bool ConsumptionCostType20Converter::fromJson(const rapidjson::Value& json if (json.HasMember("cost")) { const rapidjson::Value& cost_json = json["cost"]; - CostType20Converter cost_converter; + CostTypeConverter cost_converter; for (auto it = cost_json.Begin(); ret && (it != cost_json.End()); ++it) { - CostType20& item = data.cost.emplace_back(); - ret = ret && cost_converter.fromJson(*it, item, error_code, error_message); + CostType& item = data.cost.emplace_back(); + ret = ret && cost_converter.fromJson(*it, item, error_code, error_message); } } @@ -70,15 +70,15 @@ bool ConsumptionCostType20Converter::fromJson(const rapidjson::Value& json return ret; } -/** @brief Convert a ConsumptionCostType20 to a JSON representation */ -bool ConsumptionCostType20Converter::toJson(const ConsumptionCostType20& data, rapidjson::Document& json) +/** @brief Convert a ConsumptionCostType to a JSON representation */ +bool ConsumptionCostTypeConverter::toJson(const ConsumptionCostType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -91,10 +91,10 @@ bool ConsumptionCostType20Converter::toJson(const ConsumptionCostType20& data, r // cost - rapidjson::Value cost_json(rapidjson::kArrayType); - CostType20Converter cost_converter; + rapidjson::Value cost_json(rapidjson::kArrayType); + CostTypeConverter cost_converter; cost_converter.setAllocator(allocator); - for (const CostType20& item : data.cost) + for (const CostType& item : data.cost) { rapidjson::Document item_doc; item_doc.Parse("{}"); diff --git a/src/ocpp20/types/ConsumptionCostType20.h b/src/ocpp20/types/ConsumptionCostType20.h index 97a95420..ee394ddd 100644 --- a/src/ocpp20/types/ConsumptionCostType20.h +++ b/src/ocpp20/types/ConsumptionCostType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CONSUMPTIONCOSTTYPE20_H -#define OPENOCPP_CONSUMPTIONCOSTTYPE20_H +#ifndef OPENOCPP_OCPP20_CONSUMPTIONCOSTTYPE_H +#define OPENOCPP_OCPP20_CONSUMPTIONCOSTTYPE_H #include "CostType20.h" #include "CustomDataType20.h" @@ -41,37 +41,37 @@ namespace ocpp20 /** @brief Consumption_ Cost urn:x-oca:ocpp:uid:2:233259 */ -struct ConsumptionCostType20 +struct ConsumptionCostType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Consumption_ Cost. Start_ Value. Numeric urn:x-oca:ocpp:uid:1:569246 The lowest level of consumption that defines the starting point of this consumption block. The block interval extends to the start of the next interval. */ float startValue; /** @brief */ - std::vector cost; + std::vector cost; }; -/** @brief Converter class for ConsumptionCostType20 type */ -class ConsumptionCostType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ConsumptionCostType type */ +class ConsumptionCostTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new ConsumptionCostType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new ConsumptionCostTypeConverter(); } - /** @brief Convert a ConsumptionCostType20 from a JSON representation */ + /** @brief Convert a ConsumptionCostType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ConsumptionCostType20& data, + ConsumptionCostType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ConsumptionCostType20 to a JSON representation */ - bool toJson(const ConsumptionCostType20& data, rapidjson::Document& json) override; + /** @brief Convert a ConsumptionCostType to a JSON representation */ + bool toJson(const ConsumptionCostType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CONSUMPTIONCOSTTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CONSUMPTIONCOSTTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/CostKindEnumType20.cpp b/src/ocpp20/types/CostKindEnumType20.cpp index 8c4142e2..45660e6b 100644 --- a/src/ocpp20/types/CostKindEnumType20.cpp +++ b/src/ocpp20/types/CostKindEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a CostKindEnumType20 enum to string */ -const EnumToStringFromString CostKindEnumType20Helper = { - {CostKindEnumType20::CarbonDioxideEmission, "CarbonDioxideEmission"}, - {CostKindEnumType20::RelativePricePercentage, "RelativePricePercentage"}, - {CostKindEnumType20::RenewableGenerationPercentage, "RenewableGenerationPercentage"}, +/** @brief Helper to convert a CostKindEnumType enum to string */ +const EnumToStringFromString CostKindEnumTypeHelper = { + {CostKindEnumType::CarbonDioxideEmission, "CarbonDioxideEmission"}, + {CostKindEnumType::RelativePricePercentage, "RelativePricePercentage"}, + {CostKindEnumType::RenewableGenerationPercentage, "RenewableGenerationPercentage"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/CostKindEnumType20.h b/src/ocpp20/types/CostKindEnumType20.h index 018d69eb..737b9336 100644 --- a/src/ocpp20/types/CostKindEnumType20.h +++ b/src/ocpp20/types/CostKindEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_COSTKINDENUMTYPE20_H -#define OPENOCPP_COSTKINDENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_COSTKINDENUMTYPE_H +#define OPENOCPP_OCPP20_COSTKINDENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,18 +36,18 @@ namespace ocpp20 /** @brief Cost. Cost_ Kind. Cost_ Kind_ Code urn:x-oca:ocpp:uid:1:569243 The kind of cost referred to in the message element amount */ -enum class CostKindEnumType20 +enum class CostKindEnumType { CarbonDioxideEmission, RelativePricePercentage, RenewableGenerationPercentage, }; -/** @brief Helper to convert a CostKindEnumType20 enum to string */ -extern const EnumToStringFromString CostKindEnumType20Helper; +/** @brief Helper to convert a CostKindEnumType enum to string */ +extern const EnumToStringFromString CostKindEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_COSTKINDENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_COSTKINDENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/CostType20.cpp b/src/ocpp20/types/CostType20.cpp index 816e626d..f76e32c5 100644 --- a/src/ocpp20/types/CostType20.cpp +++ b/src/ocpp20/types/CostType20.cpp @@ -32,23 +32,23 @@ namespace types namespace ocpp20 { -/** @brief Convert a CostType20 from a JSON representation */ -bool CostType20Converter::fromJson(const rapidjson::Value& json, - CostType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a CostType from a JSON representation */ +bool CostTypeConverter::fromJson(const rapidjson::Value& json, + CostType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // costKind - data.costKind = CostKindEnumType20Helper.fromString(json["costKind"].GetString()); + data.costKind = CostKindEnumTypeHelper.fromString(json["costKind"].GetString()); // amount extract(json, "amount", data.amount); @@ -64,15 +64,15 @@ bool CostType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a CostType20 to a JSON representation */ -bool CostType20Converter::toJson(const CostType20& data, rapidjson::Document& json) +/** @brief Convert a CostType to a JSON representation */ +bool CostTypeConverter::toJson(const CostType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -81,7 +81,7 @@ bool CostType20Converter::toJson(const CostType20& data, rapidjson::Document& js } // costKind - fill(json, "costKind", CostKindEnumType20Helper.toString(data.costKind)); + fill(json, "costKind", CostKindEnumTypeHelper.toString(data.costKind)); // amount fill(json, "amount", data.amount); diff --git a/src/ocpp20/types/CostType20.h b/src/ocpp20/types/CostType20.h index 204ccc24..3b9eddc6 100644 --- a/src/ocpp20/types/CostType20.h +++ b/src/ocpp20/types/CostType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_COSTTYPE20_H -#define OPENOCPP_COSTTYPE20_H +#ifndef OPENOCPP_OCPP20_COSTTYPE_H +#define OPENOCPP_OCPP20_COSTTYPE_H #include "CostKindEnumType20.h" #include "CustomDataType20.h" @@ -40,12 +40,12 @@ namespace ocpp20 /** @brief Cost urn:x-oca:ocpp:uid:2:233258 */ -struct CostType20 +struct CostType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - CostKindEnumType20 costKind; + CostKindEnumType costKind; /** @brief Cost. Amount. Amount urn:x-oca:ocpp:uid:1:569244 The estimated or actual cost per kWh */ @@ -56,25 +56,25 @@ Values: -3..3, The amountMultiplier defines the exponent to base 10 (dec). The f ocpp::types::Optional amountMultiplier; }; -/** @brief Converter class for CostType20 type */ -class CostType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for CostType type */ +class CostTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new CostType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new CostTypeConverter(); } - /** @brief Convert a CostType20 from a JSON representation */ + /** @brief Convert a CostType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - CostType20& data, + CostType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a CostType20 to a JSON representation */ - bool toJson(const CostType20& data, rapidjson::Document& json) override; + /** @brief Convert a CostType to a JSON representation */ + bool toJson(const CostType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_COSTTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_COSTTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/CustomDataType20.cpp b/src/ocpp20/types/CustomDataType20.cpp index 90225f0a..c3395baf 100644 --- a/src/ocpp20/types/CustomDataType20.cpp +++ b/src/ocpp20/types/CustomDataType20.cpp @@ -32,11 +32,11 @@ namespace types namespace ocpp20 { -/** @brief Convert a CustomDataType20 from a JSON representation */ -bool CustomDataType20Converter::fromJson(const rapidjson::Value& json, - CustomDataType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a CustomDataType from a JSON representation */ +bool CustomDataTypeConverter::fromJson(const rapidjson::Value& json, + CustomDataType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; @@ -51,8 +51,8 @@ bool CustomDataType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a CustomDataType20 to a JSON representation */ -bool CustomDataType20Converter::toJson(const CustomDataType20& data, rapidjson::Document& json) +/** @brief Convert a CustomDataType to a JSON representation */ +bool CustomDataTypeConverter::toJson(const CustomDataType& data, rapidjson::Document& json) { bool ret = true; diff --git a/src/ocpp20/types/CustomDataType20.h b/src/ocpp20/types/CustomDataType20.h index 5eb0f2ec..dd7ac0b1 100644 --- a/src/ocpp20/types/CustomDataType20.h +++ b/src/ocpp20/types/CustomDataType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CUSTOMDATATYPE20_H -#define OPENOCPP_CUSTOMDATATYPE20_H +#ifndef OPENOCPP_OCPP20_CUSTOMDATATYPE_H +#define OPENOCPP_OCPP20_CUSTOMDATATYPE_H #include "CiStringType.h" #include "IMessageConverter.h" @@ -35,31 +35,31 @@ namespace ocpp20 { /** @brief This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. */ -struct CustomDataType20 +struct CustomDataType { /** @brief */ ocpp::types::CiStringType<255u> vendorId; }; -/** @brief Converter class for CustomDataType20 type */ -class CustomDataType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for CustomDataType type */ +class CustomDataTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new CustomDataType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new CustomDataTypeConverter(); } - /** @brief Convert a CustomDataType20 from a JSON representation */ + /** @brief Convert a CustomDataType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - CustomDataType20& data, + CustomDataType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a CustomDataType20 to a JSON representation */ - bool toJson(const CustomDataType20& data, rapidjson::Document& json) override; + /** @brief Convert a CustomDataType to a JSON representation */ + bool toJson(const CustomDataType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CUSTOMDATATYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CUSTOMDATATYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/CustomerInformationStatusEnumType20.cpp b/src/ocpp20/types/CustomerInformationStatusEnumType20.cpp index 3c87bdda..361f622a 100644 --- a/src/ocpp20/types/CustomerInformationStatusEnumType20.cpp +++ b/src/ocpp20/types/CustomerInformationStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a CustomerInformationStatusEnumType20 enum to string */ -const EnumToStringFromString CustomerInformationStatusEnumType20Helper = { - {CustomerInformationStatusEnumType20::Accepted, "Accepted"}, - {CustomerInformationStatusEnumType20::Rejected, "Rejected"}, - {CustomerInformationStatusEnumType20::Invalid, "Invalid"}, +/** @brief Helper to convert a CustomerInformationStatusEnumType enum to string */ +const EnumToStringFromString CustomerInformationStatusEnumTypeHelper = { + {CustomerInformationStatusEnumType::Accepted, "Accepted"}, + {CustomerInformationStatusEnumType::Rejected, "Rejected"}, + {CustomerInformationStatusEnumType::Invalid, "Invalid"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/CustomerInformationStatusEnumType20.h b/src/ocpp20/types/CustomerInformationStatusEnumType20.h index b5282071..8bf28432 100644 --- a/src/ocpp20/types/CustomerInformationStatusEnumType20.h +++ b/src/ocpp20/types/CustomerInformationStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_CUSTOMERINFORMATIONSTATUSENUMTYPE20_H -#define OPENOCPP_CUSTOMERINFORMATIONSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_CUSTOMERINFORMATIONSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_CUSTOMERINFORMATIONSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief Indicates whether the request was accepted. */ -enum class CustomerInformationStatusEnumType20 +enum class CustomerInformationStatusEnumType { Accepted, Rejected, Invalid, }; -/** @brief Helper to convert a CustomerInformationStatusEnumType20 enum to string */ -extern const EnumToStringFromString CustomerInformationStatusEnumType20Helper; +/** @brief Helper to convert a CustomerInformationStatusEnumType enum to string */ +extern const EnumToStringFromString CustomerInformationStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_CUSTOMERINFORMATIONSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_CUSTOMERINFORMATIONSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/DCChargingParametersType20.cpp b/src/ocpp20/types/DCChargingParametersType20.cpp index 718163da..7682e71a 100644 --- a/src/ocpp20/types/DCChargingParametersType20.cpp +++ b/src/ocpp20/types/DCChargingParametersType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a DCChargingParametersType20 from a JSON representation */ -bool DCChargingParametersType20Converter::fromJson(const rapidjson::Value& json, - DCChargingParametersType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a DCChargingParametersType from a JSON representation */ +bool DCChargingParametersTypeConverter::fromJson(const rapidjson::Value& json, + DCChargingParametersType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -79,15 +79,15 @@ bool DCChargingParametersType20Converter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a DCChargingParametersType20 to a JSON representation */ -bool DCChargingParametersType20Converter::toJson(const DCChargingParametersType20& data, rapidjson::Document& json) +/** @brief Convert a DCChargingParametersType to a JSON representation */ +bool DCChargingParametersTypeConverter::toJson(const DCChargingParametersType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/DCChargingParametersType20.h b/src/ocpp20/types/DCChargingParametersType20.h index 876fb2f9..5edbc74a 100644 --- a/src/ocpp20/types/DCChargingParametersType20.h +++ b/src/ocpp20/types/DCChargingParametersType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_DCCHARGINGPARAMETERSTYPE20_H -#define OPENOCPP_DCCHARGINGPARAMETERSTYPE20_H +#ifndef OPENOCPP_OCPP20_DCCHARGINGPARAMETERSTYPE_H +#define OPENOCPP_OCPP20_DCCHARGINGPARAMETERSTYPE_H #include "CustomDataType20.h" @@ -42,10 +42,10 @@ EV DC charging parameters */ -struct DCChargingParametersType20 +struct DCChargingParametersType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief DC_ Charging_ Parameters. EV_ Max. Current urn:x-oca:ocpp:uid:1:569215 Maximum current (amps) supported by the electric vehicle. Includes cable capacity. */ @@ -80,28 +80,25 @@ Percentage of SoC at which the EV considers a fast charging process to end. (pos ocpp::types::Optional bulkSoC; }; -/** @brief Converter class for DCChargingParametersType20 type */ -class DCChargingParametersType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for DCChargingParametersType type */ +class DCChargingParametersTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override - { - return new DCChargingParametersType20Converter(); - } + ocpp::messages::IMessageConverter* clone() const override { return new DCChargingParametersTypeConverter(); } - /** @brief Convert a DCChargingParametersType20 from a JSON representation */ + /** @brief Convert a DCChargingParametersType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - DCChargingParametersType20& data, + DCChargingParametersType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a DCChargingParametersType20 to a JSON representation */ - bool toJson(const DCChargingParametersType20& data, rapidjson::Document& json) override; + /** @brief Convert a DCChargingParametersType to a JSON representation */ + bool toJson(const DCChargingParametersType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_DCCHARGINGPARAMETERSTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_DCCHARGINGPARAMETERSTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/DataEnumType20.cpp b/src/ocpp20/types/DataEnumType20.cpp index 0f7b996b..c83a92a1 100644 --- a/src/ocpp20/types/DataEnumType20.cpp +++ b/src/ocpp20/types/DataEnumType20.cpp @@ -30,16 +30,16 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a DataEnumType20 enum to string */ -const EnumToStringFromString DataEnumType20Helper = { - {DataEnumType20::string, "string"}, - {DataEnumType20::decimal, "decimal"}, - {DataEnumType20::integer, "integer"}, - {DataEnumType20::dateTime, "dateTime"}, - {DataEnumType20::boolean, "boolean"}, - {DataEnumType20::OptionList, "OptionList"}, - {DataEnumType20::SequenceList, "SequenceList"}, - {DataEnumType20::MemberList, "MemberList"}, +/** @brief Helper to convert a DataEnumType enum to string */ +const EnumToStringFromString DataEnumTypeHelper = { + {DataEnumType::string, "string"}, + {DataEnumType::decimal, "decimal"}, + {DataEnumType::integer, "integer"}, + {DataEnumType::dateTime, "dateTime"}, + {DataEnumType::boolean, "boolean"}, + {DataEnumType::OptionList, "OptionList"}, + {DataEnumType::SequenceList, "SequenceList"}, + {DataEnumType::MemberList, "MemberList"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/DataEnumType20.h b/src/ocpp20/types/DataEnumType20.h index 6caec2ed..2fb3772c 100644 --- a/src/ocpp20/types/DataEnumType20.h +++ b/src/ocpp20/types/DataEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_DATAENUMTYPE20_H -#define OPENOCPP_DATAENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_DATAENUMTYPE_H +#define OPENOCPP_OCPP20_DATAENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief Data type of this variable. */ -enum class DataEnumType20 +enum class DataEnumType { string, decimal, @@ -46,11 +46,11 @@ enum class DataEnumType20 MemberList, }; -/** @brief Helper to convert a DataEnumType20 enum to string */ -extern const EnumToStringFromString DataEnumType20Helper; +/** @brief Helper to convert a DataEnumType enum to string */ +extern const EnumToStringFromString DataEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_DATAENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_DATAENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/DataTransferStatusEnumType20.cpp b/src/ocpp20/types/DataTransferStatusEnumType20.cpp index d0442879..fc0836b9 100644 --- a/src/ocpp20/types/DataTransferStatusEnumType20.cpp +++ b/src/ocpp20/types/DataTransferStatusEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a DataTransferStatusEnumType20 enum to string */ -const EnumToStringFromString DataTransferStatusEnumType20Helper = { - {DataTransferStatusEnumType20::Accepted, "Accepted"}, - {DataTransferStatusEnumType20::Rejected, "Rejected"}, - {DataTransferStatusEnumType20::UnknownMessageId, "UnknownMessageId"}, - {DataTransferStatusEnumType20::UnknownVendorId, "UnknownVendorId"}, +/** @brief Helper to convert a DataTransferStatusEnumType enum to string */ +const EnumToStringFromString DataTransferStatusEnumTypeHelper = { + {DataTransferStatusEnumType::Accepted, "Accepted"}, + {DataTransferStatusEnumType::Rejected, "Rejected"}, + {DataTransferStatusEnumType::UnknownMessageId, "UnknownMessageId"}, + {DataTransferStatusEnumType::UnknownVendorId, "UnknownVendorId"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/DataTransferStatusEnumType20.h b/src/ocpp20/types/DataTransferStatusEnumType20.h index dc266a9b..221fb8db 100644 --- a/src/ocpp20/types/DataTransferStatusEnumType20.h +++ b/src/ocpp20/types/DataTransferStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_DATATRANSFERSTATUSENUMTYPE20_H -#define OPENOCPP_DATATRANSFERSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_DATATRANSFERSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_DATATRANSFERSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief This indicates the success or failure of the data transfer. */ -enum class DataTransferStatusEnumType20 +enum class DataTransferStatusEnumType { Accepted, Rejected, @@ -42,11 +42,11 @@ enum class DataTransferStatusEnumType20 UnknownVendorId, }; -/** @brief Helper to convert a DataTransferStatusEnumType20 enum to string */ -extern const EnumToStringFromString DataTransferStatusEnumType20Helper; +/** @brief Helper to convert a DataTransferStatusEnumType enum to string */ +extern const EnumToStringFromString DataTransferStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_DATATRANSFERSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_DATATRANSFERSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/DeleteCertificateStatusEnumType20.cpp b/src/ocpp20/types/DeleteCertificateStatusEnumType20.cpp index d156f026..42e7de3d 100644 --- a/src/ocpp20/types/DeleteCertificateStatusEnumType20.cpp +++ b/src/ocpp20/types/DeleteCertificateStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a DeleteCertificateStatusEnumType20 enum to string */ -const EnumToStringFromString DeleteCertificateStatusEnumType20Helper = { - {DeleteCertificateStatusEnumType20::Accepted, "Accepted"}, - {DeleteCertificateStatusEnumType20::Failed, "Failed"}, - {DeleteCertificateStatusEnumType20::NotFound, "NotFound"}, +/** @brief Helper to convert a DeleteCertificateStatusEnumType enum to string */ +const EnumToStringFromString DeleteCertificateStatusEnumTypeHelper = { + {DeleteCertificateStatusEnumType::Accepted, "Accepted"}, + {DeleteCertificateStatusEnumType::Failed, "Failed"}, + {DeleteCertificateStatusEnumType::NotFound, "NotFound"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/DeleteCertificateStatusEnumType20.h b/src/ocpp20/types/DeleteCertificateStatusEnumType20.h index 06314300..540521e7 100644 --- a/src/ocpp20/types/DeleteCertificateStatusEnumType20.h +++ b/src/ocpp20/types/DeleteCertificateStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_DELETECERTIFICATESTATUSENUMTYPE20_H -#define OPENOCPP_DELETECERTIFICATESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_DELETECERTIFICATESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_DELETECERTIFICATESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief Charging Station indicates if it can process the request. */ -enum class DeleteCertificateStatusEnumType20 +enum class DeleteCertificateStatusEnumType { Accepted, Failed, NotFound, }; -/** @brief Helper to convert a DeleteCertificateStatusEnumType20 enum to string */ -extern const EnumToStringFromString DeleteCertificateStatusEnumType20Helper; +/** @brief Helper to convert a DeleteCertificateStatusEnumType enum to string */ +extern const EnumToStringFromString DeleteCertificateStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_DELETECERTIFICATESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_DELETECERTIFICATESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/DisplayMessageStatusEnumType20.cpp b/src/ocpp20/types/DisplayMessageStatusEnumType20.cpp index 7232599b..67e2eb49 100644 --- a/src/ocpp20/types/DisplayMessageStatusEnumType20.cpp +++ b/src/ocpp20/types/DisplayMessageStatusEnumType20.cpp @@ -30,14 +30,14 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a DisplayMessageStatusEnumType20 enum to string */ -const EnumToStringFromString DisplayMessageStatusEnumType20Helper = { - {DisplayMessageStatusEnumType20::Accepted, "Accepted"}, - {DisplayMessageStatusEnumType20::NotSupportedMessageFormat, "NotSupportedMessageFormat"}, - {DisplayMessageStatusEnumType20::Rejected, "Rejected"}, - {DisplayMessageStatusEnumType20::NotSupportedPriority, "NotSupportedPriority"}, - {DisplayMessageStatusEnumType20::NotSupportedState, "NotSupportedState"}, - {DisplayMessageStatusEnumType20::UnknownTransaction, "UnknownTransaction"}, +/** @brief Helper to convert a DisplayMessageStatusEnumType enum to string */ +const EnumToStringFromString DisplayMessageStatusEnumTypeHelper = { + {DisplayMessageStatusEnumType::Accepted, "Accepted"}, + {DisplayMessageStatusEnumType::NotSupportedMessageFormat, "NotSupportedMessageFormat"}, + {DisplayMessageStatusEnumType::Rejected, "Rejected"}, + {DisplayMessageStatusEnumType::NotSupportedPriority, "NotSupportedPriority"}, + {DisplayMessageStatusEnumType::NotSupportedState, "NotSupportedState"}, + {DisplayMessageStatusEnumType::UnknownTransaction, "UnknownTransaction"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/DisplayMessageStatusEnumType20.h b/src/ocpp20/types/DisplayMessageStatusEnumType20.h index a1c6a9ca..7837cb08 100644 --- a/src/ocpp20/types/DisplayMessageStatusEnumType20.h +++ b/src/ocpp20/types/DisplayMessageStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_DISPLAYMESSAGESTATUSENUMTYPE20_H -#define OPENOCPP_DISPLAYMESSAGESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_DISPLAYMESSAGESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_DISPLAYMESSAGESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief This indicates whether the Charging Station is able to display the message. */ -enum class DisplayMessageStatusEnumType20 +enum class DisplayMessageStatusEnumType { Accepted, NotSupportedMessageFormat, @@ -44,11 +44,11 @@ enum class DisplayMessageStatusEnumType20 UnknownTransaction, }; -/** @brief Helper to convert a DisplayMessageStatusEnumType20 enum to string */ -extern const EnumToStringFromString DisplayMessageStatusEnumType20Helper; +/** @brief Helper to convert a DisplayMessageStatusEnumType enum to string */ +extern const EnumToStringFromString DisplayMessageStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_DISPLAYMESSAGESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_DISPLAYMESSAGESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/EVSEType20.cpp b/src/ocpp20/types/EVSEType20.cpp index a3ad5365..9b6c179f 100644 --- a/src/ocpp20/types/EVSEType20.cpp +++ b/src/ocpp20/types/EVSEType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a EVSEType20 from a JSON representation */ -bool EVSEType20Converter::fromJson(const rapidjson::Value& json, - EVSEType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a EVSEType from a JSON representation */ +bool EVSETypeConverter::fromJson(const rapidjson::Value& json, + EVSEType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -61,15 +61,15 @@ bool EVSEType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a EVSEType20 to a JSON representation */ -bool EVSEType20Converter::toJson(const EVSEType20& data, rapidjson::Document& json) +/** @brief Convert a EVSEType to a JSON representation */ +bool EVSETypeConverter::toJson(const EVSEType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/EVSEType20.h b/src/ocpp20/types/EVSEType20.h index 0d9af938..4c7f428e 100644 --- a/src/ocpp20/types/EVSEType20.h +++ b/src/ocpp20/types/EVSEType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_EVSETYPE20_H -#define OPENOCPP_EVSETYPE20_H +#ifndef OPENOCPP_OCPP20_EVSETYPE_H +#define OPENOCPP_OCPP20_EVSETYPE_H #include "CustomDataType20.h" @@ -40,10 +40,10 @@ namespace ocpp20 urn:x-oca:ocpp:uid:2:233123 Electric Vehicle Supply Equipment */ -struct EVSEType20 +struct EVSEType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Identified_ Object. MRID. Numeric_ Identifier urn:x-enexis:ecdm:uid:1:569198 EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. */ @@ -52,25 +52,25 @@ EVSE Identifier. This contains a number (> 0) designating an EVSE of the Char ocpp::types::Optional connectorId; }; -/** @brief Converter class for EVSEType20 type */ -class EVSEType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for EVSEType type */ +class EVSETypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new EVSEType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new EVSETypeConverter(); } - /** @brief Convert a EVSEType20 from a JSON representation */ + /** @brief Convert a EVSEType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - EVSEType20& data, + EVSEType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a EVSEType20 to a JSON representation */ - bool toJson(const EVSEType20& data, rapidjson::Document& json) override; + /** @brief Convert a EVSEType to a JSON representation */ + bool toJson(const EVSEType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_EVSETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_EVSETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/EnergyTransferModeEnumType20.cpp b/src/ocpp20/types/EnergyTransferModeEnumType20.cpp index 4a77e3b0..80c9cf2d 100644 --- a/src/ocpp20/types/EnergyTransferModeEnumType20.cpp +++ b/src/ocpp20/types/EnergyTransferModeEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a EnergyTransferModeEnumType20 enum to string */ -const EnumToStringFromString EnergyTransferModeEnumType20Helper = { - {EnergyTransferModeEnumType20::DC, "DC"}, - {EnergyTransferModeEnumType20::AC_single_phase, "AC_single_phase"}, - {EnergyTransferModeEnumType20::AC_two_phase, "AC_two_phase"}, - {EnergyTransferModeEnumType20::AC_three_phase, "AC_three_phase"}, +/** @brief Helper to convert a EnergyTransferModeEnumType enum to string */ +const EnumToStringFromString EnergyTransferModeEnumTypeHelper = { + {EnergyTransferModeEnumType::DC, "DC"}, + {EnergyTransferModeEnumType::AC_single_phase, "AC_single_phase"}, + {EnergyTransferModeEnumType::AC_two_phase, "AC_two_phase"}, + {EnergyTransferModeEnumType::AC_three_phase, "AC_three_phase"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/EnergyTransferModeEnumType20.h b/src/ocpp20/types/EnergyTransferModeEnumType20.h index 9d5feb25..7947ab7d 100644 --- a/src/ocpp20/types/EnergyTransferModeEnumType20.h +++ b/src/ocpp20/types/EnergyTransferModeEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_ENERGYTRANSFERMODEENUMTYPE20_H -#define OPENOCPP_ENERGYTRANSFERMODEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_ENERGYTRANSFERMODEENUMTYPE_H +#define OPENOCPP_OCPP20_ENERGYTRANSFERMODEENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief Charging_ Needs. Requested. Energy_ Transfer_ Mode_ Code urn:x-oca:ocpp:uid:1:569209 Mode of energy transfer requested by the EV. */ -enum class EnergyTransferModeEnumType20 +enum class EnergyTransferModeEnumType { DC, AC_single_phase, @@ -44,11 +44,11 @@ enum class EnergyTransferModeEnumType20 AC_three_phase, }; -/** @brief Helper to convert a EnergyTransferModeEnumType20 enum to string */ -extern const EnumToStringFromString EnergyTransferModeEnumType20Helper; +/** @brief Helper to convert a EnergyTransferModeEnumType enum to string */ +extern const EnumToStringFromString EnergyTransferModeEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_ENERGYTRANSFERMODEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_ENERGYTRANSFERMODEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/EventDataType20.cpp b/src/ocpp20/types/EventDataType20.cpp index 7c7b402b..cd5d8d3c 100644 --- a/src/ocpp20/types/EventDataType20.cpp +++ b/src/ocpp20/types/EventDataType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a EventDataType20 from a JSON representation */ -bool EventDataType20Converter::fromJson(const rapidjson::Value& json, - EventDataType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a EventDataType from a JSON representation */ +bool EventDataTypeConverter::fromJson(const rapidjson::Value& json, + EventDataType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -54,7 +54,7 @@ bool EventDataType20Converter::fromJson(const rapidjson::Value& json, ret = ret && extract(json, "timestamp", data.timestamp, error_message); // trigger - data.trigger = EventTriggerEnumType20Helper.fromString(json["trigger"].GetString()); + data.trigger = EventTriggerEnumTypeHelper.fromString(json["trigger"].GetString()); // cause extract(json, "cause", data.cause); @@ -75,17 +75,17 @@ bool EventDataType20Converter::fromJson(const rapidjson::Value& json, extract(json, "transactionId", data.transactionId); // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; ret = ret && component_converter.fromJson(json["component"], data.component, error_code, error_message); // variableMonitoringId extract(json, "variableMonitoringId", data.variableMonitoringId); // eventNotificationType - data.eventNotificationType = EventNotificationEnumType20Helper.fromString(json["eventNotificationType"].GetString()); + data.eventNotificationType = EventNotificationEnumTypeHelper.fromString(json["eventNotificationType"].GetString()); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; ret = ret && variable_converter.fromJson(json["variable"], data.variable, error_code, error_message); if (!ret) @@ -96,15 +96,15 @@ bool EventDataType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a EventDataType20 to a JSON representation */ -bool EventDataType20Converter::toJson(const EventDataType20& data, rapidjson::Document& json) +/** @brief Convert a EventDataType to a JSON representation */ +bool EventDataTypeConverter::toJson(const EventDataType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -119,7 +119,7 @@ bool EventDataType20Converter::toJson(const EventDataType20& data, rapidjson::Do fill(json, "timestamp", data.timestamp); // trigger - fill(json, "trigger", EventTriggerEnumType20Helper.toString(data.trigger)); + fill(json, "trigger", EventTriggerEnumTypeHelper.toString(data.trigger)); // cause fill(json, "cause", data.cause); @@ -140,7 +140,7 @@ bool EventDataType20Converter::toJson(const EventDataType20& data, rapidjson::Do fill(json, "transactionId", data.transactionId); // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; component_converter.setAllocator(allocator); rapidjson::Document component_doc; component_doc.Parse("{}"); @@ -151,10 +151,10 @@ bool EventDataType20Converter::toJson(const EventDataType20& data, rapidjson::Do fill(json, "variableMonitoringId", data.variableMonitoringId); // eventNotificationType - fill(json, "eventNotificationType", EventNotificationEnumType20Helper.toString(data.eventNotificationType)); + fill(json, "eventNotificationType", EventNotificationEnumTypeHelper.toString(data.eventNotificationType)); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; variable_converter.setAllocator(allocator); rapidjson::Document variable_doc; variable_doc.Parse("{}"); diff --git a/src/ocpp20/types/EventDataType20.h b/src/ocpp20/types/EventDataType20.h index 01e7f8ae..8d11b574 100644 --- a/src/ocpp20/types/EventDataType20.h +++ b/src/ocpp20/types/EventDataType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_EVENTDATATYPE20_H -#define OPENOCPP_EVENTDATATYPE20_H +#ifndef OPENOCPP_OCPP20_EVENTDATATYPE_H +#define OPENOCPP_OCPP20_EVENTDATATYPE_H #include "ComponentType20.h" #include "CustomDataType20.h" @@ -44,16 +44,16 @@ namespace ocpp20 /** @brief Class to report an event notification for a component-variable. */ -struct EventDataType20 +struct EventDataType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Identifies the event. This field can be referred to as a cause by other events. */ int eventId; /** @brief Timestamp of the moment the report was generated. */ ocpp::types::DateTime timestamp; /** @brief */ - EventTriggerEnumType20 trigger; + EventTriggerEnumType trigger; /** @brief Refers to the Id of an event that is considered to be the cause for this event. */ ocpp::types::Optional cause; /** @brief Actual value (_attributeType_ Actual) of the variable. @@ -69,34 +69,34 @@ The Configuration Variable <<configkey-reporting-value-size,ReportingValue /** @brief If an event notification is linked to a specific transaction, this field can be used to specify its transactionId. */ ocpp::types::Optional> transactionId; /** @brief */ - ComponentType20 component; + ComponentType component; /** @brief Identifies the VariableMonitoring which triggered the event. */ ocpp::types::Optional variableMonitoringId; /** @brief */ - EventNotificationEnumType20 eventNotificationType; + EventNotificationEnumType eventNotificationType; /** @brief */ - VariableType20 variable; + VariableType variable; }; -/** @brief Converter class for EventDataType20 type */ -class EventDataType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for EventDataType type */ +class EventDataTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new EventDataType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new EventDataTypeConverter(); } - /** @brief Convert a EventDataType20 from a JSON representation */ + /** @brief Convert a EventDataType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - EventDataType20& data, + EventDataType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a EventDataType20 to a JSON representation */ - bool toJson(const EventDataType20& data, rapidjson::Document& json) override; + /** @brief Convert a EventDataType to a JSON representation */ + bool toJson(const EventDataType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_EVENTDATATYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_EVENTDATATYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/EventNotificationEnumType20.cpp b/src/ocpp20/types/EventNotificationEnumType20.cpp index 1abf2c13..c83f594e 100644 --- a/src/ocpp20/types/EventNotificationEnumType20.cpp +++ b/src/ocpp20/types/EventNotificationEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a EventNotificationEnumType20 enum to string */ -const EnumToStringFromString EventNotificationEnumType20Helper = { - {EventNotificationEnumType20::HardWiredNotification, "HardWiredNotification"}, - {EventNotificationEnumType20::HardWiredMonitor, "HardWiredMonitor"}, - {EventNotificationEnumType20::PreconfiguredMonitor, "PreconfiguredMonitor"}, - {EventNotificationEnumType20::CustomMonitor, "CustomMonitor"}, +/** @brief Helper to convert a EventNotificationEnumType enum to string */ +const EnumToStringFromString EventNotificationEnumTypeHelper = { + {EventNotificationEnumType::HardWiredNotification, "HardWiredNotification"}, + {EventNotificationEnumType::HardWiredMonitor, "HardWiredMonitor"}, + {EventNotificationEnumType::PreconfiguredMonitor, "PreconfiguredMonitor"}, + {EventNotificationEnumType::CustomMonitor, "CustomMonitor"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/EventNotificationEnumType20.h b/src/ocpp20/types/EventNotificationEnumType20.h index 638a5c54..d5f16df1 100644 --- a/src/ocpp20/types/EventNotificationEnumType20.h +++ b/src/ocpp20/types/EventNotificationEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_EVENTNOTIFICATIONENUMTYPE20_H -#define OPENOCPP_EVENTNOTIFICATIONENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_EVENTNOTIFICATIONENUMTYPE_H +#define OPENOCPP_OCPP20_EVENTNOTIFICATIONENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief Specifies the event notification type of the message. */ -enum class EventNotificationEnumType20 +enum class EventNotificationEnumType { HardWiredNotification, HardWiredMonitor, @@ -42,11 +42,11 @@ enum class EventNotificationEnumType20 CustomMonitor, }; -/** @brief Helper to convert a EventNotificationEnumType20 enum to string */ -extern const EnumToStringFromString EventNotificationEnumType20Helper; +/** @brief Helper to convert a EventNotificationEnumType enum to string */ +extern const EnumToStringFromString EventNotificationEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_EVENTNOTIFICATIONENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_EVENTNOTIFICATIONENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/EventTriggerEnumType20.cpp b/src/ocpp20/types/EventTriggerEnumType20.cpp index 9ca89338..2630e1de 100644 --- a/src/ocpp20/types/EventTriggerEnumType20.cpp +++ b/src/ocpp20/types/EventTriggerEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a EventTriggerEnumType20 enum to string */ -const EnumToStringFromString EventTriggerEnumType20Helper = { - {EventTriggerEnumType20::Alerting, "Alerting"}, - {EventTriggerEnumType20::Delta, "Delta"}, - {EventTriggerEnumType20::Periodic, "Periodic"}, +/** @brief Helper to convert a EventTriggerEnumType enum to string */ +const EnumToStringFromString EventTriggerEnumTypeHelper = { + {EventTriggerEnumType::Alerting, "Alerting"}, + {EventTriggerEnumType::Delta, "Delta"}, + {EventTriggerEnumType::Periodic, "Periodic"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/EventTriggerEnumType20.h b/src/ocpp20/types/EventTriggerEnumType20.h index a23ffa5a..1e5d2819 100644 --- a/src/ocpp20/types/EventTriggerEnumType20.h +++ b/src/ocpp20/types/EventTriggerEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_EVENTTRIGGERENUMTYPE20_H -#define OPENOCPP_EVENTTRIGGERENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_EVENTTRIGGERENUMTYPE_H +#define OPENOCPP_OCPP20_EVENTTRIGGERENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief Type of monitor that triggered this event, e.g. exceeding a threshold value. */ -enum class EventTriggerEnumType20 +enum class EventTriggerEnumType { Alerting, Delta, Periodic, }; -/** @brief Helper to convert a EventTriggerEnumType20 enum to string */ -extern const EnumToStringFromString EventTriggerEnumType20Helper; +/** @brief Helper to convert a EventTriggerEnumType enum to string */ +extern const EnumToStringFromString EventTriggerEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_EVENTTRIGGERENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_EVENTTRIGGERENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/FirmwareStatusEnumType20.cpp b/src/ocpp20/types/FirmwareStatusEnumType20.cpp index 26315c8d..abbff333 100644 --- a/src/ocpp20/types/FirmwareStatusEnumType20.cpp +++ b/src/ocpp20/types/FirmwareStatusEnumType20.cpp @@ -30,22 +30,22 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a FirmwareStatusEnumType20 enum to string */ -const EnumToStringFromString FirmwareStatusEnumType20Helper = { - {FirmwareStatusEnumType20::Downloaded, "Downloaded"}, - {FirmwareStatusEnumType20::DownloadFailed, "DownloadFailed"}, - {FirmwareStatusEnumType20::Downloading, "Downloading"}, - {FirmwareStatusEnumType20::DownloadScheduled, "DownloadScheduled"}, - {FirmwareStatusEnumType20::DownloadPaused, "DownloadPaused"}, - {FirmwareStatusEnumType20::Idle, "Idle"}, - {FirmwareStatusEnumType20::InstallationFailed, "InstallationFailed"}, - {FirmwareStatusEnumType20::Installing, "Installing"}, - {FirmwareStatusEnumType20::Installed, "Installed"}, - {FirmwareStatusEnumType20::InstallRebooting, "InstallRebooting"}, - {FirmwareStatusEnumType20::InstallScheduled, "InstallScheduled"}, - {FirmwareStatusEnumType20::InstallVerificationFailed, "InstallVerificationFailed"}, - {FirmwareStatusEnumType20::InvalidSignature, "InvalidSignature"}, - {FirmwareStatusEnumType20::SignatureVerified, "SignatureVerified"}, +/** @brief Helper to convert a FirmwareStatusEnumType enum to string */ +const EnumToStringFromString FirmwareStatusEnumTypeHelper = { + {FirmwareStatusEnumType::Downloaded, "Downloaded"}, + {FirmwareStatusEnumType::DownloadFailed, "DownloadFailed"}, + {FirmwareStatusEnumType::Downloading, "Downloading"}, + {FirmwareStatusEnumType::DownloadScheduled, "DownloadScheduled"}, + {FirmwareStatusEnumType::DownloadPaused, "DownloadPaused"}, + {FirmwareStatusEnumType::Idle, "Idle"}, + {FirmwareStatusEnumType::InstallationFailed, "InstallationFailed"}, + {FirmwareStatusEnumType::Installing, "Installing"}, + {FirmwareStatusEnumType::Installed, "Installed"}, + {FirmwareStatusEnumType::InstallRebooting, "InstallRebooting"}, + {FirmwareStatusEnumType::InstallScheduled, "InstallScheduled"}, + {FirmwareStatusEnumType::InstallVerificationFailed, "InstallVerificationFailed"}, + {FirmwareStatusEnumType::InvalidSignature, "InvalidSignature"}, + {FirmwareStatusEnumType::SignatureVerified, "SignatureVerified"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/FirmwareStatusEnumType20.h b/src/ocpp20/types/FirmwareStatusEnumType20.h index 6764bcf1..558ed57f 100644 --- a/src/ocpp20/types/FirmwareStatusEnumType20.h +++ b/src/ocpp20/types/FirmwareStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_FIRMWARESTATUSENUMTYPE20_H -#define OPENOCPP_FIRMWARESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_FIRMWARESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_FIRMWARESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief This contains the progress status of the firmware installation. */ -enum class FirmwareStatusEnumType20 +enum class FirmwareStatusEnumType { Downloaded, DownloadFailed, @@ -52,11 +52,11 @@ enum class FirmwareStatusEnumType20 SignatureVerified, }; -/** @brief Helper to convert a FirmwareStatusEnumType20 enum to string */ -extern const EnumToStringFromString FirmwareStatusEnumType20Helper; +/** @brief Helper to convert a FirmwareStatusEnumType enum to string */ +extern const EnumToStringFromString FirmwareStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_FIRMWARESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_FIRMWARESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/FirmwareType20.cpp b/src/ocpp20/types/FirmwareType20.cpp index 02e2b4dd..c3db84f2 100644 --- a/src/ocpp20/types/FirmwareType20.cpp +++ b/src/ocpp20/types/FirmwareType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a FirmwareType20 from a JSON representation */ -bool FirmwareType20Converter::fromJson(const rapidjson::Value& json, - FirmwareType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a FirmwareType from a JSON representation */ +bool FirmwareTypeConverter::fromJson(const rapidjson::Value& json, + FirmwareType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -70,15 +70,15 @@ bool FirmwareType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a FirmwareType20 to a JSON representation */ -bool FirmwareType20Converter::toJson(const FirmwareType20& data, rapidjson::Document& json) +/** @brief Convert a FirmwareType to a JSON representation */ +bool FirmwareTypeConverter::toJson(const FirmwareType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/FirmwareType20.h b/src/ocpp20/types/FirmwareType20.h index 0a4e8c87..99252cff 100644 --- a/src/ocpp20/types/FirmwareType20.h +++ b/src/ocpp20/types/FirmwareType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_FIRMWARETYPE20_H -#define OPENOCPP_FIRMWARETYPE20_H +#ifndef OPENOCPP_OCPP20_FIRMWARETYPE_H +#define OPENOCPP_OCPP20_FIRMWARETYPE_H #include "CustomDataType20.h" @@ -42,10 +42,10 @@ namespace ocpp20 urn:x-enexis:ecdm:uid:2:233291 Represents a copy of the firmware that can be loaded/updated on the Charging Station. */ -struct FirmwareType20 +struct FirmwareType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Firmware. Location. URI urn:x-enexis:ecdm:uid:1:569460 URI defining the origin of the firmware. */ @@ -67,25 +67,25 @@ Base64 encoded firmware signature. */ ocpp::types::Optional> signature; }; -/** @brief Converter class for FirmwareType20 type */ -class FirmwareType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for FirmwareType type */ +class FirmwareTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new FirmwareType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new FirmwareTypeConverter(); } - /** @brief Convert a FirmwareType20 from a JSON representation */ + /** @brief Convert a FirmwareType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - FirmwareType20& data, + FirmwareType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a FirmwareType20 to a JSON representation */ - bool toJson(const FirmwareType20& data, rapidjson::Document& json) override; + /** @brief Convert a FirmwareType to a JSON representation */ + bool toJson(const FirmwareType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_FIRMWARETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_FIRMWARETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/GenericDeviceModelStatusEnumType20.cpp b/src/ocpp20/types/GenericDeviceModelStatusEnumType20.cpp index 49cdf06c..4ab8f7a1 100644 --- a/src/ocpp20/types/GenericDeviceModelStatusEnumType20.cpp +++ b/src/ocpp20/types/GenericDeviceModelStatusEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a GenericDeviceModelStatusEnumType20 enum to string */ -const EnumToStringFromString GenericDeviceModelStatusEnumType20Helper = { - {GenericDeviceModelStatusEnumType20::Accepted, "Accepted"}, - {GenericDeviceModelStatusEnumType20::Rejected, "Rejected"}, - {GenericDeviceModelStatusEnumType20::NotSupported, "NotSupported"}, - {GenericDeviceModelStatusEnumType20::EmptyResultSet, "EmptyResultSet"}, +/** @brief Helper to convert a GenericDeviceModelStatusEnumType enum to string */ +const EnumToStringFromString GenericDeviceModelStatusEnumTypeHelper = { + {GenericDeviceModelStatusEnumType::Accepted, "Accepted"}, + {GenericDeviceModelStatusEnumType::Rejected, "Rejected"}, + {GenericDeviceModelStatusEnumType::NotSupported, "NotSupported"}, + {GenericDeviceModelStatusEnumType::EmptyResultSet, "EmptyResultSet"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/GenericDeviceModelStatusEnumType20.h b/src/ocpp20/types/GenericDeviceModelStatusEnumType20.h index b960ebf8..92b6819d 100644 --- a/src/ocpp20/types/GenericDeviceModelStatusEnumType20.h +++ b/src/ocpp20/types/GenericDeviceModelStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GENERICDEVICEMODELSTATUSENUMTYPE20_H -#define OPENOCPP_GENERICDEVICEMODELSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_GENERICDEVICEMODELSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_GENERICDEVICEMODELSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief This field indicates whether the Charging Station was able to accept the request. */ -enum class GenericDeviceModelStatusEnumType20 +enum class GenericDeviceModelStatusEnumType { Accepted, Rejected, @@ -42,11 +42,11 @@ enum class GenericDeviceModelStatusEnumType20 EmptyResultSet, }; -/** @brief Helper to convert a GenericDeviceModelStatusEnumType20 enum to string */ -extern const EnumToStringFromString GenericDeviceModelStatusEnumType20Helper; +/** @brief Helper to convert a GenericDeviceModelStatusEnumType enum to string */ +extern const EnumToStringFromString GenericDeviceModelStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_GENERICDEVICEMODELSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GENERICDEVICEMODELSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/GenericStatusEnumType20.cpp b/src/ocpp20/types/GenericStatusEnumType20.cpp index 74fe8f0a..54452e71 100644 --- a/src/ocpp20/types/GenericStatusEnumType20.cpp +++ b/src/ocpp20/types/GenericStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a GenericStatusEnumType20 enum to string */ -const EnumToStringFromString GenericStatusEnumType20Helper = { - {GenericStatusEnumType20::Accepted, "Accepted"}, - {GenericStatusEnumType20::Rejected, "Rejected"}, +/** @brief Helper to convert a GenericStatusEnumType enum to string */ +const EnumToStringFromString GenericStatusEnumTypeHelper = { + {GenericStatusEnumType::Accepted, "Accepted"}, + {GenericStatusEnumType::Rejected, "Rejected"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/GenericStatusEnumType20.h b/src/ocpp20/types/GenericStatusEnumType20.h index 41be01cc..f16486de 100644 --- a/src/ocpp20/types/GenericStatusEnumType20.h +++ b/src/ocpp20/types/GenericStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GENERICSTATUSENUMTYPE20_H -#define OPENOCPP_GENERICSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_GENERICSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_GENERICSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief Specifies whether the CSMS can process the request. */ -enum class GenericStatusEnumType20 +enum class GenericStatusEnumType { Accepted, Rejected, }; -/** @brief Helper to convert a GenericStatusEnumType20 enum to string */ -extern const EnumToStringFromString GenericStatusEnumType20Helper; +/** @brief Helper to convert a GenericStatusEnumType enum to string */ +extern const EnumToStringFromString GenericStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_GENERICSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GENERICSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/GetCertificateIdUseEnumType20.cpp b/src/ocpp20/types/GetCertificateIdUseEnumType20.cpp index 26879c52..215e8567 100644 --- a/src/ocpp20/types/GetCertificateIdUseEnumType20.cpp +++ b/src/ocpp20/types/GetCertificateIdUseEnumType20.cpp @@ -30,13 +30,13 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a GetCertificateIdUseEnumType20 enum to string */ -const EnumToStringFromString GetCertificateIdUseEnumType20Helper = { - {GetCertificateIdUseEnumType20::V2GRootCertificate, "V2GRootCertificate"}, - {GetCertificateIdUseEnumType20::MORootCertificate, "MORootCertificate"}, - {GetCertificateIdUseEnumType20::CSMSRootCertificate, "CSMSRootCertificate"}, - {GetCertificateIdUseEnumType20::V2GCertificateChain, "V2GCertificateChain"}, - {GetCertificateIdUseEnumType20::ManufacturerRootCertificate, "ManufacturerRootCertificate"}, +/** @brief Helper to convert a GetCertificateIdUseEnumType enum to string */ +const EnumToStringFromString GetCertificateIdUseEnumTypeHelper = { + {GetCertificateIdUseEnumType::V2GRootCertificate, "V2GRootCertificate"}, + {GetCertificateIdUseEnumType::MORootCertificate, "MORootCertificate"}, + {GetCertificateIdUseEnumType::CSMSRootCertificate, "CSMSRootCertificate"}, + {GetCertificateIdUseEnumType::V2GCertificateChain, "V2GCertificateChain"}, + {GetCertificateIdUseEnumType::ManufacturerRootCertificate, "ManufacturerRootCertificate"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/GetCertificateIdUseEnumType20.h b/src/ocpp20/types/GetCertificateIdUseEnumType20.h index 39be957c..cfbe1e0f 100644 --- a/src/ocpp20/types/GetCertificateIdUseEnumType20.h +++ b/src/ocpp20/types/GetCertificateIdUseEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETCERTIFICATEIDUSEENUMTYPE20_H -#define OPENOCPP_GETCERTIFICATEIDUSEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_GETCERTIFICATEIDUSEENUMTYPE_H +#define OPENOCPP_OCPP20_GETCERTIFICATEIDUSEENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief Indicates the type of the requested certificate(s). */ -enum class GetCertificateIdUseEnumType20 +enum class GetCertificateIdUseEnumType { V2GRootCertificate, MORootCertificate, @@ -43,11 +43,11 @@ enum class GetCertificateIdUseEnumType20 ManufacturerRootCertificate, }; -/** @brief Helper to convert a GetCertificateIdUseEnumType20 enum to string */ -extern const EnumToStringFromString GetCertificateIdUseEnumType20Helper; +/** @brief Helper to convert a GetCertificateIdUseEnumType enum to string */ +extern const EnumToStringFromString GetCertificateIdUseEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_GETCERTIFICATEIDUSEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETCERTIFICATEIDUSEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/GetCertificateStatusEnumType20.cpp b/src/ocpp20/types/GetCertificateStatusEnumType20.cpp index 6335dddf..2abc2b98 100644 --- a/src/ocpp20/types/GetCertificateStatusEnumType20.cpp +++ b/src/ocpp20/types/GetCertificateStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a GetCertificateStatusEnumType20 enum to string */ -const EnumToStringFromString GetCertificateStatusEnumType20Helper = { - {GetCertificateStatusEnumType20::Accepted, "Accepted"}, - {GetCertificateStatusEnumType20::Failed, "Failed"}, +/** @brief Helper to convert a GetCertificateStatusEnumType enum to string */ +const EnumToStringFromString GetCertificateStatusEnumTypeHelper = { + {GetCertificateStatusEnumType::Accepted, "Accepted"}, + {GetCertificateStatusEnumType::Failed, "Failed"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/GetCertificateStatusEnumType20.h b/src/ocpp20/types/GetCertificateStatusEnumType20.h index 3203e564..9bc47612 100644 --- a/src/ocpp20/types/GetCertificateStatusEnumType20.h +++ b/src/ocpp20/types/GetCertificateStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETCERTIFICATESTATUSENUMTYPE20_H -#define OPENOCPP_GETCERTIFICATESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_GETCERTIFICATESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_GETCERTIFICATESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief This indicates whether the charging station was able to retrieve the OCSP certificate status. */ -enum class GetCertificateStatusEnumType20 +enum class GetCertificateStatusEnumType { Accepted, Failed, }; -/** @brief Helper to convert a GetCertificateStatusEnumType20 enum to string */ -extern const EnumToStringFromString GetCertificateStatusEnumType20Helper; +/** @brief Helper to convert a GetCertificateStatusEnumType enum to string */ +extern const EnumToStringFromString GetCertificateStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_GETCERTIFICATESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETCERTIFICATESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/GetChargingProfileStatusEnumType20.cpp b/src/ocpp20/types/GetChargingProfileStatusEnumType20.cpp index 740c2e60..ab7f92a8 100644 --- a/src/ocpp20/types/GetChargingProfileStatusEnumType20.cpp +++ b/src/ocpp20/types/GetChargingProfileStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a GetChargingProfileStatusEnumType20 enum to string */ -const EnumToStringFromString GetChargingProfileStatusEnumType20Helper = { - {GetChargingProfileStatusEnumType20::Accepted, "Accepted"}, - {GetChargingProfileStatusEnumType20::NoProfiles, "NoProfiles"}, +/** @brief Helper to convert a GetChargingProfileStatusEnumType enum to string */ +const EnumToStringFromString GetChargingProfileStatusEnumTypeHelper = { + {GetChargingProfileStatusEnumType::Accepted, "Accepted"}, + {GetChargingProfileStatusEnumType::NoProfiles, "NoProfiles"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/GetChargingProfileStatusEnumType20.h b/src/ocpp20/types/GetChargingProfileStatusEnumType20.h index f740a53d..aa545a1e 100644 --- a/src/ocpp20/types/GetChargingProfileStatusEnumType20.h +++ b/src/ocpp20/types/GetChargingProfileStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETCHARGINGPROFILESTATUSENUMTYPE20_H -#define OPENOCPP_GETCHARGINGPROFILESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_GETCHARGINGPROFILESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_GETCHARGINGPROFILESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief This indicates whether the Charging Station is able to process this request and will send <<reportchargingprofilesrequest, ReportChargingProfilesRequest>> messages. */ -enum class GetChargingProfileStatusEnumType20 +enum class GetChargingProfileStatusEnumType { Accepted, NoProfiles, }; -/** @brief Helper to convert a GetChargingProfileStatusEnumType20 enum to string */ -extern const EnumToStringFromString GetChargingProfileStatusEnumType20Helper; +/** @brief Helper to convert a GetChargingProfileStatusEnumType enum to string */ +extern const EnumToStringFromString GetChargingProfileStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_GETCHARGINGPROFILESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETCHARGINGPROFILESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/GetDisplayMessagesStatusEnumType20.cpp b/src/ocpp20/types/GetDisplayMessagesStatusEnumType20.cpp index f9de0cc1..c9ab8d5e 100644 --- a/src/ocpp20/types/GetDisplayMessagesStatusEnumType20.cpp +++ b/src/ocpp20/types/GetDisplayMessagesStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a GetDisplayMessagesStatusEnumType20 enum to string */ -const EnumToStringFromString GetDisplayMessagesStatusEnumType20Helper = { - {GetDisplayMessagesStatusEnumType20::Accepted, "Accepted"}, - {GetDisplayMessagesStatusEnumType20::Unknown, "Unknown"}, +/** @brief Helper to convert a GetDisplayMessagesStatusEnumType enum to string */ +const EnumToStringFromString GetDisplayMessagesStatusEnumTypeHelper = { + {GetDisplayMessagesStatusEnumType::Accepted, "Accepted"}, + {GetDisplayMessagesStatusEnumType::Unknown, "Unknown"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/GetDisplayMessagesStatusEnumType20.h b/src/ocpp20/types/GetDisplayMessagesStatusEnumType20.h index 78178654..84bf3ead 100644 --- a/src/ocpp20/types/GetDisplayMessagesStatusEnumType20.h +++ b/src/ocpp20/types/GetDisplayMessagesStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETDISPLAYMESSAGESSTATUSENUMTYPE20_H -#define OPENOCPP_GETDISPLAYMESSAGESSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_GETDISPLAYMESSAGESSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_GETDISPLAYMESSAGESSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief Indicates if the Charging Station has Display Messages that match the request criteria in the <<getdisplaymessagesrequest,GetDisplayMessagesRequest>> */ -enum class GetDisplayMessagesStatusEnumType20 +enum class GetDisplayMessagesStatusEnumType { Accepted, Unknown, }; -/** @brief Helper to convert a GetDisplayMessagesStatusEnumType20 enum to string */ -extern const EnumToStringFromString GetDisplayMessagesStatusEnumType20Helper; +/** @brief Helper to convert a GetDisplayMessagesStatusEnumType enum to string */ +extern const EnumToStringFromString GetDisplayMessagesStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_GETDISPLAYMESSAGESSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETDISPLAYMESSAGESSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/GetInstalledCertificateStatusEnumType20.cpp b/src/ocpp20/types/GetInstalledCertificateStatusEnumType20.cpp index af080349..bc60f3bf 100644 --- a/src/ocpp20/types/GetInstalledCertificateStatusEnumType20.cpp +++ b/src/ocpp20/types/GetInstalledCertificateStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a GetInstalledCertificateStatusEnumType20 enum to string */ -const EnumToStringFromString GetInstalledCertificateStatusEnumType20Helper = { - {GetInstalledCertificateStatusEnumType20::Accepted, "Accepted"}, - {GetInstalledCertificateStatusEnumType20::NotFound, "NotFound"}, +/** @brief Helper to convert a GetInstalledCertificateStatusEnumType enum to string */ +const EnumToStringFromString GetInstalledCertificateStatusEnumTypeHelper = { + {GetInstalledCertificateStatusEnumType::Accepted, "Accepted"}, + {GetInstalledCertificateStatusEnumType::NotFound, "NotFound"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/GetInstalledCertificateStatusEnumType20.h b/src/ocpp20/types/GetInstalledCertificateStatusEnumType20.h index 68dc2bb0..84d72c8e 100644 --- a/src/ocpp20/types/GetInstalledCertificateStatusEnumType20.h +++ b/src/ocpp20/types/GetInstalledCertificateStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETINSTALLEDCERTIFICATESTATUSENUMTYPE20_H -#define OPENOCPP_GETINSTALLEDCERTIFICATESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_GETINSTALLEDCERTIFICATESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_GETINSTALLEDCERTIFICATESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief Charging Station indicates if it can process the request. */ -enum class GetInstalledCertificateStatusEnumType20 +enum class GetInstalledCertificateStatusEnumType { Accepted, NotFound, }; -/** @brief Helper to convert a GetInstalledCertificateStatusEnumType20 enum to string */ -extern const EnumToStringFromString GetInstalledCertificateStatusEnumType20Helper; +/** @brief Helper to convert a GetInstalledCertificateStatusEnumType enum to string */ +extern const EnumToStringFromString GetInstalledCertificateStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_GETINSTALLEDCERTIFICATESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETINSTALLEDCERTIFICATESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/GetVariableDataType20.cpp b/src/ocpp20/types/GetVariableDataType20.cpp index b3ec70df..d327bdf6 100644 --- a/src/ocpp20/types/GetVariableDataType20.cpp +++ b/src/ocpp20/types/GetVariableDataType20.cpp @@ -32,33 +32,33 @@ namespace types namespace ocpp20 { -/** @brief Convert a GetVariableDataType20 from a JSON representation */ -bool GetVariableDataType20Converter::fromJson(const rapidjson::Value& json, - GetVariableDataType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a GetVariableDataType from a JSON representation */ +bool GetVariableDataTypeConverter::fromJson(const rapidjson::Value& json, + GetVariableDataType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // attributeType if (json.HasMember("attributeType")) { - data.attributeType = AttributeEnumType20Helper.fromString(json["attributeType"].GetString()); + data.attributeType = AttributeEnumTypeHelper.fromString(json["attributeType"].GetString()); } // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; ret = ret && component_converter.fromJson(json["component"], data.component, error_code, error_message); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; ret = ret && variable_converter.fromJson(json["variable"], data.variable, error_code, error_message); if (!ret) @@ -69,15 +69,15 @@ bool GetVariableDataType20Converter::fromJson(const rapidjson::Value& json return ret; } -/** @brief Convert a GetVariableDataType20 to a JSON representation */ -bool GetVariableDataType20Converter::toJson(const GetVariableDataType20& data, rapidjson::Document& json) +/** @brief Convert a GetVariableDataType to a JSON representation */ +bool GetVariableDataTypeConverter::toJson(const GetVariableDataType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -88,11 +88,11 @@ bool GetVariableDataType20Converter::toJson(const GetVariableDataType20& data, r // attributeType if (data.attributeType.isSet()) { - fill(json, "attributeType", AttributeEnumType20Helper.toString(data.attributeType)); + fill(json, "attributeType", AttributeEnumTypeHelper.toString(data.attributeType)); } // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; component_converter.setAllocator(allocator); rapidjson::Document component_doc; component_doc.Parse("{}"); @@ -100,7 +100,7 @@ bool GetVariableDataType20Converter::toJson(const GetVariableDataType20& data, r json.AddMember(rapidjson::StringRef("component"), component_doc.Move(), *allocator); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; variable_converter.setAllocator(allocator); rapidjson::Document variable_doc; variable_doc.Parse("{}"); diff --git a/src/ocpp20/types/GetVariableDataType20.h b/src/ocpp20/types/GetVariableDataType20.h index e8116340..a3cd8991 100644 --- a/src/ocpp20/types/GetVariableDataType20.h +++ b/src/ocpp20/types/GetVariableDataType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETVARIABLEDATATYPE20_H -#define OPENOCPP_GETVARIABLEDATATYPE20_H +#ifndef OPENOCPP_OCPP20_GETVARIABLEDATATYPE_H +#define OPENOCPP_OCPP20_GETVARIABLEDATATYPE_H #include "AttributeEnumType20.h" #include "ComponentType20.h" @@ -41,37 +41,37 @@ namespace ocpp20 /** @brief Class to hold parameters for GetVariables request. */ -struct GetVariableDataType20 +struct GetVariableDataType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional attributeType; + ocpp::types::Optional attributeType; /** @brief */ - ComponentType20 component; + ComponentType component; /** @brief */ - VariableType20 variable; + VariableType variable; }; -/** @brief Converter class for GetVariableDataType20 type */ -class GetVariableDataType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for GetVariableDataType type */ +class GetVariableDataTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new GetVariableDataType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new GetVariableDataTypeConverter(); } - /** @brief Convert a GetVariableDataType20 from a JSON representation */ + /** @brief Convert a GetVariableDataType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - GetVariableDataType20& data, + GetVariableDataType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a GetVariableDataType20 to a JSON representation */ - bool toJson(const GetVariableDataType20& data, rapidjson::Document& json) override; + /** @brief Convert a GetVariableDataType to a JSON representation */ + bool toJson(const GetVariableDataType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_GETVARIABLEDATATYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETVARIABLEDATATYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/GetVariableResultType20.cpp b/src/ocpp20/types/GetVariableResultType20.cpp index cf2424a7..46df60a9 100644 --- a/src/ocpp20/types/GetVariableResultType20.cpp +++ b/src/ocpp20/types/GetVariableResultType20.cpp @@ -32,47 +32,47 @@ namespace types namespace ocpp20 { -/** @brief Convert a GetVariableResultType20 from a JSON representation */ -bool GetVariableResultType20Converter::fromJson(const rapidjson::Value& json, - GetVariableResultType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a GetVariableResultType from a JSON representation */ +bool GetVariableResultTypeConverter::fromJson(const rapidjson::Value& json, + GetVariableResultType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // attributeStatusInfo if (json.HasMember("attributeStatusInfo")) { - StatusInfoType20Converter attributeStatusInfo_converter; + StatusInfoTypeConverter attributeStatusInfo_converter; ret = ret && attributeStatusInfo_converter.fromJson(json["attributeStatusInfo"], data.attributeStatusInfo, error_code, error_message); } // attributeStatus - data.attributeStatus = GetVariableStatusEnumType20Helper.fromString(json["attributeStatus"].GetString()); + data.attributeStatus = GetVariableStatusEnumTypeHelper.fromString(json["attributeStatus"].GetString()); // attributeType if (json.HasMember("attributeType")) { - data.attributeType = AttributeEnumType20Helper.fromString(json["attributeType"].GetString()); + data.attributeType = AttributeEnumTypeHelper.fromString(json["attributeType"].GetString()); } // attributeValue extract(json, "attributeValue", data.attributeValue); // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; ret = ret && component_converter.fromJson(json["component"], data.component, error_code, error_message); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; ret = ret && variable_converter.fromJson(json["variable"], data.variable, error_code, error_message); if (!ret) @@ -83,15 +83,15 @@ bool GetVariableResultType20Converter::fromJson(const rapidjson::Value& js return ret; } -/** @brief Convert a GetVariableResultType20 to a JSON representation */ -bool GetVariableResultType20Converter::toJson(const GetVariableResultType20& data, rapidjson::Document& json) +/** @brief Convert a GetVariableResultType to a JSON representation */ +bool GetVariableResultTypeConverter::toJson(const GetVariableResultType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -102,7 +102,7 @@ bool GetVariableResultType20Converter::toJson(const GetVariableResultType20& dat // attributeStatusInfo if (data.attributeStatusInfo.isSet()) { - StatusInfoType20Converter attributeStatusInfo_converter; + StatusInfoTypeConverter attributeStatusInfo_converter; attributeStatusInfo_converter.setAllocator(allocator); rapidjson::Document attributeStatusInfo_doc; attributeStatusInfo_doc.Parse("{}"); @@ -111,19 +111,19 @@ bool GetVariableResultType20Converter::toJson(const GetVariableResultType20& dat } // attributeStatus - fill(json, "attributeStatus", GetVariableStatusEnumType20Helper.toString(data.attributeStatus)); + fill(json, "attributeStatus", GetVariableStatusEnumTypeHelper.toString(data.attributeStatus)); // attributeType if (data.attributeType.isSet()) { - fill(json, "attributeType", AttributeEnumType20Helper.toString(data.attributeType)); + fill(json, "attributeType", AttributeEnumTypeHelper.toString(data.attributeType)); } // attributeValue fill(json, "attributeValue", data.attributeValue); // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; component_converter.setAllocator(allocator); rapidjson::Document component_doc; component_doc.Parse("{}"); @@ -131,7 +131,7 @@ bool GetVariableResultType20Converter::toJson(const GetVariableResultType20& dat json.AddMember(rapidjson::StringRef("component"), component_doc.Move(), *allocator); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; variable_converter.setAllocator(allocator); rapidjson::Document variable_doc; variable_doc.Parse("{}"); diff --git a/src/ocpp20/types/GetVariableResultType20.h b/src/ocpp20/types/GetVariableResultType20.h index 7b8bdecb..2bc638fa 100644 --- a/src/ocpp20/types/GetVariableResultType20.h +++ b/src/ocpp20/types/GetVariableResultType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETVARIABLERESULTTYPE20_H -#define OPENOCPP_GETVARIABLERESULTTYPE20_H +#ifndef OPENOCPP_OCPP20_GETVARIABLERESULTTYPE_H +#define OPENOCPP_OCPP20_GETVARIABLERESULTTYPE_H #include "AttributeEnumType20.h" #include "ComponentType20.h" @@ -44,45 +44,45 @@ namespace ocpp20 /** @brief Class to hold results of GetVariables request. */ -struct GetVariableResultType20 +struct GetVariableResultType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional attributeStatusInfo; + ocpp::types::Optional attributeStatusInfo; /** @brief */ - GetVariableStatusEnumType20 attributeStatus; + GetVariableStatusEnumType attributeStatus; /** @brief */ - ocpp::types::Optional attributeType; + ocpp::types::Optional attributeType; /** @brief Value of requested attribute type of component-variable. This field can only be empty when the given status is NOT accepted. The Configuration Variable <<configkey-reporting-value-size,ReportingValueSize>> can be used to limit GetVariableResult.attributeValue, VariableAttribute.value and EventData.actualValue. The max size of these values will always remain equal. */ ocpp::types::Optional> attributeValue; /** @brief */ - ComponentType20 component; + ComponentType component; /** @brief */ - VariableType20 variable; + VariableType variable; }; -/** @brief Converter class for GetVariableResultType20 type */ -class GetVariableResultType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for GetVariableResultType type */ +class GetVariableResultTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new GetVariableResultType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new GetVariableResultTypeConverter(); } - /** @brief Convert a GetVariableResultType20 from a JSON representation */ + /** @brief Convert a GetVariableResultType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - GetVariableResultType20& data, + GetVariableResultType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a GetVariableResultType20 to a JSON representation */ - bool toJson(const GetVariableResultType20& data, rapidjson::Document& json) override; + /** @brief Convert a GetVariableResultType to a JSON representation */ + bool toJson(const GetVariableResultType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_GETVARIABLERESULTTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETVARIABLERESULTTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/GetVariableStatusEnumType20.cpp b/src/ocpp20/types/GetVariableStatusEnumType20.cpp index c3b8dc56..fd6dd511 100644 --- a/src/ocpp20/types/GetVariableStatusEnumType20.cpp +++ b/src/ocpp20/types/GetVariableStatusEnumType20.cpp @@ -30,13 +30,13 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a GetVariableStatusEnumType20 enum to string */ -const EnumToStringFromString GetVariableStatusEnumType20Helper = { - {GetVariableStatusEnumType20::Accepted, "Accepted"}, - {GetVariableStatusEnumType20::Rejected, "Rejected"}, - {GetVariableStatusEnumType20::UnknownComponent, "UnknownComponent"}, - {GetVariableStatusEnumType20::UnknownVariable, "UnknownVariable"}, - {GetVariableStatusEnumType20::NotSupportedAttributeType, "NotSupportedAttributeType"}, +/** @brief Helper to convert a GetVariableStatusEnumType enum to string */ +const EnumToStringFromString GetVariableStatusEnumTypeHelper = { + {GetVariableStatusEnumType::Accepted, "Accepted"}, + {GetVariableStatusEnumType::Rejected, "Rejected"}, + {GetVariableStatusEnumType::UnknownComponent, "UnknownComponent"}, + {GetVariableStatusEnumType::UnknownVariable, "UnknownVariable"}, + {GetVariableStatusEnumType::NotSupportedAttributeType, "NotSupportedAttributeType"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/GetVariableStatusEnumType20.h b/src/ocpp20/types/GetVariableStatusEnumType20.h index 3d3dc525..4a0ec258 100644 --- a/src/ocpp20/types/GetVariableStatusEnumType20.h +++ b/src/ocpp20/types/GetVariableStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_GETVARIABLESTATUSENUMTYPE20_H -#define OPENOCPP_GETVARIABLESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_GETVARIABLESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_GETVARIABLESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief Result status of getting the variable. */ -enum class GetVariableStatusEnumType20 +enum class GetVariableStatusEnumType { Accepted, Rejected, @@ -43,11 +43,11 @@ enum class GetVariableStatusEnumType20 NotSupportedAttributeType, }; -/** @brief Helper to convert a GetVariableStatusEnumType20 enum to string */ -extern const EnumToStringFromString GetVariableStatusEnumType20Helper; +/** @brief Helper to convert a GetVariableStatusEnumType enum to string */ +extern const EnumToStringFromString GetVariableStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_GETVARIABLESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_GETVARIABLESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/HashAlgorithmEnumType20.cpp b/src/ocpp20/types/HashAlgorithmEnumType20.cpp index 277e7294..388fc608 100644 --- a/src/ocpp20/types/HashAlgorithmEnumType20.cpp +++ b/src/ocpp20/types/HashAlgorithmEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a HashAlgorithmEnumType20 enum to string */ -const EnumToStringFromString HashAlgorithmEnumType20Helper = { - {HashAlgorithmEnumType20::SHA256, "SHA256"}, - {HashAlgorithmEnumType20::SHA384, "SHA384"}, - {HashAlgorithmEnumType20::SHA512, "SHA512"}, +/** @brief Helper to convert a HashAlgorithmEnumType enum to string */ +const EnumToStringFromString HashAlgorithmEnumTypeHelper = { + {HashAlgorithmEnumType::SHA256, "SHA256"}, + {HashAlgorithmEnumType::SHA384, "SHA384"}, + {HashAlgorithmEnumType::SHA512, "SHA512"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/HashAlgorithmEnumType20.h b/src/ocpp20/types/HashAlgorithmEnumType20.h index 89daa0b0..e2967830 100644 --- a/src/ocpp20/types/HashAlgorithmEnumType20.h +++ b/src/ocpp20/types/HashAlgorithmEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_HASHALGORITHMENUMTYPE20_H -#define OPENOCPP_HASHALGORITHMENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_HASHALGORITHMENUMTYPE_H +#define OPENOCPP_OCPP20_HASHALGORITHMENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief Used algorithms for the hashes provided. */ -enum class HashAlgorithmEnumType20 +enum class HashAlgorithmEnumType { SHA256, SHA384, SHA512, }; -/** @brief Helper to convert a HashAlgorithmEnumType20 enum to string */ -extern const EnumToStringFromString HashAlgorithmEnumType20Helper; +/** @brief Helper to convert a HashAlgorithmEnumType enum to string */ +extern const EnumToStringFromString HashAlgorithmEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_HASHALGORITHMENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_HASHALGORITHMENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/IdTokenEnumType20.cpp b/src/ocpp20/types/IdTokenEnumType20.cpp index c323d7d5..928b6291 100644 --- a/src/ocpp20/types/IdTokenEnumType20.cpp +++ b/src/ocpp20/types/IdTokenEnumType20.cpp @@ -30,16 +30,16 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a IdTokenEnumType20 enum to string */ -const EnumToStringFromString IdTokenEnumType20Helper = { - {IdTokenEnumType20::Central, "Central"}, - {IdTokenEnumType20::eMAID, "eMAID"}, - {IdTokenEnumType20::ISO14443, "ISO14443"}, - {IdTokenEnumType20::ISO15693, "ISO15693"}, - {IdTokenEnumType20::KeyCode, "KeyCode"}, - {IdTokenEnumType20::Local, "Local"}, - {IdTokenEnumType20::MacAddress, "MacAddress"}, - {IdTokenEnumType20::NoAuthorization, "NoAuthorization"}, +/** @brief Helper to convert a IdTokenEnumType enum to string */ +const EnumToStringFromString IdTokenEnumTypeHelper = { + {IdTokenEnumType::Central, "Central"}, + {IdTokenEnumType::eMAID, "eMAID"}, + {IdTokenEnumType::ISO14443, "ISO14443"}, + {IdTokenEnumType::ISO15693, "ISO15693"}, + {IdTokenEnumType::KeyCode, "KeyCode"}, + {IdTokenEnumType::Local, "Local"}, + {IdTokenEnumType::MacAddress, "MacAddress"}, + {IdTokenEnumType::NoAuthorization, "NoAuthorization"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/IdTokenEnumType20.h b/src/ocpp20/types/IdTokenEnumType20.h index 36e14eac..ab7b434c 100644 --- a/src/ocpp20/types/IdTokenEnumType20.h +++ b/src/ocpp20/types/IdTokenEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_IDTOKENENUMTYPE20_H -#define OPENOCPP_IDTOKENENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_IDTOKENENUMTYPE_H +#define OPENOCPP_OCPP20_IDTOKENENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief Enumeration of possible idToken types. */ -enum class IdTokenEnumType20 +enum class IdTokenEnumType { Central, eMAID, @@ -46,11 +46,11 @@ enum class IdTokenEnumType20 NoAuthorization, }; -/** @brief Helper to convert a IdTokenEnumType20 enum to string */ -extern const EnumToStringFromString IdTokenEnumType20Helper; +/** @brief Helper to convert a IdTokenEnumType enum to string */ +extern const EnumToStringFromString IdTokenEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_IDTOKENENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_IDTOKENENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/IdTokenInfoType20.cpp b/src/ocpp20/types/IdTokenInfoType20.cpp index 36f62f04..a186a206 100644 --- a/src/ocpp20/types/IdTokenInfoType20.cpp +++ b/src/ocpp20/types/IdTokenInfoType20.cpp @@ -32,23 +32,23 @@ namespace types namespace ocpp20 { -/** @brief Convert a IdTokenInfoType20 from a JSON representation */ -bool IdTokenInfoType20Converter::fromJson(const rapidjson::Value& json, - IdTokenInfoType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a IdTokenInfoType from a JSON representation */ +bool IdTokenInfoTypeConverter::fromJson(const rapidjson::Value& json, + IdTokenInfoType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // status - data.status = AuthorizationStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = AuthorizationStatusEnumTypeHelper.fromString(json["status"].GetString()); // cacheExpiryDateTime ret = ret && extract(json, "cacheExpiryDateTime", data.cacheExpiryDateTime, error_message); @@ -73,7 +73,7 @@ bool IdTokenInfoType20Converter::fromJson(const rapidjson::Value& json, // groupIdToken if (json.HasMember("groupIdToken")) { - IdTokenType20Converter groupIdToken_converter; + IdTokenTypeConverter groupIdToken_converter; ret = ret && groupIdToken_converter.fromJson(json["groupIdToken"], data.groupIdToken, error_code, error_message); } @@ -83,7 +83,7 @@ bool IdTokenInfoType20Converter::fromJson(const rapidjson::Value& json, // personalMessage if (json.HasMember("personalMessage")) { - MessageContentType20Converter personalMessage_converter; + MessageContentTypeConverter personalMessage_converter; ret = ret && personalMessage_converter.fromJson(json["personalMessage"], data.personalMessage, error_code, error_message); } @@ -95,15 +95,15 @@ bool IdTokenInfoType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a IdTokenInfoType20 to a JSON representation */ -bool IdTokenInfoType20Converter::toJson(const IdTokenInfoType20& data, rapidjson::Document& json) +/** @brief Convert a IdTokenInfoType to a JSON representation */ +bool IdTokenInfoTypeConverter::toJson(const IdTokenInfoType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -112,7 +112,7 @@ bool IdTokenInfoType20Converter::toJson(const IdTokenInfoType20& data, rapidjson } // status - fill(json, "status", AuthorizationStatusEnumType20Helper.toString(data.status)); + fill(json, "status", AuthorizationStatusEnumTypeHelper.toString(data.status)); // cacheExpiryDateTime fill(json, "cacheExpiryDateTime", data.cacheExpiryDateTime); @@ -138,7 +138,7 @@ bool IdTokenInfoType20Converter::toJson(const IdTokenInfoType20& data, rapidjson // groupIdToken if (data.groupIdToken.isSet()) { - IdTokenType20Converter groupIdToken_converter; + IdTokenTypeConverter groupIdToken_converter; groupIdToken_converter.setAllocator(allocator); rapidjson::Document groupIdToken_doc; groupIdToken_doc.Parse("{}"); @@ -152,7 +152,7 @@ bool IdTokenInfoType20Converter::toJson(const IdTokenInfoType20& data, rapidjson // personalMessage if (data.personalMessage.isSet()) { - MessageContentType20Converter personalMessage_converter; + MessageContentTypeConverter personalMessage_converter; personalMessage_converter.setAllocator(allocator); rapidjson::Document personalMessage_doc; personalMessage_doc.Parse("{}"); diff --git a/src/ocpp20/types/IdTokenInfoType20.h b/src/ocpp20/types/IdTokenInfoType20.h index 384df392..87df6698 100644 --- a/src/ocpp20/types/IdTokenInfoType20.h +++ b/src/ocpp20/types/IdTokenInfoType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_IDTOKENINFOTYPE20_H -#define OPENOCPP_IDTOKENINFOTYPE20_H +#ifndef OPENOCPP_OCPP20_IDTOKENINFOTYPE_H +#define OPENOCPP_OCPP20_IDTOKENINFOTYPE_H #include "AuthorizationStatusEnumType20.h" #include "CustomDataType20.h" @@ -47,12 +47,12 @@ urn:x-oca:ocpp:uid:2:233247 Contains status information about an identifier. It is advised to not stop charging for a token that expires during charging, as ExpiryDate is only used for caching purposes. If ExpiryDate is not given, the status has no end date. */ -struct IdTokenInfoType20 +struct IdTokenInfoType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - AuthorizationStatusEnumType20 status; + AuthorizationStatusEnumType status; /** @brief ID_ Token. Expiry. Date_ Time urn:x-oca:ocpp:uid:1:569373 Date and Time after which the token must be considered invalid. */ @@ -66,34 +66,34 @@ Preferred user interface language of identifier user. Contains a language code a /** @brief Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station. */ std::vector evseId; /** @brief */ - ocpp::types::Optional groupIdToken; + ocpp::types::Optional groupIdToken; /** @brief ID_ Token. Language2. Language_ Code urn:x-oca:ocpp:uid:1:569375 Second preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. */ ocpp::types::Optional> language2; /** @brief */ - ocpp::types::Optional personalMessage; + ocpp::types::Optional personalMessage; }; -/** @brief Converter class for IdTokenInfoType20 type */ -class IdTokenInfoType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for IdTokenInfoType type */ +class IdTokenInfoTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new IdTokenInfoType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new IdTokenInfoTypeConverter(); } - /** @brief Convert a IdTokenInfoType20 from a JSON representation */ + /** @brief Convert a IdTokenInfoType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - IdTokenInfoType20& data, + IdTokenInfoType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a IdTokenInfoType20 to a JSON representation */ - bool toJson(const IdTokenInfoType20& data, rapidjson::Document& json) override; + /** @brief Convert a IdTokenInfoType to a JSON representation */ + bool toJson(const IdTokenInfoType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_IDTOKENINFOTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_IDTOKENINFOTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/IdTokenType20.cpp b/src/ocpp20/types/IdTokenType20.cpp index b15854ac..e1823466 100644 --- a/src/ocpp20/types/IdTokenType20.cpp +++ b/src/ocpp20/types/IdTokenType20.cpp @@ -32,30 +32,30 @@ namespace types namespace ocpp20 { -/** @brief Convert a IdTokenType20 from a JSON representation */ -bool IdTokenType20Converter::fromJson(const rapidjson::Value& json, - IdTokenType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a IdTokenType from a JSON representation */ +bool IdTokenTypeConverter::fromJson(const rapidjson::Value& json, + IdTokenType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // additionalInfo if (json.HasMember("additionalInfo")) { - const rapidjson::Value& additionalInfo_json = json["additionalInfo"]; - AdditionalInfoType20Converter additionalInfo_converter; + const rapidjson::Value& additionalInfo_json = json["additionalInfo"]; + AdditionalInfoTypeConverter additionalInfo_converter; for (auto it = additionalInfo_json.Begin(); ret && (it != additionalInfo_json.End()); ++it) { - AdditionalInfoType20& item = data.additionalInfo.emplace_back(); - ret = ret && additionalInfo_converter.fromJson(*it, item, error_code, error_message); + AdditionalInfoType& item = data.additionalInfo.emplace_back(); + ret = ret && additionalInfo_converter.fromJson(*it, item, error_code, error_message); } } @@ -63,7 +63,7 @@ bool IdTokenType20Converter::fromJson(const rapidjson::Value& json, extract(json, "idToken", data.idToken); // type - data.type = IdTokenEnumType20Helper.fromString(json["type"].GetString()); + data.type = IdTokenEnumTypeHelper.fromString(json["type"].GetString()); if (!ret) { @@ -73,15 +73,15 @@ bool IdTokenType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a IdTokenType20 to a JSON representation */ -bool IdTokenType20Converter::toJson(const IdTokenType20& data, rapidjson::Document& json) +/** @brief Convert a IdTokenType to a JSON representation */ +bool IdTokenTypeConverter::toJson(const IdTokenType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -93,10 +93,10 @@ bool IdTokenType20Converter::toJson(const IdTokenType20& data, rapidjson::Docume if (!data.additionalInfo.empty()) { - rapidjson::Value additionalInfo_json(rapidjson::kArrayType); - AdditionalInfoType20Converter additionalInfo_converter; + rapidjson::Value additionalInfo_json(rapidjson::kArrayType); + AdditionalInfoTypeConverter additionalInfo_converter; additionalInfo_converter.setAllocator(allocator); - for (const AdditionalInfoType20& item : data.additionalInfo) + for (const AdditionalInfoType& item : data.additionalInfo) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -110,7 +110,7 @@ bool IdTokenType20Converter::toJson(const IdTokenType20& data, rapidjson::Docume fill(json, "idToken", data.idToken); // type - fill(json, "type", IdTokenEnumType20Helper.toString(data.type)); + fill(json, "type", IdTokenEnumTypeHelper.toString(data.type)); return ret; } diff --git a/src/ocpp20/types/IdTokenType20.h b/src/ocpp20/types/IdTokenType20.h index 6327a9f5..df413df5 100644 --- a/src/ocpp20/types/IdTokenType20.h +++ b/src/ocpp20/types/IdTokenType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_IDTOKENTYPE20_H -#define OPENOCPP_IDTOKENTYPE20_H +#ifndef OPENOCPP_OCPP20_IDTOKENTYPE_H +#define OPENOCPP_OCPP20_IDTOKENTYPE_H #include "AdditionalInfoType20.h" #include "CustomDataType20.h" @@ -42,37 +42,37 @@ namespace ocpp20 /** @brief Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. */ -struct IdTokenType20 +struct IdTokenType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector additionalInfo; + std::vector additionalInfo; /** @brief IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID. */ ocpp::types::CiStringType<36u> idToken; /** @brief */ - IdTokenEnumType20 type; + IdTokenEnumType type; }; -/** @brief Converter class for IdTokenType20 type */ -class IdTokenType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for IdTokenType type */ +class IdTokenTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new IdTokenType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new IdTokenTypeConverter(); } - /** @brief Convert a IdTokenType20 from a JSON representation */ + /** @brief Convert a IdTokenType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - IdTokenType20& data, + IdTokenType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a IdTokenType20 to a JSON representation */ - bool toJson(const IdTokenType20& data, rapidjson::Document& json) override; + /** @brief Convert a IdTokenType to a JSON representation */ + bool toJson(const IdTokenType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_IDTOKENTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_IDTOKENTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/InstallCertificateStatusEnumType20.cpp b/src/ocpp20/types/InstallCertificateStatusEnumType20.cpp index 49996361..443eee8c 100644 --- a/src/ocpp20/types/InstallCertificateStatusEnumType20.cpp +++ b/src/ocpp20/types/InstallCertificateStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a InstallCertificateStatusEnumType20 enum to string */ -const EnumToStringFromString InstallCertificateStatusEnumType20Helper = { - {InstallCertificateStatusEnumType20::Accepted, "Accepted"}, - {InstallCertificateStatusEnumType20::Rejected, "Rejected"}, - {InstallCertificateStatusEnumType20::Failed, "Failed"}, +/** @brief Helper to convert a InstallCertificateStatusEnumType enum to string */ +const EnumToStringFromString InstallCertificateStatusEnumTypeHelper = { + {InstallCertificateStatusEnumType::Accepted, "Accepted"}, + {InstallCertificateStatusEnumType::Rejected, "Rejected"}, + {InstallCertificateStatusEnumType::Failed, "Failed"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/InstallCertificateStatusEnumType20.h b/src/ocpp20/types/InstallCertificateStatusEnumType20.h index cbcab2b5..40f371f9 100644 --- a/src/ocpp20/types/InstallCertificateStatusEnumType20.h +++ b/src/ocpp20/types/InstallCertificateStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_INSTALLCERTIFICATESTATUSENUMTYPE20_H -#define OPENOCPP_INSTALLCERTIFICATESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_INSTALLCERTIFICATESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_INSTALLCERTIFICATESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief Charging Station indicates if installation was successful. */ -enum class InstallCertificateStatusEnumType20 +enum class InstallCertificateStatusEnumType { Accepted, Rejected, Failed, }; -/** @brief Helper to convert a InstallCertificateStatusEnumType20 enum to string */ -extern const EnumToStringFromString InstallCertificateStatusEnumType20Helper; +/** @brief Helper to convert a InstallCertificateStatusEnumType enum to string */ +extern const EnumToStringFromString InstallCertificateStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_INSTALLCERTIFICATESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_INSTALLCERTIFICATESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/InstallCertificateUseEnumType20.cpp b/src/ocpp20/types/InstallCertificateUseEnumType20.cpp index 663ae221..d9d728f1 100644 --- a/src/ocpp20/types/InstallCertificateUseEnumType20.cpp +++ b/src/ocpp20/types/InstallCertificateUseEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a InstallCertificateUseEnumType20 enum to string */ -const EnumToStringFromString InstallCertificateUseEnumType20Helper = { - {InstallCertificateUseEnumType20::V2GRootCertificate, "V2GRootCertificate"}, - {InstallCertificateUseEnumType20::MORootCertificate, "MORootCertificate"}, - {InstallCertificateUseEnumType20::CSMSRootCertificate, "CSMSRootCertificate"}, - {InstallCertificateUseEnumType20::ManufacturerRootCertificate, "ManufacturerRootCertificate"}, +/** @brief Helper to convert a InstallCertificateUseEnumType enum to string */ +const EnumToStringFromString InstallCertificateUseEnumTypeHelper = { + {InstallCertificateUseEnumType::V2GRootCertificate, "V2GRootCertificate"}, + {InstallCertificateUseEnumType::MORootCertificate, "MORootCertificate"}, + {InstallCertificateUseEnumType::CSMSRootCertificate, "CSMSRootCertificate"}, + {InstallCertificateUseEnumType::ManufacturerRootCertificate, "ManufacturerRootCertificate"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/InstallCertificateUseEnumType20.h b/src/ocpp20/types/InstallCertificateUseEnumType20.h index 1a46e6d4..c2462ddf 100644 --- a/src/ocpp20/types/InstallCertificateUseEnumType20.h +++ b/src/ocpp20/types/InstallCertificateUseEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_INSTALLCERTIFICATEUSEENUMTYPE20_H -#define OPENOCPP_INSTALLCERTIFICATEUSEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_INSTALLCERTIFICATEUSEENUMTYPE_H +#define OPENOCPP_OCPP20_INSTALLCERTIFICATEUSEENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief Indicates the certificate type that is sent. */ -enum class InstallCertificateUseEnumType20 +enum class InstallCertificateUseEnumType { V2GRootCertificate, MORootCertificate, @@ -42,11 +42,11 @@ enum class InstallCertificateUseEnumType20 ManufacturerRootCertificate, }; -/** @brief Helper to convert a InstallCertificateUseEnumType20 enum to string */ -extern const EnumToStringFromString InstallCertificateUseEnumType20Helper; +/** @brief Helper to convert a InstallCertificateUseEnumType enum to string */ +extern const EnumToStringFromString InstallCertificateUseEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_INSTALLCERTIFICATEUSEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_INSTALLCERTIFICATEUSEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/Iso15118EVCertificateStatusEnumType20.cpp b/src/ocpp20/types/Iso15118EVCertificateStatusEnumType20.cpp index 5d7ec1fd..f36ee06c 100644 --- a/src/ocpp20/types/Iso15118EVCertificateStatusEnumType20.cpp +++ b/src/ocpp20/types/Iso15118EVCertificateStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a Iso15118EVCertificateStatusEnumType20 enum to string */ -const EnumToStringFromString Iso15118EVCertificateStatusEnumType20Helper = { - {Iso15118EVCertificateStatusEnumType20::Accepted, "Accepted"}, - {Iso15118EVCertificateStatusEnumType20::Failed, "Failed"}, +/** @brief Helper to convert a Iso15118EVCertificateStatusEnumType enum to string */ +const EnumToStringFromString Iso15118EVCertificateStatusEnumTypeHelper = { + {Iso15118EVCertificateStatusEnumType::Accepted, "Accepted"}, + {Iso15118EVCertificateStatusEnumType::Failed, "Failed"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/Iso15118EVCertificateStatusEnumType20.h b/src/ocpp20/types/Iso15118EVCertificateStatusEnumType20.h index 6cd4832c..12b7e594 100644 --- a/src/ocpp20/types/Iso15118EVCertificateStatusEnumType20.h +++ b/src/ocpp20/types/Iso15118EVCertificateStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_ISO15118EVCERTIFICATESTATUSENUMTYPE20_H -#define OPENOCPP_ISO15118EVCERTIFICATESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_ISO15118EVCERTIFICATESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_ISO15118EVCERTIFICATESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief Indicates whether the message was processed properly. */ -enum class Iso15118EVCertificateStatusEnumType20 +enum class Iso15118EVCertificateStatusEnumType { Accepted, Failed, }; -/** @brief Helper to convert a Iso15118EVCertificateStatusEnumType20 enum to string */ -extern const EnumToStringFromString Iso15118EVCertificateStatusEnumType20Helper; +/** @brief Helper to convert a Iso15118EVCertificateStatusEnumType enum to string */ +extern const EnumToStringFromString Iso15118EVCertificateStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_ISO15118EVCERTIFICATESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_ISO15118EVCERTIFICATESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/LocationEnumType20.cpp b/src/ocpp20/types/LocationEnumType20.cpp index bdb4364c..7d13d1bf 100644 --- a/src/ocpp20/types/LocationEnumType20.cpp +++ b/src/ocpp20/types/LocationEnumType20.cpp @@ -30,13 +30,13 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a LocationEnumType20 enum to string */ -const EnumToStringFromString LocationEnumType20Helper = { - {LocationEnumType20::Body, "Body"}, - {LocationEnumType20::Cable, "Cable"}, - {LocationEnumType20::EV, "EV"}, - {LocationEnumType20::Inlet, "Inlet"}, - {LocationEnumType20::Outlet, "Outlet"}, +/** @brief Helper to convert a LocationEnumType enum to string */ +const EnumToStringFromString LocationEnumTypeHelper = { + {LocationEnumType::Body, "Body"}, + {LocationEnumType::Cable, "Cable"}, + {LocationEnumType::EV, "EV"}, + {LocationEnumType::Inlet, "Inlet"}, + {LocationEnumType::Outlet, "Outlet"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/LocationEnumType20.h b/src/ocpp20/types/LocationEnumType20.h index 2da390b3..8d877cbe 100644 --- a/src/ocpp20/types/LocationEnumType20.h +++ b/src/ocpp20/types/LocationEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_LOCATIONENUMTYPE20_H -#define OPENOCPP_LOCATIONENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_LOCATIONENUMTYPE_H +#define OPENOCPP_OCPP20_LOCATIONENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief Sampled_ Value. Location. Location_ Code urn:x-oca:ocpp:uid:1:569265 Indicates where the measured value has been sampled. Default = "Outlet" */ -enum class LocationEnumType20 +enum class LocationEnumType { Body, Cable, @@ -45,11 +45,11 @@ enum class LocationEnumType20 Outlet, }; -/** @brief Helper to convert a LocationEnumType20 enum to string */ -extern const EnumToStringFromString LocationEnumType20Helper; +/** @brief Helper to convert a LocationEnumType enum to string */ +extern const EnumToStringFromString LocationEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_LOCATIONENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_LOCATIONENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/LogEnumType20.cpp b/src/ocpp20/types/LogEnumType20.cpp index e3b8a536..116d5149 100644 --- a/src/ocpp20/types/LogEnumType20.cpp +++ b/src/ocpp20/types/LogEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a LogEnumType20 enum to string */ -const EnumToStringFromString LogEnumType20Helper = { - {LogEnumType20::DiagnosticsLog, "DiagnosticsLog"}, - {LogEnumType20::SecurityLog, "SecurityLog"}, +/** @brief Helper to convert a LogEnumType enum to string */ +const EnumToStringFromString LogEnumTypeHelper = { + {LogEnumType::DiagnosticsLog, "DiagnosticsLog"}, + {LogEnumType::SecurityLog, "SecurityLog"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/LogEnumType20.h b/src/ocpp20/types/LogEnumType20.h index 54fdcdf3..553a0fb1 100644 --- a/src/ocpp20/types/LogEnumType20.h +++ b/src/ocpp20/types/LogEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_LOGENUMTYPE20_H -#define OPENOCPP_LOGENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_LOGENUMTYPE_H +#define OPENOCPP_OCPP20_LOGENUMTYPE_H #include "EnumToStringFromString.h" @@ -35,17 +35,17 @@ namespace ocpp20 /** @brief This contains the type of log file that the Charging Station should send. */ -enum class LogEnumType20 +enum class LogEnumType { DiagnosticsLog, SecurityLog, }; -/** @brief Helper to convert a LogEnumType20 enum to string */ -extern const EnumToStringFromString LogEnumType20Helper; +/** @brief Helper to convert a LogEnumType enum to string */ +extern const EnumToStringFromString LogEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_LOGENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_LOGENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/LogParametersType20.cpp b/src/ocpp20/types/LogParametersType20.cpp index 73926151..2bc840dd 100644 --- a/src/ocpp20/types/LogParametersType20.cpp +++ b/src/ocpp20/types/LogParametersType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a LogParametersType20 from a JSON representation */ -bool LogParametersType20Converter::fromJson(const rapidjson::Value& json, - LogParametersType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a LogParametersType from a JSON representation */ +bool LogParametersTypeConverter::fromJson(const rapidjson::Value& json, + LogParametersType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -64,15 +64,15 @@ bool LogParametersType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a LogParametersType20 to a JSON representation */ -bool LogParametersType20Converter::toJson(const LogParametersType20& data, rapidjson::Document& json) +/** @brief Convert a LogParametersType to a JSON representation */ +bool LogParametersTypeConverter::toJson(const LogParametersType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/LogParametersType20.h b/src/ocpp20/types/LogParametersType20.h index 697c6200..1da09bfd 100644 --- a/src/ocpp20/types/LogParametersType20.h +++ b/src/ocpp20/types/LogParametersType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_LOGPARAMETERSTYPE20_H -#define OPENOCPP_LOGPARAMETERSTYPE20_H +#ifndef OPENOCPP_OCPP20_LOGPARAMETERSTYPE_H +#define OPENOCPP_OCPP20_LOGPARAMETERSTYPE_H #include "CustomDataType20.h" @@ -42,10 +42,10 @@ namespace ocpp20 urn:x-enexis:ecdm:uid:2:233373 Generic class for the configuration of logging entries. */ -struct LogParametersType20 +struct LogParametersType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Log. Remote_ Location. URI urn:x-enexis:ecdm:uid:1:569484 The URL of the location at the remote system where the log should be stored. */ @@ -60,25 +60,25 @@ This contains the date and time of the latest logging information to include in ocpp::types::Optional latestTimestamp; }; -/** @brief Converter class for LogParametersType20 type */ -class LogParametersType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for LogParametersType type */ +class LogParametersTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new LogParametersType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new LogParametersTypeConverter(); } - /** @brief Convert a LogParametersType20 from a JSON representation */ + /** @brief Convert a LogParametersType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - LogParametersType20& data, + LogParametersType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a LogParametersType20 to a JSON representation */ - bool toJson(const LogParametersType20& data, rapidjson::Document& json) override; + /** @brief Convert a LogParametersType to a JSON representation */ + bool toJson(const LogParametersType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_LOGPARAMETERSTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_LOGPARAMETERSTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/LogStatusEnumType20.cpp b/src/ocpp20/types/LogStatusEnumType20.cpp index d1c690a0..a0e49a22 100644 --- a/src/ocpp20/types/LogStatusEnumType20.cpp +++ b/src/ocpp20/types/LogStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a LogStatusEnumType20 enum to string */ -const EnumToStringFromString LogStatusEnumType20Helper = { - {LogStatusEnumType20::Accepted, "Accepted"}, - {LogStatusEnumType20::Rejected, "Rejected"}, - {LogStatusEnumType20::AcceptedCanceled, "AcceptedCanceled"}, +/** @brief Helper to convert a LogStatusEnumType enum to string */ +const EnumToStringFromString LogStatusEnumTypeHelper = { + {LogStatusEnumType::Accepted, "Accepted"}, + {LogStatusEnumType::Rejected, "Rejected"}, + {LogStatusEnumType::AcceptedCanceled, "AcceptedCanceled"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/LogStatusEnumType20.h b/src/ocpp20/types/LogStatusEnumType20.h index 20962c05..46190c08 100644 --- a/src/ocpp20/types/LogStatusEnumType20.h +++ b/src/ocpp20/types/LogStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_LOGSTATUSENUMTYPE20_H -#define OPENOCPP_LOGSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_LOGSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_LOGSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief This field indicates whether the Charging Station was able to accept the request. */ -enum class LogStatusEnumType20 +enum class LogStatusEnumType { Accepted, Rejected, AcceptedCanceled, }; -/** @brief Helper to convert a LogStatusEnumType20 enum to string */ -extern const EnumToStringFromString LogStatusEnumType20Helper; +/** @brief Helper to convert a LogStatusEnumType enum to string */ +extern const EnumToStringFromString LogStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_LOGSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_LOGSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MeasurandEnumType20.cpp b/src/ocpp20/types/MeasurandEnumType20.cpp index 7e52dfd1..b3447947 100644 --- a/src/ocpp20/types/MeasurandEnumType20.cpp +++ b/src/ocpp20/types/MeasurandEnumType20.cpp @@ -30,33 +30,33 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a MeasurandEnumType20 enum to string */ -const EnumToStringFromString MeasurandEnumType20Helper = { - {MeasurandEnumType20::Current_Export, "Current.Export"}, - {MeasurandEnumType20::Current_Import, "Current.Import"}, - {MeasurandEnumType20::Current_Offered, "Current.Offered"}, - {MeasurandEnumType20::Energy_Active_Export_Register, "Energy.Active.Export.Register"}, - {MeasurandEnumType20::Energy_Active_Import_Register, "Energy.Active.Import.Register"}, - {MeasurandEnumType20::Energy_Reactive_Export_Register, "Energy.Reactive.Export.Register"}, - {MeasurandEnumType20::Energy_Reactive_Import_Register, "Energy.Reactive.Import.Register"}, - {MeasurandEnumType20::Energy_Active_Export_Interval, "Energy.Active.Export.Interval"}, - {MeasurandEnumType20::Energy_Active_Import_Interval, "Energy.Active.Import.Interval"}, - {MeasurandEnumType20::Energy_Active_Net, "Energy.Active.Net"}, - {MeasurandEnumType20::Energy_Reactive_Export_Interval, "Energy.Reactive.Export.Interval"}, - {MeasurandEnumType20::Energy_Reactive_Import_Interval, "Energy.Reactive.Import.Interval"}, - {MeasurandEnumType20::Energy_Reactive_Net, "Energy.Reactive.Net"}, - {MeasurandEnumType20::Energy_Apparent_Net, "Energy.Apparent.Net"}, - {MeasurandEnumType20::Energy_Apparent_Import, "Energy.Apparent.Import"}, - {MeasurandEnumType20::Energy_Apparent_Export, "Energy.Apparent.Export"}, - {MeasurandEnumType20::Frequency, "Frequency"}, - {MeasurandEnumType20::Power_Active_Export, "Power.Active.Export"}, - {MeasurandEnumType20::Power_Active_Import, "Power.Active.Import"}, - {MeasurandEnumType20::Power_Factor, "Power.Factor"}, - {MeasurandEnumType20::Power_Offered, "Power.Offered"}, - {MeasurandEnumType20::Power_Reactive_Export, "Power.Reactive.Export"}, - {MeasurandEnumType20::Power_Reactive_Import, "Power.Reactive.Import"}, - {MeasurandEnumType20::SoC, "SoC"}, - {MeasurandEnumType20::Voltage, "Voltage"}, +/** @brief Helper to convert a MeasurandEnumType enum to string */ +const EnumToStringFromString MeasurandEnumTypeHelper = { + {MeasurandEnumType::Current_Export, "Current.Export"}, + {MeasurandEnumType::Current_Import, "Current.Import"}, + {MeasurandEnumType::Current_Offered, "Current.Offered"}, + {MeasurandEnumType::Energy_Active_Export_Register, "Energy.Active.Export.Register"}, + {MeasurandEnumType::Energy_Active_Import_Register, "Energy.Active.Import.Register"}, + {MeasurandEnumType::Energy_Reactive_Export_Register, "Energy.Reactive.Export.Register"}, + {MeasurandEnumType::Energy_Reactive_Import_Register, "Energy.Reactive.Import.Register"}, + {MeasurandEnumType::Energy_Active_Export_Interval, "Energy.Active.Export.Interval"}, + {MeasurandEnumType::Energy_Active_Import_Interval, "Energy.Active.Import.Interval"}, + {MeasurandEnumType::Energy_Active_Net, "Energy.Active.Net"}, + {MeasurandEnumType::Energy_Reactive_Export_Interval, "Energy.Reactive.Export.Interval"}, + {MeasurandEnumType::Energy_Reactive_Import_Interval, "Energy.Reactive.Import.Interval"}, + {MeasurandEnumType::Energy_Reactive_Net, "Energy.Reactive.Net"}, + {MeasurandEnumType::Energy_Apparent_Net, "Energy.Apparent.Net"}, + {MeasurandEnumType::Energy_Apparent_Import, "Energy.Apparent.Import"}, + {MeasurandEnumType::Energy_Apparent_Export, "Energy.Apparent.Export"}, + {MeasurandEnumType::Frequency, "Frequency"}, + {MeasurandEnumType::Power_Active_Export, "Power.Active.Export"}, + {MeasurandEnumType::Power_Active_Import, "Power.Active.Import"}, + {MeasurandEnumType::Power_Factor, "Power.Factor"}, + {MeasurandEnumType::Power_Offered, "Power.Offered"}, + {MeasurandEnumType::Power_Reactive_Export, "Power.Reactive.Export"}, + {MeasurandEnumType::Power_Reactive_Import, "Power.Reactive.Import"}, + {MeasurandEnumType::SoC, "SoC"}, + {MeasurandEnumType::Voltage, "Voltage"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/MeasurandEnumType20.h b/src/ocpp20/types/MeasurandEnumType20.h index a3e2147f..58bc2e0b 100644 --- a/src/ocpp20/types/MeasurandEnumType20.h +++ b/src/ocpp20/types/MeasurandEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MEASURANDENUMTYPE20_H -#define OPENOCPP_MEASURANDENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_MEASURANDENUMTYPE_H +#define OPENOCPP_OCPP20_MEASURANDENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief Sampled_ Value. Measurand. Measurand_ Code urn:x-oca:ocpp:uid:1:569263 Type of measurement. Default = "Energy.Active.Import.Register" */ -enum class MeasurandEnumType20 +enum class MeasurandEnumType { Current_Export, Current_Import, @@ -65,11 +65,11 @@ enum class MeasurandEnumType20 Voltage, }; -/** @brief Helper to convert a MeasurandEnumType20 enum to string */ -extern const EnumToStringFromString MeasurandEnumType20Helper; +/** @brief Helper to convert a MeasurandEnumType enum to string */ +extern const EnumToStringFromString MeasurandEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MEASURANDENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MEASURANDENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MessageContentType20.cpp b/src/ocpp20/types/MessageContentType20.cpp index 3b48d580..a0bf4bb4 100644 --- a/src/ocpp20/types/MessageContentType20.cpp +++ b/src/ocpp20/types/MessageContentType20.cpp @@ -32,23 +32,23 @@ namespace types namespace ocpp20 { -/** @brief Convert a MessageContentType20 from a JSON representation */ -bool MessageContentType20Converter::fromJson(const rapidjson::Value& json, - MessageContentType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a MessageContentType from a JSON representation */ +bool MessageContentTypeConverter::fromJson(const rapidjson::Value& json, + MessageContentType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // format - data.format = MessageFormatEnumType20Helper.fromString(json["format"].GetString()); + data.format = MessageFormatEnumTypeHelper.fromString(json["format"].GetString()); // language extract(json, "language", data.language); @@ -64,15 +64,15 @@ bool MessageContentType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a MessageContentType20 to a JSON representation */ -bool MessageContentType20Converter::toJson(const MessageContentType20& data, rapidjson::Document& json) +/** @brief Convert a MessageContentType to a JSON representation */ +bool MessageContentTypeConverter::toJson(const MessageContentType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -81,7 +81,7 @@ bool MessageContentType20Converter::toJson(const MessageContentType20& data, rap } // format - fill(json, "format", MessageFormatEnumType20Helper.toString(data.format)); + fill(json, "format", MessageFormatEnumTypeHelper.toString(data.format)); // language fill(json, "language", data.language); diff --git a/src/ocpp20/types/MessageContentType20.h b/src/ocpp20/types/MessageContentType20.h index f7545428..4ffd6b53 100644 --- a/src/ocpp20/types/MessageContentType20.h +++ b/src/ocpp20/types/MessageContentType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MESSAGECONTENTTYPE20_H -#define OPENOCPP_MESSAGECONTENTTYPE20_H +#ifndef OPENOCPP_OCPP20_MESSAGECONTENTTYPE_H +#define OPENOCPP_OCPP20_MESSAGECONTENTTYPE_H #include "CustomDataType20.h" #include "MessageFormatEnumType20.h" @@ -43,12 +43,12 @@ urn:x-enexis:ecdm:uid:2:234490 Contains message details, for a message to be displayed on a Charging Station. */ -struct MessageContentType20 +struct MessageContentType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - MessageFormatEnumType20 format; + MessageFormatEnumType format; /** @brief Message_ Content. Language. Language_ Code urn:x-enexis:ecdm:uid:1:570849 Message language identifier. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. */ @@ -59,25 +59,25 @@ Message contents. */ ocpp::types::CiStringType<512u> content; }; -/** @brief Converter class for MessageContentType20 type */ -class MessageContentType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for MessageContentType type */ +class MessageContentTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new MessageContentType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new MessageContentTypeConverter(); } - /** @brief Convert a MessageContentType20 from a JSON representation */ + /** @brief Convert a MessageContentType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - MessageContentType20& data, + MessageContentType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a MessageContentType20 to a JSON representation */ - bool toJson(const MessageContentType20& data, rapidjson::Document& json) override; + /** @brief Convert a MessageContentType to a JSON representation */ + bool toJson(const MessageContentType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MESSAGECONTENTTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MESSAGECONTENTTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MessageFormatEnumType20.cpp b/src/ocpp20/types/MessageFormatEnumType20.cpp index ae1be393..68d038ad 100644 --- a/src/ocpp20/types/MessageFormatEnumType20.cpp +++ b/src/ocpp20/types/MessageFormatEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a MessageFormatEnumType20 enum to string */ -const EnumToStringFromString MessageFormatEnumType20Helper = { - {MessageFormatEnumType20::ASCII, "ASCII"}, - {MessageFormatEnumType20::HTML, "HTML"}, - {MessageFormatEnumType20::URI, "URI"}, - {MessageFormatEnumType20::UTF8, "UTF8"}, +/** @brief Helper to convert a MessageFormatEnumType enum to string */ +const EnumToStringFromString MessageFormatEnumTypeHelper = { + {MessageFormatEnumType::ASCII, "ASCII"}, + {MessageFormatEnumType::HTML, "HTML"}, + {MessageFormatEnumType::URI, "URI"}, + {MessageFormatEnumType::UTF8, "UTF8"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/MessageFormatEnumType20.h b/src/ocpp20/types/MessageFormatEnumType20.h index bda8d1a4..b63045b2 100644 --- a/src/ocpp20/types/MessageFormatEnumType20.h +++ b/src/ocpp20/types/MessageFormatEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MESSAGEFORMATENUMTYPE20_H -#define OPENOCPP_MESSAGEFORMATENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_MESSAGEFORMATENUMTYPE_H +#define OPENOCPP_OCPP20_MESSAGEFORMATENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief Message_ Content. Format. Message_ Format_ Code urn:x-enexis:ecdm:uid:1:570848 Format of the message. */ -enum class MessageFormatEnumType20 +enum class MessageFormatEnumType { ASCII, HTML, @@ -44,11 +44,11 @@ enum class MessageFormatEnumType20 UTF8, }; -/** @brief Helper to convert a MessageFormatEnumType20 enum to string */ -extern const EnumToStringFromString MessageFormatEnumType20Helper; +/** @brief Helper to convert a MessageFormatEnumType enum to string */ +extern const EnumToStringFromString MessageFormatEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MESSAGEFORMATENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MESSAGEFORMATENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MessageInfoType20.cpp b/src/ocpp20/types/MessageInfoType20.cpp index 169a6521..a3644bdf 100644 --- a/src/ocpp20/types/MessageInfoType20.cpp +++ b/src/ocpp20/types/MessageInfoType20.cpp @@ -32,25 +32,25 @@ namespace types namespace ocpp20 { -/** @brief Convert a MessageInfoType20 from a JSON representation */ -bool MessageInfoType20Converter::fromJson(const rapidjson::Value& json, - MessageInfoType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a MessageInfoType from a JSON representation */ +bool MessageInfoTypeConverter::fromJson(const rapidjson::Value& json, + MessageInfoType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // display if (json.HasMember("display")) { - ComponentType20Converter display_converter; + ComponentTypeConverter display_converter; ret = ret && display_converter.fromJson(json["display"], data.display, error_code, error_message); } @@ -58,12 +58,12 @@ bool MessageInfoType20Converter::fromJson(const rapidjson::Value& json, extract(json, "id", data.id); // priority - data.priority = MessagePriorityEnumType20Helper.fromString(json["priority"].GetString()); + data.priority = MessagePriorityEnumTypeHelper.fromString(json["priority"].GetString()); // state if (json.HasMember("state")) { - data.state = MessageStateEnumType20Helper.fromString(json["state"].GetString()); + data.state = MessageStateEnumTypeHelper.fromString(json["state"].GetString()); } // startDateTime @@ -76,7 +76,7 @@ bool MessageInfoType20Converter::fromJson(const rapidjson::Value& json, extract(json, "transactionId", data.transactionId); // message - MessageContentType20Converter message_converter; + MessageContentTypeConverter message_converter; ret = ret && message_converter.fromJson(json["message"], data.message, error_code, error_message); if (!ret) @@ -87,15 +87,15 @@ bool MessageInfoType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a MessageInfoType20 to a JSON representation */ -bool MessageInfoType20Converter::toJson(const MessageInfoType20& data, rapidjson::Document& json) +/** @brief Convert a MessageInfoType to a JSON representation */ +bool MessageInfoTypeConverter::toJson(const MessageInfoType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -106,7 +106,7 @@ bool MessageInfoType20Converter::toJson(const MessageInfoType20& data, rapidjson // display if (data.display.isSet()) { - ComponentType20Converter display_converter; + ComponentTypeConverter display_converter; display_converter.setAllocator(allocator); rapidjson::Document display_doc; display_doc.Parse("{}"); @@ -118,12 +118,12 @@ bool MessageInfoType20Converter::toJson(const MessageInfoType20& data, rapidjson fill(json, "id", data.id); // priority - fill(json, "priority", MessagePriorityEnumType20Helper.toString(data.priority)); + fill(json, "priority", MessagePriorityEnumTypeHelper.toString(data.priority)); // state if (data.state.isSet()) { - fill(json, "state", MessageStateEnumType20Helper.toString(data.state)); + fill(json, "state", MessageStateEnumTypeHelper.toString(data.state)); } // startDateTime @@ -136,7 +136,7 @@ bool MessageInfoType20Converter::toJson(const MessageInfoType20& data, rapidjson fill(json, "transactionId", data.transactionId); // message - MessageContentType20Converter message_converter; + MessageContentTypeConverter message_converter; message_converter.setAllocator(allocator); rapidjson::Document message_doc; message_doc.Parse("{}"); diff --git a/src/ocpp20/types/MessageInfoType20.h b/src/ocpp20/types/MessageInfoType20.h index 73ed962b..34eac907 100644 --- a/src/ocpp20/types/MessageInfoType20.h +++ b/src/ocpp20/types/MessageInfoType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MESSAGEINFOTYPE20_H -#define OPENOCPP_MESSAGEINFOTYPE20_H +#ifndef OPENOCPP_OCPP20_MESSAGEINFOTYPE_H +#define OPENOCPP_OCPP20_MESSAGEINFOTYPE_H #include "ComponentType20.h" #include "CustomDataType20.h" @@ -46,20 +46,20 @@ namespace ocpp20 urn:x-enexis:ecdm:uid:2:233264 Contains message details, for a message to be displayed on a Charging Station. */ -struct MessageInfoType20 +struct MessageInfoType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional display; + ocpp::types::Optional display; /** @brief Identified_ Object. MRID. Numeric_ Identifier urn:x-enexis:ecdm:uid:1:569198 Master resource identifier, unique within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero). */ int id; /** @brief */ - MessagePriorityEnumType20 priority; + MessagePriorityEnumType priority; /** @brief */ - ocpp::types::Optional state; + ocpp::types::Optional state; /** @brief Message_ Info. Start. Date_ Time urn:x-enexis:ecdm:uid:1:569256 From what date-time should this message be shown. If omitted: directly. */ @@ -73,28 +73,28 @@ Message SHALL be removed by the Charging Station after transaction has ended. */ ocpp::types::Optional> transactionId; /** @brief */ - MessageContentType20 message; + MessageContentType message; }; -/** @brief Converter class for MessageInfoType20 type */ -class MessageInfoType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for MessageInfoType type */ +class MessageInfoTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new MessageInfoType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new MessageInfoTypeConverter(); } - /** @brief Convert a MessageInfoType20 from a JSON representation */ + /** @brief Convert a MessageInfoType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - MessageInfoType20& data, + MessageInfoType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a MessageInfoType20 to a JSON representation */ - bool toJson(const MessageInfoType20& data, rapidjson::Document& json) override; + /** @brief Convert a MessageInfoType to a JSON representation */ + bool toJson(const MessageInfoType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MESSAGEINFOTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MESSAGEINFOTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MessagePriorityEnumType20.cpp b/src/ocpp20/types/MessagePriorityEnumType20.cpp index 698af662..3b10e49d 100644 --- a/src/ocpp20/types/MessagePriorityEnumType20.cpp +++ b/src/ocpp20/types/MessagePriorityEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a MessagePriorityEnumType20 enum to string */ -const EnumToStringFromString MessagePriorityEnumType20Helper = { - {MessagePriorityEnumType20::AlwaysFront, "AlwaysFront"}, - {MessagePriorityEnumType20::InFront, "InFront"}, - {MessagePriorityEnumType20::NormalCycle, "NormalCycle"}, +/** @brief Helper to convert a MessagePriorityEnumType enum to string */ +const EnumToStringFromString MessagePriorityEnumTypeHelper = { + {MessagePriorityEnumType::AlwaysFront, "AlwaysFront"}, + {MessagePriorityEnumType::InFront, "InFront"}, + {MessagePriorityEnumType::NormalCycle, "NormalCycle"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/MessagePriorityEnumType20.h b/src/ocpp20/types/MessagePriorityEnumType20.h index 16b81258..c1aea26b 100644 --- a/src/ocpp20/types/MessagePriorityEnumType20.h +++ b/src/ocpp20/types/MessagePriorityEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MESSAGEPRIORITYENUMTYPE20_H -#define OPENOCPP_MESSAGEPRIORITYENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_MESSAGEPRIORITYENUMTYPE_H +#define OPENOCPP_OCPP20_MESSAGEPRIORITYENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,18 +36,18 @@ namespace ocpp20 /** @brief Message_ Info. Priority. Message_ Priority_ Code urn:x-enexis:ecdm:uid:1:569253 With what priority should this message be shown */ -enum class MessagePriorityEnumType20 +enum class MessagePriorityEnumType { AlwaysFront, InFront, NormalCycle, }; -/** @brief Helper to convert a MessagePriorityEnumType20 enum to string */ -extern const EnumToStringFromString MessagePriorityEnumType20Helper; +/** @brief Helper to convert a MessagePriorityEnumType enum to string */ +extern const EnumToStringFromString MessagePriorityEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MESSAGEPRIORITYENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MESSAGEPRIORITYENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MessageStateEnumType20.cpp b/src/ocpp20/types/MessageStateEnumType20.cpp index 620d8966..5b1cd64b 100644 --- a/src/ocpp20/types/MessageStateEnumType20.cpp +++ b/src/ocpp20/types/MessageStateEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a MessageStateEnumType20 enum to string */ -const EnumToStringFromString MessageStateEnumType20Helper = { - {MessageStateEnumType20::Charging, "Charging"}, - {MessageStateEnumType20::Faulted, "Faulted"}, - {MessageStateEnumType20::Idle, "Idle"}, - {MessageStateEnumType20::Unavailable, "Unavailable"}, +/** @brief Helper to convert a MessageStateEnumType enum to string */ +const EnumToStringFromString MessageStateEnumTypeHelper = { + {MessageStateEnumType::Charging, "Charging"}, + {MessageStateEnumType::Faulted, "Faulted"}, + {MessageStateEnumType::Idle, "Idle"}, + {MessageStateEnumType::Unavailable, "Unavailable"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/MessageStateEnumType20.h b/src/ocpp20/types/MessageStateEnumType20.h index 28395710..b7a4f217 100644 --- a/src/ocpp20/types/MessageStateEnumType20.h +++ b/src/ocpp20/types/MessageStateEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MESSAGESTATEENUMTYPE20_H -#define OPENOCPP_MESSAGESTATEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_MESSAGESTATEENUMTYPE_H +#define OPENOCPP_OCPP20_MESSAGESTATEENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief Message_ Info. State. Message_ State_ Code urn:x-enexis:ecdm:uid:1:569254 During what state should this message be shown. When omitted this message should be shown in any state of the Charging Station. */ -enum class MessageStateEnumType20 +enum class MessageStateEnumType { Charging, Faulted, @@ -44,11 +44,11 @@ enum class MessageStateEnumType20 Unavailable, }; -/** @brief Helper to convert a MessageStateEnumType20 enum to string */ -extern const EnumToStringFromString MessageStateEnumType20Helper; +/** @brief Helper to convert a MessageStateEnumType enum to string */ +extern const EnumToStringFromString MessageStateEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MESSAGESTATEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MESSAGESTATEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MessageTriggerEnumType20.cpp b/src/ocpp20/types/MessageTriggerEnumType20.cpp index b4b0cb8b..f36948f6 100644 --- a/src/ocpp20/types/MessageTriggerEnumType20.cpp +++ b/src/ocpp20/types/MessageTriggerEnumType20.cpp @@ -30,19 +30,19 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a MessageTriggerEnumType20 enum to string */ -const EnumToStringFromString MessageTriggerEnumType20Helper = { - {MessageTriggerEnumType20::BootNotification, "BootNotification"}, - {MessageTriggerEnumType20::LogStatusNotification, "LogStatusNotification"}, - {MessageTriggerEnumType20::FirmwareStatusNotification, "FirmwareStatusNotification"}, - {MessageTriggerEnumType20::Heartbeat, "Heartbeat"}, - {MessageTriggerEnumType20::MeterValues, "MeterValues"}, - {MessageTriggerEnumType20::SignChargingStationCertificate, "SignChargingStationCertificate"}, - {MessageTriggerEnumType20::SignV2GCertificate, "SignV2GCertificate"}, - {MessageTriggerEnumType20::StatusNotification, "StatusNotification"}, - {MessageTriggerEnumType20::TransactionEvent, "TransactionEvent"}, - {MessageTriggerEnumType20::SignCombinedCertificate, "SignCombinedCertificate"}, - {MessageTriggerEnumType20::PublishFirmwareStatusNotification, "PublishFirmwareStatusNotification"}, +/** @brief Helper to convert a MessageTriggerEnumType enum to string */ +const EnumToStringFromString MessageTriggerEnumTypeHelper = { + {MessageTriggerEnumType::BootNotification, "BootNotification"}, + {MessageTriggerEnumType::LogStatusNotification, "LogStatusNotification"}, + {MessageTriggerEnumType::FirmwareStatusNotification, "FirmwareStatusNotification"}, + {MessageTriggerEnumType::Heartbeat, "Heartbeat"}, + {MessageTriggerEnumType::MeterValues, "MeterValues"}, + {MessageTriggerEnumType::SignChargingStationCertificate, "SignChargingStationCertificate"}, + {MessageTriggerEnumType::SignV2GCertificate, "SignV2GCertificate"}, + {MessageTriggerEnumType::StatusNotification, "StatusNotification"}, + {MessageTriggerEnumType::TransactionEvent, "TransactionEvent"}, + {MessageTriggerEnumType::SignCombinedCertificate, "SignCombinedCertificate"}, + {MessageTriggerEnumType::PublishFirmwareStatusNotification, "PublishFirmwareStatusNotification"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/MessageTriggerEnumType20.h b/src/ocpp20/types/MessageTriggerEnumType20.h index 8acfc9cc..13682c00 100644 --- a/src/ocpp20/types/MessageTriggerEnumType20.h +++ b/src/ocpp20/types/MessageTriggerEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MESSAGETRIGGERENUMTYPE20_H -#define OPENOCPP_MESSAGETRIGGERENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_MESSAGETRIGGERENUMTYPE_H +#define OPENOCPP_OCPP20_MESSAGETRIGGERENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief Type of message to be triggered. */ -enum class MessageTriggerEnumType20 +enum class MessageTriggerEnumType { BootNotification, LogStatusNotification, @@ -49,11 +49,11 @@ enum class MessageTriggerEnumType20 PublishFirmwareStatusNotification, }; -/** @brief Helper to convert a MessageTriggerEnumType20 enum to string */ -extern const EnumToStringFromString MessageTriggerEnumType20Helper; +/** @brief Helper to convert a MessageTriggerEnumType enum to string */ +extern const EnumToStringFromString MessageTriggerEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MESSAGETRIGGERENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MESSAGETRIGGERENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MeterValueType20.cpp b/src/ocpp20/types/MeterValueType20.cpp index aa0a4170..c207a085 100644 --- a/src/ocpp20/types/MeterValueType20.cpp +++ b/src/ocpp20/types/MeterValueType20.cpp @@ -32,30 +32,30 @@ namespace types namespace ocpp20 { -/** @brief Convert a MeterValueType20 from a JSON representation */ -bool MeterValueType20Converter::fromJson(const rapidjson::Value& json, - MeterValueType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a MeterValueType from a JSON representation */ +bool MeterValueTypeConverter::fromJson(const rapidjson::Value& json, + MeterValueType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // sampledValue if (json.HasMember("sampledValue")) { - const rapidjson::Value& sampledValue_json = json["sampledValue"]; - SampledValueType20Converter sampledValue_converter; + const rapidjson::Value& sampledValue_json = json["sampledValue"]; + SampledValueTypeConverter sampledValue_converter; for (auto it = sampledValue_json.Begin(); ret && (it != sampledValue_json.End()); ++it) { - SampledValueType20& item = data.sampledValue.emplace_back(); - ret = ret && sampledValue_converter.fromJson(*it, item, error_code, error_message); + SampledValueType& item = data.sampledValue.emplace_back(); + ret = ret && sampledValue_converter.fromJson(*it, item, error_code, error_message); } } @@ -70,15 +70,15 @@ bool MeterValueType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a MeterValueType20 to a JSON representation */ -bool MeterValueType20Converter::toJson(const MeterValueType20& data, rapidjson::Document& json) +/** @brief Convert a MeterValueType to a JSON representation */ +bool MeterValueTypeConverter::toJson(const MeterValueType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -88,10 +88,10 @@ bool MeterValueType20Converter::toJson(const MeterValueType20& data, rapidjson:: // sampledValue - rapidjson::Value sampledValue_json(rapidjson::kArrayType); - SampledValueType20Converter sampledValue_converter; + rapidjson::Value sampledValue_json(rapidjson::kArrayType); + SampledValueTypeConverter sampledValue_converter; sampledValue_converter.setAllocator(allocator); - for (const SampledValueType20& item : data.sampledValue) + for (const SampledValueType& item : data.sampledValue) { rapidjson::Document item_doc; item_doc.Parse("{}"); diff --git a/src/ocpp20/types/MeterValueType20.h b/src/ocpp20/types/MeterValueType20.h index 8695feca..1ebdd467 100644 --- a/src/ocpp20/types/MeterValueType20.h +++ b/src/ocpp20/types/MeterValueType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_METERVALUETYPE20_H -#define OPENOCPP_METERVALUETYPE20_H +#ifndef OPENOCPP_OCPP20_METERVALUETYPE_H +#define OPENOCPP_OCPP20_METERVALUETYPE_H #include "CustomDataType20.h" #include "SampledValueType20.h" @@ -43,37 +43,37 @@ namespace ocpp20 urn:x-oca:ocpp:uid:2:233265 Collection of one or more sampled values in MeterValuesRequest and TransactionEvent. All sampled values in a MeterValue are sampled at the same point in time. */ -struct MeterValueType20 +struct MeterValueType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - std::vector sampledValue; + std::vector sampledValue; /** @brief Meter_ Value. Timestamp. Date_ Time urn:x-oca:ocpp:uid:1:569259 Timestamp for measured value(s). */ ocpp::types::DateTime timestamp; }; -/** @brief Converter class for MeterValueType20 type */ -class MeterValueType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for MeterValueType type */ +class MeterValueTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new MeterValueType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new MeterValueTypeConverter(); } - /** @brief Convert a MeterValueType20 from a JSON representation */ + /** @brief Convert a MeterValueType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - MeterValueType20& data, + MeterValueType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a MeterValueType20 to a JSON representation */ - bool toJson(const MeterValueType20& data, rapidjson::Document& json) override; + /** @brief Convert a MeterValueType to a JSON representation */ + bool toJson(const MeterValueType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_METERVALUETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_METERVALUETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ModemType20.cpp b/src/ocpp20/types/ModemType20.cpp index 73e71b6a..b01627e0 100644 --- a/src/ocpp20/types/ModemType20.cpp +++ b/src/ocpp20/types/ModemType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a ModemType20 from a JSON representation */ -bool ModemType20Converter::fromJson(const rapidjson::Value& json, - ModemType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ModemType from a JSON representation */ +bool ModemTypeConverter::fromJson(const rapidjson::Value& json, + ModemType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -61,15 +61,15 @@ bool ModemType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a ModemType20 to a JSON representation */ -bool ModemType20Converter::toJson(const ModemType20& data, rapidjson::Document& json) +/** @brief Convert a ModemType to a JSON representation */ +bool ModemTypeConverter::toJson(const ModemType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/ModemType20.h b/src/ocpp20/types/ModemType20.h index 986c0887..98b44f7a 100644 --- a/src/ocpp20/types/ModemType20.h +++ b/src/ocpp20/types/ModemType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MODEMTYPE20_H -#define OPENOCPP_MODEMTYPE20_H +#ifndef OPENOCPP_OCPP20_MODEMTYPE_H +#define OPENOCPP_OCPP20_MODEMTYPE_H #include "CustomDataType20.h" @@ -41,10 +41,10 @@ namespace ocpp20 urn:x-oca:ocpp:uid:2:233306 Defines parameters required for initiating and maintaining wireless communication with other devices. */ -struct ModemType20 +struct ModemType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Wireless_ Communication_ Module. ICCID. CI20_ Text urn:x-oca:ocpp:uid:1:569327 This contains the ICCID of the modem’s SIM card. */ @@ -55,25 +55,25 @@ This contains the IMSI of the modem’s SIM card. */ ocpp::types::Optional> imsi; }; -/** @brief Converter class for ModemType20 type */ -class ModemType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ModemType type */ +class ModemTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new ModemType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new ModemTypeConverter(); } - /** @brief Convert a ModemType20 from a JSON representation */ + /** @brief Convert a ModemType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ModemType20& data, + ModemType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ModemType20 to a JSON representation */ - bool toJson(const ModemType20& data, rapidjson::Document& json) override; + /** @brief Convert a ModemType to a JSON representation */ + bool toJson(const ModemType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MODEMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MODEMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MonitorEnumType20.cpp b/src/ocpp20/types/MonitorEnumType20.cpp index 062b6c5d..49c55a64 100644 --- a/src/ocpp20/types/MonitorEnumType20.cpp +++ b/src/ocpp20/types/MonitorEnumType20.cpp @@ -30,13 +30,13 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a MonitorEnumType20 enum to string */ -const EnumToStringFromString MonitorEnumType20Helper = { - {MonitorEnumType20::UpperThreshold, "UpperThreshold"}, - {MonitorEnumType20::LowerThreshold, "LowerThreshold"}, - {MonitorEnumType20::Delta, "Delta"}, - {MonitorEnumType20::Periodic, "Periodic"}, - {MonitorEnumType20::PeriodicClockAligned, "PeriodicClockAligned"}, +/** @brief Helper to convert a MonitorEnumType enum to string */ +const EnumToStringFromString MonitorEnumTypeHelper = { + {MonitorEnumType::UpperThreshold, "UpperThreshold"}, + {MonitorEnumType::LowerThreshold, "LowerThreshold"}, + {MonitorEnumType::Delta, "Delta"}, + {MonitorEnumType::Periodic, "Periodic"}, + {MonitorEnumType::PeriodicClockAligned, "PeriodicClockAligned"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/MonitorEnumType20.h b/src/ocpp20/types/MonitorEnumType20.h index 8401b9d3..d6434eb2 100644 --- a/src/ocpp20/types/MonitorEnumType20.h +++ b/src/ocpp20/types/MonitorEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MONITORENUMTYPE20_H -#define OPENOCPP_MONITORENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_MONITORENUMTYPE_H +#define OPENOCPP_OCPP20_MONITORENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief The type of this monitor, e.g. a threshold, delta or periodic monitor. */ -enum class MonitorEnumType20 +enum class MonitorEnumType { UpperThreshold, LowerThreshold, @@ -43,11 +43,11 @@ enum class MonitorEnumType20 PeriodicClockAligned, }; -/** @brief Helper to convert a MonitorEnumType20 enum to string */ -extern const EnumToStringFromString MonitorEnumType20Helper; +/** @brief Helper to convert a MonitorEnumType enum to string */ +extern const EnumToStringFromString MonitorEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MONITORENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MONITORENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MonitoringBaseEnumType20.cpp b/src/ocpp20/types/MonitoringBaseEnumType20.cpp index c9c66526..e88413f3 100644 --- a/src/ocpp20/types/MonitoringBaseEnumType20.cpp +++ b/src/ocpp20/types/MonitoringBaseEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a MonitoringBaseEnumType20 enum to string */ -const EnumToStringFromString MonitoringBaseEnumType20Helper = { - {MonitoringBaseEnumType20::All, "All"}, - {MonitoringBaseEnumType20::FactoryDefault, "FactoryDefault"}, - {MonitoringBaseEnumType20::HardWiredOnly, "HardWiredOnly"}, +/** @brief Helper to convert a MonitoringBaseEnumType enum to string */ +const EnumToStringFromString MonitoringBaseEnumTypeHelper = { + {MonitoringBaseEnumType::All, "All"}, + {MonitoringBaseEnumType::FactoryDefault, "FactoryDefault"}, + {MonitoringBaseEnumType::HardWiredOnly, "HardWiredOnly"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/MonitoringBaseEnumType20.h b/src/ocpp20/types/MonitoringBaseEnumType20.h index 796db946..f49c7f1c 100644 --- a/src/ocpp20/types/MonitoringBaseEnumType20.h +++ b/src/ocpp20/types/MonitoringBaseEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MONITORINGBASEENUMTYPE20_H -#define OPENOCPP_MONITORINGBASEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_MONITORINGBASEENUMTYPE_H +#define OPENOCPP_OCPP20_MONITORINGBASEENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief Specify which monitoring base will be set */ -enum class MonitoringBaseEnumType20 +enum class MonitoringBaseEnumType { All, FactoryDefault, HardWiredOnly, }; -/** @brief Helper to convert a MonitoringBaseEnumType20 enum to string */ -extern const EnumToStringFromString MonitoringBaseEnumType20Helper; +/** @brief Helper to convert a MonitoringBaseEnumType enum to string */ +extern const EnumToStringFromString MonitoringBaseEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MONITORINGBASEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MONITORINGBASEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MonitoringCriterionEnumType20.cpp b/src/ocpp20/types/MonitoringCriterionEnumType20.cpp index 450b991b..38100759 100644 --- a/src/ocpp20/types/MonitoringCriterionEnumType20.cpp +++ b/src/ocpp20/types/MonitoringCriterionEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a MonitoringCriterionEnumType20 enum to string */ -const EnumToStringFromString MonitoringCriterionEnumType20Helper = { - {MonitoringCriterionEnumType20::ThresholdMonitoring, "ThresholdMonitoring"}, - {MonitoringCriterionEnumType20::DeltaMonitoring, "DeltaMonitoring"}, - {MonitoringCriterionEnumType20::PeriodicMonitoring, "PeriodicMonitoring"}, +/** @brief Helper to convert a MonitoringCriterionEnumType enum to string */ +const EnumToStringFromString MonitoringCriterionEnumTypeHelper = { + {MonitoringCriterionEnumType::ThresholdMonitoring, "ThresholdMonitoring"}, + {MonitoringCriterionEnumType::DeltaMonitoring, "DeltaMonitoring"}, + {MonitoringCriterionEnumType::PeriodicMonitoring, "PeriodicMonitoring"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/MonitoringCriterionEnumType20.h b/src/ocpp20/types/MonitoringCriterionEnumType20.h index 5a83c228..24710bc0 100644 --- a/src/ocpp20/types/MonitoringCriterionEnumType20.h +++ b/src/ocpp20/types/MonitoringCriterionEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MONITORINGCRITERIONENUMTYPE20_H -#define OPENOCPP_MONITORINGCRITERIONENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_MONITORINGCRITERIONENUMTYPE_H +#define OPENOCPP_OCPP20_MONITORINGCRITERIONENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief */ -enum class MonitoringCriterionEnumType20 +enum class MonitoringCriterionEnumType { ThresholdMonitoring, DeltaMonitoring, PeriodicMonitoring, }; -/** @brief Helper to convert a MonitoringCriterionEnumType20 enum to string */ -extern const EnumToStringFromString MonitoringCriterionEnumType20Helper; +/** @brief Helper to convert a MonitoringCriterionEnumType enum to string */ +extern const EnumToStringFromString MonitoringCriterionEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MONITORINGCRITERIONENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MONITORINGCRITERIONENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MonitoringDataType20.cpp b/src/ocpp20/types/MonitoringDataType20.cpp index 7b8c8d9c..d452ff24 100644 --- a/src/ocpp20/types/MonitoringDataType20.cpp +++ b/src/ocpp20/types/MonitoringDataType20.cpp @@ -32,38 +32,38 @@ namespace types namespace ocpp20 { -/** @brief Convert a MonitoringDataType20 from a JSON representation */ -bool MonitoringDataType20Converter::fromJson(const rapidjson::Value& json, - MonitoringDataType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a MonitoringDataType from a JSON representation */ +bool MonitoringDataTypeConverter::fromJson(const rapidjson::Value& json, + MonitoringDataType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; ret = ret && component_converter.fromJson(json["component"], data.component, error_code, error_message); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; ret = ret && variable_converter.fromJson(json["variable"], data.variable, error_code, error_message); // variableMonitoring if (json.HasMember("variableMonitoring")) { - const rapidjson::Value& variableMonitoring_json = json["variableMonitoring"]; - VariableMonitoringType20Converter variableMonitoring_converter; + const rapidjson::Value& variableMonitoring_json = json["variableMonitoring"]; + VariableMonitoringTypeConverter variableMonitoring_converter; for (auto it = variableMonitoring_json.Begin(); ret && (it != variableMonitoring_json.End()); ++it) { - VariableMonitoringType20& item = data.variableMonitoring.emplace_back(); - ret = ret && variableMonitoring_converter.fromJson(*it, item, error_code, error_message); + VariableMonitoringType& item = data.variableMonitoring.emplace_back(); + ret = ret && variableMonitoring_converter.fromJson(*it, item, error_code, error_message); } } @@ -75,15 +75,15 @@ bool MonitoringDataType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a MonitoringDataType20 to a JSON representation */ -bool MonitoringDataType20Converter::toJson(const MonitoringDataType20& data, rapidjson::Document& json) +/** @brief Convert a MonitoringDataType to a JSON representation */ +bool MonitoringDataTypeConverter::toJson(const MonitoringDataType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -92,7 +92,7 @@ bool MonitoringDataType20Converter::toJson(const MonitoringDataType20& data, rap } // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; component_converter.setAllocator(allocator); rapidjson::Document component_doc; component_doc.Parse("{}"); @@ -100,7 +100,7 @@ bool MonitoringDataType20Converter::toJson(const MonitoringDataType20& data, rap json.AddMember(rapidjson::StringRef("component"), component_doc.Move(), *allocator); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; variable_converter.setAllocator(allocator); rapidjson::Document variable_doc; variable_doc.Parse("{}"); @@ -109,10 +109,10 @@ bool MonitoringDataType20Converter::toJson(const MonitoringDataType20& data, rap // variableMonitoring - rapidjson::Value variableMonitoring_json(rapidjson::kArrayType); - VariableMonitoringType20Converter variableMonitoring_converter; + rapidjson::Value variableMonitoring_json(rapidjson::kArrayType); + VariableMonitoringTypeConverter variableMonitoring_converter; variableMonitoring_converter.setAllocator(allocator); - for (const VariableMonitoringType20& item : data.variableMonitoring) + for (const VariableMonitoringType& item : data.variableMonitoring) { rapidjson::Document item_doc; item_doc.Parse("{}"); diff --git a/src/ocpp20/types/MonitoringDataType20.h b/src/ocpp20/types/MonitoringDataType20.h index 9e7a9296..2e685990 100644 --- a/src/ocpp20/types/MonitoringDataType20.h +++ b/src/ocpp20/types/MonitoringDataType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MONITORINGDATATYPE20_H -#define OPENOCPP_MONITORINGDATATYPE20_H +#ifndef OPENOCPP_OCPP20_MONITORINGDATATYPE_H +#define OPENOCPP_OCPP20_MONITORINGDATATYPE_H #include "ComponentType20.h" #include "CustomDataType20.h" @@ -42,37 +42,37 @@ namespace ocpp20 /** @brief Class to hold parameters of SetVariableMonitoring request. */ -struct MonitoringDataType20 +struct MonitoringDataType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ComponentType20 component; + ComponentType component; /** @brief */ - VariableType20 variable; + VariableType variable; /** @brief */ - std::vector variableMonitoring; + std::vector variableMonitoring; }; -/** @brief Converter class for MonitoringDataType20 type */ -class MonitoringDataType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for MonitoringDataType type */ +class MonitoringDataTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new MonitoringDataType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new MonitoringDataTypeConverter(); } - /** @brief Convert a MonitoringDataType20 from a JSON representation */ + /** @brief Convert a MonitoringDataType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - MonitoringDataType20& data, + MonitoringDataType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a MonitoringDataType20 to a JSON representation */ - bool toJson(const MonitoringDataType20& data, rapidjson::Document& json) override; + /** @brief Convert a MonitoringDataType to a JSON representation */ + bool toJson(const MonitoringDataType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MONITORINGDATATYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MONITORINGDATATYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/MutabilityEnumType20.cpp b/src/ocpp20/types/MutabilityEnumType20.cpp index aab19e77..2c96b4bd 100644 --- a/src/ocpp20/types/MutabilityEnumType20.cpp +++ b/src/ocpp20/types/MutabilityEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a MutabilityEnumType20 enum to string */ -const EnumToStringFromString MutabilityEnumType20Helper = { - {MutabilityEnumType20::ReadOnly, "ReadOnly"}, - {MutabilityEnumType20::WriteOnly, "WriteOnly"}, - {MutabilityEnumType20::ReadWrite, "ReadWrite"}, +/** @brief Helper to convert a MutabilityEnumType enum to string */ +const EnumToStringFromString MutabilityEnumTypeHelper = { + {MutabilityEnumType::ReadOnly, "ReadOnly"}, + {MutabilityEnumType::WriteOnly, "WriteOnly"}, + {MutabilityEnumType::ReadWrite, "ReadWrite"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/MutabilityEnumType20.h b/src/ocpp20/types/MutabilityEnumType20.h index 65bb2962..6a11e822 100644 --- a/src/ocpp20/types/MutabilityEnumType20.h +++ b/src/ocpp20/types/MutabilityEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_MUTABILITYENUMTYPE20_H -#define OPENOCPP_MUTABILITYENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_MUTABILITYENUMTYPE_H +#define OPENOCPP_OCPP20_MUTABILITYENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief Defines the mutability of this attribute. Default is ReadWrite when omitted. */ -enum class MutabilityEnumType20 +enum class MutabilityEnumType { ReadOnly, WriteOnly, ReadWrite, }; -/** @brief Helper to convert a MutabilityEnumType20 enum to string */ -extern const EnumToStringFromString MutabilityEnumType20Helper; +/** @brief Helper to convert a MutabilityEnumType enum to string */ +extern const EnumToStringFromString MutabilityEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_MUTABILITYENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_MUTABILITYENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/NetworkConnectionProfileType20.cpp b/src/ocpp20/types/NetworkConnectionProfileType20.cpp index e1925fbd..5b7066d5 100644 --- a/src/ocpp20/types/NetworkConnectionProfileType20.cpp +++ b/src/ocpp20/types/NetworkConnectionProfileType20.cpp @@ -32,33 +32,33 @@ namespace types namespace ocpp20 { -/** @brief Convert a NetworkConnectionProfileType20 from a JSON representation */ -bool NetworkConnectionProfileType20Converter::fromJson(const rapidjson::Value& json, - NetworkConnectionProfileType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a NetworkConnectionProfileType from a JSON representation */ +bool NetworkConnectionProfileTypeConverter::fromJson(const rapidjson::Value& json, + NetworkConnectionProfileType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // apn if (json.HasMember("apn")) { - APNType20Converter apn_converter; + APNTypeConverter apn_converter; ret = ret && apn_converter.fromJson(json["apn"], data.apn, error_code, error_message); } // ocppVersion - data.ocppVersion = OCPPVersionEnumType20Helper.fromString(json["ocppVersion"].GetString()); + data.ocppVersion = OCPPVersionEnumTypeHelper.fromString(json["ocppVersion"].GetString()); // ocppTransport - data.ocppTransport = OCPPTransportEnumType20Helper.fromString(json["ocppTransport"].GetString()); + data.ocppTransport = OCPPTransportEnumTypeHelper.fromString(json["ocppTransport"].GetString()); // ocppCsmsUrl extract(json, "ocppCsmsUrl", data.ocppCsmsUrl); @@ -70,12 +70,12 @@ bool NetworkConnectionProfileType20Converter::fromJson(const rapidjson::Value& extract(json, "securityProfile", data.securityProfile); // ocppInterface - data.ocppInterface = OCPPInterfaceEnumType20Helper.fromString(json["ocppInterface"].GetString()); + data.ocppInterface = OCPPInterfaceEnumTypeHelper.fromString(json["ocppInterface"].GetString()); // vpn if (json.HasMember("vpn")) { - VPNType20Converter vpn_converter; + VPNTypeConverter vpn_converter; ret = ret && vpn_converter.fromJson(json["vpn"], data.vpn, error_code, error_message); } @@ -87,15 +87,15 @@ bool NetworkConnectionProfileType20Converter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a NetworkConnectionProfileType20 to a JSON representation */ -bool NetworkConnectionProfileType20Converter::toJson(const NetworkConnectionProfileType20& data, rapidjson::Document& json) +/** @brief Convert a NetworkConnectionProfileType to a JSON representation */ +bool NetworkConnectionProfileTypeConverter::toJson(const NetworkConnectionProfileType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -106,7 +106,7 @@ bool NetworkConnectionProfileType20Converter::toJson(const NetworkConnectionProf // apn if (data.apn.isSet()) { - APNType20Converter apn_converter; + APNTypeConverter apn_converter; apn_converter.setAllocator(allocator); rapidjson::Document apn_doc; apn_doc.Parse("{}"); @@ -115,10 +115,10 @@ bool NetworkConnectionProfileType20Converter::toJson(const NetworkConnectionProf } // ocppVersion - fill(json, "ocppVersion", OCPPVersionEnumType20Helper.toString(data.ocppVersion)); + fill(json, "ocppVersion", OCPPVersionEnumTypeHelper.toString(data.ocppVersion)); // ocppTransport - fill(json, "ocppTransport", OCPPTransportEnumType20Helper.toString(data.ocppTransport)); + fill(json, "ocppTransport", OCPPTransportEnumTypeHelper.toString(data.ocppTransport)); // ocppCsmsUrl fill(json, "ocppCsmsUrl", data.ocppCsmsUrl); @@ -130,12 +130,12 @@ bool NetworkConnectionProfileType20Converter::toJson(const NetworkConnectionProf fill(json, "securityProfile", data.securityProfile); // ocppInterface - fill(json, "ocppInterface", OCPPInterfaceEnumType20Helper.toString(data.ocppInterface)); + fill(json, "ocppInterface", OCPPInterfaceEnumTypeHelper.toString(data.ocppInterface)); // vpn if (data.vpn.isSet()) { - VPNType20Converter vpn_converter; + VPNTypeConverter vpn_converter; vpn_converter.setAllocator(allocator); rapidjson::Document vpn_doc; vpn_doc.Parse("{}"); diff --git a/src/ocpp20/types/NetworkConnectionProfileType20.h b/src/ocpp20/types/NetworkConnectionProfileType20.h index ffa2c031..03fbed00 100644 --- a/src/ocpp20/types/NetworkConnectionProfileType20.h +++ b/src/ocpp20/types/NetworkConnectionProfileType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_NETWORKCONNECTIONPROFILETYPE20_H -#define OPENOCPP_NETWORKCONNECTIONPROFILETYPE20_H +#ifndef OPENOCPP_OCPP20_NETWORKCONNECTIONPROFILETYPE_H +#define OPENOCPP_OCPP20_NETWORKCONNECTIONPROFILETYPE_H #include "APNType20.h" #include "CustomDataType20.h" @@ -46,16 +46,16 @@ namespace ocpp20 urn:x-oca:ocpp:uid:2:233304 The NetworkConnectionProfile defines the functional and technical parameters of a communication link. */ -struct NetworkConnectionProfileType20 +struct NetworkConnectionProfileType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional apn; + ocpp::types::Optional apn; /** @brief */ - OCPPVersionEnumType20 ocppVersion; + OCPPVersionEnumType ocppVersion; /** @brief */ - OCPPTransportEnumType20 ocppTransport; + OCPPTransportEnumType ocppTransport; /** @brief Communication_ Function. OCPP_ Central_ System_ URL. URI urn:x-oca:ocpp:uid:1:569357 URL of the CSMS(s) that this Charging Station communicates with. */ @@ -67,33 +67,33 @@ If you are looking for a some guideline: use 30 seconds as a starting point. */ /** @brief This field specifies the security profile used when connecting to the CSMS with this NetworkConnectionProfile. */ int securityProfile; /** @brief */ - OCPPInterfaceEnumType20 ocppInterface; + OCPPInterfaceEnumType ocppInterface; /** @brief */ - ocpp::types::Optional vpn; + ocpp::types::Optional vpn; }; -/** @brief Converter class for NetworkConnectionProfileType20 type */ -class NetworkConnectionProfileType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for NetworkConnectionProfileType type */ +class NetworkConnectionProfileTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override + ocpp::messages::IMessageConverter* clone() const override { - return new NetworkConnectionProfileType20Converter(); + return new NetworkConnectionProfileTypeConverter(); } - /** @brief Convert a NetworkConnectionProfileType20 from a JSON representation */ - bool fromJson(const rapidjson::Value& json, - NetworkConnectionProfileType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) override; + /** @brief Convert a NetworkConnectionProfileType from a JSON representation */ + bool fromJson(const rapidjson::Value& json, + NetworkConnectionProfileType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a NetworkConnectionProfileType20 to a JSON representation */ - bool toJson(const NetworkConnectionProfileType20& data, rapidjson::Document& json) override; + /** @brief Convert a NetworkConnectionProfileType to a JSON representation */ + bool toJson(const NetworkConnectionProfileType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_NETWORKCONNECTIONPROFILETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_NETWORKCONNECTIONPROFILETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/NotifyEVChargingNeedsStatusEnumType20.cpp b/src/ocpp20/types/NotifyEVChargingNeedsStatusEnumType20.cpp index 42320d98..a8e35cfa 100644 --- a/src/ocpp20/types/NotifyEVChargingNeedsStatusEnumType20.cpp +++ b/src/ocpp20/types/NotifyEVChargingNeedsStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a NotifyEVChargingNeedsStatusEnumType20 enum to string */ -const EnumToStringFromString NotifyEVChargingNeedsStatusEnumType20Helper = { - {NotifyEVChargingNeedsStatusEnumType20::Accepted, "Accepted"}, - {NotifyEVChargingNeedsStatusEnumType20::Rejected, "Rejected"}, - {NotifyEVChargingNeedsStatusEnumType20::Processing, "Processing"}, +/** @brief Helper to convert a NotifyEVChargingNeedsStatusEnumType enum to string */ +const EnumToStringFromString NotifyEVChargingNeedsStatusEnumTypeHelper = { + {NotifyEVChargingNeedsStatusEnumType::Accepted, "Accepted"}, + {NotifyEVChargingNeedsStatusEnumType::Rejected, "Rejected"}, + {NotifyEVChargingNeedsStatusEnumType::Processing, "Processing"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/NotifyEVChargingNeedsStatusEnumType20.h b/src/ocpp20/types/NotifyEVChargingNeedsStatusEnumType20.h index 6d7c4da8..b5e36b58 100644 --- a/src/ocpp20/types/NotifyEVChargingNeedsStatusEnumType20.h +++ b/src/ocpp20/types/NotifyEVChargingNeedsStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_NOTIFYEVCHARGINGNEEDSSTATUSENUMTYPE20_H -#define OPENOCPP_NOTIFYEVCHARGINGNEEDSSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_NOTIFYEVCHARGINGNEEDSSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_NOTIFYEVCHARGINGNEEDSSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief Returns whether the CSMS has been able to process the message successfully. It does not imply that the evChargingNeeds can be met with the current charging profile. */ -enum class NotifyEVChargingNeedsStatusEnumType20 +enum class NotifyEVChargingNeedsStatusEnumType { Accepted, Rejected, Processing, }; -/** @brief Helper to convert a NotifyEVChargingNeedsStatusEnumType20 enum to string */ -extern const EnumToStringFromString NotifyEVChargingNeedsStatusEnumType20Helper; +/** @brief Helper to convert a NotifyEVChargingNeedsStatusEnumType enum to string */ +extern const EnumToStringFromString NotifyEVChargingNeedsStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_NOTIFYEVCHARGINGNEEDSSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_NOTIFYEVCHARGINGNEEDSSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/OCPPInterfaceEnumType20.cpp b/src/ocpp20/types/OCPPInterfaceEnumType20.cpp index 0ef6110d..e601b3a3 100644 --- a/src/ocpp20/types/OCPPInterfaceEnumType20.cpp +++ b/src/ocpp20/types/OCPPInterfaceEnumType20.cpp @@ -30,16 +30,16 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a OCPPInterfaceEnumType20 enum to string */ -const EnumToStringFromString OCPPInterfaceEnumType20Helper = { - {OCPPInterfaceEnumType20::Wired0, "Wired0"}, - {OCPPInterfaceEnumType20::Wired1, "Wired1"}, - {OCPPInterfaceEnumType20::Wired2, "Wired2"}, - {OCPPInterfaceEnumType20::Wired3, "Wired3"}, - {OCPPInterfaceEnumType20::Wireless0, "Wireless0"}, - {OCPPInterfaceEnumType20::Wireless1, "Wireless1"}, - {OCPPInterfaceEnumType20::Wireless2, "Wireless2"}, - {OCPPInterfaceEnumType20::Wireless3, "Wireless3"}, +/** @brief Helper to convert a OCPPInterfaceEnumType enum to string */ +const EnumToStringFromString OCPPInterfaceEnumTypeHelper = { + {OCPPInterfaceEnumType::Wired0, "Wired0"}, + {OCPPInterfaceEnumType::Wired1, "Wired1"}, + {OCPPInterfaceEnumType::Wired2, "Wired2"}, + {OCPPInterfaceEnumType::Wired3, "Wired3"}, + {OCPPInterfaceEnumType::Wireless0, "Wireless0"}, + {OCPPInterfaceEnumType::Wireless1, "Wireless1"}, + {OCPPInterfaceEnumType::Wireless2, "Wireless2"}, + {OCPPInterfaceEnumType::Wireless3, "Wireless3"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/OCPPInterfaceEnumType20.h b/src/ocpp20/types/OCPPInterfaceEnumType20.h index cbcb667e..44ec57ad 100644 --- a/src/ocpp20/types/OCPPInterfaceEnumType20.h +++ b/src/ocpp20/types/OCPPInterfaceEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_OCPPINTERFACEENUMTYPE20_H -#define OPENOCPP_OCPPINTERFACEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_OCPPINTERFACEENUMTYPE_H +#define OPENOCPP_OCPP20_OCPPINTERFACEENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief Applicable Network Interface. */ -enum class OCPPInterfaceEnumType20 +enum class OCPPInterfaceEnumType { Wired0, Wired1, @@ -46,11 +46,11 @@ enum class OCPPInterfaceEnumType20 Wireless3, }; -/** @brief Helper to convert a OCPPInterfaceEnumType20 enum to string */ -extern const EnumToStringFromString OCPPInterfaceEnumType20Helper; +/** @brief Helper to convert a OCPPInterfaceEnumType enum to string */ +extern const EnumToStringFromString OCPPInterfaceEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_OCPPINTERFACEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_OCPPINTERFACEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/OCPPTransportEnumType20.cpp b/src/ocpp20/types/OCPPTransportEnumType20.cpp index 35e96cb2..05485415 100644 --- a/src/ocpp20/types/OCPPTransportEnumType20.cpp +++ b/src/ocpp20/types/OCPPTransportEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a OCPPTransportEnumType20 enum to string */ -const EnumToStringFromString OCPPTransportEnumType20Helper = { - {OCPPTransportEnumType20::JSON, "JSON"}, - {OCPPTransportEnumType20::SOAP, "SOAP"}, +/** @brief Helper to convert a OCPPTransportEnumType enum to string */ +const EnumToStringFromString OCPPTransportEnumTypeHelper = { + {OCPPTransportEnumType::JSON, "JSON"}, + {OCPPTransportEnumType::SOAP, "SOAP"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/OCPPTransportEnumType20.h b/src/ocpp20/types/OCPPTransportEnumType20.h index e0989af7..6ab1776b 100644 --- a/src/ocpp20/types/OCPPTransportEnumType20.h +++ b/src/ocpp20/types/OCPPTransportEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_OCPPTRANSPORTENUMTYPE20_H -#define OPENOCPP_OCPPTRANSPORTENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_OCPPTRANSPORTENUMTYPE_H +#define OPENOCPP_OCPP20_OCPPTRANSPORTENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,17 +36,17 @@ namespace ocpp20 /** @brief Communication_ Function. OCPP_ Transport. OCPP_ Transport_ Code urn:x-oca:ocpp:uid:1:569356 Defines the transport protocol (e.g. SOAP or JSON). Note: SOAP is not supported in OCPP 2.0, but is supported by other versions of OCPP. */ -enum class OCPPTransportEnumType20 +enum class OCPPTransportEnumType { JSON, SOAP, }; -/** @brief Helper to convert a OCPPTransportEnumType20 enum to string */ -extern const EnumToStringFromString OCPPTransportEnumType20Helper; +/** @brief Helper to convert a OCPPTransportEnumType enum to string */ +extern const EnumToStringFromString OCPPTransportEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_OCPPTRANSPORTENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_OCPPTRANSPORTENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/OCPPVersionEnumType20.cpp b/src/ocpp20/types/OCPPVersionEnumType20.cpp index 08058d1f..1717a53d 100644 --- a/src/ocpp20/types/OCPPVersionEnumType20.cpp +++ b/src/ocpp20/types/OCPPVersionEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a OCPPVersionEnumType20 enum to string */ -const EnumToStringFromString OCPPVersionEnumType20Helper = { - {OCPPVersionEnumType20::OCPP12, "OCPP12"}, - {OCPPVersionEnumType20::OCPP15, "OCPP15"}, - {OCPPVersionEnumType20::OCPP16, "OCPP16"}, - {OCPPVersionEnumType20::OCPP20, "OCPP20"}, +/** @brief Helper to convert a OCPPVersionEnumType enum to string */ +const EnumToStringFromString OCPPVersionEnumTypeHelper = { + {OCPPVersionEnumType::OCPP12, "OCPP12"}, + {OCPPVersionEnumType::OCPP15, "OCPP15"}, + {OCPPVersionEnumType::OCPP16, "OCPP16"}, + {OCPPVersionEnumType::OCPP20, "OCPP20"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/OCPPVersionEnumType20.h b/src/ocpp20/types/OCPPVersionEnumType20.h index e2208060..dbcfe11c 100644 --- a/src/ocpp20/types/OCPPVersionEnumType20.h +++ b/src/ocpp20/types/OCPPVersionEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_OCPPVERSIONENUMTYPE20_H -#define OPENOCPP_OCPPVERSIONENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_OCPPVERSIONENUMTYPE_H +#define OPENOCPP_OCPP20_OCPPVERSIONENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief Communication_ Function. OCPP_ Version. OCPP_ Version_ Code urn:x-oca:ocpp:uid:1:569355 Defines the OCPP version used for this communication function. */ -enum class OCPPVersionEnumType20 +enum class OCPPVersionEnumType { OCPP12, OCPP15, @@ -44,11 +44,11 @@ enum class OCPPVersionEnumType20 OCPP20, }; -/** @brief Helper to convert a OCPPVersionEnumType20 enum to string */ -extern const EnumToStringFromString OCPPVersionEnumType20Helper; +/** @brief Helper to convert a OCPPVersionEnumType enum to string */ +extern const EnumToStringFromString OCPPVersionEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_OCPPVERSIONENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_OCPPVERSIONENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/OCSPRequestDataType20.cpp b/src/ocpp20/types/OCSPRequestDataType20.cpp index 7fabe8a0..95e5365e 100644 --- a/src/ocpp20/types/OCSPRequestDataType20.cpp +++ b/src/ocpp20/types/OCSPRequestDataType20.cpp @@ -32,23 +32,23 @@ namespace types namespace ocpp20 { -/** @brief Convert a OCSPRequestDataType20 from a JSON representation */ -bool OCSPRequestDataType20Converter::fromJson(const rapidjson::Value& json, - OCSPRequestDataType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a OCSPRequestDataType from a JSON representation */ +bool OCSPRequestDataTypeConverter::fromJson(const rapidjson::Value& json, + OCSPRequestDataType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // hashAlgorithm - data.hashAlgorithm = HashAlgorithmEnumType20Helper.fromString(json["hashAlgorithm"].GetString()); + data.hashAlgorithm = HashAlgorithmEnumTypeHelper.fromString(json["hashAlgorithm"].GetString()); // issuerNameHash extract(json, "issuerNameHash", data.issuerNameHash); @@ -70,15 +70,15 @@ bool OCSPRequestDataType20Converter::fromJson(const rapidjson::Value& json return ret; } -/** @brief Convert a OCSPRequestDataType20 to a JSON representation */ -bool OCSPRequestDataType20Converter::toJson(const OCSPRequestDataType20& data, rapidjson::Document& json) +/** @brief Convert a OCSPRequestDataType to a JSON representation */ +bool OCSPRequestDataTypeConverter::toJson(const OCSPRequestDataType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -87,7 +87,7 @@ bool OCSPRequestDataType20Converter::toJson(const OCSPRequestDataType20& data, r } // hashAlgorithm - fill(json, "hashAlgorithm", HashAlgorithmEnumType20Helper.toString(data.hashAlgorithm)); + fill(json, "hashAlgorithm", HashAlgorithmEnumTypeHelper.toString(data.hashAlgorithm)); // issuerNameHash fill(json, "issuerNameHash", data.issuerNameHash); diff --git a/src/ocpp20/types/OCSPRequestDataType20.h b/src/ocpp20/types/OCSPRequestDataType20.h index fb4c5a57..9eb4dc14 100644 --- a/src/ocpp20/types/OCSPRequestDataType20.h +++ b/src/ocpp20/types/OCSPRequestDataType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_OCSPREQUESTDATATYPE20_H -#define OPENOCPP_OCSPREQUESTDATATYPE20_H +#ifndef OPENOCPP_OCPP20_OCSPREQUESTDATATYPE_H +#define OPENOCPP_OCPP20_OCSPREQUESTDATATYPE_H #include "CustomDataType20.h" #include "HashAlgorithmEnumType20.h" @@ -39,12 +39,12 @@ namespace ocpp20 { /** @brief */ -struct OCSPRequestDataType20 +struct OCSPRequestDataType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - HashAlgorithmEnumType20 hashAlgorithm; + HashAlgorithmEnumType hashAlgorithm; /** @brief Hashed value of the Issuer DN (Distinguished Name). */ ocpp::types::CiStringType<128u> issuerNameHash; /** @brief Hashed value of the issuers public key */ @@ -55,25 +55,25 @@ struct OCSPRequestDataType20 ocpp::types::CiStringType<512u> responderURL; }; -/** @brief Converter class for OCSPRequestDataType20 type */ -class OCSPRequestDataType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for OCSPRequestDataType type */ +class OCSPRequestDataTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new OCSPRequestDataType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new OCSPRequestDataTypeConverter(); } - /** @brief Convert a OCSPRequestDataType20 from a JSON representation */ + /** @brief Convert a OCSPRequestDataType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - OCSPRequestDataType20& data, + OCSPRequestDataType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a OCSPRequestDataType20 to a JSON representation */ - bool toJson(const OCSPRequestDataType20& data, rapidjson::Document& json) override; + /** @brief Convert a OCSPRequestDataType to a JSON representation */ + bool toJson(const OCSPRequestDataType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_OCSPREQUESTDATATYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_OCSPREQUESTDATATYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/OperationalStatusEnumType20.cpp b/src/ocpp20/types/OperationalStatusEnumType20.cpp index 2099077c..bbb1bbf6 100644 --- a/src/ocpp20/types/OperationalStatusEnumType20.cpp +++ b/src/ocpp20/types/OperationalStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a OperationalStatusEnumType20 enum to string */ -const EnumToStringFromString OperationalStatusEnumType20Helper = { - {OperationalStatusEnumType20::Inoperative, "Inoperative"}, - {OperationalStatusEnumType20::Operative, "Operative"}, +/** @brief Helper to convert a OperationalStatusEnumType enum to string */ +const EnumToStringFromString OperationalStatusEnumTypeHelper = { + {OperationalStatusEnumType::Inoperative, "Inoperative"}, + {OperationalStatusEnumType::Operative, "Operative"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/OperationalStatusEnumType20.h b/src/ocpp20/types/OperationalStatusEnumType20.h index 429938b4..fbb17bfe 100644 --- a/src/ocpp20/types/OperationalStatusEnumType20.h +++ b/src/ocpp20/types/OperationalStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_OPERATIONALSTATUSENUMTYPE20_H -#define OPENOCPP_OPERATIONALSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_OPERATIONALSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_OPERATIONALSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief This contains the type of availability change that the Charging Station should perform. */ -enum class OperationalStatusEnumType20 +enum class OperationalStatusEnumType { Inoperative, Operative, }; -/** @brief Helper to convert a OperationalStatusEnumType20 enum to string */ -extern const EnumToStringFromString OperationalStatusEnumType20Helper; +/** @brief Helper to convert a OperationalStatusEnumType enum to string */ +extern const EnumToStringFromString OperationalStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_OPERATIONALSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_OPERATIONALSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/PhaseEnumType20.cpp b/src/ocpp20/types/PhaseEnumType20.cpp index 0ce2149b..3a5d0863 100644 --- a/src/ocpp20/types/PhaseEnumType20.cpp +++ b/src/ocpp20/types/PhaseEnumType20.cpp @@ -30,18 +30,18 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a PhaseEnumType20 enum to string */ -const EnumToStringFromString PhaseEnumType20Helper = { - {PhaseEnumType20::L1, "L1"}, - {PhaseEnumType20::L2, "L2"}, - {PhaseEnumType20::L3, "L3"}, - {PhaseEnumType20::N, "N"}, - {PhaseEnumType20::L1_N, "L1-N"}, - {PhaseEnumType20::L2_N, "L2-N"}, - {PhaseEnumType20::L3_N, "L3-N"}, - {PhaseEnumType20::L1_L2, "L1-L2"}, - {PhaseEnumType20::L2_L3, "L2-L3"}, - {PhaseEnumType20::L3_L1, "L3-L1"}, +/** @brief Helper to convert a PhaseEnumType enum to string */ +const EnumToStringFromString PhaseEnumTypeHelper = { + {PhaseEnumType::L1, "L1"}, + {PhaseEnumType::L2, "L2"}, + {PhaseEnumType::L3, "L3"}, + {PhaseEnumType::N, "N"}, + {PhaseEnumType::L1_N, "L1-N"}, + {PhaseEnumType::L2_N, "L2-N"}, + {PhaseEnumType::L3_N, "L3-N"}, + {PhaseEnumType::L1_L2, "L1-L2"}, + {PhaseEnumType::L2_L3, "L2-L3"}, + {PhaseEnumType::L3_L1, "L3-L1"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/PhaseEnumType20.h b/src/ocpp20/types/PhaseEnumType20.h index effcd6a4..522ddb16 100644 --- a/src/ocpp20/types/PhaseEnumType20.h +++ b/src/ocpp20/types/PhaseEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_PHASEENUMTYPE20_H -#define OPENOCPP_PHASEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_PHASEENUMTYPE_H +#define OPENOCPP_OCPP20_PHASEENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief Sampled_ Value. Phase. Phase_ Code urn:x-oca:ocpp:uid:1:569264 Indicates how the measured value is to be interpreted. For instance between L1 and neutral (L1-N) Please note that not all values of phase are applicable to all Measurands. When phase is absent, the measured value is interpreted as an overall value. */ -enum class PhaseEnumType20 +enum class PhaseEnumType { L1, L2, @@ -50,11 +50,11 @@ enum class PhaseEnumType20 L3_L1, }; -/** @brief Helper to convert a PhaseEnumType20 enum to string */ -extern const EnumToStringFromString PhaseEnumType20Helper; +/** @brief Helper to convert a PhaseEnumType enum to string */ +extern const EnumToStringFromString PhaseEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_PHASEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_PHASEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/PublishFirmwareStatusEnumType20.cpp b/src/ocpp20/types/PublishFirmwareStatusEnumType20.cpp index 1b709257..04bdec7e 100644 --- a/src/ocpp20/types/PublishFirmwareStatusEnumType20.cpp +++ b/src/ocpp20/types/PublishFirmwareStatusEnumType20.cpp @@ -30,18 +30,18 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a PublishFirmwareStatusEnumType20 enum to string */ -const EnumToStringFromString PublishFirmwareStatusEnumType20Helper = { - {PublishFirmwareStatusEnumType20::Idle, "Idle"}, - {PublishFirmwareStatusEnumType20::DownloadScheduled, "DownloadScheduled"}, - {PublishFirmwareStatusEnumType20::Downloading, "Downloading"}, - {PublishFirmwareStatusEnumType20::Downloaded, "Downloaded"}, - {PublishFirmwareStatusEnumType20::Published, "Published"}, - {PublishFirmwareStatusEnumType20::DownloadFailed, "DownloadFailed"}, - {PublishFirmwareStatusEnumType20::DownloadPaused, "DownloadPaused"}, - {PublishFirmwareStatusEnumType20::InvalidChecksum, "InvalidChecksum"}, - {PublishFirmwareStatusEnumType20::ChecksumVerified, "ChecksumVerified"}, - {PublishFirmwareStatusEnumType20::PublishFailed, "PublishFailed"}, +/** @brief Helper to convert a PublishFirmwareStatusEnumType enum to string */ +const EnumToStringFromString PublishFirmwareStatusEnumTypeHelper = { + {PublishFirmwareStatusEnumType::Idle, "Idle"}, + {PublishFirmwareStatusEnumType::DownloadScheduled, "DownloadScheduled"}, + {PublishFirmwareStatusEnumType::Downloading, "Downloading"}, + {PublishFirmwareStatusEnumType::Downloaded, "Downloaded"}, + {PublishFirmwareStatusEnumType::Published, "Published"}, + {PublishFirmwareStatusEnumType::DownloadFailed, "DownloadFailed"}, + {PublishFirmwareStatusEnumType::DownloadPaused, "DownloadPaused"}, + {PublishFirmwareStatusEnumType::InvalidChecksum, "InvalidChecksum"}, + {PublishFirmwareStatusEnumType::ChecksumVerified, "ChecksumVerified"}, + {PublishFirmwareStatusEnumType::PublishFailed, "PublishFailed"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/PublishFirmwareStatusEnumType20.h b/src/ocpp20/types/PublishFirmwareStatusEnumType20.h index 38eaf2bd..49c666ec 100644 --- a/src/ocpp20/types/PublishFirmwareStatusEnumType20.h +++ b/src/ocpp20/types/PublishFirmwareStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_PUBLISHFIRMWARESTATUSENUMTYPE20_H -#define OPENOCPP_PUBLISHFIRMWARESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_PUBLISHFIRMWARESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_PUBLISHFIRMWARESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -35,7 +35,7 @@ namespace ocpp20 /** @brief This contains the progress status of the publishfirmware installation. */ -enum class PublishFirmwareStatusEnumType20 +enum class PublishFirmwareStatusEnumType { Idle, DownloadScheduled, @@ -49,11 +49,11 @@ enum class PublishFirmwareStatusEnumType20 PublishFailed, }; -/** @brief Helper to convert a PublishFirmwareStatusEnumType20 enum to string */ -extern const EnumToStringFromString PublishFirmwareStatusEnumType20Helper; +/** @brief Helper to convert a PublishFirmwareStatusEnumType enum to string */ +extern const EnumToStringFromString PublishFirmwareStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_PUBLISHFIRMWARESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_PUBLISHFIRMWARESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ReadingContextEnumType20.cpp b/src/ocpp20/types/ReadingContextEnumType20.cpp index c7a495de..88f18eb6 100644 --- a/src/ocpp20/types/ReadingContextEnumType20.cpp +++ b/src/ocpp20/types/ReadingContextEnumType20.cpp @@ -30,16 +30,16 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ReadingContextEnumType20 enum to string */ -const EnumToStringFromString ReadingContextEnumType20Helper = { - {ReadingContextEnumType20::Interruption_Begin, "Interruption.Begin"}, - {ReadingContextEnumType20::Interruption_End, "Interruption.End"}, - {ReadingContextEnumType20::Other, "Other"}, - {ReadingContextEnumType20::Sample_Clock, "Sample.Clock"}, - {ReadingContextEnumType20::Sample_Periodic, "Sample.Periodic"}, - {ReadingContextEnumType20::Transaction_Begin, "Transaction.Begin"}, - {ReadingContextEnumType20::Transaction_End, "Transaction.End"}, - {ReadingContextEnumType20::Trigger, "Trigger"}, +/** @brief Helper to convert a ReadingContextEnumType enum to string */ +const EnumToStringFromString ReadingContextEnumTypeHelper = { + {ReadingContextEnumType::Interruption_Begin, "Interruption.Begin"}, + {ReadingContextEnumType::Interruption_End, "Interruption.End"}, + {ReadingContextEnumType::Other, "Other"}, + {ReadingContextEnumType::Sample_Clock, "Sample.Clock"}, + {ReadingContextEnumType::Sample_Periodic, "Sample.Periodic"}, + {ReadingContextEnumType::Transaction_Begin, "Transaction.Begin"}, + {ReadingContextEnumType::Transaction_End, "Transaction.End"}, + {ReadingContextEnumType::Trigger, "Trigger"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ReadingContextEnumType20.h b/src/ocpp20/types/ReadingContextEnumType20.h index 5cb992d8..bc6cf039 100644 --- a/src/ocpp20/types/ReadingContextEnumType20.h +++ b/src/ocpp20/types/ReadingContextEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_READINGCONTEXTENUMTYPE20_H -#define OPENOCPP_READINGCONTEXTENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_READINGCONTEXTENUMTYPE_H +#define OPENOCPP_OCPP20_READINGCONTEXTENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief Sampled_ Value. Context. Reading_ Context_ Code urn:x-oca:ocpp:uid:1:569261 Type of detail value: start, end or sample. Default = "Sample.Periodic" */ -enum class ReadingContextEnumType20 +enum class ReadingContextEnumType { Interruption_Begin, Interruption_End, @@ -48,11 +48,11 @@ enum class ReadingContextEnumType20 Trigger, }; -/** @brief Helper to convert a ReadingContextEnumType20 enum to string */ -extern const EnumToStringFromString ReadingContextEnumType20Helper; +/** @brief Helper to convert a ReadingContextEnumType enum to string */ +extern const EnumToStringFromString ReadingContextEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_READINGCONTEXTENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_READINGCONTEXTENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ReasonEnumType20.cpp b/src/ocpp20/types/ReasonEnumType20.cpp index 13fbc1fc..925033a7 100644 --- a/src/ocpp20/types/ReasonEnumType20.cpp +++ b/src/ocpp20/types/ReasonEnumType20.cpp @@ -30,27 +30,27 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ReasonEnumType20 enum to string */ -const EnumToStringFromString ReasonEnumType20Helper = { - {ReasonEnumType20::DeAuthorized, "DeAuthorized"}, - {ReasonEnumType20::EmergencyStop, "EmergencyStop"}, - {ReasonEnumType20::EnergyLimitReached, "EnergyLimitReached"}, - {ReasonEnumType20::EVDisconnected, "EVDisconnected"}, - {ReasonEnumType20::GroundFault, "GroundFault"}, - {ReasonEnumType20::ImmediateReset, "ImmediateReset"}, - {ReasonEnumType20::Local, "Local"}, - {ReasonEnumType20::LocalOutOfCredit, "LocalOutOfCredit"}, - {ReasonEnumType20::MasterPass, "MasterPass"}, - {ReasonEnumType20::Other, "Other"}, - {ReasonEnumType20::OvercurrentFault, "OvercurrentFault"}, - {ReasonEnumType20::PowerLoss, "PowerLoss"}, - {ReasonEnumType20::PowerQuality, "PowerQuality"}, - {ReasonEnumType20::Reboot, "Reboot"}, - {ReasonEnumType20::Remote, "Remote"}, - {ReasonEnumType20::SOCLimitReached, "SOCLimitReached"}, - {ReasonEnumType20::StoppedByEV, "StoppedByEV"}, - {ReasonEnumType20::TimeLimitReached, "TimeLimitReached"}, - {ReasonEnumType20::Timeout, "Timeout"}, +/** @brief Helper to convert a ReasonEnumType enum to string */ +const EnumToStringFromString ReasonEnumTypeHelper = { + {ReasonEnumType::DeAuthorized, "DeAuthorized"}, + {ReasonEnumType::EmergencyStop, "EmergencyStop"}, + {ReasonEnumType::EnergyLimitReached, "EnergyLimitReached"}, + {ReasonEnumType::EVDisconnected, "EVDisconnected"}, + {ReasonEnumType::GroundFault, "GroundFault"}, + {ReasonEnumType::ImmediateReset, "ImmediateReset"}, + {ReasonEnumType::Local, "Local"}, + {ReasonEnumType::LocalOutOfCredit, "LocalOutOfCredit"}, + {ReasonEnumType::MasterPass, "MasterPass"}, + {ReasonEnumType::Other, "Other"}, + {ReasonEnumType::OvercurrentFault, "OvercurrentFault"}, + {ReasonEnumType::PowerLoss, "PowerLoss"}, + {ReasonEnumType::PowerQuality, "PowerQuality"}, + {ReasonEnumType::Reboot, "Reboot"}, + {ReasonEnumType::Remote, "Remote"}, + {ReasonEnumType::SOCLimitReached, "SOCLimitReached"}, + {ReasonEnumType::StoppedByEV, "StoppedByEV"}, + {ReasonEnumType::TimeLimitReached, "TimeLimitReached"}, + {ReasonEnumType::Timeout, "Timeout"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ReasonEnumType20.h b/src/ocpp20/types/ReasonEnumType20.h index d33d9a27..23db83aa 100644 --- a/src/ocpp20/types/ReasonEnumType20.h +++ b/src/ocpp20/types/ReasonEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_REASONENUMTYPE20_H -#define OPENOCPP_REASONENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_REASONENUMTYPE_H +#define OPENOCPP_OCPP20_REASONENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief Transaction. Stopped_ Reason. EOT_ Reason_ Code urn:x-oca:ocpp:uid:1:569413 This contains the reason why the transaction was stopped. MAY only be omitted when Reason is "Local". */ -enum class ReasonEnumType20 +enum class ReasonEnumType { DeAuthorized, EmergencyStop, @@ -59,11 +59,11 @@ enum class ReasonEnumType20 Timeout, }; -/** @brief Helper to convert a ReasonEnumType20 enum to string */ -extern const EnumToStringFromString ReasonEnumType20Helper; +/** @brief Helper to convert a ReasonEnumType enum to string */ +extern const EnumToStringFromString ReasonEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_REASONENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_REASONENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/RecurrencyKindEnumType20.cpp b/src/ocpp20/types/RecurrencyKindEnumType20.cpp index 1cb2f58d..0ed699df 100644 --- a/src/ocpp20/types/RecurrencyKindEnumType20.cpp +++ b/src/ocpp20/types/RecurrencyKindEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a RecurrencyKindEnumType20 enum to string */ -const EnumToStringFromString RecurrencyKindEnumType20Helper = { - {RecurrencyKindEnumType20::Daily, "Daily"}, - {RecurrencyKindEnumType20::Weekly, "Weekly"}, +/** @brief Helper to convert a RecurrencyKindEnumType enum to string */ +const EnumToStringFromString RecurrencyKindEnumTypeHelper = { + {RecurrencyKindEnumType::Daily, "Daily"}, + {RecurrencyKindEnumType::Weekly, "Weekly"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/RecurrencyKindEnumType20.h b/src/ocpp20/types/RecurrencyKindEnumType20.h index b2178b09..912c257d 100644 --- a/src/ocpp20/types/RecurrencyKindEnumType20.h +++ b/src/ocpp20/types/RecurrencyKindEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_RECURRENCYKINDENUMTYPE20_H -#define OPENOCPP_RECURRENCYKINDENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_RECURRENCYKINDENUMTYPE_H +#define OPENOCPP_OCPP20_RECURRENCYKINDENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,17 +36,17 @@ namespace ocpp20 /** @brief Charging_ Profile. Recurrency_ Kind. Recurrency_ Kind_ Code urn:x-oca:ocpp:uid:1:569233 Indicates the start point of a recurrence. */ -enum class RecurrencyKindEnumType20 +enum class RecurrencyKindEnumType { Daily, Weekly, }; -/** @brief Helper to convert a RecurrencyKindEnumType20 enum to string */ -extern const EnumToStringFromString RecurrencyKindEnumType20Helper; +/** @brief Helper to convert a RecurrencyKindEnumType enum to string */ +extern const EnumToStringFromString RecurrencyKindEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_RECURRENCYKINDENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_RECURRENCYKINDENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/RegistrationStatusEnumType20.cpp b/src/ocpp20/types/RegistrationStatusEnumType20.cpp index 8331c0fd..7426a48f 100644 --- a/src/ocpp20/types/RegistrationStatusEnumType20.cpp +++ b/src/ocpp20/types/RegistrationStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a RegistrationStatusEnumType20 enum to string */ -const EnumToStringFromString RegistrationStatusEnumType20Helper = { - {RegistrationStatusEnumType20::Accepted, "Accepted"}, - {RegistrationStatusEnumType20::Pending, "Pending"}, - {RegistrationStatusEnumType20::Rejected, "Rejected"}, +/** @brief Helper to convert a RegistrationStatusEnumType enum to string */ +const EnumToStringFromString RegistrationStatusEnumTypeHelper = { + {RegistrationStatusEnumType::Accepted, "Accepted"}, + {RegistrationStatusEnumType::Pending, "Pending"}, + {RegistrationStatusEnumType::Rejected, "Rejected"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/RegistrationStatusEnumType20.h b/src/ocpp20/types/RegistrationStatusEnumType20.h index 465f1d0a..24a4d508 100644 --- a/src/ocpp20/types/RegistrationStatusEnumType20.h +++ b/src/ocpp20/types/RegistrationStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_REGISTRATIONSTATUSENUMTYPE20_H -#define OPENOCPP_REGISTRATIONSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_REGISTRATIONSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_REGISTRATIONSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -35,18 +35,18 @@ namespace ocpp20 /** @brief This contains whether the Charging Station has been registered within the CSMS. */ -enum class RegistrationStatusEnumType20 +enum class RegistrationStatusEnumType { Accepted, Pending, Rejected, }; -/** @brief Helper to convert a RegistrationStatusEnumType20 enum to string */ -extern const EnumToStringFromString RegistrationStatusEnumType20Helper; +/** @brief Helper to convert a RegistrationStatusEnumType enum to string */ +extern const EnumToStringFromString RegistrationStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_REGISTRATIONSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_REGISTRATIONSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/RelativeTimeIntervalType20.cpp b/src/ocpp20/types/RelativeTimeIntervalType20.cpp index 771e9d4c..0fc30911 100644 --- a/src/ocpp20/types/RelativeTimeIntervalType20.cpp +++ b/src/ocpp20/types/RelativeTimeIntervalType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a RelativeTimeIntervalType20 from a JSON representation */ -bool RelativeTimeIntervalType20Converter::fromJson(const rapidjson::Value& json, - RelativeTimeIntervalType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a RelativeTimeIntervalType from a JSON representation */ +bool RelativeTimeIntervalTypeConverter::fromJson(const rapidjson::Value& json, + RelativeTimeIntervalType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -61,15 +61,15 @@ bool RelativeTimeIntervalType20Converter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a RelativeTimeIntervalType20 to a JSON representation */ -bool RelativeTimeIntervalType20Converter::toJson(const RelativeTimeIntervalType20& data, rapidjson::Document& json) +/** @brief Convert a RelativeTimeIntervalType to a JSON representation */ +bool RelativeTimeIntervalTypeConverter::toJson(const RelativeTimeIntervalType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/RelativeTimeIntervalType20.h b/src/ocpp20/types/RelativeTimeIntervalType20.h index ac70c9a1..0010e54b 100644 --- a/src/ocpp20/types/RelativeTimeIntervalType20.h +++ b/src/ocpp20/types/RelativeTimeIntervalType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_RELATIVETIMEINTERVALTYPE20_H -#define OPENOCPP_RELATIVETIMEINTERVALTYPE20_H +#ifndef OPENOCPP_OCPP20_RELATIVETIMEINTERVALTYPE_H +#define OPENOCPP_OCPP20_RELATIVETIMEINTERVALTYPE_H #include "CustomDataType20.h" @@ -39,10 +39,10 @@ namespace ocpp20 /** @brief Relative_ Timer_ Interval urn:x-oca:ocpp:uid:2:233270 */ -struct RelativeTimeIntervalType20 +struct RelativeTimeIntervalType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Relative_ Timer_ Interval. Start. Elapsed_ Time urn:x-oca:ocpp:uid:1:569279 Start of the interval, in seconds from NOW. */ @@ -53,28 +53,25 @@ Duration of the interval, in seconds. */ ocpp::types::Optional duration; }; -/** @brief Converter class for RelativeTimeIntervalType20 type */ -class RelativeTimeIntervalType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for RelativeTimeIntervalType type */ +class RelativeTimeIntervalTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override - { - return new RelativeTimeIntervalType20Converter(); - } + ocpp::messages::IMessageConverter* clone() const override { return new RelativeTimeIntervalTypeConverter(); } - /** @brief Convert a RelativeTimeIntervalType20 from a JSON representation */ + /** @brief Convert a RelativeTimeIntervalType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - RelativeTimeIntervalType20& data, + RelativeTimeIntervalType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a RelativeTimeIntervalType20 to a JSON representation */ - bool toJson(const RelativeTimeIntervalType20& data, rapidjson::Document& json) override; + /** @brief Convert a RelativeTimeIntervalType to a JSON representation */ + bool toJson(const RelativeTimeIntervalType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_RELATIVETIMEINTERVALTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_RELATIVETIMEINTERVALTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ReportBaseEnumType20.cpp b/src/ocpp20/types/ReportBaseEnumType20.cpp index 4b99b6b4..e596d18e 100644 --- a/src/ocpp20/types/ReportBaseEnumType20.cpp +++ b/src/ocpp20/types/ReportBaseEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ReportBaseEnumType20 enum to string */ -const EnumToStringFromString ReportBaseEnumType20Helper = { - {ReportBaseEnumType20::ConfigurationInventory, "ConfigurationInventory"}, - {ReportBaseEnumType20::FullInventory, "FullInventory"}, - {ReportBaseEnumType20::SummaryInventory, "SummaryInventory"}, +/** @brief Helper to convert a ReportBaseEnumType enum to string */ +const EnumToStringFromString ReportBaseEnumTypeHelper = { + {ReportBaseEnumType::ConfigurationInventory, "ConfigurationInventory"}, + {ReportBaseEnumType::FullInventory, "FullInventory"}, + {ReportBaseEnumType::SummaryInventory, "SummaryInventory"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ReportBaseEnumType20.h b/src/ocpp20/types/ReportBaseEnumType20.h index 635a8e4f..e9bf9329 100644 --- a/src/ocpp20/types/ReportBaseEnumType20.h +++ b/src/ocpp20/types/ReportBaseEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_REPORTBASEENUMTYPE20_H -#define OPENOCPP_REPORTBASEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_REPORTBASEENUMTYPE_H +#define OPENOCPP_OCPP20_REPORTBASEENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief This field specifies the report base. */ -enum class ReportBaseEnumType20 +enum class ReportBaseEnumType { ConfigurationInventory, FullInventory, SummaryInventory, }; -/** @brief Helper to convert a ReportBaseEnumType20 enum to string */ -extern const EnumToStringFromString ReportBaseEnumType20Helper; +/** @brief Helper to convert a ReportBaseEnumType enum to string */ +extern const EnumToStringFromString ReportBaseEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_REPORTBASEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_REPORTBASEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ReportDataType20.cpp b/src/ocpp20/types/ReportDataType20.cpp index 894b2781..de0fb964 100644 --- a/src/ocpp20/types/ReportDataType20.cpp +++ b/src/ocpp20/types/ReportDataType20.cpp @@ -32,45 +32,45 @@ namespace types namespace ocpp20 { -/** @brief Convert a ReportDataType20 from a JSON representation */ -bool ReportDataType20Converter::fromJson(const rapidjson::Value& json, - ReportDataType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a ReportDataType from a JSON representation */ +bool ReportDataTypeConverter::fromJson(const rapidjson::Value& json, + ReportDataType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; ret = ret && component_converter.fromJson(json["component"], data.component, error_code, error_message); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; ret = ret && variable_converter.fromJson(json["variable"], data.variable, error_code, error_message); // variableAttribute if (json.HasMember("variableAttribute")) { - const rapidjson::Value& variableAttribute_json = json["variableAttribute"]; - VariableAttributeType20Converter variableAttribute_converter; + const rapidjson::Value& variableAttribute_json = json["variableAttribute"]; + VariableAttributeTypeConverter variableAttribute_converter; for (auto it = variableAttribute_json.Begin(); ret && (it != variableAttribute_json.End()); ++it) { - VariableAttributeType20& item = data.variableAttribute.emplace_back(); - ret = ret && variableAttribute_converter.fromJson(*it, item, error_code, error_message); + VariableAttributeType& item = data.variableAttribute.emplace_back(); + ret = ret && variableAttribute_converter.fromJson(*it, item, error_code, error_message); } } // variableCharacteristics if (json.HasMember("variableCharacteristics")) { - VariableCharacteristicsType20Converter variableCharacteristics_converter; + VariableCharacteristicsTypeConverter variableCharacteristics_converter; ret = ret && variableCharacteristics_converter.fromJson( json["variableCharacteristics"], data.variableCharacteristics, error_code, error_message); } @@ -83,15 +83,15 @@ bool ReportDataType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a ReportDataType20 to a JSON representation */ -bool ReportDataType20Converter::toJson(const ReportDataType20& data, rapidjson::Document& json) +/** @brief Convert a ReportDataType to a JSON representation */ +bool ReportDataTypeConverter::toJson(const ReportDataType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -100,7 +100,7 @@ bool ReportDataType20Converter::toJson(const ReportDataType20& data, rapidjson:: } // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; component_converter.setAllocator(allocator); rapidjson::Document component_doc; component_doc.Parse("{}"); @@ -108,7 +108,7 @@ bool ReportDataType20Converter::toJson(const ReportDataType20& data, rapidjson:: json.AddMember(rapidjson::StringRef("component"), component_doc.Move(), *allocator); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; variable_converter.setAllocator(allocator); rapidjson::Document variable_doc; variable_doc.Parse("{}"); @@ -117,10 +117,10 @@ bool ReportDataType20Converter::toJson(const ReportDataType20& data, rapidjson:: // variableAttribute - rapidjson::Value variableAttribute_json(rapidjson::kArrayType); - VariableAttributeType20Converter variableAttribute_converter; + rapidjson::Value variableAttribute_json(rapidjson::kArrayType); + VariableAttributeTypeConverter variableAttribute_converter; variableAttribute_converter.setAllocator(allocator); - for (const VariableAttributeType20& item : data.variableAttribute) + for (const VariableAttributeType& item : data.variableAttribute) { rapidjson::Document item_doc; item_doc.Parse("{}"); @@ -132,7 +132,7 @@ bool ReportDataType20Converter::toJson(const ReportDataType20& data, rapidjson:: // variableCharacteristics if (data.variableCharacteristics.isSet()) { - VariableCharacteristicsType20Converter variableCharacteristics_converter; + VariableCharacteristicsTypeConverter variableCharacteristics_converter; variableCharacteristics_converter.setAllocator(allocator); rapidjson::Document variableCharacteristics_doc; variableCharacteristics_doc.Parse("{}"); diff --git a/src/ocpp20/types/ReportDataType20.h b/src/ocpp20/types/ReportDataType20.h index 4afab6f4..1588ba39 100644 --- a/src/ocpp20/types/ReportDataType20.h +++ b/src/ocpp20/types/ReportDataType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_REPORTDATATYPE20_H -#define OPENOCPP_REPORTDATATYPE20_H +#ifndef OPENOCPP_OCPP20_REPORTDATATYPE_H +#define OPENOCPP_OCPP20_REPORTDATATYPE_H #include "ComponentType20.h" #include "CustomDataType20.h" @@ -43,39 +43,39 @@ namespace ocpp20 /** @brief Class to report components, variables and variable attributes and characteristics. */ -struct ReportDataType20 +struct ReportDataType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ComponentType20 component; + ComponentType component; /** @brief */ - VariableType20 variable; + VariableType variable; /** @brief */ - std::vector variableAttribute; + std::vector variableAttribute; /** @brief */ - ocpp::types::Optional variableCharacteristics; + ocpp::types::Optional variableCharacteristics; }; -/** @brief Converter class for ReportDataType20 type */ -class ReportDataType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for ReportDataType type */ +class ReportDataTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new ReportDataType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new ReportDataTypeConverter(); } - /** @brief Convert a ReportDataType20 from a JSON representation */ + /** @brief Convert a ReportDataType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - ReportDataType20& data, + ReportDataType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a ReportDataType20 to a JSON representation */ - bool toJson(const ReportDataType20& data, rapidjson::Document& json) override; + /** @brief Convert a ReportDataType to a JSON representation */ + bool toJson(const ReportDataType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_REPORTDATATYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_REPORTDATATYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/RequestStartStopStatusEnumType20.cpp b/src/ocpp20/types/RequestStartStopStatusEnumType20.cpp index 686d613b..43048a17 100644 --- a/src/ocpp20/types/RequestStartStopStatusEnumType20.cpp +++ b/src/ocpp20/types/RequestStartStopStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a RequestStartStopStatusEnumType20 enum to string */ -const EnumToStringFromString RequestStartStopStatusEnumType20Helper = { - {RequestStartStopStatusEnumType20::Accepted, "Accepted"}, - {RequestStartStopStatusEnumType20::Rejected, "Rejected"}, +/** @brief Helper to convert a RequestStartStopStatusEnumType enum to string */ +const EnumToStringFromString RequestStartStopStatusEnumTypeHelper = { + {RequestStartStopStatusEnumType::Accepted, "Accepted"}, + {RequestStartStopStatusEnumType::Rejected, "Rejected"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/RequestStartStopStatusEnumType20.h b/src/ocpp20/types/RequestStartStopStatusEnumType20.h index 5d9f18d1..7784ba69 100644 --- a/src/ocpp20/types/RequestStartStopStatusEnumType20.h +++ b/src/ocpp20/types/RequestStartStopStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_REQUESTSTARTSTOPSTATUSENUMTYPE20_H -#define OPENOCPP_REQUESTSTARTSTOPSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_REQUESTSTARTSTOPSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_REQUESTSTARTSTOPSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief Status indicating whether the Charging Station accepts the request to start a transaction. */ -enum class RequestStartStopStatusEnumType20 +enum class RequestStartStopStatusEnumType { Accepted, Rejected, }; -/** @brief Helper to convert a RequestStartStopStatusEnumType20 enum to string */ -extern const EnumToStringFromString RequestStartStopStatusEnumType20Helper; +/** @brief Helper to convert a RequestStartStopStatusEnumType enum to string */ +extern const EnumToStringFromString RequestStartStopStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_REQUESTSTARTSTOPSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_REQUESTSTARTSTOPSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ReservationUpdateStatusEnumType20.cpp b/src/ocpp20/types/ReservationUpdateStatusEnumType20.cpp index a207a814..3c25753c 100644 --- a/src/ocpp20/types/ReservationUpdateStatusEnumType20.cpp +++ b/src/ocpp20/types/ReservationUpdateStatusEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ReservationUpdateStatusEnumType20 enum to string */ -const EnumToStringFromString ReservationUpdateStatusEnumType20Helper = { - {ReservationUpdateStatusEnumType20::Expired, "Expired"}, - {ReservationUpdateStatusEnumType20::Removed, "Removed"}, +/** @brief Helper to convert a ReservationUpdateStatusEnumType enum to string */ +const EnumToStringFromString ReservationUpdateStatusEnumTypeHelper = { + {ReservationUpdateStatusEnumType::Expired, "Expired"}, + {ReservationUpdateStatusEnumType::Removed, "Removed"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ReservationUpdateStatusEnumType20.h b/src/ocpp20/types/ReservationUpdateStatusEnumType20.h index b6549eca..ee2e67b9 100644 --- a/src/ocpp20/types/ReservationUpdateStatusEnumType20.h +++ b/src/ocpp20/types/ReservationUpdateStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_RESERVATIONUPDATESTATUSENUMTYPE20_H -#define OPENOCPP_RESERVATIONUPDATESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_RESERVATIONUPDATESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_RESERVATIONUPDATESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief The updated reservation status. */ -enum class ReservationUpdateStatusEnumType20 +enum class ReservationUpdateStatusEnumType { Expired, Removed, }; -/** @brief Helper to convert a ReservationUpdateStatusEnumType20 enum to string */ -extern const EnumToStringFromString ReservationUpdateStatusEnumType20Helper; +/** @brief Helper to convert a ReservationUpdateStatusEnumType enum to string */ +extern const EnumToStringFromString ReservationUpdateStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_RESERVATIONUPDATESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_RESERVATIONUPDATESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ReserveNowStatusEnumType20.cpp b/src/ocpp20/types/ReserveNowStatusEnumType20.cpp index 5ce5be66..2877c30c 100644 --- a/src/ocpp20/types/ReserveNowStatusEnumType20.cpp +++ b/src/ocpp20/types/ReserveNowStatusEnumType20.cpp @@ -30,13 +30,13 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ReserveNowStatusEnumType20 enum to string */ -const EnumToStringFromString ReserveNowStatusEnumType20Helper = { - {ReserveNowStatusEnumType20::Accepted, "Accepted"}, - {ReserveNowStatusEnumType20::Faulted, "Faulted"}, - {ReserveNowStatusEnumType20::Occupied, "Occupied"}, - {ReserveNowStatusEnumType20::Rejected, "Rejected"}, - {ReserveNowStatusEnumType20::Unavailable, "Unavailable"}, +/** @brief Helper to convert a ReserveNowStatusEnumType enum to string */ +const EnumToStringFromString ReserveNowStatusEnumTypeHelper = { + {ReserveNowStatusEnumType::Accepted, "Accepted"}, + {ReserveNowStatusEnumType::Faulted, "Faulted"}, + {ReserveNowStatusEnumType::Occupied, "Occupied"}, + {ReserveNowStatusEnumType::Rejected, "Rejected"}, + {ReserveNowStatusEnumType::Unavailable, "Unavailable"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ReserveNowStatusEnumType20.h b/src/ocpp20/types/ReserveNowStatusEnumType20.h index 5bf2b0e6..537865b5 100644 --- a/src/ocpp20/types/ReserveNowStatusEnumType20.h +++ b/src/ocpp20/types/ReserveNowStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_RESERVENOWSTATUSENUMTYPE20_H -#define OPENOCPP_RESERVENOWSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_RESERVENOWSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_RESERVENOWSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief This indicates the success or failure of the reservation. */ -enum class ReserveNowStatusEnumType20 +enum class ReserveNowStatusEnumType { Accepted, Faulted, @@ -43,11 +43,11 @@ enum class ReserveNowStatusEnumType20 Unavailable, }; -/** @brief Helper to convert a ReserveNowStatusEnumType20 enum to string */ -extern const EnumToStringFromString ReserveNowStatusEnumType20Helper; +/** @brief Helper to convert a ReserveNowStatusEnumType enum to string */ +extern const EnumToStringFromString ReserveNowStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_RESERVENOWSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_RESERVENOWSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ResetEnumType20.cpp b/src/ocpp20/types/ResetEnumType20.cpp index 83904336..b167e2ce 100644 --- a/src/ocpp20/types/ResetEnumType20.cpp +++ b/src/ocpp20/types/ResetEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ResetEnumType20 enum to string */ -const EnumToStringFromString ResetEnumType20Helper = { - {ResetEnumType20::Immediate, "Immediate"}, - {ResetEnumType20::OnIdle, "OnIdle"}, +/** @brief Helper to convert a ResetEnumType enum to string */ +const EnumToStringFromString ResetEnumTypeHelper = { + {ResetEnumType::Immediate, "Immediate"}, + {ResetEnumType::OnIdle, "OnIdle"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ResetEnumType20.h b/src/ocpp20/types/ResetEnumType20.h index 6c3bc5be..044eea2b 100644 --- a/src/ocpp20/types/ResetEnumType20.h +++ b/src/ocpp20/types/ResetEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_RESETENUMTYPE20_H -#define OPENOCPP_RESETENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_RESETENUMTYPE_H +#define OPENOCPP_OCPP20_RESETENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief This contains the type of reset that the Charging Station or EVSE should perform. */ -enum class ResetEnumType20 +enum class ResetEnumType { Immediate, OnIdle, }; -/** @brief Helper to convert a ResetEnumType20 enum to string */ -extern const EnumToStringFromString ResetEnumType20Helper; +/** @brief Helper to convert a ResetEnumType enum to string */ +extern const EnumToStringFromString ResetEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_RESETENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_RESETENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/ResetStatusEnumType20.cpp b/src/ocpp20/types/ResetStatusEnumType20.cpp index d0213b4d..341d31c6 100644 --- a/src/ocpp20/types/ResetStatusEnumType20.cpp +++ b/src/ocpp20/types/ResetStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a ResetStatusEnumType20 enum to string */ -const EnumToStringFromString ResetStatusEnumType20Helper = { - {ResetStatusEnumType20::Accepted, "Accepted"}, - {ResetStatusEnumType20::Rejected, "Rejected"}, - {ResetStatusEnumType20::Scheduled, "Scheduled"}, +/** @brief Helper to convert a ResetStatusEnumType enum to string */ +const EnumToStringFromString ResetStatusEnumTypeHelper = { + {ResetStatusEnumType::Accepted, "Accepted"}, + {ResetStatusEnumType::Rejected, "Rejected"}, + {ResetStatusEnumType::Scheduled, "Scheduled"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/ResetStatusEnumType20.h b/src/ocpp20/types/ResetStatusEnumType20.h index e756fc16..001b32ab 100644 --- a/src/ocpp20/types/ResetStatusEnumType20.h +++ b/src/ocpp20/types/ResetStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_RESETSTATUSENUMTYPE20_H -#define OPENOCPP_RESETSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_RESETSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_RESETSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief This indicates whether the Charging Station is able to perform the reset. */ -enum class ResetStatusEnumType20 +enum class ResetStatusEnumType { Accepted, Rejected, Scheduled, }; -/** @brief Helper to convert a ResetStatusEnumType20 enum to string */ -extern const EnumToStringFromString ResetStatusEnumType20Helper; +/** @brief Helper to convert a ResetStatusEnumType enum to string */ +extern const EnumToStringFromString ResetStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_RESETSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_RESETSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/SalesTariffEntryType20.cpp b/src/ocpp20/types/SalesTariffEntryType20.cpp index 54e2685a..c946096d 100644 --- a/src/ocpp20/types/SalesTariffEntryType20.cpp +++ b/src/ocpp20/types/SalesTariffEntryType20.cpp @@ -32,23 +32,23 @@ namespace types namespace ocpp20 { -/** @brief Convert a SalesTariffEntryType20 from a JSON representation */ -bool SalesTariffEntryType20Converter::fromJson(const rapidjson::Value& json, - SalesTariffEntryType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a SalesTariffEntryType from a JSON representation */ +bool SalesTariffEntryTypeConverter::fromJson(const rapidjson::Value& json, + SalesTariffEntryType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // relativeTimeInterval - RelativeTimeIntervalType20Converter relativeTimeInterval_converter; + RelativeTimeIntervalTypeConverter relativeTimeInterval_converter; ret = ret && relativeTimeInterval_converter.fromJson(json["relativeTimeInterval"], data.relativeTimeInterval, error_code, error_message); @@ -58,12 +58,12 @@ bool SalesTariffEntryType20Converter::fromJson(const rapidjson::Value& jso // consumptionCost if (json.HasMember("consumptionCost")) { - const rapidjson::Value& consumptionCost_json = json["consumptionCost"]; - ConsumptionCostType20Converter consumptionCost_converter; + const rapidjson::Value& consumptionCost_json = json["consumptionCost"]; + ConsumptionCostTypeConverter consumptionCost_converter; for (auto it = consumptionCost_json.Begin(); ret && (it != consumptionCost_json.End()); ++it) { - ConsumptionCostType20& item = data.consumptionCost.emplace_back(); - ret = ret && consumptionCost_converter.fromJson(*it, item, error_code, error_message); + ConsumptionCostType& item = data.consumptionCost.emplace_back(); + ret = ret && consumptionCost_converter.fromJson(*it, item, error_code, error_message); } } @@ -75,15 +75,15 @@ bool SalesTariffEntryType20Converter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a SalesTariffEntryType20 to a JSON representation */ -bool SalesTariffEntryType20Converter::toJson(const SalesTariffEntryType20& data, rapidjson::Document& json) +/** @brief Convert a SalesTariffEntryType to a JSON representation */ +bool SalesTariffEntryTypeConverter::toJson(const SalesTariffEntryType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -92,7 +92,7 @@ bool SalesTariffEntryType20Converter::toJson(const SalesTariffEntryType20& data, } // relativeTimeInterval - RelativeTimeIntervalType20Converter relativeTimeInterval_converter; + RelativeTimeIntervalTypeConverter relativeTimeInterval_converter; relativeTimeInterval_converter.setAllocator(allocator); rapidjson::Document relativeTimeInterval_doc; relativeTimeInterval_doc.Parse("{}"); @@ -106,10 +106,10 @@ bool SalesTariffEntryType20Converter::toJson(const SalesTariffEntryType20& data, if (!data.consumptionCost.empty()) { - rapidjson::Value consumptionCost_json(rapidjson::kArrayType); - ConsumptionCostType20Converter consumptionCost_converter; + rapidjson::Value consumptionCost_json(rapidjson::kArrayType); + ConsumptionCostTypeConverter consumptionCost_converter; consumptionCost_converter.setAllocator(allocator); - for (const ConsumptionCostType20& item : data.consumptionCost) + for (const ConsumptionCostType& item : data.consumptionCost) { rapidjson::Document item_doc; item_doc.Parse("{}"); diff --git a/src/ocpp20/types/SalesTariffEntryType20.h b/src/ocpp20/types/SalesTariffEntryType20.h index ea5ae4c0..43f554f3 100644 --- a/src/ocpp20/types/SalesTariffEntryType20.h +++ b/src/ocpp20/types/SalesTariffEntryType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SALESTARIFFENTRYTYPE20_H -#define OPENOCPP_SALESTARIFFENTRYTYPE20_H +#ifndef OPENOCPP_OCPP20_SALESTARIFFENTRYTYPE_H +#define OPENOCPP_OCPP20_SALESTARIFFENTRYTYPE_H #include "ConsumptionCostType20.h" #include "CustomDataType20.h" @@ -42,39 +42,39 @@ namespace ocpp20 /** @brief Sales_ Tariff_ Entry urn:x-oca:ocpp:uid:2:233271 */ -struct SalesTariffEntryType20 +struct SalesTariffEntryType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - RelativeTimeIntervalType20 relativeTimeInterval; + RelativeTimeIntervalType relativeTimeInterval; /** @brief Sales_ Tariff_ Entry. E_ Price_ Level. Unsigned_ Integer urn:x-oca:ocpp:uid:1:569281 Defines the price level of this SalesTariffEntry (referring to NumEPriceLevels). Small values for the EPriceLevel represent a cheaper TariffEntry. Large values for the EPriceLevel represent a more expensive TariffEntry. */ ocpp::types::Optional ePriceLevel; /** @brief */ - std::vector consumptionCost; + std::vector consumptionCost; }; -/** @brief Converter class for SalesTariffEntryType20 type */ -class SalesTariffEntryType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for SalesTariffEntryType type */ +class SalesTariffEntryTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new SalesTariffEntryType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new SalesTariffEntryTypeConverter(); } - /** @brief Convert a SalesTariffEntryType20 from a JSON representation */ + /** @brief Convert a SalesTariffEntryType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - SalesTariffEntryType20& data, + SalesTariffEntryType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a SalesTariffEntryType20 to a JSON representation */ - bool toJson(const SalesTariffEntryType20& data, rapidjson::Document& json) override; + /** @brief Convert a SalesTariffEntryType to a JSON representation */ + bool toJson(const SalesTariffEntryType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_SALESTARIFFENTRYTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SALESTARIFFENTRYTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/SalesTariffType20.cpp b/src/ocpp20/types/SalesTariffType20.cpp index 28164a3a..6c0e54d7 100644 --- a/src/ocpp20/types/SalesTariffType20.cpp +++ b/src/ocpp20/types/SalesTariffType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a SalesTariffType20 from a JSON representation */ -bool SalesTariffType20Converter::fromJson(const rapidjson::Value& json, - SalesTariffType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a SalesTariffType from a JSON representation */ +bool SalesTariffTypeConverter::fromJson(const rapidjson::Value& json, + SalesTariffType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -59,12 +59,12 @@ bool SalesTariffType20Converter::fromJson(const rapidjson::Value& json, // salesTariffEntry if (json.HasMember("salesTariffEntry")) { - const rapidjson::Value& salesTariffEntry_json = json["salesTariffEntry"]; - SalesTariffEntryType20Converter salesTariffEntry_converter; + const rapidjson::Value& salesTariffEntry_json = json["salesTariffEntry"]; + SalesTariffEntryTypeConverter salesTariffEntry_converter; for (auto it = salesTariffEntry_json.Begin(); ret && (it != salesTariffEntry_json.End()); ++it) { - SalesTariffEntryType20& item = data.salesTariffEntry.emplace_back(); - ret = ret && salesTariffEntry_converter.fromJson(*it, item, error_code, error_message); + SalesTariffEntryType& item = data.salesTariffEntry.emplace_back(); + ret = ret && salesTariffEntry_converter.fromJson(*it, item, error_code, error_message); } } @@ -76,15 +76,15 @@ bool SalesTariffType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SalesTariffType20 to a JSON representation */ -bool SalesTariffType20Converter::toJson(const SalesTariffType20& data, rapidjson::Document& json) +/** @brief Convert a SalesTariffType to a JSON representation */ +bool SalesTariffTypeConverter::toJson(const SalesTariffType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -103,10 +103,10 @@ bool SalesTariffType20Converter::toJson(const SalesTariffType20& data, rapidjson // salesTariffEntry - rapidjson::Value salesTariffEntry_json(rapidjson::kArrayType); - SalesTariffEntryType20Converter salesTariffEntry_converter; + rapidjson::Value salesTariffEntry_json(rapidjson::kArrayType); + SalesTariffEntryTypeConverter salesTariffEntry_converter; salesTariffEntry_converter.setAllocator(allocator); - for (const SalesTariffEntryType20& item : data.salesTariffEntry) + for (const SalesTariffEntryType& item : data.salesTariffEntry) { rapidjson::Document item_doc; item_doc.Parse("{}"); diff --git a/src/ocpp20/types/SalesTariffType20.h b/src/ocpp20/types/SalesTariffType20.h index 6bc8237b..e6859c8a 100644 --- a/src/ocpp20/types/SalesTariffType20.h +++ b/src/ocpp20/types/SalesTariffType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SALESTARIFFTYPE20_H -#define OPENOCPP_SALESTARIFFTYPE20_H +#ifndef OPENOCPP_OCPP20_SALESTARIFFTYPE_H +#define OPENOCPP_OCPP20_SALESTARIFFTYPE_H #include "CustomDataType20.h" #include "SalesTariffEntryType20.h" @@ -43,10 +43,10 @@ namespace ocpp20 urn:x-oca:ocpp:uid:2:233272 NOTE: This dataType is based on dataTypes from <<ref-ISOIEC15118-2,ISO 15118-2>>. */ -struct SalesTariffType20 +struct SalesTariffType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Identified_ Object. MRID. Numeric_ Identifier urn:x-enexis:ecdm:uid:1:569198 SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session. */ @@ -60,28 +60,28 @@ urn:x-oca:ocpp:uid:1:569284 Defines the overall number of distinct price levels used across all provided SalesTariff elements. */ ocpp::types::Optional numEPriceLevels; /** @brief */ - std::vector salesTariffEntry; + std::vector salesTariffEntry; }; -/** @brief Converter class for SalesTariffType20 type */ -class SalesTariffType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for SalesTariffType type */ +class SalesTariffTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new SalesTariffType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new SalesTariffTypeConverter(); } - /** @brief Convert a SalesTariffType20 from a JSON representation */ + /** @brief Convert a SalesTariffType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - SalesTariffType20& data, + SalesTariffType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a SalesTariffType20 to a JSON representation */ - bool toJson(const SalesTariffType20& data, rapidjson::Document& json) override; + /** @brief Convert a SalesTariffType to a JSON representation */ + bool toJson(const SalesTariffType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_SALESTARIFFTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SALESTARIFFTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/SampledValueType20.cpp b/src/ocpp20/types/SampledValueType20.cpp index 9b99a01b..bbdf2c0c 100644 --- a/src/ocpp20/types/SampledValueType20.cpp +++ b/src/ocpp20/types/SampledValueType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a SampledValueType20 from a JSON representation */ -bool SampledValueType20Converter::fromJson(const rapidjson::Value& json, - SampledValueType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a SampledValueType from a JSON representation */ +bool SampledValueTypeConverter::fromJson(const rapidjson::Value& json, + SampledValueType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -53,38 +53,38 @@ bool SampledValueType20Converter::fromJson(const rapidjson::Value& json, // context if (json.HasMember("context")) { - data.context = ReadingContextEnumType20Helper.fromString(json["context"].GetString()); + data.context = ReadingContextEnumTypeHelper.fromString(json["context"].GetString()); } // measurand if (json.HasMember("measurand")) { - data.measurand = MeasurandEnumType20Helper.fromString(json["measurand"].GetString()); + data.measurand = MeasurandEnumTypeHelper.fromString(json["measurand"].GetString()); } // phase if (json.HasMember("phase")) { - data.phase = PhaseEnumType20Helper.fromString(json["phase"].GetString()); + data.phase = PhaseEnumTypeHelper.fromString(json["phase"].GetString()); } // location if (json.HasMember("location")) { - data.location = LocationEnumType20Helper.fromString(json["location"].GetString()); + data.location = LocationEnumTypeHelper.fromString(json["location"].GetString()); } // signedMeterValue if (json.HasMember("signedMeterValue")) { - SignedMeterValueType20Converter signedMeterValue_converter; + SignedMeterValueTypeConverter signedMeterValue_converter; ret = ret && signedMeterValue_converter.fromJson(json["signedMeterValue"], data.signedMeterValue, error_code, error_message); } // unitOfMeasure if (json.HasMember("unitOfMeasure")) { - UnitOfMeasureType20Converter unitOfMeasure_converter; + UnitOfMeasureTypeConverter unitOfMeasure_converter; ret = ret && unitOfMeasure_converter.fromJson(json["unitOfMeasure"], data.unitOfMeasure, error_code, error_message); } @@ -96,15 +96,15 @@ bool SampledValueType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a SampledValueType20 to a JSON representation */ -bool SampledValueType20Converter::toJson(const SampledValueType20& data, rapidjson::Document& json) +/** @brief Convert a SampledValueType to a JSON representation */ +bool SampledValueTypeConverter::toJson(const SampledValueType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -118,31 +118,31 @@ bool SampledValueType20Converter::toJson(const SampledValueType20& data, rapidjs // context if (data.context.isSet()) { - fill(json, "context", ReadingContextEnumType20Helper.toString(data.context)); + fill(json, "context", ReadingContextEnumTypeHelper.toString(data.context)); } // measurand if (data.measurand.isSet()) { - fill(json, "measurand", MeasurandEnumType20Helper.toString(data.measurand)); + fill(json, "measurand", MeasurandEnumTypeHelper.toString(data.measurand)); } // phase if (data.phase.isSet()) { - fill(json, "phase", PhaseEnumType20Helper.toString(data.phase)); + fill(json, "phase", PhaseEnumTypeHelper.toString(data.phase)); } // location if (data.location.isSet()) { - fill(json, "location", LocationEnumType20Helper.toString(data.location)); + fill(json, "location", LocationEnumTypeHelper.toString(data.location)); } // signedMeterValue if (data.signedMeterValue.isSet()) { - SignedMeterValueType20Converter signedMeterValue_converter; + SignedMeterValueTypeConverter signedMeterValue_converter; signedMeterValue_converter.setAllocator(allocator); rapidjson::Document signedMeterValue_doc; signedMeterValue_doc.Parse("{}"); @@ -153,7 +153,7 @@ bool SampledValueType20Converter::toJson(const SampledValueType20& data, rapidjs // unitOfMeasure if (data.unitOfMeasure.isSet()) { - UnitOfMeasureType20Converter unitOfMeasure_converter; + UnitOfMeasureTypeConverter unitOfMeasure_converter; unitOfMeasure_converter.setAllocator(allocator); rapidjson::Document unitOfMeasure_doc; unitOfMeasure_doc.Parse("{}"); diff --git a/src/ocpp20/types/SampledValueType20.h b/src/ocpp20/types/SampledValueType20.h index 81845949..82d199d1 100644 --- a/src/ocpp20/types/SampledValueType20.h +++ b/src/ocpp20/types/SampledValueType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SAMPLEDVALUETYPE20_H -#define OPENOCPP_SAMPLEDVALUETYPE20_H +#ifndef OPENOCPP_OCPP20_SAMPLEDVALUETYPE_H +#define OPENOCPP_OCPP20_SAMPLEDVALUETYPE_H #include "CustomDataType20.h" #include "LocationEnumType20.h" @@ -48,47 +48,47 @@ Single sampled value in MeterValues. Each value can be accompanied by optional f To save on mobile data usage, default values of all of the optional fields are such that. The value without any additional fields will be interpreted, as a register reading of active import energy in Wh (Watt-hour) units. */ -struct SampledValueType20 +struct SampledValueType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Sampled_ Value. Value. Measure urn:x-oca:ocpp:uid:1:569260 Indicates the measured value. */ float value; /** @brief */ - ocpp::types::Optional context; + ocpp::types::Optional context; /** @brief */ - ocpp::types::Optional measurand; + ocpp::types::Optional measurand; /** @brief */ - ocpp::types::Optional phase; + ocpp::types::Optional phase; /** @brief */ - ocpp::types::Optional location; + ocpp::types::Optional location; /** @brief */ - ocpp::types::Optional signedMeterValue; + ocpp::types::Optional signedMeterValue; /** @brief */ - ocpp::types::Optional unitOfMeasure; + ocpp::types::Optional unitOfMeasure; }; -/** @brief Converter class for SampledValueType20 type */ -class SampledValueType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for SampledValueType type */ +class SampledValueTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new SampledValueType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new SampledValueTypeConverter(); } - /** @brief Convert a SampledValueType20 from a JSON representation */ + /** @brief Convert a SampledValueType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - SampledValueType20& data, + SampledValueType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a SampledValueType20 to a JSON representation */ - bool toJson(const SampledValueType20& data, rapidjson::Document& json) override; + /** @brief Convert a SampledValueType to a JSON representation */ + bool toJson(const SampledValueType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_SAMPLEDVALUETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SAMPLEDVALUETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/SendLocalListStatusEnumType20.cpp b/src/ocpp20/types/SendLocalListStatusEnumType20.cpp index b0abd20f..2ca31138 100644 --- a/src/ocpp20/types/SendLocalListStatusEnumType20.cpp +++ b/src/ocpp20/types/SendLocalListStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a SendLocalListStatusEnumType20 enum to string */ -const EnumToStringFromString SendLocalListStatusEnumType20Helper = { - {SendLocalListStatusEnumType20::Accepted, "Accepted"}, - {SendLocalListStatusEnumType20::Failed, "Failed"}, - {SendLocalListStatusEnumType20::VersionMismatch, "VersionMismatch"}, +/** @brief Helper to convert a SendLocalListStatusEnumType enum to string */ +const EnumToStringFromString SendLocalListStatusEnumTypeHelper = { + {SendLocalListStatusEnumType::Accepted, "Accepted"}, + {SendLocalListStatusEnumType::Failed, "Failed"}, + {SendLocalListStatusEnumType::VersionMismatch, "VersionMismatch"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/SendLocalListStatusEnumType20.h b/src/ocpp20/types/SendLocalListStatusEnumType20.h index 10eb50ba..699db1af 100644 --- a/src/ocpp20/types/SendLocalListStatusEnumType20.h +++ b/src/ocpp20/types/SendLocalListStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SENDLOCALLISTSTATUSENUMTYPE20_H -#define OPENOCPP_SENDLOCALLISTSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_SENDLOCALLISTSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_SENDLOCALLISTSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief This indicates whether the Charging Station has successfully received and applied the update of the Local Authorization List. */ -enum class SendLocalListStatusEnumType20 +enum class SendLocalListStatusEnumType { Accepted, Failed, VersionMismatch, }; -/** @brief Helper to convert a SendLocalListStatusEnumType20 enum to string */ -extern const EnumToStringFromString SendLocalListStatusEnumType20Helper; +/** @brief Helper to convert a SendLocalListStatusEnumType enum to string */ +extern const EnumToStringFromString SendLocalListStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_SENDLOCALLISTSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SENDLOCALLISTSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/SetMonitoringDataType20.cpp b/src/ocpp20/types/SetMonitoringDataType20.cpp index 5f76be7e..e614b578 100644 --- a/src/ocpp20/types/SetMonitoringDataType20.cpp +++ b/src/ocpp20/types/SetMonitoringDataType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a SetMonitoringDataType20 from a JSON representation */ -bool SetMonitoringDataType20Converter::fromJson(const rapidjson::Value& json, - SetMonitoringDataType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a SetMonitoringDataType from a JSON representation */ +bool SetMonitoringDataTypeConverter::fromJson(const rapidjson::Value& json, + SetMonitoringDataType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -57,17 +57,17 @@ bool SetMonitoringDataType20Converter::fromJson(const rapidjson::Value& js extract(json, "value", data.value); // type - data.type = MonitorEnumType20Helper.fromString(json["type"].GetString()); + data.type = MonitorEnumTypeHelper.fromString(json["type"].GetString()); // severity extract(json, "severity", data.severity); // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; ret = ret && component_converter.fromJson(json["component"], data.component, error_code, error_message); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; ret = ret && variable_converter.fromJson(json["variable"], data.variable, error_code, error_message); if (!ret) @@ -78,15 +78,15 @@ bool SetMonitoringDataType20Converter::fromJson(const rapidjson::Value& js return ret; } -/** @brief Convert a SetMonitoringDataType20 to a JSON representation */ -bool SetMonitoringDataType20Converter::toJson(const SetMonitoringDataType20& data, rapidjson::Document& json) +/** @brief Convert a SetMonitoringDataType to a JSON representation */ +bool SetMonitoringDataTypeConverter::toJson(const SetMonitoringDataType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -104,13 +104,13 @@ bool SetMonitoringDataType20Converter::toJson(const SetMonitoringDataType20& dat fill(json, "value", data.value); // type - fill(json, "type", MonitorEnumType20Helper.toString(data.type)); + fill(json, "type", MonitorEnumTypeHelper.toString(data.type)); // severity fill(json, "severity", data.severity); // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; component_converter.setAllocator(allocator); rapidjson::Document component_doc; component_doc.Parse("{}"); @@ -118,7 +118,7 @@ bool SetMonitoringDataType20Converter::toJson(const SetMonitoringDataType20& dat json.AddMember(rapidjson::StringRef("component"), component_doc.Move(), *allocator); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; variable_converter.setAllocator(allocator); rapidjson::Document variable_doc; variable_doc.Parse("{}"); diff --git a/src/ocpp20/types/SetMonitoringDataType20.h b/src/ocpp20/types/SetMonitoringDataType20.h index 5a7d7e05..fd3117ab 100644 --- a/src/ocpp20/types/SetMonitoringDataType20.h +++ b/src/ocpp20/types/SetMonitoringDataType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETMONITORINGDATATYPE20_H -#define OPENOCPP_SETMONITORINGDATATYPE20_H +#ifndef OPENOCPP_OCPP20_SETMONITORINGDATATYPE_H +#define OPENOCPP_OCPP20_SETMONITORINGDATATYPE_H #include "ComponentType20.h" #include "CustomDataType20.h" @@ -41,10 +41,10 @@ namespace ocpp20 /** @brief Class to hold parameters of SetVariableMonitoring request. */ -struct SetMonitoringDataType20 +struct SetMonitoringDataType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief An id SHALL only be given to replace an existing monitor. The Charging Station handles the generation of id's for new monitors. */ ocpp::types::Optional id; /** @brief Monitor only active when a transaction is ongoing on a component relevant to this transaction. Default = false. */ @@ -53,7 +53,7 @@ struct SetMonitoringDataType20 For Periodic or PeriodicClockAligned this is the interval in seconds. */ float value; /** @brief */ - MonitorEnumType20 type; + MonitorEnumType type; /** @brief The severity that will be assigned to an event that is triggered by this monitor. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level. The severity levels have the following meaning: + @@ -79,30 +79,30 @@ Indicates a regular operational event. May be used for reporting, measuring thro Indicates information useful to developers for debugging, not useful during operations. */ int severity; /** @brief */ - ComponentType20 component; + ComponentType component; /** @brief */ - VariableType20 variable; + VariableType variable; }; -/** @brief Converter class for SetMonitoringDataType20 type */ -class SetMonitoringDataType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for SetMonitoringDataType type */ +class SetMonitoringDataTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new SetMonitoringDataType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new SetMonitoringDataTypeConverter(); } - /** @brief Convert a SetMonitoringDataType20 from a JSON representation */ + /** @brief Convert a SetMonitoringDataType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - SetMonitoringDataType20& data, + SetMonitoringDataType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a SetMonitoringDataType20 to a JSON representation */ - bool toJson(const SetMonitoringDataType20& data, rapidjson::Document& json) override; + /** @brief Convert a SetMonitoringDataType to a JSON representation */ + bool toJson(const SetMonitoringDataType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_SETMONITORINGDATATYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETMONITORINGDATATYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/SetMonitoringResultType20.cpp b/src/ocpp20/types/SetMonitoringResultType20.cpp index 3d716377..9f478f1f 100644 --- a/src/ocpp20/types/SetMonitoringResultType20.cpp +++ b/src/ocpp20/types/SetMonitoringResultType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a SetMonitoringResultType20 from a JSON representation */ -bool SetMonitoringResultType20Converter::fromJson(const rapidjson::Value& json, - SetMonitoringResultType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a SetMonitoringResultType from a JSON representation */ +bool SetMonitoringResultTypeConverter::fromJson(const rapidjson::Value& json, + SetMonitoringResultType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -53,22 +53,22 @@ bool SetMonitoringResultType20Converter::fromJson(const rapidjson::Value& // statusInfo if (json.HasMember("statusInfo")) { - StatusInfoType20Converter statusInfo_converter; + StatusInfoTypeConverter statusInfo_converter; ret = ret && statusInfo_converter.fromJson(json["statusInfo"], data.statusInfo, error_code, error_message); } // status - data.status = SetMonitoringStatusEnumType20Helper.fromString(json["status"].GetString()); + data.status = SetMonitoringStatusEnumTypeHelper.fromString(json["status"].GetString()); // type - data.type = MonitorEnumType20Helper.fromString(json["type"].GetString()); + data.type = MonitorEnumTypeHelper.fromString(json["type"].GetString()); // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; ret = ret && component_converter.fromJson(json["component"], data.component, error_code, error_message); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; ret = ret && variable_converter.fromJson(json["variable"], data.variable, error_code, error_message); // severity @@ -82,15 +82,15 @@ bool SetMonitoringResultType20Converter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a SetMonitoringResultType20 to a JSON representation */ -bool SetMonitoringResultType20Converter::toJson(const SetMonitoringResultType20& data, rapidjson::Document& json) +/** @brief Convert a SetMonitoringResultType to a JSON representation */ +bool SetMonitoringResultTypeConverter::toJson(const SetMonitoringResultType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -104,7 +104,7 @@ bool SetMonitoringResultType20Converter::toJson(const SetMonitoringResultType20& // statusInfo if (data.statusInfo.isSet()) { - StatusInfoType20Converter statusInfo_converter; + StatusInfoTypeConverter statusInfo_converter; statusInfo_converter.setAllocator(allocator); rapidjson::Document statusInfo_doc; statusInfo_doc.Parse("{}"); @@ -113,13 +113,13 @@ bool SetMonitoringResultType20Converter::toJson(const SetMonitoringResultType20& } // status - fill(json, "status", SetMonitoringStatusEnumType20Helper.toString(data.status)); + fill(json, "status", SetMonitoringStatusEnumTypeHelper.toString(data.status)); // type - fill(json, "type", MonitorEnumType20Helper.toString(data.type)); + fill(json, "type", MonitorEnumTypeHelper.toString(data.type)); // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; component_converter.setAllocator(allocator); rapidjson::Document component_doc; component_doc.Parse("{}"); @@ -127,7 +127,7 @@ bool SetMonitoringResultType20Converter::toJson(const SetMonitoringResultType20& json.AddMember(rapidjson::StringRef("component"), component_doc.Move(), *allocator); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; variable_converter.setAllocator(allocator); rapidjson::Document variable_doc; variable_doc.Parse("{}"); diff --git a/src/ocpp20/types/SetMonitoringResultType20.h b/src/ocpp20/types/SetMonitoringResultType20.h index ec326643..3cf44f5a 100644 --- a/src/ocpp20/types/SetMonitoringResultType20.h +++ b/src/ocpp20/types/SetMonitoringResultType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETMONITORINGRESULTTYPE20_H -#define OPENOCPP_SETMONITORINGRESULTTYPE20_H +#ifndef OPENOCPP_OCPP20_SETMONITORINGRESULTTYPE_H +#define OPENOCPP_OCPP20_SETMONITORINGRESULTTYPE_H #include "ComponentType20.h" #include "CustomDataType20.h" @@ -43,22 +43,22 @@ namespace ocpp20 /** @brief Class to hold result of SetVariableMonitoring request. */ -struct SetMonitoringResultType20 +struct SetMonitoringResultType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Id given to the VariableMonitor by the Charging Station. The Id is only returned when status is accepted. Installed VariableMonitors should have unique id's but the id's of removed Installed monitors should have unique id's but the id's of removed monitors MAY be reused. */ ocpp::types::Optional id; /** @brief */ - ocpp::types::Optional statusInfo; + ocpp::types::Optional statusInfo; /** @brief */ - SetMonitoringStatusEnumType20 status; + SetMonitoringStatusEnumType status; /** @brief */ - MonitorEnumType20 type; + MonitorEnumType type; /** @brief */ - ComponentType20 component; + ComponentType component; /** @brief */ - VariableType20 variable; + VariableType variable; /** @brief The severity that will be assigned to an event that is triggered by this monitor. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level. The severity levels have the following meaning: + @@ -85,28 +85,25 @@ Indicates information useful to developers for debugging, not useful during oper int severity; }; -/** @brief Converter class for SetMonitoringResultType20 type */ -class SetMonitoringResultType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for SetMonitoringResultType type */ +class SetMonitoringResultTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override - { - return new SetMonitoringResultType20Converter(); - } + ocpp::messages::IMessageConverter* clone() const override { return new SetMonitoringResultTypeConverter(); } - /** @brief Convert a SetMonitoringResultType20 from a JSON representation */ + /** @brief Convert a SetMonitoringResultType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - SetMonitoringResultType20& data, + SetMonitoringResultType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a SetMonitoringResultType20 to a JSON representation */ - bool toJson(const SetMonitoringResultType20& data, rapidjson::Document& json) override; + /** @brief Convert a SetMonitoringResultType to a JSON representation */ + bool toJson(const SetMonitoringResultType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_SETMONITORINGRESULTTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETMONITORINGRESULTTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/SetMonitoringStatusEnumType20.cpp b/src/ocpp20/types/SetMonitoringStatusEnumType20.cpp index 9451d0e8..b5bf489c 100644 --- a/src/ocpp20/types/SetMonitoringStatusEnumType20.cpp +++ b/src/ocpp20/types/SetMonitoringStatusEnumType20.cpp @@ -30,14 +30,14 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a SetMonitoringStatusEnumType20 enum to string */ -const EnumToStringFromString SetMonitoringStatusEnumType20Helper = { - {SetMonitoringStatusEnumType20::Accepted, "Accepted"}, - {SetMonitoringStatusEnumType20::UnknownComponent, "UnknownComponent"}, - {SetMonitoringStatusEnumType20::UnknownVariable, "UnknownVariable"}, - {SetMonitoringStatusEnumType20::UnsupportedMonitorType, "UnsupportedMonitorType"}, - {SetMonitoringStatusEnumType20::Rejected, "Rejected"}, - {SetMonitoringStatusEnumType20::Duplicate, "Duplicate"}, +/** @brief Helper to convert a SetMonitoringStatusEnumType enum to string */ +const EnumToStringFromString SetMonitoringStatusEnumTypeHelper = { + {SetMonitoringStatusEnumType::Accepted, "Accepted"}, + {SetMonitoringStatusEnumType::UnknownComponent, "UnknownComponent"}, + {SetMonitoringStatusEnumType::UnknownVariable, "UnknownVariable"}, + {SetMonitoringStatusEnumType::UnsupportedMonitorType, "UnsupportedMonitorType"}, + {SetMonitoringStatusEnumType::Rejected, "Rejected"}, + {SetMonitoringStatusEnumType::Duplicate, "Duplicate"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/SetMonitoringStatusEnumType20.h b/src/ocpp20/types/SetMonitoringStatusEnumType20.h index 78ccf268..0c560da9 100644 --- a/src/ocpp20/types/SetMonitoringStatusEnumType20.h +++ b/src/ocpp20/types/SetMonitoringStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETMONITORINGSTATUSENUMTYPE20_H -#define OPENOCPP_SETMONITORINGSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_SETMONITORINGSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_SETMONITORINGSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief Status is OK if a value could be returned. Otherwise this will indicate the reason why a value could not be returned. */ -enum class SetMonitoringStatusEnumType20 +enum class SetMonitoringStatusEnumType { Accepted, UnknownComponent, @@ -44,11 +44,11 @@ enum class SetMonitoringStatusEnumType20 Duplicate, }; -/** @brief Helper to convert a SetMonitoringStatusEnumType20 enum to string */ -extern const EnumToStringFromString SetMonitoringStatusEnumType20Helper; +/** @brief Helper to convert a SetMonitoringStatusEnumType enum to string */ +extern const EnumToStringFromString SetMonitoringStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_SETMONITORINGSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETMONITORINGSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/SetNetworkProfileStatusEnumType20.cpp b/src/ocpp20/types/SetNetworkProfileStatusEnumType20.cpp index e1c3a04e..4894593b 100644 --- a/src/ocpp20/types/SetNetworkProfileStatusEnumType20.cpp +++ b/src/ocpp20/types/SetNetworkProfileStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a SetNetworkProfileStatusEnumType20 enum to string */ -const EnumToStringFromString SetNetworkProfileStatusEnumType20Helper = { - {SetNetworkProfileStatusEnumType20::Accepted, "Accepted"}, - {SetNetworkProfileStatusEnumType20::Rejected, "Rejected"}, - {SetNetworkProfileStatusEnumType20::Failed, "Failed"}, +/** @brief Helper to convert a SetNetworkProfileStatusEnumType enum to string */ +const EnumToStringFromString SetNetworkProfileStatusEnumTypeHelper = { + {SetNetworkProfileStatusEnumType::Accepted, "Accepted"}, + {SetNetworkProfileStatusEnumType::Rejected, "Rejected"}, + {SetNetworkProfileStatusEnumType::Failed, "Failed"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/SetNetworkProfileStatusEnumType20.h b/src/ocpp20/types/SetNetworkProfileStatusEnumType20.h index 551227e5..70a6122d 100644 --- a/src/ocpp20/types/SetNetworkProfileStatusEnumType20.h +++ b/src/ocpp20/types/SetNetworkProfileStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETNETWORKPROFILESTATUSENUMTYPE20_H -#define OPENOCPP_SETNETWORKPROFILESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_SETNETWORKPROFILESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_SETNETWORKPROFILESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief Result of operation. */ -enum class SetNetworkProfileStatusEnumType20 +enum class SetNetworkProfileStatusEnumType { Accepted, Rejected, Failed, }; -/** @brief Helper to convert a SetNetworkProfileStatusEnumType20 enum to string */ -extern const EnumToStringFromString SetNetworkProfileStatusEnumType20Helper; +/** @brief Helper to convert a SetNetworkProfileStatusEnumType enum to string */ +extern const EnumToStringFromString SetNetworkProfileStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_SETNETWORKPROFILESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETNETWORKPROFILESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/SetVariableDataType20.cpp b/src/ocpp20/types/SetVariableDataType20.cpp index 3fd8ac6b..d9dab584 100644 --- a/src/ocpp20/types/SetVariableDataType20.cpp +++ b/src/ocpp20/types/SetVariableDataType20.cpp @@ -32,36 +32,36 @@ namespace types namespace ocpp20 { -/** @brief Convert a SetVariableDataType20 from a JSON representation */ -bool SetVariableDataType20Converter::fromJson(const rapidjson::Value& json, - SetVariableDataType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a SetVariableDataType from a JSON representation */ +bool SetVariableDataTypeConverter::fromJson(const rapidjson::Value& json, + SetVariableDataType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // attributeType if (json.HasMember("attributeType")) { - data.attributeType = AttributeEnumType20Helper.fromString(json["attributeType"].GetString()); + data.attributeType = AttributeEnumTypeHelper.fromString(json["attributeType"].GetString()); } // attributeValue extract(json, "attributeValue", data.attributeValue); // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; ret = ret && component_converter.fromJson(json["component"], data.component, error_code, error_message); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; ret = ret && variable_converter.fromJson(json["variable"], data.variable, error_code, error_message); if (!ret) @@ -72,15 +72,15 @@ bool SetVariableDataType20Converter::fromJson(const rapidjson::Value& json return ret; } -/** @brief Convert a SetVariableDataType20 to a JSON representation */ -bool SetVariableDataType20Converter::toJson(const SetVariableDataType20& data, rapidjson::Document& json) +/** @brief Convert a SetVariableDataType to a JSON representation */ +bool SetVariableDataTypeConverter::toJson(const SetVariableDataType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -91,14 +91,14 @@ bool SetVariableDataType20Converter::toJson(const SetVariableDataType20& data, r // attributeType if (data.attributeType.isSet()) { - fill(json, "attributeType", AttributeEnumType20Helper.toString(data.attributeType)); + fill(json, "attributeType", AttributeEnumTypeHelper.toString(data.attributeType)); } // attributeValue fill(json, "attributeValue", data.attributeValue); // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; component_converter.setAllocator(allocator); rapidjson::Document component_doc; component_doc.Parse("{}"); @@ -106,7 +106,7 @@ bool SetVariableDataType20Converter::toJson(const SetVariableDataType20& data, r json.AddMember(rapidjson::StringRef("component"), component_doc.Move(), *allocator); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; variable_converter.setAllocator(allocator); rapidjson::Document variable_doc; variable_doc.Parse("{}"); diff --git a/src/ocpp20/types/SetVariableDataType20.h b/src/ocpp20/types/SetVariableDataType20.h index 57d86adb..a4aa2b43 100644 --- a/src/ocpp20/types/SetVariableDataType20.h +++ b/src/ocpp20/types/SetVariableDataType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETVARIABLEDATATYPE20_H -#define OPENOCPP_SETVARIABLEDATATYPE20_H +#ifndef OPENOCPP_OCPP20_SETVARIABLEDATATYPE_H +#define OPENOCPP_OCPP20_SETVARIABLEDATATYPE_H #include "AttributeEnumType20.h" #include "ComponentType20.h" @@ -41,41 +41,41 @@ namespace ocpp20 { /** @brief */ -struct SetVariableDataType20 +struct SetVariableDataType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional attributeType; + ocpp::types::Optional attributeType; /** @brief Value to be assigned to attribute of variable. The Configuration Variable <<configkey-configuration-value-size,ConfigurationValueSize>> can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valueList. The max size of these values will always remain equal. */ ocpp::types::CiStringType<1000u> attributeValue; /** @brief */ - ComponentType20 component; + ComponentType component; /** @brief */ - VariableType20 variable; + VariableType variable; }; -/** @brief Converter class for SetVariableDataType20 type */ -class SetVariableDataType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for SetVariableDataType type */ +class SetVariableDataTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new SetVariableDataType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new SetVariableDataTypeConverter(); } - /** @brief Convert a SetVariableDataType20 from a JSON representation */ + /** @brief Convert a SetVariableDataType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - SetVariableDataType20& data, + SetVariableDataType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a SetVariableDataType20 to a JSON representation */ - bool toJson(const SetVariableDataType20& data, rapidjson::Document& json) override; + /** @brief Convert a SetVariableDataType to a JSON representation */ + bool toJson(const SetVariableDataType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_SETVARIABLEDATATYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETVARIABLEDATATYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/SetVariableResultType20.cpp b/src/ocpp20/types/SetVariableResultType20.cpp index 29bcdd81..cad94506 100644 --- a/src/ocpp20/types/SetVariableResultType20.cpp +++ b/src/ocpp20/types/SetVariableResultType20.cpp @@ -32,44 +32,44 @@ namespace types namespace ocpp20 { -/** @brief Convert a SetVariableResultType20 from a JSON representation */ -bool SetVariableResultType20Converter::fromJson(const rapidjson::Value& json, - SetVariableResultType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a SetVariableResultType from a JSON representation */ +bool SetVariableResultTypeConverter::fromJson(const rapidjson::Value& json, + SetVariableResultType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // attributeType if (json.HasMember("attributeType")) { - data.attributeType = AttributeEnumType20Helper.fromString(json["attributeType"].GetString()); + data.attributeType = AttributeEnumTypeHelper.fromString(json["attributeType"].GetString()); } // attributeStatus - data.attributeStatus = SetVariableStatusEnumType20Helper.fromString(json["attributeStatus"].GetString()); + data.attributeStatus = SetVariableStatusEnumTypeHelper.fromString(json["attributeStatus"].GetString()); // attributeStatusInfo if (json.HasMember("attributeStatusInfo")) { - StatusInfoType20Converter attributeStatusInfo_converter; + StatusInfoTypeConverter attributeStatusInfo_converter; ret = ret && attributeStatusInfo_converter.fromJson(json["attributeStatusInfo"], data.attributeStatusInfo, error_code, error_message); } // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; ret = ret && component_converter.fromJson(json["component"], data.component, error_code, error_message); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; ret = ret && variable_converter.fromJson(json["variable"], data.variable, error_code, error_message); if (!ret) @@ -80,15 +80,15 @@ bool SetVariableResultType20Converter::fromJson(const rapidjson::Value& js return ret; } -/** @brief Convert a SetVariableResultType20 to a JSON representation */ -bool SetVariableResultType20Converter::toJson(const SetVariableResultType20& data, rapidjson::Document& json) +/** @brief Convert a SetVariableResultType to a JSON representation */ +bool SetVariableResultTypeConverter::toJson(const SetVariableResultType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -99,16 +99,16 @@ bool SetVariableResultType20Converter::toJson(const SetVariableResultType20& dat // attributeType if (data.attributeType.isSet()) { - fill(json, "attributeType", AttributeEnumType20Helper.toString(data.attributeType)); + fill(json, "attributeType", AttributeEnumTypeHelper.toString(data.attributeType)); } // attributeStatus - fill(json, "attributeStatus", SetVariableStatusEnumType20Helper.toString(data.attributeStatus)); + fill(json, "attributeStatus", SetVariableStatusEnumTypeHelper.toString(data.attributeStatus)); // attributeStatusInfo if (data.attributeStatusInfo.isSet()) { - StatusInfoType20Converter attributeStatusInfo_converter; + StatusInfoTypeConverter attributeStatusInfo_converter; attributeStatusInfo_converter.setAllocator(allocator); rapidjson::Document attributeStatusInfo_doc; attributeStatusInfo_doc.Parse("{}"); @@ -117,7 +117,7 @@ bool SetVariableResultType20Converter::toJson(const SetVariableResultType20& dat } // component - ComponentType20Converter component_converter; + ComponentTypeConverter component_converter; component_converter.setAllocator(allocator); rapidjson::Document component_doc; component_doc.Parse("{}"); @@ -125,7 +125,7 @@ bool SetVariableResultType20Converter::toJson(const SetVariableResultType20& dat json.AddMember(rapidjson::StringRef("component"), component_doc.Move(), *allocator); // variable - VariableType20Converter variable_converter; + VariableTypeConverter variable_converter; variable_converter.setAllocator(allocator); rapidjson::Document variable_doc; variable_doc.Parse("{}"); diff --git a/src/ocpp20/types/SetVariableResultType20.h b/src/ocpp20/types/SetVariableResultType20.h index 4d59d7e2..da776fb9 100644 --- a/src/ocpp20/types/SetVariableResultType20.h +++ b/src/ocpp20/types/SetVariableResultType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETVARIABLERESULTTYPE20_H -#define OPENOCPP_SETVARIABLERESULTTYPE20_H +#ifndef OPENOCPP_OCPP20_SETVARIABLERESULTTYPE_H +#define OPENOCPP_OCPP20_SETVARIABLERESULTTYPE_H #include "AttributeEnumType20.h" #include "ComponentType20.h" @@ -42,41 +42,41 @@ namespace ocpp20 { /** @brief */ -struct SetVariableResultType20 +struct SetVariableResultType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional attributeType; + ocpp::types::Optional attributeType; /** @brief */ - SetVariableStatusEnumType20 attributeStatus; + SetVariableStatusEnumType attributeStatus; /** @brief */ - ocpp::types::Optional attributeStatusInfo; + ocpp::types::Optional attributeStatusInfo; /** @brief */ - ComponentType20 component; + ComponentType component; /** @brief */ - VariableType20 variable; + VariableType variable; }; -/** @brief Converter class for SetVariableResultType20 type */ -class SetVariableResultType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for SetVariableResultType type */ +class SetVariableResultTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new SetVariableResultType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new SetVariableResultTypeConverter(); } - /** @brief Convert a SetVariableResultType20 from a JSON representation */ + /** @brief Convert a SetVariableResultType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - SetVariableResultType20& data, + SetVariableResultType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a SetVariableResultType20 to a JSON representation */ - bool toJson(const SetVariableResultType20& data, rapidjson::Document& json) override; + /** @brief Convert a SetVariableResultType to a JSON representation */ + bool toJson(const SetVariableResultType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_SETVARIABLERESULTTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETVARIABLERESULTTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/SetVariableStatusEnumType20.cpp b/src/ocpp20/types/SetVariableStatusEnumType20.cpp index 0d9d82d4..ac853ca0 100644 --- a/src/ocpp20/types/SetVariableStatusEnumType20.cpp +++ b/src/ocpp20/types/SetVariableStatusEnumType20.cpp @@ -30,14 +30,14 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a SetVariableStatusEnumType20 enum to string */ -const EnumToStringFromString SetVariableStatusEnumType20Helper = { - {SetVariableStatusEnumType20::Accepted, "Accepted"}, - {SetVariableStatusEnumType20::Rejected, "Rejected"}, - {SetVariableStatusEnumType20::UnknownComponent, "UnknownComponent"}, - {SetVariableStatusEnumType20::UnknownVariable, "UnknownVariable"}, - {SetVariableStatusEnumType20::NotSupportedAttributeType, "NotSupportedAttributeType"}, - {SetVariableStatusEnumType20::RebootRequired, "RebootRequired"}, +/** @brief Helper to convert a SetVariableStatusEnumType enum to string */ +const EnumToStringFromString SetVariableStatusEnumTypeHelper = { + {SetVariableStatusEnumType::Accepted, "Accepted"}, + {SetVariableStatusEnumType::Rejected, "Rejected"}, + {SetVariableStatusEnumType::UnknownComponent, "UnknownComponent"}, + {SetVariableStatusEnumType::UnknownVariable, "UnknownVariable"}, + {SetVariableStatusEnumType::NotSupportedAttributeType, "NotSupportedAttributeType"}, + {SetVariableStatusEnumType::RebootRequired, "RebootRequired"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/SetVariableStatusEnumType20.h b/src/ocpp20/types/SetVariableStatusEnumType20.h index a38c7718..e85cf1ad 100644 --- a/src/ocpp20/types/SetVariableStatusEnumType20.h +++ b/src/ocpp20/types/SetVariableStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SETVARIABLESTATUSENUMTYPE20_H -#define OPENOCPP_SETVARIABLESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_SETVARIABLESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_SETVARIABLESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief Result status of setting the variable. */ -enum class SetVariableStatusEnumType20 +enum class SetVariableStatusEnumType { Accepted, Rejected, @@ -44,11 +44,11 @@ enum class SetVariableStatusEnumType20 RebootRequired, }; -/** @brief Helper to convert a SetVariableStatusEnumType20 enum to string */ -extern const EnumToStringFromString SetVariableStatusEnumType20Helper; +/** @brief Helper to convert a SetVariableStatusEnumType enum to string */ +extern const EnumToStringFromString SetVariableStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_SETVARIABLESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SETVARIABLESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/SignedMeterValueType20.cpp b/src/ocpp20/types/SignedMeterValueType20.cpp index f87dc041..7312b144 100644 --- a/src/ocpp20/types/SignedMeterValueType20.cpp +++ b/src/ocpp20/types/SignedMeterValueType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a SignedMeterValueType20 from a JSON representation */ -bool SignedMeterValueType20Converter::fromJson(const rapidjson::Value& json, - SignedMeterValueType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a SignedMeterValueType from a JSON representation */ +bool SignedMeterValueTypeConverter::fromJson(const rapidjson::Value& json, + SignedMeterValueType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -67,15 +67,15 @@ bool SignedMeterValueType20Converter::fromJson(const rapidjson::Value& jso return ret; } -/** @brief Convert a SignedMeterValueType20 to a JSON representation */ -bool SignedMeterValueType20Converter::toJson(const SignedMeterValueType20& data, rapidjson::Document& json) +/** @brief Convert a SignedMeterValueType to a JSON representation */ +bool SignedMeterValueTypeConverter::toJson(const SignedMeterValueType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/SignedMeterValueType20.h b/src/ocpp20/types/SignedMeterValueType20.h index 889bf96d..8246923e 100644 --- a/src/ocpp20/types/SignedMeterValueType20.h +++ b/src/ocpp20/types/SignedMeterValueType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_SIGNEDMETERVALUETYPE20_H -#define OPENOCPP_SIGNEDMETERVALUETYPE20_H +#ifndef OPENOCPP_OCPP20_SIGNEDMETERVALUETYPE_H +#define OPENOCPP_OCPP20_SIGNEDMETERVALUETYPE_H #include "CustomDataType20.h" @@ -39,10 +39,10 @@ namespace ocpp20 /** @brief Represent a signed version of the meter value. */ -struct SignedMeterValueType20 +struct SignedMeterValueType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Base64 encoded, contains the signed data which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc. */ ocpp::types::CiStringType<2500u> signedMeterData; /** @brief Method used to create the digital signature. */ @@ -53,25 +53,25 @@ struct SignedMeterValueType20 ocpp::types::CiStringType<2500u> publicKey; }; -/** @brief Converter class for SignedMeterValueType20 type */ -class SignedMeterValueType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for SignedMeterValueType type */ +class SignedMeterValueTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new SignedMeterValueType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new SignedMeterValueTypeConverter(); } - /** @brief Convert a SignedMeterValueType20 from a JSON representation */ + /** @brief Convert a SignedMeterValueType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - SignedMeterValueType20& data, + SignedMeterValueType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a SignedMeterValueType20 to a JSON representation */ - bool toJson(const SignedMeterValueType20& data, rapidjson::Document& json) override; + /** @brief Convert a SignedMeterValueType to a JSON representation */ + bool toJson(const SignedMeterValueType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_SIGNEDMETERVALUETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_SIGNEDMETERVALUETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/StatusInfoType20.cpp b/src/ocpp20/types/StatusInfoType20.cpp index fe72c708..3793b6f8 100644 --- a/src/ocpp20/types/StatusInfoType20.cpp +++ b/src/ocpp20/types/StatusInfoType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a StatusInfoType20 from a JSON representation */ -bool StatusInfoType20Converter::fromJson(const rapidjson::Value& json, - StatusInfoType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a StatusInfoType from a JSON representation */ +bool StatusInfoTypeConverter::fromJson(const rapidjson::Value& json, + StatusInfoType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -61,15 +61,15 @@ bool StatusInfoType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a StatusInfoType20 to a JSON representation */ -bool StatusInfoType20Converter::toJson(const StatusInfoType20& data, rapidjson::Document& json) +/** @brief Convert a StatusInfoType to a JSON representation */ +bool StatusInfoTypeConverter::toJson(const StatusInfoType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/StatusInfoType20.h b/src/ocpp20/types/StatusInfoType20.h index fccfd7a1..5f66f979 100644 --- a/src/ocpp20/types/StatusInfoType20.h +++ b/src/ocpp20/types/StatusInfoType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_STATUSINFOTYPE20_H -#define OPENOCPP_STATUSINFOTYPE20_H +#ifndef OPENOCPP_OCPP20_STATUSINFOTYPE_H +#define OPENOCPP_OCPP20_STATUSINFOTYPE_H #include "CustomDataType20.h" @@ -39,35 +39,35 @@ namespace ocpp20 /** @brief Element providing more information about the status. */ -struct StatusInfoType20 +struct StatusInfoType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief A predefined code for the reason why the status is returned in this response. The string is case-insensitive. */ ocpp::types::CiStringType<20u> reasonCode; /** @brief Additional text to provide detailed information. */ ocpp::types::Optional> additionalInfo; }; -/** @brief Converter class for StatusInfoType20 type */ -class StatusInfoType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for StatusInfoType type */ +class StatusInfoTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new StatusInfoType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new StatusInfoTypeConverter(); } - /** @brief Convert a StatusInfoType20 from a JSON representation */ + /** @brief Convert a StatusInfoType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - StatusInfoType20& data, + StatusInfoType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a StatusInfoType20 to a JSON representation */ - bool toJson(const StatusInfoType20& data, rapidjson::Document& json) override; + /** @brief Convert a StatusInfoType to a JSON representation */ + bool toJson(const StatusInfoType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_STATUSINFOTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_STATUSINFOTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/TransactionEventEnumType20.cpp b/src/ocpp20/types/TransactionEventEnumType20.cpp index 02e06af7..e22a16f5 100644 --- a/src/ocpp20/types/TransactionEventEnumType20.cpp +++ b/src/ocpp20/types/TransactionEventEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a TransactionEventEnumType20 enum to string */ -const EnumToStringFromString TransactionEventEnumType20Helper = { - {TransactionEventEnumType20::Ended, "Ended"}, - {TransactionEventEnumType20::Started, "Started"}, - {TransactionEventEnumType20::Updated, "Updated"}, +/** @brief Helper to convert a TransactionEventEnumType enum to string */ +const EnumToStringFromString TransactionEventEnumTypeHelper = { + {TransactionEventEnumType::Ended, "Ended"}, + {TransactionEventEnumType::Started, "Started"}, + {TransactionEventEnumType::Updated, "Updated"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/TransactionEventEnumType20.h b/src/ocpp20/types/TransactionEventEnumType20.h index aa29d4e2..c0fafb08 100644 --- a/src/ocpp20/types/TransactionEventEnumType20.h +++ b/src/ocpp20/types/TransactionEventEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_TRANSACTIONEVENTENUMTYPE20_H -#define OPENOCPP_TRANSACTIONEVENTENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_TRANSACTIONEVENTENUMTYPE_H +#define OPENOCPP_OCPP20_TRANSACTIONEVENTENUMTYPE_H #include "EnumToStringFromString.h" @@ -35,18 +35,18 @@ namespace ocpp20 /** @brief This contains the type of this event. The first TransactionEvent of a transaction SHALL contain: "Started" The last TransactionEvent of a transaction SHALL contain: "Ended" All others SHALL contain: "Updated" */ -enum class TransactionEventEnumType20 +enum class TransactionEventEnumType { Ended, Started, Updated, }; -/** @brief Helper to convert a TransactionEventEnumType20 enum to string */ -extern const EnumToStringFromString TransactionEventEnumType20Helper; +/** @brief Helper to convert a TransactionEventEnumType enum to string */ +extern const EnumToStringFromString TransactionEventEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_TRANSACTIONEVENTENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_TRANSACTIONEVENTENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/TransactionType20.cpp b/src/ocpp20/types/TransactionType20.cpp index e62c1a18..f29635b3 100644 --- a/src/ocpp20/types/TransactionType20.cpp +++ b/src/ocpp20/types/TransactionType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a TransactionType20 from a JSON representation */ -bool TransactionType20Converter::fromJson(const rapidjson::Value& json, - TransactionType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a TransactionType from a JSON representation */ +bool TransactionTypeConverter::fromJson(const rapidjson::Value& json, + TransactionType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -53,7 +53,7 @@ bool TransactionType20Converter::fromJson(const rapidjson::Value& json, // chargingState if (json.HasMember("chargingState")) { - data.chargingState = ChargingStateEnumType20Helper.fromString(json["chargingState"].GetString()); + data.chargingState = ChargingStateEnumTypeHelper.fromString(json["chargingState"].GetString()); } // timeSpentCharging @@ -62,7 +62,7 @@ bool TransactionType20Converter::fromJson(const rapidjson::Value& json, // stoppedReason if (json.HasMember("stoppedReason")) { - data.stoppedReason = ReasonEnumType20Helper.fromString(json["stoppedReason"].GetString()); + data.stoppedReason = ReasonEnumTypeHelper.fromString(json["stoppedReason"].GetString()); } // remoteStartId @@ -76,15 +76,15 @@ bool TransactionType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a TransactionType20 to a JSON representation */ -bool TransactionType20Converter::toJson(const TransactionType20& data, rapidjson::Document& json) +/** @brief Convert a TransactionType to a JSON representation */ +bool TransactionTypeConverter::toJson(const TransactionType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -98,7 +98,7 @@ bool TransactionType20Converter::toJson(const TransactionType20& data, rapidjson // chargingState if (data.chargingState.isSet()) { - fill(json, "chargingState", ChargingStateEnumType20Helper.toString(data.chargingState)); + fill(json, "chargingState", ChargingStateEnumTypeHelper.toString(data.chargingState)); } // timeSpentCharging @@ -107,7 +107,7 @@ bool TransactionType20Converter::toJson(const TransactionType20& data, rapidjson // stoppedReason if (data.stoppedReason.isSet()) { - fill(json, "stoppedReason", ReasonEnumType20Helper.toString(data.stoppedReason)); + fill(json, "stoppedReason", ReasonEnumTypeHelper.toString(data.stoppedReason)); } // remoteStartId diff --git a/src/ocpp20/types/TransactionType20.h b/src/ocpp20/types/TransactionType20.h index 204ed961..aaacfdf2 100644 --- a/src/ocpp20/types/TransactionType20.h +++ b/src/ocpp20/types/TransactionType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_TRANSACTIONTYPE20_H -#define OPENOCPP_TRANSACTIONTYPE20_H +#ifndef OPENOCPP_OCPP20_TRANSACTIONTYPE_H +#define OPENOCPP_OCPP20_TRANSACTIONTYPE_H #include "ChargingStateEnumType20.h" #include "CustomDataType20.h" @@ -42,43 +42,43 @@ namespace ocpp20 /** @brief Transaction urn:x-oca:ocpp:uid:2:233318 */ -struct TransactionType20 +struct TransactionType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief This contains the Id of the transaction. */ ocpp::types::CiStringType<36u> transactionId; /** @brief */ - ocpp::types::Optional chargingState; + ocpp::types::Optional chargingState; /** @brief Transaction. Time_ Spent_ Charging. Elapsed_ Time urn:x-oca:ocpp:uid:1:569415 Contains the total time that energy flowed from EVSE to EV during the transaction (in seconds). Note that timeSpentCharging is smaller or equal to the duration of the transaction. */ ocpp::types::Optional timeSpentCharging; /** @brief */ - ocpp::types::Optional stoppedReason; + ocpp::types::Optional stoppedReason; /** @brief The ID given to remote start request (<<requeststarttransactionrequest, RequestStartTransactionRequest>>. This enables to CSMS to match the started transaction to the given start request. */ ocpp::types::Optional remoteStartId; }; -/** @brief Converter class for TransactionType20 type */ -class TransactionType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for TransactionType type */ +class TransactionTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new TransactionType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new TransactionTypeConverter(); } - /** @brief Convert a TransactionType20 from a JSON representation */ + /** @brief Convert a TransactionType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - TransactionType20& data, + TransactionType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a TransactionType20 to a JSON representation */ - bool toJson(const TransactionType20& data, rapidjson::Document& json) override; + /** @brief Convert a TransactionType to a JSON representation */ + bool toJson(const TransactionType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_TRANSACTIONTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_TRANSACTIONTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/TriggerMessageStatusEnumType20.cpp b/src/ocpp20/types/TriggerMessageStatusEnumType20.cpp index 1697bd86..0b038da3 100644 --- a/src/ocpp20/types/TriggerMessageStatusEnumType20.cpp +++ b/src/ocpp20/types/TriggerMessageStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a TriggerMessageStatusEnumType20 enum to string */ -const EnumToStringFromString TriggerMessageStatusEnumType20Helper = { - {TriggerMessageStatusEnumType20::Accepted, "Accepted"}, - {TriggerMessageStatusEnumType20::Rejected, "Rejected"}, - {TriggerMessageStatusEnumType20::NotImplemented, "NotImplemented"}, +/** @brief Helper to convert a TriggerMessageStatusEnumType enum to string */ +const EnumToStringFromString TriggerMessageStatusEnumTypeHelper = { + {TriggerMessageStatusEnumType::Accepted, "Accepted"}, + {TriggerMessageStatusEnumType::Rejected, "Rejected"}, + {TriggerMessageStatusEnumType::NotImplemented, "NotImplemented"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/TriggerMessageStatusEnumType20.h b/src/ocpp20/types/TriggerMessageStatusEnumType20.h index ad8dc9ab..b9924445 100644 --- a/src/ocpp20/types/TriggerMessageStatusEnumType20.h +++ b/src/ocpp20/types/TriggerMessageStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_TRIGGERMESSAGESTATUSENUMTYPE20_H -#define OPENOCPP_TRIGGERMESSAGESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_TRIGGERMESSAGESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_TRIGGERMESSAGESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief Indicates whether the Charging Station will send the requested notification or not. */ -enum class TriggerMessageStatusEnumType20 +enum class TriggerMessageStatusEnumType { Accepted, Rejected, NotImplemented, }; -/** @brief Helper to convert a TriggerMessageStatusEnumType20 enum to string */ -extern const EnumToStringFromString TriggerMessageStatusEnumType20Helper; +/** @brief Helper to convert a TriggerMessageStatusEnumType enum to string */ +extern const EnumToStringFromString TriggerMessageStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_TRIGGERMESSAGESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_TRIGGERMESSAGESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/TriggerReasonEnumType20.cpp b/src/ocpp20/types/TriggerReasonEnumType20.cpp index 99f53b02..a76382cf 100644 --- a/src/ocpp20/types/TriggerReasonEnumType20.cpp +++ b/src/ocpp20/types/TriggerReasonEnumType20.cpp @@ -30,29 +30,29 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a TriggerReasonEnumType20 enum to string */ -const EnumToStringFromString TriggerReasonEnumType20Helper = { - {TriggerReasonEnumType20::Authorized, "Authorized"}, - {TriggerReasonEnumType20::CablePluggedIn, "CablePluggedIn"}, - {TriggerReasonEnumType20::ChargingRateChanged, "ChargingRateChanged"}, - {TriggerReasonEnumType20::ChargingStateChanged, "ChargingStateChanged"}, - {TriggerReasonEnumType20::Deauthorized, "Deauthorized"}, - {TriggerReasonEnumType20::EnergyLimitReached, "EnergyLimitReached"}, - {TriggerReasonEnumType20::EVCommunicationLost, "EVCommunicationLost"}, - {TriggerReasonEnumType20::EVConnectTimeout, "EVConnectTimeout"}, - {TriggerReasonEnumType20::MeterValueClock, "MeterValueClock"}, - {TriggerReasonEnumType20::MeterValuePeriodic, "MeterValuePeriodic"}, - {TriggerReasonEnumType20::TimeLimitReached, "TimeLimitReached"}, - {TriggerReasonEnumType20::Trigger, "Trigger"}, - {TriggerReasonEnumType20::UnlockCommand, "UnlockCommand"}, - {TriggerReasonEnumType20::StopAuthorized, "StopAuthorized"}, - {TriggerReasonEnumType20::EVDeparted, "EVDeparted"}, - {TriggerReasonEnumType20::EVDetected, "EVDetected"}, - {TriggerReasonEnumType20::RemoteStop, "RemoteStop"}, - {TriggerReasonEnumType20::RemoteStart, "RemoteStart"}, - {TriggerReasonEnumType20::AbnormalCondition, "AbnormalCondition"}, - {TriggerReasonEnumType20::SignedDataReceived, "SignedDataReceived"}, - {TriggerReasonEnumType20::ResetCommand, "ResetCommand"}, +/** @brief Helper to convert a TriggerReasonEnumType enum to string */ +const EnumToStringFromString TriggerReasonEnumTypeHelper = { + {TriggerReasonEnumType::Authorized, "Authorized"}, + {TriggerReasonEnumType::CablePluggedIn, "CablePluggedIn"}, + {TriggerReasonEnumType::ChargingRateChanged, "ChargingRateChanged"}, + {TriggerReasonEnumType::ChargingStateChanged, "ChargingStateChanged"}, + {TriggerReasonEnumType::Deauthorized, "Deauthorized"}, + {TriggerReasonEnumType::EnergyLimitReached, "EnergyLimitReached"}, + {TriggerReasonEnumType::EVCommunicationLost, "EVCommunicationLost"}, + {TriggerReasonEnumType::EVConnectTimeout, "EVConnectTimeout"}, + {TriggerReasonEnumType::MeterValueClock, "MeterValueClock"}, + {TriggerReasonEnumType::MeterValuePeriodic, "MeterValuePeriodic"}, + {TriggerReasonEnumType::TimeLimitReached, "TimeLimitReached"}, + {TriggerReasonEnumType::Trigger, "Trigger"}, + {TriggerReasonEnumType::UnlockCommand, "UnlockCommand"}, + {TriggerReasonEnumType::StopAuthorized, "StopAuthorized"}, + {TriggerReasonEnumType::EVDeparted, "EVDeparted"}, + {TriggerReasonEnumType::EVDetected, "EVDetected"}, + {TriggerReasonEnumType::RemoteStop, "RemoteStop"}, + {TriggerReasonEnumType::RemoteStart, "RemoteStart"}, + {TriggerReasonEnumType::AbnormalCondition, "AbnormalCondition"}, + {TriggerReasonEnumType::SignedDataReceived, "SignedDataReceived"}, + {TriggerReasonEnumType::ResetCommand, "ResetCommand"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/TriggerReasonEnumType20.h b/src/ocpp20/types/TriggerReasonEnumType20.h index 444cbed5..61867191 100644 --- a/src/ocpp20/types/TriggerReasonEnumType20.h +++ b/src/ocpp20/types/TriggerReasonEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_TRIGGERREASONENUMTYPE20_H -#define OPENOCPP_TRIGGERREASONENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_TRIGGERREASONENUMTYPE_H +#define OPENOCPP_OCPP20_TRIGGERREASONENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief Reason the Charging Station sends this message to the CSMS */ -enum class TriggerReasonEnumType20 +enum class TriggerReasonEnumType { Authorized, CablePluggedIn, @@ -59,11 +59,11 @@ enum class TriggerReasonEnumType20 ResetCommand, }; -/** @brief Helper to convert a TriggerReasonEnumType20 enum to string */ -extern const EnumToStringFromString TriggerReasonEnumType20Helper; +/** @brief Helper to convert a TriggerReasonEnumType enum to string */ +extern const EnumToStringFromString TriggerReasonEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_TRIGGERREASONENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_TRIGGERREASONENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/UnitOfMeasureType20.cpp b/src/ocpp20/types/UnitOfMeasureType20.cpp index d6cb06e6..da4e9ec7 100644 --- a/src/ocpp20/types/UnitOfMeasureType20.cpp +++ b/src/ocpp20/types/UnitOfMeasureType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a UnitOfMeasureType20 from a JSON representation */ -bool UnitOfMeasureType20Converter::fromJson(const rapidjson::Value& json, - UnitOfMeasureType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a UnitOfMeasureType from a JSON representation */ +bool UnitOfMeasureTypeConverter::fromJson(const rapidjson::Value& json, + UnitOfMeasureType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -61,15 +61,15 @@ bool UnitOfMeasureType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a UnitOfMeasureType20 to a JSON representation */ -bool UnitOfMeasureType20Converter::toJson(const UnitOfMeasureType20& data, rapidjson::Document& json) +/** @brief Convert a UnitOfMeasureType to a JSON representation */ +bool UnitOfMeasureTypeConverter::toJson(const UnitOfMeasureType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/UnitOfMeasureType20.h b/src/ocpp20/types/UnitOfMeasureType20.h index 0afa85b9..4af4ec5c 100644 --- a/src/ocpp20/types/UnitOfMeasureType20.h +++ b/src/ocpp20/types/UnitOfMeasureType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_UNITOFMEASURETYPE20_H -#define OPENOCPP_UNITOFMEASURETYPE20_H +#ifndef OPENOCPP_OCPP20_UNITOFMEASURETYPE_H +#define OPENOCPP_OCPP20_UNITOFMEASURETYPE_H #include "CustomDataType20.h" @@ -39,10 +39,10 @@ namespace ocpp20 /** @brief Represents a UnitOfMeasure with a multiplier */ -struct UnitOfMeasureType20 +struct UnitOfMeasureType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Unit of the value. Default = "Wh" if the (default) measurand is an "Energy" type. This field SHALL use a value from the list Standardized Units of Measurements in Part 2 Appendices. If an applicable unit is available in that list, otherwise a "custom" unit might be used. */ @@ -51,25 +51,25 @@ If an applicable unit is available in that list, otherwise a "custom" unit might ocpp::types::Optional multiplier; }; -/** @brief Converter class for UnitOfMeasureType20 type */ -class UnitOfMeasureType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for UnitOfMeasureType type */ +class UnitOfMeasureTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new UnitOfMeasureType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new UnitOfMeasureTypeConverter(); } - /** @brief Convert a UnitOfMeasureType20 from a JSON representation */ + /** @brief Convert a UnitOfMeasureType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - UnitOfMeasureType20& data, + UnitOfMeasureType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a UnitOfMeasureType20 to a JSON representation */ - bool toJson(const UnitOfMeasureType20& data, rapidjson::Document& json) override; + /** @brief Convert a UnitOfMeasureType to a JSON representation */ + bool toJson(const UnitOfMeasureType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_UNITOFMEASURETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_UNITOFMEASURETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/UnlockStatusEnumType20.cpp b/src/ocpp20/types/UnlockStatusEnumType20.cpp index f67d5101..1fb78661 100644 --- a/src/ocpp20/types/UnlockStatusEnumType20.cpp +++ b/src/ocpp20/types/UnlockStatusEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a UnlockStatusEnumType20 enum to string */ -const EnumToStringFromString UnlockStatusEnumType20Helper = { - {UnlockStatusEnumType20::Unlocked, "Unlocked"}, - {UnlockStatusEnumType20::UnlockFailed, "UnlockFailed"}, - {UnlockStatusEnumType20::OngoingAuthorizedTransaction, "OngoingAuthorizedTransaction"}, - {UnlockStatusEnumType20::UnknownConnector, "UnknownConnector"}, +/** @brief Helper to convert a UnlockStatusEnumType enum to string */ +const EnumToStringFromString UnlockStatusEnumTypeHelper = { + {UnlockStatusEnumType::Unlocked, "Unlocked"}, + {UnlockStatusEnumType::UnlockFailed, "UnlockFailed"}, + {UnlockStatusEnumType::OngoingAuthorizedTransaction, "OngoingAuthorizedTransaction"}, + {UnlockStatusEnumType::UnknownConnector, "UnknownConnector"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/UnlockStatusEnumType20.h b/src/ocpp20/types/UnlockStatusEnumType20.h index 169cbc06..6e9454b3 100644 --- a/src/ocpp20/types/UnlockStatusEnumType20.h +++ b/src/ocpp20/types/UnlockStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_UNLOCKSTATUSENUMTYPE20_H -#define OPENOCPP_UNLOCKSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_UNLOCKSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_UNLOCKSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief This indicates whether the Charging Station has unlocked the connector. */ -enum class UnlockStatusEnumType20 +enum class UnlockStatusEnumType { Unlocked, UnlockFailed, @@ -42,11 +42,11 @@ enum class UnlockStatusEnumType20 UnknownConnector, }; -/** @brief Helper to convert a UnlockStatusEnumType20 enum to string */ -extern const EnumToStringFromString UnlockStatusEnumType20Helper; +/** @brief Helper to convert a UnlockStatusEnumType enum to string */ +extern const EnumToStringFromString UnlockStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_UNLOCKSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_UNLOCKSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/UnpublishFirmwareStatusEnumType20.cpp b/src/ocpp20/types/UnpublishFirmwareStatusEnumType20.cpp index 022d93b5..b37eb862 100644 --- a/src/ocpp20/types/UnpublishFirmwareStatusEnumType20.cpp +++ b/src/ocpp20/types/UnpublishFirmwareStatusEnumType20.cpp @@ -30,11 +30,11 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a UnpublishFirmwareStatusEnumType20 enum to string */ -const EnumToStringFromString UnpublishFirmwareStatusEnumType20Helper = { - {UnpublishFirmwareStatusEnumType20::DownloadOngoing, "DownloadOngoing"}, - {UnpublishFirmwareStatusEnumType20::NoFirmware, "NoFirmware"}, - {UnpublishFirmwareStatusEnumType20::Unpublished, "Unpublished"}, +/** @brief Helper to convert a UnpublishFirmwareStatusEnumType enum to string */ +const EnumToStringFromString UnpublishFirmwareStatusEnumTypeHelper = { + {UnpublishFirmwareStatusEnumType::DownloadOngoing, "DownloadOngoing"}, + {UnpublishFirmwareStatusEnumType::NoFirmware, "NoFirmware"}, + {UnpublishFirmwareStatusEnumType::Unpublished, "Unpublished"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/UnpublishFirmwareStatusEnumType20.h b/src/ocpp20/types/UnpublishFirmwareStatusEnumType20.h index 55de70cb..225ab12d 100644 --- a/src/ocpp20/types/UnpublishFirmwareStatusEnumType20.h +++ b/src/ocpp20/types/UnpublishFirmwareStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_UNPUBLISHFIRMWARESTATUSENUMTYPE20_H -#define OPENOCPP_UNPUBLISHFIRMWARESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_UNPUBLISHFIRMWARESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_UNPUBLISHFIRMWARESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,18 +34,18 @@ namespace ocpp20 { /** @brief Indicates whether the Local Controller succeeded in unpublishing the firmware. */ -enum class UnpublishFirmwareStatusEnumType20 +enum class UnpublishFirmwareStatusEnumType { DownloadOngoing, NoFirmware, Unpublished, }; -/** @brief Helper to convert a UnpublishFirmwareStatusEnumType20 enum to string */ -extern const EnumToStringFromString UnpublishFirmwareStatusEnumType20Helper; +/** @brief Helper to convert a UnpublishFirmwareStatusEnumType enum to string */ +extern const EnumToStringFromString UnpublishFirmwareStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_UNPUBLISHFIRMWARESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_UNPUBLISHFIRMWARESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/UpdateEnumType20.cpp b/src/ocpp20/types/UpdateEnumType20.cpp index ba84c27a..7e463d5d 100644 --- a/src/ocpp20/types/UpdateEnumType20.cpp +++ b/src/ocpp20/types/UpdateEnumType20.cpp @@ -30,10 +30,10 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a UpdateEnumType20 enum to string */ -const EnumToStringFromString UpdateEnumType20Helper = { - {UpdateEnumType20::Differential, "Differential"}, - {UpdateEnumType20::Full, "Full"}, +/** @brief Helper to convert a UpdateEnumType enum to string */ +const EnumToStringFromString UpdateEnumTypeHelper = { + {UpdateEnumType::Differential, "Differential"}, + {UpdateEnumType::Full, "Full"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/UpdateEnumType20.h b/src/ocpp20/types/UpdateEnumType20.h index 11deb1e7..a87279d5 100644 --- a/src/ocpp20/types/UpdateEnumType20.h +++ b/src/ocpp20/types/UpdateEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_UPDATEENUMTYPE20_H -#define OPENOCPP_UPDATEENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_UPDATEENUMTYPE_H +#define OPENOCPP_OCPP20_UPDATEENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,17 +34,17 @@ namespace ocpp20 { /** @brief This contains the type of update (full or differential) of this request. */ -enum class UpdateEnumType20 +enum class UpdateEnumType { Differential, Full, }; -/** @brief Helper to convert a UpdateEnumType20 enum to string */ -extern const EnumToStringFromString UpdateEnumType20Helper; +/** @brief Helper to convert a UpdateEnumType enum to string */ +extern const EnumToStringFromString UpdateEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_UPDATEENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_UPDATEENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/UpdateFirmwareStatusEnumType20.cpp b/src/ocpp20/types/UpdateFirmwareStatusEnumType20.cpp index ffc96875..ce3c8466 100644 --- a/src/ocpp20/types/UpdateFirmwareStatusEnumType20.cpp +++ b/src/ocpp20/types/UpdateFirmwareStatusEnumType20.cpp @@ -30,13 +30,13 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a UpdateFirmwareStatusEnumType20 enum to string */ -const EnumToStringFromString UpdateFirmwareStatusEnumType20Helper = { - {UpdateFirmwareStatusEnumType20::Accepted, "Accepted"}, - {UpdateFirmwareStatusEnumType20::Rejected, "Rejected"}, - {UpdateFirmwareStatusEnumType20::AcceptedCanceled, "AcceptedCanceled"}, - {UpdateFirmwareStatusEnumType20::InvalidCertificate, "InvalidCertificate"}, - {UpdateFirmwareStatusEnumType20::RevokedCertificate, "RevokedCertificate"}, +/** @brief Helper to convert a UpdateFirmwareStatusEnumType enum to string */ +const EnumToStringFromString UpdateFirmwareStatusEnumTypeHelper = { + {UpdateFirmwareStatusEnumType::Accepted, "Accepted"}, + {UpdateFirmwareStatusEnumType::Rejected, "Rejected"}, + {UpdateFirmwareStatusEnumType::AcceptedCanceled, "AcceptedCanceled"}, + {UpdateFirmwareStatusEnumType::InvalidCertificate, "InvalidCertificate"}, + {UpdateFirmwareStatusEnumType::RevokedCertificate, "RevokedCertificate"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/UpdateFirmwareStatusEnumType20.h b/src/ocpp20/types/UpdateFirmwareStatusEnumType20.h index bac8cd9b..ed3a1a95 100644 --- a/src/ocpp20/types/UpdateFirmwareStatusEnumType20.h +++ b/src/ocpp20/types/UpdateFirmwareStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_UPDATEFIRMWARESTATUSENUMTYPE20_H -#define OPENOCPP_UPDATEFIRMWARESTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_UPDATEFIRMWARESTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_UPDATEFIRMWARESTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief This field indicates whether the Charging Station was able to accept the request. */ -enum class UpdateFirmwareStatusEnumType20 +enum class UpdateFirmwareStatusEnumType { Accepted, Rejected, @@ -43,11 +43,11 @@ enum class UpdateFirmwareStatusEnumType20 RevokedCertificate, }; -/** @brief Helper to convert a UpdateFirmwareStatusEnumType20 enum to string */ -extern const EnumToStringFromString UpdateFirmwareStatusEnumType20Helper; +/** @brief Helper to convert a UpdateFirmwareStatusEnumType enum to string */ +extern const EnumToStringFromString UpdateFirmwareStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_UPDATEFIRMWARESTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_UPDATEFIRMWARESTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/UploadLogStatusEnumType20.cpp b/src/ocpp20/types/UploadLogStatusEnumType20.cpp index f9ab887f..6c2d9b94 100644 --- a/src/ocpp20/types/UploadLogStatusEnumType20.cpp +++ b/src/ocpp20/types/UploadLogStatusEnumType20.cpp @@ -30,16 +30,16 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a UploadLogStatusEnumType20 enum to string */ -const EnumToStringFromString UploadLogStatusEnumType20Helper = { - {UploadLogStatusEnumType20::BadMessage, "BadMessage"}, - {UploadLogStatusEnumType20::Idle, "Idle"}, - {UploadLogStatusEnumType20::NotSupportedOperation, "NotSupportedOperation"}, - {UploadLogStatusEnumType20::PermissionDenied, "PermissionDenied"}, - {UploadLogStatusEnumType20::Uploaded, "Uploaded"}, - {UploadLogStatusEnumType20::UploadFailure, "UploadFailure"}, - {UploadLogStatusEnumType20::Uploading, "Uploading"}, - {UploadLogStatusEnumType20::AcceptedCanceled, "AcceptedCanceled"}, +/** @brief Helper to convert a UploadLogStatusEnumType enum to string */ +const EnumToStringFromString UploadLogStatusEnumTypeHelper = { + {UploadLogStatusEnumType::BadMessage, "BadMessage"}, + {UploadLogStatusEnumType::Idle, "Idle"}, + {UploadLogStatusEnumType::NotSupportedOperation, "NotSupportedOperation"}, + {UploadLogStatusEnumType::PermissionDenied, "PermissionDenied"}, + {UploadLogStatusEnumType::Uploaded, "Uploaded"}, + {UploadLogStatusEnumType::UploadFailure, "UploadFailure"}, + {UploadLogStatusEnumType::Uploading, "Uploading"}, + {UploadLogStatusEnumType::AcceptedCanceled, "AcceptedCanceled"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/UploadLogStatusEnumType20.h b/src/ocpp20/types/UploadLogStatusEnumType20.h index 40a9ff17..ff8f607f 100644 --- a/src/ocpp20/types/UploadLogStatusEnumType20.h +++ b/src/ocpp20/types/UploadLogStatusEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_UPLOADLOGSTATUSENUMTYPE20_H -#define OPENOCPP_UPLOADLOGSTATUSENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_UPLOADLOGSTATUSENUMTYPE_H +#define OPENOCPP_OCPP20_UPLOADLOGSTATUSENUMTYPE_H #include "EnumToStringFromString.h" @@ -34,7 +34,7 @@ namespace ocpp20 { /** @brief This contains the status of the log upload. */ -enum class UploadLogStatusEnumType20 +enum class UploadLogStatusEnumType { BadMessage, Idle, @@ -46,11 +46,11 @@ enum class UploadLogStatusEnumType20 AcceptedCanceled, }; -/** @brief Helper to convert a UploadLogStatusEnumType20 enum to string */ -extern const EnumToStringFromString UploadLogStatusEnumType20Helper; +/** @brief Helper to convert a UploadLogStatusEnumType enum to string */ +extern const EnumToStringFromString UploadLogStatusEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_UPLOADLOGSTATUSENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_UPLOADLOGSTATUSENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/VPNEnumType20.cpp b/src/ocpp20/types/VPNEnumType20.cpp index 0a4d1baf..a3b1bfdc 100644 --- a/src/ocpp20/types/VPNEnumType20.cpp +++ b/src/ocpp20/types/VPNEnumType20.cpp @@ -30,12 +30,12 @@ namespace types namespace ocpp20 { -/** @brief Helper to convert a VPNEnumType20 enum to string */ -const EnumToStringFromString VPNEnumType20Helper = { - {VPNEnumType20::IKEv2, "IKEv2"}, - {VPNEnumType20::IPSec, "IPSec"}, - {VPNEnumType20::L2TP, "L2TP"}, - {VPNEnumType20::PPTP, "PPTP"}, +/** @brief Helper to convert a VPNEnumType enum to string */ +const EnumToStringFromString VPNEnumTypeHelper = { + {VPNEnumType::IKEv2, "IKEv2"}, + {VPNEnumType::IPSec, "IPSec"}, + {VPNEnumType::L2TP, "L2TP"}, + {VPNEnumType::PPTP, "PPTP"}, }; } // namespace ocpp20 diff --git a/src/ocpp20/types/VPNEnumType20.h b/src/ocpp20/types/VPNEnumType20.h index 6dc92a56..171105fe 100644 --- a/src/ocpp20/types/VPNEnumType20.h +++ b/src/ocpp20/types/VPNEnumType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_VPNENUMTYPE20_H -#define OPENOCPP_VPNENUMTYPE20_H +#ifndef OPENOCPP_OCPP20_VPNENUMTYPE_H +#define OPENOCPP_OCPP20_VPNENUMTYPE_H #include "EnumToStringFromString.h" @@ -36,7 +36,7 @@ namespace ocpp20 /** @brief VPN. Type. VPN_ Code urn:x-oca:ocpp:uid:1:569277 Type of VPN */ -enum class VPNEnumType20 +enum class VPNEnumType { IKEv2, IPSec, @@ -44,11 +44,11 @@ enum class VPNEnumType20 PPTP, }; -/** @brief Helper to convert a VPNEnumType20 enum to string */ -extern const EnumToStringFromString VPNEnumType20Helper; +/** @brief Helper to convert a VPNEnumType enum to string */ +extern const EnumToStringFromString VPNEnumTypeHelper; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_VPNENUMTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_VPNENUMTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/VPNType20.cpp b/src/ocpp20/types/VPNType20.cpp index 6b6b3422..0c04ec18 100644 --- a/src/ocpp20/types/VPNType20.cpp +++ b/src/ocpp20/types/VPNType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a VPNType20 from a JSON representation */ -bool VPNType20Converter::fromJson(const rapidjson::Value& json, - VPNType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a VPNType from a JSON representation */ +bool VPNTypeConverter::fromJson(const rapidjson::Value& json, + VPNType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -63,7 +63,7 @@ bool VPNType20Converter::fromJson(const rapidjson::Value& json, extract(json, "key", data.key); // type - data.type = VPNEnumType20Helper.fromString(json["type"].GetString()); + data.type = VPNEnumTypeHelper.fromString(json["type"].GetString()); if (!ret) { @@ -73,15 +73,15 @@ bool VPNType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a VPNType20 to a JSON representation */ -bool VPNType20Converter::toJson(const VPNType20& data, rapidjson::Document& json) +/** @brief Convert a VPNType to a JSON representation */ +bool VPNTypeConverter::toJson(const VPNType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -105,7 +105,7 @@ bool VPNType20Converter::toJson(const VPNType20& data, rapidjson::Document& json fill(json, "key", data.key); // type - fill(json, "type", VPNEnumType20Helper.toString(data.type)); + fill(json, "type", VPNEnumTypeHelper.toString(data.type)); return ret; } diff --git a/src/ocpp20/types/VPNType20.h b/src/ocpp20/types/VPNType20.h index 80a84654..f4983c80 100644 --- a/src/ocpp20/types/VPNType20.h +++ b/src/ocpp20/types/VPNType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_VPNTYPE20_H -#define OPENOCPP_VPNTYPE20_H +#ifndef OPENOCPP_OCPP20_VPNTYPE_H +#define OPENOCPP_OCPP20_VPNTYPE_H #include "CustomDataType20.h" #include "VPNEnumType20.h" @@ -42,10 +42,10 @@ namespace ocpp20 urn:x-oca:ocpp:uid:2:233268 VPN Configuration settings */ -struct VPNType20 +struct VPNType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief VPN. Server. URI urn:x-oca:ocpp:uid:1:569272 VPN Server Address */ @@ -67,28 +67,28 @@ urn:x-oca:ocpp:uid:1:569276 VPN shared secret. */ ocpp::types::CiStringType<255u> key; /** @brief */ - VPNEnumType20 type; + VPNEnumType type; }; -/** @brief Converter class for VPNType20 type */ -class VPNType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for VPNType type */ +class VPNTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new VPNType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new VPNTypeConverter(); } - /** @brief Convert a VPNType20 from a JSON representation */ + /** @brief Convert a VPNType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - VPNType20& data, + VPNType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a VPNType20 to a JSON representation */ - bool toJson(const VPNType20& data, rapidjson::Document& json) override; + /** @brief Convert a VPNType to a JSON representation */ + bool toJson(const VPNType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_VPNTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_VPNTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/VariableAttributeType20.cpp b/src/ocpp20/types/VariableAttributeType20.cpp index 8c175537..2d39bfde 100644 --- a/src/ocpp20/types/VariableAttributeType20.cpp +++ b/src/ocpp20/types/VariableAttributeType20.cpp @@ -32,25 +32,25 @@ namespace types namespace ocpp20 { -/** @brief Convert a VariableAttributeType20 from a JSON representation */ -bool VariableAttributeType20Converter::fromJson(const rapidjson::Value& json, - VariableAttributeType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a VariableAttributeType from a JSON representation */ +bool VariableAttributeTypeConverter::fromJson(const rapidjson::Value& json, + VariableAttributeType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } // type if (json.HasMember("type")) { - data.type = AttributeEnumType20Helper.fromString(json["type"].GetString()); + data.type = AttributeEnumTypeHelper.fromString(json["type"].GetString()); } // value @@ -59,7 +59,7 @@ bool VariableAttributeType20Converter::fromJson(const rapidjson::Value& js // mutability if (json.HasMember("mutability")) { - data.mutability = MutabilityEnumType20Helper.fromString(json["mutability"].GetString()); + data.mutability = MutabilityEnumTypeHelper.fromString(json["mutability"].GetString()); } // persistent @@ -76,15 +76,15 @@ bool VariableAttributeType20Converter::fromJson(const rapidjson::Value& js return ret; } -/** @brief Convert a VariableAttributeType20 to a JSON representation */ -bool VariableAttributeType20Converter::toJson(const VariableAttributeType20& data, rapidjson::Document& json) +/** @brief Convert a VariableAttributeType to a JSON representation */ +bool VariableAttributeTypeConverter::toJson(const VariableAttributeType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -95,7 +95,7 @@ bool VariableAttributeType20Converter::toJson(const VariableAttributeType20& dat // type if (data.type.isSet()) { - fill(json, "type", AttributeEnumType20Helper.toString(data.type)); + fill(json, "type", AttributeEnumTypeHelper.toString(data.type)); } // value @@ -104,7 +104,7 @@ bool VariableAttributeType20Converter::toJson(const VariableAttributeType20& dat // mutability if (data.mutability.isSet()) { - fill(json, "mutability", MutabilityEnumType20Helper.toString(data.mutability)); + fill(json, "mutability", MutabilityEnumTypeHelper.toString(data.mutability)); } // persistent diff --git a/src/ocpp20/types/VariableAttributeType20.h b/src/ocpp20/types/VariableAttributeType20.h index a7293011..6a2a25c1 100644 --- a/src/ocpp20/types/VariableAttributeType20.h +++ b/src/ocpp20/types/VariableAttributeType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_VARIABLEATTRIBUTETYPE20_H -#define OPENOCPP_VARIABLEATTRIBUTETYPE20_H +#ifndef OPENOCPP_OCPP20_VARIABLEATTRIBUTETYPE_H +#define OPENOCPP_OCPP20_VARIABLEATTRIBUTETYPE_H #include "AttributeEnumType20.h" #include "CustomDataType20.h" @@ -41,43 +41,43 @@ namespace ocpp20 /** @brief Attribute data of a variable. */ -struct VariableAttributeType20 +struct VariableAttributeType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief */ - ocpp::types::Optional type; + ocpp::types::Optional type; /** @brief Value of the attribute. May only be omitted when mutability is set to 'WriteOnly'. The Configuration Variable <<configkey-reporting-value-size,ReportingValueSize>> can be used to limit GetVariableResult.attributeValue, VariableAttribute.value and EventData.actualValue. The max size of these values will always remain equal. */ ocpp::types::Optional> value; /** @brief */ - ocpp::types::Optional mutability; + ocpp::types::Optional mutability; /** @brief If true, value will be persistent across system reboots or power down. Default when omitted is false. */ ocpp::types::Optional persistent; /** @brief If true, value that will never be changed by the Charging Station at runtime. Default when omitted is false. */ ocpp::types::Optional constant; }; -/** @brief Converter class for VariableAttributeType20 type */ -class VariableAttributeType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for VariableAttributeType type */ +class VariableAttributeTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new VariableAttributeType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new VariableAttributeTypeConverter(); } - /** @brief Convert a VariableAttributeType20 from a JSON representation */ + /** @brief Convert a VariableAttributeType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - VariableAttributeType20& data, + VariableAttributeType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a VariableAttributeType20 to a JSON representation */ - bool toJson(const VariableAttributeType20& data, rapidjson::Document& json) override; + /** @brief Convert a VariableAttributeType to a JSON representation */ + bool toJson(const VariableAttributeType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_VARIABLEATTRIBUTETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_VARIABLEATTRIBUTETYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/VariableCharacteristicsType20.cpp b/src/ocpp20/types/VariableCharacteristicsType20.cpp index cad8f417..148916c8 100644 --- a/src/ocpp20/types/VariableCharacteristicsType20.cpp +++ b/src/ocpp20/types/VariableCharacteristicsType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a VariableCharacteristicsType20 from a JSON representation */ -bool VariableCharacteristicsType20Converter::fromJson(const rapidjson::Value& json, - VariableCharacteristicsType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a VariableCharacteristicsType from a JSON representation */ +bool VariableCharacteristicsTypeConverter::fromJson(const rapidjson::Value& json, + VariableCharacteristicsType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -51,7 +51,7 @@ bool VariableCharacteristicsType20Converter::fromJson(const rapidjson::Value& extract(json, "unit", data.unit); // dataType - data.dataType = DataEnumType20Helper.fromString(json["dataType"].GetString()); + data.dataType = DataEnumTypeHelper.fromString(json["dataType"].GetString()); // minLimit extract(json, "minLimit", data.minLimit); @@ -73,15 +73,15 @@ bool VariableCharacteristicsType20Converter::fromJson(const rapidjson::Value& return ret; } -/** @brief Convert a VariableCharacteristicsType20 to a JSON representation */ -bool VariableCharacteristicsType20Converter::toJson(const VariableCharacteristicsType20& data, rapidjson::Document& json) +/** @brief Convert a VariableCharacteristicsType to a JSON representation */ +bool VariableCharacteristicsTypeConverter::toJson(const VariableCharacteristicsType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -93,7 +93,7 @@ bool VariableCharacteristicsType20Converter::toJson(const VariableCharacteristic fill(json, "unit", data.unit); // dataType - fill(json, "dataType", DataEnumType20Helper.toString(data.dataType)); + fill(json, "dataType", DataEnumTypeHelper.toString(data.dataType)); // minLimit fill(json, "minLimit", data.minLimit); diff --git a/src/ocpp20/types/VariableCharacteristicsType20.h b/src/ocpp20/types/VariableCharacteristicsType20.h index 91535dca..6bb5dd52 100644 --- a/src/ocpp20/types/VariableCharacteristicsType20.h +++ b/src/ocpp20/types/VariableCharacteristicsType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_VARIABLECHARACTERISTICSTYPE20_H -#define OPENOCPP_VARIABLECHARACTERISTICSTYPE20_H +#ifndef OPENOCPP_OCPP20_VARIABLECHARACTERISTICSTYPE_H +#define OPENOCPP_OCPP20_VARIABLECHARACTERISTICSTYPE_H #include "CustomDataType20.h" #include "DataEnumType20.h" @@ -40,14 +40,14 @@ namespace ocpp20 /** @brief Fixed read-only parameters of a variable. */ -struct VariableCharacteristicsType20 +struct VariableCharacteristicsType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Unit of the variable. When the transmitted value has a unit, this field SHALL be included. */ ocpp::types::Optional> unit; /** @brief */ - DataEnumType20 dataType; + DataEnumType dataType; /** @brief Minimum possible value of this variable. */ ocpp::types::Optional minLimit; /** @brief Maximum possible value of this variable. When the datatype of this Variable is String, OptionList, SequenceList or MemberList, this field defines the maximum length of the (CSV) string. */ @@ -68,28 +68,28 @@ The Configuration Variable <<configkey-configuration-value-size,Configurat bool supportsMonitoring; }; -/** @brief Converter class for VariableCharacteristicsType20 type */ -class VariableCharacteristicsType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for VariableCharacteristicsType type */ +class VariableCharacteristicsTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override + ocpp::messages::IMessageConverter* clone() const override { - return new VariableCharacteristicsType20Converter(); + return new VariableCharacteristicsTypeConverter(); } - /** @brief Convert a VariableCharacteristicsType20 from a JSON representation */ - bool fromJson(const rapidjson::Value& json, - VariableCharacteristicsType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) override; + /** @brief Convert a VariableCharacteristicsType from a JSON representation */ + bool fromJson(const rapidjson::Value& json, + VariableCharacteristicsType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a VariableCharacteristicsType20 to a JSON representation */ - bool toJson(const VariableCharacteristicsType20& data, rapidjson::Document& json) override; + /** @brief Convert a VariableCharacteristicsType to a JSON representation */ + bool toJson(const VariableCharacteristicsType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_VARIABLECHARACTERISTICSTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_VARIABLECHARACTERISTICSTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/VariableMonitoringType20.cpp b/src/ocpp20/types/VariableMonitoringType20.cpp index 52e979f1..aea969fd 100644 --- a/src/ocpp20/types/VariableMonitoringType20.cpp +++ b/src/ocpp20/types/VariableMonitoringType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a VariableMonitoringType20 from a JSON representation */ -bool VariableMonitoringType20Converter::fromJson(const rapidjson::Value& json, - VariableMonitoringType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a VariableMonitoringType from a JSON representation */ +bool VariableMonitoringTypeConverter::fromJson(const rapidjson::Value& json, + VariableMonitoringType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -57,7 +57,7 @@ bool VariableMonitoringType20Converter::fromJson(const rapidjson::Value& j extract(json, "value", data.value); // type - data.type = MonitorEnumType20Helper.fromString(json["type"].GetString()); + data.type = MonitorEnumTypeHelper.fromString(json["type"].GetString()); // severity extract(json, "severity", data.severity); @@ -70,15 +70,15 @@ bool VariableMonitoringType20Converter::fromJson(const rapidjson::Value& j return ret; } -/** @brief Convert a VariableMonitoringType20 to a JSON representation */ -bool VariableMonitoringType20Converter::toJson(const VariableMonitoringType20& data, rapidjson::Document& json) +/** @brief Convert a VariableMonitoringType to a JSON representation */ +bool VariableMonitoringTypeConverter::toJson(const VariableMonitoringType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); @@ -96,7 +96,7 @@ bool VariableMonitoringType20Converter::toJson(const VariableMonitoringType20& d fill(json, "value", data.value); // type - fill(json, "type", MonitorEnumType20Helper.toString(data.type)); + fill(json, "type", MonitorEnumTypeHelper.toString(data.type)); // severity fill(json, "severity", data.severity); diff --git a/src/ocpp20/types/VariableMonitoringType20.h b/src/ocpp20/types/VariableMonitoringType20.h index 407d7c81..fbc4a6e6 100644 --- a/src/ocpp20/types/VariableMonitoringType20.h +++ b/src/ocpp20/types/VariableMonitoringType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_VARIABLEMONITORINGTYPE20_H -#define OPENOCPP_VARIABLEMONITORINGTYPE20_H +#ifndef OPENOCPP_OCPP20_VARIABLEMONITORINGTYPE_H +#define OPENOCPP_OCPP20_VARIABLEMONITORINGTYPE_H #include "CustomDataType20.h" #include "MonitorEnumType20.h" @@ -39,10 +39,10 @@ namespace ocpp20 /** @brief A monitoring setting for a variable. */ -struct VariableMonitoringType20 +struct VariableMonitoringType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Identifies the monitor. */ int id; /** @brief Monitor only active when a transaction is ongoing on a component relevant to this transaction. */ @@ -51,7 +51,7 @@ struct VariableMonitoringType20 For Periodic or PeriodicClockAligned this is the interval in seconds. */ float value; /** @brief */ - MonitorEnumType20 type; + MonitorEnumType type; /** @brief The severity that will be assigned to an event that is triggered by this monitor. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level. The severity levels have the following meaning: + @@ -78,25 +78,25 @@ Indicates information useful to developers for debugging, not useful during oper int severity; }; -/** @brief Converter class for VariableMonitoringType20 type */ -class VariableMonitoringType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for VariableMonitoringType type */ +class VariableMonitoringTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new VariableMonitoringType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new VariableMonitoringTypeConverter(); } - /** @brief Convert a VariableMonitoringType20 from a JSON representation */ + /** @brief Convert a VariableMonitoringType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - VariableMonitoringType20& data, + VariableMonitoringType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a VariableMonitoringType20 to a JSON representation */ - bool toJson(const VariableMonitoringType20& data, rapidjson::Document& json) override; + /** @brief Convert a VariableMonitoringType to a JSON representation */ + bool toJson(const VariableMonitoringType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_VARIABLEMONITORINGTYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_VARIABLEMONITORINGTYPE_H \ No newline at end of file diff --git a/src/ocpp20/types/VariableType20.cpp b/src/ocpp20/types/VariableType20.cpp index 4c349655..f76bdbec 100644 --- a/src/ocpp20/types/VariableType20.cpp +++ b/src/ocpp20/types/VariableType20.cpp @@ -32,18 +32,18 @@ namespace types namespace ocpp20 { -/** @brief Convert a VariableType20 from a JSON representation */ -bool VariableType20Converter::fromJson(const rapidjson::Value& json, - VariableType20& data, - std::string& error_code, - [[maybe_unused]] std::string& error_message) +/** @brief Convert a VariableType from a JSON representation */ +bool VariableTypeConverter::fromJson(const rapidjson::Value& json, + VariableType& data, + std::string& error_code, + [[maybe_unused]] std::string& error_message) { bool ret = true; // customData if (json.HasMember("customData")) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; ret = ret && customData_converter.fromJson(json["customData"], data.customData, error_code, error_message); } @@ -61,15 +61,15 @@ bool VariableType20Converter::fromJson(const rapidjson::Value& json, return ret; } -/** @brief Convert a VariableType20 to a JSON representation */ -bool VariableType20Converter::toJson(const VariableType20& data, rapidjson::Document& json) +/** @brief Convert a VariableType to a JSON representation */ +bool VariableTypeConverter::toJson(const VariableType& data, rapidjson::Document& json) { bool ret = true; // customData if (data.customData.isSet()) { - CustomDataType20Converter customData_converter; + CustomDataTypeConverter customData_converter; customData_converter.setAllocator(allocator); rapidjson::Document customData_doc; customData_doc.Parse("{}"); diff --git a/src/ocpp20/types/VariableType20.h b/src/ocpp20/types/VariableType20.h index 2bdbeaf5..bae3baf5 100644 --- a/src/ocpp20/types/VariableType20.h +++ b/src/ocpp20/types/VariableType20.h @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . OCPP 2.0.1 FINAL */ -#ifndef OPENOCPP_VARIABLETYPE20_H -#define OPENOCPP_VARIABLETYPE20_H +#ifndef OPENOCPP_OCPP20_VARIABLETYPE_H +#define OPENOCPP_OCPP20_VARIABLETYPE_H #include "CustomDataType20.h" @@ -39,35 +39,35 @@ namespace ocpp20 /** @brief Reference key to a component-variable. */ -struct VariableType20 +struct VariableType { /** @brief */ - ocpp::types::Optional customData; + ocpp::types::Optional customData; /** @brief Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. */ ocpp::types::CiStringType<50u> name; /** @brief Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. */ ocpp::types::Optional> instance; }; -/** @brief Converter class for VariableType20 type */ -class VariableType20Converter : public ocpp::messages::IMessageConverter +/** @brief Converter class for VariableType type */ +class VariableTypeConverter : public ocpp::messages::IMessageConverter { public: /** @brief Clone the converter */ - ocpp::messages::IMessageConverter* clone() const override { return new VariableType20Converter(); } + ocpp::messages::IMessageConverter* clone() const override { return new VariableTypeConverter(); } - /** @brief Convert a VariableType20 from a JSON representation */ + /** @brief Convert a VariableType from a JSON representation */ bool fromJson(const rapidjson::Value& json, - VariableType20& data, + VariableType& data, std::string& error_code, [[maybe_unused]] std::string& error_message) override; - /** @brief Convert a VariableType20 to a JSON representation */ - bool toJson(const VariableType20& data, rapidjson::Document& json) override; + /** @brief Convert a VariableType to a JSON representation */ + bool toJson(const VariableType& data, rapidjson::Document& json) override; }; } // namespace ocpp20 } // namespace types } // namespace ocpp -#endif // OPENOCPP_VARIABLETYPE20_H \ No newline at end of file +#endif // OPENOCPP_OCPP20_VARIABLETYPE_H \ No newline at end of file diff --git a/tools/json2cpp/json2cpp.py b/tools/json2cpp/json2cpp.py index 058bb4d8..14f4704f 100644 --- a/tools/json2cpp/json2cpp.py +++ b/tools/json2cpp/json2cpp.py @@ -210,9 +210,6 @@ def __init__(self): self.name = "" ''' Name of the message ''' - self.raw_name = "" - ''' Name of the message without OCPP suffix ''' - self.id = "" ''' Id of the message definition ''' @@ -442,7 +439,7 @@ def parse_type_contents(name, contents, ocpp_version_suffix) -> Type: # Generic type data type = Type() - type.name = f"{name}{ocpp_version_suffix}" + type.name = f"{name}" type.basic_type = contents["type"] if "description" in contents: type.comment = contents["description"] @@ -458,7 +455,7 @@ def parse_type_contents(name, contents, ocpp_version_suffix) -> Type: field.comment = property_definition["description"] if "$ref" in property_definition: external_type = property_definition["$ref"] - field.type = external_type[external_type.rfind("/") + 1:] + ocpp_version_suffix + field.type = external_type[external_type.rfind("/") + 1:] type.requires.append(field.type) else: if "type" in property_definition: @@ -474,7 +471,7 @@ def parse_type_contents(name, contents, ocpp_version_suffix) -> Type: elif field.type == "array": if "$ref" in property_definition["items"]: external_type = property_definition["items"]["$ref"] - field.array_type = external_type[external_type.rfind("/") + 1:] + ocpp_version_suffix + field.array_type = external_type[external_type.rfind("/") + 1:] type.requires.append(field.array_type) else: field.array_type = property_definition["items"]["type"] @@ -527,7 +524,7 @@ def parse_message_contents(message, contents, ocpp_version_suffix) -> None: return -def gen_ocpp_enum(message, enum, templates, params) -> None: +def gen_ocpp_enum(message, enum, templates, params, ocpp_version_suffix) -> None: ''' Generate the code corresponding to an OCPP enum @@ -542,31 +539,34 @@ def gen_ocpp_enum(message, enum, templates, params) -> None: @param params: Command line parameters @type params: Parameters + + @param ocpp_version_suffix: Suffix of the OCPP version + @type ocpp_version_suffix: string ''' # Generate header file - enum_header_path = os.path.join(params.types_dir, enum.name + ".h") + enum_header_path = os.path.join(params.types_dir, enum.name + ocpp_version_suffix + ".h") enum_header = open(enum_header_path, "wt") env = jinja2.Environment() template = env.from_string(templates["enum_header"]) - rendered_template = template.render(message = message, enum = enum, ocpp_version_namespace = params.ocpp_version) + rendered_template = template.render(message = message, enum = enum, ocpp_version_namespace = params.ocpp_version, ocpp_version_suffix = ocpp_version_suffix) enum_header.write(rendered_template) enum_header.close() # Generate implementation file - enum_impl_path = os.path.join(params.types_dir, enum.name + ".cpp") + enum_impl_path = os.path.join(params.types_dir, enum.name + ocpp_version_suffix + ".cpp") enum_impl = open(enum_impl_path, "wt") env = jinja2.Environment() template = env.from_string(templates["enum_impl"]) - rendered_template = template.render(message = message, enum = enum, ocpp_version_namespace = params.ocpp_version) + rendered_template = template.render(message = message, enum = enum, ocpp_version_namespace = params.ocpp_version, ocpp_version_suffix = ocpp_version_suffix) enum_impl.write(rendered_template) enum_impl.close() -def gen_ocpp_type(message, type, other_types, templates, params) -> None: +def gen_ocpp_type(message, type, other_types, templates, params, ocpp_version_suffix) -> None: ''' Generate the code corresponding to an OCPP type @@ -584,26 +584,29 @@ def gen_ocpp_type(message, type, other_types, templates, params) -> None: @param params: Command line parameters @type params: Parameters + + @param ocpp_version_suffix: Suffix of the OCPP version + @type ocpp_version_suffix: string ''' # Generate header file - type_header_path = os.path.join(params.types_dir, type.name + ".h") + type_header_path = os.path.join(params.types_dir, type.name + ocpp_version_suffix + ".h") type_header = open(type_header_path, "wt") env = jinja2.Environment() template = env.from_string(templates["type_header"]) - rendered_template = template.render(message = message, type = type, ocpp_version_namespace = params.ocpp_version) + rendered_template = template.render(message = message, type = type, ocpp_version_namespace = params.ocpp_version, ocpp_version_suffix = ocpp_version_suffix) type_header.write(rendered_template) type_header.close() # Generate implementation file - type_impl_path = os.path.join(params.types_dir, type.name + ".cpp") + type_impl_path = os.path.join(params.types_dir, type.name + ocpp_version_suffix + ".cpp") type_impl = open(type_impl_path, "wt") env = jinja2.Environment() template = env.from_string(templates["type_impl"]) - rendered_template = template.render(message = message, type = type, other_types=other_types, ocpp_version_namespace = params.ocpp_version) + rendered_template = template.render(message = message, type = type, other_types=other_types, ocpp_version_namespace = params.ocpp_version, ocpp_version_suffix = ocpp_version_suffix) type_impl.write(rendered_template) type_impl.close() @@ -626,8 +629,7 @@ def gen_ocpp_message(message, templates, params) -> None: ocpp_version_suffix = params.ocpp_version[4:] msg = Message() - msg.name = f"{message}{ocpp_version_suffix}" - msg.raw_name = message + msg.name = f"{message}" # Parse input files request = json.load(open(os.path.join(params.input_dir, f"{ocpp_message}Request.json"))) @@ -637,7 +639,7 @@ def gen_ocpp_message(message, templates, params) -> None: msg.id = request["$id"] msg.comment = request["comment"] - msg.types = {f"{ocpp_message}{ocpp_version_suffix}Req": msg.request, f"{ocpp_message}{ocpp_version_suffix}Conf": msg.response} + msg.types = {f"{ocpp_message}Req": msg.request, f"{ocpp_message}Conf": msg.response} # Required types msg.requires = msg.request.requires @@ -653,9 +655,9 @@ def gen_ocpp_message(message, templates, params) -> None: associated_types[type.name] = type for associated_type in associated_types.values(): if associated_type.basic_type == "enum": - gen_ocpp_enum(msg, associated_type, templates, params) + gen_ocpp_enum(msg, associated_type, templates, params, ocpp_version_suffix) else: - gen_ocpp_type(msg, associated_type, associated_types, templates, params) + gen_ocpp_type(msg, associated_type, associated_types, templates, params, ocpp_version_suffix) # Generate message header file msg_header_path = os.path.join(params.messages_dir, ocpp_message + ocpp_version_suffix + ".h") @@ -756,6 +758,8 @@ def gen_chargepoint(templates, params, msg_list): gen_file.write(rendered_template) gen_file.close() + return + def gen_centralsystem(templates, params, msg_list): ''' @@ -834,6 +838,8 @@ def gen_centralsystem(templates, params, msg_list): gen_file.write(rendered_template) gen_file.close() + return + def gen_localcontroller(templates, params, msg_list): ''' @@ -953,6 +959,8 @@ def gen_localcontroller(templates, params, msg_list): gen_file.write(rendered_template) gen_file.close() + return + # Entry point @@ -984,14 +992,6 @@ def gen_localcontroller(templates, params, msg_list): msg_list_file_path = os.path.join(params.input_dir, "list.json") try: msg_list = json.load(open(msg_list_file_path, "rt")) - renamed_msgs = [] - for msg in msg_list["from_csms"]: - renamed_msgs.append(f"{msg}{ocpp_version_suffix}") - msg_list["from_csms"] = renamed_msgs - renamed_msgs = [] - for msg in msg_list["from_cs"]: - renamed_msgs.append(f"{msg}{ocpp_version_suffix}") - msg_list["from_cs"] = renamed_msgs except: print(f"Unable to load messages list file : {msg_list_file_path}") diff --git a/tools/json2cpp/templates/centralsystem/ChargePointHandler.h.j2 b/tools/json2cpp/templates/centralsystem/ChargePointHandler.h.j2 index 5349fc45..b31d5a2a 100644 --- a/tools/json2cpp/templates/centralsystem/ChargePointHandler.h.j2 +++ b/tools/json2cpp/templates/centralsystem/ChargePointHandler.h.j2 @@ -23,7 +23,7 @@ along with OpenOCPP. If not, see . #include "GenericMessageHandler.h" #include "MessagesConverter{{ocpp_version_suffix}}.h" {%- for msg_name in cs_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} namespace ocpp diff --git a/tools/json2cpp/templates/centralsystem/ICentralSystem.h.j2 b/tools/json2cpp/templates/centralsystem/ICentralSystem.h.j2 index da092a20..ef981579 100644 --- a/tools/json2cpp/templates/centralsystem/ICentralSystem.h.j2 +++ b/tools/json2cpp/templates/centralsystem/ICentralSystem.h.j2 @@ -26,7 +26,7 @@ along with OpenOCPP. If not, see . #include "IChargePointRequestHandler{{ocpp_version_suffix}}.h" {%- for msg_name in csms_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} #include diff --git a/tools/json2cpp/templates/centralsystem/IChargePointRequestHandler.h.j2 b/tools/json2cpp/templates/centralsystem/IChargePointRequestHandler.h.j2 index cdd03e3b..4f3cf165 100644 --- a/tools/json2cpp/templates/centralsystem/IChargePointRequestHandler.h.j2 +++ b/tools/json2cpp/templates/centralsystem/IChargePointRequestHandler.h.j2 @@ -22,7 +22,7 @@ along with OpenOCPP. If not, see . #define OPENOCPP_{{ocpp_version_namespace.upper()}}_ICHARGEPOINTREQUESTHANDLER{{ocpp_version_suffix}}_H {%- for msg_name in cs_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} #include diff --git a/tools/json2cpp/templates/chargepoint/IChargePoint.h.j2 b/tools/json2cpp/templates/chargepoint/IChargePoint.h.j2 index 325a3ed3..45d4c3ab 100644 --- a/tools/json2cpp/templates/chargepoint/IChargePoint.h.j2 +++ b/tools/json2cpp/templates/chargepoint/IChargePoint.h.j2 @@ -26,7 +26,7 @@ along with OpenOCPP. If not, see . #include "IChargePointEventsHandler{{ocpp_version_suffix}}.h" {%- for msg_name in cs_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} #include diff --git a/tools/json2cpp/templates/chargepoint/IChargePointEventsHandler.h.j2 b/tools/json2cpp/templates/chargepoint/IChargePointEventsHandler.h.j2 index b65f66d9..9f6dd3b4 100644 --- a/tools/json2cpp/templates/chargepoint/IChargePointEventsHandler.h.j2 +++ b/tools/json2cpp/templates/chargepoint/IChargePointEventsHandler.h.j2 @@ -23,7 +23,7 @@ along with OpenOCPP. If not, see . {%- for msg_name in csms_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} namespace ocpp diff --git a/tools/json2cpp/templates/localcontroller/CentralSystemHandler.h.j2 b/tools/json2cpp/templates/localcontroller/CentralSystemHandler.h.j2 index 44febfa4..cf739f7d 100644 --- a/tools/json2cpp/templates/localcontroller/CentralSystemHandler.h.j2 +++ b/tools/json2cpp/templates/localcontroller/CentralSystemHandler.h.j2 @@ -27,7 +27,7 @@ along with OpenOCPP. If not, see . #include "IRpc.h" {%- for msg_name in csms_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} namespace ocpp diff --git a/tools/json2cpp/templates/localcontroller/ChargePointHandler.h.j2 b/tools/json2cpp/templates/localcontroller/ChargePointHandler.h.j2 index 08080e52..99597a5f 100644 --- a/tools/json2cpp/templates/localcontroller/ChargePointHandler.h.j2 +++ b/tools/json2cpp/templates/localcontroller/ChargePointHandler.h.j2 @@ -27,7 +27,7 @@ along with OpenOCPP. If not, see . #include "IRpc.h" {%- for msg_name in cs_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} namespace ocpp diff --git a/tools/json2cpp/templates/localcontroller/ICentralSystemProxy.h.j2 b/tools/json2cpp/templates/localcontroller/ICentralSystemProxy.h.j2 index d9921511..b1198ad7 100644 --- a/tools/json2cpp/templates/localcontroller/ICentralSystemProxy.h.j2 +++ b/tools/json2cpp/templates/localcontroller/ICentralSystemProxy.h.j2 @@ -23,10 +23,10 @@ along with OpenOCPP. If not, see . #include "IWebsocketClient.h" {%- for msg_name in csms_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} {%- for msg_name in cs_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} #include diff --git a/tools/json2cpp/templates/localcontroller/IChargePointProxy.h.j2 b/tools/json2cpp/templates/localcontroller/IChargePointProxy.h.j2 index da60897e..26703279 100644 --- a/tools/json2cpp/templates/localcontroller/IChargePointProxy.h.j2 +++ b/tools/json2cpp/templates/localcontroller/IChargePointProxy.h.j2 @@ -27,7 +27,7 @@ along with OpenOCPP. If not, see . #include "RpcPool.h" {%- for msg_name in csms_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} #include diff --git a/tools/json2cpp/templates/messages/MessagesConverter.cpp.j2 b/tools/json2cpp/templates/messages/MessagesConverter.cpp.j2 index fc987b26..577fa3e7 100644 --- a/tools/json2cpp/templates/messages/MessagesConverter.cpp.j2 +++ b/tools/json2cpp/templates/messages/MessagesConverter.cpp.j2 @@ -19,21 +19,21 @@ along with OpenOCPP. If not, see . #include "MessagesConverter20.h" {%- for msg_name in csms_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} {%- for msg_name in cs_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} /** @brief Macro to register a message converter for an OCPP action */ #define REGISTER_CONVERTER(action) \ - registerRequestConverter(#action, *new action##{{ocpp_version_suffix}}ReqConverter()); \ - registerResponseConverter(#action, *new action##{{ocpp_version_suffix}}ConfConverter()) + registerRequestConverter(#action, *new action##ReqConverter()); \ + registerResponseConverter(#action, *new action##ConfConverter()) /** @brief Macro to delete a message converter for an OCPP action */ #define DELETE_CONVERTER(action) \ - deleteRequestConverter(#action); \ - deleteResponseConverter(#action) + deleteRequestConverter(#action); \ + deleteResponseConverter(#action) namespace ocpp { diff --git a/tools/json2cpp/templates/messages/MessagesValidator.cpp.j2 b/tools/json2cpp/templates/messages/MessagesValidator.cpp.j2 index 55ee7a1d..32415262 100644 --- a/tools/json2cpp/templates/messages/MessagesValidator.cpp.j2 +++ b/tools/json2cpp/templates/messages/MessagesValidator.cpp.j2 @@ -22,10 +22,10 @@ along with OpenOCPP. If not, see . #include "Logger.h" {%- for msg_name in csms_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} {%- for msg_name in cs_msgs %} -#include "{{msg_name}}.h" +#include "{{msg_name}}{{ocpp_version_suffix}}.h" {%- endfor %} namespace ocpp diff --git a/tools/json2cpp/templates/messages/msg_header.template.j2 b/tools/json2cpp/templates/messages/msg_header.template.j2 index ea098c0c..8f9d7c4f 100644 --- a/tools/json2cpp/templates/messages/msg_header.template.j2 +++ b/tools/json2cpp/templates/messages/msg_header.template.j2 @@ -21,12 +21,12 @@ along with OpenOCPP. If not, see . {{msg.comment}} */ -#ifndef OPENOCPP_{{msg.name.upper()}}_H -#define OPENOCPP_{{msg.name.upper()}}_H +#ifndef OPENOCPP_{{ocpp_version_namespace.upper()}}_{{msg.name.upper()}}_H +#define OPENOCPP_{{ocpp_version_namespace.upper()}}_{{msg.name.upper()}}_H #include "IMessageConverter.h" {% for dependency in msg.requires %} -#include "{{dependency}}.h" +#include "{{dependency}}{{ocpp_version_suffix}}.h" {%- endfor %} namespace ocpp @@ -37,7 +37,7 @@ namespace {{ocpp_version_namespace}} { /** @brief Action corresponding to the {{msg.name}} messages */ -static const std::string {{msg.name.upper()}}_ACTION = "{{msg.raw_name}}"; +static const std::string {{msg.name.upper()}}_ACTION = "{{msg.name}}"; {%- for msg_name in msg.types %} {%- set type = msg.types[msg_name] %} @@ -60,4 +60,4 @@ MESSAGE_CONVERTERS({{msg.name}}) } // namespace messages } // namespace ocpp -#endif // OPENOCPP_{{msg.name.upper()}}_H +#endif // OPENOCPP_{{ocpp_version_namespace.upper()}}_{{msg.name.upper()}}_H diff --git a/tools/json2cpp/templates/messages/msg_impl.template.j2 b/tools/json2cpp/templates/messages/msg_impl.template.j2 index b4f25e5f..4221f908 100644 --- a/tools/json2cpp/templates/messages/msg_impl.template.j2 +++ b/tools/json2cpp/templates/messages/msg_impl.template.j2 @@ -21,7 +21,7 @@ along with OpenOCPP. If not, see . {{msg.comment}} */ -#include "{{msg.name}}.h" +#include "{{msg.name}}{{ocpp_version_suffix}}.h" #include "IRpc.h" diff --git a/tools/json2cpp/templates/types/enum_header.template.j2 b/tools/json2cpp/templates/types/enum_header.template.j2 index 541e7ae0..a26dc5f8 100644 --- a/tools/json2cpp/templates/types/enum_header.template.j2 +++ b/tools/json2cpp/templates/types/enum_header.template.j2 @@ -21,8 +21,8 @@ along with OpenOCPP. If not, see . {{message.comment}} */ -#ifndef OPENOCPP_{{enum.name.upper()}}_H -#define OPENOCPP_{{enum.name.upper()}}_H +#ifndef OPENOCPP_{{ocpp_version_namespace.upper()}}_{{enum.name.upper()}}_H +#define OPENOCPP_{{ocpp_version_namespace.upper()}}_{{enum.name.upper()}}_H #include "EnumToStringFromString.h" @@ -48,4 +48,4 @@ extern const EnumToStringFromString<{{enum.name}}> {{enum.name}}Helper; } // namespace types } // namespace ocpp -#endif // OPENOCPP_{{enum.name.upper()}}_H +#endif // OPENOCPP_{{ocpp_version_namespace.upper()}}_{{enum.name.upper()}}_H diff --git a/tools/json2cpp/templates/types/enum_impl.template.j2 b/tools/json2cpp/templates/types/enum_impl.template.j2 index 08a8bf2d..43e61fc7 100644 --- a/tools/json2cpp/templates/types/enum_impl.template.j2 +++ b/tools/json2cpp/templates/types/enum_impl.template.j2 @@ -21,7 +21,7 @@ along with OpenOCPP. If not, see . {{message.comment}} */ -#include "{{enum.name}}.h" +#include "{{enum.name}}{{ocpp_version_suffix}}.h" namespace ocpp { diff --git a/tools/json2cpp/templates/types/type_header.template.j2 b/tools/json2cpp/templates/types/type_header.template.j2 index 24c99256..89211e48 100644 --- a/tools/json2cpp/templates/types/type_header.template.j2 +++ b/tools/json2cpp/templates/types/type_header.template.j2 @@ -21,10 +21,11 @@ along with OpenOCPP. If not, see . {{message.comment}} */ -#ifndef OPENOCPP_{{type.name.upper()}}_H -#define OPENOCPP_{{type.name.upper()}}_H +#ifndef OPENOCPP_{{ocpp_version_namespace.upper()}}_{{type.name.upper()}}_H +#define OPENOCPP_{{ocpp_version_namespace.upper()}}_{{type.name.upper()}}_H + {%for dependency in type.requires %} -#include "{{dependency}}.h" +#include "{{dependency}}{{ocpp_version_suffix}}.h" {%- endfor %} {%for dependency in type.cpp_dependencies() %} #include {{dependency}} @@ -68,4 +69,4 @@ class {{type.name}}Converter : public ocpp::messages::IMessageConverter<{{type.n } // namespace types } // namespace ocpp -#endif // OPENOCPP_{{type.name.upper()}}_H +#endif // OPENOCPP_{{ocpp_version_namespace.upper()}}_{{type.name.upper()}}_H diff --git a/tools/json2cpp/templates/types/type_impl.template.j2 b/tools/json2cpp/templates/types/type_impl.template.j2 index 976be979..3abc758b 100644 --- a/tools/json2cpp/templates/types/type_impl.template.j2 +++ b/tools/json2cpp/templates/types/type_impl.template.j2 @@ -21,7 +21,7 @@ along with OpenOCPP. If not, see . {{message.comment}} */ -#include "{{type.name}}.h" +#include "{{type.name}}{{ocpp_version_suffix}}.h" #include "IRpc.h"