3.26 Trigger Message
The TriggerMessage message in OCPP 1.6J is sent by the central system to request the charge point to perform a specific action, such as sending a diagnostic message or updating its status. It specifies the type of action to trigger and may include priority settings. The charge point responds with the outcome of the action, confirming success or failure. This allows the central system to initiate specific tasks remotely.
|
API Syntax |
Description |
Input Params |
Return Value |
|---|---|---|---|
SetTriggerMessageStatus | Sets the status of the TriggerMessage response. | TRIGGER_MESSAGE_STATUS_T status | void |
Example:
else
{
rxTriggerMessage.requestedMessage = TRIGGER_MESSAGE_TYPE_INVALID;
status = TRIGGER_MESSAGE_REJECTED;
}
OCPPProcessReportToApplication(TRIGGER_MESSAGE, status);
SetTriggerMessageStatus(status);
SendTriggerMessageResponse();
|
API Syntax |
Description |
Input Params |
Return Value |
|---|---|---|---|
TriggerMessageInit | Initializes the TriggerMessage response structure. | 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();
}
|
API Syntax |
Description |
Input Params |
Return Value |
|---|---|---|---|
GetTriggerMessageParams | Retrieves parameters from the TriggerMessage request. | RX_TRIGGERMESSAGE_T *params | void |
Example:
case TRIGGER_MESSAGE:
{
RX_TRIGGERMESSAGE_T params;
GetTriggerMessageParams(¶ms);
LogDebug("APP_LOG", " TriggerMessage Params connecterId: %d requestedMessage: %d %s\n", params.connecterId, params.requestedMessage, GetTriggerMessageTypeChar(params.requestedMessage));
}
break;
|
Syntax |
Description |
Constants/Members |
|---|---|---|
TRIGGERMESSAGE_RESPONSE_T | Structure for the TriggerMessage response | TRIGGER_MESSAGE_STATUS_T status |
RX_TRIGGERMESSAGE_T | Structure for receiving a TriggerMessage request | char uuid[]; uint8_t connectorId; TRIGGER_MESSAGE_TYPE_T requestedMessage; |
TRIGGER_MESSAGE_TYPE_T | Enumeration for the types of TriggerMessage requests | TRIGGER_MESSAGE_TYPE_BOOT_NOTIFICATION TRIGGER_MESSAGE_TYPE_HEARTBEAT TRIGGER_MESSAGE_TYPE_STATUS_NOTIFICATION TRIGGER_MESSAGE_TYPE_FIRMWARE_STATUS_NOTIFICATION TRIGGER_MESSAGE_TYPE_DIAGNOSTICS_STATUS_NOTIFICATION TRIGGER_MESSAGE_TYPE_METER_VALUE TRIGGER_MESSAGE_TYPE_INVALID TRIGGER_MESSAGE_TYPE_NOT_IMPLEMENTED |
TRIGGER_MESSAGE_STATUS_T | Enumeration for the status of the TriggerMessage response | TRIGGER_MESSAGE_ACCEPTED TRIGGER_MESSAGE_REJECTED TRIGGER_MESSAGE_NOT_IMPLEMENTED |
