pub trait CameraExt: 'static {
Show 105 methods fn abort_acquisition(&self) -> Result<(), Error>; fn acquisition(&self, timeout: u64) -> Result<Buffer, Error>; fn are_chunks_available(&self) -> Result<(), Error>; fn clear_triggers(&self) -> Result<(), Error>; fn create_chunk_parser(&self) -> Option<ChunkParser>; fn dup_available_enumerations(
        &self,
        feature: &str
    ) -> Result<Vec<i64>, Error>; fn dup_available_enumerations_as_display_names(
        &self,
        feature: &str
    ) -> Result<Vec<GString>, Error>; fn dup_available_enumerations_as_strings(
        &self,
        feature: &str
    ) -> Result<Vec<GString>, Error>; fn dup_available_pixel_formats(&self) -> Result<Vec<i64>, Error>; fn dup_available_pixel_formats_as_display_names(
        &self
    ) -> Result<Vec<GString>, Error>; fn dup_available_pixel_formats_as_strings(
        &self
    ) -> Result<Vec<GString>, Error>; fn dup_available_trigger_sources(&self) -> Result<Vec<GString>, Error>; fn dup_available_triggers(&self) -> Result<Vec<GString>, Error>; fn execute_command(&self, feature: &str) -> Result<(), Error>; fn acquisition_mode(&self) -> Result<AcquisitionMode, Error>; fn binning(&self) -> Result<(i32, i32), Error>; fn boolean(&self, feature: &str) -> Result<bool, Error>; fn chunk_mode(&self) -> Result<bool, Error>; fn chunk_state(&self, chunk: &str) -> Result<bool, Error>; fn device(&self) -> Option<Device>; fn device_id(&self) -> Result<GString, Error>; fn device_serial_number(&self) -> Result<GString, Error>; fn exposure_time(&self) -> Result<f64, Error>; fn exposure_time_auto(&self) -> Result<Auto, Error>; fn exposure_time_bounds(&self) -> Result<(f64, f64), Error>; fn float(&self, feature: &str) -> Result<f64, Error>; fn float_bounds(&self, feature: &str) -> Result<(f64, f64), Error>; fn frame_count(&self) -> Result<i64, Error>; fn frame_count_bounds(&self) -> Result<(i64, i64), Error>; fn frame_rate(&self) -> Result<f64, Error>; fn frame_rate_bounds(&self) -> Result<(f64, f64), Error>; fn gain(&self) -> Result<f64, Error>; fn gain_auto(&self) -> Result<Auto, Error>; fn gain_bounds(&self) -> Result<(f64, f64), Error>; fn height_bounds(&self) -> Result<(i32, i32), Error>; fn height_increment(&self) -> Result<i32, Error>; fn integer(&self, feature: &str) -> Result<i64, Error>; fn integer_bounds(&self, feature: &str) -> Result<(i64, i64), Error>; fn integer_increment(&self, feature: &str) -> Result<i64, Error>; fn model_name(&self) -> Result<GString, Error>; fn payload(&self) -> Result<u32, Error>; fn pixel_format(&self) -> Result<PixelFormat, Error>; fn pixel_format_as_string(&self) -> Result<GString, Error>; fn region(&self) -> Result<(i32, i32, i32, i32), Error>; fn sensor_size(&self) -> Result<(i32, i32), Error>; fn string(&self, feature: &str) -> Result<GString, Error>; fn trigger_source(&self) -> Result<GString, Error>; fn vendor_name(&self) -> Result<GString, Error>; fn width_bounds(&self) -> Result<(i32, i32), Error>; fn width_increment(&self) -> Result<i32, Error>; fn x_binning_bounds(&self) -> Result<(i32, i32), Error>; fn x_binning_increment(&self) -> Result<i32, Error>; fn x_offset_bounds(&self) -> Result<(i32, i32), Error>; fn x_offset_increment(&self) -> Result<i32, Error>; fn y_binning_bounds(&self) -> Result<(i32, i32), Error>; fn y_binning_increment(&self) -> Result<i32, Error>; fn y_offset_bounds(&self) -> Result<(i32, i32), Error>; fn y_offset_increment(&self) -> Result<i32, Error>; fn gv_auto_packet_size(&self) -> Result<(), Error>; fn gv_get_current_stream_channel(&self) -> Result<i32, Error>; fn gv_get_n_stream_channels(&self) -> Result<i32, Error>; fn gv_get_packet_delay(&self) -> Result<i64, Error>; fn gv_get_packet_size(&self) -> Result<u32, Error>; fn gv_select_stream_channel(&self, channel_id: i32) -> Result<(), Error>; fn gv_set_packet_delay(&self, delay_ns: i64) -> Result<(), Error>; fn gv_set_packet_size(&self, packet_size: i32) -> Result<(), Error>; fn gv_set_packet_size_adjustment(&self, adjustment: GvPacketSizeAdjustment); fn gv_set_stream_options(&self, options: GvStreamOption); fn is_binning_available(&self) -> Result<bool, Error>; fn is_exposure_auto_available(&self) -> Result<bool, Error>; fn is_exposure_time_available(&self) -> Result<bool, Error>; fn is_feature_available(&self, feature: &str) -> Result<bool, Error>; fn is_frame_rate_available(&self) -> Result<bool, Error>; fn is_gain_auto_available(&self) -> Result<bool, Error>; fn is_gain_available(&self) -> Result<bool, Error>; fn is_gv_device(&self) -> bool; fn is_uv_device(&self) -> bool; fn set_acquisition_mode(&self, value: AcquisitionMode) -> Result<(), Error>; fn set_binning(&self, dx: i32, dy: i32) -> Result<(), Error>; fn set_boolean(&self, feature: &str, value: bool) -> Result<(), Error>; fn set_chunk_mode(&self, is_active: bool) -> Result<(), Error>; fn set_chunk_state(
        &self,
        chunk: &str,
        is_enabled: bool
    ) -> Result<(), Error>; fn set_chunks(&self, chunk_list: &str) -> Result<(), Error>; fn set_exposure_time(&self, exposure_time_us: f64) -> Result<(), Error>; fn set_exposure_time_auto(&self, auto_mode: Auto) -> Result<(), Error>; fn set_float(&self, feature: &str, value: f64) -> Result<(), Error>; fn set_frame_count(&self, frame_count: i64) -> Result<(), Error>; fn set_frame_rate(&self, frame_rate: f64) -> Result<(), Error>; fn set_gain(&self, gain: f64) -> Result<(), Error>; fn set_gain_auto(&self, auto_mode: Auto) -> Result<(), Error>; fn set_integer(&self, feature: &str, value: i64) -> Result<(), Error>; fn set_pixel_format(&self, format: PixelFormat) -> Result<(), Error>; fn set_pixel_format_from_string(&self, format: &str) -> Result<(), Error>; fn set_region(
        &self,
        x: i32,
        y: i32,
        width: i32,
        height: i32
    ) -> Result<(), Error>; fn set_register_cache_policy(&self, policy: RegisterCachePolicy); fn set_string(&self, feature: &str, value: &str) -> Result<(), Error>; fn set_trigger(&self, source: &str) -> Result<(), Error>; fn set_trigger_source(&self, source: &str) -> Result<(), Error>; fn software_trigger(&self) -> Result<(), Error>; fn start_acquisition(&self) -> Result<(), Error>; fn stop_acquisition(&self) -> Result<(), Error>; fn uv_get_bandwidth(&self) -> Result<u32, Error>; fn uv_get_bandwidth_bounds(&self) -> Result<(u32, u32), Error>; fn uv_is_bandwidth_control_available(&self) -> Result<(), Error>; fn uv_set_bandwidth(&self, bandwidth: u32) -> Result<(), Error>;
}
Expand description

