ocpi 0.3.5

Unofficial, in progress, OCPI implementation
Documentation
///
/// # 10.4.3. CdrDimensionType enum
/// This enumeration contains allowed values for CdrDimensions,
/// which are used to define dimensions of ChargingPeriods in both CDRs and Sessions.
/// Some of these values are not useful for CDRs, and SHALL therefor only be used in Sessions,
/// these are marked in the column: Session Only
///
///
/// ## NOTE:
///
/// OCPI makes it possible to provide SoC in the Session object.
/// This information can be useful to show the current State of Charge to an
/// EV driver during charging.
/// Implementers should be aware that SoC is only available at some DC Chargers.
/// Which is currently a small amount of the total amount of Charge Points.
/// Of these DC Chargers, only a small percentage currently provides SoC via OCPP to the CPO.
/// Then there is also the question if SoC is allowed to be provided to third-parties
/// as it can be seen as privacy-sensitive information.
/// So if an implementer wants to show SoC in, for example an App, care should be taken,
/// to make the App work without SoC, as this will probably not always be available.
#[derive(Clone, Copy, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum CdrDimension {
    /// Average charging current during this ChargingPeriod: defined in A (Ampere). When
    /// negative, the current is flowing from the EV to the grid.
    Current,

    /// Total amount of energy (dis-)charged during this ChargingPeriod: defined in kWh. When
    /// negative, more energy was feed into the grid then charged into the EV.
    /// Default step_size is
    Energy,

    /// Total amount of energy feed back into the grid: defined in kWh.
    EnergyExport,

    /// Total amount of energy charged, defined in kWh.
    EnergyImport,

    /// Sum of the maximum current over all phases, reached during this ChargingPeriod:
    /// defined in A (Ampere).
    MaxCurrent,

    /// Sum of the minimum current over all phases, reached during this ChargingPeriod,
    /// when negative, current has flowed from the EV to the grid. Defined in A (Ampere).
    MinCurrent,

    /// Maximum power reached during this ChargingPeriod: defined in kW (Kilowatt).
    MaxPower,

    /// Minimum power reached during this ChargingPeriod: defined in kW (Kilowatt), when
    /// negative, the power has flowed from the EV to the grid.
    MinPower,

    /// Time during this ChargingPeriod not charging: defined in hours, default step_size multiplier
    /// is 1 second.
    ParkingTime,

    /// Average power during this ChargingPeriod: defined in kW (Kilowatt). When negative, the
    /// power is flowing from the EV to the grid.
    Power,

    /// Time during this ChargingPeriod Charge Point has been reserved and not yet been in use
    /// for this customer: defined in hours, default step_size multiplier is 1 second.
    ReservationTime,

    /// Current state of charge of the EV, in percentage, values allowed: 0 to 100. See note below.
    StateOfCharge,

    /// Time charging during this ChargingPeriod: defined in hours,
    /// default step_size multiplier is 1 second.
    Time,
}