source: pacpussensors/trunk/CanGateway/driver/CanDriver.h@ 81

Last change on this file since 81 was 59, checked in by DHERBOMEZ Gérald, 10 years ago

Integration of new modules:

  • GPS NMEA0183 decoder
  • Span CPT Decoder

Update of:

File size: 1.8 KB
Line 
1/*********************************************************************
2// created: 2006/08/08 - 10:36
3// filename: CanDriver.h
4//
5// author: Gerald Dherbomez
6//
7// version: $Id: CanDriver.h 1191 2012-07-08 10:26:53Z gdherbom $
8//
9// purpose: This is a generic class which may be used to control
10// a CAN interface
11//
12// Only one driver can be used in the same application !
13//
14*********************************************************************/
15
16
17
18#ifndef _CANDRIVER_H_
19#define _CANDRIVER_H_
20
21
22#define VECTOR_CAN_DRIVER 1
23#define NI_CAN_DRIVER 2
24#define VECTOR_CANXL_DRIVER 3
25#define PEAK_CAN_DRIVER 4
26#define IGEP_CAN_DRIVER 5
27#define PEAK_CAN_DRIVER 6
28
29#if CAN_DRIVER_TYPE == VECTOR_CAN_DRIVER
30#include "VectorCanDriver.h"
31#define CanDriverType VectorCanDriver
32#elif CAN_DRIVER_TYPE == NI_CAN_DRIVER
33#include "NiCanDriver.h"
34#define CanDriverType NiCanDriver
35#elif CAN_DRIVER_TYPE == PEAK_CAN_DRIVER
36#include "PeakCanDriver.h"
37#define CanDriverType PeakCanDriver
38#elif CAN_DRIVER_TYPE == PEAK_CAN_DRIVER_WIN
39#include "PeakCanDriverWin.h"
40#define CanDriverType PeakCanDriverWin
41#elif CAN_DRIVER_TYPE == IGEP_CAN_DRIVER
42#include "igepCanDriver.h"
43#define CanDriverType igepCanDriver
44#elif CAN_DRIVER_TYPE == VECTOR_CANXL_DRIVER
45#include "XLVectorCanDriver.h"
46#define CanDriverType XLVectorCanDriver
47#else
48#define CanDriverType CanDriverUnknown
49#endif
50
51
52
53class CanDriver : public CanDriverType
54{
55public:
56 CanDriver(){};
57 CanDriver(int channel) : CanDriverType(channel){};
58 CanDriver(const int channel, const unsigned int speed)
59 : CanDriverType(channel, speed){};
60 CanDriver(char* port, char* mode):CanDriverType(port, mode){};
61 ~CanDriver(){};
62protected:
63
64private:
65};
66
67
68
69#endif
Note: See TracBrowser for help on using the repository browser.