#include <ThreadedSerialDevice.hpp>
Public Member Functions | |
void | closeDevice () |
std::string | getTerminalChars () const |
void | openDevice (int oflag=O_RDWR|O_NOCTTY|O_NONBLOCK) |
void | registerSerialDeviceListener (SerialDeviceListener *listener) |
void | setTerminalChars (const std::string &terminalChars_) |
ThreadedSerialDevice () | |
ThreadedSerialDevice (const std::string &deviceName_, const std::string &terminalChars_="\r\n", bool autoOpen=true, int oflag=O_RDWR|O_NOCTTY|O_NONBLOCK) | |
void | unRegisterSerialDeviceListener (SerialDeviceListener *listener) |
virtual | ~ThreadedSerialDevice () |
Protected Member Functions | |
void | informListeners (const std::vector< char > &data) |
void | readingThreadFcn () |
void | stopReadingThread () |
Protected Attributes | |
boost::thread * | readingThread |
bool | readingThreadStopRequest |
std::set< SerialDeviceListener * > | serialDeviceListenerSet |
std::string | terminalChars |
Definition at line 30 of file ThreadedSerialDevice.hpp.
Definition at line 19 of file ThreadedSerialDevice.cpp.
TELEKYB_NAMESPACE::ThreadedSerialDevice::ThreadedSerialDevice | ( | const std::string & | deviceName_, |
const std::string & | terminalChars_ = "\r\n" , |
||
bool | autoOpen = true , |
||
int | oflag = O_RDWR | O_NOCTTY | O_NONBLOCK |
||
) |
Definition at line 28 of file ThreadedSerialDevice.cpp.
Definition at line 44 of file ThreadedSerialDevice.cpp.
Reimplemented from TELEKYB_NAMESPACE::SerialDevice.
Definition at line 156 of file ThreadedSerialDevice.cpp.
std::string TELEKYB_NAMESPACE::ThreadedSerialDevice::getTerminalChars | ( | ) | const |
Definition at line 49 of file ThreadedSerialDevice.cpp.
void TELEKYB_NAMESPACE::ThreadedSerialDevice::informListeners | ( | const std::vector< char > & | data | ) | [protected] |
Definition at line 132 of file ThreadedSerialDevice.cpp.
void TELEKYB_NAMESPACE::ThreadedSerialDevice::openDevice | ( | int | oflag = O_RDWR | O_NOCTTY | O_NONBLOCK | ) |
Reimplemented from TELEKYB_NAMESPACE::SerialDevice.
Definition at line 140 of file ThreadedSerialDevice.cpp.
void TELEKYB_NAMESPACE::ThreadedSerialDevice::readingThreadFcn | ( | ) | [protected] |
Definition at line 59 of file ThreadedSerialDevice.cpp.
void TELEKYB_NAMESPACE::ThreadedSerialDevice::registerSerialDeviceListener | ( | SerialDeviceListener * | listener | ) |
Definition at line 163 of file ThreadedSerialDevice.cpp.
void TELEKYB_NAMESPACE::ThreadedSerialDevice::setTerminalChars | ( | const std::string & | terminalChars_ | ) |
Definition at line 54 of file ThreadedSerialDevice.cpp.
void TELEKYB_NAMESPACE::ThreadedSerialDevice::stopReadingThread | ( | ) | [protected] |
Definition at line 122 of file ThreadedSerialDevice.cpp.
void TELEKYB_NAMESPACE::ThreadedSerialDevice::unRegisterSerialDeviceListener | ( | SerialDeviceListener * | listener | ) |
Definition at line 168 of file ThreadedSerialDevice.cpp.
boost::thread* TELEKYB_NAMESPACE::ThreadedSerialDevice::readingThread [protected] |
Definition at line 34 of file ThreadedSerialDevice.hpp.
bool TELEKYB_NAMESPACE::ThreadedSerialDevice::readingThreadStopRequest [protected] |
Definition at line 37 of file ThreadedSerialDevice.hpp.
std::set<SerialDeviceListener*> TELEKYB_NAMESPACE::ThreadedSerialDevice::serialDeviceListenerSet [protected] |
Definition at line 33 of file ThreadedSerialDevice.hpp.
std::string TELEKYB_NAMESPACE::ThreadedSerialDevice::terminalChars [protected] |
Definition at line 35 of file ThreadedSerialDevice.hpp.