blob: 5772a9605e41f4528d8bd9ca1c9f13713a4683a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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_ */
|