Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
iv::diamar::Stations Class Reference

#include <Station.hpp>

Classes

struct  Sections
 

Public Member Functions

bool load (const iv::file::xml::File &xml)
 
bool save (const std::shared_ptr< iv::file::xml::File > &xml) const
 
void update (const iv::diamar::Stations &other)
 
bool insertNetworkData (const iv::types::stationId &stationId, const std::shared_ptr< iv::model::comms::NetworkData > &networkData)
 
void changeNetworkId (const iv::types::networkId &previousNetworkID, const iv::types::networkId &newNetworkID)
 
void updateNetworkHeartbeatAndFailureChannelsTagsAndDescriptions (const types::networkId &networkId)
 
bool removeNetworkData (const iv::types::networkId &networkId)
 
void changeStationId (const iv::types::stationId &previousStationID, const iv::types::stationId &newStationID)
 
bool addDefaultStation (iv::types::stationId stationId)
 
void addStationDefaultNetworks (iv::types::stationId stationId, bool addLoggers=true, bool addRedundancy=true)
 
std::shared_ptr< StationgetStation (const iv::types::stationId &stationId=iv::system::retrieveHostName()) const
 Gets the station that matches with the system host name.
 
const std::map< iv::types::stationId, std::shared_ptr< iv::diamar::Station > > & getAll () const
 
const std::map< iv::types::stationId, std::set< iv::types::networkId > > & getStationWithNetworks () const
 
void addStation (const std::shared_ptr< Station > &station)
 
void clearStations ()
 
void eraseStation (const iv::types::stationId &stationId)
 
void deleteNetwork (const iv::types::networkId &networkId)
 Deletes a network.
 
std::vector< std::shared_ptr< iv::model::comms::NetworkData > > getStationNetworksData (const iv::types::stationId &stationId=iv::system::retrieveHostName()) const
 
std::weak_ptr< iv::model::comms::NetworkDatagetNetworkData (const iv::types::networkId &networkId)
 
const std::map< iv::types::networkId, std::shared_ptr< iv::model::comms::NetworkData > > & getNetworksData () const
 
std::shared_ptr< Stationsclone () const
 
void updateNetworks (const std::shared_ptr< Stations > &newStations)
 
std::weak_ptr< StationgetStationAt (uint32_t index) const
 
std::weak_ptr< iv::model::comms::NetworkDatagetNetworkDataAt (uint32_t index)
 
std::vector< iv::comms::api::ApiCommunicationInfogetAPICommInfoOfType (iv::comms::eNetworkType networkType, bool onlyEnabled, const iv::types::stationId &stationId=iv::system::retrieveHostName()) const
 
bool isMaster (const iv::types::stationId &stationId=iv::system::retrieveHostName()) const
 
bool isWatchcallMaster (const iv::types::stationId &stationId=iv::system::retrieveHostName()) const
 
std::shared_ptr< StationgetMaster () const
 

Private Member Functions

std::vector< std::weak_ptr< iv::model::comms::NetworkData > > getNetworksRefOfType (iv::comms::eNetworkType networkType, bool onlyEnabled, const iv::types::stationId &stationId) const
 

Private Attributes

std::map< iv::types::networkId, std::shared_ptr< iv::model::comms::NetworkData > > m_networksData
 
std::map< iv::types::stationId, std::set< iv::types::networkId > > m_stationsNetworks
 
std::map< iv::types::stationId, std::shared_ptr< iv::diamar::Station > > m_stations
 

Member Function Documentation

◆ addDefaultStation()

bool iv::diamar::Stations::addDefaultStation ( iv::types::stationId stationId)

◆ addStation()

void iv::diamar::Stations::addStation ( const std::shared_ptr< Station > & station)

◆ addStationDefaultNetworks()

void iv::diamar::Stations::addStationDefaultNetworks ( iv::types::stationId stationId,
bool addLoggers = true,
bool addRedundancy = true )

◆ changeNetworkId()

void iv::diamar::Stations::changeNetworkId ( const iv::types::networkId & previousNetworkID,
const iv::types::networkId & newNetworkID )

◆ changeStationId()

void iv::diamar::Stations::changeStationId ( const iv::types::stationId & previousStationID,
const iv::types::stationId & newStationID )

◆ clearStations()

void iv::diamar::Stations::clearStations ( )

◆ clone()

std::shared_ptr< iv::diamar::Stations > iv::diamar::Stations::clone ( ) const
nodiscard

◆ deleteNetwork()

void iv::diamar::Stations::deleteNetwork ( const iv::types::networkId & networkId)

Deletes a network.

