Struct DeviceProxy

Source
pub struct DeviceProxy { /* private fields */ }
Expand description

A proxy to a remote Tango device.

Implementations§

Source§

impl DeviceProxy

Source

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.

Source

pub fn get_timeout(&self) -> TangoResult<i32>

Return the communication timeout in ms.

Source

pub fn set_timeout(&mut self, timeout: i32) -> TangoResult<()>

Set the communication timeout in ms.

Source

pub fn get_source(&self) -> TangoResult<DevSource>

Return the source used by command/attribute queries.

Source

pub fn set_source(&mut self, source: DevSource) -> TangoResult<()>

Set the source used by command/attribute queries.

Source

pub fn lock(&mut self) -> TangoResult<()>

Lock the device for use by other clients.

Source

pub fn unlock(&mut self) -> TangoResult<()>

Unlock the device.

Source

pub fn is_locked(&self) -> TangoResult<bool>

Query if the device is locked.

Source

pub fn is_locked_by_me(&self) -> TangoResult<bool>

Query if the device is locked by this client.

Source

pub fn locking_status(&self) -> TangoResult<String>

Return a human-readable description of the device’s lock status.

Source

pub fn command_query(&self, cmd_name: &str) -> TangoResult<CommandInfo>

Query information about a single command.

Source

pub fn command_list_query(&self) -> TangoResult<Vec<CommandInfo>>

Query information about all commands the device offers.

Source

pub fn command_inout( &mut self, cmd_name: &str, argin: CommandData, ) -> TangoResult<CommandData>

Execute a command on the device.

Source

pub fn get_attribute_list(&self) -> TangoResult<Vec<String>>

Query names of all attributes the device offers.

Source

pub fn get_attribute_config( &self, attr_names: &[&str], ) -> TangoResult<Vec<AttributeInfo>>

Query information about one or more attributes of the device.

Source

pub fn attribute_list_query(&self) -> TangoResult<Vec<AttributeInfo>>

Query information about all attributes of the device.

Source

pub fn read_attribute(&mut self, attr_name: &str) -> TangoResult<AttributeData>

Read a single attribute of the device.

Source

pub fn write_attribute(&mut self, attr_data: AttributeData) -> TangoResult<()>

Write a single attribute of the device.

Source

pub fn read_attributes( &mut self, attr_names: &[&str], ) -> TangoResult<Vec<AttributeData>>

Read one or more attributes of the device.

Source

pub fn write_attributes( &mut self, attr_data: Vec<AttributeData>, ) -> TangoResult<()>

Write one or more attributes of the device.

Source

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 DbDatums are ignored.

Source

pub fn put_device_property( &mut self, prop_list: Vec<DbDatum>, ) -> TangoResult<()>

Set one or more properties of the device.

Source

pub fn delete_device_property(&mut self, prop_list: &[&str]) -> TangoResult<()>

Delete one or more properties of the device.

Trait Implementations§

Source§

impl Drop for DeviceProxy

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.