ocpp/v2_1/datatype/charging_limit

OCPP 2.1 ChargingLimit data type (schema ChargingLimitType).

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

Types

FieldTypeReqDescription
charging_limit_sourceStringRepresents the source of the charging limit. Values defined in appendix as ChargingLimitSourceEnumStringType. (max 20 chars)
custom_dataCustomData
is_grid_criticalBoolIndicates whether the charging limit is critical for the grid.
is_local_generationBool(2.1) True when the reported limit concerns local generation that is providing extra capacity, instead of a limitation.

Schema: ChargingLimitType

pub type ChargingLimit {
  ChargingLimit(
    charging_limit_source: String,
    custom_data: option.Option(custom_data.CustomData),
    is_grid_critical: option.Option(Bool),
    is_local_generation: option.Option(Bool),
  )
}

Constructors

Values

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

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

pub fn new(
  charging_limit_source charging_limit_source: String,
) -> ChargingLimit

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

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

Encode a ChargingLimit to its OCPP-J JSON object.

Search Document