ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
TransactionEvent.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_TRANSACTIONEVENT_HPP
6#define OCPP_V2_TRANSACTIONEVENT_HPP
7
8#include <nlohmann/json_fwd.hpp>
9#include <optional>
10
11#include <ocpp/common/types.hpp>
12#include <ocpp/v2/ocpp_enums.hpp>
13#include <ocpp/v2/ocpp_types.hpp>
14
15namespace ocpp {
16namespace v2 {
17
20 TransactionEventEnum eventType;
21 ocpp::DateTime timestamp;
22 TriggerReasonEnum triggerReason;
23 int32_t seqNo;
24 Transaction transactionInfo;
25 std::optional<CustomData> customData;
26 std::optional<std::vector<MeterValue>> meterValue;
27 std::optional<bool> offline;
28 std::optional<int32_t> numberOfPhasesUsed;
29 std::optional<int32_t> cableMaxCurrent;
30 std::optional<int32_t> reservationId;
31 std::optional<EVSE> evse;
32 std::optional<IdToken> idToken;
33
36 std::string get_type() const override;
37};
38
40void to_json(json& j, const TransactionEventRequest& k);
41
43void from_json(const json& j, TransactionEventRequest& k);
44
47std::ostream& operator<<(std::ostream& os, const TransactionEventRequest& k);
48
51 std::optional<CustomData> customData;
52 std::optional<float> totalCost;
53 std::optional<int32_t> chargingPriority;
54 std::optional<IdTokenInfo> idTokenInfo;
55 std::optional<MessageContent> updatedPersonalMessage;
56
59 std::string get_type() const override;
60};
61
63void to_json(json& j, const TransactionEventResponse& k);
64
66void from_json(const json& j, TransactionEventResponse& k);
67
70std::ostream& operator<<(std::ostream& os, const TransactionEventResponse& k);
71
72} // namespace v2
73} // namespace ocpp
74
75#endif // OCPP_V2_TRANSACTIONEVENT_HPP
Contains a DateTime implementation that can parse and create RFC 3339 compatible strings.
Definition: types.hpp:109
Parent structure for all OCPP messages supported by this implementation.
Definition: types.hpp:30
Contains a OCPP TransactionEvent message.
Definition: TransactionEvent.hpp:19
std::string get_type() const override
Provides the type of this TransactionEvent message as a human readable string.
Definition: TransactionEvent.cpp:16
Contains a OCPP TransactionEventResponse message.
Definition: TransactionEvent.hpp:50
std::string get_type() const override
Provides the type of this TransactionEventResponse message as a human readable string.
Definition: TransactionEvent.cpp:106
Definition: ocpp_types.hpp:933