tCanFilterMessages.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 //----------------------------------------------------------------------
22 //----------------------------------------------------------------------
23 #ifndef ICL_HARDWARE_CAN_T_CAN_FILTER_MESSAGES_H_INCLUDED
24 #define ICL_HARDWARE_CAN_T_CAN_FILTER_MESSAGES_H_INCLUDED
25 
28 
29 #include <icl_core/tString.h>
30 
31 #include <fstream>
32 #include <boost/filesystem.hpp>
33 #include <map>
34 
35 namespace icl_hardware {
36 namespace can {
37 
45 {
46 public:
49 
52 
53  void Open(const std::string identifer);
54 
55  bool getStatus() const;
56 
58  bool checkMessage(const tCanMessage& msg) const;
59 
60 protected:
61 
62  bool byteIsChangingConstantly(unsigned int i, unsigned int id) const;
63 
64  void mapContentOfFile();
65  void StringToCanMsg(icl_hardware::can::tCanMessage &msg, std::string str);
66 
67  int PrepareFiles();
68 
69  void setDataFileName(const boost::filesystem::path &file_name);
70  const boost::filesystem::path & getDataFileName() const;
71 
72 private:
73  struct DataWrapper
74  {
75  unsigned char data[8];
76  };
77 
78  std::map<unsigned int, DataWrapper> m_table_id_to_data;
79  std::multimap<unsigned int, unsigned int> m_table_id_to_changing_bytes;
80 
82  std::ifstream m_data_file;
83 
84  boost::filesystem::path *m_data_file_name;
85 
87 
89 };
90 
91 }
92 }
93 
94 #endif
boost::filesystem::path * m_data_file_name
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::multimap< unsigned int, unsigned int > m_table_id_to_changing_bytes
std::map< unsigned int, DataWrapper > m_table_id_to_data
Contains CAN driver interface functions.
Contains import/export definitions for the Win32 plattform.
std::ifstream m_data_file
File handler for data file.


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