8 #ifndef INCLUDED_UHD_TYPES_SENSORS_HPP 9 #define INCLUDED_UHD_TYPES_SENSORS_HPP 42 const std::string& utrue,
43 const std::string& ufalse);
54 const std::string& unit,
55 const std::string& formatter =
"%d");
66 const std::string& unit,
67 const std::string& formatter =
"%f");
76 const std::string& name,
const std::string& value,
const std::string& unit);
86 sensor_value_t(
const std::map<std::string, std::string>& sensor_dict);
95 bool to_bool(
void)
const;
98 signed to_int(
void)
const;
101 double to_real(
void)
const;
104 sensor_map_t to_map(
void)
const;
124 enum data_type_t { BOOLEAN =
'b', INTEGER =
'i', REALNUM =
'r', STRING =
's' };
130 std::string to_pp_string(
void)
const;
std::string value
Definition: sensors.hpp:114
data_type_t
Enumeration of possible data types in a sensor.
Definition: sensors.hpp:124
std::string name
The name of the sensor value.
Definition: sensors.hpp:107
Definition: build_info.hpp:13
Definition: sensors.hpp:29
#define UHD_API
Definition: config.h:68
std::map< std::string, std::string > sensor_map_t
Definition: sensors.hpp:31
std::string unit
Definition: sensors.hpp:121
data_type_t type
The data type of the value.
Definition: sensors.hpp:127