0.4.1
Loading...
Searching...
No Matches
EmlidFile.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 EmlidFile.hpp
10/// @brief File Reader for Emlid log files
11/// @author T. Topp (topp@ins.uni-stuttgart.de)
12/// @date 2020-06-23
13
14#pragma once
15
18
20
21namespace NAV
22{
23/// File Reader for Emlid log files
24class EmlidFile : public Node, public FileReader
25{
26 public:
27 /// @brief Default constructor
28 EmlidFile();
29 /// @brief Destructor
30 ~EmlidFile() override;
31 /// @brief Copy constructor
32 EmlidFile(const EmlidFile&) = delete;
33 /// @brief Move constructor
34 EmlidFile(EmlidFile&&) = delete;
35 /// @brief Copy assignment operator
36 EmlidFile& operator=(const EmlidFile&) = 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_EMLID_OBS = 0; ///< @brief Flow (EmlidObs)
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
84} // namespace NAV
Class to read out Emlid Sensors.
Abstract File Reader class.
nlohmann::json json
json namespace
Node Class.
EmlidFile()
Default constructor.
Definition EmlidFile.cpp:22
bool resetNode() override
Resets the node. Moves the read cursor to the start.
void deinitialize() override
Deinitialize the node.
Definition EmlidFile.cpp:98
bool initialize() override
Initialize the node.
Definition EmlidFile.cpp:91
static std::string typeStatic()
String representation of the Class Type.
Definition EmlidFile.cpp:38
EmlidFile & operator=(const EmlidFile &)=delete
Copy assignment operator.
~EmlidFile() override
Destructor.
Definition EmlidFile.cpp:33
static constexpr size_t OUTPUT_PORT_INDEX_EMLID_OBS
Flow (EmlidObs)
Definition EmlidFile.hpp:64
void guiConfig() override
ImGui config window which is shown on double click.
Definition EmlidFile.cpp:53
FileType determineFileType() override
Determines the type of the file.
std::shared_ptr< const NodeData > pollData()
Polls data from the file.
vendor::emlid::EmlidUartSensor _sensor
Sensor Object.
Definition EmlidFile.hpp:81
EmlidFile(EmlidFile &&)=delete
Move constructor.
EmlidFile & operator=(EmlidFile &&)=delete
Move assignment operator.
EmlidFile(const EmlidFile &)=delete
Copy constructor.
void restore(const json &j) override
Restores the node from a json object.
Definition EmlidFile.cpp:81
json save() const override
Saves the node into a json object.
Definition EmlidFile.cpp:70
std::string type() const override
String representation of the Class Type.
Definition EmlidFile.cpp:43
static std::string category()
String representation of the Class Category.
Definition EmlidFile.cpp:48
FileType
File Type Enumeration.
FileReader(const FileReader &)=delete
Copy constructor.
Node(std::string name)
Constructor.
Definition Node.cpp:30
Class to read out Emlid Sensors.