HardwareCanFilterInterpretMessage.h
Go to the documentation of this file.
00001 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
00002 
00003 // -- BEGIN LICENSE BLOCK ----------------------------------------------
00004 // This file is part of FZIs ic_workspace.
00005 //
00006 // This program is free software licensed under the LGPL
00007 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
00008 // You can find a copy of this license in LICENSE folder in the top
00009 // directory of the source code.
00010 //
00011 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
00012 //
00013 // -- END LICENSE BLOCK ------------------------------------------------
00014 
00015 //----------------------------------------------------------------------
00022 //----------------------------------------------------------------------
00023 #ifndef ICL_HARDWARE_CAN_FILTER_INTERPRET_MESSAGE_H_INCLUDED
00024 #define ICL_HARDWARE_CAN_FILTER_INTERPRET_MESSAGE_H_INCLUDED
00025 
00026 #include <icl_hardware_can/filter/ImportExport.h>
00027 
00028 #include <icl_sourcesink/DataSinkRegistration.h>
00029 #include <icl_hardware_can/sink/HardwareCanSink.h>
00030 #include <icl_sourcesink/DataFilter.h>
00031 #include <icl_hardware_can/tCanMessage.h>
00032 #include <icl_hardware_can/InterpretedCanMessage.h>
00033 #include <icl_hardware_can/tCanMatrixParser.h>
00034 
00035 namespace icl_hardware {
00036 namespace can {
00037 
00042 SOURCESINK_DECLARE_CONSOLE_SINK(InterpretedCanMessageSinkConsole, InterpretedCanMessages, "interpretedcan+console")
00043 
00044 
00045 
00046 
00047 class ICL_HARDWARE_CAN_FILTER_IMPORT_EXPORT HardwareCanFilterInterpretMessage : public icl_sourcesink::DataFilter<tCanMessage, InterpretedCanMessages>
00048 {
00049 public:
00051   typedef boost::shared_ptr<HardwareCanFilterInterpretMessage> Ptr;
00053   typedef boost::shared_ptr<const HardwareCanFilterInterpretMessage> ConstPtr;
00054 
00055   static icl_sourcesink::URISchemeMap supportedURISchemes()
00056   {
00057     using namespace icl_sourcesink;
00058     URISchemeMap schemes;
00059     schemes.insert(
00060       std::make_pair(
00061         "can+interpreter",
00062         URISchemeInfo(
00063           "Converts tCanMessage to InterpretedCanMessage",
00064           "can+interpreter:[?can_mask=<can_mask>]",
00065           "<can_mask>  Path to CAN mask file\n"
00066           "            (default: from config option /icl_hardware_can/can_mask)")));
00067     return schemes;
00068   }
00069 
00071   HardwareCanFilterInterpretMessage(const std::string& uri = "HardwareCanFilterInterpretMessage",
00072                                     const std::string& name = "UnnamedHardwareCanFilterInterpretMessage");
00073 
00075   virtual ~HardwareCanFilterInterpretMessage();
00076 
00078   virtual bool filter(const icl_core::Stamped<tCanMessage>& input_data,
00079                       icl_core::Stamped<InterpretedCanMessages>& output_data);
00080 
00081 private:
00083   CanMatrix m_can_mask;
00084 };
00085 
00086 SOURCESINK_DECLARE_GENERIC_SINK_FACTORY(HardwareCanFilterInterpretMessage)
00087 
00088 }
00089 }
00090 
00091 #endif


fzi_icl_can
Author(s):
autogenerated on Thu Jun 6 2019 20:26:01