Trait containing all Camera methods.

Implementors

Camera

Required Methods

Aborts video stream acquisition.

Acquire one image buffer.

timeout

acquisition timeout in µs. Zero means no timeout.

Returns

A new Buffer, NULL on error. The returned buffer must be freed using g_object_unref().

Available on crate feature v0_8_8 only.
Returns

true if chunk data are available

Disables all triggers.

Creates a new ChunkParser object, used for the extraction of chunk data from Buffer.

Returns

a new ChunkParser.

Get all the available values of feature, as 64 bit integers.

feature

feature name

Returns

a newly created array of integers, which must freed after use using g_free, or NULL on 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.

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 None on error.

Retrieves the list of all available pixel formats.

Returns

a newly allocated array of ArvPixelFormat, to be freed after use with g_free().

Retrieves the list of all available pixel formats as display names. In general, these human-readable strings cannot be used as settings.

Returns

a newly allocated array of string constants, to be freed after use with g_free().

Retrieves the list of all available pixel formats as strings.

Returns

a newly allocated array of strings, to be freed after use with g_free().

Gets the list of all available trigger sources.

Returns

a newly allocated array of strings, which must be freed using g_free().

Gets a list of all available triggers: FrameStart, ExposureActive, etc…

Returns

a newly allocated array of strings, which must be freed using g_free().

