Enum AeState

Source
#[repr(i32)]
pub enum AeState { Idle = 0, Searching = 1, Converged = 2, }
Expand description

Report the AEGC algorithm state.

The AEGC algorithm computes the exposure time and the analogue gain to be applied to the image sensor.

The AEGC algorithm behaviour is controlled by the ExposureTimeMode and AnalogueGainMode controls, which allow applications to decide how the exposure time and gain are computed, in Auto or Manual mode, independently from one another.

The AeState control reports the AEGC algorithm state through a single value and describes it as a single computation block which computes both the exposure time and the analogue gain values.

When both the exposure time and analogue gain values are configured to be in Manual mode, the AEGC algorithm is quiescent and does not actively compute any value and the AeState control will report AeStateIdle.

When at least the exposure time or analogue gain are configured to be computed by the AEGC algorithm, the AeState control will report if the algorithm has converged to stable values for all of the controls set to be computed in Auto mode.

\sa AnalogueGainMode \sa ExposureTimeMode

Variants§

§

Idle = 0

The AEGC algorithm is inactive.

This state is returned when both AnalogueGainMode and ExposureTimeMode are set to Manual and the algorithm is not actively computing any value.

§

Searching = 1

The AEGC algorithm is actively computing new values, for either the exposure time or the analogue gain, but has not converged to a stable result yet.

This state is returned if at least one of AnalogueGainMode or ExposureTimeMode is auto and the algorithm hasn’t converged yet.

The AEGC algorithm converges once stable values are computed for all of the controls set to be computed in Auto mode. Once the algorithm converges the state is moved to AeStateConverged.

§

Converged = 2

The AEGC algorithm has converged.

This state is returned if at least one of AnalogueGainMode or ExposureTimeMode is Auto, and the AEGC algorithm has converged to a stable value.

If the measurements move too far away from the convergence point then the AEGC algorithm might start adjusting again, in which case the state is moved to AeStateSearching.

Trait Implementations§

Source§

impl Clone for AeState

Source§

fn clone(&self) -> AeState

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ControlEntry for AeState

Source§

const ID: u32 = 2u32

Source§

impl Debug for AeState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<AeState> for ControlValue

Source§

fn from(val: AeState) -> Self

Converts to this type from the input type.
Source§

impl From<AeState> for i32

Source§

fn from(enum_value: AeState) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for AeState

Source§

fn eq(&self, other: &AeState) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<ControlValue> for AeState

Source§

type Error = ControlValueError

The type returned in the event of a conversion error.
Source§

fn try_from(value: ControlValue) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i32> for AeState

Source§

type Error = TryFromPrimitiveError<AeState>

The type returned in the event of a conversion error.
Source§

fn try_from(number: i32) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for AeState

Source§

const NAME: &'static str = "AeState"

Source§

type Primitive = i32

Source§

fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>

Source§

impl Control for AeState

Source§

impl Copy for AeState

Source§

impl Eq for AeState

Source§

impl StructuralPartialEq for AeState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynControlEntry for T
where T: ControlEntry,

Source§

fn id(&self) -> u32

Source§

fn value(&self) -> ControlValue

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.