Handles I/O reading and writing. More...
#include <worker.h>
Public Types | |
typedef boost::function< void(unsigned char *, std::size_t &) | Callback ) |
Public Member Functions | |
virtual bool | isOpen () const =0 |
Whether or not the I/O stream is open. | |
virtual bool | send (const unsigned char *data, const unsigned int size)=0 |
Send the data in the buffer. | |
virtual void | setCallback (const Callback &callback)=0 |
Set the callback function for received messages. | |
virtual void | setRawDataCallback (const Callback &callback)=0 |
Set the callback function which handles raw data. | |
virtual void | wait (const boost::posix_time::time_duration &timeout)=0 |
Wait for an incoming message. | |
virtual | ~Worker () |
typedef boost::function<void(unsigned char*, std::size_t&) ublox_gps::Worker::Callback) |
virtual ublox_gps::Worker::~Worker | ( | ) | [inline, virtual] |
virtual bool ublox_gps::Worker::isOpen | ( | ) | const [pure virtual] |
Whether or not the I/O stream is open.
Implemented in ublox_gps::AsyncWorker< StreamT >.
virtual bool ublox_gps::Worker::send | ( | const unsigned char * | data, |
const unsigned int | size | ||
) | [pure virtual] |
Send the data in the buffer.
data | the bytes to send |
size | the size of the buffer |
Implemented in ublox_gps::AsyncWorker< StreamT >.
virtual void ublox_gps::Worker::setCallback | ( | const Callback & | callback | ) | [pure virtual] |
Set the callback function for received messages.
callback | the callback function which process messages in the buffer |
Implemented in ublox_gps::AsyncWorker< StreamT >.
virtual void ublox_gps::Worker::setRawDataCallback | ( | const Callback & | callback | ) | [pure virtual] |
Set the callback function which handles raw data.
callback | the write callback which handles raw data |
Implemented in ublox_gps::AsyncWorker< StreamT >.
virtual void ublox_gps::Worker::wait | ( | const boost::posix_time::time_duration & | timeout | ) | [pure virtual] |
Wait for an incoming message.
timeout | the maximum time to wait. |
Implemented in ublox_gps::AsyncWorker< StreamT >.