3#include <dpsim-villas/InterfaceVillas.h>
4#include <dpsim-villas/InterfaceWorkerVillas.h>
11 UInt sampleLength,
const String &name,
13 spdlog::level::level_enum logLevel)
15 sampleLength, logLevel),
16 name, downsampling) {}
20 Bool syncOnSimulationStart,
21 const String &name,
const String &unit) {
22 Interface::addImport(attr, blockOnRead, syncOnSimulationStart);
23 std::dynamic_pointer_cast<InterfaceWorkerVillas>(mInterfaceWorker)
24 ->configureImport((UInt)mImportAttrsDpsim.size() - 1, attr->
getType(),
29 Bool waitForOnWrite,
const String &name,
31 Interface::addExport(attr);
32 std::dynamic_pointer_cast<InterfaceWorkerVillas>(mInterfaceWorker)
33 ->configureExport((UInt)mExportAttrsDpsim.size() - 1, attr->
getType(),
34 idx, waitForOnWrite, name, unit);
37void InterfaceVillas::printVillasSignals()
const {
38 std::dynamic_pointer_cast<InterfaceWorkerVillas>(mInterfaceWorker)
virtual const std::type_info & getType()=0
Get the type of this attribute.
virtual void importAttribute(CPS::AttributeBase::Ptr attr, UInt idx, Bool blockOnRead=false, Bool syncOnSimulationStart=true, const String &name="", const String &unit="")
configure an attribute import
InterfaceVillas(const String &nodeConfig, UInt queueLength=512, UInt sampleLength=64, const String &name="", UInt downsampling=1, spdlog::level::level_enum logLevel=spdlog::level::level_enum::info)
create a new InterfaceVillas instance
virtual void exportAttribute(CPS::AttributeBase::Ptr attr, UInt idx, Bool waitForOnWrite, const String &name="", const String &unit="")
configure an attribute export