ocpp/v2_1/datatype/charging_schedule

OCPP 2.1 ChargingSchedule data type (schema ChargingScheduleType).

to_json/decoder map to/from its OCPP-J JSON object; new (when present) builds a value from the required fields only.

Types

Charging schedule structure defines a list of charging periods, as used in: NotifyEVChargingScheduleRequest and ChargingProfileType. When used in a NotifyEVChargingScheduleRequest only duration and chargingSchedulePeriod are relevant and chargingRateUnit must be ‘W’. + An ISO 15118-20 session may provide either an absolutePriceSchedule or a priceLevelSchedule. An ISO 15118-2 session can only provide a_salesTariff_ element. The field digestValue is used when price schedule or sales tariff are signed.

FieldTypeReqDescription
absolute_price_scheduleAbsolutePriceSchedule
charging_rate_unitChargingRateUnit
charging_schedule_periodList(ChargingSchedulePeriod)
custom_dataCustomData
digest_valueString(2.1) Base64 encoded hash (SHA256 for ISO 15118-2, SHA512 for ISO 15118-20) of the EXI price schedule element. Used in signature. (max 88 chars)
durationIntDuration of the charging schedule in seconds. If the duration is left empty, the last period will continue indefinitely or until end of the transaction in case startSchedule is absent.
idInt
limit_at_socLimitAtSoc
min_charging_rateFloatMinimum charging rate supported by the EV. The unit of measure is defined by the chargingRateUnit. This parameter is intended to be used by a local smart charging algorithm to optimize the power allocation for in the case a charging process is inefficient at lower charging rates.
power_toleranceFloat(2.1) Power tolerance when following EVPowerProfile.
price_level_schedulePriceLevelSchedule
randomized_delayInt(2.1) Defaults to 0. When randomizedDelay not equals zero, then the start of each ChargingSchedulePeriodType is delayed by a randomly chosen number of seconds between 0 and randomizedDelay. Only allowed for TxProfile and TxDefaultProfile. (≥ 0)
sales_tariffSalesTariff
signature_idInt(2.1) Id of this element for referencing in a signature. (≥ 0)
start_scheduleDateTimeStarting point of an absolute schedule or recurring schedule.
use_local_timeBool(2.1) Defaults to false. When true, disregard time zone offset in dateTime fields of ChargingScheduleType and use unqualified local time at Charging Station instead. This allows the same Absolute or Recurring charging profile to be used in both summer and winter time.

Schema: ChargingScheduleType

pub type ChargingSchedule {
  ChargingSchedule(
    absolute_price_schedule: option.Option(
      absolute_price_schedule.AbsolutePriceSchedule,
    ),
    charging_rate_unit: charging_rate_unit.ChargingRateUnit,
    charging_schedule_period: List(
      charging_schedule_period.ChargingSchedulePeriod,
    ),
    custom_data: option.Option(custom_data.CustomData),
    digest_value: option.Option(String),
    duration: option.Option(Int),
    id: Int,
    limit_at_soc: option.Option(limit_at_soc.LimitAtSoc),
    min_charging_rate: option.Option(Float),
    power_tolerance: option.Option(Float),
    price_level_schedule: option.Option(
      price_level_schedule.PriceLevelSchedule,
    ),
    randomized_delay: option.Option(Int),
    sales_tariff: option.Option(sales_tariff.SalesTariff),
    signature_id: option.Option(Int),
    start_schedule: option.Option(timestamp.Timestamp),
    use_local_time: option.Option(Bool),
  )
}

Constructors

Values

pub fn decoder() -> decode.Decoder(ChargingSchedule)

Decode a ChargingSchedule from its OCPP-J JSON object, enforcing schema constraints.

pub fn new(
  charging_rate_unit charging_rate_unit: charging_rate_unit.ChargingRateUnit,
  charging_schedule_period charging_schedule_period: List(
    charging_schedule_period.ChargingSchedulePeriod,
  ),
  id id: Int,
) -> ChargingSchedule

Construct a ChargingSchedule from its required fields, with every optional field set to None.

pub fn to_json(value: ChargingSchedule) -> json.Json

Encode a ChargingSchedule to its OCPP-J JSON object.

Search Document