Public Member Functions | Private Member Functions | Private Attributes | List of all members
io::AsyncManager< IoType > Class Template Reference

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>

Inheritance diagram for io::AsyncManager< IoType >:
Inheritance graph
[legend]

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_
 
ROSaicNodeBasenode_
 Pointer to the node. More...
 
Timestamp recvStamp_
 Timestamp of receiving buffer. More...
 
std::atomic< bool > running_
 
std::shared_ptr< Telegramtelegram_
 Telegram. More...
 
TelegramQueuetelegramQueue_
 TelegramQueue. More...
 
std::thread watchdogThread_
 

Detailed Description

template<typename IoType>
class io::AsyncManager< IoType >

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.

Constructor & Destructor Documentation

◆ AsyncManager()

template<typename IoType >
io::AsyncManager< IoType >::AsyncManager ( ROSaicNodeBase node,
TelegramQueue telegramQueue 
)

Class constructor.

Parameters
[in]nodePointer to node
[in]telegramQueueTelegram queue

Definition at line 159 of file async_manager.hpp.

◆ ~AsyncManager()

template<typename IoType >
io::AsyncManager< IoType >::~AsyncManager

Definition at line 169 of file async_manager.hpp.

Member Function Documentation

◆ close()

template<typename IoType >
void io::AsyncManager< IoType >::close
private

Definition at line 225 of file async_manager.hpp.

◆ connect()

template<typename IoType >
bool io::AsyncManager< IoType >::connect ( )
virtual

Connects the stream.

Implements io::AsyncManagerBase.

Definition at line 181 of file async_manager.hpp.

◆ readSbf()

template<typename IoType >
void io::AsyncManager< IoType >::readSbf ( std::size_t  length)
private

Definition at line 505 of file async_manager.hpp.

◆ readSbfHeader()

template<typename IoType >
void io::AsyncManager< IoType >::readSbfHeader
private

Definition at line 464 of file async_manager.hpp.

◆ readString()

template<typename IoType >
void io::AsyncManager< IoType >::readString
private

Definition at line 552 of file async_manager.hpp.

◆ readStringElements()

template<typename IoType >
void io::AsyncManager< IoType >::readStringElements
private

Definition at line 560 of file async_manager.hpp.

◆ readSync()

template<typename IoType >
template<uint8_t index>
void io::AsyncManager< IoType >::readSync
private

Definition at line 304 of file async_manager.hpp.

◆ readUnknown()

template<typename IoType >
void io::AsyncManager< IoType >::readUnknown
private

Definition at line 544 of file async_manager.hpp.

◆ receive()

template<typename IoType >
void io::AsyncManager< IoType >::receive
private

Definition at line 214 of file async_manager.hpp.

◆ resync()

template<typename IoType >
void io::AsyncManager< IoType >::resync
private

Definition at line 296 of file async_manager.hpp.

◆ runIoService()

template<typename IoType >
void io::AsyncManager< IoType >::runIoService
private

Definition at line 231 of file async_manager.hpp.

◆ runWatchdog()

template<typename IoType >
void io::AsyncManager< IoType >::runWatchdog
private

Definition at line 238 of file async_manager.hpp.

◆ send()

template<typename IoType >
void io::AsyncManager< IoType >::send ( const std::string &  cmd)
virtual

Sends commands to the receiver.

Implements io::AsyncManagerBase.

Definition at line 201 of file async_manager.hpp.

◆ setPort()

template<typename IoType >
void io::AsyncManager< IoType >::setPort ( const std::string &  port)

Definition at line 195 of file async_manager.hpp.

◆ write()

template<typename IoType >
void io::AsyncManager< IoType >::write ( const std::string &  cmd)
private

Definition at line 274 of file async_manager.hpp.

Member Data Documentation

◆ buf_

template<typename IoType >
std::array<uint8_t, 1> io::AsyncManager< IoType >::buf_
private

Definition at line 149 of file async_manager.hpp.

◆ ioInterface_

template<typename IoType >
IoType io::AsyncManager< IoType >::ioInterface_
private

Definition at line 144 of file async_manager.hpp.

◆ ioService_

template<typename IoType >
std::shared_ptr<boost::asio::io_service> io::AsyncManager< IoType >::ioService_
private

Definition at line 143 of file async_manager.hpp.

◆ ioThread_

template<typename IoType >
std::thread io::AsyncManager< IoType >::ioThread_
private

Definition at line 146 of file async_manager.hpp.

◆ node_

template<typename IoType >
ROSaicNodeBase* io::AsyncManager< IoType >::node_
private

Pointer to the node.

Definition at line 142 of file async_manager.hpp.

◆ recvStamp_

template<typename IoType >
Timestamp io::AsyncManager< IoType >::recvStamp_
private

Timestamp of receiving buffer.

Definition at line 151 of file async_manager.hpp.

◆ running_

template<typename IoType >
std::atomic<bool> io::AsyncManager< IoType >::running_
private

Definition at line 145 of file async_manager.hpp.

◆ telegram_

template<typename IoType >
std::shared_ptr<Telegram> io::AsyncManager< IoType >::telegram_
private

Telegram.

Definition at line 153 of file async_manager.hpp.

◆ telegramQueue_

template<typename IoType >
TelegramQueue* io::AsyncManager< IoType >::telegramQueue_
private

TelegramQueue.

Definition at line 155 of file async_manager.hpp.

◆ watchdogThread_

template<typename IoType >
std::thread io::AsyncManager< IoType >::watchdogThread_
private

Definition at line 147 of file async_manager.hpp.


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


septentrio_gnss_driver
Author(s): Tibor Dome
autogenerated on Wed Nov 22 2023 04:04:28