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
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
evse | Evse | — | |
instance | String | — | Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. (max 50 chars) |
name | String | ✓ | Name 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
-
Component( custom_data: option.Option(custom_data.CustomData), evse: option.Option(evse.Evse), instance: option.Option(String), name: String, )
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.