rust_ocpp/v2_0_1/messages/
get_composite_schedule.rs

1//! GetCompositeSchedule
2use crate::v2_0_1::datatypes::composite_schedule_type::CompositeScheduleType;
3use crate::v2_0_1::datatypes::status_info_type::StatusInfoType;
4use crate::v2_0_1::enumerations::charging_rate_unit_enum_type::ChargingRateUnitEnumType;
5use crate::v2_0_1::enumerations::generic_status_enum_type::GenericStatusEnumType;
6
7/// GetCompositeScheduleRequest, sent by the CSMS to the Charging Station.
8#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
9#[serde(rename_all = "camelCase")]
10pub struct GetCompositeScheduleRequest {
11    /// Length of the requested schedule in seconds
12    pub duration: i32,
13    /// Can be used to force a power or current profile
14    #[serde(skip_serializing_if = "Option::is_none")]
15    pub charging_rate_unit: Option<ChargingRateUnitEnumType>,
16    /// The ID of the EVSE for which the schedule isrequested. When evseid=0, the Charging Station willcalculate the expected consumption for the gridconnection.
17    pub evse_id: i32,
18}
19
20/// GetCompositeScheduleResponse, sent by the Charging Station to the CSMS in response to a GetCompositeScheduleRequest.
21#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
22#[serde(rename_all = "camelCase")]
23pub struct GetCompositeScheduleResponse {
24    /// The Charging Station will indicate if it was ableto process the request
25    pub status: GenericStatusEnumType,
26    #[serde(skip_serializing_if = "Option::is_none")]
27    /// This field contains the calculated compositeschedule. It may only be omitted when this messagecontains status Rejected
28    pub schedule: Option<CompositeScheduleType>,
29    /// Detailed status information
30    #[serde(skip_serializing_if = "Option::is_none")]
31    pub status_info: Option<StatusInfoType>,
32}