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::ComponentFMU3CS Class Reference

`#include <ComponentFMU3CS.h>`

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

## Public Member Functions
| ~ComponentFMU3CS ()
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 fmi3ValueReference &vr, bool &value)
oms_status_enu_t | getInteger (const ComRef &cref, int &value)
oms_status_enu_t | getInteger (const fmi3ValueReference &vr, int &value, oms_signal_numeric_type_enu_t numericType)
oms_status_enu_t | getReal (const ComRef &cref, double &value)
oms_status_enu_t | getReal (const fmi3ValueReference &vr, double &value, oms_signal_numeric_type_enu_t numericType)
oms_status_enu_t | getString (const ComRef &cref, std::string &value)
oms_status_enu_t | getString (const fmi3ValueReference &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 | 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 | setExportName (const std::string &exportName)
std::string | getExportName () const
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
| ComponentFMU3CS (const ComRef &cref, System *parentSystem, const std::string &fmuPath)
| ComponentFMU3CS (ComponentFMU3CS const &copy)
| not implemented
ComponentFMU3CS & | operator= (ComponentFMU3CS 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
fmi3LogMessageCallback | omsfmi3logger
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
fmi3FMUState | 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

## ◆ ~ComponentFMU3CS()

oms::ComponentFMU3CS::~ComponentFMU3CS | ( |  | ) |

## ◆ ComponentFMU3CS() [1/2]

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

## ◆ ComponentFMU3CS() [2/2]

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

not implemented

## Member Function Documentation

## ◆ addSignalsToResults()

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

Implements oms::Component.

## ◆ copyModelDescriptionUnit()

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

## ◆ deleteReferencesInSSD()

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

Reimplemented from oms::Component.

Here is the call graph for this function:

## ◆ deleteResourcesInSSP()

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

Reimplemented from oms::Component.

## ◆ deleteStartValue()

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

Reimplemented from oms::Component.

## ◆ dumpInitialUnknowns()

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

## ◆ exportToSSD()

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

Implements oms::Component.

## ◆ exportToSSMTemplate()

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

Reimplemented from oms::Component.

## ◆ exportToSSV()

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

Reimplemented from oms::Component.

## ◆ exportToSSVTemplate()

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

Reimplemented from oms::Component.

## ◆ freeState()

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

Reimplemented from oms::Component.

## ◆ getAllVariables()

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

## ◆ getBoolean() [1/2]

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

Reimplemented from oms::Component.

## ◆ getBoolean() [2/2]

oms_status_enu_t oms::ComponentFMU3CS::getBoolean | ( | const fmi3ValueReference & | vr,
|  | bool & | value
| ) |  |

## ◆ getCanGetAndSetState()

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

Reimplemented from oms::Component.

Here is the call graph for this function:

## ◆ getDirectionalDerivative()

oms_status_enu_t oms::ComponentFMU3CS::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::ComponentFMU3CS::getDirectionalDerivativeHeper | ( | const int | unknownIndex,
|  | const int | knownindex,
|  | const std::vector< int > & | dependencyList,
|  | double & | value
| ) |  |

## ◆ getExportName()

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

## ◆ getFilteredEnumerationDefinitionsToSSD()

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

Reimplemented from oms::Component.

## ◆ getFilteredSignals()

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

Implements oms::Component.

## ◆ getFilteredUnitDefinitionsToSSD()

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

Reimplemented from oms::Component.

## ◆ getFMU()

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

Reimplemented from oms::Component.

## ◆ getFMUInfo()

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

Reimplemented from oms::Component.

Here is the caller graph for this function:

## ◆ getInteger() [1/2]

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

Reimplemented from oms::Component.

## ◆ getInteger() [2/2]

oms_status_enu_t oms::ComponentFMU3CS::getInteger | ( | const fmi3ValueReference & | vr,
|  | int & | value,
|  | oms_signal_numeric_type_enu_t | numericType
| ) |  |

## ◆ getReal() [1/2]

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

Reimplemented from oms::Component.

## ◆ getReal() [2/2]

oms_status_enu_t oms::ComponentFMU3CS::getReal | ( | const fmi3ValueReference & | vr,
|  | double & | value,
|  | oms_signal_numeric_type_enu_t | numericType
| ) |  |

## ◆ getRealOutputDerivative()

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

Reimplemented from oms::Component.

## ◆ getString() [1/2]

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

Reimplemented from oms::Component.

## ◆ getString() [2/2]

oms_status_enu_t oms::ComponentFMU3CS::getString | ( | const fmi3ValueReference & | vr,
|  | std::string & | value
| ) |  |

## ◆ getValidCref()

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

Here is the call graph for this function:

## ◆ getValues()

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

Reimplemented from oms::Component.

## ◆ getVariable()

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

Implements oms::Component.

## ◆ initialize()

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

Implements oms::Component.

## ◆ initializeDependencyGraph_initialUnknowns()

oms_status_enu_t oms::ComponentFMU3CS::initializeDependencyGraph_initialUnknowns | ( |  | ) |

Here is the call graph for this function:

## ◆ initializeDependencyGraph_outputs()

oms_status_enu_t oms::ComponentFMU3CS::initializeDependencyGraph_outputs | ( |  | ) |

Here is the call graph for this function:

## ◆ instantiate()

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

Implements oms::Component.

## ◆ NewComponent() [1/2]

oms::Component * oms::ComponentFMU3CS::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::ComponentFMU3CS::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::ComponentFMU3CS::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=()

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

not implemented

## ◆ registerSignalsForResultFile()

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

Implements oms::Component.

Here is the call graph for this function:

## ◆ removeSignalsFromResults()

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

Implements oms::Component.

## ◆ renameValues()

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

Reimplemented from oms::Component.

## ◆ reset()

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

Implements oms::Component.

## ◆ restoreState()

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

Reimplemented from oms::Component.

## ◆ saveState()

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

Reimplemented from oms::Component.

## ◆ setBoolean()

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

Reimplemented from oms::Component.

## ◆ setExportName()

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

Reimplemented from oms::Component.

## ◆ setFmuTime()

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

## ◆ setInteger()

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

Reimplemented from oms::Component.

Here is the call graph for this function:

## ◆ setReal()

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

Reimplemented from oms::Component.

Here is the call graph for this function:

## ◆ setRealInputDerivative()

oms_status_enu_t oms::ComponentFMU3CS::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::ComponentFMU3CS::setResourcesHelper1 | ( | Values | value | ) |

## ◆ setResourcesHelper2()

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

Here is the call graph for this function:

## ◆ setString()

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

Reimplemented from oms::Component.

## ◆ setUnit()

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

Reimplemented from oms::Component.

## ◆ setValuesResources()

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

Reimplemented from oms::Component.

## ◆ stepUntil()

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

Reimplemented from oms::Component.

## ◆ terminate()

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

Implements oms::Component.

## ◆ updateOrDeleteStartValueInReplacedComponent()

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

Reimplemented from oms::Component.

## ◆ updateSignals()

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

Implements oms::Component.

Here is the call graph for this function:

## Member Data Documentation

## ◆ allVariables

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

## ◆ calculatedParameters

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

## ◆ derivatives

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

## ◆ exportName

std::string oms::ComponentFMU3CS::exportName
| private

export name for the component, used in the result file

## ◆ exportVariables

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

## ◆ fmu

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

## ◆ fmuInfo

FMUInfo oms::ComponentFMU3CS::fmuInfo
| private

## ◆ fmuState

fmi3FMUState oms::ComponentFMU3CS::fmuState = NULL
| private

## ◆ fmuStateTime

double oms::ComponentFMU3CS::fmuStateTime
| private

## ◆ inputs

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

## ◆ omsfmi3logger

fmi3LogMessageCallback oms::ComponentFMU3CS::omsfmi3logger
| private

## ◆ outputs

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

## ◆ parameters

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

## ◆ resultFileMapping

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

## ◆ time

double oms::ComponentFMU3CS::time
| private

## ◆ values

Values oms::ComponentFMU3CS::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/jenkins1/ws/OMSimulator_PR-1619/src/OMSimulatorLib/ComponentFMU3CS.h
- /var/lib/jenkins1/ws/OMSimulator_PR-1619/src/OMSimulatorLib/ComponentFMU3CS.cpp