/*! * \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 #include #include 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_ */