Public Member Functions | Private Member Functions | Private Attributes | List of all members
io::CommunicationCore Class Reference

Handles communication with and configuration of the mosaic (and beyond) receiver(s) More...

#include <communication_core.hpp>

Public Member Functions

 CommunicationCore (ROSaicNodeBase *node)
 Constructor of the class CommunicationCore. More...
 
void configureRx ()
 Configures Rx: Which SBF/NMEA messages it should output and later correction settings. More...
 
void connect ()
 Connects the data stream. More...
 
void sendVelocity (const std::string &velNmea)
 Hands over NMEA velocity message over to the send() method of manager_. More...
 
 ~CommunicationCore ()
 Default destructor of the class CommunicationCore. More...
 

Private Member Functions

bool initializeIo ()
 Initializes the I/O handling. More...
 
void processTelegrams ()
 
std::string resetMainConnection ()
 Reset main connection so it can receive commands. More...
 
void resetSettings ()
 Resets Rx settings. More...
 
void send (const std::string &)
 Hands over to the send() method of manager_. More...
 

Private Attributes

bool initializedIo_ = false
 Whether connecting was successful. More...
 
std::string mainConnectionPort_
 Main communication port. More...
 
std::unique_ptr< AsyncManagerBasemanager_
 
bool nmeaActivated_ = false
 
ROSaicNodeBasenode_
 Pointer to Node. More...
 
std::thread processingThread_
 Processing thread. More...
 
std::atomic< bool > running_
 Indicator for threads to run. More...
 
const Settingssettings_
 Settings. More...
 
std::string streamPort_
 
std::unique_ptr< AsyncManager< TcpIo > > tcpClient_
 
TelegramHandler telegramHandler_
 TelegramHandler. More...
 
TelegramQueue telegramQueue_
 TelegramQueue. More...
 
std::unique_ptr< UdpClientudpClient_
 

Detailed Description

Handles communication with and configuration of the mosaic (and beyond) receiver(s)

Definition at line 96 of file communication_core.hpp.

Constructor & Destructor Documentation

◆ CommunicationCore()

io::CommunicationCore::CommunicationCore ( ROSaicNodeBase node)

Constructor of the class CommunicationCore.

Parameters
[in]nodePointer to node

Definition at line 61 of file communication_core.cpp.

◆ ~CommunicationCore()

io::CommunicationCore::~CommunicationCore ( )

Default destructor of the class CommunicationCore.

Definition at line 71 of file communication_core.cpp.

Member Function Documentation

◆ configureRx()

void io::CommunicationCore::configureRx ( )

Configures Rx: Which SBF/NMEA messages it should output and later correction settings.

The send() method of AsyncManager class is paramount for this purpose. Note that std::to_string() is from C++11 onwards only. Since ROSaic can be launched before booting the Rx, we have to watch out for escape characters that are sent by the Rx to indicate that it is in upgrade mode. Those characters would then be mingled with the first command we send to it in this method and could result in an invalid command. Hence we first enter command mode via "SSSSSSSSSS".

Definition at line 267 of file communication_core.cpp.

◆ connect()

void io::CommunicationCore::connect ( )

Connects the data stream.

Definition at line 162 of file communication_core.cpp.

◆ initializeIo()

bool io::CommunicationCore::initializeIo ( )
private

Initializes the I/O handling.

  • Returns
    Wether connection was successful

Definition at line 204 of file communication_core.cpp.

◆ processTelegrams()

void io::CommunicationCore::processTelegrams ( )
private

Definition at line 960 of file communication_core.cpp.

◆ resetMainConnection()

std::string io::CommunicationCore::resetMainConnection ( )
private

Reset main connection so it can receive commands.

Returns
Main connection descriptor

Definition at line 944 of file communication_core.cpp.

◆ resetSettings()

void io::CommunicationCore::resetSettings ( )
private

Resets Rx settings.

Definition at line 83 of file communication_core.cpp.

◆ send()

void io::CommunicationCore::send ( const std::string &  cmd)
private

Hands over to the send() method of manager_.

Parameters
cmdThe command to hand over

Definition at line 972 of file communication_core.cpp.

◆ sendVelocity()

void io::CommunicationCore::sendVelocity ( const std::string &  velNmea)

Hands over NMEA velocity message over to the send() method of manager_.

Parameters
cmdThe command to hand over

Definition at line 938 of file communication_core.cpp.

Member Data Documentation

◆ initializedIo_

bool io::CommunicationCore::initializedIo_ = false
private

Whether connecting was successful.

Definition at line 164 of file communication_core.hpp.

◆ mainConnectionPort_

std::string io::CommunicationCore::mainConnectionPort_
private

Main communication port.

Definition at line 178 of file communication_core.hpp.

◆ manager_

std::unique_ptr<AsyncManagerBase> io::CommunicationCore::manager_
private

Processes I/O stream data This declaration is deliberately stream-independent (Serial or TCP).

Definition at line 167 of file communication_core.hpp.

◆ nmeaActivated_

bool io::CommunicationCore::nmeaActivated_ = false
private

Definition at line 172 of file communication_core.hpp.

◆ node_

ROSaicNodeBase* io::CommunicationCore::node_
private

Pointer to Node.

Definition at line 154 of file communication_core.hpp.

◆ processingThread_

std::thread io::CommunicationCore::processingThread_
private

Processing thread.

Definition at line 162 of file communication_core.hpp.

◆ running_

std::atomic<bool> io::CommunicationCore::running_
private

Indicator for threads to run.

Definition at line 175 of file communication_core.hpp.

◆ settings_

const Settings* io::CommunicationCore::settings_
private

Settings.

Definition at line 156 of file communication_core.hpp.

◆ streamPort_

std::string io::CommunicationCore::streamPort_
private

Definition at line 180 of file communication_core.hpp.

◆ tcpClient_

std::unique_ptr<AsyncManager<TcpIo> > io::CommunicationCore::tcpClient_
private

Definition at line 169 of file communication_core.hpp.

◆ telegramHandler_

TelegramHandler io::CommunicationCore::telegramHandler_
private

TelegramHandler.

Definition at line 160 of file communication_core.hpp.

◆ telegramQueue_

TelegramQueue io::CommunicationCore::telegramQueue_
private

TelegramQueue.

Definition at line 158 of file communication_core.hpp.

◆ udpClient_

std::unique_ptr<UdpClient> io::CommunicationCore::udpClient_
private

Definition at line 170 of file communication_core.hpp.


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


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