Execute a Genicam command.

feature

feature name

Returns

acquisition mode.

Retrieves binning in both directions.

Returns
dx

horizontal binning placeholder

dy

vertical binning placeholder

feature

feature name

Returns

the boolean feature value, false on error.

Check wether chunk data mode is active. Please see set_chunk_mode().

Returns

true if chunk data mode is active.

Gets state of chunk data. Chunk data are be embedded in Buffer only if chunk mode is active. Please see set_chunk_mode().

chunk

chunk data name

Returns

true if chunk is enabled.

Retrieves the Device object for more complete access to camera features.

Returns

underlying device object.

Returns

the camera device ID.

Available on crate feature v0_8_8 only.
Returns

the camera device serial number.

Returns

current exposure time, in µs.

Returns

auto exposure mode selection

Retrieves exposure time bounds, in µs.

Returns
min

minimum exposure time

max

maximum exposure time

feature

feature name

Returns

the float feature value, 0.0 on error.

Retrieves float feature bounds.

feature

feature name

Returns
min

minimum feature value

max

maximum feature value

Returns

number of frames to capture in MultiFrame mode.

Retrieves allowed range for frame count.

Returns
min

minimal possible frame count

max

maximum possible frame count

Returns

actual frame rate, in Hz.

Retrieves allowed range for framerate.

Since 0.8.0

Returns
min

minimal possible framerate

max

maximum possible framerate

Returns

the current gain setting.

Returns

auto gain mode selection

Retrieves gain bounds.

Returns
min

minimum gain

max

maximum gain

Retrieves the valid range for image height.

Returns
min

minimum height

max

maximum height

Returns

height value increment.

feature

feature name

Returns

the integer feature value, 0 on error.

Retrieves integer feature bounds.

feature

feature name

Returns
min

minimum feature value

max

maximum feature value

feature

feature name

Returns

feature value increment, or 1 on error.

Returns

the camera model name.

Retrieves the size needed for the storage of an image. This value is used for the creation of the stream buffers.

Returns

frame storage size, in bytes.

Returns

pixel format.

Retuns: pixel format as string, NULL on error.

Retrieves the current region of interest.

Returns
x

x offset

y

y_offset

width

region width

height

region height

Returns
width

camera sensor width

height

camera sensor height

feature

feature name

Returns

the string feature value, None on error.

Gets the trigger source. This function doesn’t check if the camera is configured to actually use this source as a trigger.

Returns

a string containing the trigger source name, NULL on error.

Returns

the camera vendor name.

Retrieves the valid range for image width.

Returns
min

minimum width

max

maximum width

Returns

width value increment.

Retrieves the valid range for image horizontal binning.

Returns
min

minimum binning

max

maximum binning

Returns

horizontal binning value increment.

Retrieves the valid range for image horizontal offset.

Returns
min

minimum offset

max

maximum offset

Returns

horizontal offset value increment.

Retrieves the valid range for image vertical binning.

Returns
min

minimum binning

max

maximum binning

Returns

vertical binning value increment.

Retrieves the valid range for image vertical offset.

Returns
min

minimum offset

max

maximum offset

Returns

vertical offset value increment.

Automatically determine the biggest packet size that can be used data streaming, and set GevSCPSPacketSize value accordingly. This function relies on the GevSCPSFireTestPacket feature. If this feature is not available, the packet size will be set to a default value (1500 bytes).

Returns

The packet size, in bytes.

Returns

The current stream channel id.

Returns

the number of supported stream channels.

Returns

