Struct scpi::scpi1999::EventRegister
source · [−]pub struct EventRegister {
pub condition: u16,
pub event: u16,
pub enable: u16,
pub ntr_filter: u16,
pub ptr_filter: u16,
}
Expand description
This struct contains a register with event/enable functionality (used in OPERation/QUEStionable registers)
Fields
condition: u16
event: u16
enable: u16
ntr_filter: u16
ptr_filter: u16
Implementations
sourceimpl EventRegister
impl EventRegister
pub fn clear_event(&mut self)
sourcepub fn get_summary(&self) -> bool
pub fn get_summary(&self) -> bool
Return the enabled operation bits summary. Returns true if any enabled condition bit is set, false otherwise.
sourcepub fn get_condition_bit(&self, bit: OperationBits) -> bool
pub fn get_condition_bit(&self, bit: OperationBits) -> bool
Get the state of relevant bit in status register. Returns true if bit is set, false otherwise.
sourcepub fn set_condition(&mut self, condition: u16)
pub fn set_condition(&mut self, condition: u16)
Update condition register and event register based on pos-/neg-transition filters
sourcepub fn set_condition_bits(&mut self, bitmask: u16)
pub fn set_condition_bits(&mut self, bitmask: u16)
Set relevant bit in condition register
sourcepub fn clear_condition_bits(&mut self, bitmask: u16)
pub fn clear_condition_bits(&mut self, bitmask: u16)
Clear relevant bit in condition register
Trait Implementations
sourceimpl Clone for EventRegister
impl Clone for EventRegister
sourcefn clone(&self) -> EventRegister
fn clone(&self) -> EventRegister
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for EventRegister
impl Default for EventRegister
sourceimpl PartialEq<EventRegister> for EventRegister
impl PartialEq<EventRegister> for EventRegister
sourcefn eq(&self, other: &EventRegister) -> bool
fn eq(&self, other: &EventRegister) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &EventRegister) -> bool
fn ne(&self, other: &EventRegister) -> bool
This method tests for !=
.
impl Copy for EventRegister
impl StructuralPartialEq for EventRegister
Auto Trait Implementations
impl RefUnwindSafe for EventRegister
impl Send for EventRegister
impl Sync for EventRegister
impl Unpin for EventRegister
impl UnwindSafe for EventRegister
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more