Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
iv::model::control::DamperManager Class Reference

#include <DamperManager.hpp>

Classes

struct  Constants
 
struct  Sections
 

Public Member Functions

 DamperManager ()=default
 
 ~DamperManager ()=default
 
void update (const DamperManager &other)
 
bool load (const iv::file::xml::node &nodeDampers)
 
bool save (iv::file::xml::node &nodeDampers) const
 
bool insertDamper (const std::shared_ptr< iv::model::control::Damper > &damper)
 
bool createDamper (const iv::types::control::damper::damperDescription &damperDescription, iv::types::control::damper::damperOrder damperOrder, iv::model::control::damper::eDamperType damperType, iv::types::unitId lomId, const iv::model::control::damper::AllDamperChannels &allDamperChannels)
 
bool changeDamperDescriptionAndOrder (const iv::types::control::damper::damperId &oldDamperId, const iv::types::control::damper::damperDescription &newDamperDescription, iv::types::control::damper::damperOrder newDamperOrder)
 
bool removeDamper (const types::control::damper::damperId &damperId, bool resetWiredChannels, bool removeSoftwareChannels)
 
void getDamperValidDefaultParameters (iv::types::control::damper::damperOrder &defaultDamperOrder, damper::eDamperType &defaultDamperType, iv::types::unitId &defaultLomId)
 Gets a valid combination of default parameters for a damper.
 
std::map< iv::types::control::damper::damperId, std::shared_ptr< iv::model::control::Damper > > & dampers ()
 

Static Public Member Functions

static std::set< iv::types::unitIdgetAvailableLomIds (iv::model::control::damper::eDamperType damperType)
 Get the LOM IDs of the LOMs capable of managing a damper of a given type.
 
static std::optional< std::shared_ptr< iv::channels::AbstractChannel > > getTheNAvailableDamperFeedbackChannel (iv::types::unitId lomId, uint16_t n)
 Get the Nth available damper feedback channel for a given LOM ID.
 
static std::optional< std::shared_ptr< iv::channels::AbstractChannel > > getTheNAvailableDamperOrderChannel (iv::types::unitId lomId, uint16_t n)
 Get the Nth available damper order channel for a given LOM ID.
 
static iv::model::control::damper::eLomAvailability getLomAvailability (const std::shared_ptr< iv::units::Unit > &unit, iv::model::control::damper::eDamperType damperType)
 Get the availability of LOMs for a given damper type.
 

Static Private Member Functions

static bool isDefaultChannel (const std::shared_ptr< iv::channels::AbstractChannel > &channel)
 Check if the channel is a default channel from the point of view of Dampers.
 
static uint16_t getNumAvailableDigitalOutputChannels (const std::shared_ptr< iv::units::Unit > &unit)
 Get the number of available digital output channels for a given unit.
 
static std::list< iv::types::channelOrdergetNumAvailableCmdChannelOrders (const std::shared_ptr< iv::units::Unit > &unit)
 Get the available command channel orders for a given unit.
 
static std::list< iv::types::channelOrdergetNumAvailableTripChannelOrders (const std::shared_ptr< iv::units::Unit > &unit)
 Get the available trip channel orders for a given unit.
 
static bool linkAndConfigureDamperChannels (const std::shared_ptr< iv::model::control::Damper > &damper)
 Link and configure the channels of a damper.
 
static void reconfigureDamperChannels (const std::shared_ptr< iv::model::control::Damper > &damper)
 
static void resetDamperWiredChannels (const std::shared_ptr< iv::model::control::Damper > &damper)
 Reset the wired channels of a damper.
 
static void removeDamperSoftwareChannels (const std::shared_ptr< iv::model::control::Damper > &damper)
 Remove the software channels of a damper.
 
static bool configureChFeedbackOP (const std::shared_ptr< iv::channels::AbstractChannel > &channel, iv::types::control::damper::damperId damperId, iv::types::control::damper::damperDescription damperDescription, iv::types::control::damper::damperOrder damperOrder)
 
static bool configureChFeedbackCL (const std::shared_ptr< iv::channels::AbstractChannel > &channel, iv::types::control::damper::damperId damperId, iv::types::control::damper::damperDescription damperDescription, iv::types::control::damper::damperOrder damperOrder)
 
