ocpp/v2_0_1/datatype/message_info

OCPP 2.0.1 MessageInfo data type (schema MessageInfoType).

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

Types

Contains message details, for a message to be displayed on a Charging Station.

FieldTypeReqDescription
custom_dataCustomData
displayComponent
end_date_timeDateTimeUntil what date-time should this message be shown, after this date/time this message SHALL be removed.
idIntMaster resource identifier, unique within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero).
messageMessageContent
priorityMessagePriority
start_date_timeDateTimeFrom what date-time should this message be shown. If omitted: directly.
stateMessageState
transaction_idStringDuring which transaction shall this message be shown. Message SHALL be removed by the Charging Station after transaction has ended. (max 36 chars)

Schema: MessageInfoType · Message_Info · urn:x-enexis:ecdm:uid:2:233264

pub type MessageInfo {
  MessageInfo(
    custom_data: option.Option(custom_data.CustomData),
    display: option.Option(component.Component),
    end_date_time: option.Option(timestamp.Timestamp),
    id: Int,
    message: message_content.MessageContent,
    priority: message_priority.MessagePriority,
    start_date_time: option.Option(timestamp.Timestamp),
    state: option.Option(message_state.MessageState),
    transaction_id: option.Option(String),
  )
}

Constructors

Values

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

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

pub fn new(
  id id: Int,
  message message: message_content.MessageContent,
  priority priority: message_priority.MessagePriority,
) -> MessageInfo

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

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

Encode a MessageInfo to its OCPP-J JSON object.

Search Document