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ยง
Sourceยงimpl RBEventMemoryView
impl RBEventMemoryView
pub fn new() -> Self
pub fn decode_event_id(bytestream: &[u8]) -> Result<u32, SerializationError>
pub fn get_active_data_channels(&self) -> Vec<u8>
pub fn get_n_datachan(&self) -> u8
Trait Implementationsยง
Sourceยงimpl Clone for RBEventMemoryView
impl Clone for RBEventMemoryView
Sourceยงfn clone(&self) -> RBEventMemoryView
fn clone(&self) -> RBEventMemoryView
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 RBEventMemoryView
impl Debug for RBEventMemoryView
Sourceยงimpl Default for RBEventMemoryView
impl Default for RBEventMemoryView
Sourceยงimpl Display for RBEventMemoryView
impl Display for RBEventMemoryView
Sourceยงimpl FromRandom for RBEventMemoryView
impl FromRandom for RBEventMemoryView
fn from_random() -> Self
Sourceยงimpl PartialEq for RBEventMemoryView
impl PartialEq for RBEventMemoryView
Sourceยงimpl Serialization for RBEventMemoryView
impl Serialization for RBEventMemoryView
Sourceยงconst SIZE: usize = 18_530usize
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
const HEAD: u16 = 43_690u16
const TAIL: u16 = 21_845u16
Sourceยงfn to_bytestream(&self) -> Vec<u8>
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>
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>
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,
fn from_tofpacket(packet: &TofPacket) -> Result<Self, SerializationError>where
Self: Sized,
Decode a serializable directly from a TofPacket
fn from_slice(
_slice: &[u8],
_start_pos: usize,
) -> Result<Self, SerializationError>where
Self: Sized,
impl StructuralPartialEq for RBEventMemoryView
Auto Trait Implementationsยง
impl Freeze for RBEventMemoryView
impl RefUnwindSafe for RBEventMemoryView
impl Send for RBEventMemoryView
impl Sync for RBEventMemoryView
impl Unpin for RBEventMemoryView
impl UnwindSafe for RBEventMemoryView
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