Skip to main content

UpdateFlags

Struct UpdateFlags 

Source
#[non_exhaustive]
pub struct UpdateFlags { pub status_update: bool, pub ced_update: bool, pub rr_test: bool, pub source_test_update: bool, pub frl_start: bool, pub flt_update: bool, pub rsed_update: bool, }
Expand description

Update_0 (0x10): the flags the sink sets to tell the source that something changed.

Mirrors culvert’s UpdateFlags field for field. plumbob acts on source_test_update, frl_start and flt_update, and clears only those (see ClearableUpdateFlags); the other flags are read so that an ScdcClient reports the whole register, and are left to whoever handles them. Build one with new, or from the default (no flag set) by setting fields.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§status_update: bool

Bit 0: general status has changed.

§ced_update: bool

Bit 1: CED counters have been updated; re-read the ERR_DET registers.

§rr_test: bool

Bit 2: read request test, owned by the sink. The source does not clear it, so ClearableUpdateFlags has no field for it.

§source_test_update: bool

Bit 3: the sink has written Source_Test_Configuration (0x35).

§frl_start: bool

Bit 4: link training passed; the source may start FRL transmission.

§flt_update: bool

Bit 5: the per-lane link training pattern requests have changed.

§rsed_update: bool

Bit 6: the Reed-Solomon correction count has been updated.

Implementations§

Source§

impl UpdateFlags

Source

pub const fn new( status_update: bool, ced_update: bool, rr_test: bool, source_test_update: bool, frl_start: bool, flt_update: bool, rsed_update: bool, ) -> UpdateFlags

Constructs UpdateFlags from the Update_0 flags, in bit order.

Source

pub const fn clearable(self) -> ClearableUpdateFlags

These flags as a clear: every flag but RR_Test, which the source does not clear.

Trait Implementations§

Source§

impl Clone for UpdateFlags

Source§

fn clone(&self) -> UpdateFlags

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for UpdateFlags

Source§

impl Debug for UpdateFlags

Source§

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

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

impl Default for UpdateFlags

Source§

fn default() -> UpdateFlags

Returns the “default value” for a type. Read more
Source§

impl Eq for UpdateFlags

Source§

impl PartialEq for UpdateFlags

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for UpdateFlags

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.