OMSimulatorLib
The OMSimulator project is a FMI-based co-simulation environment that supports ordinary (i.e., non-delayed) and TLM connections.
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
oms::ComponentFMUME Class Reference

#include <ComponentFMUME.h>

Inheritance diagram for oms::ComponentFMUME:
Inheritance graph
Collaboration diagram for oms::ComponentFMUME:
Collaboration graph

Public Member Functions

 ~ComponentFMUME ()
 
const FMUInfogetFMUInfo () const
 
oms_status_enu_t exportToSSD (pugi::xml_node &node) const
 
oms_status_enu_t instantiate ()
 
oms_status_enu_t initialize ()
 
oms_status_enu_t terminate ()
 
oms_status_enu_t reset ()
 
oms_status_enu_t initializeDependencyGraph_initialUnknowns ()
 
oms_status_enu_t initializeDependencyGraph_outputs ()
 
oms_status_enu_t getBoolean (const ComRef &cref, bool &value)
 
oms_status_enu_t getBoolean (const fmi2_value_reference_t &vr, bool &value)
 
oms_status_enu_t getInteger (const ComRef &cref, int &value)
 
oms_status_enu_t getInteger (const fmi2_value_reference_t &vr, int &value)
 
oms_status_enu_t getReal (const ComRef &cref, double &value)
 
oms_status_enu_t getReal (const fmi2_value_reference_t &vr, double &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 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)
 
oms_status_enu_t doEventIteration ()
 
size_t getNumberOfContinuousStates () const
 
size_t getNumberOfEventIndicators () const
 
oms_status_enu_t getContinuousStates (double *states)
 
oms_status_enu_t setContinuousStates (double *states)
 
oms_status_enu_t getDerivatives (double *derivatives)
 
oms_status_enu_t getNominalsOfContinuousStates (double *nominals)
 
oms_status_enu_t getEventindicators (double *eventindicators)
 
fmi2_import_t * getFMU ()
 
fmi2_event_info_t * getEventInfo ()
 
- Public Member Functions inherited from oms::Component
virtual ~Component ()
 
const ComRefgetCref () const
 
ComRef getFullCref () const
 
ElementgetElement ()
 
ConnectorgetConnector (const ComRef &cref)
 
Connector ** getConnectors ()
 
oms_status_enu_t deleteConnector (const ComRef &cref)
 
oms_status_enu_t deleteResources ()
 
oms_status_enu_t getAllResources (std::vector< std::string > &resources) const
 
const std::string & getPath () const
 
oms_component_enu_t getType () const
 
void fetchAllVars ()
 
SystemgetParentSystem () const
 
ModelgetModel () const
 
void setGeometry (const ssd::ElementGeometry &geometry)
 
oms_status_enu_t addTLMBus (const oms::ComRef &cref, oms_tlm_domain_t domain, const int dimensions, const oms_tlm_interpolation_t interpolation)
 
oms::TLMBusConnectorgetTLMBusConnector (const oms::ComRef &cref)
 
TLMBusConnector ** getTLMBusConnectors ()
 
oms_status_enu_t addConnectorToTLMBus (const ComRef &busCref, const ComRef &connectorCref, const std::string type)
 
oms_status_enu_t deleteConnectorFromTLMBus (const ComRef &busCref, const ComRef &connectorCref)
 
virtual oms_status_enu_t stepUntil (double stopTime)
 
const DirectedGraphgetInitialUnknownsGraph ()
 
const DirectedGraphgetOutputsGraph ()
 

Static Public Member Functions

static ComponentNewComponent (const oms::ComRef &cref, System *parentSystem, const std::string &fmuPath)
 
static ComponentNewComponent (const pugi::xml_node &node, System *parentSystem)
 

Protected Member Functions

 ComponentFMUME (const ComRef &cref, System *parentSystem, const std::string &fmuPath)
 
 ComponentFMUME (ComponentFMUME const &copy)
 not implemented More...
 
ComponentFMUMEoperator= (ComponentFMUME const &copy)
 not implemented More...
 
- 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 More...
 
Componentoperator= (Component const &)
 not implemented More...
 

Private Attributes

jm_callbacks callbacks
 
fmi2_callback_functions_t callbackFunctions
 
fmi_import_context_t * context = NULL
 
fmi2_import_t * fmu = NULL
 
std::string tempDir
 
fmi2_event_info_t eventInfo
 
