tCanDevice.h
Go to the documentation of this file.
00001 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
00002 
00003 // -- BEGIN LICENSE BLOCK ----------------------------------------------
00004 // This file is part of FZIs ic_workspace.
00005 //
00006 // This program is free software licensed under the LGPL
00007 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
00008 // You can find a copy of this license in LICENSE folder in the top
00009 // directory of the source code.
00010 //
00011 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
00012 //
00013 // -- END LICENSE BLOCK ------------------------------------------------
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


fzi_icl_can
Author(s):
autogenerated on Tue Aug 8 2017 03:07:51