pub struct RBPaddleID {
pub paddle_12: u8,
pub paddle_34: u8,
pub paddle_56: u8,
pub paddle_78: u8,
pub channel_order: u8,
}
Expand description
Squeze the rb channel - paddle mapping into 5 bytes for a single RB
Fields§
§paddle_12: u8
Paddle connected to RB channel 1/2
paddle_34: u8
Paddle connected to RB channel 3/4
paddle_56: u8
Paddle connected to RB channel 5/6
paddle_78: u8
Paddle connected to RB channel 7/8
channel_order: u8
Order - 1 if the smaller channel is the A side, 2, if the smaller channel is the B side
Implementations§
Source§impl RBPaddleID
impl RBPaddleID
pub fn new() -> Self
pub fn to_u64(&self) -> u64
Sourcepub fn get_order_flipped(&self, channel: u8) -> bool
pub fn get_order_flipped(&self, channel: u8) -> bool
Typically, the A-side will be connected to a lower channel id
If the order is flipped, the lower channel will be connected to the B-side
§Arguments
- channel : RB channel (1-8)
pub fn get_order_str(&self, channel: u8) -> String
pub fn is_a(&self, channel: u8) -> bool
pub fn from_u64(val: u64) -> Self
pub fn from_rb(rb: &ReadoutBoard) -> Self
Sourcepub fn get_paddle_id(&self, channel: u8) -> (u8, bool)
pub fn get_paddle_id(&self, channel: u8) -> (u8, bool)
Get the paddle id together with the information if this is the A side
channel in rb channels (starts at 1)
Trait Implementations§
Source§impl Clone for RBPaddleID
impl Clone for RBPaddleID
Source§fn clone(&self) -> RBPaddleID
fn clone(&self) -> RBPaddleID
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RBPaddleID
impl Debug for RBPaddleID
Source§impl Default for RBPaddleID
impl Default for RBPaddleID
Source§impl Display for RBPaddleID
impl Display for RBPaddleID
Source§impl FromRandom for RBPaddleID
impl FromRandom for RBPaddleID
fn from_random() -> Self
Source§impl PartialEq for RBPaddleID
impl PartialEq for RBPaddleID
impl Copy for RBPaddleID
impl StructuralPartialEq for RBPaddleID
Auto Trait Implementations§
impl Freeze for RBPaddleID
impl RefUnwindSafe for RBPaddleID
impl Send for RBPaddleID
impl Sync for RBPaddleID
impl Unpin for RBPaddleID
impl UnwindSafe for RBPaddleID
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read more