tof_dataclasses::events::rb_eventmemoryview

Struct RBEventMemoryView

Source
pub struct RBEventMemoryView {
Show 19 fields pub head: u16, pub status: u16, pub len: u16, pub roi: u16, pub dna: u64, pub fw_hash: u16, pub id: u16, pub ch_mask: u16, pub event_id: u32, pub dtap0: u16, pub dtap1: u16, pub timestamp_32: u32, pub timestamp_16: u16, pub ch_head: [u16; 9], pub ch_adc: [[u16; 1024]; 9], pub ch_trail: [u32; 9], pub stop_cell: u16, pub crc32: u32, pub tail: u16,
}
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
Expand description

RBEventMemoryView is the closest representation of actual RB binary data in memory, with a fixed number of channels at compile time, optimized for speed by using fixed (at compile time) sizes for channels and sample size

FIXME - the channel mask is only one byte, and we can get rid of 3 bytes for the DNA

Fieldsยง

ยงhead: u16
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงstatus: u16
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงlen: u16
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงroi: u16
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงdna: u64
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงfw_hash: u16
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงid: u16
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงch_mask: u16
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงevent_id: u32
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงdtap0: u16
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงdtap1: u16
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงtimestamp_32: u32
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงtimestamp_16: u16
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงch_head: [u16; 9]
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงch_adc: [[u16; 1024]; 9]
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงch_trail: [u32; 9]
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงstop_cell: u16
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงcrc32: u32
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!
ยงtail: u16
๐Ÿ‘ŽDeprecated since 0.7.2: RBEvent is sufficient to fulfill all our needs!

Implementationsยง

Trait Implementationsยง

Sourceยง

impl Clone for RBEventMemoryView

Sourceยง

fn clone(&self) -> RBEventMemoryView

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 Debug for RBEventMemoryView

Sourceยง

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

Formats the value using the given formatter. Read more
Sourceยง

impl Default for RBEventMemoryView

Sourceยง

fn default() -> Self

Returns the โ€œdefault valueโ€ for a type. Read more
Sourceยง

impl Display for RBEventMemoryView

Sourceยง

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

Formats the value using the given formatter. Read more
Sourceยง

impl FromRandom for RBEventMemoryView

Sourceยง

impl PartialEq for RBEventMemoryView

Sourceยง

fn eq(&self, other: &RBEventMemoryView) -> 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 Serialization for RBEventMemoryView

Sourceยง

const SIZE: usize = 18_530usize

The SIZE is the size of the serialized bytestream INCLUDING 4 bytes for head and tail bytes. In case the struct does NOT HAVE a fixed size, SIZE will be 0 (so default value of the trait
Sourceยง

const HEAD: u16 = 43_690u16

Sourceยง

const TAIL: u16 = 21_845u16

Sourceยง

fn to_bytestream(&self) -> Vec<u8>

Encode a serializable to a bytestream
Sourceยง

fn from_bytestream( stream: &Vec<u8>, pos: &mut usize, ) -> Result<Self, SerializationError>

Decode a serializable from a bytestream
Sourceยง

fn verify_fixed( stream: &Vec<u8>, pos: &mut usize, ) -> Result<(), SerializationError>

Verify that the serialized representation of the struct has the correct size, including header + footer. Read more
Sourceยง

fn from_tofpacket(packet: &TofPacket) -> Result<Self, SerializationError>
where Self: Sized,

Decode a serializable directly from a TofPacket
Sourceยง

fn from_slice( _slice: &[u8], _start_pos: usize, ) -> Result<Self, SerializationError>
where Self: Sized,

Sourceยง

fn to_slice(&self) -> &[u8] โ“˜
where Self: Sized,

Construct byte slice out of self. Read more
Sourceยง

impl StructuralPartialEq for RBEventMemoryView

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, dst: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> IntoEither for T

Sourceยง

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 more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Sourceยง

impl<T> IntoSql for T

Sourceยง

fn into_sql<T>(self) -> Self::Expression

Convert self to an expression for Dieselโ€™s query builder. Read more
Sourceยง

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
where &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,

Convert &self to an expression for Dieselโ€™s query builder. Read more
Sourceยง

impl<T> Pointable for T

Sourceยง

const ALIGN: usize = _

The alignment of pointer.
Sourceยง

type Init = T

The type for initializers.
Sourceยง

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Sourceยง

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Sourceยง

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Sourceยง

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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> ToString for T
where T: Display + ?Sized,

Sourceยง

default fn to_string(&self) -> String

Converts the given value to a String. 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.
Sourceยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Sourceยง

fn vzip(self) -> V