//------------------------------------------------------------------------------ static void shutdownPowerlink(tInstance* pInstance_p) { UNUSED_PARAMETER(pInstance_p); PRINTF("Shut down DEMO\n"); oplk_destroy(); oplk_exit(); }
/** ******************************************************************************** \brief Destructor Destructs a POWERLINK object. *******************************************************************************/ Api::~Api() { tOplkError ret; pDataInOutThread->stop(); pDataInOutThread->wait(100); // wait until thread terminates (max 100ms) ret = oplk_execNmtCommand(kNmtEventSwitchOff); pProcessThread->waitForNmtStateOff(); ret = oplk_freeProcessImage(); ret = oplk_destroy(); oplk_exit(); }