1#ifndef IV_SRC_COMMS_COMMUNICATIONCENTER_HPP_
2#define IV_SRC_COMMS_COMMUNICATIONCENTER_HPP_
30 void bindCommunications(
const std::vector<std::shared_ptr<iv::model::comms::NetworkData>> &networksDatas);
34 sendRedundancyMessage(
const std::shared_ptr<iv::comms::redundancy::AbstractRedundancyMessage> &message,
35 bool isLomMessage =
false)
const;
43 [[nodiscard]] std::vector<std::weak_ptr<iv::comms::ICommunicationController>>
45 std::optional<iv::comms::eProtocolType> protocol = std::nullopt)
const;
48 bool sendRedundancy =
true)
const;
54 bool sendCommandCtrl(
const std::shared_ptr<iv::channels::AbstractChannel> &channel,
56 bool sendMimicCommand(
const std::shared_ptr<iv::channels::AbstractChannel> &channel,
65 std::optional<iv::model::eShipArea> areaStation = std::nullopt);
72 std::map<iv::types::networkId, std::shared_ptr<iv::comms::ICommunicationController>>
m_commControllers;
Definition CommunicationCenter.hpp:18
bool sendMimicCommand(const std::shared_ptr< iv::channels::AbstractChannel > &channel, iv::types::errorMessage &errorMsg) const
Definition CommunicationCenter.cpp:605
CommunicationCenter()
Definition CommunicationCenter.cpp:33
CommunicationCenter & operator=(CommunicationCenter &&other)=delete
iv::comms::eResponse sendSoundOff(std::string &errorMessage, std::optional< iv::model::eShipArea > areaStation=std::nullopt)
Send a sound off message to all the stations.
Definition CommunicationCenter.cpp:426
CommunicationCenter(CommunicationCenter &&other)=delete
void sendBroadcastNewAlarm(iv::model::eShipArea areaStation) const
Definition CommunicationCenter.cpp:359
~CommunicationCenter()
Definition CommunicationCenter.cpp:653
iv::comms::eResponse sendAck(const std::shared_ptr< iv::channels::AbstractChannel > &channel, bool sendRedundancy=true) const
Definition CommunicationCenter.cpp:241
std::map< iv::types::networkId, std::shared_ptr< iv::comms::ICommunicationController > > getCommunicationControllers()
Definition CommunicationCenter.cpp:212
bool isStarted() const
Definition CommunicationCenter.cpp:206
iv::comms::eResponse sendRedundancyMessage(const std::shared_ptr< iv::comms::redundancy::AbstractRedundancyMessage > &message, bool isLomMessage=false) const
Definition CommunicationCenter.cpp:514
void bindCommunications(const std::vector< std::shared_ptr< iv::model::comms::NetworkData > > &networksDatas)
Definition CommunicationCenter.cpp:37
iv::comms::eResponse sendWatchcallNTBroadcast(const std::shared_ptr< iv::comms::watchcallNT::AbstractWatchcallNTMessage > &message) const
Definition CommunicationCenter.cpp:679
void sendBroadcastSoundOff(iv::model::eShipArea areaStation) const
Definition CommunicationCenter.cpp:388
iv::eState m_state
Definition CommunicationCenter.hpp:67
iv::comms::eResponse sendWatchcallNTMessage(const std::shared_ptr< iv::comms::watchcallNT::AbstractWatchcallNTMessage > &message, iv::types::repeaterId &destination) const
Definition CommunicationCenter.cpp:656
std::optional< std::shared_ptr< iv::comms::can::LomCommunicationController > > m_editorLomsController
Definition CommunicationCenter.hpp:69
std::map< iv::types::networkId, std::shared_ptr< iv::comms::ICommunicationController > > m_commControllers
Definition CommunicationCenter.hpp:72
CommunicationCenter(const CommunicationCenter &other)=delete
bool sendCommandCtrl(const std::shared_ptr< iv::channels::AbstractChannel > &channel, iv::types::channelValue value) const
Definition CommunicationCenter.cpp:557
CommunicationCenter & operator=(const CommunicationCenter &other)=delete
void sendBroadcastAck(iv::model::eShipArea areaStation) const
Definition CommunicationCenter.cpp:330
Definition ApiCommunicationController.cpp:12
eNetworkType
Definition enums.hpp:250
eResponse
Definition enums.hpp:285
eShipArea
Definition enums.hpp:11
double channelValue
Definition types.hpp:67
std::string errorMessage
Definition types.hpp:89
std::string repeaterId
Definition types.hpp:79
eState
Definition enums.hpp:46