HardwareCanSinkPeak.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 //----------------------------------------------------------------------
24 //----------------------------------------------------------------------
25 #ifndef ICL_HARDWARE_CAN_SINK_HARDWARE_CAN_SINK_PEAK_H_INCLUDED
26 #define ICL_HARDWARE_CAN_SINK_HARDWARE_CAN_SINK_PEAK_H_INCLUDED
27 
28 #include <icl_sourcesink/DataSinkRegistration.h>
29 
33 
34 namespace icl_hardware {
35 namespace can {
36 
41 {
42 public:
44  typedef boost::shared_ptr<HardwareCanSinkPeak> Ptr;
46  typedef boost::shared_ptr<const HardwareCanSinkPeak> ConstPtr;
47 
48  static icl_sourcesink::URISchemeMap supportedURISchemes()
49  {
50  using namespace icl_sourcesink;
51  URISchemeMap schemes;
52  schemes.insert(
53  std::make_pair(
54  "can+peak",
55  URISchemeInfo(
56  "Writes CAN message data to a Peak CAN device.",
57  "can+peak:<path>[?baudrate=<baudrate>]",
58  "<path> Path to CAN device (default: /dev/pcan0)\n"
59  "<baudrate> CAN baudrate [kbps] (default: 500).")));
60  return schemes;
61  }
62 
64  HardwareCanSinkPeak(const std::string& uri = "HardwareCanSinkPeak",
65  const std::string& name = "UnnamedHardwareCanSinkPeak");
66 
68  virtual ~HardwareCanSinkPeak();
69 
71  virtual void set(const CanMessageStamped::Ptr& msg);
72 
73 private:
75  boost::scoped_ptr<tCanDevice> m_can_device;
76 };
77 
78 SOURCESINK_DECLARE_GENERIC_SINK_FACTORY(HardwareCanSinkPeak)
79 
80 }
81 }
82 
83 #endif
icl_sourcesink::DataSink< tCanMessage > HardwareCanSink
Base type for all sinks providing tCanMessage data.
boost::shared_ptr< HardwareCanSinkPeak > Ptr
Shared pointer shorthand.
boost::shared_ptr< Stamped< DataType > > Ptr
boost::scoped_ptr< tCanDevice > m_can_device
The CAN device.
#define ICL_HARDWARE_CAN_SINK_IMPORT_EXPORT
boost::shared_ptr< const HardwareCanSinkPeak > ConstPtr
Const shared pointer shorthand.
static icl_sourcesink::URISchemeMap supportedURISchemes()


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