HardwareCanFilterInterpretMessage.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_FILTER_INTERPRET_MESSAGE_H_INCLUDED
24 #define ICL_HARDWARE_CAN_FILTER_INTERPRET_MESSAGE_H_INCLUDED
25 
27 
28 #include <icl_sourcesink/DataSinkRegistration.h>
30 #include <icl_sourcesink/DataFilter.h>
34 
35 namespace icl_hardware {
36 namespace can {
37 
42 SOURCESINK_DECLARE_CONSOLE_SINK(InterpretedCanMessageSinkConsole, InterpretedCanMessages, "interpretedcan+console")
43 
44 
45 
46 class ICL_HARDWARE_CAN_FILTER_IMPORT_EXPORT HardwareCanFilterInterpretMessage : public icl_sourcesink::DataFilter<tCanMessage, InterpretedCanMessages>
48 {
49 public:
51  typedef boost::shared_ptr<HardwareCanFilterInterpretMessage> Ptr;
53  typedef boost::shared_ptr<const HardwareCanFilterInterpretMessage> ConstPtr;
54 
55  static icl_sourcesink::URISchemeMap supportedURISchemes()
56  {
57  using namespace icl_sourcesink;
58  URISchemeMap schemes;
59  schemes.insert(
60  std::make_pair(
61  "can+interpreter",
62  URISchemeInfo(
63  "Converts tCanMessage to InterpretedCanMessage",
64  "can+interpreter:[?can_mask=<can_mask>]",
65  "<can_mask> Path to CAN mask file\n"
66  " (default: from config option /icl_hardware_can/can_mask)")));
67  return schemes;
68  }
69 
71  HardwareCanFilterInterpretMessage(const std::string& uri = "HardwareCanFilterInterpretMessage",
72  const std::string& name = "UnnamedHardwareCanFilterInterpretMessage");
73 
76 
78  virtual bool filter(const icl_core::Stamped<tCanMessage>& input_data,
80 
81 private:
84 };
85 
86 SOURCESINK_DECLARE_GENERIC_SINK_FACTORY(HardwareCanFilterInterpretMessage)
87 
88 }
89 }
90 
91 #endif
#define ICL_HARDWARE_CAN_FILTER_IMPORT_EXPORT
Implements a struct representing a can message.
Definition: tCanMessage.h:43
CanMatrix m_can_mask
Describes how the CAN traffic is to be interpreted.
This modul constructs a map of a can-mask-file the map can be request by getcanmatrix() ...
Contains CAN driver interface functions.
boost::shared_ptr< HardwareCanFilterInterpretMessage > Ptr
Shared pointer shorthand.
boost::shared_ptr< const HardwareCanFilterInterpretMessage > ConstPtr
Const shared pointer shorthand.
std::map< unsigned int, std::vector< CanMatrixElement > > CanMatrix
std::vector< InterpretedCanMessage > InterpretedCanMessages


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