0.2.0
Loading...
Searching...
No Matches
Merger.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
20namespace NAV
21{
23class Merger : public Node
24{
25 public:
29 ~Merger() override;
31 Merger(const Merger&) = delete;
33 Merger(Merger&&) = delete;
35 Merger& operator=(const Merger&) = delete;
37 Merger& operator=(Merger&&) = delete;
38
40 [[nodiscard]] static std::string typeStatic();
41
43 [[nodiscard]] std::string type() const override;
44
46 [[nodiscard]] static std::string category();
47
52 bool onCreateLink(OutputPin& startPin, InputPin& endPin) override;
53
57 void afterDeleteLink(OutputPin& startPin, InputPin& endPin) override;
58
59 private:
60 constexpr static size_t OUTPUT_PORT_INDEX_FLOW = 0;
61 constexpr static size_t INPUT_PORT_INDEX_FLOW_FIRST = 0;
62 constexpr static size_t INPUT_PORT_INDEX_FLOW_SECOND = 1;
63
68 void setPinIdentifiers(size_t connectedPinIndex, size_t otherPinIndex, const std::vector<std::string>& dataIdentifiers);
69
72 void updateOutputPin(const std::vector<std::string>& oldDataIdentifiers);
73
77 void receiveData(InputPin::NodeDataQueue& queue, size_t pinIdx);
78};
79
80} // namespace NAV
Vector space operations.
Node Class.
Input pins of nodes.
Definition Pin.hpp:491
Merges two input ports into a single output port.
Definition Merger.hpp:24
bool onCreateLink(OutputPin &startPin, InputPin &endPin) override
Called when a new link is to be established.
Merger & operator=(const Merger &)=delete
Copy assignment operator.
Merger(const Merger &)=delete
Copy constructor.
static std::string category()
String representation of the Class Category.
std::string type() const override
String representation of the Class Type.
Merger & operator=(Merger &&)=delete
Move assignment operator.
void afterDeleteLink(OutputPin &startPin, InputPin &endPin) override
Called when a link was deleted.
Merger()
Default constructor.
static std::string typeStatic()
String representation of the Class Type.
~Merger() override
Destructor.
Merger(Merger &&)=delete
Move constructor.
Abstract parent class for all nodes.
Definition Node.hpp:86
Output pins of nodes.
Definition Pin.hpp:338