0.4.1
Loading...
Searching...
No Matches
WiFiObsFile.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 WiFiObsFile.hpp
10/// @brief WiFiObs File Reader
11/// @author R. Lintz (r-lintz@gmx.de) (master thesis)
12/// @author T. Topp (topp@ins.uni-stuttgart.de)
13/// @date 2023-05-23
14
15#pragma once
16
19
20namespace NAV
21{
22/// File Reader for Imu log files
23class WiFiObsFile : public Node, public FileReader
24{
25 public:
26 /// @brief Default constructor
28 /// @brief Destructor
29 ~WiFiObsFile() override;
30 /// @brief Copy constructor
31 WiFiObsFile(const WiFiObsFile&) = delete;
32 /// @brief Move constructor
34 /// @brief Copy assignment operator
36 /// @brief Move assignment operator
38
39 /// @brief String representation of the Class Type
40 [[nodiscard]] static std::string typeStatic();
41
42 /// @brief String representation of the Class Type
43 [[nodiscard]] std::string type() const override;
44
45 /// @brief String representation of the Class Category
46 [[nodiscard]] static std::string category();
47
48 /// @brief ImGui config window which is shown on double click
49 /// @attention Don't forget to set _hasConfig to true in the constructor of the node
50 void guiConfig() override;
51
52 /// @brief Saves the node into a json object
53 [[nodiscard]] json save() const override;
54
55 /// @brief Restores the node from a json object
56 /// @param[in] j Json object with the node state
57 void restore(const json& j) override;
58
59 /// @brief Resets the node. Moves the read cursor to the start
60 bool resetNode() override;
61
62 private:
63 constexpr static size_t OUTPUT_PORT_INDEX_WiFiObs_OBS = 0; ///< @brief Flow (WiFiObs)
64 constexpr static size_t OUTPUT_PORT_INDEX_HEADER_COLUMNS = 1; ///< @brief Object (std::vector<std::string>)
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
77} // namespace NAV
Abstract File Reader class.
nlohmann::json json
json namespace
Node Class.
FileReader(const FileReader &)=delete
Copy constructor.
Node(std::string name)
Constructor.
Definition Node.cpp:30
static constexpr size_t OUTPUT_PORT_INDEX_WiFiObs_OBS
Flow (WiFiObs)
WiFiObsFile(const WiFiObsFile &)=delete
Copy constructor.
WiFiObsFile & operator=(WiFiObsFile &&)=delete
Move assignment operator.
std::shared_ptr< const NodeData > pollData()
Polls data from the file.
json save() const override
Saves the node into a json object.
void deinitialize() override
Deinitialize the node.
static constexpr size_t OUTPUT_PORT_INDEX_HEADER_COLUMNS
Object (std::vector<std::string>)
WiFiObsFile()
Default constructor.
bool initialize() override
Initialize the node.
WiFiObsFile & operator=(const WiFiObsFile &)=delete
Copy assignment operator.
void restore(const json &j) override
Restores the node from a json object.
std::string type() const override
String representation of the Class Type.
WiFiObsFile(WiFiObsFile &&)=delete
Move constructor.
void guiConfig() override
ImGui config window which is shown on double click.
static std::string typeStatic()
String representation of the Class Type.
bool resetNode() override
Resets the node. Moves the read cursor to the start.
static std::string category()
String representation of the Class Category.
~WiFiObsFile() override
Destructor.