DPsim
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
DPsim::InterfaceWorker Class Referenceabstract
Inheritance diagram for DPsim::InterfaceWorker:
[legend]

Public Types

using Ptr = std::shared_ptr< InterfaceWorker >
 

Public Member Functions

virtual void readValuesFromEnv (std::vector< Interface::AttributePacket > &updatedAttrs)=0
 
virtual void writeValuesToEnv (std::vector< Interface::AttributePacket > &updatedAttrs)=0
 
virtual void open ()=0
 
virtual void close ()=0
 

Public Attributes

CPS::Logger::Log mLog
 

Protected Attributes

bool mOpened
 
UInt mCurrentSequenceInterfaceToDpsim = 1
 

Detailed Description

Definition at line 17 of file InterfaceWorker.h.

Member Function Documentation

◆ close()

virtual void DPsim::InterfaceWorker::close ( )
pure virtual

Close the interface and all connections to the environment After this has been called, no further calls to readValuesFromEnv or writeValuesToEnv will occur

Implemented in DPsim::InterfaceWorkerVillas.

◆ open()

virtual void DPsim::InterfaceWorker::open ( )
pure virtual

Open the interface and set up the connection to the environment This is guaranteed to be called before any calls to readValuesFromEnv and writeValuesToEnv

Implemented in DPsim::InterfaceWorkerVillas.

◆ readValuesFromEnv()

virtual void DPsim::InterfaceWorker::readValuesFromEnv ( std::vector< Interface::AttributePacket > &  updatedAttrs)
pure virtual

Function that will be called on loop in its separate thread. Should be used to read values from the environment and push them into updatedAttrs updatedAttrs will always be empty when this function is invoked

Implemented in DPsim::InterfaceWorkerVillas.

◆ writeValuesToEnv()

virtual void DPsim::InterfaceWorker::writeValuesToEnv ( std::vector< Interface::AttributePacket > &  updatedAttrs)
pure virtual

Function that will be called on loop in its separate thread. Should be used to read values from updatedAttrs and write them to the environment The updatedAttrs list will not be cleared by the caller in between function calls When this function is called, updatedAttrs will include at least one value

Implemented in DPsim::InterfaceWorkerVillas.


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