0.2.0
Loading...
Searching...
No Matches
Delay.hpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
13
14#pragma once
15
17
18#include "util/Eigen.hpp"
19
20#include <deque>
21
22namespace NAV::experimental
23{
25class Delay : public Node
26{
27 public:
31 ~Delay() override;
33 Delay(const Delay&) = delete;
35 Delay(Delay&&) = delete;
37 Delay& operator=(const Delay&) = delete;
39 Delay& operator=(Delay&&) = delete;
40
42 [[nodiscard]] static std::string typeStatic();
43
45 [[nodiscard]] std::string type() const override;
46
48 [[nodiscard]] static std::string category();
49
52 void guiConfig() override;
53
55 [[nodiscard]] json save() const override;
56
59 void restore(const json& j) override;
60
65 bool onCreateLink(OutputPin& startPin, InputPin& endPin) override;
66
67 private:
68 constexpr static size_t OUTPUT_PORT_INDEX_FLOW = 0;
69 constexpr static size_t INPUT_PORT_INDEX_FLOW = 0;
70
72 bool initialize() override;
73
75 void deinitialize() override;
76
80 void delayObs(InputPin::NodeDataQueue& queue, size_t pinIdx);
81
83 int _delayLength = 1;
84
86 std::deque<std::shared_ptr<const NodeData>> _buffer;
87};
88
89} // namespace NAV::experimental
Vector space operations.
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Node Class.
Input pins of nodes.
Definition Pin.hpp:491
Abstract parent class for all nodes.
Definition Node.hpp:86
Output pins of nodes.
Definition Pin.hpp:338
Delays messages by buffering them.
Definition Delay.hpp:26
Delay & operator=(Delay &&)=delete
Move assignment operator.
json save() const override
Saves the node into a json object.
bool onCreateLink(OutputPin &startPin, InputPin &endPin) override
Called when a new link is to be established.
Delay(const Delay &)=delete
Copy constructor.
Delay(Delay &&)=delete
Move constructor.
void guiConfig() override
ImGui config window which is shown on double click.
Delay & operator=(const Delay &)=delete
Copy assignment operator.
Delay()
Default constructor.
~Delay() override
Destructor.
std::string type() const override
String representation of the Class Type.
static std::string typeStatic()
String representation of the Class Type.
static std::string category()
String representation of the Class Category.
void restore(const json &j) override
Restores the node from a json object.