This is the central interface between ROSaic and the Rx(s), managing I/O operations such as reading messages and sending commands.. More...
#include <async_manager.hpp>
Public Member Functions | |
AsyncManager (ROSaicNodeBase *node, TelegramQueue *telegramQueue) | |
Class constructor. More... | |
bool | connect () |
Connects the stream. More... | |
void | send (const std::string &cmd) |
Sends commands to the receiver. More... | |
void | setPort (const std::string &port) |
~AsyncManager () | |
Public Member Functions inherited from io::AsyncManagerBase | |
virtual | ~AsyncManagerBase () |
Private Member Functions | |
void | close () |
void | readSbf (std::size_t length) |
void | readSbfHeader () |
void | readString () |
void | readStringElements () |
template<uint8_t index> | |
void | readSync () |
void | readUnknown () |
void | receive () |
void | resync () |
void | runIoService () |
void | runWatchdog () |
void | write (const std::string &cmd) |
Private Attributes | |
std::array< uint8_t, 1 > | buf_ |
IoType | ioInterface_ |
std::shared_ptr< boost::asio::io_service > | ioService_ |
std::thread | ioThread_ |
ROSaicNodeBase * | node_ |
Pointer to the node. More... | |
Timestamp | recvStamp_ |
Timestamp of receiving buffer. More... | |
std::atomic< bool > | running_ |
std::shared_ptr< Telegram > | telegram_ |
Telegram. More... | |
TelegramQueue * | telegramQueue_ |
TelegramQueue. More... | |
std::thread | watchdogThread_ |
This is the central interface between ROSaic and the Rx(s), managing I/O operations such as reading messages and sending commands..
IoType is either boost::asio::serial_port or boost::asio::tcp::ip
Definition at line 108 of file async_manager.hpp.
io::AsyncManager< IoType >::AsyncManager | ( | ROSaicNodeBase * | node, |
TelegramQueue * | telegramQueue | ||
) |
Class constructor.
[in] | node | Pointer to node |
[in] | telegramQueue | Telegram queue |
Definition at line 159 of file async_manager.hpp.
io::AsyncManager< IoType >::~AsyncManager |
Definition at line 169 of file async_manager.hpp.
|
private |
Definition at line 225 of file async_manager.hpp.
|
virtual |
Connects the stream.
Implements io::AsyncManagerBase.
Definition at line 181 of file async_manager.hpp.
|
private |
Definition at line 505 of file async_manager.hpp.
|
private |
Definition at line 464 of file async_manager.hpp.
|
private |
Definition at line 552 of file async_manager.hpp.
|
private |
Definition at line 560 of file async_manager.hpp.
|
private |
Definition at line 304 of file async_manager.hpp.
|
private |
Definition at line 544 of file async_manager.hpp.
|
private |
Definition at line 214 of file async_manager.hpp.
|
private |
Definition at line 296 of file async_manager.hpp.
|
private |
Definition at line 231 of file async_manager.hpp.
|
private |
Definition at line 238 of file async_manager.hpp.
|
virtual |
Sends commands to the receiver.
Implements io::AsyncManagerBase.
Definition at line 201 of file async_manager.hpp.
void io::AsyncManager< IoType >::setPort | ( | const std::string & | port | ) |
Definition at line 195 of file async_manager.hpp.
|
private |
Definition at line 274 of file async_manager.hpp.
|
private |
Definition at line 149 of file async_manager.hpp.
|
private |
Definition at line 144 of file async_manager.hpp.
|
private |
Definition at line 143 of file async_manager.hpp.
|
private |
Definition at line 146 of file async_manager.hpp.
|
private |
Pointer to the node.
Definition at line 142 of file async_manager.hpp.
|
private |
Timestamp of receiving buffer.
Definition at line 151 of file async_manager.hpp.
|
private |
Definition at line 145 of file async_manager.hpp.
|
private |
Definition at line 153 of file async_manager.hpp.
|
private |
TelegramQueue.
Definition at line 155 of file async_manager.hpp.
|
private |
Definition at line 147 of file async_manager.hpp.