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

Last change on this file since 54 was 4, checked in by guyardro, 11 years ago

add igep can driver for CanGateway and add support for igep compilation

File size: 1.7 KB
RevLine 
[1]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
[4]25#define PEAK_CAN_DRIVER 4
26#define IGEP_CAN_DRIVER 5
[1]27
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
[4]38#elif CAN_DRIVER_TYPE == IGEP_CAN_DRIVER
39#include "igepCanDriver.h"
40#define CanDriverType igepCanDriver
[1]41#elif CAN_DRIVER_TYPE == VECTOR_CANXL_DRIVER
42#include "XLVectorCanDriver.h"
43#define CanDriverType XLVectorCanDriver
44#else
45#define CanDriverType CanDriverUnknown
46#endif
47
48
49
50class CanDriver : public CanDriverType
51{
52public:
53 CanDriver(){};
54 CanDriver(int channel) : CanDriverType(channel){};
55 CanDriver(const int channel, const unsigned int speed)
56 : CanDriverType(channel, speed){};
57 CanDriver(char* port, char* mode):CanDriverType(port, mode){};
58 ~CanDriver(){};
59protected:
60
61private:
62};
63
64
65
66#endif
Note: See TracBrowser for help on using the repository browser.