From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../Masterarbeit/thesis/lst/CXorayaPlugin_WCRT.cpp | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Master/Masterarbeit/thesis/lst/CXorayaPlugin_WCRT.cpp (limited to 'Master/Masterarbeit/thesis/lst/CXorayaPlugin_WCRT.cpp') diff --git a/Master/Masterarbeit/thesis/lst/CXorayaPlugin_WCRT.cpp b/Master/Masterarbeit/thesis/lst/CXorayaPlugin_WCRT.cpp new file mode 100644 index 0000000..c3c38aa --- /dev/null +++ b/Master/Masterarbeit/thesis/lst/CXorayaPlugin_WCRT.cpp @@ -0,0 +1,62 @@ +#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) +{ +} -- cgit v1.2.3