Arv

Arv — Device discovery and instantiation

Functions

void arv_update_device_list ()
unsigned int arv_get_n_devices ()
const char * arv_get_device_id ()
const char * arv_get_device_physical_id ()
const char * arv_get_device_model ()
const char * arv_get_device_serial_nbr ()
const char * arv_get_device_vendor ()
const char * arv_get_device_manufacturer_info ()
const char * arv_get_device_address ()
const char * arv_get_device_protocol ()
ArvDevice * arv_open_device ()
unsigned int arv_get_n_interfaces ()
const char * arv_get_interface_id ()
void arv_disable_interface ()
void arv_enable_interface ()
void arv_shutdown ()

Description

This module contans a set of APIs that allows to list and enable/disable the available interfaces, and list and instantiate devices.

Functions

arv_update_device_list ()

void
arv_update_device_list (void);

Updates the list of currently online devices.


arv_get_n_devices ()

unsigned int
arv_get_n_devices (void);

Retrieves the number of currently online devices. This value is valid until the next call to arv_update_device_list().

Returns

The number of currently online devices.


arv_get_device_id ()

const char *
arv_get_device_id (unsigned int index);

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

Parameters

index

device index

 

Returns

a unique device id

Since: 0.2.0


arv_get_device_physical_id ()

const char *
arv_get_device_physical_id (unsigned int index);

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 arv_update_device_list() function must be called.

Parameters

index

device index

 

Returns

a physical device id

Since: 0.2.0


arv_get_device_model ()

const char *
arv_get_device_model (unsigned int index);

Queries the device model.

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

Parameters

index

device index

 

Returns

the device model, NULL on error.

[transfer none]

Since: 0.6.0


arv_get_device_serial_nbr ()

const char *
arv_get_device_serial_nbr (unsigned int index);

Queries the device serial.

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

Parameters

index

device index

 

Returns

the device serial, NULL on error.

[transfer none]

Since: 0.6.0


arv_get_device_vendor ()

const char *
arv_get_device_vendor (unsigned int index);

Queries the device vendor.

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

Parameters

index

device index

 

Returns

the device vendor, NULL on error.

[transfer none]

Since: 0.6.0


arv_get_device_manufacturer_info ()

const char *
arv_get_device_manufacturer_info (unsigned int index);

Queries the device manufacturer info.

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

Parameters

index

device index

 

Returns

the device manufacturer info, NULL on error.

[transfer none]

Since: 0.8.20


arv_get_device_address ()

const char *
arv_get_device_address (unsigned int index);

The index of a device may change after a call to arv_update_device_list().

Parameters

index

device index

 

Returns

The address of the device corresponding to index as a string.

Since: 0.6.0


arv_get_device_protocol ()

const char *
arv_get_device_protocol (unsigned int index);

The index of a device may change after a call to arv_update_device_list().

Parameters

index

device index

 

Returns

The device protocol as a string.

Since: 0.6.0


arv_open_device ()

ArvDevice *
arv_open_device (const char *device_id,
                 GError **error);

Open a device corresponding to the given identifier. A NULL string makes this function return the first available device.

Parameters

device_id

a device identifier string.

[allow-none]

error

a GError placeholder, NULL to ignore

 

Returns

A new ArvDevice instance.

[transfer full]

Since: 0.8.0


arv_get_n_interfaces ()

unsigned int
arv_get_n_interfaces (void);

Gets the number of available interfaces, including the disabled ones.

Returns

The number of available interfaces.


arv_get_interface_id ()

const char *
arv_get_interface_id (unsigned int index);

Retrieves the interface identifier. Possible values are 'Fake', 'USB3Vision' and 'GigEVision'.

Parameters

index

interface index

 

Returns

The interfae identifier string.


arv_disable_interface ()

void
arv_disable_interface (const char *interface_id);

Disable an interface by name. By default, all interfaces are enabled, except 'Fake'.

Parameters

interface_id

name of the interface

 

arv_enable_interface ()

void
arv_enable_interface (const char *interface_id);

Enable an interface by name. By default, all interfaces are enabled, except 'Fake'.

Parameters

interface_id

name of the interface

 

arv_shutdown ()

void
arv_shutdown (void);

Frees a number of ressources allocated by Aravis that would be otherwise reported as memory leak by tools like Valgrind. The call to this function is optional if you don't intend to check for memory leaks.