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

#include <ComponentTable.h>

Inheritance diagram for oms::ComponentTable:
Inheritance graph
Collaboration diagram for oms::ComponentTable:
Collaboration graph

Public Member Functions

 ~ComponentTable ()
 
oms_status_enu_t exportToSSD (pugi::xml_node &node, pugi::xml_node &ssvNode) 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)
 
VariablegetVariable (const ComRef &cref)
 
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 ()
 
- 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 getAllResources (std::vector< std::string > &resources) const
 
const std::string & getPath () const
 
const std::string & getTempDir () const
 
void setTempDir (const std::string &tempDir)
 
oms_component_enu_t getType () const
 
virtual const FMUInfogetFMUInfo () const
 
void fetchAllVars (bool enableOption)
 
SystemgetParentSystem () const
 
ModelgetModel () const
 
void setGeometry (const ssd::ElementGeometry &geometry)
 
virtual oms_status_enu_t setFaultInjection (const ComRef &signal, oms_fault_type_enu_t faultType, double faultValue)
 
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)
 
const DirectedGraphgetInitialUnknownsGraph ()
 
const DirectedGraphgetOutputsGraph ()
 
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 deleteStartValue (const ComRef &cref)
 
virtual oms_status_enu_t setRealInputDerivative (const ComRef &cref, const SignalDerivative &der)
 

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)
 

Protected Member Functions

 ComponentTable (const ComRef &cref, System *parentSystem, const std::string &path)
 
 ComponentTable (ComponentTable const &copy)
 not implemented More...
 
ComponentTableoperator= (ComponentTable 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

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
 

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

◆ ~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
Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ exportToSSD()

oms_status_enu_t oms::ComponentTable::exportToSSD ( pugi::xml_node &  node,
pugi::xml_node &  ssvNode 
) const
virtual

Implements oms::Component.

Here is the call graph for this function:

◆ exportToSSMTemplate()

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

Reimplemented from oms::Component.

Here is the call graph for this function:

◆ exportToSSVTemplate()

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

Reimplemented from oms::Component.

◆ freeState()

oms_status_enu_t oms::ComponentTable::freeState ( )
virtual

Reimplemented from oms::Component.

Here is the caller graph for this function:

◆ 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:
Here is the caller graph for this function:

◆ getCanGetAndSetState()

bool oms::ComponentTable::getCanGetAndSetState ( )
inlinevirtual

Reimplemented from oms::Component.

Here is the call graph for this function:

◆ 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:
Here is the caller 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:
Here is the caller 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:
Here is the caller graph for this function:

◆ getVariable()

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

Implements oms::Component.

Here is the call graph for this function:

◆ initialize()

oms_status_enu_t oms::ComponentTable::initialize ( )
inlinevirtual

Implements oms::Component.

◆ instantiate()

oms_status_enu_t oms::ComponentTable::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::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 
)
static
Here is the call graph for this function:

◆ operator=()

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

not implemented

Here is the caller graph for this function:

◆ registerSignalsForResultFile()

oms_status_enu_t oms::ComponentTable::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::ComponentTable::removeSignalsFromResults ( const char *  regex)
virtual

Implements oms::Component.

Here is the caller graph for this function:

◆ reset()

oms_status_enu_t oms::ComponentTable::reset ( )
virtual

Implements oms::Component.

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

◆ restoreState()

oms_status_enu_t oms::ComponentTable::restoreState ( )
virtual

Reimplemented from oms::Component.

Here is the caller graph for this function:

◆ saveState()

oms_status_enu_t oms::ComponentTable::saveState ( )
virtual

Reimplemented from oms::Component.

Here is the caller graph for this function:

◆ 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.

Here is the call graph for this function:

◆ updateSignals()

oms_status_enu_t oms::ComponentTable::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

◆ exportSeries

std::unordered_map<ComRef, bool> oms::ComponentTable::exportSeries
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: