DPsim
Loading...
Searching...
No Matches
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, spdlog::level::level_enum logLevel=spdlog::level::level_enum::info)
 
void open () override
 
void close () override
 
void readValuesFromEnv (std::vector< InterfaceQueued::AttributePacket > &updatedAttrs) override
 
void readValuesFromEnv (std::vector< std::tuple< CPS::AttributeBase::Ptr, UInt, bool, bool > > &updatedAttrs)
 
void writeValuesToEnv (std::vector< InterfaceQueued::AttributePacket > &updatedAttrs) override
 
void writeValuesToEnv (std::vector< std::tuple< CPS::AttributeBase::Ptr, UInt > > &updatedAttrs)
 
virtual void configureImport (UInt attributeId, const std::type_info &type, UInt idx, const String &name="", const String &unit="")
 
virtual void configureExport (UInt attributeId, const std::type_info &type, UInt idx, Bool waitForOnWrite, const String &name="", const String &unit="")
 
void printSignals () const
 

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 22 of file InterfaceWorkerVillas.h.

Member Typedef Documentation

◆ Ptr

using DPsim::InterfaceWorkerVillas::Ptr = std::shared_ptr<InterfaceWorkerVillas>

Definition at line 26 of file InterfaceWorkerVillas.h.

◆ Sample

using DPsim::InterfaceWorkerVillas::Sample = struct node::Sample

Definition at line 27 of file InterfaceWorkerVillas.h.

Constructor & Destructor Documentation

◆ InterfaceWorkerVillas()

InterfaceWorkerVillas::InterfaceWorkerVillas ( const String & nodeConfig,
UInt queueLenght = 512,
UInt sampleLenght = 64,
spdlog::level::level_enum logLevel = spdlog::level::level_enum::info )

Definition at line 27 of file InterfaceWorkerVillas.cpp.

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 167 of file InterfaceWorkerVillas.cpp.

◆ configureExport()

void InterfaceWorkerVillas::configureExport ( UInt attributeId,
const std::type_info & type,
UInt idx,
Bool waitForOnWrite,
const String & name = "",
const String & unit = "" )
virtual

Definition at line 393 of file InterfaceWorkerVillas.cpp.

◆ configureImport()

void InterfaceWorkerVillas::configureImport ( UInt attributeId,
const std::type_info & type,
UInt idx,
const String & name = "",
const String & unit = "" )
virtual

Definition at line 498 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 36 of file InterfaceWorkerVillas.cpp.

◆ printSignals()

void InterfaceWorkerVillas::printSignals ( ) const

Definition at line 579 of file InterfaceWorkerVillas.cpp.

◆ readValuesFromEnv()

void InterfaceWorkerVillas::readValuesFromEnv ( std::vector< InterfaceQueued::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 192 of file InterfaceWorkerVillas.cpp.

◆ writeValuesToEnv()

void InterfaceWorkerVillas::writeValuesToEnv ( std::vector< InterfaceQueued::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 290 of file InterfaceWorkerVillas.cpp.

Member Data Documentation

◆ villasAffinity

UInt InterfaceWorkerVillas::villasAffinity = 0
static

Definition at line 30 of file InterfaceWorkerVillas.h.

◆ villasHugePages

UInt InterfaceWorkerVillas::villasHugePages = 100
static

Definition at line 31 of file InterfaceWorkerVillas.h.

◆ villasPriority

UInt InterfaceWorkerVillas::villasPriority = 0
static

Definition at line 29 of file InterfaceWorkerVillas.h.


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