pub struct CRFrameHeader {
pub version: u8,
pub is_event: bool,
pub run_id: u16,
pub event_id: u32,
pub frame_id: u32,
pub frame_type: CRFrameType,
pub data_sources: Vec<GapsDataSource>,
}Expand description
A specific type of CRFrameObject, which holds meta information concerning what this frame containes
Fields§
§version: u8The version of this frame, needs to be compatible with CRReader/Writer
is_event: boolDoes this frame contain (physics/calibration) event data?
run_id: u16Run id (if applicable)
event_id: u32Event id (if applicable)
frame_id: u32Frame id - that is a number which is increasing per each frame by design, no frame id shall be missing. If it is, something might actually be wrong
frame_type: CRFrameTypeWhat kind of data is stored in this frame?
- see CRFrameType reference
data_sources: Vec<GapsDataSource>What data sources does this frame contain?
Implementations§
Source§impl CRFrameHeader
impl CRFrameHeader
pub fn new() -> Self
Sourcepub fn add_datasource(&mut self, source: GapsDataSource)
pub fn add_datasource(&mut self, source: GapsDataSource)
Append a data source to the data sources of this frame.
Each data source can only be present once. If the source is already present, a warning is issued and it is not added again.
Trait Implementations§
Source§impl Clone for CRFrameHeader
impl Clone for CRFrameHeader
Source§impl Debug for CRFrameHeader
impl Debug for CRFrameHeader
Source§impl Default for CRFrameHeader
impl Default for CRFrameHeader
Source§impl Display for CRFrameHeader
impl Display for CRFrameHeader
Source§impl Frameable for CRFrameHeader
impl Frameable for CRFrameHeader
const CRFRAMEOBJECT_TYPE: CRFrameObjectType = CRFrameObjectType::CRFrameHeader
Source§fn pack(&self) -> CRFrameObjectwhere
Self: Serialization,
fn pack(&self) -> CRFrameObjectwhere
Self: Serialization,
Source§impl FromRandom for CRFrameHeader
Available on crate feature random only.
impl FromRandom for CRFrameHeader
random only.fn from_random() -> Self
Source§impl PartialEq for CRFrameHeader
impl PartialEq for CRFrameHeader
Source§impl Serialization for CRFrameHeader
impl Serialization for CRFrameHeader
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 CRFrameHeader from a bytestream
Layout (little endian): HEAD (2) | version (1) | is_event (1) | run_id (2) | event_id (4) | frame_id (4) | frame_type (1) | n_sources (1) | sources (n_sources) | TAIL (2)
Source§const SIZE: usize = 0
const SIZE: usize = 0
Source§fn guess_size(
stream: &Vec<u8>,
pos: usize,
offset: usize,
) -> Result<(usize, usize, usize), SerializationError>
fn guess_size( stream: &Vec<u8>, pos: usize, offset: usize, ) -> Result<(usize, usize, usize), SerializationError>
Source§fn verify_fixed(
stream: &Vec<u8>,
pos: &mut usize,
) -> Result<(), SerializationError>
fn verify_fixed( stream: &Vec<u8>, pos: &mut usize, ) -> Result<(), SerializationError>
Source§fn from_bytestream_alt(
bytestream: &Vec<u8>,
pos: &mut usize,
) -> Result<Self, SerializationError>where
Self: Sized,
fn from_bytestream_alt(
bytestream: &Vec<u8>,
pos: &mut usize,
) -> Result<Self, SerializationError>where
Self: Sized,
impl StructuralPartialEq for CRFrameHeader
Auto Trait Implementations§
impl Freeze for CRFrameHeader
impl RefUnwindSafe for CRFrameHeader
impl Send for CRFrameHeader
impl Sync for CRFrameHeader
impl Unpin for CRFrameHeader
impl UnsafeUnpin for CRFrameHeader
impl UnwindSafe for CRFrameHeader
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
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> ⓘ
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> ⓘ
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
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
&self to an expression for Diesel’s query builder. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
impl<T> SendAlias for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.