summaryrefslogtreecommitdiffstats
path: root/Master/Masterarbeit/src/common/inc/plugin_api_heap.h
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Masterarbeit/src/common/inc/plugin_api_heap.h
downloadStudium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.gz
Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Masterarbeit/src/common/inc/plugin_api_heap.h')
-rw-r--r--Master/Masterarbeit/src/common/inc/plugin_api_heap.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/Master/Masterarbeit/src/common/inc/plugin_api_heap.h b/Master/Masterarbeit/src/common/inc/plugin_api_heap.h
new file mode 100644
index 0000000..5772a96
--- /dev/null
+++ b/Master/Masterarbeit/src/common/inc/plugin_api_heap.h
@@ -0,0 +1,53 @@
+/*!
+ * \file plugin_api_heap.h
+ * \author S. Eisenhauer
+ * \date 31.08.2011
+ * \brief STL-based interface of a plugin used by \ref CPluginExecutor
+ *
+ * This file defines a interface for plugins to \ref CPluginExecutor.
+ * This interface is based on the STL which uses heap for internal allocations
+ *
+ */
+
+#ifndef PLUGIN_API_H_
+#define PLUGIN_API_H_
+
+#include "global.h"
+#include "interface_manager.h"
+#include <vector>
+#include <boost/shared_ptr.hpp>
+#include <boost/array.hpp>
+
+struct tstCanTxMessage
+{
+ uint32_t u32TxCycleMilliseconds;
+ uint32_t u32MillisecondCounter;
+ uint32_t u32CanId;
+ uint8_t au8Data[8];
+ uint8_t u8Dlc;
+};
+typedef boost::shared_ptr< tstCanTxMessage > tpstCanTxMessage;
+typedef std::vector< tpstCanTxMessage > tCanTxMessageList;
+
+class IPlugin
+{
+public:
+ virtual void vRun( void ) = 0;
+ virtual tCanTxMessageList& xGetCanTxMessages( void ) = 0;
+ virtual int32_t i32GetCanInterfaceHandle( void ) = 0;
+};
+
+typedef IPlugin* tpxCreatePlugin(
+ IInterfaceManager& xIfMan,
+ int32_t i32Interface,
+ uint32_t u32PluginId
+ );
+typedef void tvDestroyPlugin(IPlugin*);
+
+extern "C"
+{
+ tpxCreatePlugin pxCreatePlugin;
+ tvDestroyPlugin vDestroyPlugin;
+}
+
+#endif /* PLUGIN_API_H_ */