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
Required Methods
fn abort_acquisition(&self) -> Result<(), Error>
fn abort_acquisition(&self) -> Result<(), Error>
Aborts video stream acquisition.
fn are_chunks_available(&self) -> Result<(), Error>
fn are_chunks_available(&self) -> Result<(), Error>
v0_8_8
only.fn clear_triggers(&self) -> Result<(), Error>
fn clear_triggers(&self) -> Result<(), Error>
Disables all triggers.
fn create_chunk_parser(&self) -> Option<ChunkParser>
fn create_chunk_parser(&self) -> Option<ChunkParser>
Creates a new ChunkParser
object, used for the extraction of chunk data from Buffer
.
Returns
a new ChunkParser
.
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()
.
fn acquisition_mode(&self) -> Result<AcquisitionMode, Error>
fn acquisition_mode(&self) -> Result<AcquisitionMode, Error>
Returns
acquisition mode.
fn chunk_mode(&self) -> Result<bool, Error>
fn chunk_mode(&self) -> Result<bool, 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.
fn device_serial_number(&self) -> Result<GString, Error>
fn device_serial_number(&self) -> Result<GString, Error>
v0_8_8
only.Returns
the camera device serial number.
fn frame_count(&self) -> Result<i64, Error>
fn frame_count(&self) -> Result<i64, Error>
Returns
number of frames to capture in MultiFrame mode.
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.
fn pixel_format(&self) -> Result<PixelFormat, Error>
fn pixel_format(&self) -> Result<PixelFormat, Error>
Returns
pixel format.
fn pixel_format_as_string(&self) -> Result<GString, Error>
fn pixel_format_as_string(&self) -> Result<GString, Error>
Retuns: pixel format as string, NULL on error.
fn trigger_source(&self) -> Result<GString, Error>
fn trigger_source(&self) -> Result<GString, 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.
fn x_binning_increment(&self) -> Result<i32, Error>
fn x_binning_increment(&self) -> Result<i32, Error>
Returns
horizontal binning value increment.
fn gv_auto_packet_size(&self) -> Result<(), Error>
fn gv_auto_packet_size(&self) -> Result<(), Error>
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.
fn gv_get_current_stream_channel(&self) -> Result<i32, Error>
fn gv_get_current_stream_channel(&self) -> Result<i32, Error>
Returns
The current stream channel id.
fn gv_get_n_stream_channels(&self) -> Result<i32, Error>
fn gv_get_n_stream_channels(&self) -> Result<i32, Error>
Returns
the number of supported stream channels.
fn gv_get_packet_delay(&self) -> Result<i64, Error>
fn gv_get_packet_delay(&self) -> Result<i64, Error>
Returns
The inter packet delay, in nanoseconds.
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
fn gv_set_packet_size_adjustment(&self, adjustment: GvPacketSizeAdjustment)
fn gv_set_packet_size_adjustment(&self, adjustment: GvPacketSizeAdjustment)
v0_8_3
only.Sets the option for packet size adjustment that happens at stream object creation.
adjustment
a GvPacketSizeAdjustment
option
fn gv_set_stream_options(&self, options: GvStreamOption)
fn gv_set_stream_options(&self, options: GvStreamOption)
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
fn is_binning_available(&self) -> Result<bool, Error>
fn is_binning_available(&self) -> Result<bool, Error>
fn is_exposure_auto_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_exposure_time_available(&self) -> Result<bool, Error>
fn is_frame_rate_available(&self) -> Result<bool, Error>
fn is_frame_rate_available(&self) -> Result<bool, Error>
fn is_gain_auto_available(&self) -> Result<bool, Error>
fn is_gain_auto_available(&self) -> Result<bool, Error>
fn is_gv_device(&self) -> bool
fn is_gv_device(&self) -> bool
fn is_uv_device(&self) -> bool
fn is_uv_device(&self) -> bool
fn set_acquisition_mode(&self, value: AcquisitionMode) -> Result<(), Error>
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
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
fn set_pixel_format(&self, format: PixelFormat) -> Result<(), Error>
fn set_pixel_format(&self, format: PixelFormat) -> Result<(), Error>
fn set_register_cache_policy(&self, policy: RegisterCachePolicy)
fn set_register_cache_policy(&self, policy: RegisterCachePolicy)
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
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
fn software_trigger(&self) -> Result<(), Error>
fn software_trigger(&self) -> Result<(), Error>
Sends a software trigger command to self
. The camera must be previously
configured to use a software trigger, using set_trigger()
.
fn start_acquisition(&self) -> Result<(), Error>
fn start_acquisition(&self) -> Result<(), Error>
Starts video stream acquisition.
fn stop_acquisition(&self) -> Result<(), Error>
fn stop_acquisition(&self) -> Result<(), Error>
Stops video stream acquisition.
fn uv_is_bandwidth_control_available(&self) -> Result<(), Error>
fn uv_is_bandwidth_control_available(&self) -> Result<(), Error>
Returns
wether bandwidth limits are available on this camera