Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
iv::comms::nmea0183::Nmea0183CommunicationController Class Referencefinal

#include <Nmea0183CommunicationController.hpp>

Inheritance diagram for iv::comms::nmea0183::Nmea0183CommunicationController:
[legend]
Collaboration diagram for iv::comms::nmea0183::Nmea0183CommunicationController:
[legend]

Public Member Functions

 Nmea0183CommunicationController (const std::shared_ptr< ICommunicationDriver > &driver, const std::shared_ptr< iv::model::comms::NetworkData > &networkData)
 
 Nmea0183CommunicationController (const Nmea0183CommunicationController &other)=delete
 
 Nmea0183CommunicationController (Nmea0183CommunicationController &&other)=delete
 
 ~Nmea0183CommunicationController () override=default
 
Nmea0183CommunicationControlleroperator= (const Nmea0183CommunicationController &other)=delete
 
Nmea0183CommunicationControlleroperator= (const Nmea0183CommunicationController &&other)=delete
 
void pause () const
 
void resume () const
 
iv::types::networkId getNetworkId () const
 
std::shared_ptr< iv::model::comms::NetworkDatagetCommConfig () const
 
std::shared_ptr< iv::comms::ICommunicationDrivergetDriver () const
 
bool hasChannel (const iv::types::channelId &channelId) const
 
bool isEnabled ()
 

Protected Attributes

iv::types::networkId m_networkId
 
std::shared_ptr< bool > m_isEnabled
 
std::shared_ptr< iv::model::comms::NetworkDatam_commConfig
 
std::shared_ptr< iv::comms::ICommunicationProtocolm_protocol
 
std::shared_ptr< iv::comms::ICommunicationDriverm_driver
 
std::map< iv::types::channelId, std::shared_ptr< iv::channels::AbstractChannel > > m_channels
 
std::weak_ptr< iv::channels::AbstractChannelm_errorChannel
 
std::weak_ptr< iv::channels::AbstractChannelm_heartbeatChannel
 
std::weak_ptr< iv::comms::ICommunicationControllerm_fallbackComm
 
std::weak_ptr< iv::diamar::AppFailuresLoggerManagerm_appFailuresLoggerManager
 

Private Member Functions

void addChannel (const std::shared_ptr< iv::channels::AbstractChannel > &channel) override
 add channel to the communication and reads to wich header and field it's assigned
 
void initialize () override
 This function creates the nmea0183 protocol and start the comms thread.
 
bool frame () override
 This function is called periodically to handle the nmea0183 communication. It reads nmea0183 messages from the protocol and assigns the values of each field to channels if defined.
 
void processSimpleHeader (const std::shared_ptr< Nmea0183CommunicationProtocol > &protocol, const iv::types::comms::nmea0183::nmeaHeader &channelHeader, const std::vector< NmeaChannelBinding > &channels)
 
void processCompoundHeader (const std::shared_ptr< Nmea0183CommunicationProtocol > &protocol, const iv::types::comms::nmea0183::nmeaHeader &channelHeader, const std::vector< NmeaChannelBinding > &channels)
 

Private Attributes

std::map< iv::types::comms::nmea0183::nmeaHeader, std::vector< NmeaChannelBinding > > m_channelBindings
 
iv::model::comms::nmea0183::Settings m_nmeaSettings
 
iv::types::timestamp m_lastFrameTime
 

Friends

class Nmea0183CommunicationControllerFrame
 

Constructor & Destructor Documentation

◆ Nmea0183CommunicationController() [1/3]

iv::comms::nmea0183::Nmea0183CommunicationController::Nmea0183CommunicationController ( const std::shared_ptr< ICommunicationDriver > & driver,
const std::shared_ptr< iv::model::comms::NetworkData > & networkData )
explicit

◆ Nmea0183CommunicationController() [2/3]

iv::comms::nmea0183::Nmea0183CommunicationController::Nmea0183CommunicationController ( const Nmea0183CommunicationController & other)
delete

◆ Nmea0183CommunicationController() [3/3]

iv::comms::nmea0183::Nmea0183CommunicationController::Nmea0183CommunicationController ( Nmea0183CommunicationController && other)
delete

◆ ~Nmea0183CommunicationController()

iv::comms::nmea0183::Nmea0183CommunicationController::~Nmea0183CommunicationController ( )
overridedefault

Member Function Documentation

◆ addChannel()

void iv::comms::nmea0183::Nmea0183CommunicationController::addChannel ( const std::shared_ptr< iv::channels::AbstractChannel > & channel)
overrideprivatevirtual

add channel to the communication and reads to wich header and field it's assigned

Parameters
channel

Esto solo lo quiere la redundancia. Pq no lo ponemos solo en el controller de redundancia?

Implements iv::comms::ICommunicationController.

◆ frame()

