![]() |
0.5.0
|
File Reader for ULog files ('.ulg') More...
Data Structures | |
| struct | Cpuload |
| Px4 CPU status message. More... | |
| struct | DataField |
| Key-value pair of the message format. More... | |
| struct | MeasurementData |
| Combined (sensor-)message name with unique ID and data. More... | |
| struct | SensorAccel |
| Px4 acceleration sensor message. More... | |
| struct | SensorGyro |
| Px4 gyro sensor message. More... | |
| struct | SensorMag |
| Px4 magnetometer sensor message. More... | |
| struct | SubscriptionData |
| Combined (sensor-)message name with unique ID. More... | |
| struct | VehicleAirData |
| Px4 air data sensor message. More... | |
| struct | VehicleAttitude |
| Px4 GPS attitude message. More... | |
| struct | VehicleControlMode |
| Px4 control data message. More... | |
| struct | VehicleGpsPosition |
| Px4 GPS sensor message. More... | |
| struct | VehicleStatus |
| Px4 vehicle status message. More... | |
Public Member Functions | |
| void | guiConfig () override |
| ImGui config window which is shown on double click. | |
| UlogFile & | operator= (const UlogFile &)=delete |
| Copy assignment operator. | |
| UlogFile & | operator= (UlogFile &&)=delete |
| Move assignment operator. | |
| bool | resetNode () override |
| Resets the node. Moves the read cursor to the start. | |
| 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. | |
| UlogFile () | |
| Default constructor. | |
| UlogFile (const UlogFile &)=delete | |
| Copy constructor. | |
| UlogFile (UlogFile &&)=delete | |
| Move constructor. | |
| ~UlogFile () override | |
| Destructor. | |
| Public Member Functions inherited from NAV::Imu | |
| Imu (const Imu &)=delete | |
| Copy constructor. | |
| Imu (Imu &&)=delete | |
| Move constructor. | |
| const ImuPos & | imuPosition () const |
| Position and rotation information for conversion from platform to body frame. | |
| Imu & | operator= (const Imu &)=delete |
| Copy assignment operator. | |
| Imu & | operator= (Imu &&)=delete |
| Move assignment operator. | |
| ~Imu () override=default | |
| Destructor. | |
| Public Member Functions inherited from NAV::Node | |
| 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 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. | |
| Public Member Functions inherited from NAV::FileReader | |
| FileReader (const FileReader &)=delete | |
| Copy constructor. | |
| FileReader (FileReader &&)=delete | |
| Move constructor. | |
| FileReader & | operator= (const FileReader &)=delete |
| Copy assignment operator. | |
| FileReader & | operator= (FileReader &&)=delete |
| Move assignment operator. | |
| virtual | ~FileReader ()=default |
| 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 Public Member Functions inherited from NAV::Node | |
| static std::string | toString (State state) |
| Converts the state into a printable text. | |
Private Member Functions | |
| void | deinitialize () override |
| Deinitialize the node. | |
| FileType | determineFileType () override |
| Determines the type of the file. | |
| int8_t | enoughImuDataAvailable () |
| Checks '_epochData' whether there is enough data available to output one ImuObs. | |
| std::array< std::multimap< uint64_t, NAV::UlogFile::MeasurementData >::iterator, 2 > | findPosVelAttData () |
| Checks '_epochData' whether there is enough data available to output one PosVelAtt. | |
| bool | initialize () override |
| Initialize the node. | |
| std::shared_ptr< const NodeData > | pollData () |
| Polls data from the file. | |
| void | readHeader () override |
| Read the Header of the file. | |
| void | readInformationMessage (uint16_t msgSize, char msgType) |
| Read msg type 'I'. | |
| void | readInformationMessageMulti (uint16_t msgSize, char msgType) |
| Read msg type 'M'. | |
| void | readParameterMessage (uint16_t msgSize, char msgType) |
| Read msg type 'P'. | |
| void | readParameterMessageDefault (uint16_t msgSize, char msgType) |
| Read msg type 'Q'. | |
Private Attributes | |
| std::multimap< uint64_t, MeasurementData > | _epochData |
| Data message container. Key: [timestamp], Value: [0, "sensor_accel", SensorAccel{}]. | |
| std::unordered_map< std::string, std::vector< DataField > > | _messageFormats |
| Key: message_name, e.g. "sensor_accel". | |
| std::unordered_map< uint16_t, SubscriptionData > | _subscribedMessages |
| Key: msg_id. | |
| struct { | |
| InsTime gnssTime | |
| Absolute timestamp. More... | |
| uint64_t timeSinceStartup | |
| Relative timestamp. More... | |
| } | lastGnssTime |
| Stores GNSS timestamp of one epoch before the current one (relative or absolute) | |
Static Private Attributes | |
| static constexpr size_t | OUTPUT_PORT_INDEX_IMUOBS_1 |
| Flow (ImuObs #1) | |
| static constexpr size_t | OUTPUT_PORT_INDEX_IMUOBS_2 |
| Flow (ImuObs #2) | |
| static constexpr size_t | OUTPUT_PORT_INDEX_POSVELATT |
| Flow (PosVelAtt) | |
Additional Inherited Members | |
| Public Types inherited from NAV::Node | |
| 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 Types inherited from NAV::FileReader | |
| enum | FileType : uint8_t { NONE , BINARY , ASCII } |
| File Type Enumeration. More... | |
| enum | GuiResult : uint8_t { PATH_UNCHANGED , PATH_CHANGED , PATH_CHANGED_INVALID } |
| Results enum for the gui config. More... | |
| Data Fields inherited from NAV::Node | |
| 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 Member Functions inherited from NAV::Imu | |
| Imu (std::string name) | |
| Constructor. | |
| Protected Member Functions inherited from NAV::FileReader | |
| void | deinitialize () |
| Deinitialize the file reader. | |
| auto | eof () const |
| Check whether the end of file is reached. | |
| FileReader ()=default | |
| Default constructor. | |
| size_t | getCurrentLineNumber () const |
| Get the current line number. | |
| std::filesystem::path | getFilepath () |
| Returns the path of the file. | |
| auto & | getline (std::string &str) |
| Reads a line from the filestream. | |
| bool | good () const |
| Fast error checking. | |
| GuiResult | guiConfig (const char *vFilters, const std::vector< std::string > &extensions, size_t id, const std::string &nameId) |
| ImGui config. | |
| auto & | ignore (std::streamsize count, int delim) |
| Extracts and discards characters from the input stream until and including delim. | |
| bool | initialize () |
| Initialize the file reader. | |
| auto | peek () |
| Looking ahead in the stream. | |
| auto & | read (char *__s, std::streamsize __n) |
| Extraction without delimiters. | |
| auto | readsome (char *s, std::streamsize count) |
| Extracts up to count immediately available characters from the input stream. The extracted characters are stored into the character array pointed to by s. | |
| void | resetReader () |
| Moves the read cursor to the start. | |
| void | restore (const json &j) |
| Restores the node from a json object. | |
| json | save () const |
| Saves the node into a json object. | |
| auto & | seekg (std::streamoff pos, std::ios_base::seekdir dir) |
| Changing the current read position. | |
| std::streampos | tellg () |
| Getting the current read position. | |
| Protected Attributes inherited from NAV::Imu | |
| ImuPos | _imuPos |
| Position and rotation information for conversion from platform to body frame. | |
| Protected Attributes inherited from NAV::Node | |
| 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. | |
| Protected Attributes inherited from NAV::FileReader | |
| FileType | _fileType |
| File Type. | |
| std::vector< std::string > | _headerColumns |
| Header Columns of a CSV file. | |
| std::string | _path |
| Path to the file. | |
File Reader for ULog files ('.ulg')
Definition at line 30 of file UlogFile.hpp.
| NAV::UlogFile::UlogFile | ( | ) |
Default constructor.
Definition at line 30 of file UlogFile.cpp.
|
override |
Destructor.
Definition at line 44 of file UlogFile.cpp.
|
delete |
Copy constructor.
|
delete |
Move constructor.
|
staticnodiscard |
String representation of the Class Category.
Definition at line 59 of file UlogFile.cpp.
|
overrideprivatevirtual |
|
nodiscardoverrideprivatevirtual |
Determines the type of the file.
Reimplemented from NAV::FileReader.
Definition at line 138 of file UlogFile.cpp.
|
private |
Checks '_epochData' whether there is enough data available to output one ImuObs.
Definition at line 1416 of file UlogFile.cpp.
|
private |
Checks '_epochData' whether there is enough data available to output one PosVelAtt.
Definition at line 1447 of file UlogFile.cpp.
|
overridevirtual |
ImGui config window which is shown on double click.
Reimplemented from NAV::Imu.
Definition at line 64 of file UlogFile.cpp.
|
overrideprivatevirtual |
|
nodiscardprivate |
Polls data from the file.
Combines (sensor-)message name with an ID that indicates a possible multiple of a sensor
Definition at line 314 of file UlogFile.cpp.
|
overrideprivatevirtual |
Read the Header of the file.
Reimplemented from NAV::FileReader.
Definition at line 162 of file UlogFile.cpp.
|
private |
Read msg type 'I'.
| [in] | msgSize | size of ulogMsgHeader |
| [in] | msgType | type of ulogMsgHeader |
Definition at line 1325 of file UlogFile.cpp.
|
private |
Read msg type 'M'.
| [in] | msgSize | size of ulogMsgHeader |
| [in] | msgType | type of ulogMsgHeader |
Definition at line 1347 of file UlogFile.cpp.
|
private |
Read msg type 'P'.
| [in] | msgSize | size of ulogMsgHeader |
| [in] | msgType | type of ulogMsgHeader |
Definition at line 1368 of file UlogFile.cpp.
|
private |
Read msg type 'Q'.
| [in] | msgSize | size of ulogMsgHeader |
| [in] | msgType | type of ulogMsgHeader |
Definition at line 1398 of file UlogFile.cpp.
|
overridevirtual |
Resets the node. Moves the read cursor to the start.
Reimplemented from NAV::Node.
Definition at line 123 of file UlogFile.cpp.
|
overridevirtual |
Restores the node from a json object.
| [in] | j | Json object with the node state |
Reimplemented from NAV::Imu.
Definition at line 95 of file UlogFile.cpp.
|
nodiscardoverridevirtual |
Saves the node into a json object.
Reimplemented from NAV::Imu.
Definition at line 83 of file UlogFile.cpp.
|
nodiscardoverridevirtual |
String representation of the Class Type.
Implements NAV::Node.
Definition at line 54 of file UlogFile.cpp.
|
staticnodiscard |
String representation of the Class Type.
Definition at line 49 of file UlogFile.cpp.
|
private |
Data message container. Key: [timestamp], Value: [0, "sensor_accel", SensorAccel{}].
Definition at line 309 of file UlogFile.hpp.
|
private |
Key: message_name, e.g. "sensor_accel".
Definition at line 126 of file UlogFile.hpp.
|
private |
Key: msg_id.
Definition at line 298 of file UlogFile.hpp.
| InsTime NAV::UlogFile::gnssTime |
Absolute timestamp.
Definition at line 323 of file UlogFile.hpp.
| struct { ... } NAV::UlogFile::lastGnssTime |
Stores GNSS timestamp of one epoch before the current one (relative or absolute)
|
staticconstexprprivate |
Flow (ImuObs #1)
Definition at line 77 of file UlogFile.hpp.
|
staticconstexprprivate |
Flow (ImuObs #2)
Definition at line 78 of file UlogFile.hpp.
|
staticconstexprprivate |
Flow (PosVelAtt)
Definition at line 79 of file UlogFile.hpp.
| uint64_t NAV::UlogFile::timeSinceStartup |
Relative timestamp.
Definition at line 322 of file UlogFile.hpp.