From f879a50989a35a2ba4886630164d71353a560c2e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 7 Jan 2011 10:03:46 -0800 Subject: uhd: create sensor value from string --- host/include/uhd/types/sensors.hpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'host/include') diff --git a/host/include/uhd/types/sensors.hpp b/host/include/uhd/types/sensors.hpp index e1a21e4c9..6f003bb40 100644 --- a/host/include/uhd/types/sensors.hpp +++ b/host/include/uhd/types/sensors.hpp @@ -85,6 +85,18 @@ namespace uhd{ const std::string &formatter = "%f" ); + /*! + * Create a sensor value from a string. + * \param name the name of the sensor + * \param value the real number value + * \param unit the associated unit type + */ + sensor_value_t( + const std::string &name, + const std::string &value, + const std::string &unit + ); + //! The name of the sensor value const std::string name; @@ -106,7 +118,8 @@ namespace uhd{ const enum{ BOOLEAN = 'b', INTEGER = 'i', - REALNUM = 'r' + REALNUM = 'r', + STRING = 's' } type; //! Convert this sensor value into a printable string -- cgit v1.2.3