![]() |
0.4.1
|
Calculates differences between signals. More...
Data Structures | |
struct | Combination |
Combination of data. More... | |
struct | PinData |
Pin data. More... | |
struct | SendRequest |
Send request information. More... | |
Public Member Functions | |
Combiner () | |
Default constructor. | |
Combiner (Combiner &&)=delete | |
Move constructor. | |
Combiner (const Combiner &)=delete | |
Copy constructor. | |
void | guiConfig () override |
ImGui config window which is shown on double click. | |
Combiner & | operator= (Combiner &&)=delete |
Move assignment operator. | |
Combiner & | operator= (const Combiner &)=delete |
Copy assignment operator. | |
void | restore (const json &j) override |
Restores the node from a json object. | |
json | save () const override |
Saves the node into a json object. | |
std::string | type () const override |
String representation of the Class Type. | |
~Combiner () override | |
Destructor. | |
![]() | |
virtual void | afterCreateLink (OutputPin &startPin, InputPin &endPin) |
Called when a new link was established. | |
virtual void | afterDeleteLink (OutputPin &startPin, InputPin &endPin) |
Called when a link was deleted. | |
bool | doDeinitialize (bool wait=false) |
Asks the node worker to deinitialize the node. | |
bool | doDisable (bool wait=false) |
Asks the node worker to disable the node. | |
bool | doEnable () |
Enable the node. | |
bool | doInitialize (bool wait=false) |
Asks the node worker to initialize the node. | |
bool | doReinitialize (bool wait=false) |
Asks the node worker to reinitialize the node. | |
virtual void | flush () |
Function called by the flow executer after finishing to flush out remaining data. | |
template<typename T> | |
std::optional< InputPin::IncomingLink::ValueWrapper< T > > | getInputValue (size_t portIndex) const |
Get Input Value connected on the pin. Only const data types. | |
Mode | getMode () const |
Get the current mode of the node. | |
const ImVec2 & | getSize () const |
Get the size of the node. | |
State | getState () const |
Get the current state of the node. | |
bool | hasInputPinWithSameTime (const InsTime &insTime) const |
Checks wether there is an input pin with the same time. | |
InputPin & | inputPinFromId (ax::NodeEditor::PinId pinId) |
Returns the pin with the given id. | |
size_t | inputPinIndexFromId (ax::NodeEditor::PinId pinId) const |
Returns the index of the pin. | |
void | invokeCallbacks (size_t portIndex, const std::shared_ptr< const NodeData > &data) |
Calls all registered callbacks on the specified output port. | |
bool | isDisabled () const |
Checks if the node is disabled. | |
bool | isInitialized () const |
Checks if the node is initialized. | |
bool | isOnlyRealtime () const |
Checks if the node is only working in real time (sensors, network interfaces, ...) | |
bool | isTransient () const |
Checks if the node is changing its state currently. | |
std::string | nameId () const |
Node name and id. | |
Node (const Node &)=delete | |
Copy constructor. | |
Node (Node &&)=delete | |
Move constructor. | |
Node (std::string name) | |
Constructor. | |
void | notifyOutputValueChanged (size_t pinIdx, const InsTime &insTime, const std::scoped_lock< std::mutex > &&guard) |
Notifies connected nodes about the change. | |
virtual bool | onCreateLink (OutputPin &startPin, InputPin &endPin) |
Called when a new link is to be established. | |
virtual void | onDeleteLink (OutputPin &startPin, InputPin &endPin) |
Called when a link is to be deleted. | |
Node & | operator= (const Node &)=delete |
Copy assignment operator. | |
Node & | operator= (Node &&)=delete |
Move assignment operator. | |
OutputPin & | outputPinFromId (ax::NodeEditor::PinId pinId) |
Returns the pin with the given id. | |
size_t | outputPinIndexFromId (ax::NodeEditor::PinId pinId) const |
Returns the index of the pin. | |
void | releaseInputValue (size_t portIndex) |
Unblocks the connected node. Has to be called when the input value should be released and getInputValue was not called. | |
std::scoped_lock< std::mutex > | requestOutputValueLock (size_t pinIdx) |
Blocks the thread till the output values was read by all connected nodes. | |
virtual bool | resetNode () |
Resets the node. It is guaranteed that the node is initialized when this is called. | |
virtual void | restoreAtferLink (const json &j) |
Restores link related properties of the node from a json object. | |
void | wakeWorker () |
Wakes the worker thread. | |
virtual | ~Node () |
Destructor. | |
![]() | |
CommonLog (CommonLog &&)=delete | |
Move constructor. | |
CommonLog (const CommonLog &)=delete | |
Copy constructor. | |
void | initialize () const |
Initialize the common log variables. | |
CommonLog & | operator= (CommonLog &&)=delete |
Move assignment operator. | |
CommonLog & | operator= (const CommonLog &)=delete |
Copy assignment operator. | |
virtual | ~CommonLog () |
Destructor. | |
Static Public Member Functions | |
static std::string | category () |
String representation of the Class Category. | |
static std::string | typeStatic () |
String representation of the Class Type. | |
![]() | |
static std::string | toString (State state) |
Converts the state into a printable text. | |
![]() | |
static LocalPosition | calcLocalPosition (const Eigen::Vector3d &lla_position) |
Calculate the local position offset from a reference point. | |
static double | calcTimeIntoRun (const InsTime &insTime) |
Calculates the relative time into he run. | |
static void | restore (const json &j) |
Read info from a json object. | |
static json | save () |
Returns a json object of the common log. | |
static bool | ShowOriginInput (const char *id) |
Shows a GUI to input a origin location. | |
Private Member Functions | |
void | deinitialize () override |
Deinitialize the node. | |
std::vector< std::string > | getDataDescriptors (size_t pinIndex) const |
Returns a list of descriptors for the pin. | |
bool | initialize () override |
Initialize the node. | |
void | receiveData (InputPin::NodeDataQueue &queue, size_t pinIdx) |
Receive Data Function. | |
Static Private Member Functions | |
static void | pinAddCallback (Node *node) |
Function to call to add a new pin. | |
static void | pinDeleteCallback (Node *node, size_t pinIdx) |
Function to call to delete a pin. | |
Private Attributes | |
std::vector< Combination > | _combinations |
Combinations to calculate. | |
gui::widgets::DynamicInputPins | _dynamicInputPins |
Dynamic input pins. | |
double | _maxTimeDiffMultiplierFrequency |
Multiply frequency with this to get maximum allowed time difference to interpolate to. | |
double | _maxTimeStepMultiplierFrequency |
Multiply frequency with this to get maximum allowed time step of incoming observations. | |
bool | _noOutputIfTimeDiffLarge |
Wether to not output a term if the interpolation time point is too far away. | |
bool | _noOutputIfTimeStepLarge |
Wether to not output a term if the time step to interpolate in between is large. | |
bool | _outputMissingAsNaN |
Output missing combinations with NaN instead of removing. | |
std::vector< PinData > | _pinData |
Data per pin. | |
size_t | _refPinIdx |
Reference pin. | |
std::map< InsTime, std::vector< SendRequest > > | _sendRequests |
Chronological list of send request. | |
Static Private Attributes | |
static std::vector< std::string > | _dataIdentifier |
Possible data identifiers to connect. | |
static constexpr size_t | OUTPUT_PORT_INDEX_DYN_DATA |
Flow (DynamicData) | |
Friends | |
void | from_json (const json &j, Combination::Term &data) |
Read info from a json object. | |
void | from_json (const json &j, Combiner::Combination &data) |
Read info from a json object. | |
void | to_json (json &j, const Combination &data) |
Write info to a json object. | |
void | to_json (json &j, const Combination::Term &data) |
Write info to a json object. | |
Additional Inherited Members | |
![]() | |
enum class | Mode : uint8_t { REAL_TIME , POST_PROCESSING } |
Different Modes the Node can work in. More... | |
enum class | State : uint8_t { Disabled , Deinitialized , DoInitialize , Initializing , Initialized , DoDeinitialize , Deinitializing , DoShutdown , Shutdown } |
Possible states of the node. More... | |
![]() | |
bool | callbacksEnabled |
Enables the callbacks. | |
ax::NodeEditor::NodeId | id |
Unique Id of the Node. | |
std::vector< InputPin > | inputPins |
List of input pins. | |
Kind | kind |
Kind of the Node. | |
std::string | name |
Name of the Node. | |
std::vector< OutputPin > | outputPins |
List of output pins. | |
std::multimap< InsTime, std::pair< OutputPin *, size_t > > | pollEvents |
Map with callback events (sorted by time) | |
![]() | |
CommonLog () | |
Default constructor. | |
![]() | |
ImVec2 | _guiConfigDefaultWindowSize |
bool | _hasConfig |
Flag if the config window should be shown. | |
bool | _lockConfigDuringRun |
Lock the config when executing post-processing. | |
bool | _onlyRealTime |
Whether the node can run in post-processing or only real-time. | |
![]() | |
static std::optional< gui::widgets::PositionWithFrame > | _originPosition |
Origin for calculation of relative position. | |
static InsTime | _startTime |
Start Time for calculation of relative time. | |
static bool | _useGuiInputs |
Use GUI inputs. | |
Calculates differences between signals.
Definition at line 48 of file Combiner.hpp.
NAV::Combiner::Combiner | ( | ) |
Default constructor.
Definition at line 79 of file Combiner.cpp.
|
override |
Destructor.
Definition at line 92 of file Combiner.cpp.
|
delete |
Copy constructor.
|
delete |
Move constructor.
|
staticnodiscard |
String representation of the Class Category.
Definition at line 107 of file Combiner.cpp.
|
overrideprivatevirtual |
|
nodiscardprivate |
Returns a list of descriptors for the pin.
pinIndex | Pin Index to look for the descriptor |
Definition at line 490 of file Combiner.cpp.
|
overridevirtual |
ImGui config window which is shown on double click.
Reimplemented from NAV::Node.
Definition at line 112 of file Combiner.cpp.
|
overrideprivatevirtual |
|
staticprivate |
Function to call to add a new pin.
[in,out] | node | Pointer to this node |
Definition at line 427 of file Combiner.cpp.
|
staticprivate |
Function to call to delete a pin.
[in,out] | node | Pointer to this node |
[in] | pinIdx | Input pin index to delete |
Definition at line 434 of file Combiner.cpp.
|
private |
Receive Data Function.
[in] | queue | Queue with all the received data messages |
[in] | pinIdx | Index of the pin the data is received on |
Definition at line 505 of file Combiner.cpp.
|
overridevirtual |
Restores the node from a json object.
[in] | j | Json object with the node state |
Reimplemented from NAV::Node.
Definition at line 413 of file Combiner.cpp.
|
nodiscardoverridevirtual |
Saves the node into a json object.
Reimplemented from NAV::Node.
Definition at line 397 of file Combiner.cpp.
|
nodiscardoverridevirtual |
String representation of the Class Type.
Implements NAV::Node.
Definition at line 102 of file Combiner.cpp.
|
staticnodiscard |
String representation of the Class Type.
Definition at line 97 of file Combiner.cpp.
|
friend |
Read info from a json object.
[in] | j | Json variable to read info from |
[out] | data | Output object |
Definition at line 55 of file Combiner.cpp.
|
friend |
Read info from a json object.
[in] | j | Json variable to read info from |
[out] | data | Output object |
Definition at line 74 of file Combiner.cpp.
|
friend |
Write info to a json object.
[out] | j | Json output |
[in] | data | Object to read info from |
Definition at line 65 of file Combiner.cpp.
|
friend |
Write info to a json object.
[out] | j | Json output |
[in] | data | Object to read info from |
Definition at line 44 of file Combiner.cpp.
|
private |
Combinations to calculate.
Definition at line 168 of file Combiner.hpp.
|
inlinestaticprivate |
Possible data identifiers to connect.
Definition at line 88 of file Combiner.hpp.
|
private |
Dynamic input pins.
Definition at line 219 of file Combiner.hpp.
|
private |
Multiply frequency with this to get maximum allowed time difference to interpolate to.
Definition at line 191 of file Combiner.hpp.
|
private |
Multiply frequency with this to get maximum allowed time step of incoming observations.
Definition at line 194 of file Combiner.hpp.
|
private |
Wether to not output a term if the interpolation time point is too far away.
Definition at line 190 of file Combiner.hpp.
|
private |
Wether to not output a term if the time step to interpolate in between is large.
Definition at line 193 of file Combiner.hpp.
|
private |
Output missing combinations with NaN instead of removing.
Definition at line 188 of file Combiner.hpp.
|
private |
Data per pin.
Definition at line 182 of file Combiner.hpp.
|
private |
Reference pin.
Definition at line 185 of file Combiner.hpp.
|
private |
Chronological list of send request.
Definition at line 207 of file Combiner.hpp.
|
staticconstexprprivate |
Flow (DynamicData)
Definition at line 85 of file Combiner.hpp.