pub struct DatabaseProxy { /* private fields */ }
Expand description
A client to the Tango database.
Implementations§
Source§impl DatabaseProxy
impl DatabaseProxy
Sourcepub fn new() -> TangoResult<DatabaseProxy>
pub fn new() -> TangoResult<DatabaseProxy>
Connect to the database.
Note: this always uses the database referenced by the TANGO_HOST
environment variable.
Sourcepub fn get_device_exported(&self, name_filter: &str) -> TangoResult<DbDatum>
pub fn get_device_exported(&self, name_filter: &str) -> TangoResult<DbDatum>
Return a list of exported devices, filtered by the given name,
which can include *
as wildcard.
The return value will be a DbDatum
containing either
PropertyValue::Empty
or PropertyValue::StringArray
with the
device names.
Sourcepub fn get_device_exported_for_class(
&self,
class_name: &str,
) -> TangoResult<DbDatum>
pub fn get_device_exported_for_class( &self, class_name: &str, ) -> TangoResult<DbDatum>
Return a list of exported devices, for the given class.
The return value will be a DbDatum
containing either
PropertyValue::Empty
or PropertyValue::StringArray
with the
device names.
Sourcepub fn get_object_list(&self, name_filter: &str) -> TangoResult<DbDatum>
pub fn get_object_list(&self, name_filter: &str) -> TangoResult<DbDatum>
Return a list of objects for which free properties are defined,
considering the given name filter, which can include *
as a wildcard.
The return value will be a DbDatum
containing either
PropertyValue::Empty
or PropertyValue::StringArray
with the object
names.
Sourcepub fn get_object_property_list(
&self,
obj_name: &str,
name_filter: &str,
) -> TangoResult<DbDatum>
pub fn get_object_property_list( &self, obj_name: &str, name_filter: &str, ) -> TangoResult<DbDatum>
Return a list of free properties for the given object, considering the
given name filter, which can include *
as a wildcard.
The return value will be a DbDatum
containing either
PropertyValue::Empty
or PropertyValue::StringArray
with the property
names.
Sourcepub fn get_property(
&self,
obj_name: &str,
prop_list: Vec<DbDatum>,
) -> TangoResult<Vec<DbDatum>>
pub fn get_property( &self, obj_name: &str, prop_list: Vec<DbDatum>, ) -> TangoResult<Vec<DbDatum>>
Query the database for one or more free properties of the named object.
The value of the input DbDatum
s is ignored; in the output they contain
the property values.
Sourcepub fn put_property(
&mut self,
obj_name: &str,
prop_list: Vec<DbDatum>,
) -> TangoResult<()>
pub fn put_property( &mut self, obj_name: &str, prop_list: Vec<DbDatum>, ) -> TangoResult<()>
Update one or more free properties of the named object.
Sourcepub fn delete_property(
&mut self,
obj_name: &str,
prop_list: &[&str],
) -> TangoResult<()>
pub fn delete_property( &mut self, obj_name: &str, prop_list: &[&str], ) -> TangoResult<()>
Delete one or more free properties of the named object.