size_t nContinuousStates
 
size_t nEventIndicators
 
FMUInfo fmuInfo
 
std::vector< VariableallVariables
 
std::vector< Variableinputs
 
std::vector< Variableoutputs
 
std::vector< Variableparameters
 
std::vector< bool > exportVariables
 
std::map< ComRef, double > realStartValues
 parameters and start values defined before instantiating the FMU More...
 
std::map< ComRef, int > integerStartValues
 parameters and start values defined before instantiating the FMU More...
 
std::map< ComRef, bool > booleanStartValues
 parameters and start values defined before instantiating the FMU More...
 
std::unordered_map< unsigned int, unsigned int > resultFileMapping
 

Additional Inherited Members

- Protected Attributes inherited from oms::Component
DirectedGraph initialUnknownsGraph
 
DirectedGraph outputsGraph
 
Element element
 
std::vector< Connector * > connectors
 
std::vector< TLMBusConnector * > tlmbusconnectors
 
Clock clock
 
unsigned int clock_id
 
bool fetchAllVars_ = false
 

Constructor & Destructor Documentation

◆ ~ComponentFMUME()

oms::ComponentFMUME::~ComponentFMUME ( )

◆ ComponentFMUME() [1/2]

oms::ComponentFMUME::ComponentFMUME ( const ComRef cref,
System parentSystem,
const std::string &  fmuPath 
)
protected
Here is the caller graph for this function:

◆ ComponentFMUME() [2/2]

oms::ComponentFMUME::ComponentFMUME ( ComponentFMUME const &  copy)
protected

not implemented

Member Function Documentation

◆ addSignalsToResults()

oms_status_enu_t oms::ComponentFMUME::addSignalsToResults ( const char *  regex)
virtual

Implements oms::Component.

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

◆ doEventIteration()

oms_status_enu_t oms::ComponentFMUME::doEventIteration ( )
Here is the caller graph for this function:

◆ exportToSSD()

oms_status_enu_t oms::ComponentFMUME::exportToSSD ( pugi::xml_node &  node) const
virtual

Implements oms::Component.

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

◆ getBoolean() [1/2]

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

Reimplemented from oms::Component.

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

◆ getBoolean() [2/2]

oms_status_enu_t oms::ComponentFMUME::getBoolean ( const fmi2_value_reference_t &  vr,
bool &  value 
)

◆ getContinuousStates()

oms_status_enu_t oms::ComponentFMUME::getContinuousStates ( double *  states)
Here is the caller graph for this function:

◆ getDerivatives()

oms_status_enu_t oms::ComponentFMUME::getDerivatives ( double *  derivatives)
Here is the caller graph for this function:

◆ getEventindicators()

oms_status_enu_t oms::ComponentFMUME::getEventindicators ( double *  eventindicators)
Here is the caller graph for this function:

◆ getEventInfo()

fmi2_event_info_t* oms::ComponentFMUME::getEventInfo ( )
inline
Here is the call graph for this function:

◆ getFMU()

fmi2_import_t* oms::ComponentFMUME::getFMU ( )
inline

◆ getFMUInfo()

const FMUInfo* oms::ComponentFMUME::getFMUInfo ( ) const
inlinevirtual

Reimplemented from oms::Component.

Here is the call graph for this function:

◆ getInteger() [1/2]

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

Reimplemented from oms::Component.

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

◆ getInteger() [2/2]

oms_status_enu_t oms::ComponentFMUME::getInteger ( const fmi2_value_reference_t &  vr,
int &  value 
)

◆ getNominalsOfContinuousStates()

oms_status_enu_t oms::ComponentFMUME::getNominalsOfContinuousStates ( double *  nominals)
Here is the caller graph for this function:

◆ getNumberOfContinuousStates()

size_t oms::ComponentFMUME::getNumberOfContinuousStates ( ) const
inline

◆ getNumberOfEventIndicators()

size_t oms::ComponentFMUME::getNumberOfEventIndicators ( ) const
inline
Here is the call graph for this function:

◆ getReal() [1/2]

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

Reimplemented from oms::Component.

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

◆ getReal() [2/2]

oms_status_enu_t oms::ComponentFMUME::getReal ( const fmi2_value_reference_t &  vr,
double &  value 
)

◆ initialize()

oms_status_enu_t oms::ComponentFMUME::initialize ( )
virtual

Implements oms::Component.

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