bool iv::comms::nmea0183::Nmea0183CommunicationController::frame ( )
overrideprivatevirtual

This function is called periodically to handle the nmea0183 communication. It reads nmea0183 messages from the protocol and assigns the values of each field to channels if defined.

Returns
true if successful false otherwise

Implements iv::comms::ICommunicationController.

◆ getCommConfig()

std::shared_ptr< iv::model::comms::NetworkData > iv::comms::ICommunicationController::getCommConfig ( ) const
inlinenodiscardinherited

◆ getDriver()

std::shared_ptr< iv::comms::ICommunicationDriver > iv::comms::ICommunicationController::getDriver ( ) const
inlinenodiscardinherited

◆ getNetworkId()

iv::types::networkId iv::comms::ICommunicationController::getNetworkId ( ) const
inlinenodiscardinherited

◆ hasChannel()

bool iv::comms::ICommunicationController::hasChannel ( const iv::types::channelId & channelId) const
inlinenodiscardinherited

◆ initialize()

void iv::comms::nmea0183::Nmea0183CommunicationController::initialize ( )
overrideprivatevirtual

This function creates the nmea0183 protocol and start the comms thread.

Implements iv::comms::ICommunicationController.

◆ isEnabled()

bool iv::comms::ICommunicationController::isEnabled ( )
inlinenodiscardinherited

◆ operator=() [1/2]

Nmea0183CommunicationController & iv::comms::nmea0183::Nmea0183CommunicationController::operator= ( const Nmea0183CommunicationController && other)
delete

◆ operator=() [2/2]

Nmea0183CommunicationController & iv::comms::nmea0183::Nmea0183CommunicationController::operator= ( const Nmea0183CommunicationController & other)
delete

◆ pause()

void iv::comms::ICommunicationController::pause ( ) const
inlineinherited

◆ processCompoundHeader()

void iv::comms::nmea0183::Nmea0183CommunicationController::processCompoundHeader ( const std::shared_ptr< Nmea0183CommunicationProtocol > & protocol,
const iv::types::comms::nmea0183::nmeaHeader & channelHeader,
const std::vector< NmeaChannelBinding > & channels )
private

◆ processSimpleHeader()

void iv::comms::nmea0183::Nmea0183CommunicationController::processSimpleHeader ( const std::shared_ptr< Nmea0183CommunicationProtocol > & protocol,
const iv::types::comms::nmea0183::nmeaHeader & channelHeader,
const std::vector< NmeaChannelBinding > & channels )
private

◆ resume()

void iv::comms::ICommunicationController::resume ( ) const
inlineinherited

Friends And Related Symbol Documentation

◆ Nmea0183CommunicationControllerFrame

Member Data Documentation

◆ m_appFailuresLoggerManager

std::weak_ptr<iv::diamar::AppFailuresLoggerManager> iv::comms::ICommunicationController::m_appFailuresLoggerManager
protectedinherited

◆ m_channelBindings

std::map<iv::types::comms::nmea0183::nmeaHeader, std::vector<NmeaChannelBinding> > iv::comms::nmea0183::Nmea0183CommunicationController::m_channelBindings
private

◆ m_channels

std::map<iv::types::channelId, std::shared_ptr<iv::channels::AbstractChannel> > iv::comms::ICommunicationController::m_channels
protectedinherited

◆ m_commConfig

std::shared_ptr<iv::model::comms::NetworkData> iv::comms::ICommunicationController::m_commConfig
protectedinherited

◆ m_driver

std::shared_ptr<iv::comms::ICommunicationDriver> iv::comms::ICommunicationController::m_driver
protectedinherited

◆ m_errorChannel

std::weak_ptr<iv::channels::AbstractChannel> iv::comms::ICommunicationController::m_errorChannel
protectedinherited

◆ m_fallbackComm

std::weak_ptr<iv::comms::ICommunicationController> iv::comms::ICommunicationController::m_fallbackComm
protectedinherited

◆ m_heartbeatChannel

std::weak_ptr<iv::channels::AbstractChannel> iv::comms::ICommunicationController::m_heartbeatChannel
protectedinherited

◆ m_isEnabled

std::shared_ptr<bool> iv::comms::ICommunicationController::m_isEnabled
protectedinherited

◆ m_lastFrameTime

iv::types::timestamp iv::comms::nmea0183::Nmea0183CommunicationController::m_lastFrameTime
private

◆ m_networkId

iv::types::networkId iv::comms::ICommunicationController::m_networkId
protectedinherited

◆ m_nmeaSettings

iv::model::comms::nmea0183::Settings iv::comms::nmea0183::Nmea0183CommunicationController::m_nmeaSettings
private

◆ m_protocol

std::shared_ptr<iv::comms::ICommunicationProtocol> iv::comms::ICommunicationController::m_protocol
protectedinherited

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