3#ifndef OCPP_V16_TYPES_HPP
4#define OCPP_V16_TYPES_HPP
9#include <nlohmann/json_fwd.hpp>
11#include <everest/logging.hpp>
13#include <ocpp/common/types.hpp>
14#include <ocpp/v16/ocpp_enums.hpp>
16using json = nlohmann::json;
22enum class MessageType {
26 BootNotificationResponse,
28 CancelReservationResponse,
30 CertificateSignedResponse,
32 ChangeAvailabilityResponse,
34 ChangeConfigurationResponse,
38 ClearChargingProfileResponse,
42 DeleteCertificateResponse,
43 DiagnosticsStatusNotification,
44 DiagnosticsStatusNotificationResponse,
45 ExtendedTriggerMessage,
46 ExtendedTriggerMessageResponse,
47 FirmwareStatusNotification,
48 FirmwareStatusNotificationResponse,
50 GetCompositeScheduleResponse,
52 GetConfigurationResponse,
54 GetDiagnosticsResponse,
55 GetInstalledCertificateIds,
56 GetInstalledCertificateIdsResponse,
58 GetLocalListVersionResponse,
64 InstallCertificateResponse,
65 LogStatusNotification,
66 LogStatusNotificationResponse,
69 RemoteStartTransaction,
70 RemoteStartTransactionResponse,
71 RemoteStopTransaction,
72 RemoteStopTransactionResponse,
77 SecurityEventNotification,
78 SecurityEventNotificationResponse,
80 SendLocalListResponse,
82 SetChargingProfileResponse,
84 SignCertificateResponse,
85 SignedFirmwareStatusNotification,
86 SignedFirmwareStatusNotificationResponse,
88 SignedUpdateFirmwareResponse,
90 StartTransactionResponse,
92 StatusNotificationResponse,
94 StopTransactionResponse,
96 TriggerMessageResponse,
98 UnlockConnectorResponse,
100 UpdateFirmwareResponse,
104namespace conversions {
107std::string messagetype_to_string(MessageType m);
111MessageType string_to_messagetype(
const std::string& s);
116std::ostream& operator<<(std::ostream& os,
const MessageType& message_type);
119enum SupportedFeatureProfiles {
124 LocalAuthListManagement,
132namespace conversions {
135std::string supported_feature_profiles_to_string(SupportedFeatureProfiles e);
139SupportedFeatureProfiles string_to_supported_feature_profiles(
const std::string& s);
144std::ostream& operator<<(std::ostream& os,
const SupportedFeatureProfiles& supported_feature_profiles);
147enum ChargePointConnectionState {
154namespace conversions {
157std::string charge_point_connection_state_to_string(ChargePointConnectionState e);
161ChargePointConnectionState string_to_charge_point_connection_state(
const std::string& s);
166std::ostream& operator<<(std::ostream& os,
const ChargePointConnectionState& charge_point_connection_state);
186 AvailabilityType availability;
207 std::optional<int32_t> numberPhases;
209 bool periodTransformed =
false;
221 ChargingRateUnit chargingRateUnit;
222 std::vector<EnhancedChargingSchedulePeriod> chargingSchedulePeriod;
223 std::optional<int32_t> duration;
224 std::optional<ocpp::DateTime> startSchedule;
225 std::optional<float> minChargingRate;
Combines AvailabilityType with persist flag for scheduled Availability changes.
Definition: types.hpp:185
Enhances ChargingSchedulePeriod with stackLevel.
Definition: types.hpp:204
Enhances ChargingSchedule by containing std::vector<EnhancedChargingSchedulePeriods> instead of std::...
Definition: types.hpp:220
Combines a Measurand with an optional Phase.
Definition: types.hpp:169
Measurand measurand
A OCPP Measurand.
Definition: types.hpp:170
bool operator==(MeasurandWithPhase measurand_with_phase)
Comparison operator== between this MeasurandWithPhase and the given measurand_with_phase.
Definition: types.cpp:553
std::optional< Phase > phase
If applicable and available a Phase.
Definition: types.hpp:171
Combines a Measurand with a list of Phases.
Definition: types.hpp:179
Measurand measurand
A OCPP Measurand.
Definition: types.hpp:180
std::vector< Phase > phases
A list of Phases.
Definition: types.hpp:181