pub struct ChannelGroup {
pub id: usize,
pub index: usize,
pub data_group_index: usize,
pub acquisition_name: String,
pub sample_count: u64,
pub channels: Vec<Channel>,
pub source: Option<SourceInfo>,
pub comment: String,
/* private fields */
}Expand description
A channel group containing channels sampled together.
All channels in a channel group share the same time axis and have the same number of samples.
Fields§
§id: usizeUnique identifier for this channel group.
index: usizeIndex of this channel group within its data group.
data_group_index: usizeData group index this channel group belongs to.
acquisition_name: StringAcquisition name.
sample_count: u64Number of samples (cycles).
channels: Vec<Channel>Channels in this group.
source: Option<SourceInfo>Source information.
comment: StringComment/description.
Implementations§
Source§impl ChannelGroup
impl ChannelGroup
Sourcepub fn channel_count(&self) -> usize
pub fn channel_count(&self) -> usize
Returns the number of channels in this group.
Sourcepub fn master_channel(&self) -> Option<&Channel>
pub fn master_channel(&self) -> Option<&Channel>
Finds the master (time) channel in this group.
Sourcepub fn find_channel(&self, name: &str) -> Option<&Channel>
pub fn find_channel(&self, name: &str) -> Option<&Channel>
Finds a channel by name.
Sourcepub fn record_size(&self, rec_id_size: u8) -> usize
pub fn record_size(&self, rec_id_size: u8) -> usize
Returns the total record size including record ID and invalidation bytes.
Sourcepub fn data_bytes_len(&self) -> usize
pub fn data_bytes_len(&self) -> usize
Returns the number of channel-data bytes per record, excluding both the record ID and the invalidation bytes.
Sourcepub fn inval_bytes_len(&self) -> usize
pub fn inval_bytes_len(&self) -> usize
Returns the number of invalidation bytes per record.
Sourcepub fn sample_reductions(&self) -> &[SampleReduction]
pub fn sample_reductions(&self) -> &[SampleReduction]
Returns the sample-reduction levels attached to this group.
Each describes a condensed view of the group’s data. The reduced values
themselves cannot be read — see SampleReduction.
Sourcepub fn record_id(&self) -> u64
pub fn record_id(&self) -> u64
Returns the record ID identifying this group within an unsorted stream.
Sourcepub fn is_vlsd(&self) -> bool
pub fn is_vlsd(&self) -> bool
Returns true if this group stores variable-length signal data rather than channel records.
Sourcepub fn is_bus_event(&self) -> bool
pub fn is_bus_event(&self) -> bool
Returns true if this group holds logged bus traffic rather than measurements.
The frames themselves are read with crate::Mf4File::can_frames when
the traffic is CAN.
Sourcepub fn is_plain_bus_event(&self) -> bool
pub fn is_plain_bus_event(&self) -> bool
Returns true if this group holds nothing but bus events.
The flag says no decoded signal channels share the group with the raw
frames; it does not mean the frame fields themselves are stored in some
reduced form. Every CANedge log in the test corpus sets it while
carrying the full set of composition channels, so it is no obstacle to
crate::Mf4File::can_frames and should not be used to decide whether
a group is readable.
Sourcepub fn matches_offset(&self, offset: u64) -> bool
pub fn matches_offset(&self, offset: u64) -> bool
Returns true if this group’s block sits at offset in the file, which is
how a variable-length channel names the group holding its payloads.
Sourcepub fn block_offset(&self) -> u64
pub fn block_offset(&self) -> u64
Returns the file offset of this group’s CG block.
See DataGroup::block_offset for why an address is what is offered.
Sourcepub fn payload_size(&self) -> usize
pub fn payload_size(&self) -> usize
Returns the size of a record’s own bytes, excluding any record ID.
This is the stride that applies once records have been separated from an interleaved stream, where the record ID is no longer present.
Trait Implementations§
Source§impl Clone for ChannelGroup
impl Clone for ChannelGroup
Auto Trait Implementations§
impl Freeze for ChannelGroup
impl RefUnwindSafe for ChannelGroup
impl Send for ChannelGroup
impl Sync for ChannelGroup
impl Unpin for ChannelGroup
impl UnsafeUnpin for ChannelGroup
impl UnwindSafe for ChannelGroup
Blanket Implementations§
impl<T> Allocation for T
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> 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 more