Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
SerialIO Class Reference

#include <serialIO.h>

List of all members.

Public Member Functions

void closePort ()
void enqueueData (std::vector< ioData_t > data)
void enqueueData (const char *data, size_t len)
bool isOpen ()
int openPort (std::string devicestring, int baudrate)
int readData (std::string &value, size_t nBytes)
bool recover ()
int sendData (std::string value)
int sendData (const char *data, size_t len)
 SerialIO ()
void start ()
void stop ()
 ~SerialIO ()

Private Member Functions

speed_t getBaudFromInt (int baud)
void run ()

Private Attributes

int _baudrate
boost::condition_variable _condition
std::string _device_string
int _fd
boost::mutex _mutex
ConcurrentQueue< std::vector
< struct ioData > > 
_oQueue
boost::shared_ptr< boost::thread > _thread
struct termios port_settings

Static Private Attributes

static const int maxUpdateRate = 50

Detailed Description

Definition at line 39 of file serialIO.h.


Constructor & Destructor Documentation

Definition at line 25 of file serialIO.cpp.

Definition at line 30 of file serialIO.cpp.


Member Function Documentation

Definition at line 152 of file serialIO.cpp.

void SerialIO::enqueueData ( std::vector< ioData_t data)

Definition at line 130 of file serialIO.cpp.

void SerialIO::enqueueData ( const char *  data,
size_t  len 
)

Definition at line 135 of file serialIO.cpp.

speed_t SerialIO::getBaudFromInt ( int  baud) [private]

Definition at line 175 of file serialIO.cpp.

bool SerialIO::isOpen ( )

Definition at line 146 of file serialIO.cpp.

int SerialIO::openPort ( std::string  devicestring,
int  baudrate 
)

Definition at line 37 of file serialIO.cpp.

int SerialIO::readData ( std::string &  value,
size_t  nBytes 
)

Definition at line 83 of file serialIO.cpp.

Definition at line 161 of file serialIO.cpp.

void SerialIO::run ( ) [private]

Definition at line 117 of file serialIO.cpp.

int SerialIO::sendData ( std::string  value)

Definition at line 63 of file serialIO.cpp.

int SerialIO::sendData ( const char *  data,
size_t  len 
)

Definition at line 73 of file serialIO.cpp.

void SerialIO::start ( )

Definition at line 101 of file serialIO.cpp.

void SerialIO::stop ( )

Definition at line 107 of file serialIO.cpp.


Member Data Documentation

int SerialIO::_baudrate [private]

Definition at line 89 of file serialIO.h.

boost::condition_variable SerialIO::_condition [private]

Definition at line 80 of file serialIO.h.

std::string SerialIO::_device_string [private]

Definition at line 87 of file serialIO.h.

int SerialIO::_fd [private]

Definition at line 83 of file serialIO.h.

boost::mutex SerialIO::_mutex [private]

Definition at line 79 of file serialIO.h.

ConcurrentQueue<std::vector<struct ioData> > SerialIO::_oQueue [private]

Definition at line 76 of file serialIO.h.

boost::shared_ptr<boost::thread> SerialIO::_thread [private]

Definition at line 78 of file serialIO.h.

const int SerialIO::maxUpdateRate = 50 [static, private]

Definition at line 94 of file serialIO.h.

struct termios SerialIO::port_settings [private]

Definition at line 85 of file serialIO.h.


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


cob_light
Author(s): Benjamin Maidel
autogenerated on Sat Jun 8 2019 21:02:07