ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
ocpp_types.hpp
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2020 - 2024 Pionix GmbH and Contributors to EVerest
3// This code is generated using the generator in 'src/code_generator/common`, please do not edit manually
4
5#ifndef OCPP_V2_OCPP_TYPES_HPP
6#define OCPP_V2_OCPP_TYPES_HPP
7
8#include <string>
9
10#include <nlohmann/json_fwd.hpp>
11#include <optional>
12
13#include <ocpp/common/types.hpp>
14#include <ocpp/v2/ocpp_enums.hpp>
15
16namespace ocpp {
17namespace v2 {
18
19using CustomData = nlohmann::json;
20
22 CiString<36> additionalIdToken;
23 CiString<50> type;
24 std::optional<CustomData> customData;
25};
27void to_json(json& j, const AdditionalInfo& k);
28
30void from_json(const json& j, AdditionalInfo& k);
31
32// \brief Writes the string representation of the given AdditionalInfo \p k to the given output stream \p os
34std::ostream& operator<<(std::ostream& os, const AdditionalInfo& k);
35
36struct IdToken {
37 CiString<36> idToken;
38 IdTokenEnum type;
39 std::optional<CustomData> customData;
40 std::optional<std::vector<AdditionalInfo>> additionalInfo;
41};
43void to_json(json& j, const IdToken& k);
44
46void from_json(const json& j, IdToken& k);
47
48// \brief Writes the string representation of the given IdToken \p k to the given output stream \p os
50std::ostream& operator<<(std::ostream& os, const IdToken& k);
51
53 HashAlgorithmEnum hashAlgorithm;
54 CiString<128> issuerNameHash;
55 CiString<128> issuerKeyHash;
56 CiString<40> serialNumber;
57 CiString<512> responderURL;
58 std::optional<CustomData> customData;
59};
61void to_json(json& j, const OCSPRequestData& k);
62
64void from_json(const json& j, OCSPRequestData& k);
65
66// \brief Writes the string representation of the given OCSPRequestData \p k to the given output stream \p os
68std::ostream& operator<<(std::ostream& os, const OCSPRequestData& k);
69
71 MessageFormatEnum format;
72 CiString<512> content;
73 std::optional<CustomData> customData;
74 std::optional<CiString<8>> language;
75};
77void to_json(json& j, const MessageContent& k);
78
80void from_json(const json& j, MessageContent& k);
81
82// \brief Writes the string representation of the given MessageContent \p k to the given output stream \p os
84std::ostream& operator<<(std::ostream& os, const MessageContent& k);
85
87 AuthorizationStatusEnum status;
88 std::optional<CustomData> customData;
89 std::optional<ocpp::DateTime> cacheExpiryDateTime;
90 std::optional<int32_t> chargingPriority;
91 std::optional<CiString<8>> language1;
92 std::optional<std::vector<int32_t>> evseId;
93 std::optional<IdToken> groupIdToken;
94 std::optional<CiString<8>> language2;
95 std::optional<MessageContent> personalMessage;
96};
98void to_json(json& j, const IdTokenInfo& k);
99
101void from_json(const json& j, IdTokenInfo& k);
102
103// \brief Writes the string representation of the given IdTokenInfo \p k to the given output stream \p os
105std::ostream& operator<<(std::ostream& os, const IdTokenInfo& k);
106
107struct Modem {
108 std::optional<CustomData> customData;
109 std::optional<CiString<20>> iccid;
110 std::optional<CiString<20>> imsi;
111};
113void to_json(json& j, const Modem& k);
114
116void from_json(const json& j, Modem& k);
117
118// \brief Writes the string representation of the given Modem \p k to the given output stream \p os
120std::ostream& operator<<(std::ostream& os, const Modem& k);
121
123 CiString<20> model;
124 CiString<50> vendorName;
125 std::optional<CustomData> customData;
126 std::optional<CiString<25>> serialNumber;
127 std::optional<Modem> modem;
128 std::optional<CiString<50>> firmwareVersion;
129};
131void to_json(json& j, const ChargingStation& k);
132
134void from_json(const json& j, ChargingStation& k);
135
136// \brief Writes the string representation of the given ChargingStation \p k to the given output stream \p os
138std::ostream& operator<<(std::ostream& os, const ChargingStation& k);
139
141 CiString<20> reasonCode;
142 std::optional<CustomData> customData;
143 std::optional<CiString<512>> additionalInfo;
144};
146void to_json(json& j, const StatusInfo& k);
147
149void from_json(const json& j, StatusInfo& k);
150
151// \brief Writes the string representation of the given StatusInfo \p k to the given output stream \p os
153std::ostream& operator<<(std::ostream& os, const StatusInfo& k);
154
155struct EVSE {
156 int32_t id;
157 std::optional<CustomData> customData;
158 std::optional<int32_t> connectorId;
159};
161void to_json(json& j, const EVSE& k);
162
164void from_json(const json& j, EVSE& k);
165
166// \brief Writes the string representation of the given EVSE \p k to the given output stream \p os
168std::ostream& operator<<(std::ostream& os, const EVSE& k);
169
171 std::optional<CustomData> customData;
172 std::optional<int32_t> evseId;
173 std::optional<ChargingProfilePurposeEnum> chargingProfilePurpose;
174 std::optional<int32_t> stackLevel;
175};
177void to_json(json& j, const ClearChargingProfile& k);
178
180void from_json(const json& j, ClearChargingProfile& k);
181
182// \brief Writes the string representation of the given ClearChargingProfile \p k to the given output stream \p os
184std::ostream& operator<<(std::ostream& os, const ClearChargingProfile& k);
185
187 ClearMonitoringStatusEnum status;
188 int32_t id;
189 std::optional<CustomData> customData;
190 std::optional<StatusInfo> statusInfo;
191};
193void to_json(json& j, const ClearMonitoringResult& k);
194
196void from_json(const json& j, ClearMonitoringResult& k);
197
198// \brief Writes the string representation of the given ClearMonitoringResult \p k to the given output stream \p os
200std::ostream& operator<<(std::ostream& os, const ClearMonitoringResult& k);
201
203 HashAlgorithmEnum hashAlgorithm;
204 CiString<128> issuerNameHash;
205 CiString<128> issuerKeyHash;
206 CiString<40> serialNumber;
207 std::optional<CustomData> customData;
208};
210void to_json(json& j, const CertificateHashDataType& k);
211
213void from_json(const json& j, CertificateHashDataType& k);
214
215// \brief Writes the string representation of the given CertificateHashDataType \p k to the given output stream \p os
217std::ostream& operator<<(std::ostream& os, const CertificateHashDataType& k);
218
220 std::optional<CustomData> customData;
221 std::optional<ChargingProfilePurposeEnum> chargingProfilePurpose;
222 std::optional<int32_t> stackLevel;
223 std::optional<std::vector<int32_t>> chargingProfileId;
224 std::optional<std::vector<ChargingLimitSourceEnum>> chargingLimitSource;
225};
227void to_json(json& j, const ChargingProfileCriterion& k);
228
230void from_json(const json& j, ChargingProfileCriterion& k);
231
232// \brief Writes the string representation of the given ChargingProfileCriterion \p k to the given output stream \p os
234std::ostream& operator<<(std::ostream& os, const ChargingProfileCriterion& k);
235
237 int32_t startPeriod;
238 float limit;
239 std::optional<CustomData> customData;
240 std::optional<int32_t> numberPhases;
241 std::optional<int32_t> phaseToUse;
242};
244void to_json(json& j, const ChargingSchedulePeriod& k);
245
247void from_json(const json& j, ChargingSchedulePeriod& k);
248
249// \brief Writes the string representation of the given ChargingSchedulePeriod \p k to the given output stream \p os
251std::ostream& operator<<(std::ostream& os, const ChargingSchedulePeriod& k);
252
254 std::vector<ChargingSchedulePeriod> chargingSchedulePeriod;
255 int32_t evseId;
256 int32_t duration;
257 ocpp::DateTime scheduleStart;
258 ChargingRateUnitEnum chargingRateUnit;
259 std::optional<CustomData> customData;
260};
262void to_json(json& j, const CompositeSchedule& k);
263
265void from_json(const json& j, CompositeSchedule& k);
266
267// \brief Writes the string representation of the given CompositeSchedule \p k to the given output stream \p os
269std::ostream& operator<<(std::ostream& os, const CompositeSchedule& k);
270
272 CertificateHashDataType certificateHashData;
273 GetCertificateIdUseEnum certificateType;
274 std::optional<CustomData> customData;
275 std::optional<std::vector<CertificateHashDataType>> childCertificateHashData;
276};
278void to_json(json& j, const CertificateHashDataChain& k);
279
281void from_json(const json& j, CertificateHashDataChain& k);
282
283// \brief Writes the string representation of the given CertificateHashDataChain \p k to the given output stream \p os
285std::ostream& operator<<(std::ostream& os, const CertificateHashDataChain& k);
286
288 CiString<512> remoteLocation;
289 std::optional<CustomData> customData;
290 std::optional<ocpp::DateTime> oldestTimestamp;
291 std::optional<ocpp::DateTime> latestTimestamp;
292};
294void to_json(json& j, const LogParameters& k);
295
297void from_json(const json& j, LogParameters& k);
298
299// \brief Writes the string representation of the given LogParameters \p k to the given output stream \p os
301std::ostream& operator<<(std::ostream& os, const LogParameters& k);
302
303struct Component {
304 CiString<50> name;
305 std::optional<CustomData> customData;
306 std::optional<EVSE> evse;
307 std::optional<CiString<50>> instance;
308};
310void to_json(json& j, const Component& k);
311
313void from_json(const json& j, Component& k);
314
315// \brief Writes the string representation of the given Component \p k to the given output stream \p os
317std::ostream& operator<<(std::ostream& os, const Component& k);
318
319struct Variable {
320 CiString<50> name;
321 std::optional<CustomData> customData;
322 std::optional<CiString<50>> instance;
323};
325void to_json(json& j, const Variable& k);
326
328void from_json(const json& j, Variable& k);
329
330// \brief Writes the string representation of the given Variable \p k to the given output stream \p os
332std::ostream& operator<<(std::ostream& os, const Variable& k);
333
335 Component component;
336 std::optional<CustomData> customData;
337 std::optional<Variable> variable;
338};
340void to_json(json& j, const ComponentVariable& k);
341
343void from_json(const json& j, ComponentVariable& k);
344
345// \brief Writes the string representation of the given ComponentVariable \p k to the given output stream \p os
347std::ostream& operator<<(std::ostream& os, const ComponentVariable& k);
348
350 Component component;
351 Variable variable;
352 std::optional<CustomData> customData;
353 std::optional<AttributeEnum> attributeType;
354};
356void to_json(json& j, const GetVariableData& k);
357
359void from_json(const json& j, GetVariableData& k);
360
361// \brief Writes the string representation of the given GetVariableData \p k to the given output stream \p os
363std::ostream& operator<<(std::ostream& os, const GetVariableData& k);
364
366 GetVariableStatusEnum attributeStatus;
367 Component component;
368 Variable variable;
369 std::optional<CustomData> customData;
370 std::optional<StatusInfo> attributeStatusInfo;
371 std::optional<AttributeEnum> attributeType;
372 std::optional<CiString<2500>> attributeValue;
373};
375void to_json(json& j, const GetVariableResult& k);
376
378void from_json(const json& j, GetVariableResult& k);
379
380// \brief Writes the string representation of the given GetVariableResult \p k to the given output stream \p os
382std::ostream& operator<<(std::ostream& os, const GetVariableResult& k);
383
385 CiString<2500> signedMeterData;
386 CiString<50> signingMethod;
387 CiString<50> encodingMethod;
388 CiString<2500> publicKey;
389 std::optional<CustomData> customData;
390};
392void to_json(json& j, const SignedMeterValue& k);
393
395void from_json(const json& j, SignedMeterValue& k);
396
397// \brief Writes the string representation of the given SignedMeterValue \p k to the given output stream \p os
399std::ostream& operator<<(std::ostream& os, const SignedMeterValue& k);
400
402 std::optional<CustomData> customData;
403 std::optional<CiString<20>> unit;
404 std::optional<int32_t> multiplier;
405};
407void to_json(json& j, const UnitOfMeasure& k);
408
410void from_json(const json& j, UnitOfMeasure& k);
411
412// \brief Writes the string representation of the given UnitOfMeasure \p k to the given output stream \p os
414std::ostream& operator<<(std::ostream& os, const UnitOfMeasure& k);
415
417 float value;
418 std::optional<CustomData> customData;
419 std::optional<ReadingContextEnum> context;
420 std::optional<MeasurandEnum> measurand;
421 std::optional<PhaseEnum> phase;
422 std::optional<LocationEnum> location;
423 std::optional<SignedMeterValue> signedMeterValue;
424 std::optional<UnitOfMeasure> unitOfMeasure;
425};
427void to_json(json& j, const SampledValue& k);
428
430void from_json(const json& j, SampledValue& k);
431
432// \brief Writes the string representation of the given SampledValue \p k to the given output stream \p os
434std::ostream& operator<<(std::ostream& os, const SampledValue& k);
435
437 std::vector<SampledValue> sampledValue;
438 ocpp::DateTime timestamp;
439 std::optional<CustomData> customData;
440};
442void to_json(json& j, const MeterValue& k);
443
445void from_json(const json& j, MeterValue& k);
446
447// \brief Writes the string representation of the given MeterValue \p k to the given output stream \p os
449std::ostream& operator<<(std::ostream& os, const MeterValue& k);
450
452 int32_t start;
453 std::optional<CustomData> customData;
454 std::optional<int32_t> duration;
455};
457void to_json(json& j, const RelativeTimeInterval& k);
458
460void from_json(const json& j, RelativeTimeInterval& k);
461
462// \brief Writes the string representation of the given RelativeTimeInterval \p k to the given output stream \p os
464std::ostream& operator<<(std::ostream& os, const RelativeTimeInterval& k);
465
466struct Cost {
467 CostKindEnum costKind;
468 int32_t amount;
469 std::optional<CustomData> customData;
470 std::optional<int32_t> amountMultiplier;
471};
473void to_json(json& j, const Cost& k);
474
476void from_json(const json& j, Cost& k);
477
478// \brief Writes the string representation of the given Cost \p k to the given output stream \p os
480std::ostream& operator<<(std::ostream& os, const Cost& k);
481
483 float startValue;
484 std::vector<Cost> cost;
485 std::optional<CustomData> customData;
486};
488void to_json(json& j, const ConsumptionCost& k);
489
491void from_json(const json& j, ConsumptionCost& k);
492
493// \brief Writes the string representation of the given ConsumptionCost \p k to the given output stream \p os
495std::ostream& operator<<(std::ostream& os, const ConsumptionCost& k);
496
498 RelativeTimeInterval relativeTimeInterval;
499 std::optional<CustomData> customData;
500 std::optional<int32_t> ePriceLevel;
501 std::optional<std::vector<ConsumptionCost>> consumptionCost;
502};
504void to_json(json& j, const SalesTariffEntry& k);
505
507void from_json(const json& j, SalesTariffEntry& k);
508
509// \brief Writes the string representation of the given SalesTariffEntry \p k to the given output stream \p os
511std::ostream& operator<<(std::ostream& os, const SalesTariffEntry& k);
512
514 int32_t id;
515 std::vector<SalesTariffEntry> salesTariffEntry;
516 std::optional<CustomData> customData;
517 std::optional<CiString<32>> salesTariffDescription;
518 std::optional<int32_t> numEPriceLevels;
519};
521void to_json(json& j, const SalesTariff& k);
522
524void from_json(const json& j, SalesTariff& k);
525
526// \brief Writes the string representation of the given SalesTariff \p k to the given output stream \p os
528std::ostream& operator<<(std::ostream& os, const SalesTariff& k);
529
531 int32_t id;
532 ChargingRateUnitEnum chargingRateUnit;
533 std::vector<ChargingSchedulePeriod> chargingSchedulePeriod;
534 std::optional<CustomData> customData;
535 std::optional<ocpp::DateTime> startSchedule;
536 std::optional<int32_t> duration;
537 std::optional<float> minChargingRate;
538 std::optional<SalesTariff> salesTariff;
539};
541void to_json(json& j, const ChargingSchedule& k);
542
544void from_json(const json& j, ChargingSchedule& k);
545
546// \brief Writes the string representation of the given ChargingSchedule \p k to the given output stream \p os
548std::ostream& operator<<(std::ostream& os, const ChargingSchedule& k);
549
551 ChargingLimitSourceEnum chargingLimitSource;
552 std::optional<CustomData> customData;
553 std::optional<bool> isGridCritical;
554};
556void to_json(json& j, const ChargingLimit& k);
557
559void from_json(const json& j, ChargingLimit& k);
560
561// \brief Writes the string representation of the given ChargingLimit \p k to the given output stream \p os
563std::ostream& operator<<(std::ostream& os, const ChargingLimit& k);
564
566 int32_t id;
567 MessagePriorityEnum priority;
568 MessageContent message;
569 std::optional<CustomData> customData;
570 std::optional<Component> display;
571 std::optional<MessageStateEnum> state;
572 std::optional<ocpp::DateTime> startDateTime;
573 std::optional<ocpp::DateTime> endDateTime;
574 std::optional<CiString<36>> transactionId;
575};
577void to_json(json& j, const MessageInfo& k);
578
580void from_json(const json& j, MessageInfo& k);
581
582// \brief Writes the string representation of the given MessageInfo \p k to the given output stream \p os
584std::ostream& operator<<(std::ostream& os, const MessageInfo& k);
585
587 int32_t energyAmount;
588 int32_t evMinCurrent;
589 int32_t evMaxCurrent;
590 int32_t evMaxVoltage;
591 std::optional<CustomData> customData;
592};
594void to_json(json& j, const ACChargingParameters& k);
595
597void from_json(const json& j, ACChargingParameters& k);
598
599// \brief Writes the string representation of the given ACChargingParameters \p k to the given output stream \p os
601std::ostream& operator<<(std::ostream& os, const ACChargingParameters& k);
602
604 int32_t evMaxCurrent;
605 int32_t evMaxVoltage;
606 std::optional<CustomData> customData;
607 std::optional<int32_t> energyAmount;
608 std::optional<int32_t> evMaxPower;
609 std::optional<int32_t> stateOfCharge;
610 std::optional<int32_t> evEnergyCapacity;
611 std::optional<int32_t> fullSoC;
612 std::optional<int32_t> bulkSoC;
613};
615void to_json(json& j, const DCChargingParameters& k);
616
618void from_json(const json& j, DCChargingParameters& k);
619
620// \brief Writes the string representation of the given DCChargingParameters \p k to the given output stream \p os
622std::ostream& operator<<(std::ostream& os, const DCChargingParameters& k);
623
625 EnergyTransferModeEnum requestedEnergyTransfer;
626 std::optional<CustomData> customData;
627 std::optional<ACChargingParameters> acChargingParameters;
628 std::optional<DCChargingParameters> dcChargingParameters;
629 std::optional<ocpp::DateTime> departureTime;
630};
632void to_json(json& j, const ChargingNeeds& k);
633
635void from_json(const json& j, ChargingNeeds& k);
636
637// \brief Writes the string representation of the given ChargingNeeds \p k to the given output stream \p os
639std::ostream& operator<<(std::ostream& os, const ChargingNeeds& k);
640
641struct EventData {
642 int32_t eventId;
643 ocpp::DateTime timestamp;
644 EventTriggerEnum trigger;
645 CiString<2500> actualValue;
646 Component component;
647 EventNotificationEnum eventNotificationType;
648 Variable variable;
649 std::optional<CustomData> customData;
650 std::optional<int32_t> cause;
651 std::optional<CiString<50>> techCode;
652 std::optional<CiString<500>> techInfo;
653 std::optional<bool> cleared;
654 std::optional<CiString<36>> transactionId;
655 std::optional<int32_t> variableMonitoringId;
656};
658void to_json(json& j, const EventData& k);
659
661void from_json(const json& j, EventData& k);
662
663// \brief Writes the string representation of the given EventData \p k to the given output stream \p os
665std::ostream& operator<<(std::ostream& os, const EventData& k);
666
668 int32_t id;
669 bool transaction;
670 float value;
671 MonitorEnum type;
672 int32_t severity;
673 std::optional<CustomData> customData;
674};
676void to_json(json& j, const VariableMonitoring& k);
677
679void from_json(const json& j, VariableMonitoring& k);
680
681// \brief Writes the string representation of the given VariableMonitoring \p k to the given output stream \p os
683std::ostream& operator<<(std::ostream& os, const VariableMonitoring& k);
684
686 Component component;
687 Variable variable;
688 std::vector<VariableMonitoring> variableMonitoring;
689 std::optional<CustomData> customData;
690};
692void to_json(json& j, const MonitoringData& k);
693
695void from_json(const json& j, MonitoringData& k);
696
697// \brief Writes the string representation of the given MonitoringData \p k to the given output stream \p os
699std::ostream& operator<<(std::ostream& os, const MonitoringData& k);
700
702 std::optional<CustomData> customData;
703 std::optional<AttributeEnum> type;
704 std::optional<CiString<2500>> value;
705 std::optional<MutabilityEnum> mutability;
706 std::optional<bool> persistent;
707 std::optional<bool> constant;
708};
710void to_json(json& j, const VariableAttribute& k);
711
713void from_json(const json& j, VariableAttribute& k);
714
715// \brief Writes the string representation of the given VariableAttribute \p k to the given output stream \p os
717std::ostream& operator<<(std::ostream& os, const VariableAttribute& k);
718
720 DataEnum dataType;
721 bool supportsMonitoring;
722 std::optional<CustomData> customData;
723 std::optional<CiString<16>> unit;
724 std::optional<float> minLimit;
725 std::optional<float> maxLimit;
726 std::optional<CiString<1000>> valuesList;
727};
729void to_json(json& j, const VariableCharacteristics& k);
730
732void from_json(const json& j, VariableCharacteristics& k);
733
734// \brief Writes the string representation of the given VariableCharacteristics \p k to the given output stream \p os
736std::ostream& operator<<(std::ostream& os, const VariableCharacteristics& k);
737
739 Component component;
740 Variable variable;
741 std::vector<VariableAttribute> variableAttribute;
742 std::optional<CustomData> customData;
743 std::optional<VariableCharacteristics> variableCharacteristics;
744};
746void to_json(json& j, const ReportData& k);
747
749void from_json(const json& j, ReportData& k);
750
751// \brief Writes the string representation of the given ReportData \p k to the given output stream \p os
753std::ostream& operator<<(std::ostream& os, const ReportData& k);
754
756 int32_t id;
757 int32_t stackLevel;
758 ChargingProfilePurposeEnum chargingProfilePurpose;
759 ChargingProfileKindEnum chargingProfileKind;
760 std::vector<ChargingSchedule> chargingSchedule;
761 std::optional<CustomData> customData;
762 std::optional<RecurrencyKindEnum> recurrencyKind;
763 std::optional<ocpp::DateTime> validFrom;
764 std::optional<ocpp::DateTime> validTo;
765 std::optional<CiString<36>> transactionId;
766};
768void to_json(json& j, const ChargingProfile& k);
769
771void from_json(const json& j, ChargingProfile& k);
772
773// \brief Writes the string representation of the given ChargingProfile \p k to the given output stream \p os
775std::ostream& operator<<(std::ostream& os, const ChargingProfile& k);
776
778 IdToken idToken;
779 std::optional<CustomData> customData;
780 std::optional<IdTokenInfo> idTokenInfo;
781};
783void to_json(json& j, const AuthorizationData& k);
784
786void from_json(const json& j, AuthorizationData& k);
787
788// \brief Writes the string representation of the given AuthorizationData \p k to the given output stream \p os
790std::ostream& operator<<(std::ostream& os, const AuthorizationData& k);
791
792struct APN {
793 CiString<512> apn;
794 APNAuthenticationEnum apnAuthentication;
795 std::optional<CustomData> customData;
796 std::optional<CiString<20>> apnUserName;
797 std::optional<CiString<20>> apnPassword;
798 std::optional<int32_t> simPin;
799 std::optional<CiString<6>> preferredNetwork;
800 std::optional<bool> useOnlyPreferredNetwork;
801};
803void to_json(json& j, const APN& k);
804
806void from_json(const json& j, APN& k);
807
808// \brief Writes the string representation of the given APN \p k to the given output stream \p os
810std::ostream& operator<<(std::ostream& os, const APN& k);
811
812struct VPN {
813 CiString<512> server;
814 CiString<20> user;
815 CiString<20> password;
816 CiString<255> key;
817 VPNEnum type;
818 std::optional<CustomData> customData;
819 std::optional<CiString<20>> group;
820};
822void to_json(json& j, const VPN& k);
823
825void from_json(const json& j, VPN& k);
826
827// \brief Writes the string representation of the given VPN \p k to the given output stream \p os
829std::ostream& operator<<(std::ostream& os, const VPN& k);
830
832 OCPPVersionEnum ocppVersion;
833 OCPPTransportEnum ocppTransport;
834 CiString<512> ocppCsmsUrl;
835 int32_t messageTimeout;
836 int32_t securityProfile;
837 OCPPInterfaceEnum ocppInterface;
838 std::optional<CustomData> customData;
839 std::optional<APN> apn;
840 std::optional<VPN> vpn;
841};
843void to_json(json& j, const NetworkConnectionProfile& k);
844
846void from_json(const json& j, NetworkConnectionProfile& k);
847
848// \brief Writes the string representation of the given NetworkConnectionProfile \p k to the given output stream \p os
850std::ostream& operator<<(std::ostream& os, const NetworkConnectionProfile& k);
851
853 float value;
854 MonitorEnum type;
855 int32_t severity;
856 Component component;
857 Variable variable;
858 std::optional<CustomData> customData;
859 std::optional<int32_t> id;
860 std::optional<bool> transaction;
861};
863void to_json(json& j, const SetMonitoringData& k);
864
866void from_json(const json& j, SetMonitoringData& k);
867
868// \brief Writes the string representation of the given SetMonitoringData \p k to the given output stream \p os
870std::ostream& operator<<(std::ostream& os, const SetMonitoringData& k);
871
873 SetMonitoringStatusEnum status;
874 MonitorEnum type;
875 Component component;
876 Variable variable;
877 int32_t severity;
878 std::optional<CustomData> customData;
879 std::optional<int32_t> id;
880 std::optional<StatusInfo> statusInfo;
881};
883void to_json(json& j, const SetMonitoringResult& k);
884
886void from_json(const json& j, SetMonitoringResult& k);
887
888// \brief Writes the string representation of the given SetMonitoringResult \p k to the given output stream \p os
890std::ostream& operator<<(std::ostream& os, const SetMonitoringResult& k);
891
894 std::optional<std::string> interface_address;
895 bool success;
896};
897
899 CiString<1000> attributeValue;
900 Component component;
901 Variable variable;
902 std::optional<CustomData> customData;
903 std::optional<AttributeEnum> attributeType;
904};
906void to_json(json& j, const SetVariableData& k);
907
909void from_json(const json& j, SetVariableData& k);
910
911// \brief Writes the string representation of the given SetVariableData \p k to the given output stream \p os
913std::ostream& operator<<(std::ostream& os, const SetVariableData& k);
914
916 SetVariableStatusEnum attributeStatus;
917 Component component;
918 Variable variable;
919 std::optional<CustomData> customData;
920 std::optional<AttributeEnum> attributeType;
921 std::optional<StatusInfo> attributeStatusInfo;
922};
924void to_json(json& j, const SetVariableResult& k);
925
927void from_json(const json& j, SetVariableResult& k);
928
929// \brief Writes the string representation of the given SetVariableResult \p k to the given output stream \p os
931std::ostream& operator<<(std::ostream& os, const SetVariableResult& k);
932
934 CiString<36> transactionId;
935 std::optional<CustomData> customData;
936 std::optional<ChargingStateEnum> chargingState;
937 std::optional<int32_t> timeSpentCharging;
938 std::optional<ReasonEnum> stoppedReason;
939 std::optional<int32_t> remoteStartId;
940};
942void to_json(json& j, const Transaction& k);
943
945void from_json(const json& j, Transaction& k);
946
947// \brief Writes the string representation of the given Transaction \p k to the given output stream \p os
949std::ostream& operator<<(std::ostream& os, const Transaction& k);
950
951struct Firmware {
952 CiString<512> location;
953 ocpp::DateTime retrieveDateTime;
954 std::optional<CustomData> customData;
955 std::optional<ocpp::DateTime> installDateTime;
956 std::optional<CiString<5500>> signingCertificate;
957 std::optional<CiString<800>> signature;
958};
960void to_json(json& j, const Firmware& k);
961
963void from_json(const json& j, Firmware& k);
964
965// \brief Writes the string representation of the given Firmware \p k to the given output stream \p os
967std::ostream& operator<<(std::ostream& os, const Firmware& k);
968
970} // namespace v2
971} // namespace ocpp
972
973#endif // OCPP_V2_OCPP_TYPES_HPP
Contains a DateTime implementation that can parse and create RFC 3339 compatible strings.
Definition: types.hpp:109
Definition: ocpp_types.hpp:586
Definition: ocpp_types.hpp:792
Definition: ocpp_types.hpp:21
Definition: ocpp_types.hpp:777
Definition: ocpp_types.hpp:271
Definition: ocpp_types.hpp:202
Definition: ocpp_types.hpp:550
Definition: ocpp_types.hpp:624
Definition: ocpp_types.hpp:219
Definition: ocpp_types.hpp:755
Definition: ocpp_types.hpp:236
Definition: ocpp_types.hpp:530
Definition: ocpp_types.hpp:122
Definition: ocpp_types.hpp:170
Definition: ocpp_types.hpp:186
Definition: ocpp_types.hpp:334
Definition: ocpp_types.hpp:303
Definition: ocpp_types.hpp:253
The result of a configuration of a network profile.
Definition: ocpp_types.hpp:893
bool success
true if the configuration was successful
Definition: ocpp_types.hpp:895
std::optional< std::string > interface_address
ip address or interface string
Definition: ocpp_types.hpp:894
Definition: ocpp_types.hpp:482
Definition: ocpp_types.hpp:466
Definition: ocpp_types.hpp:603
Definition: ocpp_types.hpp:155
Definition: ocpp_types.hpp:641
Definition: ocpp_types.hpp:951
Definition: ocpp_types.hpp:349
Definition: ocpp_types.hpp:365
Definition: ocpp_types.hpp:86
Definition: ocpp_types.hpp:36
Definition: ocpp_types.hpp:287
Definition: ocpp_types.hpp:70
Definition: ocpp_types.hpp:565
Definition: ocpp_types.hpp:436
Definition: ocpp_types.hpp:107
Definition: ocpp_types.hpp:685
Definition: ocpp_types.hpp:831
Definition: ocpp_types.hpp:52
Definition: ocpp_types.hpp:451
Definition: ocpp_types.hpp:738
Definition: ocpp_types.hpp:969
Definition: ocpp_types.hpp:497
Definition: ocpp_types.hpp:513
Definition: ocpp_types.hpp:416
Definition: ocpp_types.hpp:852
Definition: ocpp_types.hpp:872
Definition: ocpp_types.hpp:898
Definition: ocpp_types.hpp:915
Definition: ocpp_types.hpp:384
Definition: ocpp_types.hpp:140
Definition: ocpp_types.hpp:933
Definition: ocpp_types.hpp:401
Definition: ocpp_types.hpp:812
Definition: ocpp_types.hpp:701
Definition: ocpp_types.hpp:719
Definition: ocpp_types.hpp:667
Definition: ocpp_types.hpp:319