29 #include <icl_core_thread/tThread.h> 30 #include <icl_sourcesink/SimpleURI.h> 39 icl_sourcesink::SimpleURI parsed_uri(uri);
42 boost::optional<uint32_t> uri_baudrate = parsed_uri.getQuery<
uint32_t>(
"baudrate");
45 can_baudrate = *uri_baudrate;
51 LOGGING_DEBUG(CAN,
"Opening CAN-Device... " <<
endl);
64 LOGGING_DEBUG(CAN,
"CAN device successfully initialized." <<
endl);
81 LOGGING_ERROR(CAN,
"CAN device is not available, ignoring received message." <<
endl);
85 if (!msg || ((*msg)->id == 0 && (*msg)->dlc == 0 && (*msg)->rtr == 0))
icl_sourcesink::DataSink< tCanMessage > HardwareCanSink
Base type for all sinks providing tCanMessage data.
virtual ~HardwareCanSinkPeak()
Destructor.
#define LOGGING_DEBUG(streamname, arg)
static tCanDevice * Create(const char *device_name, int flags, unsigned char acceptance_code, unsigned char acceptance_mask, unsigned int baud_rate, unsigned send_fifo_size, unsigned receive_fifo_size)
boost::shared_ptr< Stamped< DataType > > Ptr
#define LOGGING_ERROR(streamname, arg)
static void CheckLXRTInterface()
ThreadStream & endl(ThreadStream &stream)
boost::scoped_ptr< tCanDevice > m_can_device
The CAN device.
virtual void set(const CanMessageStamped::Ptr &msg)
HardwareCanSinkPeak(const std::string &uri="HardwareCanSinkPeak", const std::string &name="UnnamedHardwareCanSinkPeak")
Constructor.
#define LOGGING_WARNING(streamname, arg)