12#include <dpsim/Config.h>
18#include <villas/kernel/rt.hpp>
19#include <villas/node.hpp>
20#include <villas/node/exceptions.hpp>
21#include <villas/node/memory.hpp>
22#include <villas/pool.hpp>
23#include <villas/sample.hpp>
24#include <villas/signal.hpp>
25#include <villas/signal_list.hpp>
27using namespace villas;
36 typedef std::shared_ptr<InterfaceVillasQueueless>
Ptr;
43 spdlog::level::level_enum logLevel = spdlog::level::level_enum::info);
45 virtual void open()
override;
46 virtual void close()
override;
61 }
catch (
const std::exception &e) {
62 SPDLOG_LOGGER_ERROR(
mLog,
"Error closing interface: {}", e.what());
83 :
Task(intf.
mName +
".Read"), mIntf(intf) {
84 for (
const auto &[attr, _seqId, _blockOnRead, _syncOnStart] :
86 mModifiedAttributes.push_back(attr);
99 :
Task(intf.
mName +
".Write"), mIntf(intf) {
101 mAttributeDependencies.push_back(attr);
Tasks to be defined by every component.
std::vector< AttributeBase::Ptr > mModifiedAttributes
std::vector< std::tuple< CPS::AttributeBase::Ptr, UInt, bool, bool > > mImportAttrsDpsim
std::atomic< bool > mOpened
std::vector< std::tuple< CPS::AttributeBase::Ptr, UInt > > mExportAttrsDpsim
Interface(const String &name="", spdlog::level::level_enum logLevel=spdlog::level::level_enum::info)
PostStep(InterfaceVillasQueueless &intf)
void execute(Real time, Int timeStepCount) override
PreStep(InterfaceVillasQueueless &intf)
void execute(Real time, Int timeStepCount) override
std::shared_ptr< InterfaceVillasQueueless > Ptr
virtual CPS::Task::List getTasks() override
virtual void printVillasSignals() const
virtual void syncImports() override
Function called by the Simulation to perform interface synchronization.
InterfaceVillasQueueless(const String &nodeConfig, const String &name="", spdlog::level::level_enum logLevel=spdlog::level::level_enum::info)
create a new InterfaceVillasQueueless instance
virtual void open() override
virtual Int readFromVillas()
virtual void close() override
virtual ~InterfaceVillasQueueless()
virtual void writeToVillas()
virtual void syncExports() override
static CPS::AttributeBase::Ptr external