Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
can::BufferedReader Class Reference

#include <reader.h>

Classes

class  ScopedEnabler
 

Public Member Functions

 BufferedReader ()
 
 BufferedReader (bool enable, size_t max_len=0)
 
void disable ()
 
void enable ()
 
void flush ()
 
bool isEnabled ()
 
void listen (CommInterfaceSharedPtr interface)
 
void listen (CommInterfaceSharedPtr interface, const Frame::Header &h)
 
template<typename DurationType >
bool read (can::Frame *msg, const DurationType &duration)
 
bool readUntil (can::Frame *msg, boost::chrono::high_resolution_clock::time_point abs_time)
 
bool setEnabled (bool enabled)
 
void setMaxLen (size_t max_len)
 

Private Member Functions

void handleFrame (const can::Frame &msg)
 
void trim ()
 

Private Attributes

std::deque< can::Framebuffer_
 
boost::condition_variable cond_
 
bool enabled_
 
CommInterface::FrameListenerConstSharedPtr listener_
 
size_t max_len_
 
boost::mutex mutex_
 

Detailed Description

Definition at line 13 of file reader.h.

Constructor & Destructor Documentation

can::BufferedReader::BufferedReader ( )
inline

Definition at line 48 of file reader.h.

can::BufferedReader::BufferedReader ( bool  enable,
size_t  max_len = 0 
)
inline

Definition at line 49 of file reader.h.

Member Function Documentation

void can::BufferedReader::disable ( )
inline

Definition at line 75 of file reader.h.

void can::BufferedReader::enable ( )
inline

Definition at line 70 of file reader.h.

void can::BufferedReader::flush ( )
inline

Definition at line 51 of file reader.h.

void can::BufferedReader::handleFrame ( const can::Frame msg)
inlineprivate

Definition at line 29 of file reader.h.

bool can::BufferedReader::isEnabled ( )
inline

Definition at line 60 of file reader.h.

void can::BufferedReader::listen ( CommInterfaceSharedPtr  interface)
inline

Definition at line 80 of file reader.h.

void can::BufferedReader::listen ( CommInterfaceSharedPtr  interface,
const Frame::Header h 
)
inline

Definition at line 85 of file reader.h.

template<typename DurationType >
bool can::BufferedReader::read ( can::Frame msg,
const DurationType &  duration 
)
inline

Definition at line 91 of file reader.h.

bool can::BufferedReader::readUntil ( can::Frame msg,
boost::chrono::high_resolution_clock::time_point  abs_time 
)
inline

Definition at line 94 of file reader.h.

bool can::BufferedReader::setEnabled ( bool  enabled)
inline

Definition at line 64 of file reader.h.

void can::BufferedReader::setMaxLen ( size_t  max_len)
inline

Definition at line 55 of file reader.h.

void can::BufferedReader::trim ( )
inlineprivate

Definition at line 21 of file reader.h.

Member Data Documentation

std::deque<can::Frame> can::BufferedReader::buffer_
private

Definition at line 14 of file reader.h.

boost::condition_variable can::BufferedReader::cond_
private

Definition at line 16 of file reader.h.

bool can::BufferedReader::enabled_
private

Definition at line 18 of file reader.h.

CommInterface::FrameListenerConstSharedPtr can::BufferedReader::listener_
private

Definition at line 17 of file reader.h.

size_t can::BufferedReader::max_len_
private

Definition at line 19 of file reader.h.

boost::mutex can::BufferedReader::mutex_
private

Definition at line 15 of file reader.h.


The documentation for this class was generated from the following file:


socketcan_interface
Author(s): Mathias Lüdtke
autogenerated on Sat May 4 2019 02:40:41