static bool configureChOutputOP (const std::shared_ptr< iv::channels::AbstractChannel > &channel, iv::types::control::damper::damperId damperId, iv::types::control::damper::damperDescription damperDescription, iv::types::control::damper::damperOrder damperOrder)
 
static bool configureChOutputCL (const std::shared_ptr< iv::channels::AbstractChannel > &channel, iv::types::control::damper::damperId damperId, iv::types::control::damper::damperDescription damperDescription, iv::types::control::damper::damperOrder damperOrder)
 
static bool configureChCmdOP (const std::shared_ptr< iv::channels::AbstractChannel > &channel, const iv::types::control::damper::damperId &damperId, iv::types::channelOrder channelOrder, iv::types::unitId unitId, bool isConfiguringFromController, iv::types::control::damper::damperDescription damperDescription, iv::types::control::damper::damperOrder damperOrder)
 
static bool configureChCmdCL (const std::shared_ptr< iv::channels::AbstractChannel > &channel, const iv::types::control::damper::damperId &damperId, iv::types::channelOrder channelOrder, iv::types::unitId unitId, bool isConfiguringFromController, iv::types::control::damper::damperDescription damperDescription, iv::types::control::damper::damperOrder damperOrder)
 
static bool configureChCmdReset (const std::shared_ptr< iv::channels::AbstractChannel > &channel, const iv::types::control::damper::damperId &damperId, iv::types::channelOrder channelOrder, iv::types::unitId unitId, bool isConfiguringFromController, iv::types::control::damper::damperDescription damperDescription, iv::types::control::damper::damperOrder damperOrder)
 
static bool configureChTrip (const std::shared_ptr< iv::channels::AbstractChannel > &channel, const iv::types::control::damper::damperId &damperId, iv::types::channelOrder channelOrder, iv::types::unitId unitId, bool isConfiguringFromController, iv::types::control::damper::damperDescription damperDescription, iv::types::control::damper::damperOrder damperOrder)
 

Private Attributes

std::map< iv::types::control::damper::damperId, std::shared_ptr< iv::model::control::Damper > > m_dampers
 

Constructor & Destructor Documentation

◆ DamperManager()

iv::model::control::DamperManager::DamperManager ( )
default

◆ ~DamperManager()

iv::model::control::DamperManager::~DamperManager ( )
default

Member Function Documentation

◆ changeDamperDescriptionAndOrder()

bool iv::model::control::DamperManager::changeDamperDescriptionAndOrder ( const iv::types::control::damper::damperId & oldDamperId,
const iv::types::control::damper::damperDescription & newDamperDescription,
iv::types::control::damper::damperOrder newDamperOrder )

◆ configureChCmdCL()

bool iv::model::control::DamperManager::configureChCmdCL ( const std::shared_ptr< iv::channels::AbstractChannel > & channel,
const iv::types::control::damper::damperId & damperId,
iv::types::channelOrder channelOrder,
iv::types::unitId unitId,
bool isConfiguringFromController,
iv::types::control::damper::damperDescription damperDescription,
iv::types::control::damper::damperOrder damperOrder )
staticprivate

◆ configureChCmdOP()

bool iv::model::control::DamperManager::configureChCmdOP ( const std::shared_ptr< iv::channels::AbstractChannel > & channel,
const iv::types::control::damper::damperId & damperId,
iv::types::channelOrder channelOrder,
iv::types::unitId unitId,
bool isConfiguringFromController,
iv::types::control::damper::damperDescription damperDescription,
iv::types::control::damper::damperOrder damperOrder )
staticprivate

◆ configureChCmdReset()

bool iv::model::control::DamperManager::configureChCmdReset ( const std::shared_ptr< iv::channels::AbstractChannel > & channel,
const iv::types::control::damper::damperId & damperId,
iv::types::channelOrder channelOrder,
iv::types::unitId unitId,
bool isConfiguringFromController,
iv::types::control::damper::damperDescription damperDescription,
iv::types::control::damper::damperOrder damperOrder )
staticprivate

◆ configureChFeedbackCL()

