ocpp/v2_1/datatype/ev_price_rule

OCPP 2.1 EvPriceRule data type (schema EVPriceRuleType).

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

Types

(2.1) An entry in price schedule over time for which EV is willing to discharge.

FieldTypeReqDescription
custom_dataCustomData
energy_feeFloatCost per kWh.
power_range_startFloatThe EnergyFee applies between this value and the value of the PowerRangeStart of the subsequent EVPriceRule. If the power is below this value, the EnergyFee of the previous EVPriceRule applies. Negative values are used for discharging.

Schema: EVPriceRuleType

pub type EvPriceRule {
  EvPriceRule(
    custom_data: option.Option(custom_data.CustomData),
    energy_fee: Float,
    power_range_start: Float,
  )
}

Constructors

Values

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

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

pub fn new(
  energy_fee energy_fee: Float,
  power_range_start power_range_start: Float,
) -> EvPriceRule

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

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

Encode a EvPriceRule to its OCPP-J JSON object.

Search Document