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

#include <ExternalModel.h>

Inheritance diagram for oms::ExternalModel:
Inheritance graph
Collaboration diagram for oms::ExternalModel:
Collaboration graph

Public Member Functions

 ~ExternalModel ()
 
const ExternalModelInfogetExternalModelInfo () const
 
VariablegetVariable (const ComRef &cref)
 
oms_status_enu_t setRealParameter (const std::string &var, double value)
 
oms_status_enu_t getRealParameter (const std::string &var, double &value)
 
const std::string getStartScript () const
 
const std::map< std::string, oms::Option< double > > & getRealParameters () const
 
oms_status_enu_t exportToSSD (pugi::xml_node &node, pugi::xml_node &ssvNode) 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 updateDependencyGraphs ()
 
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)
 
- 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)
 
virtual oms_status_enu_t exportToSSVTemplate (pugi::xml_node &ssvNode)
 
virtual oms_status_enu_t exportToSSMTemplate (pugi::xml_node &ssmNode)
 
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 deleteStartValue (const ComRef &cref)
 
virtual oms_status_enu_t getRealOutputDerivative (const ComRef &cref, SignalDerivative &der)
 
virtual oms_status_enu_t setRealInputDerivative (const ComRef &cref, const SignalDerivative &der)
 
virtual bool getCanGetAndSetState ()
 
virtual oms_status_enu_t saveState ()
 
virtual oms_status_enu_t freeState ()
 
virtual oms_status_enu_t restoreState ()
 

Static Public Member Functions

static ExternalModelNewComponent (const oms::ComRef &cref, System *parentSystem, const std::string &path, const std::string &startscript)
 

Protected Member Functions

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

ExternalModelInfo externalModelInfo
 
std::map< std::string, oms::Option< double > > realParameters
 

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

◆ ~ExternalModel()

oms::ExternalModel::~ExternalModel ( )

◆ ExternalModel() [1/2]

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

◆ ExternalModel() [2/2]

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

not implemented

Member Function Documentation

◆ addSignalsToResults()

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

Implements oms::Component.

Here is the caller graph for this function:

◆ exportToSSD()

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

Implements oms::Component.

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

◆ getExternalModelInfo()

const ExternalModelInfo* oms::ExternalModel::getExternalModelInfo ( ) const
inline

◆ getRealParameter()

oms_status_enu_t oms::ExternalModel::getRealParameter ( const std::string &  var,
double &  value 
)
Here is the caller graph for this function:

◆ getRealParameters()

const std::map<std::string, oms::Option<double> >& oms::ExternalModel::getRealParameters ( ) const
inline
Here is the call graph for this function:

◆ getStartScript()

const std::string oms::ExternalModel::getStartScript ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVariable()

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

Implements oms::Component.

Here is the call graph for this function:

◆ initialize()

oms_status_enu_t oms::ExternalModel::initialize ( )
virtual

Implements oms::Component.

Here is the caller graph for this function:

◆ instantiate()

oms_status_enu_t oms::ExternalModel::instantiate ( )
virtual

Implements oms::Component.

Here is the caller graph for this function:

◆ NewComponent()

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

◆ operator=()

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

not implemented

Here is the caller graph for this function:

◆ registerSignalsForResultFile()

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

Implements oms::Component.

Here is the caller graph for this function:

◆ removeSignalsFromResults()

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

Implements oms::Component.

Here is the caller graph for this function:

◆ reset()

oms_status_enu_t oms::ExternalModel::reset ( )
virtual

Implements oms::Component.

Here is the caller graph for this function:

◆ setRealParameter()

oms_status_enu_t oms::ExternalModel::setRealParameter ( const std::string &  var,
double  value 
)
Here is the caller graph for this function:

◆ terminate()

oms_status_enu_t oms::ExternalModel::terminate ( )
virtual

Implements oms::Component.

Here is the caller graph for this function:

◆ updateDependencyGraphs()

oms_status_enu_t oms::ExternalModel::updateDependencyGraphs ( )
inline
Here is the call graph for this function:

◆ updateSignals()

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

Implements oms::Component.

Here is the caller graph for this function:

Member Data Documentation

◆ externalModelInfo

ExternalModelInfo oms::ExternalModel::externalModelInfo
private

◆ realParameters

std::map<std::string, oms::Option<double> > oms::ExternalModel::realParameters
private

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