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

#include <VdrCommunicationController.hpp>

Inheritance diagram for iv::comms::vdr::VdrCommunicationController:
[legend]
Collaboration diagram for iv::comms::vdr::VdrCommunicationController:
[legend]

Public Member Functions

 VdrCommunicationController (const std::shared_ptr< ICommunicationDriver > &driver, const std::shared_ptr< iv::model::comms::NetworkData > &networkData)
 
void addChannel (const std::shared_ptr< iv::channels::AbstractChannel > &channel) override
 
void initialize () override
 Initialize the thread for VDR communication.
 
bool frame () override
 This functions is called periodically to send the events contained in the alarmQueue through the serial driver.
 
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 ()
 

Public Attributes

std::unique_ptr< iv::containers::CircularQueue< std::shared_ptr< iv::alarms::Event >, 5000 > > m_vdrAlarmQueue
 Queue that contains all events processed by the alarmManager.
 

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 Attributes

std::map< iv::types::channelId, VdrChannelInfom_channelsInVdr
 
std::shared_ptr< iv::comms::serial::SerialCommunicationsDriverm_serialDriver
 

Friends

class VdrCommunicationControllerFrame
 

Constructor & Destructor Documentation

◆ VdrCommunicationController()

iv::comms::vdr::VdrCommunicationController::VdrCommunicationController ( const std::shared_ptr< ICommunicationDriver > & driver,
const std::shared_ptr< iv::model::comms::NetworkData > & networkData )

Member Function Documentation

◆ addChannel()

void iv::comms::vdr::VdrCommunicationController::addChannel ( const std::shared_ptr< iv::channels::AbstractChannel > & channel)
overridevirtual

◆ frame()

bool iv::comms::vdr::VdrCommunicationController::frame ( )
overridevirtual

This functions is called periodically to send the events contained in the alarmQueue through the serial driver.

Returns
true if the sending was successful or the queue was empty

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::vdr::VdrCommunicationController::initialize ( )
overridevirtual

Initialize the thread for VDR communication.

Implements iv::comms::ICommunicationController.

◆ isEnabled()

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

◆ pause()

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

◆ resume()

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

Friends And Related Symbol Documentation

◆ VdrCommunicationControllerFrame

friend class VdrCommunicationControllerFrame
friend

Member Data Documentation

◆ m_appFailuresLoggerManager

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

◆ m_channels

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

◆ m_channelsInVdr

std::map<iv::types::channelId, VdrChannelInfo> iv::comms::vdr::VdrCommunicationController::m_channelsInVdr
private

◆ 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_networkId

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

◆ m_protocol

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

◆ m_serialDriver

std::shared_ptr<iv::comms::serial::SerialCommunicationsDriver> iv::comms::vdr::VdrCommunicationController::m_serialDriver
private

◆ m_vdrAlarmQueue

std::unique_ptr<iv::containers::CircularQueue<std::shared_ptr<iv::alarms::Event>, 5000> > iv::comms::vdr::VdrCommunicationController::m_vdrAlarmQueue

Queue that contains all events processed by the alarmManager.

Note
do not decrease the size, it may lead to alarms being lost

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