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 | Private Member Functions | Private Attributes | List of all members
oms::TLMBusConnector Class Reference

TLMBusConnector. More...

#include <TLMBusConnector.h>

Inheritance diagram for oms::TLMBusConnector:
Inheritance graph
Collaboration diagram for oms::TLMBusConnector:
Collaboration graph

Public Member Functions

 TLMBusConnector (const oms::ComRef &name, oms_tlm_domain_t domain, const int dimensions, const oms_tlm_interpolation_t interpolation, System *parentSystem=nullptr, Component *component=nullptr)
 
 ~TLMBusConnector ()
 
oms_status_enu_t exportToSSD (pugi::xml_node &root) const
 
 TLMBusConnector (const TLMBusConnector &rhs)
 
TLMBusConnectoroperator= (const TLMBusConnector &rhs)
 
void setName (const oms::ComRef &name)
 
void setGeometry (const oms::ssd::ConnectorGeometry *newGeometry)
 
void setReal (int i, double value)
 
void getReal (int i, double &value)
 
void setReals (std::vector< int > i, std::vector< double > values)
 
void getReals (std::vector< int > i, std::vector< double > &values)
 
void setRealInputDerivatives (int i, int order, double value)
 
const oms::ComRef getName () const
 
oms_tlm_domain_t getDomain () const
 
const std::string getDomainString () const
 
const int getDimensions () const
 
const oms_causality_enu_t getCausality () const
 
const oms_tlm_interpolation_t getInterpolation () const
 
void setDelay (double delay)
 
double getDelay ()
 
oms::ComRef getConnector (int id) const
 
std::vector< oms::ComRefgetConnectors (std::vector< int > ids) const
 
const oms::ssd::ConnectorGeometrygetGeometry () const
 
oms_status_enu_t addConnector (const oms::ComRef &cref, std::string vartype)
 
oms_status_enu_t deleteConnector (const oms::ComRef &cref)
 
void updateConnectors ()
 
void sortConnectors ()
 
oms_status_enu_t registerToSockets (TLMPlugin *plugin)
 
int getId () const
 
oms::ComponentgetComponent ()
 Recursively find component (i.e. FMU) connected to the TLM bus. Return NULL if not found. More...
 
oms::TLMBusConnectorgetActualBus ()
 

Static Public Member Functions

static std::vector< std::string > getVariableTypes (oms_tlm_domain_t domain, int dimensions, oms_tlm_interpolation_t interpolation)
 
static std::vector< std::string > getVariableDescriptions (oms_tlm_domain_t domain, int dimensions, oms_tlm_interpolation_t interpolation)
 

Private Member Functions

oms::ComponentgetComponent (const ComRef &conA, System *system) const
 Recurse into specified system and find component connected to conA. More...
 
oms::TLMBusConnectorgetActualBus (ComRef cref, System *system)
 

Private Attributes

oms_causality_enu_t causality
 
std::map< std::string, oms::ComRefconnectors
 
std::vector< oms::ComRefsortedConnectors
 
std::vector< std::string > variableTypes
 
SystemparentSystem
 
Componentcomponent = nullptr
 
TLMBusConnectoractualBus = nullptr
 
int id
 

Additional Inherited Members

- Protected Attributes inherited from oms_tlmbusconnector_t
char * name
 
ssd_connector_geometry_tgeometry
 
oms_tlm_domain_t domain
 
int dimensions
 
double delay
 
oms_tlm_interpolation_t interpolation
 
char ** connectornames
 
char ** connectortypes
 

Detailed Description

TLMBusConnector.

Constructor & Destructor Documentation

◆ TLMBusConnector() [1/2]

oms::TLMBusConnector::TLMBusConnector ( const oms::ComRef name,
oms_tlm_domain_t  domain,
const int  dimensions,
const oms_tlm_interpolation_t  interpolation,
System parentSystem = nullptr,
Component component = nullptr 
)
Here is the call graph for this function:

◆ ~TLMBusConnector()

oms::TLMBusConnector::~TLMBusConnector ( )

◆ TLMBusConnector() [2/2]

oms::TLMBusConnector::TLMBusConnector ( const TLMBusConnector rhs)
Here is the call graph for this function:

Member Function Documentation

◆ addConnector()

oms_status_enu_t oms::TLMBusConnector::addConnector ( const oms::ComRef cref,
std::string  vartype 
)
Here is the call graph for this function:

◆ deleteConnector()

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

◆ exportToSSD()

oms_status_enu_t oms::TLMBusConnector::exportToSSD ( pugi::xml_node &  root) const
Here is the call graph for this function:

◆ getActualBus() [1/2]

oms::TLMBusConnector * oms::TLMBusConnector::getActualBus ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getActualBus() [2/2]

