Snapdragon® Telematics Application Framework (TelAF) Interface Specification
Diag Reset Service

API Reference


The Reset(0x11) service APIs are part of the diag service. This service requests that the application perform a server reset based on the content of the resetType parameter in the ECUReset request message.

IPC interfaces binding

The functions of this API are provided by the tafDiagSvc platform service.

The following example illustrates how to bind to the diag reset service.

bindings:
{
     clientExe.clientComponent.taf_diagReset -> tafDiagSvc.taf_diagReset
}

Server Service APIs

A diag reset service reference can be got using taf_diagReset_GetService() with the resetType passed as a parameter. Use the returned reference for subsequent operations.

The following example illustrates how to set up a diag reset server-service-instance.

taf_diagReset_ServiceRef_t svcRef; // Service reference
// Get the service reference.
svcRef = taf_diagReset_GetService(resetType);
LE_ASSERT(svcRef != NULL);

After getting the service reference, an application can call taf_diagReset_AddRxMsgHandler() to register a message handler for that service. Once a diag reset request message is received, the handler will be called with the message reference and received resetType passed as input parameters. The application performs the requested reset operation based on the resetType and uses the message reference to send a response message using taf_diagReset_Send_Resp(). Finally call taf_diagReset_RemoveSvc() to remove the created service.

// Rx message handler function.
void RxMsgHandler
(
void* contextPtr
)
{
// Process after succesfully receiving message
}
// Register the message handler.
LE_ASSERT(RxMsgHandlerRef != NULL);
// To remove the handler function.

An application can send a response by calling taf_diagReset_SendResp().

if (result != LE_OK)
{
LE_ERROR("Fail to send response.");
return result;
}

An application can remove the diag reset server service by calling taf_diagReset_RemoveSvc().

LE_ASSERT(result == LE_OK);