tCanDevice.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 // This file is part of FZIs ic_workspace.
5 //
6 // This program is free software licensed under the LGPL
7 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
8 // You can find a copy of this license in LICENSE folder in the top
9 // directory of the source code.
10 //
11 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
12 //
13 // -- END LICENSE BLOCK ------------------------------------------------
14 
15 //----------------------------------------------------------------------
24 //----------------------------------------------------------------------
25 #ifndef ICL_HARDWARE_CAN_T_CAN_DEVICE_H_INCLUDED
26 #define ICL_HARDWARE_CAN_T_CAN_DEVICE_H_INCLUDED
27 
28 #include <fcntl.h>
29 #include <stdlib.h>
30 #ifndef _SYSTEM_WIN32_
31 # include <unistd.h>
32 #endif
33 
35 
36 namespace icl_hardware {
37 namespace can {
38 
40 {
41 public:
42  static tCanDevice *Create(const char *device_name, int flags,
43  unsigned char acceptance_code, unsigned char acceptance_mask, unsigned int baud_rate,
44  unsigned send_fifo_size, unsigned receive_fifo_size);
45 
46  virtual ~tCanDevice();
47  virtual int Send(const tCanMessage &msg) = 0;
48  virtual int Receive(tCanMessage &msg) = 0;
49  virtual void Reset() = 0;
50  virtual bool IsInitialized() = 0;
51 
52  static void CheckLXRTInterface();
53 
54 protected:
55  static bool m_canlxrt_available;
56 };
57 
58 }
59 }
60 
61 #endif
Implements a struct representing a can message.
Definition: tCanMessage.h:43
ICL_HARDWARE_CAN_IMPORT_EXPORT ICL_HARDWARE_CAN_IMPORT_EXPORT
Definition: Logging.h:36
Contains CAN driver interface functions.


fzi_icl_can
Author(s):
autogenerated on Mon Jun 10 2019 13:17:02