Public Member Functions | Protected Member Functions | Protected Attributes
ublox_gps::AsyncWorker< StreamT > Class Template Reference

#include <async_worker.h>

Inheritance diagram for ublox_gps::AsyncWorker< StreamT >:
Inheritance graph
[legend]

List of all members.

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_

Detailed Description

template<typename StreamT>
class ublox_gps::AsyncWorker< StreamT >

Definition at line 46 of file async_worker.h.


Constructor & Destructor Documentation

template<typename StreamT >
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.

template<typename StreamT >
ublox_gps::AsyncWorker< StreamT >::~AsyncWorker ( ) [virtual]

Definition at line 97 of file async_worker.h.


Member Function Documentation

template<typename StreamT >
void ublox_gps::AsyncWorker< StreamT >::doClose ( ) [protected]

Definition at line 164 of file async_worker.h.

template<typename StreamT >
void ublox_gps::AsyncWorker< StreamT >::doRead ( ) [protected]

Definition at line 116 of file async_worker.h.

template<typename StreamT >
void ublox_gps::AsyncWorker< StreamT >::doWrite ( ) [protected]

Definition at line 147 of file async_worker.h.

template<typename StreamT >
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.

template<typename StreamT >
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.

template<typename StreamT >
void ublox_gps::AsyncWorker< StreamT >::setCallback ( const Callback callback) [inline, virtual]

Implements ublox_gps::Worker.

Definition at line 52 of file async_worker.h.

template<typename StreamT >
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.


Member Data Documentation

template<typename StreamT >
boost::shared_ptr<boost::thread> ublox_gps::AsyncWorker< StreamT >::background_thread_ [protected]

Definition at line 75 of file async_worker.h.

template<typename StreamT >
std::vector<unsigned char> ublox_gps::AsyncWorker< StreamT >::in_ [protected]

Definition at line 68 of file async_worker.h.

template<typename StreamT >
std::size_t ublox_gps::AsyncWorker< StreamT >::in_buffer_size_ [protected]

Definition at line 69 of file async_worker.h.

template<typename StreamT >
boost::asio::io_service& ublox_gps::AsyncWorker< StreamT >::io_service_ [protected]

Definition at line 64 of file async_worker.h.

template<typename StreamT >
std::vector<unsigned char> ublox_gps::AsyncWorker< StreamT >::out_ [protected]

Definition at line 73 of file async_worker.h.

template<typename StreamT >
Callback ublox_gps::AsyncWorker< StreamT >::read_callback_ [protected]

Definition at line 76 of file async_worker.h.

template<typename StreamT >
boost::condition ublox_gps::AsyncWorker< StreamT >::read_condition_ [protected]

Definition at line 67 of file async_worker.h.

template<typename StreamT >
boost::mutex ublox_gps::AsyncWorker< StreamT >::read_mutex_ [protected]

Definition at line 66 of file async_worker.h.

template<typename StreamT >
bool ublox_gps::AsyncWorker< StreamT >::stopping_ [protected]

Definition at line 78 of file async_worker.h.

template<typename StreamT >
StreamT& ublox_gps::AsyncWorker< StreamT >::stream_ [protected]

Definition at line 63 of file async_worker.h.

template<typename StreamT >
boost::condition ublox_gps::AsyncWorker< StreamT >::write_condition_ [protected]

Definition at line 72 of file async_worker.h.

template<typename StreamT >
boost::mutex ublox_gps::AsyncWorker< StreamT >::write_mutex_ [protected]

Definition at line 71 of file async_worker.h.


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


ublox_gps
Author(s): Johannes Meyer
autogenerated on Wed Aug 26 2015 16:35:59