rust_ocpp/v2_0_1/messages/notify_charging_limit.rs
1//! NotifyChargingLimit
2
3use crate::v2_0_1::datatypes::charging_limit_type::ChargingLimitType;
4use crate::v2_0_1::datatypes::charging_schedule_type::ChargingScheduleType;
5
6/// The message NotifyChargingLimitRequest can be used to communicate a charging limit, set by an external system on the Charging Station (Not installed by the CSO via SetChargingProfileRequest), to the CSMS.
7#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
8#[serde(rename_all = "camelCase")]
9pub struct NotifyChargingLimitRequest {
10 /// The charging schedule contained in thisnotification applies to an EVSE. evseId must be > 0.
11 #[serde(skip_serializing_if = "Option::is_none")]
12 pub evse_id: Option<i32>,
13 /// This contains the source of the charging limitand whether it is grid critical.
14 pub charging_limit: ChargingLimitType,
15 /// Contains limits for the available power orcurrent over time, as set by the external source.
16 #[serde(skip_serializing_if = "Option::is_none")]
17 pub charging_schedule: Option<Vec<ChargingScheduleType>>,
18}
19
20/// The NotifyChargingLimitResponse message is sent by the CSMS to the Charging Station in response to a NotifyChargingLimitsRequest. No fields are defined.
21#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
22#[serde(rename_all = "camelCase")]
23pub struct NotifyChargingLimitResponse {
24 // No fields are defined
25}