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

◆ BufferedReader() [1/2]

can::BufferedReader::BufferedReader ( )
inline

Definition at line 48 of file reader.h.

◆ BufferedReader() [2/2]

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

Definition at line 49 of file reader.h.

Member Function Documentation

◆ disable()

void can::BufferedReader::disable ( )
inline

Definition at line 75 of file reader.h.

◆ enable()

void can::BufferedReader::enable ( )
inline

Definition at line 70 of file reader.h.

◆ flush()

void can::BufferedReader::flush ( )
inline

Definition at line 51 of file reader.h.

◆ handleFrame()

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

Definition at line 29 of file reader.h.

◆ isEnabled()

bool can::BufferedReader::isEnabled ( )
inline

Definition at line 60 of file reader.h.

◆ listen() [1/2]

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

Definition at line 80 of file reader.h.

◆ listen() [2/2]

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

Definition at line 85 of file reader.h.

◆ read()

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

Definition at line 91 of file reader.h.

◆ readUntil()

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.

◆ setEnabled()

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

Definition at line 64 of file reader.h.

◆ setMaxLen()

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

Definition at line 55 of file reader.h.

◆ trim()

void can::BufferedReader::trim ( )
inlineprivate

Definition at line 21 of file reader.h.

Member Data Documentation

◆ buffer_

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

Definition at line 14 of file reader.h.

◆ cond_

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

Definition at line 16 of file reader.h.

◆ enabled_

bool can::BufferedReader::enabled_
private

Definition at line 18 of file reader.h.

◆ listener_

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

Definition at line 17 of file reader.h.

◆ max_len_

size_t can::BufferedReader::max_len_
private

Definition at line 19 of file reader.h.

◆ mutex_

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 Wed Mar 2 2022 00:52:25