ocpp-types 0.1.0

Strongly typed OCPP 1.6J, 2.0.1, and 2.1 message types for Rust. no_std, no alloc, embedded-friendly.
Documentation
// @generated by ocpp-codegen from schemas/. Do not edit by hand -- run
// `scripts/generate.sh` to regenerate; manual changes will be overwritten.

#[cfg(feature = "alloc")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct HeartbeatResponse {
    #[cfg_attr(feature = "serde", serde(rename = "currentTime"))]
    pub current_time: alloc::string::String,
}
#[cfg(feature = "alloc")]
impl crate::Action for HeartbeatResponse {
    const ACTION: &'static str = "Heartbeat";
}
#[cfg(not(feature = "alloc"))]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct HeartbeatResponse<
    const HEARTBEAT_RESPONSE_CURRENT_TIME_CAP: usize = 1024usize,
> {
    #[cfg_attr(feature = "serde", serde(rename = "currentTime"))]
    pub current_time: heapless::String<HEARTBEAT_RESPONSE_CURRENT_TIME_CAP>,
}
#[cfg(not(feature = "alloc"))]
impl<const HEARTBEAT_RESPONSE_CURRENT_TIME_CAP: usize> crate::Action
for HeartbeatResponse<HEARTBEAT_RESPONSE_CURRENT_TIME_CAP> {
    const ACTION: &'static str = "Heartbeat";
}