ocpp/v2_0_1/datatype/component

OCPP 2.0.1 Component data type (schema ComponentType).

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

Types

A physical or logical component

FieldTypeReqDescription
custom_dataCustomData
evseEvse
instanceStringName of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. (max 50 chars)
nameStringName of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. (max 50 chars)

Schema: ComponentType

pub type Component {
  Component(
    custom_data: option.Option(custom_data.CustomData),
    evse: option.Option(evse.Evse),
    instance: option.Option(String),
    name: String,
  )
}

Constructors

Values

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

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

pub fn new(name name: String) -> Component

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

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

Encode a Component to its OCPP-J JSON object.

Search Document