ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
Heartbeat.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_HEARTBEAT_HPP
6#define OCPP_V2_HEARTBEAT_HPP
7
8#include <nlohmann/json_fwd.hpp>
9#include <optional>
10
11#include <ocpp/common/types.hpp>
12#include <ocpp/v2/ocpp_types.hpp>
13
14namespace ocpp {
15namespace v2 {
16
19 std::optional<CustomData> customData;
20
23 std::string get_type() const override;
24};
25
27void to_json(json& j, const HeartbeatRequest& k);
28
30void from_json(const json& j, HeartbeatRequest& k);
31
34std::ostream& operator<<(std::ostream& os, const HeartbeatRequest& k);
35
38 ocpp::DateTime currentTime;
39 std::optional<CustomData> customData;
40
43 std::string get_type() const override;
44};
45
47void to_json(json& j, const HeartbeatResponse& k);
48
50void from_json(const json& j, HeartbeatResponse& k);
51
54std::ostream& operator<<(std::ostream& os, const HeartbeatResponse& k);
55
56} // namespace v2
57} // namespace ocpp
58
59#endif // OCPP_V2_HEARTBEAT_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 Heartbeat message.
Definition: Heartbeat.hpp:18
std::string get_type() const override
Provides the type of this Heartbeat message as a human readable string.
Definition: Heartbeat.cpp:16
Contains a OCPP HeartbeatResponse message.
Definition: Heartbeat.hpp:37
std::string get_type() const override
Provides the type of this HeartbeatResponse message as a human readable string.
Definition: Heartbeat.cpp:45