Trait aravis::DeviceExt

source ·
pub trait DeviceExt: 'static {
Show 30 methods // Required methods fn create_chunk_parser(&self) -> Option<ChunkParser>; fn dup_available_enumeration_feature_values( &self, feature: &str ) -> Result<Vec<i64>, Error>; fn dup_available_enumeration_feature_values_as_display_names( &self, feature: &str ) -> Result<Vec<GString>, Error>; fn dup_available_enumeration_feature_values_as_strings( &self, feature: &str ) -> Result<Vec<GString>, Error>; fn execute_command(&self, feature: &str) -> Result<(), Error>; fn boolean_feature_value(&self, feature: &str) -> Result<bool, Error>; fn feature(&self, feature: &str) -> Option<GcNode>; fn feature_access_mode(&self, feature: &str) -> GcAccessMode; fn float_feature_bounds(&self, feature: &str) -> Result<(f64, f64), Error>; fn float_feature_increment(&self, feature: &str) -> Result<f64, Error>; fn float_feature_value(&self, feature: &str) -> Result<f64, Error>; fn genicam(&self) -> Option<Gc>; fn genicam_xml(&self) -> (GString, usize); fn integer_feature_bounds(&self, feature: &str) -> Result<(i64, i64), Error>; fn integer_feature_increment(&self, feature: &str) -> Result<i64, Error>; fn integer_feature_value(&self, feature: &str) -> Result<i64, Error>; fn string_feature_value(&self, feature: &str) -> Result<GString, Error>; fn is_enumeration_entry_available( &self, feature: &str, entry: &str ) -> Result<(), Error>; fn is_feature_available(&self, feature: &str) -> Result<bool, Error>; fn read_register(&self, address: u64) -> Result<(bool, u32), Error>; fn set_access_check_policy(&self, policy: AccessCheckPolicy); fn set_boolean_feature_value( &self, feature: &str, value: bool ) -> Result<(), Error>; fn set_features_from_string(&self, string: &str) -> Result<(), Error>; fn set_float_feature_value( &self, feature: &str, value: f64 ) -> Result<(), Error>; fn set_integer_feature_value( &self, feature: &str, value: i64 ) -> Result<(), Error>; fn set_range_check_policy(&self, policy: RangeCheckPolicy); fn set_register_cache_policy(&self, policy: RegisterCachePolicy); fn set_string_feature_value( &self, feature: &str, value: &str ) -> Result<(), Error>; fn write_register(&self, address: u64, value: u32) -> Result<bool, Error>; fn connect_control_lost<F: Fn(&Self) + Send + 'static>( &self, f: F ) -> SignalHandlerId;
}
Expand description

Trait containing all Device methods.

Implementors

Device, FakeDevice, GvDevice, UvDevice

Required Methods§

source

fn create_chunk_parser(&self) -> Option<ChunkParser>

Create a ChunkParser object, to be used for chunk data extraction from Buffer.

Returns

a new ChunkParser object, NULL on error.

source

fn dup_available_enumeration_feature_values( &self, feature: &str ) -> Result<Vec<i64>, Error>

Get all the available values of feature, as integers.

feature

feature name

Returns

a newly created array of 64 bit integers, which must freed after use using g_free, or NULL on error.

source

fn dup_available_enumeration_feature_values_as_display_names( &self, feature: &str ) -> Result<Vec<GString>, Error>

Get display names of all the available entries of feature.

feature

feature name

Returns

a newly created array of const strings, to be freed after use using g_free, or None on error.

source

fn dup_available_enumeration_feature_values_as_strings( &self, feature: &str ) -> Result<Vec<GString>, Error>

Get all the available values of feature, as strings.

feature

feature name

Returns

a newly created array of const strings, which must freed after use using g_free, or NULL on error.

source

fn execute_command(&self, feature: &str) -> Result<(), Error>

Execute a genicam command.

feature

feature name

source

fn boolean_feature_value(&self, feature: &str) -> Result<bool, Error>

feature

feature name

Returns

the feature value, false on error.

source

