Initialization
To enable POWERLINK support in GOAL the goal_eplInit function must be called during appl_init. Afterwards, a new POWERLINK instance can setup by goal_eplNew during appl_setup.
static GOAL_EPL_T *pHdlEpl; /**< GOAL POWERLINK handle */
GOAL_STATUS_T appl_init(
void
)
{
GOAL_STATUS_T res; /* result */
/* initialize POWERLINK */
res = goal_eplInit();
if (GOAL_RES_ERR(res)) {
goal_logErr("Initialization of POWERLINK failed");
}
return res;
}
GOAL_STATUS_T appl_setup(
void
)
{
GOAL_STATUS_T res; /* result */
/* setup Ethernet POWERLINK */
res = goal_eplNew(&pHdlEpl);
if (GOAL_RES_ERR(res)) {
goal_logErr("failed to create a new POWERLINK instance");
}
return res;
}