tCanMatrixParser.h
Go to the documentation of this file.
1 // -- BEGIN LICENSE BLOCK ----------------------------------------------
2 // This file is part of FZIs ic_workspace.
3 //
4 // This program is free software licensed under the LGPL
5 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
6 // You can find a copy of this license in LICENSE folder in the top
7 // directory of the source code.
8 //
9 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
10 //
11 // -- END LICENSE BLOCK ------------------------------------------------
12 
13 // ----------------------------------------------------------
14 /*
15  * tCanMatrixParser.h
16  * <section>
17  *
18  * Created by Hugo Ritzkowski on 01.04.2011.
19  * Copyright 2011
20  * Company Forschungszentrum Informatik (FZI), Abteilung IDS.
21  * All rights reserved.
22  *
23  */
24 // ----------------------------------------------------------
34 // ----------------------------------------------------------
35 
36 #ifndef _icl_hardware_tCanMatrixParser_h_
37 #define _icl_hardware_tCanMatrixParser_h_
38 
40 
41 #include <icl_core/tString.h>
42 
43 #include <fstream>
44 #include <boost/filesystem.hpp>
45 #include <map>
46 #include <vector>
47 
48 // Forward declaration
49 class TiXmlHandle;
50 class TiXmlElement;
51 
52 namespace icl_hardware {
53 namespace can {
54 
56 {
57  std::string description;
58  double conversion;
59  std::string unit;
60  unsigned int start_bit;
61  unsigned int signal_length;
62  double offset;
63  double lower_border;
64  double upper_border;
66  bool signedness;
67 };
68 
69 typedef std::map<unsigned int, std::vector<CanMatrixElement> > CanMatrix;
70 
72 {
73 public:
75  tCanMatrixParser(const std::string identifier = "");
76 
78  virtual ~tCanMatrixParser();
79 
80  const CanMatrix &getCanMatrix() const;
81 
82  const bool isActive() const;
83 
84 private:
85  int mapContentOfFile(TiXmlHandle& doc_handle);
86  int mapContentOfFile(void* dbc_);
87 
88  const int checkXmlFile(TiXmlElement *element) const;
89  void setDataFileName(const boost::filesystem::path &file_name);
90  const boost::filesystem::path & getDataFileName() const;
91 
92  CanMatrix m_canmatrix;
93  boost::filesystem::path *m_data_file_name;
95 };
96 
97 ICL_HARDWARE_CAN_IMPORT_EXPORT std::ostream& operator<<(std::ostream &stream, const CanMatrix& can_matrix);
98 
99 }
100 }
101 
102 #endif // _icl_hardware_tCanMatrixParser_h_
ICL_HARDWARE_CAN_IMPORT_EXPORT ICL_HARDWARE_CAN_IMPORT_EXPORT
Definition: Logging.h:36
std::ostream & operator<<(std::ostream &os, InterpretedCanMessages const &interpreted_can_messages)
boost::filesystem::path * m_data_file_name
Contains import/export definitions for the Win32 plattform.
std::map< unsigned int, std::vector< CanMatrixElement > > CanMatrix


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