rust_ocpp/v2_0_1/messages/
notify_ev_charging_schedule.rs

1use chrono::DateTime;
2use chrono::Utc;
3
4use crate::v2_0_1::datatypes::charging_schedule_type::ChargingScheduleType;
5use crate::v2_0_1::datatypes::status_info_type::StatusInfoType;
6use crate::v2_0_1::enumerations::generic_status_enum_type::GenericStatusEnumType;
7
8/// The Charging Station uses this message to communicate the charging needs as calculated by the EV to the CSMS.
9#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
10#[serde(rename_all = "camelCase")]
11pub struct NotifyEVChargingScheduleRequest {
12    pub time_base: DateTime<Utc>,
13    pub evse_id: i32,
14    pub charging_schedule: ChargingScheduleType,
15}
16
17/// Response to a NotifyEVChargingScheduleRequest message.
18#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
19#[serde(rename_all = "camelCase")]
20pub struct NotifyEVChargingScheduleResponse {
21    pub status: GenericStatusEnumType,
22    #[serde(skip_serializing_if = "Option::is_none")]
23    pub status_info: Option<StatusInfoType>,
24}