The inter packet delay, in nanoseconds.

Returns

The stream packet size, in bytes.

Select the current stream channel. Negative channel_id is ignored.

channel_id

id of the channel to select

Configure the inter packet delay to insert between each packet for the current stream channel. This can be used as a crude flow-control mechanism if the application or the network infrastructure cannot keep up with the packets coming from the device. Negative delay_ns is ignored.

delay_ns

inter packet delay, in nanoseconds

Specifies the stream packet size, in bytes, to send on the selected channel for a GVSP transmitter or specifies the maximum packet size supported by a GVSP receiver.

This does not include data leader and data trailer and the last data packet which might be of smaller size (since packet size is not necessarily a multiple of block size for stream channel). Negative packet_size is ignored.

packet_size

packet size, in bytes

Available on crate feature v0_8_3 only.

Sets the option for packet size adjustment that happens at stream object creation.

adjustment

a GvPacketSizeAdjustment option

Sets the options used during stream object creation. These options mus be set before the call to arv_camera_create_stream().

options

option for stream creation

Returns

true if Binning feature is available.

Returns

true if Exposure Auto feature is available.

Returns

true if Exposure Time feature is available.

feature

feature name

Returns

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

Returns

true if FrameRate feature is available

Returns

true if Gain feature is available.

Returns

true if Gain feature is available.

Returns

true if self is a GigEVision device.

Returns

true if self is a USB3Vision device.

Defines binning in both directions. Not all cameras support this feature. Negative dx or dy values are ignored.

dx

horizontal binning

dy

vertical binning

Set a boolean feature value.

feature

feature name

value

new feature value

Controls wether chunk data mode is active. When active, chunk data are appended to image data in Buffer. A ChunkParser must be used in order to extract chunk data.

is_active

wether to enable chunk data mode

Sets state of a chunk data. Chunk data are be embedded in Buffer only if chunk mode is active. Please see set_chunk_mode().

chunk

chunk data name

is_enabled

wether to enable this chunk

Convenience function for enabling a set of chunk data. Chunk mode is activated, or deactivated if chunk_list is None or empty. All chunk data not listed are disabled.

chunk_list

chunk data names, as a comma or space separated list

Sets exposure time. User should take care to set a value compatible with the desired frame rate. Negative exposure_time_us is ignored.

exposure_time_us

exposure time, in µs

Configures automatic exposure feature.

auto_mode

auto exposure mode selection

Set a float feature value.

feature

feature name

value

new feature value

Sets the number of frames to capture in MultiFrame mode.

frame_count

number of frames to capture in MultiFrame mode

Configures a fixed frame rate mode. Once acquisition start is triggered, the video stream will be acquired with the given frame rate. A negative or zero frame_rate value disables the frame rate limit.

frame_rate

frame rate, in Hz

Sets the gain of the ADC converter. Negative gain is ignored.

gain

gain value

Configures automatic gain feature.

auto_mode

auto gain mode selection

Set an integer feature value.

feature

feature name

value

new feature value

Defines pixel format.

format

pixel format

Defines pixel format described by a string.

format

pixel format

Defines the region of interest which will be transmitted in the video stream. Negative x or y values, or not strictly positive width or height values are ignored.

x

x offset

y

y_offset

width

region width

height

region height

Available on crate feature v0_8_8 only.

Sets the Genicam 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

Set an string feature value.

feature

feature name

value

new feature value

Configures the camera in trigger mode. Typical values for source are “Line1” or “Line2”. See the camera documentation for the allowed values. Activation is set to rising edge. It can be changed by accessing the underlying device object.

Source can also be “Software”. In this case, an acquisition is triggered by a call to software_trigger().

source

trigger source as string

Sets the trigger source. This function doesn’t check if the camera is configured to actually use this source as a trigger.

source

source name

Sends a software trigger command to self. The camera must be previously configured to use a software trigger, using set_trigger().

Starts video stream acquisition.

Stops video stream acquisition.

Returns

the current bandwidth limit

Returns
min

minimum bandwidth

max

maximum bandwidth

Returns

wether bandwidth limits are available on this camera

Set the bandwith limit or, if bandwith is not strictly positive, disable the limit.

bandwidth

Bandwith limit, in megabits/sec

Implementors