Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00024
00025 #ifndef ICL_HARDWARE_CAN_T_CAN_DEVICE_H_INCLUDED
00026 #define ICL_HARDWARE_CAN_T_CAN_DEVICE_H_INCLUDED
00027
00028 #include <fcntl.h>
00029 #include <stdlib.h>
00030 #ifndef _SYSTEM_WIN32_
00031 # include <unistd.h>
00032 #endif
00033
00034 #include "icl_hardware_can/tCanMessage.h"
00035
00036 namespace icl_hardware {
00037 namespace can {
00038
00039 class ICL_HARDWARE_CAN_IMPORT_EXPORT tCanDevice
00040 {
00041 public:
00042 static tCanDevice *Create(const char *device_name, int flags,
00043 unsigned char acceptance_code, unsigned char acceptance_mask, unsigned int baud_rate,
00044 unsigned send_fifo_size, unsigned receive_fifo_size);
00045
00046 virtual ~tCanDevice();
00047 virtual int Send(const tCanMessage &msg) = 0;
00048 virtual int Receive(tCanMessage &msg) = 0;
00049 virtual void Reset() = 0;
00050 virtual bool IsInitialized() = 0;
00051
00052 static void CheckLXRTInterface();
00053
00054 protected:
00055 static bool m_canlxrt_available;
00056 };
00057
00058 }
00059 }
00060
00061 #endif