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 Attributes | List of all members
oms::ComponentTable Class Reference

#include <ComponentTable.h>

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

Public Member Functions

 ~ComponentTable ()
 
oms_status_enu_t exportToSSD (pugi::xml_node &node, Snapshot &snapshot, std::string variantName) const
 
oms_status_enu_t exportToSSVTemplate (pugi::xml_node &ssvNode)
 
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 setTime (double time)
 
VariablegetVariable (const ComRef &cref)
 
oms_status_enu_t getVariableType (const ComRef &cref, oms_signal_type_enu_t &type)
 
oms_status_enu_t getReal (const ComRef &cref, double &value)
 
oms_status_enu_t getRealOutputDerivative (const ComRef &cref, SignalDerivative &value)
 
oms_status_enu_t getInteger (const ComRef &cref, int &value)
 
oms_status_enu_t getBoolean (const ComRef &cref, bool &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)
 
bool getCanGetAndSetState ()
 
oms_status_enu_t saveState ()
 
oms_status_enu_t freeState ()
 
oms_status_enu_t restoreState ()
 
void getFilteredSignals (std::vector< Connector > &filteredSignals) const
 
- Public Member Functions inherited from oms::Component
virtual ~Component ()
 
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 const FMUInfogetFMUInfo () const
 
virtual oms_status_enu_t deleteStartValue (const ComRef &cref)
 
virtual std::vector< ValuesgetValuesResources ()
 
virtual ValuesgetValues ()
 
virtual oms_status_enu_t setValuesResources (Values &values)
 
virtual oms_status_enu_t updateOrDeleteStartValueInReplacedComponent (std::vector< std::string > &warningList)
 
virtual oms_status_enu_t exportToSSVTemplate (pugi::xml_node &ssvNode, Snapshot &snapshot)
 
virtual oms_status_enu_t getString (const ComRef &cref, std::string &value)
 
virtual oms_status_enu_t getDirectionalDerivative (const ComRef &unknownCref, const ComRef &knownCref, double &value)
 
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 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)
 
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 fmiHandle * getFMU ()
 
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 ComRefgetCref () const
 
ComRef getFullCref () const
 
ElementgetElement ()
 
