HardwareCanSinkPeak.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 //----------------------------------------------------------------------
00024 //----------------------------------------------------------------------
00025 #ifndef ICL_HARDWARE_CAN_SINK_HARDWARE_CAN_SINK_PEAK_H_INCLUDED
00026 #define ICL_HARDWARE_CAN_SINK_HARDWARE_CAN_SINK_PEAK_H_INCLUDED
00027 
00028 #include <icl_sourcesink/DataSinkRegistration.h>
00029 
00030 #include <icl_hardware_can/sink/ImportExport.h>
00031 #include <icl_hardware_can/sink/HardwareCanSink.h>
00032 #include <icl_hardware_can/tCanDevice.h>
00033 
00034 namespace icl_hardware {
00035 namespace can {
00036 
00040 class ICL_HARDWARE_CAN_SINK_IMPORT_EXPORT HardwareCanSinkPeak : public HardwareCanSink
00041 {
00042 public:
00044   typedef boost::shared_ptr<HardwareCanSinkPeak> Ptr;
00046   typedef boost::shared_ptr<const HardwareCanSinkPeak> ConstPtr;
00047 
00048   static icl_sourcesink::URISchemeMap supportedURISchemes()
00049   {
00050     using namespace icl_sourcesink;
00051     URISchemeMap schemes;
00052     schemes.insert(
00053       std::make_pair(
00054         "can+peak",
00055         URISchemeInfo(
00056           "Writes CAN message data to a Peak CAN device.",
00057           "can+peak:<path>[?baudrate=<baudrate>]",
00058           "<path>         Path to CAN device (default: /dev/pcan0)\n"
00059           "<baudrate>     CAN baudrate [kbps] (default: 500).")));
00060     return schemes;
00061   }
00062 
00064   HardwareCanSinkPeak(const std::string& uri = "HardwareCanSinkPeak",
00065                       const std::string& name = "UnnamedHardwareCanSinkPeak");
00066 
00068   virtual ~HardwareCanSinkPeak();
00069 
00071   virtual void set(const CanMessageStamped::Ptr& msg);
00072 
00073 private:
00075   boost::scoped_ptr<tCanDevice> m_can_device;
00076 };
00077 
00078 SOURCESINK_DECLARE_GENERIC_SINK_FACTORY(HardwareCanSinkPeak)
00079 
00080 }
00081 }
00082 
00083 #endif


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