#include "plugin_api.h" #include "global.h" class CXorayaPlugin_WCRT : public IPlugin { private: int32_t m_i32InterfaceHandle; uint32_t m_u32PluginId; tstCanTxMessage m_axCanTxMessages[7]; public: CXorayaPlugin_WCRT() :m_i32InterfaceHandle(0),m_u32PluginId(0),m_axCanTxMessages({{ 1, 0, 1, {60, 60, 60, 60, 60, 60, 60, 60 }, 8}, { 1, 0, 2, {60, 60, 60, 60, 60, 60, 60, 60 }, 8}, { 1, 0, 3, {60, 60, 60, 60, 60, 60, 60, 60 }, 8}, { 1, 0, 4, {60, 60, 60, 60, 60, 60, 60, 60 }, 8}, { 1, 0, 5, {60, 60, 60, 60, 60, 60, 60, 60 }, 8}, { 1, 0, 6, {60, 60, 60, 60, 60, 60, 60, 60 }, 8}, { 1, 0, 7, {60, 60, 60, 60, 60, 60, 60, 60 }, 8}, }) { } virtual ~CXorayaPlugin_WCRT() { } virtual void vRun() { } virtual tpstCanTxMessage pxGetCanTxMessage( const uint32_t u32MsgIndex ) { return &m_axCanTxMessages[u32MsgIndex]; } virtual uint32_t u32GetNumOfCanTxMessages( void ) { return 7; } virtual int32_t i32GetCanInterfaceHandle( void ) { return m_i32InterfaceHandle; } virtual void vLogMessage(const tstLogMessage& stLogMessage) { } virtual void vInit(void* pvExecutor, void* pvIfMan, int32_t i32Interface, uint32_t u32PluginId) { m_i32InterfaceHandle=i32Interface; m_u32PluginId=u32PluginId; } virtual bool boAutoload( void) { return false; } virtual bool boIsLogger( void) { return false; } tenRetCodes enGetLog(const char* pcRequest, char* pcResponse) { return nenERR_NOTIMPLEMENTED; } }; static CXorayaPlugin_WCRT xPlugin; extern "C" IPlugin* pxCreatePlugin(void* pvExecutor, void* pvIfMan, int32_t i32Interface, uint32_t u32PluginId) { xPlugin.vInit(pvExecutor,pvIfMan,i32Interface,u32PluginId); return &xPlugin; } extern "C" void vDestroyPlugin(IPlugin* pxPlugin) { }