EtherCAT SubDevice
 
Loading...
Searching...
No Matches

◆ EC_API_SLV_cbRegisterStartMbxHandler()

uint32_t EC_API_SLV_cbRegisterStartMbxHandler ( EC_API_SLV_SHandle_t pHandle,
EC_API_SLV_CBStartMbxHandler_t  cbFunc,
void *  pContext 
)

This is the function to register a function which starts the mailbox handler.

The function is called in the state transition from INIT to PREOP when all general settings were checked to start the mailbox handler. This function informs the application about the state transition, the application can refuse the state transition when returning an AL Status error code. The return code NOERROR_INWORK can be used, if the application cannot confirm the state transition immediately, in that case this function will be called cyclically until a value unequal NOERROR_INWORK is returned

Parameters
[in]pHandleThe pointer to the EtherCAT API instance.
[in]cbFuncFunction pointer to the Start Mailbox Handler
[in]pContextstartMbxHandler call context
Returns
uint32_t Returns the API error code.
Example
#include <ecSlvApi.h>
// the Call
uint32_t EC_API_SLV_cbRegisterStartMbxHandler(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_CBStartMbxHandler_t cbFunc, void *pContext)
This is the function to register a function which starts the mailbox handler.
Definition ecSlvApi_ssc.c:146