bool iv::model::control::DamperManager::configureChFeedbackCL ( const std::shared_ptr< iv::channels::AbstractChannel > & channel,
iv::types::control::damper::damperId damperId,
iv::types::control::damper::damperDescription damperDescription,
iv::types::control::damper::damperOrder damperOrder )
staticprivate

◆ configureChFeedbackOP()

bool iv::model::control::DamperManager::configureChFeedbackOP ( const std::shared_ptr< iv::channels::AbstractChannel > & channel,
iv::types::control::damper::damperId damperId,
iv::types::control::damper::damperDescription damperDescription,
iv::types::control::damper::damperOrder damperOrder )
staticprivate

◆ configureChOutputCL()

bool iv::model::control::DamperManager::configureChOutputCL ( const std::shared_ptr< iv::channels::AbstractChannel > & channel,
iv::types::control::damper::damperId damperId,
iv::types::control::damper::damperDescription damperDescription,
iv::types::control::damper::damperOrder damperOrder )
staticprivate

◆ configureChOutputOP()

bool iv::model::control::DamperManager::configureChOutputOP ( const std::shared_ptr< iv::channels::AbstractChannel > & channel,
iv::types::control::damper::damperId damperId,
iv::types::control::damper::damperDescription damperDescription,
iv::types::control::damper::damperOrder damperOrder )
staticprivate

◆ configureChTrip()

bool iv::model::control::DamperManager::configureChTrip ( const std::shared_ptr< iv::channels::AbstractChannel > & channel,
const iv::types::control::damper::damperId & damperId,
iv::types::channelOrder channelOrder,
iv::types::unitId unitId,
bool isConfiguringFromController,
iv::types::control::damper::damperDescription damperDescription,
iv::types::control::damper::damperOrder damperOrder )
staticprivate

◆ createDamper()

bool iv::model::control::DamperManager::createDamper ( const iv::types::control::damper::damperDescription & damperDescription,
iv::types::control::damper::damperOrder damperOrder,
iv::model::control::damper::eDamperType damperType,
iv::types::unitId lomId,
const iv::model::control::damper::AllDamperChannels & allDamperChannels )

◆ dampers()

std::map< iv::types::control::damper::damperId, std::shared_ptr< iv::model::control::Damper > > & iv::model::control::DamperManager::dampers ( )
nodiscard

◆ getAvailableLomIds()

std::set< iv::types::unitId > iv::model::control::DamperManager::getAvailableLomIds ( iv::model::control::damper::eDamperType damperType)
staticnodiscard

Get the LOM IDs of the LOMs capable of managing a damper of a given type.

Parameters
damperTypeThe damper type to check.
Returns
A set of available LOM IDs.

◆ getDamperValidDefaultParameters()

void iv::model::control::DamperManager::getDamperValidDefaultParameters ( iv::types::control::damper::damperOrder & defaultDamperOrder,
damper::eDamperType & defaultDamperType,
iv::types::unitId & defaultLomId )

Gets a valid combination of default parameters for a damper.

Parameters
defaultDamperOrderThe default damper order.
defaultDamperTypeThe default damper type.
defaultLomIdThe default LOM ID.

◆ getLomAvailability()

iv::model::control::damper::eLomAvailability iv::model::control::DamperManager::getLomAvailability ( const std::shared_ptr< iv::units::Unit > & unit,
iv::model::control::damper::eDamperType damperType )
staticnodiscard

Get the availability of LOMs for a given damper type.

Parameters
unitThe unit to check.
damperTypeThe damper type to check.
Returns
The availability of the LOM for the given damper type.

◆ getNumAvailableCmdChannelOrders()

std::list< iv::types::channelOrder > iv::model::control::DamperManager::getNumAvailableCmdChannelOrders ( const std::shared_ptr< iv::units::Unit > & unit)
staticprivate

Get the available command channel orders for a given unit.

Parameters
unitThe unit to check.
Returns
A list of available command channel orders.
Note
The list is ordered from the lowest to the highest channel order.

◆ getNumAvailableDigitalOutputChannels()

uint16_t iv::model::control::DamperManager::getNumAvailableDigitalOutputChannels ( const std::shared_ptr< iv::units::Unit > & unit)
staticnodiscardprivate

