EtherNet/IP™ Adapter  1.04.06
User Reference Manual

◆ EI_API_ADP_setErrorHandlerFunc()

uint32_t EI_API_ADP_setErrorHandlerFunc ( EI_API_ADP_CBStackError  callback_p)

Set the stack error handler function.

This function sets the error handler function for the EtherNet/IP stack. Using NULL as parameter of EI_API_ADP_setErrorHandlerFunc resets the callback function.

Parameters
[in]callback_pCallback function of EI_API_ADP_CBStackError type.
Returns
EI_API_ADP_EError_t as uint32_t value.
Return values
EI_API_ADP_eERR_OKSuccess.
EI_API_ADP_eERR_GENERALGeneral error.
Example
#include <api/EI_API.h>
void errorHandlerFunc(uint32_t errorCode_p, uint8_t fatal_p, uint8_t numOfParam_p, va_list arg_p);
{
// Execute your code here
}
void registerStackErrorHandler()
{
uint32_t errCode;
EI_API_ADP_CBStackError ptr_cb = errorHandlerFunc;
errCode = EI_API_ADP_setErrorHandlerFunc(ptr_cb);
}
See also
EI_API_ADP_CBStackError EI_API_ADP_EError_t
EI_API_ADP_setErrorHandlerFunc
ETHIP_API uint32_t EI_API_ADP_setErrorHandlerFunc(EI_API_ADP_CBStackError callback_p)
Set the stack error handler function.
Definition: EI_API_ADP_main.c:756
EI_API_ADP_CBStackError
void(* EI_API_ADP_CBStackError)(uint32_t errorCode_p, uint8_t fatal_p, uint8_t numOfParam_p, va_list arg_p)
Function prototype for general stack error callback.
Definition: EI_API_def.h:322