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

#include <Component.h>

Inheritance diagram for oms::Component:
Inheritance graph
Collaboration diagram for oms::Component:
Collaboration graph

Public Member Functions

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
 
virtual const FMUInfogetFMUInfo () 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 exportToSSD (pugi::xml_node &node) const =0
 
virtual oms_status_enu_t instantiate ()=0
 
virtual oms_status_enu_t initialize ()=0
 
virtual oms_status_enu_t terminate ()=0
 
virtual oms_status_enu_t reset ()=0
 
virtual oms_status_enu_t stepUntil (double stopTime)
 
const DirectedGraphgetInitialUnknownsGraph ()
 
const DirectedGraphgetOutputsGraph ()
 
virtual oms_status_enu_t getBoolean (const ComRef &cref, bool &value)
 
virtual oms_status_enu_t getInteger (const ComRef &cref, int &value)
 
virtual oms_status_enu_t getReal (const ComRef &cref, 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 registerSignalsForResultFile (ResultWriter &resultFile)=0
 
virtual oms_status_enu_t updateSignals (ResultWriter &resultWriter)=0
 
virtual oms_status_enu_t addSignalsToResults (const char *regex)=0
 
virtual oms_status_enu_t removeSignalsFromResults (const char *regex)=0
 

Protected Member Functions

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

Protected Attributes

DirectedGraph initialUnknownsGraph
 
DirectedGraph outputsGraph
 
Element element
 
std::vector< Connector * > connectors
 
std::vector< TLMBusConnector * > tlmbusconnectors
 
Clock clock
 
unsigned int clock_id
 
bool fetchAllVars_ = false
 

Private Attributes

SystemparentSystem
 
ComRef cref
 
oms_component_enu_t type
 
std::string path
 

Constructor & Destructor Documentation

◆ ~Component()

oms::Component::~Component ( )
virtual

◆ Component() [1/2]

oms::Component::Component ( const ComRef cref,
oms_component_enu_t  type,
System parentSystem,
const std::string &  path 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Component() [2/2]

oms::Component::Component ( Component const &  )
protected

not implemented

Member Function Documentation

◆ addConnectorToTLMBus()

oms_status_enu_t oms::Component::addConnectorToTLMBus ( const ComRef busCref,
const ComRef connectorCref,
const std::string  type 
)
Here is the caller graph for this function:

◆ addSignalsToResults()

virtual oms_status_enu_t oms::Component::addSignalsToResults ( const char *  regex)
pure virtual

Implemented in oms::ComponentFMUCS, oms::ComponentFMUME, oms::ComponentTable, and oms::ExternalModel.

Here is the caller graph for this function:

◆ addTLMBus()

oms_status_enu_t oms::Component::addTLMBus ( const oms::ComRef cref,
oms_tlm_domain_t  domain,
const int  dimensions,
const oms_tlm_interpolation_t  interpolation 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteConnector()

oms_status_enu_t oms::Component::deleteConnector ( const ComRef cref)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteConnectorFromTLMBus()

oms_status_enu_t oms::Component::deleteConnectorFromTLMBus ( const ComRef busCref,
const ComRef connectorCref 
)
Here is the caller graph for this function:

◆ deleteResources()

oms_status_enu_t oms::Component::deleteResources ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportToSSD()

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

Implemented in oms::ComponentFMUCS, oms::ComponentFMUME, oms::ExternalModel, and oms::ComponentTable.

Here is the caller graph for this function:

◆ fetchAllVars()

void oms::Component::fetchAllVars ( )
inline

◆ getAllResources()

oms_status_enu_t oms::Component::getAllResources ( std::vector< std::string > &  resources) const
inline

◆ getBoolean()

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

Reimplemented in oms::ComponentFMUCS, and oms::ComponentFMUME.

◆ getConnector()

oms::Connector * oms::Component::getConnector ( const ComRef cref)
Here is the caller graph for this function:

◆ getConnectors()

Connector** oms::Component::getConnectors ( )
inline
Here is the call graph for this function:

◆ getCref()

const ComRef& oms::Component::getCref ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getElement()

Element* oms::Component::getElement ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFMUInfo()

virtual const FMUInfo* oms::Component::getFMUInfo ( ) const
inlinevirtual

Reimplemented in oms::ComponentFMUCS, and oms::ComponentFMUME.

◆ getFullCref()

oms::ComRef oms::Component::getFullCref ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInitialUnknownsGraph()

const DirectedGraph& oms::Component::getInitialUnknownsGraph ( )
inline

◆ getInteger()

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

Reimplemented in oms::ComponentFMUCS, and oms::ComponentFMUME.

◆ getModel()

oms::Model * oms::Component::getModel ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOutputsGraph()

const DirectedGraph& oms::Component::getOutputsGraph ( )
inline

◆ getParentSystem()

System* oms::Component::getParentSystem ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPath()

const std::string& oms::Component::getPath ( ) const
inline
Here is the caller graph for this function:

◆ getReal()

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

Reimplemented in oms::ComponentFMUCS, oms::ComponentFMUME, and oms::ComponentTable.

Here is the caller graph for this function:

◆ getTLMBusConnector()

oms::TLMBusConnector * oms::Component::getTLMBusConnector ( const oms::ComRef cref)
Here is the caller graph for this function:

◆ getTLMBusConnectors()

TLMBusConnector** oms::Component::getTLMBusConnectors ( )
inline
Here is the call graph for this function:

◆ getType()

oms_component_enu_t oms::Component::getType ( ) const
inline

◆ initialize()

virtual oms_status_enu_t oms::Component::initialize ( )
pure virtual

Implemented in oms::ComponentFMUCS, oms::ComponentFMUME, oms::ExternalModel, and oms::ComponentTable.

Here is the caller graph for this function:

◆ instantiate()

virtual oms_status_enu_t oms::Component::instantiate ( )
pure virtual

Implemented in oms::ComponentFMUCS, oms::ComponentFMUME, oms::ExternalModel, and oms::ComponentTable.

Here is the caller graph for this function:

◆ operator=()

Component& oms::Component::operator= ( Component const &  )
protected

not implemented

Here is the caller graph for this function:

◆ registerSignalsForResultFile()

virtual oms_status_enu_t oms::Component::registerSignalsForResultFile ( ResultWriter resultFile)
pure virtual

Implemented in oms::ComponentFMUCS, oms::ComponentFMUME, oms::ComponentTable, and oms::ExternalModel.

Here is the caller graph for this function:

◆ removeSignalsFromResults()

virtual oms_status_enu_t oms::Component::removeSignalsFromResults ( const char *  regex)
pure virtual

Implemented in oms::ComponentFMUCS, oms::ComponentFMUME, oms::ComponentTable, and oms::ExternalModel.

Here is the caller graph for this function:

◆ reset()

virtual oms_status_enu_t oms::Component::reset ( )
pure virtual

Implemented in oms::ComponentFMUCS, oms::ComponentFMUME, oms::ExternalModel, and oms::ComponentTable.

Here is the caller graph for this function:

◆ setBoolean()

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

Reimplemented in oms::ComponentFMUCS, and oms::ComponentFMUME.

◆ setGeometry()

void oms::Component::setGeometry ( const ssd::ElementGeometry geometry)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setInteger()

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

Reimplemented in oms::ComponentFMUCS, and oms::ComponentFMUME.

◆ setReal()

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

Reimplemented in oms::ComponentFMUCS, and oms::ComponentFMUME.

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

◆ stepUntil()

virtual oms_status_enu_t oms::Component::stepUntil ( double  stopTime)
inlinevirtual

Reimplemented in oms::ComponentFMUCS, and oms::ComponentTable.

◆ terminate()

virtual oms_status_enu_t oms::Component::terminate ( )
pure virtual

Implemented in oms::ComponentFMUCS, oms::ComponentFMUME, oms::ExternalModel, and oms::ComponentTable.

Here is the caller graph for this function:

◆ updateSignals()

virtual oms_status_enu_t oms::Component::updateSignals ( ResultWriter resultWriter)
pure virtual

Implemented in oms::ComponentFMUCS, oms::ComponentFMUME, oms::ComponentTable, and oms::ExternalModel.

Here is the caller graph for this function:

Member Data Documentation

◆ clock

Clock oms::Component::clock
protected

◆ clock_id

unsigned int oms::Component::clock_id
protected

◆ connectors

std::vector<Connector*> oms::Component::connectors
protected

◆ cref

ComRef oms::Component::cref
private

◆ element

Element oms::Component::element
protected

◆ fetchAllVars_

bool oms::Component::fetchAllVars_ = false
protected

◆ initialUnknownsGraph

DirectedGraph oms::Component::initialUnknownsGraph
protected

◆ outputsGraph

DirectedGraph oms::Component::outputsGraph
protected

◆ parentSystem

System* oms::Component::parentSystem
private

◆ path

std::string oms::Component::path
private

◆ tlmbusconnectors

std::vector<TLMBusConnector*> oms::Component::tlmbusconnectors
protected

◆ type

oms_component_enu_t oms::Component::type
private

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