#include <async_read_buffer.h>
Public Member Functions | |
| AsyncReadBuffer (AsyncReadStream &s, size_t capacity, boost::function< void(const boost::system::error_code &)> error_callback) | |
| void | read (size_t requested_bytes, boost::function< void(ros::serialization::IStream &)> callback) |
| Commands a fixed number of bytes from the buffer. This may be fulfilled from existing buffer content, or following a hardware read if required. More... | |
Private Member Functions | |
| size_t | bytesAvailable () |
| size_t | bytesHeadroom () |
| void | callback (const boost::system::error_code &error, size_t bytes_transferred) |
| The internal callback which is called by the boost::asio::async_read invocation in the public read method above. More... | |
| void | callSuccessCallback () |
| Calls the user's callback. This is a separate function because it gets called from two places, depending whether or not an actual HW read is required to fill the request. More... | |
| void | reset () |
Private Attributes | |
| boost::function< void(const boost::system::error_code &)> | error_callback_ |
| std::vector< uint8_t > | mem_ |
| size_t | read_index_ |
| size_t | read_requested_bytes_ |
| boost::function< void(ros::serialization::IStream &)> | read_success_callback_ |
| AsyncReadStream & | stream_ |
| size_t | write_index_ |
Definition at line 52 of file async_read_buffer.h.
|
inline |
Definition at line 55 of file async_read_buffer.h.
|
inlineprivate |
Definition at line 121 of file async_read_buffer.h.
|
inlineprivate |
Definition at line 126 of file async_read_buffer.h.
|
inlineprivate |
The internal callback which is called by the boost::asio::async_read invocation in the public read method above.
Definition at line 135 of file async_read_buffer.h.
|
inlineprivate |
Calls the user's callback. This is a separate function because it gets called from two places, depending whether or not an actual HW read is required to fill the request.
Definition at line 164 of file async_read_buffer.h.
|
inline |
Commands a fixed number of bytes from the buffer. This may be fulfilled from existing buffer content, or following a hardware read if required.
Definition at line 67 of file async_read_buffer.h.
|
inlineprivate |
Definition at line 115 of file async_read_buffer.h.
|
private |
Definition at line 196 of file async_read_buffer.h.
|
private |
Definition at line 192 of file async_read_buffer.h.
|
private |
Definition at line 195 of file async_read_buffer.h.
|
private |
Definition at line 199 of file async_read_buffer.h.
|
private |
Definition at line 198 of file async_read_buffer.h.
|
private |
Definition at line 191 of file async_read_buffer.h.
|
private |
Definition at line 194 of file async_read_buffer.h.