0.4.1
Loading...
Searching...
No Matches
UbloxFile.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
9/// @file UbloxFile.hpp
10/// @brief File Reader for ubx files
11/// @author T. Topp (topp@ins.uni-stuttgart.de)
12/// @date 2020-03-16
13
14#pragma once
15
18
20
21namespace NAV
22{
23/// File Reader for Ublox log files
24class UbloxFile : public Node, public FileReader
25{
26 public:
27 /// @brief Default constructor
28 UbloxFile();
29 /// @brief Destructor
30 ~UbloxFile() override;
31 /// @brief Copy constructor
32 UbloxFile(const UbloxFile&) = delete;
33 /// @brief Move constructor
34 UbloxFile(UbloxFile&&) = delete;
35 /// @brief Copy assignment operator
36 UbloxFile& operator=(const UbloxFile&) = delete;
37 /// @brief Move assignment operator
39
40 /// @brief String representation of the Class Type
41 [[nodiscard]] static std::string typeStatic();
42
43 /// @brief String representation of the Class Type
44 [[nodiscard]] std::string type() const override;
45
46 /// @brief String representation of the Class Category
47 [[nodiscard]] static std::string category();
48
49 /// @brief ImGui config window which is shown on double click
50 /// @attention Don't forget to set _hasConfig to true in the constructor of the node
51 void guiConfig() override;
52
53 /// @brief Saves the node into a json object
54 [[nodiscard]] json save() const override;
55
56 /// @brief Restores the node from a json object
57 /// @param[in] j Json object with the node state
58 void restore(const json& j) override;
59
60 /// @brief Resets the node. Moves the read cursor to the start
61 bool resetNode() override;
62
63 private:
64 constexpr static size_t OUTPUT_PORT_INDEX_UBLOX_OBS = 0; ///< @brief Flow (UbloxObs)
65
66 /// @brief Initialize the node
67 bool initialize() override;
68
69 /// @brief Deinitialize the node
70 void deinitialize() override;
71
72 /// @brief Polls data from the file
73 /// @return The read observation
74 [[nodiscard]] std::shared_ptr<const NodeData> pollData();
75
76 /// @brief Determines the type of the file
77 /// @return The File Type
78 [[nodiscard]] FileType determineFileType() override;
79
80 /// Sensor Object
82
83 /// Last obs time
85};
86
87} // namespace NAV
Abstract File Reader class.
nlohmann::json json
json namespace
Node Class.
Class to read out Ublox Sensors.
FileType
File Type Enumeration.
FileReader(const FileReader &)=delete
Copy constructor.
The class is responsible for all time-related tasks.
Definition InsTime.hpp:710
Node(std::string name)
Constructor.
Definition Node.cpp:30
~UbloxFile() override
Destructor.
Definition UbloxFile.cpp:33
UbloxFile(UbloxFile &&)=delete
Move constructor.
static std::string typeStatic()
String representation of the Class Type.
Definition UbloxFile.cpp:38
void deinitialize() override
Deinitialize the node.
void guiConfig() override
ImGui config window which is shown on double click.
Definition UbloxFile.cpp:53
InsTime _lastObsTime
Last obs time.
Definition UbloxFile.hpp:84
vendor::ublox::UbloxUartSensor _sensor
Sensor Object.
Definition UbloxFile.hpp:81
std::string type() const override
String representation of the Class Type.
Definition UbloxFile.cpp:43
UbloxFile()
Default constructor.
Definition UbloxFile.cpp:22
static constexpr size_t OUTPUT_PORT_INDEX_UBLOX_OBS
Flow (UbloxObs)
Definition UbloxFile.hpp:64
std::shared_ptr< const NodeData > pollData()
Polls data from the file.
json save() const override
Saves the node into a json object.
Definition UbloxFile.cpp:70
static std::string category()
String representation of the Class Category.
Definition UbloxFile.cpp:48
FileType determineFileType() override
Determines the type of the file.
UbloxFile & operator=(UbloxFile &&)=delete
Move assignment operator.
void restore(const json &j) override
Restores the node from a json object.
Definition UbloxFile.cpp:81
UbloxFile & operator=(const UbloxFile &)=delete
Copy assignment operator.
bool resetNode() override
Resets the node. Moves the read cursor to the start.
bool initialize() override
Initialize the node.
Definition UbloxFile.cpp:91
UbloxFile(const UbloxFile &)=delete
Copy constructor.
Class to read out Ublox Sensors.