MDF Lib 2.2
Interface against MDF 3/4 files
Loading...
Searching...
No Matches
mdf::IChannelGroup Class Referenceabstract

Interface against a channel group (CG) block. More...

#include <ichannelgroup.h>

Inheritance diagram for mdf::IChannelGroup:
Collaboration diagram for mdf::IChannelGroup:

Public Member Functions

virtual void RecordId (uint64_t record_id)=0
 Sets the record identity.
 
virtual uint64_t RecordId () const =0
 Record identity.
 
virtual void Name (const std::string &name)=0
 Sets the name.
 
virtual std::string Name () const =0
 CG name.
 
virtual void Description (const std::string &description)=0
 Sets a descriptive text.
 
virtual std::string Description () const =0
 Description.
 
virtual uint64_t NofSamples () const =0
 Sets number of samples.
 
virtual void NofSamples (uint64_t nof_samples)=0
 Number of samples.
 
virtual uint16_t Flags () const
 Sets CgFlag.
 
virtual void Flags (uint16_t flags)
 Returns CgFlag.
 
virtual char16_t PathSeparator ()
 Sets the path separator.
 
virtual void PathSeparator (char16_t path_separator)
 Path separator.
 
virtual std::vector< IChannel * > Channels () const =0
 Returns a list of channels.
 
virtual IChannelCreateChannel ()=0
 Creates a new channel.
 
virtual IChannelCreateChannel (const std::string_view &name)
 Creates a new channel or returns an existing channel.
 
virtual IChannelGetChannel (const std::string_view &name) const
 Returns an existing channels part of name.
 
virtual const IChannelGetXChannel (const IChannel &reference) const =0
 Returns an external reference channel.
 
virtual ISourceInformationCreateSourceInformation ()
 Create a source information (SI) block.
 
virtual ISourceInformationSourceInformation () const
 Returns the source information (SI) block if it exist. *‍/.
 
SampleRecord GetSampleRecord () const
 Support function that creates a sample record.
 
void ResetSampleCounter () const
 Resets the internal sample counter. Internal use only.
 
virtual void ClearData ()
 Resets all temporary stored samples.
 
void IncrementSample () const
 Add a sample.
 
size_t Sample () const
 Returns number of samples.
 
virtual IMetaDataCreateMetaData ()
 Creates a meta-data (MD) block.
 
virtual IMetaDataMetaData () const
 Returns the meta-data (MD) block if it exist.
 
virtual const IDataGroupDataGroup () const =0
 Returns a pointer to data group (DG) block.
 
- Public Member Functions inherited from mdf::IBlock
virtual ~IBlock ()=default
 Default destructor.
 
virtual int64_t Index () const =0
 File position within the file.
 
virtual std::string BlockType () const =0
 Returns the block type.
 

Protected Attributes

std::vector< uint8_t > sample_buffer_
 Temporary record when saving samples.
 

Detailed Description

A channel group defines a group of signals that are sampled simultaneously. So the number of samples are the same for the channels. Each data sample is stored in so-called record buffer. The record buffer normally have fixed length.

The above is somewhat not correct because if the CG block doesn't have any signals, it stores some other data which typical is used when logging bus messages.

Member Function Documentation

◆ GetChannel()

virtual IChannel * mdf::IChannelGroup::GetChannel ( const std::string_view & name) const
nodiscardvirtual

Note that the function search for a name that includes the search name. Example if the search name is '.DataLength', the signal with the name 'CAN_DataFrame.DataLength' will be returned the name instead of the full name


The documentation for this class was generated from the following file: