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

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
oms::ComponentFMUCS Class Reference

`#include <ComponentFMUCS.h>`

Inheritance diagram for oms::ComponentFMUCS:
[legend]
Collaboration diagram for oms::ComponentFMUCS:
[legend]

## Public Member Functions
| ~ComponentFMUCS ()
const FMUInfo * | getFMUInfo () const
oms_status_enu_t | exportToSSD (pugi::xml_node &node, Snapshot &snapshot, std::string variantName) const
oms_status_enu_t | exportToSSV (pugi::xml_node &ssvNode)
void | getFilteredUnitDefinitionsToSSD (std::map< std::string, std::map< std::string, std::string > > &unitDefinitions)
void | getFilteredEnumerationDefinitionsToSSD (std::map< std::string, std::map< std::string, std::string > > &enumerationDefinitions)
oms_status_enu_t | exportToSSVTemplate (pugi::xml_node &ssvNode, Snapshot &snapshot)
oms_status_enu_t | exportToSSMTemplate (pugi::xml_node &ssmNode)
oms_status_enu_t | instantiate ()
oms_status_enu_t | initialize ()
oms_status_enu_t | terminate ()
oms_status_enu_t | reset ()
oms_status_enu_t | stepUntil (double stopTime)
oms_status_enu_t | initializeDependencyGraph_initialUnknowns ()
oms_status_enu_t | initializeDependencyGraph_outputs ()
Variable * | getVariable (const ComRef &cref)
Values & | getValues ()
oms_status_enu_t | setValuesResources (Values &values)
oms_status_enu_t | getBoolean (const ComRef &cref, bool &value)
oms_status_enu_t | getBoolean (const fmi2ValueReference &vr, bool &value)
oms_status_enu_t | getInteger (const ComRef &cref, int &value)
oms_status_enu_t | getInteger (const fmi2ValueReference &vr, int &value)
oms_status_enu_t | getReal (const ComRef &cref, double &value)
oms_status_enu_t | getReal (const fmi2ValueReference &vr, double &value)
oms_status_enu_t | getString (const ComRef &cref, std::string &value)
oms_status_enu_t | getString (const fmi2ValueReference &vr, std::string &value)
oms_status_enu_t | setBoolean (const ComRef &cref, bool value)
oms_status_enu_t | setInteger (const ComRef &cref, int value)
oms_status_enu_t | setReal (const ComRef &cref, double value)
oms_status_enu_t | setString (const ComRef &cref, const std::string &value)
oms_status_enu_t | setUnit (const ComRef &cref, const std::string &value)
oms_status_enu_t | getDirectionalDerivative (const ComRef &unknownCref, const ComRef &knownCref, double &value)
oms_status_enu_t | getDirectionalDerivativeHeper (const int unknownIndex, const int knownindex, const std::vector< int > &dependencyList, double &value)
oms_status_enu_t | deleteStartValue (const ComRef &cref)
oms_status_enu_t | updateOrDeleteStartValueInReplacedComponent (std::vector< std::string > &warningList)
oms_status_enu_t | setFmuTime (double time)
fmiHandle * | getFMU ()
std::vector< Variable > | getAllVariables ()
oms_status_enu_t | getRealOutputDerivative (const ComRef &cref, SignalDerivative &der)
oms_status_enu_t | setRealInputDerivative (const ComRef &cref, const SignalDerivative &der)
oms_status_enu_t | setExportName (const std::string &exportName)
std::string | getExportName () const
oms_status_enu_t | registerSignalsForResultFile (ResultWriter &resultFile)
oms_status_enu_t | updateSignals (ResultWriter &resultWriter)
oms_status_enu_t | addSignalsToResults (const char *regex)
oms_status_enu_t | removeSignalsFromResults (const char *regex)
bool | getCanGetAndSetState ()
oms_status_enu_t | saveState ()
oms_status_enu_t | freeState ()
oms_status_enu_t | restoreState ()
void | getFilteredSignals (std::vector< Connector > &filteredSignals) const
oms_status_enu_t | newResources (const std::string &ssvFilename, const std::string &ssmFilename, bool externalResources)
oms_status_enu_t | setResourcesHelper1 (Values value)
oms_status_enu_t | setResourcesHelper2 (Values value)
oms_status_enu_t | deleteReferencesInSSD (const std::string &filename)
oms_status_enu_t | deleteResourcesInSSP (const std::string &filename)
void | copyModelDescriptionUnit (Values &value)
Public Member Functions inherited from oms::Component
virtual | ~Component ()
virtual oms_status_enu_t | getVariableType (const ComRef &cref, oms_signal_type_enu_t &type)
virtual std::vector< Values > | getValuesResources ()
virtual oms_status_enu_t | setTime (double time)
virtual oms_status_enu_t | addResources (std::string &filename)
virtual size_t | getNumberOfContinuousStates () const
virtual size_t | getNumberOfEventIndicators () const
virtual oms_status_enu_t | getContinuousStates (double *states)
virtual oms_status_enu_t | setContinuousStates (double *states)
virtual oms_status_enu_t | getDerivatives (double *derivatives)
virtual oms_status_enu_t | getNominalsOfContinuousStates (double *nominals)
virtual oms_status_enu_t | getEventindicators (double *eventindicators)
virtual oms_status_enu_t | getEventindicators (double *eventindicators, size_t size)
virtual fmi2EventInfo * | getEventInfo ()
virtual oms_status_enu_t | doEventIteration ()
virtual oms_status_enu_t | completedIntegratorStep (bool noSetFMUStatePriorToCurrentPoint, bool &enterEventMode, bool &terminateSimulation)
virtual oms_status_enu_t | enterEventMode ()
virtual oms_status_enu_t | enterContinuousTimeMode ()
virtual bool | getNewDiscreteStatesNeeded ()
virtual bool | getTerminateSimulation ()
virtual bool | getNominalsOfContinuousStatesChanged ()
virtual bool | getValuesOfContinuousStatesChanged ()
virtual bool | getNextEventTimeDefined ()
virtual double | getNextEventTime ()
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

## Static Public Member Functions
static Component * | NewComponent (const ComRef &cref, System *parentSystem, const std::string &fmuPath, std::string replaceComponent="")
static Component * | NewComponent (const pugi::xml_node &node, System *parentSystem, const std::string &sspVersion, const Snapshot &snapshot, std::string variantName)

## Protected Member Functions
| ComponentFMUCS (const ComRef &cref, System *parentSystem, const std::string &fmuPath)
| ComponentFMUCS (ComponentFMUCS const &copy)
| not implemented
ComponentFMUCS & | operator= (ComponentFMUCS const &copy)
| not implemented
oms_status_enu_t | renameValues (const ComRef &oldCref, const ComRef &newCref)
void | dumpInitialUnknowns ()
Protected Member Functions inherited from oms::Component
| 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

## Private Member Functions
oms::ComRef | getValidCref (ComRef cref)

## Private Attributes
fmi2CallbackLogger | omsfmi2logger
fmiHandle * | fmu = NULL
FMUInfo | fmuInfo
std::vector< Variable > | allVariables
std::vector< unsigned int > | calculatedParameters
std::vector< unsigned int > | derivatives
std::vector< unsigned int > | inputs
std::vector< unsigned int > | outputs
std::vector< unsigned int > | parameters
std::vector< bool > | exportVariables
std::string | exportName
| export name for the component, used in the result file
Values | values
| start values defined before instantiating the FMU and external inputs defined after initialization
std::unordered_map< unsigned int, unsigned int > | resultFileMapping
double | time
fmi2FMUstate | fmuState = NULL
double | fmuStateTime

## Additional Inherited Members
Protected Attributes inherited from oms::Component
DirectedGraph | initialUnknownsGraph
DirectedGraph | outputsGraph
Element | element
std::vector< Connector * > | connectors
Clock | clock
unsigned int | clock_id

## Constructor & Destructor Documentation

## ◆ ~ComponentFMUCS()

oms::ComponentFMUCS::~ComponentFMUCS | ( |  | ) |

## ◆ ComponentFMUCS() [1/2]

oms::ComponentFMUCS::ComponentFMUCS | ( | const ComRef & | cref,
|  | System * | parentSystem,
|  | const std::string & | fmuPath
| ) |  |
| protected

## ◆ ComponentFMUCS() [2/2]

oms::ComponentFMUCS::ComponentFMUCS | ( | ComponentFMUCS const & | copy | ) |
| protected

not implemented

## Member Function Documentation

## ◆ addSignalsToResults()

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

Implements oms::Component.

## ◆ copyModelDescriptionUnit()

void oms::ComponentFMUCS::copyModelDescriptionUnit | ( | Values & | value | ) |

## ◆ deleteReferencesInSSD()

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

Reimplemented from oms::Component.

Here is the call graph for this function:

## ◆ deleteResourcesInSSP()

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

Reimplemented from oms::Component.

## ◆ deleteStartValue()

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

Reimplemented from oms::Component.

## ◆ dumpInitialUnknowns()

void oms::ComponentFMUCS::dumpInitialUnknowns | ( |  | ) |
| protected

## ◆ exportToSSD()

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

Implements oms::Component.

## ◆ exportToSSMTemplate()

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

Reimplemented from oms::Component.

## ◆ exportToSSV()

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

Reimplemented from oms::Component.

## ◆ exportToSSVTemplate()

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

Reimplemented from oms::Component.

## ◆ freeState()

oms_status_enu_t oms::ComponentFMUCS::freeState | ( |  | ) |
| virtual

Reimplemented from oms::Component.

## ◆ getAllVariables()

std::vector< Variable > oms::ComponentFMUCS::getAllVariables | ( |  | ) |
| inline

## ◆ getBoolean() [1/2]

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

Reimplemented from oms::Component.

## ◆ getBoolean() [2/2]

oms_status_enu_t oms::ComponentFMUCS::getBoolean | ( | const fmi2ValueReference & | vr,
|  | bool & | value
| ) |  |

## ◆ getCanGetAndSetState()

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

Reimplemented from oms::Component.

Here is the call graph for this function:

## ◆ getDirectionalDerivative()

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

Reimplemented from oms::Component.

Here is the call graph for this function:

## ◆ getDirectionalDerivativeHeper()

oms_status_enu_t oms::ComponentFMUCS::getDirectionalDerivativeHeper | ( | const int | unknownIndex,
|  | const int | knownindex,
|  | const std::vector< int > & | dependencyList,
|  | double & | value
| ) |  |

## ◆ getExportName()

std::string oms::ComponentFMUCS::getExportName | ( |  | ) | const
| inline

## ◆ getFilteredEnumerationDefinitionsToSSD()

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

Reimplemented from oms::Component.

## ◆ getFilteredSignals()

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

Implements oms::Component.

## ◆ getFilteredUnitDefinitionsToSSD()

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

Reimplemented from oms::Component.

## ◆ getFMU()

fmiHandle * oms::ComponentFMUCS::getFMU | ( |  | ) |
| inline virtual

Reimplemented from oms::Component.

## ◆ getFMUInfo()

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

Reimplemented from oms::Component.

Here is the caller graph for this function:

## ◆ getInteger() [1/2]

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

Reimplemented from oms::Component.

## ◆ getInteger() [2/2]

oms_status_enu_t oms::ComponentFMUCS::getInteger | ( | const fmi2ValueReference & | vr,
|  | int & | value
| ) |  |

## ◆ getReal() [1/2]

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

Reimplemented from oms::Component.

## ◆ getReal() [2/2]

oms_status_enu_t oms::ComponentFMUCS::getReal | ( | const fmi2ValueReference & | vr,
|  | double & | value
| ) |  |

## ◆ getRealOutputDerivative()

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

Reimplemented from oms::Component.

## ◆ getString() [1/2]

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

Reimplemented from oms::Component.

## ◆ getString() [2/2]

oms_status_enu_t oms::ComponentFMUCS::getString | ( | const fmi2ValueReference & | vr,
|  | std::string & | value
| ) |  |

## ◆ getValidCref()

oms::ComRef oms::ComponentFMUCS::getValidCref | ( | ComRef | cref | ) |
| private

Here is the call graph for this function:

## ◆ getValues()

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

Reimplemented from oms::Component.

## ◆ getVariable()

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

Implements oms::Component.

## ◆ initialize()

oms_status_enu_t oms::ComponentFMUCS::initialize | ( |  | ) |
| virtual

Implements oms::Component.

## ◆ initializeDependencyGraph_initialUnknowns()

oms_status_enu_t oms::ComponentFMUCS::initializeDependencyGraph_initialUnknowns | ( |  | ) |

Here is the call graph for this function:

## ◆ initializeDependencyGraph_outputs()

oms_status_enu_t oms::ComponentFMUCS::initializeDependencyGraph_outputs | ( |  | ) |

Here is the call graph for this function:

## ◆ instantiate()

oms_status_enu_t oms::ComponentFMUCS::instantiate | ( |  | ) |
| virtual

Implements oms::Component.

## ◆ NewComponent() [1/2]

oms::Component * oms::ComponentFMUCS::NewComponent | ( | const ComRef & | cref,
|  | oms::System * | parentSystem,
|  | const std::string & | fmuPath,
|  | std::string | replaceComponent = `""`
| ) |  |
| static

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ NewComponent() [2/2]

oms::Component * oms::ComponentFMUCS::NewComponent | ( | const pugi::xml_node & | node,
|  | oms::System * | parentSystem,
|  | const std::string & | sspVersion,
|  | const Snapshot & | snapshot,
|  | std::string | variantName
| ) |  |
| static

Here is the call graph for this function:

## ◆ newResources()

oms_status_enu_t oms::ComponentFMUCS::newResources | ( | const std::string & | ssvFilename,
|  | const std::string & | ssmFilename,
|  | bool | externalResources
| ) |  |
| virtual

Reimplemented from oms::Component.

Here is the call graph for this function:

## ◆ operator=()

ComponentFMUCS & oms::ComponentFMUCS::operator= | ( | ComponentFMUCS const & | copy | ) |
| protected

