3.21 Remote Stop Transaction
The RemoteStopTransaction message in OCPP 1.6J is sent by the central system to remotely stop an active charging session. It includes the transaction ID of the ongoing session and, optionally, a reason for stopping. The charge point responds to confirm whether the session was successfully stopped or if an error occurred. This message enables remote management of charging sessions.
|
API Syntax |
Description |
Input Params |
Return Value |
|---|---|---|---|
SetRemoteStopTransactionStatus | Sets the status for the Remote Stop Transaction. | REMOTE_START_STOP_STATUS_T status | void |
Example:
void RemoteStopTransaction(uint16_t responsecode)
{
if((REMOTE_START_STOP_STATUS_T)responsecode == REMOTE_START_STOP_ACCEPTED)
{
char idTag[CISTRING_20TYPE_LENGTH]={NULL_VALUE};
LogDebug("APP_LOG", " Remote Stop Transaction accepted \n");
SetRemoteStopTransactionStatus(REMOTE_START_STOP_ACCEPTED);
(void)SendRemoteStopTransactionResponse();
GetAuthorizeIdTag(idTag);
int transactionId = GetStartTransactionResponseTransactionId();
UpdateAndSendStopTransaction(idTag, OCPP_METER_READING, transactionId, REMOTE, OCPP_KWH);
}
|
API Syntax |
Description |
Input Params |
Return Value |
|---|---|---|---|
RemoteStopTransactionInit | Initializes the Remote Stop Transaction module. | void | void |
Example:
void OCPPMessagesInit(void)
{
DataTransferInit();
ResetInit();
MeterValueStructInit();
SetLocalListVersionNumber(DEFAULT_SEND_LOCAL_LIST_VERSION);
SetChargePointConnectorId(CHARGEPOINT_DEFAULT_CONTROLLER);
ChargePointStatusInit();
(void)SetAuthorizeStatus(AUTHORIZE_INVALID);
SetOCPPWebsocketOnlineMode();
UnlockConnectorInit();
ReserveNowInit();
ChangeAvailabilityInit();
ClearCacheInit();
ChangeConfigurationInit();
CancelReservationInit();
GetAllIDsFromDB();
CheckAndStartClockAlignedMeterValueTimer();
ClearChargingProfileInit();
GetCompositeScheduleInit();
GetLocalListVersionInit();
SendLocalListInit();
SetChargingProfileInit();
TriggerMessageInit();
RemoteStopTransactionInit();
RemoteStartTransactionInit();
}
|
Syntax |
Description |
Constants/Members |
|---|---|---|
RX_REMOTESTOPTRANSACTION_T | Structure to hold the details of a received Remote Stop Transaction | char uuid[]; int transactionId; |
REMOTESTOPTRANSACTION_RESPONSE_T | Structure to hold the response of a Remote Stop Transaction | REMOTE_START_STOP_STATUS_T status; |
REMOTE_START_STOP_STATUS_T | Enum representing the status of a remote start/stop transaction | REMOTE_START_STOP_ACCEPTED REMOTE_START_STOP_REJECTED |
