ocpp/v2_0_1/message/request_start_transaction
OCPP 2.0.1 RequestStartTransaction action.
Request/Response payload types with their OCPP-J codecs
(request_to_json/request_decoder, response_to_json/
response_decoder). Transport-agnostic; the action-string mapping
lives in ocpp/v2_0_1/dispatch.
Types
| Field | Type | Req | Description |
|---|---|---|---|
charging_profile | ChargingProfile | — | |
custom_data | CustomData | — | |
evse_id | Int | — | Number of the EVSE on which to start the transaction. EvseId SHALL be > 0 |
group_id_token | IdTokenType | — | |
id_token | IdTokenType | ✓ | |
remote_start_id | Int | ✓ | Id given by the server to this start request. The Charging Station might return this in the TransactionEventRequest, letting the server know which transaction was started for this request. Use to start a transaction. |
Schema: RequestStartTransactionRequest
pub type Request {
Request(
charging_profile: option.Option(
charging_profile.ChargingProfile,
),
custom_data: option.Option(custom_data.CustomData),
evse_id: option.Option(Int),
group_id_token: option.Option(id_token_type.IdTokenType),
id_token: id_token_type.IdTokenType,
remote_start_id: Int,
)
}
Constructors
-
Request( charging_profile: option.Option( charging_profile.ChargingProfile, ), custom_data: option.Option(custom_data.CustomData), evse_id: option.Option(Int), group_id_token: option.Option(id_token_type.IdTokenType), id_token: id_token_type.IdTokenType, remote_start_id: Int, )
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
status | RequestStartStopStatus | ✓ | |
status_info | StatusInfo | — | |
transaction_id | String | — | When the transaction was already started by the Charging Station before the RequestStartTransactionRequest was received, for example: cable plugged in first. This contains the transactionId of the already started transaction. (max 36 chars) |
Schema: RequestStartTransactionResponse
pub type Response {
Response(
custom_data: option.Option(custom_data.CustomData),
status: request_start_stop_status.RequestStartStopStatus,
status_info: option.Option(status_info.StatusInfo),
transaction_id: option.Option(String),
)
}
Constructors
-
Response( custom_data: option.Option(custom_data.CustomData), status: request_start_stop_status.RequestStartStopStatus, status_info: option.Option(status_info.StatusInfo), transaction_id: option.Option(String), )
Values
pub fn new_request(
id_token id_token: id_token_type.IdTokenType,
remote_start_id remote_start_id: Int,
) -> Request
Construct a Request from its required fields, with every optional field set to None.
pub fn new_response(
status status: request_start_stop_status.RequestStartStopStatus,
) -> Response
Construct a Response from its required fields, with every optional field set to None.
pub fn request_decoder() -> decode.Decoder(Request)
Decode a Request from its OCPP-J JSON object, enforcing schema constraints.
pub fn response_decoder() -> decode.Decoder(Response)
Decode a Response from its OCPP-J JSON object, enforcing schema constraints.