Get the number of available digital output channels for a given unit.

Parameters
unitThe unit to check.
Returns
The number of available digital output channels.

◆ getNumAvailableTripChannelOrders()

std::list< iv::types::channelOrder > iv::model::control::DamperManager::getNumAvailableTripChannelOrders ( const std::shared_ptr< iv::units::Unit > & unit)
staticprivate

Get the available trip channel orders for a given unit.

Parameters
unitThe unit to check.
Returns
A list of available trip channel orders.
Note
The list is ordered from the lowest to the highest channel order.

◆ getTheNAvailableDamperFeedbackChannel()

std::optional< std::shared_ptr< iv::channels::AbstractChannel > > iv::model::control::DamperManager::getTheNAvailableDamperFeedbackChannel ( iv::types::unitId lomId,
uint16_t n )
staticnodiscard

Get the Nth available damper feedback channel for a given LOM ID.

Parameters
lomIdThe LOM ID to check.
nThe index of the channel to retrieve (1-based).
Returns
The Nth available damper feedback channel, or std::nullopt if not found.

◆ getTheNAvailableDamperOrderChannel()

std::optional< std::shared_ptr< iv::channels::AbstractChannel > > iv::model::control::DamperManager::getTheNAvailableDamperOrderChannel ( iv::types::unitId lomId,
uint16_t n )
staticnodiscard

Get the Nth available damper order channel for a given LOM ID.

Parameters
lomIdThe LOM ID to check.
nThe index of the channel to retrieve (1-based).
Returns
The Nth available damper order channel, or std::nullopt if not found.

◆ insertDamper()

bool iv::model::control::DamperManager::insertDamper ( const std::shared_ptr< iv::model::control::Damper > & damper)

◆ isDefaultChannel()

bool iv::model::control::DamperManager::isDefaultChannel ( const std::shared_ptr< iv::channels::AbstractChannel > & channel)
staticnodiscardprivate

Check if the channel is a default channel from the point of view of Dampers.

Parameters
channelThe channel to check.
Returns
True if the channel is a default channel, false otherwise.

◆ linkAndConfigureDamperChannels()

bool iv::model::control::DamperManager::linkAndConfigureDamperChannels ( const std::shared_ptr< iv::model::control::Damper > & damper)
staticnodiscardprivate

Link and configure the channels of a damper.

Parameters
damperThe damper to link and configure.
Returns
True if the channels were successfully linked and configured, false otherwise.
Note
The wired channels are configured in this function.
The software channels are created, linked, and configured in this function.

◆ load()

bool iv::model::control::DamperManager::load ( const iv::file::xml::node & nodeDampers)

◆ reconfigureDamperChannels()

void iv::model::control::DamperManager::reconfigureDamperChannels ( const std::shared_ptr< iv::model::control::Damper > & damper)
staticprivate

◆ removeDamper()

bool iv::model::control::DamperManager::removeDamper ( const types::control::damper::damperId & damperId,
bool resetWiredChannels,
bool removeSoftwareChannels )

◆ removeDamperSoftwareChannels()

void iv::model::control::DamperManager::removeDamperSoftwareChannels ( const std::shared_ptr< iv::model::control::Damper > & damper)
staticprivate

Remove the software channels of a damper.

Parameters
damperThe damper to remove the software channels from.
Note
The channel may not be wired. In this case, the channel won't be removed.

◆ resetDamperWiredChannels()

void iv::model::control::DamperManager::resetDamperWiredChannels ( const std::shared_ptr< iv::model::control::Damper > & damper)
staticprivate

Reset the wired channels of a damper.

Parameters
damperThe damper to reset.
Note
The channel may not be wired. Will be reset anyway.

◆ save()

bool iv::model::control::DamperManager::save ( iv::file::xml::node & nodeDampers) const

◆ update()

void iv::model::control::DamperManager::update ( const DamperManager & other)

Member Data Documentation

◆ m_dampers

std::map<iv::types::control::damper::damperId, std::shared_ptr<iv::model::control::Damper> > iv::model::control::DamperManager::m_dampers
private

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