pub trait Camera: CameraInfo + Send {
Show 42 methods
// Required methods
fn command_execute(&self, name: &str, verify: bool) -> Result<()>;
fn feature_bool(&self, name: &str) -> Result<bool>;
fn feature_bool_set(&self, name: &str, value: bool) -> Result<()>;
fn feature_enum(&self, name: &str) -> Result<String>;
fn feature_enum_set(&self, name: &str, value: &str) -> Result<()>;
fn feature_float(&self, name: &str) -> Result<f64>;
fn feature_float_set(&self, name: &str, value: f64) -> Result<()>;
fn feature_int(&self, name: &str) -> Result<i64>;
fn feature_int_set(&self, name: &str, value: i64) -> Result<()>;
fn node_map_load(&self, settings: &str) -> Result<()>;
fn node_map_save(&self) -> Result<String>;
fn width(&self) -> Result<u32>;
fn height(&self) -> Result<u32>;
fn pixel_format(&self) -> Result<PixFmt>;
fn possible_pixel_formats(&self) -> Result<Vec<PixFmt>>;
fn set_pixel_format(&mut self, pixel_format: PixFmt) -> Result<()>;
fn exposure_time(&self) -> Result<f64>;
fn exposure_time_range(&self) -> Result<(f64, f64)>;
fn set_exposure_time(&mut self, _: f64) -> Result<()>;
fn exposure_auto(&self) -> Result<AutoMode>;
fn set_exposure_auto(&mut self, _: AutoMode) -> Result<()>;
fn gain(&self) -> Result<f64>;
fn gain_range(&self) -> Result<(f64, f64)>;
fn set_gain(&mut self, _: f64) -> Result<()>;
fn gain_auto(&self) -> Result<AutoMode>;
fn set_gain_auto(&mut self, _: AutoMode) -> Result<()>;
fn trigger_mode(&self) -> Result<TriggerMode>;
fn set_trigger_mode(&mut self, _: TriggerMode) -> Result<()>;
fn acquisition_frame_rate_enable(&self) -> Result<bool>;
fn set_acquisition_frame_rate_enable(&mut self, value: bool) -> Result<()>;
fn acquisition_frame_rate(&self) -> Result<f64>;
fn acquisition_frame_rate_range(&self) -> Result<(f64, f64)>;
fn set_acquisition_frame_rate(&mut self, value: f64) -> Result<()>;
fn trigger_selector(&self) -> Result<TriggerSelector>;
fn set_trigger_selector(&mut self, _: TriggerSelector) -> Result<()>;
fn acquisition_mode(&self) -> Result<AcquisitionMode>;
fn set_acquisition_mode(&mut self, _: AcquisitionMode) -> Result<()>;
fn acquisition_start(&mut self) -> Result<()>;
fn acquisition_stop(&mut self) -> Result<()>;
fn next_frame(&mut self) -> Result<DynamicFrame>;
// Provided methods
fn start_default_external_triggering(&mut self) -> Result<()> { ... }
fn set_software_frame_rate_limit(&mut self, fps_limit: f64) -> Result<()> { ... }
}
Required Methods§
fn command_execute(&self, name: &str, verify: bool) -> Result<()>
fn feature_bool(&self, name: &str) -> Result<bool>
fn feature_bool_set(&self, name: &str, value: bool) -> Result<()>
fn feature_enum(&self, name: &str) -> Result<String>
fn feature_enum_set(&self, name: &str, value: &str) -> Result<()>
fn feature_float(&self, name: &str) -> Result<f64>
fn feature_float_set(&self, name: &str, value: f64) -> Result<()>
fn feature_int(&self, name: &str) -> Result<i64>
fn feature_int_set(&self, name: &str, value: i64) -> Result<()>
sourcefn node_map_load(&self, settings: &str) -> Result<()>
fn node_map_load(&self, settings: &str) -> Result<()>
Load camera settings from an implementation-dependent settings string.
This would typically be read from a file with extension given by CameraModule::settings_file_extension.
sourcefn node_map_save(&self) -> Result<String>
fn node_map_save(&self) -> Result<String>
Read camera settings to an implementation-dependent settings string.
This would typically be saved to a file with extension given by CameraModule::settings_file_extension.
fn pixel_format(&self) -> Result<PixFmt>
fn possible_pixel_formats(&self) -> Result<Vec<PixFmt>>
fn set_pixel_format(&mut self, pixel_format: PixFmt) -> Result<()>
sourcefn exposure_time(&self) -> Result<f64>
fn exposure_time(&self) -> Result<f64>
value given in microseconds
sourcefn exposure_time_range(&self) -> Result<(f64, f64)>
fn exposure_time_range(&self) -> Result<(f64, f64)>
value given in microseconds
sourcefn set_exposure_time(&mut self, _: f64) -> Result<()>
fn set_exposure_time(&mut self, _: f64) -> Result<()>
value given in microseconds
fn exposure_auto(&self) -> Result<AutoMode>
fn set_exposure_auto(&mut self, _: AutoMode) -> Result<()>
sourcefn gain_range(&self) -> Result<(f64, f64)>
fn gain_range(&self) -> Result<(f64, f64)>
value given in dB
fn gain_auto(&self) -> Result<AutoMode>
fn set_gain_auto(&mut self, _: AutoMode) -> Result<()>
fn trigger_mode(&self) -> Result<TriggerMode>
fn set_trigger_mode(&mut self, _: TriggerMode) -> Result<()>
fn acquisition_frame_rate_enable(&self) -> Result<bool>
fn set_acquisition_frame_rate_enable(&mut self, value: bool) -> Result<()>
fn acquisition_frame_rate(&self) -> Result<f64>
fn acquisition_frame_rate_range(&self) -> Result<(f64, f64)>
fn set_acquisition_frame_rate(&mut self, value: f64) -> Result<()>
fn trigger_selector(&self) -> Result<TriggerSelector>
fn set_trigger_selector(&mut self, _: TriggerSelector) -> Result<()>
fn acquisition_mode(&self) -> Result<AcquisitionMode>
fn set_acquisition_mode(&mut self, _: AcquisitionMode) -> Result<()>
fn acquisition_start(&mut self) -> Result<()>
fn acquisition_stop(&mut self) -> Result<()>
sourcefn next_frame(&mut self) -> Result<DynamicFrame>
fn next_frame(&mut self) -> Result<DynamicFrame>
synchronous (blocking) frame acquisition
Provided Methods§
sourcefn start_default_external_triggering(&mut self) -> Result<()>
fn start_default_external_triggering(&mut self) -> Result<()>
Set the camera to use external triggering using default parameters.
The default parameters may vary by camera backend will ideally use a hardware trigger to trigger the start of each frame.