ocpp/v2_1/datatype/relative_time_interval

OCPP 2.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

FieldTypeReqDescription
custom_dataCustomData
durationIntDuration of the interval, in seconds.
startIntStart of the interval, in seconds from NOW.

Schema: RelativeTimeIntervalType

pub type RelativeTimeInterval {
  RelativeTimeInterval(
    custom_data: option.Option(custom_data.CustomData),
    duration: option.Option(Int),
    start: Int,
  )
}

Constructors

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.

Search Document