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§
sourcefn camera_ready(&self) -> bool
fn camera_ready(&self) -> bool
Check if camera is ready.
sourcefn camera_name(&self) -> &str
fn camera_name(&self) -> &str
Get the camera name.
sourcefn cancel_capture(&self) -> Result<(), Error>
fn cancel_capture(&self) -> Result<(), Error>
Cancel an ongoing exposure.
sourcefn is_capturing(&self) -> bool
fn is_capturing(&self) -> bool
Check if the camera is currently capturing an image.
sourcefn get_ccd_width(&self) -> u32
fn get_ccd_width(&self) -> u32
Get the detector width in pixels.
sourcefn get_ccd_height(&self) -> u32
fn get_ccd_height(&self) -> u32
Get the detector height in pixels.
Provided Methods§
sourcefn get_uuid(&self) -> Option<&str>
fn get_uuid(&self) -> Option<&str>
Get any associated unique identifier for the camera.
Defaults to None
if unimplemented.
sourcefn set_temperature(&self, _temperature: f32) -> Result<f32, Error>
fn set_temperature(&self, _temperature: f32) -> Result<f32, Error>
Set the target detector temperature.
Raises a Message
with the message "Not implemented"
if unimplemented.
sourcefn get_temperature(&self) -> Option<f32>
fn get_temperature(&self) -> Option<f32>
Get the current detector temperature.
Defaults to None
if unimplemented.
sourcefn set_cooler(&self, _on: bool) -> Result<(), Error>
fn set_cooler(&self, _on: bool) -> Result<(), Error>
Enable/disable cooler.
Raises a Message
with the message "Not implemented"
if unimplemented.
sourcefn get_cooler(&self) -> Option<bool>
fn get_cooler(&self) -> Option<bool>
Check if cooler is enabled/disabled.
Defaults to None
if unimplemented/not available.
sourcefn get_cooler_power(&self) -> Option<f32>
fn get_cooler_power(&self) -> Option<f32>
Get the current cooler power.
Defaults to None
if unimplemented.
sourcefn set_cooler_power(&self, _power: f32) -> Result<f32, Error>
fn set_cooler_power(&self, _power: f32) -> Result<f32, Error>
Set the cooler power.
Raises a GeneralError
with the message "Not implemented"
if unimplemented.
sourcefn get_pixel_size(&self) -> Option<f32>
fn get_pixel_size(&self) -> Option<f32>
Get the detector pixel size in microns.
Defaults to None
if unimplemented.