tCanMessage.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 //----------------------------------------------------------------------
25 //----------------------------------------------------------------------
26 #ifndef _icl_hardware_can_tCanMessage_h_
27 #define _icl_hardware_can_tCanMessage_h_
28 
29 #include <map>
30 #include <boost/shared_ptr.hpp>
31 
32 #include <icl_core/DataHeader.h>
33 
35 
36 namespace icl_hardware {
37 namespace can {
38 
40 
44 {
45  unsigned id;
46 #ifdef _IC_BUILDER_CAN_ITEC_
47  unsigned char eff; /* Extended frame format bit */
48 #endif
49  unsigned char dlc;
50  unsigned char rtr;
51  unsigned char data[8];
52 #ifdef _IC_BUILDER_CAN_ITEC_
53  struct timeval tv; /* Timestamp */
54 #endif
55 
59  tCanMessage(unsigned param_id = 0,
60  unsigned char param_dlc = 0,
61  unsigned char param_rtr = 0,
62  const unsigned char* param_data = 0);
63 
67  tCanMessage(const tCanMessage &other);
68 
72  tCanMessage& operator = (const tCanMessage &other);
73 
74 };
75 
81 typedef std::map<unsigned, CanMessageStamped> CanMessageMap;
83 typedef boost::shared_ptr<CanMessageMap> CanMessageMapPtr;
85 typedef boost::shared_ptr<const CanMessageMap> CanMessageMapConstPtr;
86 
87 }
88 }
89 
90 #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
std::map< unsigned, CanMessageStamped > CanMessageMap
Maps CAN IDs to the latest received message for each ID.
Definition: tCanMessage.h:81
Contains import/export definitions for the Win32 plattform.
icl_core::Stamped< tCanMessage > CanMessageStamped
Definition: tCanMessage.h:79
boost::shared_ptr< CanMessageMap > CanMessageMapPtr
Convenience shared pointer shorthand for CanMessageMap.
Definition: tCanMessage.h:83
icl_hardware::can::tCanMessage tCanMessage
Definition: UseMCACan.h:39
boost::shared_ptr< const CanMessageMap > CanMessageMapConstPtr
Convenience shared pointer shorthand for CanMessageMap (const version).
Definition: tCanMessage.h:85


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