Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
|
#include <Units.hpp>
Classes | |
struct | DefaultValues |
struct | Keys |
struct | Sections |
Public Member Functions | |
bool | load (const iv::file::xml::node &nodeDataProject, std::string_view unitsFolderPath) |
bool | save (iv::file::xml::node &nodeDataProject, std::string_view unitsFolderPath, const std::optional< std::shared_ptr< std::vector< std::shared_ptr< iv::file::xml::File > > > > &savingFilesOut=std::nullopt) const |
void | update (Units &other) |
bool | hasChannels () const |
bool | hasRmsUnit () const |
bool | hasHeartbeatUnit () const |
bool | hasCommFailUnit () const |
std::weak_ptr< Unit > | rmsUnit () |
std::weak_ptr< Unit > | heartbeatUnit () const |
std::weak_ptr< Unit > | commFailureUnit () const |
std::weak_ptr< Unit > | getUnit (iv::types::unitId unitId) const |
std::weak_ptr< Unit > | getUnitAt (uint32_t index) |
std::optional< uint32_t > | getUnitIndex (iv::types::unitId unitId) const |
std::vector< std::shared_ptr< iv::units::Unit > > | getUnitsFromIds (const std::set< iv::types::unitId > &unitIds) const |
std::set< iv::types::unitId > | unitsReadyForSetSpare () const |
std::vector< std::weak_ptr< iv::channels::AbstractChannel > > | getAllChannelsOrdered () |
std::map< iv::types::channelId, std::shared_ptr< iv::channels::AbstractChannel > > | getAllChannels () |
void | initializeChannels (const std::shared_ptr< AbstractProgress > &progress) |
std::weak_ptr< iv::channels::AbstractChannel > | getChannel (const iv::types::channelId &channelId) |
std::weak_ptr< iv::channels::AbstractChannel > | getChannelByShipyardTag (const std::string &channelTag) |
bool | existsChannel (const iv::types::channelId &channelId) |
bool | addUnit (const std::shared_ptr< iv::units::Unit > &unit, bool createHeartbeatAndFailChannels=true) |
bool | deleteUnit (iv::types::unitId unitId) |
bool | changeUnitId (const iv::types::unitId &unitId, const iv::types::unitId &newUnitId) |
bool | swapUnitsId (const iv::types::unitId &firstUnitId, const iv::types::unitId &secondUnitId) |
std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > | getActiveChannelsByGroupId (const iv::types::groupId &groupId, bool refreshCache=false) |
Get all channels that belong to a group. | |
void | disableGroups (const std::unordered_set< iv::types::groupId > &groups) |
std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > | getAllChannelsInverted () const |
std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > | getAllChannelsOffScan () const |
std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > | getAllChannelsInhibited () const |
iv::types::unitId | getFirstFreeUnitId (std::optional< iv::units::eUnitType > unitType=std::nullopt) const |
std::set< iv::types::unitId > | getLOMsOnline (bool isNotInProjectUnit=false) const |
std::set< iv::types::unitId > | getLOMsOffline (bool isNotInProjectUnit=false) const |
std::vector< iv::units::UnitIdAndName > | getAllUnitsIdAndNameOnline () const |
std::set< iv::types::unitId > | getIdsAllOnUnits () const |
uint32_t | getNumberOfChannels () |
void | rearrangeCommHeartbeatAndFailureChannel () const |
void | rearrangeStationHeartbeatAndFailureChannel () const |
void | rearrangeWatchcallNodeHeartbeatAndFailureChannel () const |
void | createCommHeartbeatAndFailureChannel (const iv::types::networkId &commId) const |
Creates the Network's Heartbeat and Failure channels in their corresponding units. | |
void | createAllSystemChannels () |
void | createStationHeartbeatAndFailureChannel (const iv::types::stationId &stationId) const |
void | createWatchcallNodeHearbeatAndFailureChannel (const iv::types::repeaterId &repeaterId) const |
Private Member Functions | |
bool | loadUnit (iv::types::unitId unitId, std::string_view unitsFolderPath) |
void | createUnitHeartbeatAndFailureChannels (iv::types::unitId newUnitId) const |
std::vector< std::shared_ptr< iv::channels::AbstractChannel > > | extractUnitHeartbeatAndFailureChannels (iv::types::unitId unitId) const |
bool iv::units::Units::addUnit | ( | const std::shared_ptr< iv::units::Unit > & | unit, |
bool | createHeartbeatAndFailChannels = true ) |
bool iv::units::Units::changeUnitId | ( | const iv::types::unitId & | unitId, |
const iv::types::unitId & | newUnitId ) |
|
nodiscard |
void iv::units::Units::createAllSystemChannels | ( | ) |
void iv::units::Units::createCommHeartbeatAndFailureChannel | ( | const iv::types::networkId & | commId | ) | const |
Creates the Network's Heartbeat and Failure channels in their corresponding units.
commId | Network ID to which create the channels |
void iv::units::Units::createStationHeartbeatAndFailureChannel | ( | const iv::types::stationId & | stationId | ) | const |
|
private |
void iv::units::Units::createWatchcallNodeHearbeatAndFailureChannel | ( | const iv::types::repeaterId & | repeaterId | ) | const |
bool iv::units::Units::deleteUnit | ( | iv::types::unitId | unitId | ) |
void iv::units::Units::disableGroups | ( | const std::unordered_set< iv::types::groupId > & | groups | ) |
|
nodiscard |
|
nodiscardprivate |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > iv::units::Units::getActiveChannelsByGroupId | ( | const iv::types::groupId & | groupId, |
bool | refreshCache = false ) |
Get all channels that belong to a group.
groupId | ID of the group |
refreshCache | If true, the channels are collected again even if they are already cached. |
std::map< iv::types::channelId, std::shared_ptr< iv::channels::AbstractChannel > > iv::units::Units::getAllChannels | ( | ) |
|
nodiscard |
|
nodiscard |
|
nodiscard |
std::vector< std::weak_ptr< iv::channels::AbstractChannel > > iv::units::Units::getAllChannelsOrdered | ( | ) |
|
nodiscard |
std::weak_ptr< iv::channels::AbstractChannel > iv::units::Units::getChannel | ( | const iv::types::channelId & | channelId | ) |
std::weak_ptr< iv::channels::AbstractChannel > iv::units::Units::getChannelByShipyardTag | ( | const std::string & | channelTag | ) |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
uint32_t iv::units::Units::getNumberOfChannels | ( | ) |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
void iv::units::Units::initializeChannels | ( | const std::shared_ptr< AbstractProgress > & | progress | ) |
bool iv::units::Units::load | ( | const iv::file::xml::node & | nodeDataProject, |
std::string_view | unitsFolderPath ) |
|
private |
void iv::units::Units::rearrangeCommHeartbeatAndFailureChannel | ( | ) | const |
void iv::units::Units::rearrangeStationHeartbeatAndFailureChannel | ( | ) | const |
void iv::units::Units::rearrangeWatchcallNodeHeartbeatAndFailureChannel | ( | ) | const |
|
nodiscard |
bool iv::units::Units::save | ( | iv::file::xml::node & | nodeDataProject, |
std::string_view | unitsFolderPath, | ||
const std::optional< std::shared_ptr< std::vector< std::shared_ptr< iv::file::xml::File > > > > & | savingFilesOut = std::nullopt ) const |
bool iv::units::Units::swapUnitsId | ( | const iv::types::unitId & | firstUnitId, |
const iv::types::unitId & | secondUnitId ) |
|
nodiscard |
void iv::units::Units::update | ( | Units & | other | ) |