DPsim
InterfaceVillas.h
1 // SPDX-License-Identifier: Apache-2.0
2 
3 #pragma once
4 
5 #include <dpsim-models/PtrFactory.h>
6 #include <dpsim/InterfaceQueued.h>
7 
8 #include <villas/kernel/rt.hpp>
9 #include <villas/node.hpp>
10 #include <villas/node/exceptions.hpp>
11 #include <villas/node/memory.hpp>
12 #include <villas/pool.hpp>
13 #include <villas/sample.hpp>
14 #include <villas/signal.hpp>
15 #include <villas/signal_list.hpp>
16 
17 using namespace villas;
18 
19 namespace DPsim {
22  public SharedFactory<InterfaceVillas> {
23 
24 public:
32  const String &nodeConfig, UInt queueLength = 512, UInt sampleLength = 64,
33  const String &name = "", UInt downsampling = 1,
34  spdlog::level::level_enum logLevel = spdlog::level::level_enum::info);
35 
41  virtual void importAttribute(CPS::AttributeBase::Ptr attr, UInt idx,
42  Bool blockOnRead = false,
43  Bool syncOnSimulationStart = true,
44  const String &name = "",
45  const String &unit = "");
46 
53  virtual void exportAttribute(CPS::AttributeBase::Ptr attr, UInt idx,
54  Bool waitForOnWrite, const String &name = "",
55  const String &unit = "");
56 
57  virtual void printVillasSignals() const;
58 };
59 } // namespace DPsim
Interface type that can be used to import and export simulation attributes over any node type support...