Trait cameraunit::CameraInfo

source ·
pub trait CameraInfo {
Show 14 methods // Required methods fn camera_ready(&self) -> bool; fn camera_name(&self) -> &str; fn cancel_capture(&self) -> Result<(), Error>; fn is_capturing(&self) -> bool; fn get_ccd_width(&self) -> u32; fn get_ccd_height(&self) -> u32; // Provided methods fn get_uuid(&self) -> Option<&str> { ... } fn set_temperature(&self, _temperature: f32) -> Result<f32, Error> { ... } fn get_temperature(&self) -> Option<f32> { ... } fn set_cooler(&self, _on: bool) -> Result<(), Error> { ... } fn get_cooler(&self) -> Option<bool> { ... } fn get_cooler_power(&self) -> Option<f32> { ... } fn set_cooler_power(&self, _power: f32) -> Result<f32, Error> { ... } fn get_pixel_size(&self) -> Option<f32> { ... }
}
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<(), Error>

Cancel an ongoing exposure.

source

fn is_capturing(&self) -> bool

Check if the camera is currently capturing an image.

source

fn get_ccd_width(&self) -> u32

Get the detector width in pixels.

source

fn get_ccd_height(&self) -> u32

Get the detector height in pixels.

Provided Methods§

source

fn get_uuid(&self) -> Option<&str>

Get any associated unique identifier for the camera.

Defaults to None if unimplemented.

source

fn set_temperature(&self, _temperature: f32) -> Result<f32, Error>

Set the target detector temperature.

Raises a Message with the message "Not implemented" if unimplemented.

source

fn get_temperature(&self) -> Option<f32>

Get the current detector temperature.

Defaults to None if unimplemented.

source

fn set_cooler(&self, _on: bool) -> Result<(), Error>

Enable/disable cooler.

Raises a Message with the message "Not implemented" if unimplemented.

source

fn get_cooler(&self) -> Option<bool>

Check if cooler is enabled/disabled.

Defaults to None if unimplemented/not available.

source

fn get_cooler_power(&self) -> Option<f32>

Get the current cooler power.

Defaults to None if unimplemented.

source

fn set_cooler_power(&self, _power: f32) -> Result<f32, Error>

Set the cooler power.

Raises a GeneralError with the message "Not implemented" if unimplemented.

source

fn get_pixel_size(&self) -> Option<f32>

Get the detector pixel size in microns.

Defaults to None if unimplemented.

Implementors§