Trait generic_camera::GenCamInfo

source ·
pub trait GenCamInfo:
    Send
    + Sync
    + Debug {
    // Required methods
    fn camera_ready(&self) -> bool;
    fn camera_name(&self) -> &str;
    fn cancel_capture(&self) -> Result<()>;
    fn is_capturing(&self) -> bool;
    fn list_properties(&self) -> Vec<Property>;
    fn get_property(&self, name: GenCamCtrl) -> Option<&PropertyValue>;
    fn set_property(
        &mut self,
        name: GenCamCtrl,
        value: &PropertyValue,
    ) -> Result<()>;
    fn get_property_auto(&self, name: GenCamCtrl) -> Result<bool>;
    fn set_property_auto(&mut self, name: GenCamCtrl, auto: bool) -> Result<()>;
}
Expand description

Trait for obtaining camera information and cancelling any ongoing image capture. This trait is intended to be exclusively applied to a clonable object that can be passed to other threads for housekeeping purposes.

Required Methods§

source

fn camera_ready(&self) -> bool

Check if camera is ready.

source

fn camera_name(&self) -> &str

Get the camera name.

source

fn cancel_capture(&self) -> Result<()>

Cancel an ongoing exposure.

source

fn is_capturing(&self) -> bool

Check if the camera is currently capturing an image.

source

fn list_properties(&self) -> Vec<Property>

Get optional capabilities of the camera.

source

fn get_property(&self, name: GenCamCtrl) -> Option<&PropertyValue>

Get a property by name.

source

fn set_property( &mut self, name: GenCamCtrl, value: &PropertyValue, ) -> Result<()>

Set a property by name.

source

fn get_property_auto(&self, name: GenCamCtrl) -> Result<bool>

Check if a property is in auto mode.

source

fn set_property_auto(&mut self, name: GenCamCtrl, auto: bool) -> Result<()>

Set a property to auto mode.

Implementors§