OMSimulatorLib The OMSimulator project is a FMI-based co-simulation environment.

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
oms::Component Class Referenceabstract

`#include <Component.h>`

Inheritance diagram for oms::Component:

## Public Member Functions
virtual | ~Component ()
virtual oms_status_enu_t | addSignalsToResults (const char *regex)=0
virtual oms_status_enu_t | exportToSSD (pugi::xml_node &node, Snapshot &snapshot, std::string variantName) const =0
virtual oms_status_enu_t | exportToSSV (pugi::xml_node &ssvNode)
virtual void | getFilteredUnitDefinitionsToSSD (std::map< std::string, std::map< std::string, std::string > > &unitDefinitions)
virtual void | getFilteredEnumerationDefinitionsToSSD (std::map< std::string, std::map< std::string, std::string > > &enumerationDefinitions)
virtual oms_status_enu_t | initialize ()=0
virtual oms_status_enu_t | instantiate ()=0
virtual oms_status_enu_t | registerSignalsForResultFile (ResultWriter &resultFile)=0
virtual oms_status_enu_t | removeSignalsFromResults (const char *regex)=0
virtual oms_status_enu_t | reset ()=0
virtual oms_status_enu_t | terminate ()=0
virtual oms_status_enu_t | updateSignals (ResultWriter &resultWriter)=0
virtual Variable * | getVariable (const ComRef &cref)=0
virtual bool | getCanGetAndSetState ()
virtual const FMUInfo * | getFMUInfo () const
virtual oms_status_enu_t | deleteStartValue (const ComRef &cref)
virtual std::vector< Values > | getValuesResources ()
virtual Values & | getValues ()
virtual oms_status_enu_t | setValuesResources (Values &values)
virtual oms_status_enu_t | updateOrDeleteStartValueInReplacedComponent (std::vector< std::string > &warningList)
virtual oms_status_enu_t | exportToSSMTemplate (pugi::xml_node &ssmNode)
virtual oms_status_enu_t | exportToSSVTemplate (pugi::xml_node &ssvNode, Snapshot &snapshot)
virtual oms_status_enu_t | freeState ()
virtual oms_status_enu_t | getBoolean (const ComRef &cref, bool &value)
virtual oms_status_enu_t | getInteger (const ComRef &cref, int &value)
virtual oms_status_enu_t | getReal (const ComRef &cref, double &value)
virtual oms_status_enu_t | getString (const ComRef &cref, std::string &value)
virtual oms_status_enu_t | getRealOutputDerivative (const ComRef &cref, SignalDerivative &der)
virtual oms_status_enu_t | getDirectionalDerivative (const ComRef &unknownCref, const ComRef &knownCref, double &value)
virtual oms_status_enu_t | restoreState ()
virtual oms_status_enu_t | saveState ()
virtual oms_status_enu_t | setBoolean (const ComRef &cref, bool value)
virtual oms_status_enu_t | setInteger (const ComRef &cref, int value)
virtual oms_status_enu_t | setReal (const ComRef &cref, double value)
virtual oms_status_enu_t | setString (const ComRef &cref, const std::string &value)
virtual oms_status_enu_t | setUnit (const ComRef &cref, const std::string &value)
virtual oms_status_enu_t | setRealInputDerivative (const ComRef &cref, const SignalDerivative &der)
virtual oms_status_enu_t | stepUntil (double stopTime)
virtual oms_status_enu_t | setTime (double time)
virtual oms_status_enu_t | setExportName (const std::string &exportName)
virtual oms_status_enu_t | newResources (const std::string &ssvFileName, const std::string &ssmFileName, bool externalResources)
virtual oms_status_enu_t | addResources (std::string &filename)
virtual oms_status_enu_t | deleteReferencesInSSD (const std::string &filename)
virtual oms_status_enu_t | deleteResourcesInSSP (const std::string &filename)
const ComRef & | getCref () const
ComRef | getFullCref () const
Element * | getElement ()
Connector * | getConnector (const ComRef &cref)
Connector ** | getConnectors ()
oms_status_enu_t | deleteConnector (const ComRef &cref)
void | getAllResources (std::vector< std::string > &resources) const
const std::string & | getPath () const
const std::string & | getTempDir () const
void | setPath (const std::string &newPath)
void | setTempDir (const std::string &tempDir)
oms_component_enu_t | getType () const
System * | getParentSystem () const
Model & | getModel () const
void | setGeometry (const ssd::ElementGeometry &geometry)
const DirectedGraph & | getInitialUnknownsGraph ()
const DirectedGraph & | getOutputsGraph ()
oms_status_enu_t | rename (const ComRef &newCref)
| rename submodules, e.g., fmu:s
virtual void | getFilteredSignals (std::vector< Connector > &filteredSignals) const =0

