rust_ocpp/v1_6/messages/
meter_values.rs

1use crate::v1_6::types::MeterValue;
2
3/// This contains the field definition of the MeterValues.req PDU sent by the Charge Point to the Central System. See also Meter Values
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
5#[serde(rename_all = "camelCase")]
6pub struct MeterValuesRequest {
7    /// Required. This contains a number (>0) designating a connector of the Charge Point.‘0’ (zero) is used to designate the main powermeter.
8    pub connector_id: u32,
9    /// Optional. The transaction to which these meter samples are related.
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub transaction_id: Option<i32>,
12    /// Required. The sampled meter values with timestamps.
13    pub meter_value: Vec<MeterValue>,
14}
15
16/// This contains the field definition of the MeterValues.conf PDU sent by the Central System to the Charge Point in response to a MeterValuesRequest PDU. See also Meter Values
17#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Default)]
18#[serde(rename_all = "camelCase")]
19pub struct MeterValuesResponse {
20    // No fields are defined.
21}