Trait aravis::InterfaceExt

source ·
pub trait InterfaceExt: 'static {
    // Required methods
    fn device_address(&self, index: u32) -> Option<GString>;
    fn device_id(&self, index: u32) -> Option<GString>;
    fn device_manufacturer_info(&self, index: u32) -> Option<GString>;
    fn device_model(&self, index: u32) -> Option<GString>;
    fn device_physical_id(&self, index: u32) -> Option<GString>;
    fn device_protocol(&self, index: u32) -> Option<GString>;
    fn device_serial_nbr(&self, index: u32) -> Option<GString>;
    fn device_vendor(&self, index: u32) -> Option<GString>;
    fn n_devices(&self) -> u32;
    fn open_device(&self, device_id: Option<&str>) -> Result<Device, Error>;
    fn update_device_list(&self);
}
Expand description

Required Methods§

source

fn device_address(&self, index: u32) -> Option<GString>

queries the device address (IP address in the case of an ethernet camera). Useful for constructing manual connections to devices using GvDevice::new()

Prior to this call the update_device_list() function must be called.

index

device index

Returns

the device address

source

fn device_id(&self, index: u32) -> Option<GString>

Queries the unique device id corresponding to index. Prior to this call the update_device_list() function must be called.

index

device index

Returns

a unique device id

source

fn device_manufacturer_info(&self, index: u32) -> Option<GString>

Available on crate feature v0_8_20 only.
source

fn device_model(&self, index: u32) -> Option<GString>

Queries the device model.

Prior to this call the update_device_list() function must be called.

index

device index

Returns

the device model, NULL on error

source

fn device_physical_id(&self, index: u32) -> Option<GString>

Queries the physical device id corresponding to index such as the MAC address for Ethernet based devices, bus id for PCI, USB or Firewire based devices.

Prior to this call the update_device_list() function must be called.

index

device index

Returns

a physical device id

source

fn device_protocol(&self, index: u32) -> Option<GString>

Queries the device protocol. Possible values are ‘USB3Vision’, ‘GigEVision’ and ‘Fake’.

Prior to this call the update_device_list() function must be called.

index

device index

Returns

the device protocol as a string, NULL on error

source

fn device_serial_nbr(&self, index: u32) -> Option<GString>

Queries the device serial.

Prior to this call the update_device_list() function must be called.

index

device index

Returns

the device serial, NULL on error

source

fn device_vendor(&self, index: u32) -> Option<GString>

Queries the device vendor.

Prior to this call the update_device_list() function must be called.

index

device index

Returns

the device vendor, NULL on error

source

fn n_devices(&self) -> u32

Queries the number of available devices on this interface. Prior to this call the update_device_list() function must be called. The list content will not change until the next call of the update function.

Returns

the number of available devices

source

fn open_device(&self, device_id: Option<&str>) -> Result<Device, Error>

Creates a new Device object corresponding to the given device id string. The first available device is returned if device_id is None.

device_id

device unique id

Returns

a new Device

source

fn update_device_list(&self)

Updates the internal list of available devices. This may change the connection between a list index and a device ID.

Implementors§