## Protected Member Functions
| Component (const ComRef &cref, oms_component_enu_t type, System *parentSystem, const std::string &path)
| Component (Component const &)
| not implemented
Component & | operator= (Component const &)
| not implemented
virtual oms_status_enu_t | renameValues (const ComRef &oldCref, const ComRef &newCref)

## Protected Attributes
DirectedGraph | initialUnknownsGraph
DirectedGraph | outputsGraph
Element | element
std::vector< Connector * > | connectors
Clock | clock
unsigned int | clock_id

## Private Attributes
System * | parentSystem
ComRef | cref
oms_component_enu_t | type
std::string | path
| resource file (fmu, mat)
std::string | tempDir
| unzipped fmu
Values | values

## Constructor & Destructor Documentation

## ◆ ~Component()

oms::Component::~Component | ( |  | ) |
| virtual

## ◆ Component() [1/2]

oms::Component::Component | ( | const ComRef & | cref,
|  | oms_component_enu_t | type,
|  | System * | parentSystem,
|  | const std::string & | path
| ) |  |
| protected

## ◆ Component() [2/2]

oms::Component::Component | ( | Component const & |  | ) |
| protected

not implemented

## Member Function Documentation

## ◆ addResources()

virtual oms_status_enu_t oms::Component::addResources | ( | std::string & | filename | ) |
| inline virtual

## ◆ addSignalsToResults()

virtual oms_status_enu_t oms::Component::addSignalsToResults | ( | const char * | regex | ) |
| pure virtual

Implemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ deleteConnector()

oms_status_enu_t oms::Component::deleteConnector | ( | const ComRef & | cref | ) |

## ◆ deleteReferencesInSSD()