oms::TLMBusConnector * oms::TLMBusConnector::getActualBus ( ComRef  cref,
System system 
)
private
Here is the call graph for this function:

◆ getCausality()

const oms_causality_enu_t oms::TLMBusConnector::getCausality ( ) const
inline
Here is the caller graph for this function:

◆ getComponent() [1/2]

oms::Component * oms::TLMBusConnector::getComponent ( )

Recursively find component (i.e. FMU) connected to the TLM bus. Return NULL if not found.

Here is the caller graph for this function:

◆ getComponent() [2/2]

oms::Component * oms::TLMBusConnector::getComponent ( const ComRef conA,
System system 
) const
private

Recurse into specified system and find component connected to conA.

Here is the call graph for this function:

◆ getConnector()

oms::ComRef oms::TLMBusConnector::getConnector ( int  id) const
Here is the caller graph for this function:

◆ getConnectors()

std::vector< oms::ComRef > oms::TLMBusConnector::getConnectors ( std::vector< int >  ids) const

◆ getDelay()

double oms::TLMBusConnector::getDelay ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDimensions()

const int oms::TLMBusConnector::getDimensions ( ) const
inline
Here is the caller graph for this function:

◆ getDomain()

oms_tlm_domain_t oms::TLMBusConnector::getDomain ( ) const
inline
Here is the caller graph for this function:

◆ getDomainString()

const std::string oms::TLMBusConnector::getDomainString ( ) const
Here is the caller graph for this function:

◆ getGeometry()

const oms::ssd::ConnectorGeometry* oms::TLMBusConnector::getGeometry ( ) const
inline
Here is the call graph for this function:

◆ getId()

int oms::TLMBusConnector::getId ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInterpolation()

const oms_tlm_interpolation_t oms::TLMBusConnector::getInterpolation ( ) const
inline
Here is the caller graph for this function:

◆ getName()

const oms::ComRef oms::TLMBusConnector::getName ( ) const
inline
Here is the caller graph for this function:

◆ getReal()

void oms::TLMBusConnector::getReal ( int  i,
double &  value 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getReals()

void oms::TLMBusConnector::getReals ( std::vector< int >  i,
std::vector< double > &  values 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVariableDescriptions()

std::vector< std::string > oms::TLMBusConnector::getVariableDescriptions ( oms_tlm_domain_t  domain,
int  dimensions,
oms_tlm_interpolation_t  interpolation 
)
static
Here is the caller graph for this function:

◆ getVariableTypes()

std::vector< std::string > oms::TLMBusConnector::getVariableTypes ( oms_tlm_domain_t  domain,
int  dimensions,
oms_tlm_interpolation_t  interpolation 
)
static
Here is the caller graph for this function:

◆ operator=()

oms::TLMBusConnector & oms::TLMBusConnector::operator= ( const TLMBusConnector rhs)
Here is the call graph for this function:

◆ registerToSockets()

oms_status_enu_t oms::TLMBusConnector::registerToSockets ( TLMPlugin *  plugin)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDelay()

void oms::TLMBusConnector::setDelay ( double  delay)
inline
Here is the caller graph for this function:

◆ setGeometry()

void oms::TLMBusConnector::setGeometry ( const oms::ssd::ConnectorGeometry newGeometry)
Here is the caller graph for this function:

◆ setName()

void oms::TLMBusConnector::setName ( const oms::ComRef name)
Here is the call graph for this function:

◆ setReal()

void oms::TLMBusConnector::setReal ( int  i,
double  value 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRealInputDerivatives()

void oms::TLMBusConnector::setRealInputDerivatives ( int  i,
int  order,
double  value 
)
Here is the caller graph for this function:

◆ setReals()

void oms::TLMBusConnector::setReals ( std::vector< int >  i,
std::vector< double >  values 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sortConnectors()

void oms::TLMBusConnector::sortConnectors ( )
Here is the caller graph for this function:

◆ updateConnectors()

void oms::TLMBusConnector::updateConnectors ( )
Here is the caller graph for this function:

Member Data Documentation

◆ actualBus

TLMBusConnector* oms::TLMBusConnector::actualBus = nullptr
private

◆ causality

oms_causality_enu_t oms::TLMBusConnector::causality
private

◆ component

Component* oms::TLMBusConnector::component = nullptr
private

◆ connectors

std::map<std::string, oms::ComRef> oms::TLMBusConnector::connectors
private

◆ id

int oms::TLMBusConnector::id
private

◆ parentSystem

System* oms::TLMBusConnector::parentSystem
private

◆ sortedConnectors

std::vector<oms::ComRef> oms::TLMBusConnector::sortedConnectors
private

◆ variableTypes

std::vector<std::string> oms::TLMBusConnector::variableTypes
private

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