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

#include <CommunicationCenter.hpp>

Public Member Functions

 CommunicationCenter ()
 
 CommunicationCenter (const CommunicationCenter &other)=delete
 
 CommunicationCenter (CommunicationCenter &&other)=delete
 
 ~CommunicationCenter ()
 
CommunicationCenteroperator= (const CommunicationCenter &other)=delete
 
CommunicationCenteroperator= (CommunicationCenter &&other)=delete
 
bool isStarted () const
 
void bindCommunications (const std::vector< std::shared_ptr< iv::model::comms::NetworkData > > &networksDatas)
 
std::map< iv::types::networkId, std::shared_ptr< iv::comms::ICommunicationController > > getCommunicationControllers ()
 
iv::comms::eResponse sendRedundancyMessage (const std::shared_ptr< iv::comms::redundancy::AbstractRedundancyMessage > &message, bool isLomMessage=false) const
 
iv::comms::eResponse sendWatchcallNTMessage (const std::shared_ptr< iv::comms::watchcallNT::AbstractWatchcallNTMessage > &message, iv::types::repeaterId &destination) const
 
iv::comms::eResponse sendWatchcallNTBroadcast (const std::shared_ptr< iv::comms::watchcallNT::AbstractWatchcallNTMessage > &message) const
 
std::vector< std::weak_ptr< iv::comms::ICommunicationController > > getCommunicationControllers (iv::comms::eNetworkType networkType, std::optional< iv::comms::eProtocolType > protocol=std::nullopt) const
 
iv::comms::eResponse sendAck (const std::shared_ptr< iv::channels::AbstractChannel > &channel, bool sendRedundancy=true) const
 
void sendBroadcastAck (iv::model::eShipArea areaStation) const
 
void sendBroadcastNewAlarm (iv::model::eShipArea areaStation) const
 
void sendBroadcastSoundOff (iv::model::eShipArea areaStation) const
 
bool sendCommandCtrl (const std::shared_ptr< iv::channels::AbstractChannel > &channel, iv::types::channelValue value) const
 
bool sendMimicCommand (const std::shared_ptr< iv::channels::AbstractChannel > &channel, iv::types::errorMessage &errorMsg) const
 
iv::comms::eResponse sendSoundOff (std::string &errorMessage, std::optional< iv::model::eShipArea > areaStation=std::nullopt)
 Send a sound off message to all the stations.
 

Public Attributes

iv::eState m_state
 
std::optional< std::shared_ptr< iv::comms::can::LomCommunicationController > > m_editorLomsController
 

Private Attributes

std::map< iv::types::networkId, std::shared_ptr< iv::comms::ICommunicationController > > m_commControllers
 

Constructor & Destructor Documentation

◆ CommunicationCenter() [1/3]

iv::comms::CommunicationCenter::CommunicationCenter ( )

◆ CommunicationCenter() [2/3]

iv::comms::CommunicationCenter::CommunicationCenter ( const CommunicationCenter & other)
delete

◆ CommunicationCenter() [3/3]

iv::comms::CommunicationCenter::CommunicationCenter ( CommunicationCenter && other)
delete

◆ ~CommunicationCenter()

iv::comms::CommunicationCenter::~CommunicationCenter ( )

Member Function Documentation

◆ bindCommunications()

void iv::comms::CommunicationCenter::bindCommunications ( const std::vector< std::shared_ptr< iv::model::comms::NetworkData > > & networksDatas)

◆ getCommunicationControllers() [1/2]

std::map< iv::types::networkId, std::shared_ptr< iv::comms::ICommunicationController > > iv::comms::CommunicationCenter::getCommunicationControllers ( )

◆ getCommunicationControllers() [2/2]

std::vector< std::weak_ptr< iv::comms::ICommunicationController > > iv::comms::CommunicationCenter::getCommunicationControllers ( iv::comms::eNetworkType networkType,
std::optional< iv::comms::eProtocolType > protocol = std::nullopt ) const
nodiscard

◆ isStarted()

bool iv::comms::CommunicationCenter::isStarted ( ) const
nodiscard

◆ operator=() [1/2]

CommunicationCenter & iv::comms::CommunicationCenter::operator= ( CommunicationCenter && other)
delete

◆ operator=() [2/2]

CommunicationCenter & iv::comms::CommunicationCenter::operator= ( const CommunicationCenter & other)
delete

◆ sendAck()

iv::comms::eResponse iv::comms::CommunicationCenter::sendAck ( const std::shared_ptr< iv::channels::AbstractChannel > & channel,
bool sendRedundancy = true ) const
nodiscard

◆ sendBroadcastAck()

void iv::comms::CommunicationCenter::sendBroadcastAck ( iv::model::eShipArea areaStation) const

◆ sendBroadcastNewAlarm()

void iv::comms::CommunicationCenter::sendBroadcastNewAlarm ( iv::model::eShipArea areaStation) const

◆ sendBroadcastSoundOff()

void iv::comms::CommunicationCenter::sendBroadcastSoundOff ( iv::model::eShipArea areaStation) const

◆ sendCommandCtrl()

bool iv::comms::CommunicationCenter::sendCommandCtrl ( const std::shared_ptr< iv::channels::AbstractChannel > & channel,
iv::types::channelValue value ) const

◆ sendMimicCommand()

bool iv::comms::CommunicationCenter::sendMimicCommand ( const std::shared_ptr< iv::channels::AbstractChannel > & channel,
iv::types::errorMessage & errorMsg ) const

◆ sendRedundancyMessage()

iv::comms::eResponse iv::comms::CommunicationCenter::sendRedundancyMessage ( const std::shared_ptr< iv::comms::redundancy::AbstractRedundancyMessage > & message,
bool isLomMessage = false ) const

◆ sendSoundOff()

iv::comms::eResponse iv::comms::CommunicationCenter::sendSoundOff ( std::string & errorMessage,
std::optional< iv::model::eShipArea > areaStation = std::nullopt )
nodiscard

Send a sound off message to all the stations.

Parameters
areaStationNot used (in a future version it will be used to send the sound off to a specific area).
Returns
Response of the operation. Connection error if any message could not be sent.

◆ sendWatchcallNTBroadcast()

iv::comms::eResponse iv::comms::CommunicationCenter::sendWatchcallNTBroadcast ( const std::shared_ptr< iv::comms::watchcallNT::AbstractWatchcallNTMessage > & message) const

◆ sendWatchcallNTMessage()

iv::comms::eResponse iv::comms::CommunicationCenter::sendWatchcallNTMessage ( const std::shared_ptr< iv::comms::watchcallNT::AbstractWatchcallNTMessage > & message,
iv::types::repeaterId & destination ) const

Member Data Documentation

◆ m_commControllers

std::map<iv::types::networkId, std::shared_ptr<iv::comms::ICommunicationController> > iv::comms::CommunicationCenter::m_commControllers
private

◆ m_editorLomsController

std::optional<std::shared_ptr<iv::comms::can::LomCommunicationController> > iv::comms::CommunicationCenter::m_editorLomsController

◆ m_state

iv::eState iv::comms::CommunicationCenter::m_state

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