Aravis.Device¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Signal that the control of the device is lost. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Aravis.Device(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
Aravis.Deviceis an abstract base class for the control of cameras. It provides an easy access to the camera settings, and to its genicam interface for more advanced uses.- create_chunk_parser()¶
- Returns:
a new
Aravis.ChunkParserobject,Noneon error.- Return type:
Create a
Aravis.ChunkParserobject, to be used for chunk data extraction fromAravis.Buffer.Added in version 0.4.0.
- create_stream(callback, *user_data)¶
- Parameters:
callback (
Aravis.StreamCallback) – a frame processing callback
- Raises:
- Returns:
a new
Aravis.Stream.- Return type:
Creates a new
Aravis.Streamfor video stream handling. See ArvStreamCallback for details regarding the callback function.Added in version 0.8.23.
- dup_available_enumeration_feature_values(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
a newly created array of 64 bit integers, which must freed after use using
GLib.free, orNoneon error.- Return type:
[
int]
Get all the available values of feature, as integers.
Added in version 0.8.0.
- dup_available_enumeration_feature_values_as_display_names(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
a newly created array of const strings, to be freed after use using
GLib.free, orNoneon error.- Return type:
[
str]
Get display names of all the available entries of feature.
Added in version 0.8.0.
- dup_available_enumeration_feature_values_as_strings(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
a newly created array of const strings, which must freed after use using
GLib.free, orNoneon error.- Return type:
[
str]
Get all the available values of feature, as strings.
Added in version 0.8.0.
- dup_register_feature_value(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
the register feature content, must be freed using [func`GLib`.free].
- length:
register length
- Return type:
Added in version 0.8.31.
- execute_command(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
Execute a genicam command.
Added in version 0.8.0.
- get_boolean_feature_value(feature)¶
-
Get the feature value, or
Falseon error.Added in version 0.8.0.
- get_feature(feature)¶
- Parameters:
feature (
str) – feature name- Returns:
the genicam node corresponding to the feature name,
Noneif not found.- Return type:
Added in version 0.2.0.
- get_feature_access_mode(feature)¶
- Parameters:
feature (
str) – feature name- Returns:
The actual feature access mode, which is a combination of ImposedAccessMode property and actual register access mode.
- Return type:
Added in version 0.8.22.
- get_feature_representation(feature)¶
- Parameters:
feature (
str) – feature name- Returns:
enum
Aravis.GcRepresentation,Aravis.GcRepresentation.UNDEFINEDif not available.- Return type:
Added in version 0.8.31.
- get_feature_value(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
a uninitialized
GObject.Valueplaceholder- Return type:
value:
GObject.Value
Get the value of a feature. Enumeration values are returned as strings.
Added in version 0.8.32.
- get_float_feature_bounds(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
- min:
minimum feature value
- max:
maximum feature value
- Return type:
Retrieves feature bounds.
Added in version 0.8.0.
- get_float_feature_increment(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
feature value increment, or
GObject.G_MINDOUBLEon error.- Return type:
Not all float features have evenly distributed allowed values, which means the returned increment may not reflect the allowed value set.
Added in version 0.8.16.
- get_float_feature_value(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
the float feature value, 0.0 on error.
- Return type:
Added in version 0.8.0.
- get_genicam()¶
- Returns:
the genicam interface.
- Return type:
Retrieves the genicam interface of the given device.
Added in version 0.2.0.
- get_genicam_xml()¶
- Returns:
a pointer to the Genicam XML data, owned by the device.
- size:
placeholder for the returned data size (bytes)
- Return type:
Gets the Genicam XML data stored in the device memory.
Added in version 0.2.0.
- get_integer_feature_bounds(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
- min:
minimum feature value
- max:
maximum feature value
- Return type:
Retrieves feature bounds.
Added in version 0.8.0.
- get_integer_feature_increment(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
feature value increment, or 1 on error.
- Return type:
Not all integer features have evenly distributed allowed values, which means the returned increment may not reflect the allowed value set.
Added in version 0.8.0.
- get_integer_feature_value(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
the integer feature value, 0 on error.
- Return type:
Added in version 0.8.0.
- get_string_feature_value(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
the string feature value,
Noneon error.- Return type:
Added in version 0.8.0.
- is_enumeration_entry_available(feature, entry)¶
- Parameters:
- Raises:
- Returns:
Trueif the feature and the feature entry are available- Return type:
Added in version 0.8.17.
- is_feature_available(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
- Return type:
Added in version 0.8.0.
- is_feature_implemented(feature)¶
- Parameters:
feature (
str) – feature name- Raises:
- Returns:
- Return type:
Added in version 0.8.23.
- read_memory(address, size)¶
- Parameters:
- Raises:
- Returns:
a new [class`Glib`.ByteArray),
Noneon error- Return type:
Reads size bytes from the device memory.
Added in version 0.8.36.
- read_register(address)¶
- Parameters:
address (
int) – register address- Raises:
- Returns:
Trueon success.- value:
a placeholder for the read value
- Return type:
Reads the value of a device register.
Added in version 0.2.0.
- set_access_check_policy(policy)¶
- Parameters:
policy (
Aravis.AccessCheckPolicy) – access check policy
Sets the feature access check policy. When enabled, before being accessed, the actual read/write access of register is checked using AccessMode properties. On some devices, it helps to avoid forbidden writes to registers that may put the device in a bad state.
Access check is disabled by default.
Added in version 0.8.22.
- set_boolean_feature_value(feature, value)¶
- Parameters:
- Raises:
Set the value of a boolean feature.
Added in version 0.8.0.
- set_feature_value(feature, value)¶
- Parameters:
feature (
str) – feature namevalue (
GObject.Value) – aGObject.Value
- Raises:
Set value of a feature.
Added in version 0.8.32.
- set_features_from_string(string)¶
- Parameters:
string (
str) – a space separated list of features assignments- Raises:
- Return type:
Set features from a string containing a list of space separated feature assignments or command names. For example:
arv_device_set_features_from_string (device, "Width=256 Height=256 PixelFormat='Mono8' TriggerStart", &error);Added in version 0.8.0.
- set_float_feature_value(feature, value)¶
- Parameters:
- Raises:
Set the float feature value.
Added in version 0.8.0.
- set_integer_feature_value(feature, value)¶
- Parameters:
- Raises:
Set the integer feature value.
Added in version 0.8.0.
- set_range_check_policy(policy)¶
- Parameters:
policy (
Aravis.RangeCheckPolicy) – range check policy
Sets the range check policy. When enabled, before being set, the value of all nodes with an
Aravis.GcFloatorAravis.GcIntegerinterface will be checked against their Min and Max properties.Be aware that some camera may have wrong definition of Min and Max, as this check is defined as not mandatory in the Genicam specification. If this is the case, it will not possible to set the value of the features with faulty Min or Max definition. Range check is disabled by default.
Added in version 0.8.6.
- set_register_cache_policy(policy)¶
- Parameters:
policy (
Aravis.RegisterCachePolicy) – cache policy
Sets the register cache policy.
Be aware that some camera may have wrong Cachable properties defined in their Genicam metadata, which may lead to incorrect readouts. Using the debug cache policy, and activating genicam debug output (export ARV_DEBUG=genicam), can help you to check the cache validity. In this mode, every time the cache content is not in sync with the actual register value, a debug message is printed on the console.
Added in version 0.8.0.
- set_register_feature_value(feature, length, value)¶
- Parameters:
- Raises:
Set the register feature value.
- set_string_feature_value(feature, value)¶
- Parameters:
- Raises:
Set the string feature value.
Added in version 0.8.0.
- write_memory(address, bytes)¶
- Parameters:
- Raises:
- Returns:
- Return type:
Writes bytes to the device memory.
Added in version 0.8.36.
- write_register(address, value)¶
- Parameters:
- Raises:
- Returns:
Trueon success.- Return type:
Writes value to a device register.
Added in version 0.2.0.
- do_control_lost() virtual¶
- do_get_genicam() virtual¶
- Returns:
the genicam interface.
- Return type:
Retrieves the genicam interface of the given device.
Added in version 0.2.0.
- do_get_genicam_xml() virtual¶
- Returns:
a pointer to the Genicam XML data, owned by the device.
- size:
placeholder for the returned data size (bytes)
- Return type:
Gets the Genicam XML data stored in the device memory.
Added in version 0.2.0.
- do_read_memory(address) virtual¶
- Parameters:
address (
int) – memory address- Returns:
Trueon success,Falseif an error occurred- buffer:
a buffer for the storage of the read data
- Return type:
Reads size bytes from the device memory.
Added in version 0.2.0.
- do_read_register(address) virtual¶
- Parameters:
address (
int) – register address- Returns:
Trueon success.- value:
a placeholder for the read value
- Return type:
Reads the value of a device register.
Added in version 0.2.0.
- do_write_memory(address, buffer) virtual¶
- Parameters:
- Returns:
- Return type:
Writes size bytes to the device memory.
Added in version 0.2.0.
Signal Details¶
- Aravis.Device.signals.control_lost(device)¶
- Signal Name:
control-lost- Flags:
- Parameters:
device (
Aravis.Device) – The object which received the signal
Signal that the control of the device is lost.
This signal may be emited from a thread different than the main one, so please take care to shared data access from the callback.
Added in version 0.2.0.