not implemented

## ◆ registerSignalsForResultFile()

oms_status_enu_t oms::ComponentFMUCS::registerSignalsForResultFile | ( | ResultWriter & | resultFile | ) |
| virtual

Implements oms::Component.

Here is the call graph for this function:

## ◆ removeSignalsFromResults()

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

Implements oms::Component.

## ◆ renameValues()

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

Reimplemented from oms::Component.

## ◆ reset()

oms_status_enu_t oms::ComponentFMUCS::reset | ( |  | ) |
| virtual

Implements oms::Component.

## ◆ restoreState()

oms_status_enu_t oms::ComponentFMUCS::restoreState | ( |  | ) |
| virtual

Reimplemented from oms::Component.

## ◆ saveState()

oms_status_enu_t oms::ComponentFMUCS::saveState | ( |  | ) |
| virtual

Reimplemented from oms::Component.

## ◆ setBoolean()

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

Reimplemented from oms::Component.

## ◆ setExportName()

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

Reimplemented from oms::Component.

## ◆ setFmuTime()

oms_status_enu_t oms::ComponentFMUCS::setFmuTime | ( | double | time | ) |
| inline

## ◆ setInteger()

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

Reimplemented from oms::Component.

## ◆ setReal()

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

Reimplemented from oms::Component.

## ◆ setRealInputDerivative()

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

Reimplemented from oms::Component.

Here is the call graph for this function:

## ◆ setResourcesHelper1()

oms_status_enu_t oms::ComponentFMUCS::setResourcesHelper1 | ( | Values | value | ) |

## ◆ setResourcesHelper2()

oms_status_enu_t oms::ComponentFMUCS::setResourcesHelper2 | ( | Values | value | ) |

Here is the call graph for this function:

## ◆ setString()

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

Reimplemented from oms::Component.

## ◆ setUnit()

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

Reimplemented from oms::Component.

## ◆ setValuesResources()

oms_status_enu_t oms::ComponentFMUCS::setValuesResources | ( | Values & | values | ) |
| virtual

Reimplemented from oms::Component.

## ◆ stepUntil()

oms_status_enu_t oms::ComponentFMUCS::stepUntil | ( | double | stopTime | ) |
| virtual

Reimplemented from oms::Component.

## ◆ terminate()

oms_status_enu_t oms::ComponentFMUCS::terminate | ( |  | ) |
| virtual

Implements oms::Component.

## ◆ updateOrDeleteStartValueInReplacedComponent()

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

Reimplemented from oms::Component.

## ◆ updateSignals()

oms_status_enu_t oms::ComponentFMUCS::updateSignals | ( | ResultWriter & | resultWriter | ) |
| virtual

Implements oms::Component.

Here is the call graph for this function:

## Member Data Documentation

## ◆ allVariables

std::vector<Variable> oms::ComponentFMUCS::allVariables
| private

## ◆ calculatedParameters

std::vector<unsigned int> oms::ComponentFMUCS::calculatedParameters
| private

## ◆ derivatives

std::vector<unsigned int> oms::ComponentFMUCS::derivatives
| private

## ◆ exportName

std::string oms::ComponentFMUCS::exportName
| private

export name for the component, used in the result file

## ◆ exportVariables

std::vector<bool> oms::ComponentFMUCS::exportVariables
| private

## ◆ fmu

fmiHandle* oms::ComponentFMUCS::fmu = NULL
| private

## ◆ fmuInfo

FMUInfo oms::ComponentFMUCS::fmuInfo
| private

## ◆ fmuState

fmi2FMUstate oms::ComponentFMUCS::fmuState = NULL
| private

## ◆ fmuStateTime

double oms::ComponentFMUCS::fmuStateTime
| private

## ◆ inputs

std::vector<unsigned int> oms::ComponentFMUCS::inputs
| private

## ◆ omsfmi2logger

fmi2CallbackLogger oms::ComponentFMUCS::omsfmi2logger
| private

## ◆ outputs

std::vector<unsigned int> oms::ComponentFMUCS::outputs
| private

## ◆ parameters

std::vector<unsigned int> oms::ComponentFMUCS::parameters
| private

## ◆ resultFileMapping

std::unordered_map<unsigned int , unsigned int > oms::ComponentFMUCS::resultFileMapping
| private

## ◆ time

double oms::ComponentFMUCS::time
| private

## ◆ values

Values oms::ComponentFMUCS::values
| private

start values defined before instantiating the FMU and external inputs defined after initialization

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

- /var/lib/jenkins/ws/OMSimulator_PR-1619/src/OMSimulatorLib/ComponentFMUCS.h
- /var/lib/jenkins/ws/OMSimulator_PR-1619/src/OMSimulatorLib/ComponentFMUCS.cpp