45 [[nodiscard]] std::string
type()
const override;
78 std::array<int, 3>
integer = { 12, -2, 2 };
83 constexpr static size_t OUTPUT_PORT_INDEX_FLOW = 1;
84 constexpr static size_t OUTPUT_PORT_INDEX_BOOL = 2;
85 constexpr static size_t OUTPUT_PORT_INDEX_INT = 3;
86 constexpr static size_t OUTPUT_PORT_INDEX_FLOAT = 4;
87 constexpr static size_t OUTPUT_PORT_INDEX_DOUBLE = 5;
88 constexpr static size_t OUTPUT_PORT_INDEX_STRING = 6;
89 constexpr static size_t OUTPUT_PORT_INDEX_DEMO_DATA = 7;
90 constexpr static size_t OUTPUT_PORT_INDEX_MATRIX = 8;
91 constexpr static size_t INPUT_PORT_INDEX_DEMO_NODE = 0;
92 constexpr static size_t INPUT_PORT_INDEX_FLOW = 1;
93 constexpr static size_t INPUT_PORT_INDEX_BOOL = 2;
94 constexpr static size_t INPUT_PORT_INDEX_INT = 3;
95 constexpr static size_t INPUT_PORT_INDEX_FLOAT = 4;
96 constexpr static size_t INPUT_PORT_INDEX_DOUBLE = 5;
97 constexpr static size_t INPUT_PORT_INDEX_STRING = 6;
98 constexpr static size_t INPUT_PORT_INDEX_DEMO_DATA = 7;
99 constexpr static size_t INPUT_PORT_INDEX_MATRIX = 8;
102 bool initialize()
override;
105 void deinitialize()
override;
115 [[nodiscard]] std::shared_ptr<const NodeData> peekPollData(
bool peek =
false);
119 [[nodiscard]] std::shared_ptr<const NodeData> pollData();
122 void updateOutputFlowPin();
125 bool _fileReaderInsteadSensor =
false;
132 static void readSensorDataThread(
void* userData);
135 int _outputFrequency = 1;
137 int _receivedDataCnt = 0;
144 bool _valueBool =
true;
146 float _valueFloat = 65.4F;
147 double _valueDouble = 1242.342;
148 std::string _valueString =
"Demo";
150 Eigen::MatrixXd _valueMatrix = Eigen::MatrixXd::Identity(3, 3);
151 size_t _stringUpdateCounter = 0;
156 void stringUpdatedNotifyFunction(
const InsTime& insTime,
size_t pinIdx);
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Manages a thread which calls a specified function at a specified interval.
Definition CallbackTimer.hpp:22
Demonstrates the basic GUI functionality of nodes.
Definition Demo.hpp:26
bool onCreateLink(OutputPin &startPin, InputPin &endPin) override
Called when a new link is to be established.
Demo(Demo &&)=delete
Move constructor.
static std::string typeStatic()
String representation of the Class Type.
bool resetNode() override
Resets the node. It is guaranteed that the node is initialized when this is called.
static std::string category()
String representation of the Class Category.
void restore(const json &j) override
Restores the node from a json object.
void onDeleteLink(OutputPin &startPin, InputPin &endPin) override
Called when a link is to be deleted.
Demo(const Demo &)=delete
Copy constructor.
Demo & operator=(const Demo &)=delete
Copy assignment operator.
std::string type() const override
String representation of the Class Type.
void guiConfig() override
ImGui config window which is shown on double click.
Demo()
Default constructor.
json save() const override
Saves the node into a json object.
Demo & operator=(Demo &&)=delete
Move assignment operator.
~Demo() override
Destructor.
The class is responsible for all time-related tasks.
Definition InsTime.hpp:667
Abstract parent class for all nodes.
Definition Node.hpp:86
Output pins of nodes.
Definition Pin.hpp:338
Data struct transmitted over an output port.
Definition Demo.hpp:77
std::array< int, 3 > integer
Integer inside the DemoData.
Definition Demo.hpp:78