Note
This also deletes the channel network from channels and the Network's heartbeat and fail channels by accessing the static controller.
Parameters
networkIdNetwork ID to delete.

◆ eraseStation()

void iv::diamar::Stations::eraseStation ( const iv::types::stationId & stationId)

◆ getAll()

const std::map< iv::types::stationId, std::shared_ptr< iv::diamar::Station > > & iv::diamar::Stations::getAll ( ) const
nodiscard

◆ getAPICommInfoOfType()

std::vector< iv::comms::api::ApiCommunicationInfo > iv::diamar::Stations::getAPICommInfoOfType ( iv::comms::eNetworkType networkType,
bool onlyEnabled,
const iv::types::stationId & stationId = iv::system::retrieveHostName() ) const
nodiscard

◆ getMaster()

std::shared_ptr< Station > iv::diamar::Stations::getMaster ( ) const
nodiscard

◆ getNetworkData()

std::weak_ptr< iv::model::comms::NetworkData > iv::diamar::Stations::getNetworkData ( const iv::types::networkId & networkId)

◆ getNetworkDataAt()

std::weak_ptr< iv::model::comms::NetworkData > iv::diamar::Stations::getNetworkDataAt ( uint32_t index)
nodiscard

◆ getNetworksData()

const std::map< iv::types::networkId, std::shared_ptr< iv::model::comms::NetworkData > > & iv::diamar::Stations::getNetworksData ( ) const
nodiscard

◆ getNetworksRefOfType()

std::vector< std::weak_ptr< iv::model::comms::NetworkData > > iv::diamar::Stations::getNetworksRefOfType ( iv::comms::eNetworkType networkType,
bool onlyEnabled,
const iv::types::stationId & stationId ) const
nodiscardprivate

◆ getStation()

std::shared_ptr< iv::diamar::Station > iv::diamar::Stations::getStation ( const iv::types::stationId & stationId = iv::system::retrieveHostName()) const
nodiscard

Gets the station that matches with the system host name.

Returns
An optional with the station that matches with the system host name, or an empty optional if the station is not found.
Note
The system host name is retrieved using the system::retrieveHostName function.
Use only in the context of Diamar.

◆ getStationAt()

std::weak_ptr< Station > iv::diamar::Stations::getStationAt ( uint32_t index) const
nodiscard

◆ getStationNetworksData()

std::vector< std::shared_ptr< iv::model::comms::NetworkData > > iv::diamar::Stations::getStationNetworksData ( const iv::types::stationId & stationId = iv::system::retrieveHostName()) const
nodiscard

◆ getStationWithNetworks()

const std::map< iv::types::stationId, std::set< iv::types::networkId > > & iv::diamar::Stations::getStationWithNetworks ( ) const
nodiscard

◆ insertNetworkData()

bool iv::diamar::Stations::insertNetworkData ( const iv::types::stationId & stationId,
const std::shared_ptr< iv::model::comms::NetworkData > & networkData )

◆ isMaster()

bool iv::diamar::Stations::isMaster ( const iv::types::stationId & stationId = iv::system::retrieveHostName()) const
nodiscard

◆ isWatchcallMaster()

bool iv::diamar::Stations::isWatchcallMaster ( const iv::types::stationId & stationId = iv::system::retrieveHostName()) const
nodiscard

◆ load()

bool iv::diamar::Stations::load ( const iv::file::xml::File & xml)

◆ removeNetworkData()

bool iv::diamar::Stations::removeNetworkData ( const iv::types::networkId & networkId)

◆ save()

bool iv::diamar::Stations::save ( const std::shared_ptr< iv::file::xml::File > & xml) const
nodiscard

◆ update()

void iv::diamar::Stations::update ( const iv::diamar::Stations & other)

◆ updateNetworkHeartbeatAndFailureChannelsTagsAndDescriptions()

void iv::diamar::Stations::updateNetworkHeartbeatAndFailureChannelsTagsAndDescriptions ( const types::networkId & networkId)

◆ updateNetworks()

void iv::diamar::Stations::updateNetworks ( const std::shared_ptr< Stations > & newStations)

Member Data Documentation

◆ m_networksData

std::map<iv::types::networkId, std::shared_ptr<iv::model::comms::NetworkData> > iv::diamar::Stations::m_networksData
private

◆ m_stations

std::map<iv::types::stationId, std::shared_ptr<iv::diamar::Station> > iv::diamar::Stations::m_stations
private

◆ m_stationsNetworks

std::map<iv::types::stationId, std::set<iv::types::networkId> > iv::diamar::Stations::m_stationsNetworks
private

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