DPsim
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
DPsim::Interface Class Reference
Inheritance diagram for DPsim::Interface:
[legend]
Collaboration diagram for DPsim::Interface:
[legend]

Classes

class  PostStep
 
class  PreStep
 
class  ReaderThread
 
class  WriterThread
 

Public Types

enum  AttributePacketFlags { PACKET_NO_FLAGS = 0 , PACKET_CLOSE_INTERFACE = 1 }
 
typedef std::shared_ptr< InterfacePtr
 
using AttributePacket = struct AttributePacket { CPS::AttributeBase::Ptr value
 

Public Member Functions

 Interface (std::shared_ptr< InterfaceWorker > intf, const String &name="", UInt downsampling=1)
 
virtual void open ()
 
virtual void close ()
 
virtual void pushDpsimAttrsToQueue ()
 
virtual void popDpsimAttrsFromQueue (bool isSync=false)
 
virtual void syncExports ()
 
virtual void syncImports ()
 Function called by the Simulation to perform interface synchronization.
 
virtual CPS::Task::List getTasks ()
 
void setLogger (CPS::Logger::Log log)
 

Public Attributes

UInt attributeId
 
UInt sequenceId
 
unsigned char flags
 
std::vector< std::tuple< CPS::AttributeBase::Ptr, UInt, bool, bool > > mImportAttrsDpsim
 
std::vector< std::tuple< CPS::AttributeBase::Ptr, UInt > > mExportAttrsDpsim
 

Protected Member Functions

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

Protected Attributes

std::shared_ptr< InterfaceWorkermInterfaceWorker
 
CPS::Logger::Log mLog
 
String mName
 
bool mSyncOnSimulationStart
 
UInt mCurrentSequenceDpsimToInterface = 1
 
UInt mNextSequenceInterfaceToDpsim = 1
 
UInt mDownsampling
 
std::atomic< bool > mOpened
 
std::thread mInterfaceWriterThread
 
std::thread mInterfaceReaderThread
 
std::shared_ptr< moodycamel::BlockingReaderWriterQueue< AttributePacket > > mQueueDpsimToInterface
 
std::shared_ptr< moodycamel::BlockingReaderWriterQueue< AttributePacket > > mQueueInterfaceToDpsim
 

Additional Inherited Members

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

Detailed Description

Definition at line 21 of file Interface.h.


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