9#include <spdlog/common.h>
10#include <villas/kernel/rt.hpp>
11#include <villas/node.hpp>
12#include <villas/node/exceptions.hpp>
13#include <villas/node/memory.hpp>
14#include <villas/pool.hpp>
15#include <villas/sample.hpp>
16#include <villas/signal.hpp>
17#include <villas/signal_list.hpp>
19using namespace villas;
26 using Ptr = std::shared_ptr<InterfaceWorkerVillas>;
34 static Bool villasInitialized;
49 node::Pool mSamplePool;
54 std::map<int, node::Signal::Ptr> mExportSignals;
55 std::map<int, node::Signal::Ptr> mImportSignals;
59 const String &nodeConfig,
UInt queueLenght = 512,
UInt sampleLenght = 64,
60 spdlog::level::level_enum logLevel = spdlog::level::level_enum::info);
63 void close()
override;
66 std::vector<InterfaceQueued::AttributePacket> &updatedAttrs)
override;
68 std::vector<std::tuple<CPS::AttributeBase::Ptr, UInt, bool, bool>>
71 std::vector<InterfaceQueued::AttributePacket> &updatedAttrs)
override;
73 std::vector<std::tuple<CPS::AttributeBase::Ptr, UInt>> &updatedAttrs);
87 void setupNodeSignals();
88 void initVillas()
const;
AttributePointer< AttributeBase > Ptr
InterfaceWorker()=default
InterfaceWorkerVillas(const String &nodeConfig, UInt queueLenght=512, UInt sampleLenght=64, spdlog::level::level_enum logLevel=spdlog::level::level_enum::info)
virtual void configureExport(UInt attributeId, const std::type_info &type, UInt idx, Bool waitForOnWrite, const String &name="", const String &unit="")
struct node::Sample Sample
void readValuesFromEnv(std::vector< std::tuple< CPS::AttributeBase::Ptr, UInt, bool, bool > > &updatedAttrs)
void writeValuesToEnv(std::vector< InterfaceQueued::AttributePacket > &updatedAttrs) override
void printSignals() const
void writeValuesToEnv(std::vector< std::tuple< CPS::AttributeBase::Ptr, UInt > > &updatedAttrs)
static UInt villasAffinity
std::shared_ptr< InterfaceWorkerVillas > Ptr
static UInt villasHugePages
static UInt villasPriority
void readValuesFromEnv(std::vector< InterfaceQueued::AttributePacket > &updatedAttrs) override
virtual void configureImport(UInt attributeId, const std::type_info &type, UInt idx, const String &name="", const String &unit="")