virtual oms_status_enu_t oms::Component::deleteReferencesInSSD | ( | const std::string & | filename | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ deleteResourcesInSSP()

virtual oms_status_enu_t oms::Component::deleteResourcesInSSP | ( | const std::string & | filename | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ deleteStartValue()

virtual oms_status_enu_t oms::Component::deleteStartValue | ( | const ComRef & | cref | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ exportToSSD()

virtual oms_status_enu_t oms::Component::exportToSSD | ( | pugi::xml_node & | node,
|  | Snapshot & | snapshot,
|  | std::string | variantName
| ) |  | const
| pure virtual

Implemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ exportToSSMTemplate()

virtual oms_status_enu_t oms::Component::exportToSSMTemplate | ( | pugi::xml_node & | ssmNode | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ exportToSSV()

virtual oms_status_enu_t oms::Component::exportToSSV | ( | pugi::xml_node & | ssvNode | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ exportToSSVTemplate()

virtual oms_status_enu_t oms::Component::exportToSSVTemplate | ( | pugi::xml_node & | ssvNode,
|  | Snapshot & | snapshot
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ freeState()

virtual oms_status_enu_t oms::Component::freeState | ( |  | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentTable.

## ◆ getAllResources()

void oms::Component::getAllResources | ( | std::vector< std::string > & | resources | ) | const
| inline

## ◆ getBoolean()

virtual oms_status_enu_t oms::Component::getBoolean | ( | const ComRef & | cref,
|  | bool & | value
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ getCanGetAndSetState()

virtual bool oms::Component::getCanGetAndSetState | ( |  | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ getConnector()

oms::Connector * oms::Component::getConnector | ( | const ComRef & | cref | ) |

## ◆ getConnectors()

Connector ** oms::Component::getConnectors | ( |  | ) |
| inline

## ◆ getCref()

const ComRef & oms::Component::getCref | ( |  | ) | const
| inline

## ◆ getDirectionalDerivative()

virtual oms_status_enu_t oms::Component::getDirectionalDerivative | ( | const ComRef & | unknownCref,
|  | const ComRef & | knownCref,
|  | double & | value
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ getElement()

Element * oms::Component::getElement | ( |  | ) |
| inline

## ◆ getFilteredEnumerationDefinitionsToSSD()

virtual void oms::Component::getFilteredEnumerationDefinitionsToSSD | ( | std::map< std::string, std::map< std::string, std::string > > & | enumerationDefinitions | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ getFilteredSignals()

virtual void oms::Component::getFilteredSignals | ( | std::vector< Connector > & | filteredSignals | ) | const
| pure virtual

Implemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ getFilteredUnitDefinitionsToSSD()

virtual void oms::Component::getFilteredUnitDefinitionsToSSD | ( | std::map< std::string, std::map< std::string, std::string > > & | unitDefinitions | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ getFMUInfo()

virtual const FMUInfo * oms::Component::getFMUInfo | ( |  | ) | const
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ getFullCref()

oms::ComRef oms::Component::getFullCref | ( |  | ) | const

## ◆ getInitialUnknownsGraph()

const DirectedGraph & oms::Component::getInitialUnknownsGraph | ( |  | ) |
| inline

## ◆ getInteger()

virtual oms_status_enu_t oms::Component::getInteger | ( | const ComRef & | cref,
|  | int & | value
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ getModel()

oms::Model & oms::Component::getModel | ( |  | ) | const

## ◆ getOutputsGraph()

const DirectedGraph & oms::Component::getOutputsGraph | ( |  | ) |
| inline

## ◆ getParentSystem()

System * oms::Component::getParentSystem | ( |  | ) | const
| inline

## ◆ getPath()

const std::string & oms::Component::getPath | ( |  | ) | const
| inline

## ◆ getReal()

virtual oms_status_enu_t oms::Component::getReal | ( | const ComRef & | cref,
|  | double & | value
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ getRealOutputDerivative()

virtual oms_status_enu_t oms::Component::getRealOutputDerivative | ( | const ComRef & | cref,
|  | SignalDerivative & | der
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentTable.

## ◆ getString()

virtual oms_status_enu_t oms::Component::getString | ( | const ComRef & | cref,
|  | std::string & | value
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ getTempDir()

const std::string & oms::Component::getTempDir | ( |  | ) | const
| inline

## ◆ getType()

oms_component_enu_t oms::Component::getType | ( |  | ) | const
| inline

## ◆ getValues()

virtual Values & oms::Component::getValues | ( |  | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ getValuesResources()

virtual std::vector< Values > oms::Component::getValuesResources | ( |  | ) |
| inline virtual

## ◆ getVariable()

virtual Variable * oms::Component::getVariable | ( | const ComRef & | cref | ) |
| pure virtual

Implemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ initialize()

virtual oms_status_enu_t oms::Component::initialize | ( |  | ) |
| pure virtual

Implemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ instantiate()

virtual oms_status_enu_t oms::Component::instantiate | ( |  | ) |
| pure virtual

Implemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ newResources()

virtual oms_status_enu_t oms::Component::newResources | ( | const std::string & | ssvFileName,
|  | const std::string & | ssmFileName,
|  | bool | externalResources
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ operator=()

Component & oms::Component::operator= | ( | Component const & |  | ) |
| protected

not implemented

## ◆ registerSignalsForResultFile()

virtual oms_status_enu_t oms::Component::registerSignalsForResultFile | ( | ResultWriter & | resultFile | ) |
| pure virtual

Implemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ removeSignalsFromResults()

virtual oms_status_enu_t oms::Component::removeSignalsFromResults | ( | const char * | regex | ) |
| pure virtual

Implemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ rename()

oms_status_enu_t oms::Component::rename | ( | const ComRef & | newCref | ) |

rename submodules, e.g., fmu:s

## ◆ renameValues()

virtual oms_status_enu_t oms::Component::renameValues | ( | const ComRef & | oldCref,
|  | const ComRef & | newCref
| ) |  |
| inline protected virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ reset()

virtual oms_status_enu_t oms::Component::reset | ( |  | ) |
| pure virtual

Implemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ restoreState()

virtual oms_status_enu_t oms::Component::restoreState | ( |  | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentTable.

## ◆ saveState()

virtual oms_status_enu_t oms::Component::saveState | ( |  | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentTable.

## ◆ setBoolean()

virtual oms_status_enu_t oms::Component::setBoolean | ( | const ComRef & | cref,
|  | bool | value
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ setExportName()

virtual oms_status_enu_t oms::Component::setExportName | ( | const std::string & | exportName | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ setGeometry()

void oms::Component::setGeometry | ( | const ssd::ElementGeometry & | geometry | ) |
| inline

## ◆ setInteger()

virtual oms_status_enu_t oms::Component::setInteger | ( | const ComRef & | cref,
|  | int | value
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ setPath()

void oms::Component::setPath | ( | const std::string & | newPath | ) |
| inline

## ◆ setReal()

virtual oms_status_enu_t oms::Component::setReal | ( | const ComRef & | cref,
|  | double | value
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ setRealInputDerivative()

virtual oms_status_enu_t oms::Component::setRealInputDerivative | ( | const ComRef & | cref,
|  | const SignalDerivative & | der
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, and oms::ComponentFMUCS.

## ◆ setString()

virtual oms_status_enu_t oms::Component::setString | ( | const ComRef & | cref,
|  | const std::string & | value
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ setTempDir()

void oms::Component::setTempDir | ( | const std::string & | tempDir | ) |
| inline

## ◆ setTime()

virtual oms_status_enu_t oms::Component::setTime | ( | double | time | ) |
| inline virtual

Reimplemented in oms::ComponentFMUME, and oms::ComponentTable.

## ◆ setUnit()

virtual oms_status_enu_t oms::Component::setUnit | ( | const ComRef & | cref,
|  | const std::string & | value
| ) |  |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ setValuesResources()

virtual oms_status_enu_t oms::Component::setValuesResources | ( | Values & | values | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ stepUntil()

virtual oms_status_enu_t oms::Component::stepUntil | ( | double | stopTime | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentTable.

## ◆ terminate()

virtual oms_status_enu_t oms::Component::terminate | ( |  | ) |
| pure virtual

Implemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## ◆ updateOrDeleteStartValueInReplacedComponent()

virtual oms_status_enu_t oms::Component::updateOrDeleteStartValueInReplacedComponent | ( | std::vector< std::string > & | warningList | ) |
| inline virtual

Reimplemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, and oms::ComponentFMUME.

## ◆ updateSignals()

virtual oms_status_enu_t oms::Component::updateSignals | ( | ResultWriter & | resultWriter | ) |
| pure virtual

Implemented in oms::ComponentFMU3CS, oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

## Member Data Documentation

## ◆ clock

Clock oms::Component::clock
| protected

## ◆ clock_id

unsigned int oms::Component::clock_id
| protected

## ◆ connectors

std::vector<Connector*> oms::Component::connectors
| protected

## ◆ cref

ComRef oms::Component::cref
| private

## ◆ element

Element oms::Component::element
| protected

## ◆ initialUnknownsGraph

DirectedGraph oms::Component::initialUnknownsGraph
| protected

## ◆ outputsGraph

DirectedGraph oms::Component::outputsGraph
| protected

## ◆ parentSystem

System* oms::Component::parentSystem
| private

## ◆ path

std::string oms::Component::path
| private

resource file (fmu, mat)

## ◆ tempDir

std::string oms::Component::tempDir
| private

unzipped fmu

## ◆ type

oms_component_enu_t oms::Component::type
| private

## ◆ values

Values oms::Component::values
| private

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

- /var/lib/jenkins/ws/OMSimulator_PR-1540/src/OMSimulatorLib/Component.h
- /var/lib/jenkins/ws/OMSimulator_PR-1540/src/OMSimulatorLib/Component.cpp