Skip to content
Snippets Groups Projects
Commit bd15cd3b authored by Florent Langlois's avatar Florent Langlois
Browse files

add get_property method

parent 78e0ffcc
1 merge request!6[DeviceProxyHelper] add get_property method
......@@ -1608,6 +1608,32 @@ public:
}
}
//---------------------------------------------------------------------------
// DeviceProxyHelper::get_property
//---------------------------------------------------------------------------
template <typename C>
C get_property (const std::string& property_name, bool throw_exception_on_error = true)
{
try
{
try
{
Tango::DbData dev_prop;
dev_prop.push_back(Tango::DbDatum(property_name));
tango_proxy()->get_property(dev_prop);
C prop_val;
dev_prop[0] >> prop_val;
return prop_val;
}
_HANDLE_TANGO_DEVICE_EXCEPTION("get_property", "yat4tango::DeviceProxyHelper::get_property");
}
catch (...)
{
if ( throw_exception_on_error )
throw;
}
}
//---------------------------------------------------------------------------
// AttributeHelper::restore_properties_snapshot
//---------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment