#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 (boost::shared_ptr< CommInterface > interface) |
void | listen (boost::shared_ptr< CommInterface > 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::Frame > | buffer_ |
boost::condition_variable | cond_ |
bool | enabled_ |
CommInterface::FrameListener::Ptr | listener_ |
size_t | max_len_ |
boost::mutex | mutex_ |
can::BufferedReader::BufferedReader | ( | ) | [inline] |
can::BufferedReader::BufferedReader | ( | bool | enable, |
size_t | max_len = 0 |
||
) | [inline] |
void can::BufferedReader::disable | ( | ) | [inline] |
void can::BufferedReader::enable | ( | ) | [inline] |
void can::BufferedReader::flush | ( | ) | [inline] |
void can::BufferedReader::handleFrame | ( | const can::Frame & | msg | ) | [inline, private] |
bool can::BufferedReader::isEnabled | ( | ) | [inline] |
void can::BufferedReader::listen | ( | boost::shared_ptr< CommInterface > | interface | ) | [inline] |
void can::BufferedReader::listen | ( | boost::shared_ptr< CommInterface > | interface, |
const Frame::Header & | h | ||
) | [inline] |
bool can::BufferedReader::read | ( | can::Frame * | msg, |
const DurationType & | duration | ||
) | [inline] |
bool can::BufferedReader::readUntil | ( | can::Frame * | msg, |
boost::chrono::high_resolution_clock::time_point | abs_time | ||
) | [inline] |
bool can::BufferedReader::setEnabled | ( | bool | enabled | ) | [inline] |
void can::BufferedReader::setMaxLen | ( | size_t | max_len | ) | [inline] |
void can::BufferedReader::trim | ( | ) | [inline, private] |
std::deque<can::Frame> can::BufferedReader::buffer_ [private] |
boost::condition_variable can::BufferedReader::cond_ [private] |
bool can::BufferedReader::enabled_ [private] |
size_t can::BufferedReader::max_len_ [private] |
boost::mutex can::BufferedReader::mutex_ [private] |