ocpp/v2_0_1/datatype/sales_tariff

OCPP 2.0.1 SalesTariff data type (schema SalesTariffType).

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

Types

NOTE: This dataType is based on dataTypes from ISO 15118-2.

FieldTypeReqDescription
custom_dataCustomData
idIntSalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session.
num_e_price_levelsIntDefines the overall number of distinct price levels used across all provided SalesTariff elements.
sales_tariff_descriptionStringA human readable title/short description of the sales tariff e.g. for HMI display purposes. (max 32 chars)
sales_tariff_entryList(SalesTariffEntry)

Schema: SalesTariffType · Sales_Tariff · urn:x-oca:ocpp:uid:2:233272

pub type SalesTariff {
  SalesTariff(
    custom_data: option.Option(custom_data.CustomData),
    id: Int,
    num_e_price_levels: option.Option(Int),
    sales_tariff_description: option.Option(String),
    sales_tariff_entry: List(sales_tariff_entry.SalesTariffEntry),
  )
}

Constructors

Values

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

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

pub fn new(
  id id: Int,
  sales_tariff_entry sales_tariff_entry: List(
    sales_tariff_entry.SalesTariffEntry,
  ),
) -> SalesTariff

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

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

Encode a SalesTariff to its OCPP-J JSON object.

Search Document