ConnectorgetConnector (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
 
SystemgetParentSystem () const
 
ModelgetModel () const
 
void setGeometry (const ssd::ElementGeometry &geometry)
 
const DirectedGraphgetInitialUnknownsGraph ()
 
const DirectedGraphgetOutputsGraph ()
 
oms_status_enu_t rename (const ComRef &newCref)
 rename submodules, e.g., fmu:s
 

Static Public Member Functions

static ComponentNewComponent (const oms::ComRef &cref, System *parentSystem, const std::string &path)
 
static ComponentNewComponent (const pugi::xml_node &node, System *parentSystem, const std::string &sspVersion, const Snapshot &snapshot)
 

Protected Member Functions

 ComponentTable (const ComRef &cref, System *parentSystem, const std::string &path)
 
 ComponentTable (ComponentTable const &copy)
 not implemented
 
ComponentTableoperator= (ComponentTable const &copy)
 not implemented
 
- 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
 
Componentoperator= (Component const &)
 not implemented
 
virtual oms_status_enu_t renameValues (const ComRef &oldCref, const ComRef &newCref)
 

Private Attributes

ResultReaderresultReader
 
std::unordered_map< ComRef, ResultReader::Series * > series
 
std::unordered_map< ComRef, bool > exportSeries
 
std::unordered_map< unsigned int, unsigned int > resultFileMapping
 
double time
 
double storedTime
 
size_t lastIndex = 0
 

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

◆ ~ComponentTable()

oms::ComponentTable::~ComponentTable ( )
Here is the call graph for this function:

◆ ComponentTable() [1/2]

oms::ComponentTable::ComponentTable ( const ComRef cref,
System parentSystem,
const std::string &  path 
)
protected

◆ ComponentTable() [2/2]

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

not implemented

Member Function Documentation

◆ addSignalsToResults()

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

Implements oms::Component.

◆ exportToSSD()

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

Implements oms::Component.

◆ exportToSSMTemplate()

oms_status_enu_t oms::ComponentTable::exportToSSMTemplate ( pugi::xml_node &  ssmNode)
inlinevirtual

Reimplemented from oms::Component.

◆ exportToSSVTemplate()

oms_status_enu_t oms::ComponentTable::exportToSSVTemplate ( pugi::xml_node &  ssvNode)
inline

◆ freeState()

oms_status_enu_t oms::ComponentTable::freeState ( )
virtual

Reimplemented from oms::Component.

◆ getBoolean()

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

Reimplemented from oms::Component.

Here is the call graph for this function:

◆ getCanGetAndSetState()

bool oms::ComponentTable::getCanGetAndSetState ( )
inlinevirtual

Reimplemented from oms::Component.

◆ getFilteredSignals()

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

Implements oms::Component.

◆ getInteger()

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

Reimplemented from oms::Component.

Here is the call graph for this function:

◆ getReal()

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

Reimplemented from oms::Component.

Here is the call graph for this function:

◆ getRealOutputDerivative()

oms_status_enu_t oms::ComponentTable::getRealOutputDerivative ( const ComRef cref,
SignalDerivative value 
)
virtual

Reimplemented from oms::Component.

Here is the call graph for this function:

◆ getVariable()

Variable * oms::ComponentTable::getVariable ( const ComRef cref)
inlinevirtual

Implements oms::Component.

◆ getVariableType()

oms_status_enu_t oms::ComponentTable::getVariableType ( const ComRef cref,
oms_signal_type_enu_t &  type 
)
inlinevirtual

Reimplemented from oms::Component.

◆ initialize()

oms_status_enu_t oms::ComponentTable::initialize ( )
inlinevirtual

Implements oms::Component.

◆ instantiate()

oms_status_enu_t oms::ComponentTable::instantiate ( )
virtual

Implements oms::Component.

◆ NewComponent() [1/2]

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

◆ NewComponent() [2/2]

oms::Component * oms::ComponentTable::NewComponent ( const pugi::xml_node &  node,
oms::System parentSystem,
const std::string &  sspVersion,
const Snapshot snapshot 
)
static
Here is the call graph for this function:

◆ operator=()

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

not implemented

◆ registerSignalsForResultFile()

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

Implements oms::Component.

Here is the call graph for this function:

◆ removeSignalsFromResults()

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

Implements oms::Component.

◆ reset()

oms_status_enu_t oms::ComponentTable::reset ( )
virtual

Implements oms::Component.

◆ restoreState()

oms_status_enu_t oms::ComponentTable::restoreState ( )
virtual

Reimplemented from oms::Component.

◆ saveState()

oms_status_enu_t oms::ComponentTable::saveState ( )
virtual

Reimplemented from oms::Component.

◆ setTime()

oms_status_enu_t oms::ComponentTable::setTime ( double  time)
inlinevirtual

Reimplemented from oms::Component.

◆ stepUntil()

oms_status_enu_t oms::ComponentTable::stepUntil ( double  stopTime)
inlinevirtual

Reimplemented from oms::Component.

◆ terminate()

oms_status_enu_t oms::ComponentTable::terminate ( )
inlinevirtual

Implements oms::Component.

◆ updateSignals()

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

Implements oms::Component.

Here is the call graph for this function:

Member Data Documentation

◆ exportSeries

std::unordered_map<ComRef, bool> oms::ComponentTable::exportSeries
private

◆ lastIndex

size_t oms::ComponentTable::lastIndex = 0
private

◆ resultFileMapping

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

◆ resultReader

ResultReader* oms::ComponentTable::resultReader
private

◆ series

std::unordered_map<ComRef, ResultReader::Series*> oms::ComponentTable::series
private

◆ storedTime

double oms::ComponentTable::storedTime
private

◆ time

double oms::ComponentTable::time
private

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