fn feature(&self, feature: &str) -> Option<GcNode>

feature

feature name

Returns

the genicam node corresponding to the feature name, NULL if not found.

source

fn feature_access_mode(&self, feature: &str) -> GcAccessMode

Available on crate feature v0_8_22 only.
source

fn float_feature_bounds(&self, feature: &str) -> Result<(f64, f64), Error>

Retrieves feature bounds.

feature

feature name

Returns
min

minimum feature value

max

maximum feature value

source

fn float_feature_increment(&self, feature: &str) -> Result<f64, Error>

Available on crate feature v0_8_16 only.
source

fn float_feature_value(&self, feature: &str) -> Result<f64, Error>

feature

feature name

Returns

the float feature value, 0.0 on error.

source

fn genicam(&self) -> Option<Gc>

Retrieves the genicam interface of the given device.

Returns

the genicam interface.

source

fn genicam_xml(&self) -> (GString, usize)

Gets the Genicam XML data stored in the device memory.

Returns

a pointer to the Genicam XML data, owned by the device.

size

placeholder for the returned data size (bytes)

source

fn integer_feature_bounds(&self, feature: &str) -> Result<(i64, i64), Error>

Retrieves feature bounds.

feature

feature name

Returns
min

minimum feature value

max

maximum feature value

source

fn integer_feature_increment(&self, feature: &str) -> Result<i64, Error>

Not all integer features have evenly distributed allowed values, which means the returned increment may not reflect the allowed value set.

feature

feature name

Returns

feature value increment, or 1 on error.

source

fn integer_feature_value(&self, feature: &str) -> Result<i64, Error>

feature

feature name

Returns

the integer feature value, 0 on error.

source

fn string_feature_value(&self, feature: &str) -> Result<GString, Error>

feature

feature name

Returns

the string feature value, None on error.

source

fn is_enumeration_entry_available( &self, feature: &str, entry: &str ) -> Result<(), Error>

Available on crate feature v0_8_17 only.
source

fn is_feature_available(&self, feature: &str) -> Result<bool, Error>

feature

feature name

Returns

true if feature is available, false if not or on error.

source

fn read_register(&self, address: u64) -> Result<(bool, u32), Error>

Reads the value of a device register.

address

register address

Returns

TRUE on success.

value

a placeholder for the read value

source

fn set_access_check_policy(&self, policy: AccessCheckPolicy)

Available on crate feature v0_8_22 only.
source

fn set_boolean_feature_value( &self, feature: &str, value: bool ) -> Result<(), Error>

Set the value of a boolean feature.

feature

feature name

value

feature value

source

fn set_features_from_string(&self, string: &str) -> Result<(), Error>

Set features from a string containing a list of space separated feature assignments or command names. For example:

⚠️ The following code is in C ⚠️

arv_device_set_features_from_string (device, "Width=256 Height=256 PixelFormat='Mono8' TriggerStart", &error);
string

a space separated list of features assignments

source

fn set_float_feature_value( &self, feature: &str, value: f64 ) -> Result<(), Error>

Set the float feature value.

feature

feature name

value

new feature value

source

fn set_integer_feature_value( &self, feature: &str, value: i64 ) -> Result<(), Error>

Set the integer feature value.

feature

feature name

value

new feature value

source

fn set_range_check_policy(&self, policy: RangeCheckPolicy)

Available on crate feature v0_8_6 only.
source

fn set_register_cache_policy(&self, policy: RegisterCachePolicy)

Sets the register cache policy.

<warning>``<para>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.</para>``</warning>

policy

cache policy

source

fn set_string_feature_value( &self, feature: &str, value: &str ) -> Result<(), Error>

Set the string feature value.

feature

feature name

value

new feature value

source

fn write_register(&self, address: u64, value: u32) -> Result<bool, Error>

Writes value to a device register.

address

the register address

value

value to write

Returns

TRUE on success.

source

fn connect_control_lost<F: Fn(&Self) + Send + 'static>( &self, f: F ) -> SignalHandlerId

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.

Implementors§

source§

impl<O: IsA<Device>> DeviceExt for O