Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
|
#include <PmsManager.hpp>
Classes | |
struct | DefaultValues |
struct | Keys |
struct | RunningModeTransition |
struct | Sections |
Public Member Functions | |
PmsManager ()=default | |
~PmsManager ()=default | |
void | update (const PmsManager &other) |
bool | load (std::string_view pathPms) |
bool | save (std::string_view pathPms, const std::optional< std::shared_ptr< std::vector< std::shared_ptr< iv::file::xml::File > > > > &savingFilesOut=std::nullopt) const |
bool | insertMainBar (const std::shared_ptr< MainBar > &mainBar) |
bool | insertBusTie (const std::shared_ptr< BusTie > &busTie) |
bool | insertGenerator (const std::shared_ptr< Generator > &generator) |
bool | insertMode (const std::shared_ptr< Mode > &mode) |
bool | insertTransition (const std::shared_ptr< Transition > &transition) |
bool | insertAction (const iv::types::pms::modeId &sourceModeId, const iv::types::pms::modeId &modeToReachId, const std::shared_ptr< AbstractPmsAction > &action) |
std::optional< iv::types::pms::elementId > | createMainBar (const std::string &name) |
std::optional< iv::types::pms::elementId > | createBusTie (const std::string &name, iv::types::unitId lomId, iv::types::pms::elementId leftMainBarId, iv::types::pms::elementId rightMainBarId) |
std::optional< iv::types::pms::elementId > | createGenerator (const std::string &name, iv::types::unitId lomId, iv::model::pms::eGeneratorType type, iv::types::pms::elementId mainBarId, uint32_t ratedPower) |
std::optional< iv::types::pms::modeId > | createMode (const std::string &modeId, iv::types::milliseconds feedbackTimeout) |
bool | createTransition (const iv::model::pms::Transition &newTransition) |
bool | createAction (const iv::types::pms::modeId &sourceModeId, const iv::types::pms::modeId &modeToReachId, const std::shared_ptr< iv::model::pms::AbstractPmsAction > &newAction) |
bool | changeMainBarId (iv::types::pms::elementId oldMainBarId, iv::types::pms::elementId newMainBarId) |
bool | changeBusTieId (iv::types::pms::elementId oldBusTieId, iv::types::pms::elementId newBusTieId) |
bool | changeGeneratorId (iv::types::pms::elementId oldGeneratorId, iv::types::pms::elementId newGeneratorId) |
bool | changeModeId (const iv::types::pms::modeId &oldModeId, const iv::types::pms::modeId &newModeId) |
bool | changeTransitionModeToReachId (const iv::types::pms::modeId &sourceModeId, const iv::types::pms::modeId &oldModeToReachId, const iv::types::pms::modeId &newModeToReachId) |
bool | replaceAction (const iv::types::pms::modeId &sourceModeId, const iv::types::pms::modeId &modeToReachId, uint64_t actionIndex, const std::shared_ptr< iv::model::pms::AbstractPmsAction > &newAction) |
Replaces an action in a transition. | |
bool | updateBusTieLeftMainBar (iv::types::pms::elementId busTieId, iv::types::pms::elementId newLeftMainBarId) |
bool | updateBusTieRightMainBar (iv::types::pms::elementId busTieId, iv::types::pms::elementId newRightMainBarId) |
bool | updateGeneratorMainBar (iv::types::pms::elementId generatorId, iv::types::pms::elementId newMainBarId) |
bool | updateGeneratorLomId (iv::types::pms::elementId generatorId, iv::types::unitId newLomId) |
bool | eraseMainBar (iv::types::pms::elementId mainBarId) |
Deletes a main bar, propagating its elimination to the bus ties and generators. | |
bool | eraseBusTie (iv::types::pms::elementId busTieId) |
bool | eraseGenerator (iv::types::pms::elementId generatorId) |
bool | eraseMode (const iv::types::pms::modeId &modeId) |
bool | eraseTransition (const iv::types::pms::modeId &sourceModeId, const iv::types::pms::modeId &modeToReachId) |
bool | eraseAction (const iv::types::pms::modeId &sourceModeId, const iv::types::pms::modeId &modeToReachId, uint64_t actionIndex) |
const std::map< iv::types::pms::elementId, std::shared_ptr< iv::model::pms::MainBar > > & | mainBars () |
const std::map< iv::types::pms::elementId, std::shared_ptr< iv::model::pms::BusTie > > & | busTies () |
const std::map< iv::types::pms::elementId, std::shared_ptr< iv::model::pms::Generator > > & | generators () |
const std::map< iv::types::pms::modeId, std::shared_ptr< iv::model::pms::Mode > > & | modes () |
std::set< iv::types::pms::elementId > | getBarsIds () const |
bool | moveUpAction (const iv::types::pms::modeId &sourceModeId, const iv::types::pms::modeId &modeToReachId, uint64_t actionIndex) |
bool | moveDownAction (const iv::types::pms::modeId &sourceModeId, const iv::types::pms::modeId &modeToReachId, uint64_t actionIndex) |
void | manageErasedUnit (const iv::types::unitId &unitId) |
std::weak_ptr< iv::model::pms::Mode > | getActivePmsMode () const |
Obtiene el modo de PMS activo en este momento. | |
void | setAndSendChannelTransitionFailureToAlarmValue () const |
Set the channel transition failure to alarm value and sends expeditiously the channel by redundancy. | |
void | setAndSendChannelTransitionFailureToNormalValue () const |
Set the channel transition failure to normal value and sends expeditiously the channel by redundancy. | |
void | sendModeTransitionInfo (bool isRunning, const iv::types::pms::modeId &modeToReachId, const iv::mimics::elements::eOperationModeState &newModeState) |
Send the mode transition information through redundancy. | |
Static Public Member Functions | |
static void | setOperationModesMimicElementsState (const iv::types::pms::modeId &modeToReachId, const iv::mimics::elements::eOperationModeState &newModeState) |
Runs through all Operation Modes Mimic Elements matching the given modeId and sets their state. | |
Public Attributes | |
RunningModeTransition | m_runningModeTransition |
std::weak_ptr< iv::channels::AbstractChannel > | m_channelTransitionFailureAlarm |
Static Private Member Functions | |
static void | unlinkGeneratorChannels (const std::shared_ptr< iv::model::pms::Generator > &generator) |
static bool | channelsPmsToGenerator (const std::shared_ptr< iv::model::pms::Generator > &generator) |
Private Attributes | |
std::map< iv::types::pms::elementId, std::shared_ptr< iv::model::pms::MainBar > > | m_mainBars |
std::map< iv::types::pms::elementId, std::shared_ptr< iv::model::pms::BusTie > > | m_busTies |
std::map< iv::types::pms::elementId, std::shared_ptr< iv::model::pms::Generator > > | m_generators |
std::map< iv::types::pms::modeId, std::shared_ptr< iv::model::pms::Mode > > | m_modes |
|
default |
|
default |
const std::map< iv::types::pms::elementId, std::shared_ptr< iv::model::pms::BusTie > > & iv::model::pms::PmsManager::busTies | ( | ) |
bool iv::model::pms::PmsManager::changeBusTieId | ( | iv::types::pms::elementId | oldBusTieId, |
iv::types::pms::elementId | newBusTieId ) |
bool iv::model::pms::PmsManager::changeGeneratorId | ( | iv::types::pms::elementId | oldGeneratorId, |
iv::types::pms::elementId | newGeneratorId ) |
bool iv::model::pms::PmsManager::changeMainBarId | ( | iv::types::pms::elementId | oldMainBarId, |
iv::types::pms::elementId | newMainBarId ) |
bool iv::model::pms::PmsManager::changeModeId | ( | const iv::types::pms::modeId & | oldModeId, |
const iv::types::pms::modeId & | newModeId ) |
bool iv::model::pms::PmsManager::changeTransitionModeToReachId | ( | const iv::types::pms::modeId & | sourceModeId, |
const iv::types::pms::modeId & | oldModeToReachId, | ||
const iv::types::pms::modeId & | newModeToReachId ) |
|
staticprivate |
bool iv::model::pms::PmsManager::createAction | ( | const iv::types::pms::modeId & | sourceModeId, |
const iv::types::pms::modeId & | modeToReachId, | ||
const std::shared_ptr< iv::model::pms::AbstractPmsAction > & | newAction ) |
std::optional< iv::types::pms::elementId > iv::model::pms::PmsManager::createBusTie | ( | const std::string & | name, |
iv::types::unitId | lomId, | ||
iv::types::pms::elementId | leftMainBarId, | ||
iv::types::pms::elementId | rightMainBarId ) |
std::optional< iv::types::pms::elementId > iv::model::pms::PmsManager::createGenerator | ( | const std::string & | name, |
iv::types::unitId | lomId, | ||
iv::model::pms::eGeneratorType | type, | ||
iv::types::pms::elementId | mainBarId, | ||
uint32_t | ratedPower ) |
std::optional< iv::types::pms::elementId > iv::model::pms::PmsManager::createMainBar | ( | const std::string & | name | ) |
std::optional< iv::types::pms::modeId > iv::model::pms::PmsManager::createMode | ( | const std::string & | modeId, |
iv::types::milliseconds | feedbackTimeout ) |
bool iv::model::pms::PmsManager::createTransition | ( | const iv::model::pms::Transition & | newTransition | ) |
bool iv::model::pms::PmsManager::eraseAction | ( | const iv::types::pms::modeId & | sourceModeId, |
const iv::types::pms::modeId & | modeToReachId, | ||
uint64_t | actionIndex ) |
bool iv::model::pms::PmsManager::eraseBusTie | ( | iv::types::pms::elementId | busTieId | ) |
bool iv::model::pms::PmsManager::eraseGenerator | ( | iv::types::pms::elementId | generatorId | ) |
bool iv::model::pms::PmsManager::eraseMainBar | ( | iv::types::pms::elementId | mainBarId | ) |
Deletes a main bar, propagating its elimination to the bus ties and generators.
mainBarId | Main bar id to be deleted |
bool iv::model::pms::PmsManager::eraseMode | ( | const iv::types::pms::modeId & | modeId | ) |
bool iv::model::pms::PmsManager::eraseTransition | ( | const iv::types::pms::modeId & | sourceModeId, |
const iv::types::pms::modeId & | modeToReachId ) |
const std::map< iv::types::pms::elementId, std::shared_ptr< iv::model::pms::Generator > > & iv::model::pms::PmsManager::generators | ( | ) |
|
nodiscard |
Obtiene el modo de PMS activo en este momento.
|
nodiscard |
bool iv::model::pms::PmsManager::insertAction | ( | const iv::types::pms::modeId & | sourceModeId, |
const iv::types::pms::modeId & | modeToReachId, | ||
const std::shared_ptr< AbstractPmsAction > & | action ) |
bool iv::model::pms::PmsManager::insertBusTie | ( | const std::shared_ptr< BusTie > & | busTie | ) |
bool iv::model::pms::PmsManager::insertGenerator | ( | const std::shared_ptr< Generator > & | generator | ) |
bool iv::model::pms::PmsManager::insertMainBar | ( | const std::shared_ptr< MainBar > & | mainBar | ) |
bool iv::model::pms::PmsManager::insertMode | ( | const std::shared_ptr< Mode > & | mode | ) |
bool iv::model::pms::PmsManager::insertTransition | ( | const std::shared_ptr< Transition > & | transition | ) |
bool iv::model::pms::PmsManager::load | ( | std::string_view | pathPms | ) |
const std::map< iv::types::pms::elementId, std::shared_ptr< iv::model::pms::MainBar > > & iv::model::pms::PmsManager::mainBars | ( | ) |
void iv::model::pms::PmsManager::manageErasedUnit | ( | const iv::types::unitId & | unitId | ) |
const std::map< iv::types::pms::modeId, std::shared_ptr< iv::model::pms::Mode > > & iv::model::pms::PmsManager::modes | ( | ) |
bool iv::model::pms::PmsManager::moveDownAction | ( | const iv::types::pms::modeId & | sourceModeId, |
const iv::types::pms::modeId & | modeToReachId, | ||
uint64_t | actionIndex ) |
bool iv::model::pms::PmsManager::moveUpAction | ( | const iv::types::pms::modeId & | sourceModeId, |
const iv::types::pms::modeId & | modeToReachId, | ||
uint64_t | actionIndex ) |
bool iv::model::pms::PmsManager::replaceAction | ( | const iv::types::pms::modeId & | sourceModeId, |
const iv::types::pms::modeId & | modeToReachId, | ||
uint64_t | actionIndex, | ||
const std::shared_ptr< iv::model::pms::AbstractPmsAction > & | newAction ) |
Replaces an action in a transition.
sourceModeId | Source mode id |
modeToReachId | Mode to reach id |
actionIndex | Index of the action to be replaced |
newAction | New action to replace the old one |
bool iv::model::pms::PmsManager::save | ( | std::string_view | pathPms, |
const std::optional< std::shared_ptr< std::vector< std::shared_ptr< iv::file::xml::File > > > > & | savingFilesOut = std::nullopt ) const |
void iv::model::pms::PmsManager::sendModeTransitionInfo | ( | bool | isRunning, |
const iv::types::pms::modeId & | modeToReachId, | ||
const iv::mimics::elements::eOperationModeState & | newModeState ) |
Send the mode transition information through redundancy.
void iv::model::pms::PmsManager::setAndSendChannelTransitionFailureToAlarmValue | ( | ) | const |
Set the channel transition failure to alarm value and sends expeditiously the channel by redundancy.
void iv::model::pms::PmsManager::setAndSendChannelTransitionFailureToNormalValue | ( | ) | const |
Set the channel transition failure to normal value and sends expeditiously the channel by redundancy.
|
static |
|
staticprivate |
void iv::model::pms::PmsManager::update | ( | const PmsManager & | other | ) |
bool iv::model::pms::PmsManager::updateBusTieLeftMainBar | ( | iv::types::pms::elementId | busTieId, |
iv::types::pms::elementId | newLeftMainBarId ) |
bool iv::model::pms::PmsManager::updateBusTieRightMainBar | ( | iv::types::pms::elementId | busTieId, |
iv::types::pms::elementId | newRightMainBarId ) |
bool iv::model::pms::PmsManager::updateGeneratorLomId | ( | iv::types::pms::elementId | generatorId, |
iv::types::unitId | newLomId ) |
bool iv::model::pms::PmsManager::updateGeneratorMainBar | ( | iv::types::pms::elementId | generatorId, |
iv::types::pms::elementId | newMainBarId ) |
|
private |
std::weak_ptr<iv::channels::AbstractChannel> iv::model::pms::PmsManager::m_channelTransitionFailureAlarm |
|
private |
|
private |
|
private |
RunningModeTransition iv::model::pms::PmsManager::m_runningModeTransition |