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...
 
void close ()
 
bool connect ()
 Connects the stream. More...
 
bool connected ()
 
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
bool connected ()
 
virtual ~AsyncManagerBase ()
 

Private Member Functions

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 runIoContext ()
 
void runWatchdog ()
 
void write (const std::string &cmd)
 

Private Attributes

std::array< uint8_t, 1 > buf_
 
bool connected_ = false
 
std::shared_ptr< boost::asio::io_context > ioContext_
 
IoType ioInterface_
 
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 111 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 167 of file async_manager.hpp.

◆ ~AsyncManager()

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

Definition at line 176 of file async_manager.hpp.

Member Function Documentation

◆ close()

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

Implements io::AsyncManagerBase.

Definition at line 198 of file async_manager.hpp.

◆ connect()

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

Connects the stream.

Implements io::AsyncManagerBase.

Definition at line 183 of file async_manager.hpp.

◆ connected()

template<typename IoType >
bool io::AsyncManager< IoType >::connected

Definition at line 235 of file async_manager.hpp.

◆ readSbf()

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

Definition at line 543 of file async_manager.hpp.

◆ readSbfHeader()

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

Definition at line 501 of file async_manager.hpp.

◆ readString()

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

Definition at line 591 of file async_manager.hpp.

◆ readStringElements()

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

Definition at line 599 of file async_manager.hpp.

◆ readSync()

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

Definition at line 328 of file async_manager.hpp.

◆ readUnknown()

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

Definition at line 583 of file async_manager.hpp.

◆ receive()

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

Definition at line 241 of file async_manager.hpp.

◆ resync()

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

Definition at line 320 of file async_manager.hpp.

◆ runIoContext()

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

Definition at line 252 of file async_manager.hpp.

◆ runWatchdog()

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

Definition at line 260 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 221 of file async_manager.hpp.

◆ setPort()

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

Definition at line 215 of file async_manager.hpp.

◆ write()

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

Definition at line 298 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 157 of file async_manager.hpp.

◆ connected_

template<typename IoType >
bool io::AsyncManager< IoType >::connected_ = false
private

Definition at line 155 of file async_manager.hpp.

◆ ioContext_

template<typename IoType >
std::shared_ptr<boost::asio::io_context> io::AsyncManager< IoType >::ioContext_
private

Definition at line 149 of file async_manager.hpp.

◆ ioInterface_

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

Definition at line 150 of file async_manager.hpp.

◆ ioThread_

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

Definition at line 152 of file async_manager.hpp.

◆ node_

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

Pointer to the node.

Definition at line 148 of file async_manager.hpp.

◆ recvStamp_

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

Timestamp of receiving buffer.

Definition at line 159 of file async_manager.hpp.

◆ running_

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

Definition at line 151 of file async_manager.hpp.

◆ telegram_

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

Telegram.

Definition at line 161 of file async_manager.hpp.

◆ telegramQueue_

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

TelegramQueue.

Definition at line 163 of file async_manager.hpp.

◆ watchdogThread_

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

Definition at line 153 of file async_manager.hpp.


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


septentrio_gnss_driver
Author(s): Tibor Dome, Thomas Emter
autogenerated on Sat May 10 2025 03:03:11