ocpp/v2_0_1/datatype/relative_time_interval
OCPP 2.0.1 RelativeTimeInterval data type (schema RelativeTimeIntervalType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
duration | Int | — | Duration of the interval, in seconds. |
start | Int | ✓ | Start of the interval, in seconds from NOW. |
Schema: RelativeTimeIntervalType · Relative_Timer_Interval · urn:x-oca:ocpp:uid:2:233270
pub type RelativeTimeInterval {
RelativeTimeInterval(
custom_data: option.Option(custom_data.CustomData),
duration: option.Option(Int),
start: Int,
)
}
Constructors
-
RelativeTimeInterval( custom_data: option.Option(custom_data.CustomData), duration: option.Option(Int), start: Int, )
Values
pub fn decoder() -> decode.Decoder(RelativeTimeInterval)
Decode a RelativeTimeInterval from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(start start: Int) -> RelativeTimeInterval
Construct a RelativeTimeInterval from its required fields, with every optional field set to None.
pub fn to_json(value: RelativeTimeInterval) -> json.Json
Encode a RelativeTimeInterval to its OCPP-J JSON object.