Skip to main content

ocpp_types/v16/
heartbeat_response.rs

1// @generated by ocpp-codegen from schemas/. Do not edit by hand -- run
2// `scripts/generate.sh` to regenerate; manual changes will be overwritten.
3
4#[cfg(feature = "alloc")]
5#[derive(Debug, Clone, PartialEq, Eq)]
6#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
7pub struct HeartbeatResponse {
8    #[cfg_attr(feature = "serde", serde(rename = "currentTime"))]
9    pub current_time: alloc::string::String,
10}
11#[cfg(feature = "alloc")]
12impl crate::Action for HeartbeatResponse {
13    const ACTION: &'static str = "Heartbeat";
14}
15#[cfg(not(feature = "alloc"))]
16#[derive(Debug, Clone, PartialEq, Eq)]
17#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
18pub struct HeartbeatResponse<
19    const HEARTBEAT_RESPONSE_CURRENT_TIME_CAP: usize = 1024usize,
20> {
21    #[cfg_attr(feature = "serde", serde(rename = "currentTime"))]
22    pub current_time: heapless::String<HEARTBEAT_RESPONSE_CURRENT_TIME_CAP>,
23}
24#[cfg(not(feature = "alloc"))]
25impl<const HEARTBEAT_RESPONSE_CURRENT_TIME_CAP: usize> crate::Action
26for HeartbeatResponse<HEARTBEAT_RESPONSE_CURRENT_TIME_CAP> {
27    const ACTION: &'static str = "Heartbeat";
28}