3 #include <dpsim-villas/InterfaceVillas.h>
4 #include <dpsim-villas/InterfaceWorkerVillas.h>
6 using namespace villas;
10 InterfaceVillas::InterfaceVillas(
const String &nodeConfig, UInt queueLength,
11 UInt sampleLength,
const String &name,
15 name, downsampling) {}
19 Bool syncOnSimulationStart,
20 const String &name,
const String &unit) {
21 Interface::addImport(attr, blockOnRead, syncOnSimulationStart);
22 std::dynamic_pointer_cast<InterfaceWorkerVillas>(mInterfaceWorker)
23 ->configureImport((UInt)mImportAttrsDpsim.size() - 1, attr->getType(),
28 Bool waitForOnWrite,
const String &name,
30 Interface::addExport(attr);
31 std::dynamic_pointer_cast<InterfaceWorkerVillas>(mInterfaceWorker)
32 ->configureExport((UInt)mExportAttrsDpsim.size() - 1, attr->getType(),
33 idx, waitForOnWrite, name, unit);
36 void InterfaceVillas::printVillasSignals()
const {
37 std::dynamic_pointer_cast<InterfaceWorkerVillas>(mInterfaceWorker)
void importAttribute(CPS::AttributeBase::Ptr attr, UInt idx, Bool blockOnRead=false, Bool syncOnSimulationStart=true, const String &name="", const String &unit="")
configure an attribute import
void exportAttribute(CPS::AttributeBase::Ptr attr, UInt idx, Bool waitForOnWrite, const String &name="", const String &unit="")
configure an attribute export