◆ initializeDependencyGraph_initialUnknowns()

oms_status_enu_t oms::ComponentFMUME::initializeDependencyGraph_initialUnknowns ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initializeDependencyGraph_outputs()

oms_status_enu_t oms::ComponentFMUME::initializeDependencyGraph_outputs ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ instantiate()

oms_status_enu_t oms::ComponentFMUME::instantiate ( )
virtual

Implements oms::Component.

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

◆ NewComponent() [1/2]

oms::Component * oms::ComponentFMUME::NewComponent ( const oms::ComRef cref,
oms::System parentSystem,
const std::string &  fmuPath 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ NewComponent() [2/2]

oms::Component * oms::ComponentFMUME::NewComponent ( const pugi::xml_node &  node,
oms::System parentSystem 
)
static
Here is the call graph for this function:

◆ operator=()

ComponentFMUME& oms::ComponentFMUME::operator= ( ComponentFMUME const &  copy)
protected

not implemented

Here is the caller graph for this function:

◆ registerSignalsForResultFile()

oms_status_enu_t oms::ComponentFMUME::registerSignalsForResultFile ( ResultWriter resultFile)
virtual

Implements oms::Component.

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

◆ removeSignalsFromResults()

oms_status_enu_t oms::ComponentFMUME::removeSignalsFromResults ( const char *  regex)
virtual

Implements oms::Component.

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

◆ reset()

oms_status_enu_t oms::ComponentFMUME::reset ( )
virtual

Implements oms::Component.

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

◆ setBoolean()

oms_status_enu_t oms::ComponentFMUME::setBoolean ( const ComRef cref,
bool  value 
)
virtual

Reimplemented from oms::Component.

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

◆ setContinuousStates()

oms_status_enu_t oms::ComponentFMUME::setContinuousStates ( double *  states)
Here is the caller graph for this function:

◆ setInteger()

oms_status_enu_t oms::ComponentFMUME::setInteger ( const ComRef cref,
int  value 
)
virtual

Reimplemented from oms::Component.

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

◆ setReal()

oms_status_enu_t oms::ComponentFMUME::setReal ( const ComRef cref,
double  value 
)
virtual

Reimplemented from oms::Component.

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

◆ terminate()

oms_status_enu_t oms::ComponentFMUME::terminate ( )
virtual

Implements oms::Component.

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

◆ updateSignals()

oms_status_enu_t oms::ComponentFMUME::updateSignals ( ResultWriter resultWriter)
virtual

Implements oms::Component.

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

Member Data Documentation

◆ allVariables

std::vector<Variable> oms::ComponentFMUME::allVariables
private

◆ booleanStartValues

std::map<ComRef, bool> oms::ComponentFMUME::booleanStartValues
private

parameters and start values defined before instantiating the FMU

◆ callbackFunctions

fmi2_callback_functions_t oms::ComponentFMUME::callbackFunctions
private

◆ callbacks

jm_callbacks oms::ComponentFMUME::callbacks
private

◆ context

fmi_import_context_t* oms::ComponentFMUME::context = NULL
private

◆ eventInfo

fmi2_event_info_t oms::ComponentFMUME::eventInfo
private

◆ exportVariables

std::vector<bool> oms::ComponentFMUME::exportVariables
private

◆ fmu

fmi2_import_t* oms::ComponentFMUME::fmu = NULL
private

◆ fmuInfo

FMUInfo oms::ComponentFMUME::fmuInfo
private

◆ inputs

std::vector<Variable> oms::ComponentFMUME::inputs
private

◆ integerStartValues

std::map<ComRef, int> oms::ComponentFMUME::integerStartValues
private

parameters and start values defined before instantiating the FMU

◆ nContinuousStates

size_t oms::ComponentFMUME::nContinuousStates
private

◆ nEventIndicators

size_t oms::ComponentFMUME::nEventIndicators
private

◆ outputs

std::vector<Variable> oms::ComponentFMUME::outputs
private

◆ parameters

std::vector<Variable> oms::ComponentFMUME::parameters
private

◆ realStartValues

std::map<ComRef, double> oms::ComponentFMUME::realStartValues
private

parameters and start values defined before instantiating the FMU

◆ resultFileMapping

std::unordered_map<unsigned int , unsigned int > oms::ComponentFMUME::resultFileMapping
private

◆ tempDir

std::string oms::ComponentFMUME::tempDir
private

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