pub struct DeviceProxy { /* private fields */ }
Expand description
A proxy to a remote Tango device.
Implementations§
Source§impl DeviceProxy
impl DeviceProxy
Sourcepub fn new(address: &str) -> TangoResult<DeviceProxy>
pub fn new(address: &str) -> TangoResult<DeviceProxy>
Connect to the Tango device.
Address can either be in the form a/b/c
or the long form
tango://db_host:db_port/a/b/c
.
Sourcepub fn get_timeout(&self) -> TangoResult<i32>
pub fn get_timeout(&self) -> TangoResult<i32>
Return the communication timeout in ms.
Sourcepub fn set_timeout(&mut self, timeout: i32) -> TangoResult<()>
pub fn set_timeout(&mut self, timeout: i32) -> TangoResult<()>
Set the communication timeout in ms.
Sourcepub fn get_source(&self) -> TangoResult<DevSource>
pub fn get_source(&self) -> TangoResult<DevSource>
Return the source used by command/attribute queries.
Sourcepub fn set_source(&mut self, source: DevSource) -> TangoResult<()>
pub fn set_source(&mut self, source: DevSource) -> TangoResult<()>
Set the source used by command/attribute queries.
Sourcepub fn lock(&mut self) -> TangoResult<()>
pub fn lock(&mut self) -> TangoResult<()>
Lock the device for use by other clients.
Sourcepub fn unlock(&mut self) -> TangoResult<()>
pub fn unlock(&mut self) -> TangoResult<()>
Unlock the device.
Sourcepub fn is_locked(&self) -> TangoResult<bool>
pub fn is_locked(&self) -> TangoResult<bool>
Query if the device is locked.
Sourcepub fn is_locked_by_me(&self) -> TangoResult<bool>
pub fn is_locked_by_me(&self) -> TangoResult<bool>
Query if the device is locked by this client.
Sourcepub fn locking_status(&self) -> TangoResult<String>
pub fn locking_status(&self) -> TangoResult<String>
Return a human-readable description of the device’s lock status.
Sourcepub fn command_query(&self, cmd_name: &str) -> TangoResult<CommandInfo>
pub fn command_query(&self, cmd_name: &str) -> TangoResult<CommandInfo>
Query information about a single command.
Sourcepub fn command_list_query(&self) -> TangoResult<Vec<CommandInfo>>
pub fn command_list_query(&self) -> TangoResult<Vec<CommandInfo>>
Query information about all commands the device offers.
Sourcepub fn command_inout(
&mut self,
cmd_name: &str,
argin: CommandData,
) -> TangoResult<CommandData>
pub fn command_inout( &mut self, cmd_name: &str, argin: CommandData, ) -> TangoResult<CommandData>
Execute a command on the device.
Sourcepub fn get_attribute_list(&self) -> TangoResult<Vec<String>>
pub fn get_attribute_list(&self) -> TangoResult<Vec<String>>
Query names of all attributes the device offers.
Sourcepub fn get_attribute_config(
&self,
attr_names: &[&str],
) -> TangoResult<Vec<AttributeInfo>>
pub fn get_attribute_config( &self, attr_names: &[&str], ) -> TangoResult<Vec<AttributeInfo>>
Query information about one or more attributes of the device.
Sourcepub fn attribute_list_query(&self) -> TangoResult<Vec<AttributeInfo>>
pub fn attribute_list_query(&self) -> TangoResult<Vec<AttributeInfo>>
Query information about all attributes of the device.
Sourcepub fn read_attribute(&mut self, attr_name: &str) -> TangoResult<AttributeData>
pub fn read_attribute(&mut self, attr_name: &str) -> TangoResult<AttributeData>
Read a single attribute of the device.
Sourcepub fn write_attribute(&mut self, attr_data: AttributeData) -> TangoResult<()>
pub fn write_attribute(&mut self, attr_data: AttributeData) -> TangoResult<()>
Write a single attribute of the device.
Sourcepub fn read_attributes(
&mut self,
attr_names: &[&str],
) -> TangoResult<Vec<AttributeData>>
pub fn read_attributes( &mut self, attr_names: &[&str], ) -> TangoResult<Vec<AttributeData>>
Read one or more attributes of the device.
Sourcepub fn write_attributes(
&mut self,
attr_data: Vec<AttributeData>,
) -> TangoResult<()>
pub fn write_attributes( &mut self, attr_data: Vec<AttributeData>, ) -> TangoResult<()>
Write one or more attributes of the device.
Sourcepub fn get_device_property(
&self,
prop_list: Vec<DbDatum>,
) -> TangoResult<Vec<DbDatum>>
pub fn get_device_property( &self, prop_list: Vec<DbDatum>, ) -> TangoResult<Vec<DbDatum>>
Return the value of one or more properties of the device.
The values in the input DbDatum
s are ignored.
Sourcepub fn put_device_property(
&mut self,
prop_list: Vec<DbDatum>,
) -> TangoResult<()>
pub fn put_device_property( &mut self, prop_list: Vec<DbDatum>, ) -> TangoResult<()>
Set one or more properties of the device.
Sourcepub fn delete_device_property(&mut self, prop_list: &[&str]) -> TangoResult<()>
pub fn delete_device_property(&mut self, prop_list: &[&str]) -> TangoResult<()>
Delete one or more properties of the device.