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
Trait containing all Interface
methods.
Implementors
Required Methods§
sourcefn device_address(&self, index: u32) -> Option<GString>
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
sourcefn device_id(&self, index: u32) -> Option<GString>
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
sourcefn device_manufacturer_info(&self, index: u32) -> Option<GString>
fn device_manufacturer_info(&self, index: u32) -> Option<GString>
v0_8_20
only.sourcefn device_model(&self, index: u32) -> Option<GString>
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
sourcefn device_physical_id(&self, index: u32) -> Option<GString>
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
sourcefn device_protocol(&self, index: u32) -> Option<GString>
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
sourcefn device_serial_nbr(&self, index: u32) -> Option<GString>
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
sourcefn device_vendor(&self, index: u32) -> Option<GString>
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
sourcefn n_devices(&self) -> u32
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
sourcefn update_device_list(&self)
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.