DPsim
Loading...
Searching...
No Matches
DPsim::Interface Class Referenceabstract
Inheritance diagram for DPsim::Interface:
[legend]
Collaboration diagram for DPsim::Interface:
[legend]

Public Types

typedef std::shared_ptr< InterfacePtr
 

Public Member Functions

 Interface (const String &name="", spdlog::level::level_enum logLevel=spdlog::level::level_enum::info)
 
virtual void open ()=0
 
virtual void close ()=0
 
virtual void syncExports ()=0
 
virtual void syncImports ()=0
 Function called by the Simulation to perform interface synchronization.
 
virtual CPS::Task::List getTasks ()=0
 
virtual void setLogger (CPS::Logger::Log log)
 
virtual String & getName ()
 
virtual void addImport (CPS::AttributeBase::Ptr attr, bool blockOnRead=false, bool syncOnSimulationStart=true)
 
virtual void addExport (CPS::AttributeBase::Ptr attr)
 

Public Attributes

std::vector< std::tuple< CPS::AttributeBase::Ptr, UInt, bool, bool > > mImportAttrsDpsim
 
std::vector< std::tuple< CPS::AttributeBase::Ptr, UInt > > mExportAttrsDpsim
 

Protected Attributes

CPS::Logger::Log mLog
 
String mName
 
bool mSyncOnSimulationStart
 
UInt mCurrentSequenceDpsimToInterface = 1
 
UInt mNextSequenceInterfaceToDpsim = 1
 
std::atomic< bool > mOpened
 

Additional Inherited Members

- Static Public Member Functions inherited from SharedFactory< Interface >
static std::shared_ptr< Interface > make (Args &&...args)
 

Detailed Description

Definition at line 19 of file Interface.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<Interface> DPsim::Interface::Ptr

Definition at line 22 of file Interface.h.

Constructor & Destructor Documentation

◆ Interface()

DPsim::Interface::Interface ( const String & name = "",
spdlog::level::level_enum logLevel = spdlog::level::level_enum::info )
inline

Definition at line 24 of file Interface.h.

Member Function Documentation

◆ addExport()

void DPsim::Interface::addExport ( CPS::AttributeBase::Ptr attr)
virtual

Definition at line 20 of file Interface.cpp.

◆ addImport()

void DPsim::Interface::addImport ( CPS::AttributeBase::Ptr attr,
bool blockOnRead = false,
bool syncOnSimulationStart = true )
virtual

Definition at line 9 of file Interface.cpp.

◆ getName()

virtual String & DPsim::Interface::getName ( )
inlinevirtual

Definition at line 42 of file Interface.h.

◆ setLogger()

void DPsim::Interface::setLogger ( CPS::Logger::Log log)
virtual

Definition at line 30 of file Interface.cpp.

◆ syncImports()

virtual void DPsim::Interface::syncImports ( )
pure virtual

Function called by the Simulation to perform interface synchronization.

Implemented in DPsim::InterfaceQueued, and DPsim::InterfaceVillasQueueless.

Member Data Documentation

◆ mCurrentSequenceDpsimToInterface

UInt DPsim::Interface::mCurrentSequenceDpsimToInterface = 1
protected

Definition at line 59 of file Interface.h.

◆ mExportAttrsDpsim

std::vector<std::tuple<CPS::AttributeBase::Ptr, UInt> > DPsim::Interface::mExportAttrsDpsim

Definition at line 49 of file Interface.h.

◆ mImportAttrsDpsim

std::vector<std::tuple<CPS::AttributeBase::Ptr, UInt, bool, bool> > DPsim::Interface::mImportAttrsDpsim

Definition at line 47 of file Interface.h.

◆ mLog

CPS::Logger::Log DPsim::Interface::mLog
protected

Definition at line 56 of file Interface.h.

◆ mName

String DPsim::Interface::mName
protected

Definition at line 57 of file Interface.h.

◆ mNextSequenceInterfaceToDpsim

UInt DPsim::Interface::mNextSequenceInterfaceToDpsim = 1
protected

Definition at line 60 of file Interface.h.

◆ mOpened

std::atomic<bool> DPsim::Interface::mOpened
protected

Definition at line 61 of file Interface.h.

◆ mSyncOnSimulationStart

bool DPsim::Interface::mSyncOnSimulationStart
protected

Definition at line 58 of file Interface.h.


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