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

Public Types

using Ptr = std::shared_ptr< InterfaceWorkerVillas >
 
using Sample = struct node::Sample
 
- Public Types inherited from DPsim::InterfaceWorker
using Ptr = std::shared_ptr< InterfaceWorker >
 

Public Member Functions

 InterfaceWorkerVillas (const String &nodeConfig, UInt queueLenght=512, UInt sampleLenght=64)
 
void open () override
 
void close () override
 
void readValuesFromEnv (std::vector< Interface::AttributePacket > &updatedAttrs) override
 
void writeValuesToEnv (std::vector< Interface::AttributePacket > &updatedAttrs) override
 
virtual void configureImport (UInt attributeId, const std::type_info &type, UInt idx)
 
virtual void configureExport (UInt attributeId, const std::type_info &type, UInt idx, Bool waitForOnWrite, const String &name="", const String &unit="")
 

Static Public Attributes

static UInt villasPriority = 0
 
static UInt villasAffinity = 0
 
static UInt villasHugePages = 100
 

Additional Inherited Members

- Static Public Member Functions inherited from SharedFactory< InterfaceWorkerVillas >
static std::shared_ptr< InterfaceWorkerVillas > make (Args &&...args)
 
- Public Attributes inherited from DPsim::InterfaceWorker
CPS::Logger::Log mLog
 
- Protected Attributes inherited from DPsim::InterfaceWorker
bool mOpened
 
UInt mCurrentSequenceInterfaceToDpsim = 1
 

Detailed Description

Definition at line 20 of file InterfaceWorkerVillas.h.

Member Function Documentation

◆ close()

void InterfaceWorkerVillas::close ( )
overridevirtual

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

Implements DPsim::InterfaceWorker.

Definition at line 158 of file InterfaceWorkerVillas.cpp.

◆ open()

void InterfaceWorkerVillas::open ( )
overridevirtual

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

Implements DPsim::InterfaceWorker.

Definition at line 33 of file InterfaceWorkerVillas.cpp.

◆ readValuesFromEnv()

void InterfaceWorkerVillas::readValuesFromEnv ( std::vector< Interface::AttributePacket > &  updatedAttrs)
overridevirtual

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

Implements DPsim::InterfaceWorker.

Definition at line 183 of file InterfaceWorkerVillas.cpp.

◆ writeValuesToEnv()

void InterfaceWorkerVillas::writeValuesToEnv ( std::vector< Interface::AttributePacket > &  updatedAttrs)
overridevirtual

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

Implements DPsim::InterfaceWorker.

Definition at line 281 of file InterfaceWorkerVillas.cpp.


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