18 #ifndef INCLUDED_UHD_TYPES_SENSORS_H    19 #define INCLUDED_UHD_TYPES_SENSORS_H    28 struct uhd_sensor_value_t {
    31     std::string last_error;
    35 struct uhd_sensor_value_t;
    64     uhd_sensor_value_handle* h,
    81     uhd_sensor_value_handle* h,
    98     uhd_sensor_value_handle* h,
   102     const char* formatter
   114     uhd_sensor_value_handle* h,
   126     uhd_sensor_value_handle* h
   131     uhd_sensor_value_handle h,
   137     uhd_sensor_value_handle h,
   143     uhd_sensor_value_handle h,
   157     uhd_sensor_value_handle h,
   172     uhd_sensor_value_handle h,
   187     uhd_sensor_value_handle h,
   193     uhd_sensor_value_handle h,
   207     uhd_sensor_value_handle h,
   222     uhd_sensor_value_handle h,
 UHD_API uhd_error uhd_sensor_value_to_realnum(uhd_sensor_value_handle h, double *value_out)
Get the sensor's value as a real number. 
 
UHD_API uhd_error uhd_sensor_value_make_from_int(uhd_sensor_value_handle *h, const char *name, int value, const char *unit, const char *formatter)
Make a UHD sensor from an integer. 
 
UHD_API uhd_error uhd_sensor_value_last_error(uhd_sensor_value_handle h, char *error_out, size_t strbuffer_len)
Get the last error logged by the sensor handle. 
 
UHD_API uhd_error uhd_sensor_value_unit(uhd_sensor_value_handle h, char *unit_out, size_t strbuffer_len)
Get the sensor's unit. 
 
UHD_API uhd_error uhd_sensor_value_value(uhd_sensor_value_handle h, char *value_out, size_t strbuffer_len)
Get the sensor's value. 
 
UHD_API uhd_error uhd_sensor_value_make_from_string(uhd_sensor_value_handle *h, const char *name, const char *value, const char *unit)
Make a UHD sensor from a string. 
 
UHD_API uhd_error uhd_sensor_value_free(uhd_sensor_value_handle *h)
Free the given sensor handle. 
 
UHD_API uhd_error uhd_sensor_value_make_from_bool(uhd_sensor_value_handle *h, const char *name, bool value, const char *utrue, const char *ufalse)
Make a UHD sensor from a boolean. 
 
uhd_sensor_value_data_type_t
Sensor value types. 
Definition: sensors.h:47
 
UHD_API uhd_error uhd_sensor_value_data_type(uhd_sensor_value_handle h, uhd_sensor_value_data_type_t *data_type_out)
 
uhd_error
UHD error codes. 
Definition: error.h:31
 
Definition: sensors.hpp:38
 
UHD_API uhd_error uhd_sensor_value_to_pp_string(uhd_sensor_value_handle h, char *pp_string_out, size_t strbuffer_len)
Get a pretty-print representation of the given sensor. 
 
#define UHD_API
Definition: config.h:73
 
UHD_API uhd_error uhd_sensor_value_make_from_realnum(uhd_sensor_value_handle *h, const char *name, double value, const char *unit, const char *formatter)
Make a UHD sensor from a real number. 
 
struct uhd_sensor_value_t * uhd_sensor_value_handle
C-level interface for a UHD sensor. 
Definition: sensors.h:44
 
UHD_API uhd_error uhd_sensor_value_name(uhd_sensor_value_handle h, char *name_out, size_t strbuffer_len)
Get the sensor's name. 
 
UHD_API uhd_error uhd_sensor_value_to_int(uhd_sensor_value_handle h, int *value_out)
Get the sensor's value as an integer. 
 
UHD_API uhd_error uhd_sensor_value_to_bool(uhd_sensor_value_handle h, bool *value_out)
Get the sensor's value as a boolean.