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 ++++++++++++++++++++++ Master/Masterarbeit/thesis/lst/Makefile.txt | 7 +++ 2 files changed, 69 insertions(+) create mode 100644 Master/Masterarbeit/thesis/lst/CXorayaPlugin_WCRT.cpp create mode 100644 Master/Masterarbeit/thesis/lst/Makefile.txt (limited to 'Master/Masterarbeit/thesis/lst') 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) +{ +} diff --git a/Master/Masterarbeit/thesis/lst/Makefile.txt b/Master/Masterarbeit/thesis/lst/Makefile.txt new file mode 100644 index 0000000..43a3a42 --- /dev/null +++ b/Master/Masterarbeit/thesis/lst/Makefile.txt @@ -0,0 +1,7 @@ +LIBS := +G++ := c:/programme/x2e/x2e/toolchain/bin/powerpc-linux-gnu-g++.exe +all: + @echo 'Invoking cross compiler' + $(G++) -Ic:/programme/x2e/x2e/toolchain/powerpc-linux-gnu/libc/usr/include -I"c:\Dokumente und Einstellungen\Eisenhauer\Eigene Dateien\Masterarbeit\src\common\inc" -Os -g0 -Wall -c -fno-strict-aliasing -std=c++0x -msoft-float -mcpu=405 -fPIC -MMD -MP -o CXorayaPlugin_WCRT.o C:/temp/CXorayaPlugin_WCRT.cpp + @echo 'Invoking linker' + $(G++) -L"c:\Programme\x2e\x2e\toolchain\powerpc-linux-gnu\libc\nof\lib" -msoft-float -shared -o "C:/temp/CXorayaPlugin_WCRT.so" CXorayaPlugin_WCRT.o $(LIBS) -- cgit v1.2.3