rust_ocpp/v2_0_1/messages/
notify_event.rs

1use chrono::DateTime;
2use chrono::Utc;
3
4use crate::v2_0_1::datatypes::event_data_type::EventDataType;
5use crate::v2_0_1::helpers::datetime_rfc3339;
6
7/// This contains the field definition of the NotifyEventRequest PDU sent by the Charging Station to the CSMS.
8#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
9#[serde(rename_all = "camelCase")]
10pub struct NotifyEventRequest {
11    #[serde(with = "datetime_rfc3339 ")]
12    pub generated_at: DateTime<Utc>,
13    #[serde(skip_serializing_if = "Option::is_none")]
14    pub tbc: Option<bool>,
15    pub seq_no: i32,
16    pub event_data: Vec<EventDataType>,
17}
18
19/// Response to NotifyEventRequest. No fields are defined.
20#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
21#[serde(rename_all = "camelCase")]
22pub struct NotifyEventResponse {}