![]() |
0.5.0
|
Abstract parent class for all nodes. More...
Data Structures | |
| struct | Kind |
| Kind information class. More... | |
Public Types | |
| 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... | |
Public Member Functions | |
| 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. | |
| virtual void | deinitialize () |
| Deinitialize the Node. | |
| 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. | |
| virtual void | guiConfig () |
| ImGui config window which is shown on double click. | |
| bool | hasInputPinWithSameTime (const InsTime &insTime) const |
| Checks wether there is an input pin with the same time. | |
| virtual bool | initialize () |
| Initialize the Node. | |
| 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 | restore (const json &j) |
| Restores the node from a json object. | |
| virtual void | restoreAtferLink (const json &j) |
| Restores link related properties of the node from a json object. | |
| virtual json | save () const |
| Saves the node into a json object. | |
| virtual std::string | type () const =0 |
| String representation of the Class Type. | |
| void | wakeWorker () |
| Wakes the worker thread. | |
| virtual | ~Node () |
| Destructor. | |
Static Public Member Functions | |
| static std::string | toString (State state) |
| Converts the state into a printable text. | |
Data Fields | |
| 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) | |
Protected Attributes | |
| 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. | |
Private Member Functions | |
| bool | workerDeinitializeNode () |
| Called by the worker to deinitialize the node. | |
| bool | workerInitializeNode () |
| Called by the worker to initialize the node. | |
| virtual void | workerTimeoutHandler () |
| Handler which gets triggered if the worker runs into a periodic timeout. | |
Static Private Member Functions | |
| static void | workerThread (Node *node) |
| Worker thread. | |
Private Attributes | |
| bool | _configWindowFocus |
| Flag if the config window should be focused. | |
| bool | _configWindowForceCollapse |
| Flag if the config window should be forced collapsed. | |
| bool | _configWindowIsCollapsed |
| Flag if the config window is collapsed. | |
| std::mutex | _configWindowMutex |
| Mutex to show the config window (prevents initialization to modify values within the config window) | |
| bool | _disable |
| Flag if the node should be disabled after deinitializing. | |
| std::atomic< Mode > | _mode |
| Mode the node is currently running in. | |
| bool | _reinitialize |
| Flag if the node should be reinitialize after deinitializing. | |
| bool | _showConfig |
| Flag if the config window is shown. | |
| ImVec2 | _size |
| Size of the node in pixels. | |
| State | _state |
| Current state of the node. | |
| std::mutex | _stateMutex |
| Mutex to interact with the worker state variable. | |
| std::thread | _worker |
| Worker handling initialization and processing of data. | |
| std::condition_variable | _workerConditionVariable |
| Condition variable to signal the worker thread to do something. | |
| std::mutex | _workerMutex |
| Mutex to interact with the worker condition variable. | |
| std::chrono::duration< int64_t > | _workerTimeout |
| Periodic timeout of the worker to check if new data available. | |
| bool | _workerWakeup |
| Variable to prevent the worker from sleeping. | |
Static Private Attributes | |
| static bool | _autostartWorker |
| Flag which prevents the worker to be autostarted if false. | |
Friends | |
| void | gui::menus::ShowRunMenu () |
| Show the run menu dropdown. | |
| class | gui::NodeEditorApplication |
| void | NAV::FlowExecutor::deinitialize () |
| Deinitialize all Nodes. | |
| void | NAV::FlowExecutor::execute () |
| Main task of the FlowExecutor thread. | |
| void | NAV::from_json (const json &j, Node &node) |
| Converts the provided json object into a node object. | |
| class | NAV::GroupBox |
| void | NAV::NodeRegistry::RegisterNodeTypes () |
| Register all available Node types for the program. | |
| void | NAV::to_json (json &j, const Node &node) |
| Converts the provided node into a json object. | |
|
strong |
|
strong |
Possible states of the node.
| Enumerator | |
|---|---|
| Disabled | Node is disabled and won't be initialized. |
| Deinitialized | Node is deinitialized (red) |
| DoInitialize | Node should be initialized. |
| Initializing | Node is currently initializing. |
| Initialized | Node is initialized (green) |
| DoDeinitialize | Node should be deinitialized. |
| Deinitializing | Node is currently deinitializing. |
| DoShutdown | Node should shut down. |
| Shutdown | Node is shutting down. |
|
explicit |
|
delete |
Copy constructor.
|
delete |
Move constructor.
Called when a new link was established.
Reimplemented in NAV::ErrorModel, NAV::LowPassFilter, NAV::Plot, and NAV::TimeWindow.
Called when a link was deleted.
Reimplemented in NAV::Demo, NAV::ErrorModel, NAV::LowPassFilter, NAV::Merger, and NAV::TimeWindow.
|
virtual |
Deinitialize the Node.
Reimplemented in NAV::AllanDeviation, NAV::ArubaSensor, NAV::BaroSimulator, NAV::Combiner, NAV::CsvFile, NAV::CsvLogger, NAV::Demo, NAV::EmlidFile, NAV::EmlidSensor, NAV::EspressifSensor, NAV::experimental::ARMA, NAV::experimental::Delay, NAV::experimental::SkydelNetworkStream, NAV::GnssAnalyzer, NAV::ImuFile, NAV::ImuFusion, NAV::ImuIntegrator, NAV::ImuSimulator, NAV::KmlLogger, NAV::KvhFile, NAV::KvhSensor, NAV::LooselyCoupledKF, NAV::MatrixLogger, NAV::MultiImuFile, NAV::Navio2Sensor, NAV::NmeaFile, NAV::Plot, NAV::PosVelAttFile, NAV::PosVelAttInitializer, NAV::PressToHgt, NAV::RealTimeKinematic, NAV::RinexNavFile, NAV::RinexObsFile, NAV::RinexObsLogger, NAV::RtklibPosFile, NAV::SinglePointPositioning, NAV::UartDataLogger, NAV::UbloxFile, NAV::UbloxSensor, NAV::UdpRecv, NAV::UdpSend, NAV::UlogFile, NAV::VectorNavDataLogger, NAV::VectorNavFile, NAV::VectorNavSensor, NAV::WiFiObsFile, NAV::WiFiObsLogger, and NAV::WiFiPositioning.
| bool NAV::Node::doDeinitialize | ( | bool | wait = false | ) |
| bool NAV::Node::doDisable | ( | bool | wait = false | ) |
| bool NAV::Node::doEnable | ( | ) |
| bool NAV::Node::doInitialize | ( | bool | wait = false | ) |
| bool NAV::Node::doReinitialize | ( | bool | wait = false | ) |
|
virtual |
Function called by the flow executer after finishing to flush out remaining data.
Reimplemented in NAV::CsvLogger, NAV::KmlLogger, NAV::MatrixLogger, NAV::RinexObsLogger, NAV::UartDataLogger, NAV::VectorNavDataLogger, and NAV::WiFiObsLogger.
|
inlinenodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
virtual |
ImGui config window which is shown on double click.
Reimplemented in NAV::AllanDeviation, NAV::ArubaSensor, NAV::BaroSimulator, NAV::Combiner, NAV::CsvFile, NAV::CsvLogger, NAV::Demo, NAV::EmlidFile, NAV::EmlidSensor, NAV::ErrorModel, NAV::EspressifSensor, NAV::experimental::ARMA, NAV::experimental::Delay, NAV::experimental::SkydelNetworkStream, NAV::GnssAnalyzer, NAV::Imu, NAV::ImuFile, NAV::ImuFusion, NAV::ImuIntegrator, NAV::ImuSimulator, NAV::KmlLogger, NAV::KvhFile, NAV::KvhSensor, NAV::LooselyCoupledKF, NAV::LowPassFilter, NAV::MatrixLogger, NAV::MultiImuFile, NAV::Navio2Sensor, NAV::NmeaFile, NAV::Plot, NAV::PosVelAttFile, NAV::PosVelAttInitializer, NAV::PressToHgt, NAV::RealTimeKinematic, NAV::RinexNavFile, NAV::RinexObsFile, NAV::RinexObsLogger, NAV::RtklibPosFile, NAV::SinglePointPositioning, NAV::TimeWindow, NAV::UartDataLogger, NAV::UartPacketConverter, NAV::UbloxFile, NAV::UbloxGnssOrbitCollector, NAV::UbloxSensor, NAV::UdpRecv, NAV::UdpSend, NAV::UlogFile, NAV::VectorNavBinaryConverter, NAV::VectorNavDataLogger, NAV::VectorNavFile, NAV::VectorNavSensor, NAV::WiFiObsFile, NAV::WiFiObsLogger, and NAV::WiFiPositioning.
| bool NAV::Node::hasInputPinWithSameTime | ( | const InsTime & | insTime | ) | const |
|
virtual |
Initialize the Node.
Here a node can do things like
Reimplemented in NAV::AllanDeviation, NAV::ArubaSensor, NAV::BaroSimulator, NAV::Combiner, NAV::CsvFile, NAV::CsvLogger, NAV::Demo, NAV::EmlidFile, NAV::EmlidSensor, NAV::EspressifSensor, NAV::experimental::ARMA, NAV::experimental::Delay, NAV::experimental::SkydelNetworkStream, NAV::GnssAnalyzer, NAV::ImuFile, NAV::ImuFusion, NAV::ImuIntegrator, NAV::ImuSimulator, NAV::KmlLogger, NAV::KvhFile, NAV::KvhSensor, NAV::LooselyCoupledKF, NAV::MatrixLogger, NAV::MultiImuFile, NAV::Navio2Sensor, NAV::NmeaFile, NAV::Plot, NAV::PosVelAttFile, NAV::PosVelAttInitializer, NAV::PressToHgt, NAV::RealTimeKinematic, NAV::RinexNavFile, NAV::RinexObsFile, NAV::RinexObsLogger, NAV::RtklibPosConverter, NAV::RtklibPosFile, NAV::SinglePointPositioning, NAV::TimeWindow, NAV::UartDataLogger, NAV::UartPacketConverter, NAV::UbloxFile, NAV::UbloxGnssObsConverter, NAV::UbloxGnssOrbitCollector, NAV::UbloxSensor, NAV::UdpRecv, NAV::UdpSend, NAV::UlogFile, NAV::VectorNavBinaryConverter, NAV::VectorNavDataLogger, NAV::VectorNavFile, NAV::VectorNavSensor, NAV::WiFiObsFile, NAV::WiFiObsLogger, and NAV::WiFiPositioning.
|
nodiscard |
|
nodiscard |
| void NAV::Node::invokeCallbacks | ( | size_t | portIndex, |
| const std::shared_ptr< const NodeData > & | data ) |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
| void NAV::Node::notifyOutputValueChanged | ( | size_t | pinIdx, |
| const InsTime & | insTime, | ||
| const std::scoped_lock< std::mutex > && | guard ) |
Called when a new link is to be established.
Reimplemented in NAV::CsvLogger, NAV::Demo, NAV::experimental::Delay, NAV::Merger, and NAV::VectorNavDataLogger.
Called when a link is to be deleted.
Reimplemented in NAV::UbloxGnssOrbitCollector.
|
nodiscard |
|
nodiscard |
| void NAV::Node::releaseInputValue | ( | size_t | portIndex | ) |
|
nodiscard |
|
virtual |
Resets the node. It is guaranteed that the node is initialized when this is called.
Reimplemented in NAV::ArubaSensor, NAV::CsvFile, NAV::Demo, NAV::EmlidFile, NAV::EmlidSensor, NAV::ErrorModel, NAV::EspressifSensor, NAV::experimental::SkydelNetworkStream, NAV::ImuFile, NAV::ImuSimulator, NAV::KvhFile, NAV::KvhSensor, NAV::LowPassFilter, NAV::MultiImuFile, NAV::Navio2Sensor, NAV::NmeaFile, NAV::PosVelAttFile, NAV::RinexNavFile, NAV::RinexObsFile, NAV::RtklibPosFile, NAV::UbloxFile, NAV::UbloxSensor, NAV::UdpRecv, NAV::UdpSend, NAV::UlogFile, NAV::VectorNavFile, NAV::VectorNavSensor, and NAV::WiFiObsFile.
|
virtual |
Restores the node from a json object.
| [in] | j | Json object with the node state |
Reimplemented in NAV::AllanDeviation, NAV::ArubaSensor, NAV::BaroSimulator, NAV::Combiner, NAV::CsvFile, NAV::CsvLogger, NAV::Demo, NAV::EmlidFile, NAV::EmlidSensor, NAV::ErrorModel, NAV::EspressifSensor, NAV::experimental::ARMA, NAV::experimental::Delay, NAV::GnssAnalyzer, NAV::GroupBox, NAV::Imu, NAV::ImuFile, NAV::ImuFusion, NAV::ImuIntegrator, NAV::ImuSimulator, NAV::KmlLogger, NAV::KvhFile, NAV::KvhSensor, NAV::LooselyCoupledKF, NAV::LowPassFilter, NAV::MatrixLogger, NAV::MultiImuFile, NAV::Navio2Sensor, NAV::NmeaFile, NAV::Plot, NAV::PosVelAttFile, NAV::PosVelAttInitializer, NAV::PressToHgt, NAV::RealTimeKinematic, NAV::RinexNavFile, NAV::RinexObsFile, NAV::RinexObsLogger, NAV::RtklibPosFile, NAV::SinglePointPositioning, NAV::TimeWindow, NAV::UartDataLogger, NAV::UartPacketConverter, NAV::UbloxFile, NAV::UbloxSensor, NAV::UdpRecv, NAV::UdpSend, NAV::UlogFile, NAV::VectorNavBinaryConverter, NAV::VectorNavDataLogger, NAV::VectorNavFile, NAV::VectorNavSensor, NAV::WiFiObsFile, NAV::WiFiObsLogger, and NAV::WiFiPositioning.
|
virtual |
|
nodiscardvirtual |
Saves the node into a json object.
Reimplemented in NAV::AllanDeviation, NAV::ArubaSensor, NAV::BaroSimulator, NAV::Combiner, NAV::CsvFile, NAV::CsvLogger, NAV::Demo, NAV::EmlidFile, NAV::EmlidSensor, NAV::ErrorModel, NAV::EspressifSensor, NAV::experimental::ARMA, NAV::experimental::Delay, NAV::GnssAnalyzer, NAV::GroupBox, NAV::Imu, NAV::ImuFile, NAV::ImuFusion, NAV::ImuIntegrator, NAV::ImuSimulator, NAV::KmlLogger, NAV::KvhFile, NAV::KvhSensor, NAV::LooselyCoupledKF, NAV::LowPassFilter, NAV::MatrixLogger, NAV::MultiImuFile, NAV::Navio2Sensor, NAV::NmeaFile, NAV::Plot, NAV::PosVelAttFile, NAV::PosVelAttInitializer, NAV::PressToHgt, NAV::RealTimeKinematic, NAV::RinexNavFile, NAV::RinexObsFile, NAV::RinexObsLogger, NAV::RtklibPosFile, NAV::SinglePointPositioning, NAV::TimeWindow, NAV::UartDataLogger, NAV::UartPacketConverter, NAV::UbloxFile, NAV::UbloxSensor, NAV::UdpRecv, NAV::UdpSend, NAV::UlogFile, NAV::VectorNavBinaryConverter, NAV::VectorNavDataLogger, NAV::VectorNavFile, NAV::VectorNavSensor, NAV::WiFiObsFile, NAV::WiFiObsLogger, and NAV::WiFiPositioning.
|
static |
|
nodiscardpure virtual |
String representation of the Class Type.
Implemented in NAV::AllanDeviation, NAV::ArubaSensor, NAV::BaroSimulator, NAV::Combiner, NAV::CsvFile, NAV::CsvLogger, NAV::Demo, NAV::EmlidFile, NAV::EmlidSensor, NAV::ErrorModel, NAV::EspressifSensor, NAV::experimental::ARMA, NAV::experimental::Delay, NAV::experimental::SkydelNetworkStream, NAV::GnssAnalyzer, NAV::GroupBox, NAV::ImuFile, NAV::ImuFusion, NAV::ImuIntegrator, NAV::ImuSimulator, NAV::KmlLogger, NAV::KvhFile, NAV::KvhSensor, NAV::LooselyCoupledKF, NAV::LowPassFilter, NAV::MatrixLogger, NAV::Merger, NAV::MultiImuFile, NAV::Navio2Sensor, NAV::NmeaFile, NAV::Plot, NAV::PosVelAttFile, NAV::PosVelAttInitializer, NAV::PressToHgt, NAV::RealTimeKinematic, NAV::RinexNavFile, NAV::RinexObsFile, NAV::RinexObsLogger, NAV::RtklibPosConverter, NAV::RtklibPosFile, NAV::SinglePointPositioning, NAV::Terminator, NAV::TimeWindow, NAV::UartDataLogger, NAV::UartPacketConverter, NAV::UbloxFile, NAV::UbloxGnssObsConverter, NAV::UbloxGnssOrbitCollector, NAV::UbloxSensor, NAV::UdpRecv, NAV::UdpSend, NAV::UlogFile, NAV::VectorNavBinaryConverter, NAV::VectorNavDataLogger, NAV::VectorNavFile, NAV::VectorNavSensor, NAV::WiFiObsFile, NAV::WiFiObsLogger, and NAV::WiFiPositioning.
|
private |
|
private |
|
staticprivate |
|
privatevirtual |
|
friend |
Show the run menu dropdown.
|
friend |
|
friend |
Deinitialize all Nodes.
|
friend |
Main task of the FlowExecutor thread.
|
friend |
Converts the provided json object into a node object.
| [in] | j | Json object with the needed values |
| [out] | node | Object to fill from the json |
|
friend |
|
friend |
Register all available Node types for the program.
|
friend |
Converts the provided node into a json object.
| [out] | j | Json object which gets filled with the info |
| [in] | node | Node to convert into json |
|
inlinestaticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
| ax::NodeEditor::NodeId NAV::Node::id |
| std::vector<InputPin> NAV::Node::inputPins |
| std::vector<OutputPin> NAV::Node::outputPins |