mars_lib  0.1.0.3dc76ee85e09
Modular and Robust Sensor-Fusion
empty_measurement_type.h
Go to the documentation of this file.
1 // Copyright (C) 2022 Christian Brommer, Control of Networked Systems, University of Klagenfurt, Austria.
2 //
3 // All rights reserved.
4 //
5 // This software is licensed under the terms of the BSD-2-Clause-License with
6 // no commercial use allowed, the full terms of which are made available
7 // in the LICENSE file. No license in patents is granted.
8 //
9 // You can contact the author at <christian.brommer@ieee.org>
10 
11 #ifndef EMPTYMEASUREMENTTYPE_H
12 #define EMPTYMEASUREMENTTYPE_H
13 
15 #include <utility>
16 
17 namespace mars
18 {
20 {
21 public:
22  double value_;
23 
24  EmptyMeasurementType(const double& value) : value_(value)
25  {
26  }
27 
28  static std::string get_csv_state_header_string()
29  {
30  std::stringstream os;
31  os << "t, ";
32  os << "value";
33 
34  return os.str();
35  }
36 
37  std::string to_csv_string(const double& timestamp) const
38  {
39  std::stringstream os;
40  os.precision(17);
41  os << timestamp;
42 
43  os << ", " << value_;
44 
45  return os.str();
46  }
47 };
48 } // namespace mars
49 #endif // EMPTYMEASUREMENTTYPE_H
Definition: measurement_base_class.h:20
Definition: empty_measurement_type.h:20
static std::string get_csv_state_header_string()
Definition: empty_measurement_type.h:28
double value_
Definition: empty_measurement_type.h:22
std::string to_csv_string(const double &timestamp) const
Definition: empty_measurement_type.h:37
EmptyMeasurementType(const double &value)
Definition: empty_measurement_type.h:24
Definition: buffer.h:27