#include <async_worker.h>

Public Member Functions | |
| AsyncWorker (StreamT &stream, boost::asio::io_service &io_service, std::size_t buffer_size=8192) | |
| bool | send (const unsigned char *data, const unsigned int size) |
| void | setCallback (const Callback &callback) |
| void | wait (const boost::posix_time::time_duration &timeout) |
| virtual | ~AsyncWorker () |
Protected Member Functions | |
| void | doClose () |
| void | doRead () |
| void | doWrite () |
| void | readEnd (const boost::system::error_code &, std::size_t) |
Protected Attributes | |
| boost::shared_ptr< boost::thread > | background_thread_ |
| std::vector< unsigned char > | in_ |
| std::size_t | in_buffer_size_ |
| boost::asio::io_service & | io_service_ |
| std::vector< unsigned char > | out_ |
| Callback | read_callback_ |
| boost::condition | read_condition_ |
| boost::mutex | read_mutex_ |
| bool | stopping_ |
| StreamT & | stream_ |
| boost::condition | write_condition_ |
| boost::mutex | write_mutex_ |
Definition at line 46 of file async_worker.h.
| ublox_gps::AsyncWorker< StreamT >::AsyncWorker | ( | StreamT & | stream, |
| boost::asio::io_service & | io_service, | ||
| std::size_t | buffer_size = 8192 |
||
| ) |
Definition at line 82 of file async_worker.h.
| ublox_gps::AsyncWorker< StreamT >::~AsyncWorker | ( | ) | [virtual] |
Definition at line 97 of file async_worker.h.
| void ublox_gps::AsyncWorker< StreamT >::doClose | ( | ) | [protected] |
Definition at line 164 of file async_worker.h.
| void ublox_gps::AsyncWorker< StreamT >::doRead | ( | ) | [protected] |
Definition at line 116 of file async_worker.h.
| void ublox_gps::AsyncWorker< StreamT >::doWrite | ( | ) | [protected] |
Definition at line 147 of file async_worker.h.
| void ublox_gps::AsyncWorker< StreamT >::readEnd | ( | const boost::system::error_code & | error, |
| std::size_t | bytes_transfered | ||
| ) | [protected] |
Definition at line 123 of file async_worker.h.
| bool ublox_gps::AsyncWorker< StreamT >::send | ( | const unsigned char * | data, |
| const unsigned int | size | ||
| ) | [virtual] |
Implements ublox_gps::Worker.
Definition at line 105 of file async_worker.h.
| void ublox_gps::AsyncWorker< StreamT >::setCallback | ( | const Callback & | callback | ) | [inline, virtual] |
Implements ublox_gps::Worker.
Definition at line 52 of file async_worker.h.
| void ublox_gps::AsyncWorker< StreamT >::wait | ( | const boost::posix_time::time_duration & | timeout | ) | [virtual] |
Implements ublox_gps::Worker.
Definition at line 172 of file async_worker.h.
boost::shared_ptr<boost::thread> ublox_gps::AsyncWorker< StreamT >::background_thread_ [protected] |
Definition at line 75 of file async_worker.h.
std::vector<unsigned char> ublox_gps::AsyncWorker< StreamT >::in_ [protected] |
Definition at line 68 of file async_worker.h.
std::size_t ublox_gps::AsyncWorker< StreamT >::in_buffer_size_ [protected] |
Definition at line 69 of file async_worker.h.
boost::asio::io_service& ublox_gps::AsyncWorker< StreamT >::io_service_ [protected] |
Definition at line 64 of file async_worker.h.
std::vector<unsigned char> ublox_gps::AsyncWorker< StreamT >::out_ [protected] |
Definition at line 73 of file async_worker.h.
Callback ublox_gps::AsyncWorker< StreamT >::read_callback_ [protected] |
Definition at line 76 of file async_worker.h.
boost::condition ublox_gps::AsyncWorker< StreamT >::read_condition_ [protected] |
Definition at line 67 of file async_worker.h.
boost::mutex ublox_gps::AsyncWorker< StreamT >::read_mutex_ [protected] |
Definition at line 66 of file async_worker.h.
bool ublox_gps::AsyncWorker< StreamT >::stopping_ [protected] |
Definition at line 78 of file async_worker.h.
StreamT& ublox_gps::AsyncWorker< StreamT >::stream_ [protected] |
Definition at line 63 of file async_worker.h.
boost::condition ublox_gps::AsyncWorker< StreamT >::write_condition_ [protected] |
Definition at line 72 of file async_worker.h.
boost::mutex ublox_gps::AsyncWorker< StreamT >::write_mutex_ [protected] |
Definition at line 71 of file async_worker.h.