57 [[nodiscard]]
virtual std::vector<IChannelGroup*>
ChannelGroups()
const = 0;
64 const std::string_view& name);
86 const std::vector<uint8_t>& record)
const;
99 mark_as_read_ = mark_as_read;
107 [[nodiscard]]
bool IsRead()
const {
return mark_as_read_; }
154 mutable bool mark_as_read_ =
false;
Base class for all MDF blocks.
Definition iblock.h:19
Interface against a channel group (CG) block.
Definition ichannelgroup.h:66
Defines a MDF channel (CN) block.
Definition ichannel.h:126
Interface to a data group (DG) block.
Definition idatagroup.h:42
virtual void RecordIdSize(uint8_t id_size)
Sets size of the record ID (bytes). Note that record ID and its size, is automatically set when writi...
virtual IChannelGroup * FindParentChannelGroup(const IChannel &channel) const =0
Support function that return the first CG block that contains a specific CN block.
void SetAsRead(bool mark_as_read=true) const
Set the DG blocks data as read.
Definition idatagroup.h:98
bool NotifySampleObservers(size_t sample, uint64_t record_id, const std::vector< uint8_t > &record) const
Notifies the observer that a new sample record have been read.
bool IsSubscribingOnChannelVlsd(const IChannel &channel) const
Checks if this data group subscribes on a specific channels VLSD raw data.
virtual uint8_t RecordIdSize() const
Returns the record ID size in bytes.
virtual std::vector< IChannelGroup * > ChannelGroups() const =0
Returns a list of channel groups.
virtual void ClearData()
Clear all temporary sample and data buffers.
bool IsSubscribingOnRecord(uint64_t record_id) const
Checks if this data group subscribes on a specific record.
void DetachAllSampleObservers() const
Detaches all observers from the measurement.
virtual void Description(const std::string &desc)
Sets the descriptive text for the measurement.
virtual std::string Description() const
Return the descriptive text.
bool IsSubscribingOnChannel(const IChannel &channel) const
Checks if this data group subscribes on a specific channel.
void DetachSampleObserver(const ISampleObserver *observer) const
Detach an observer from the measurement.
IChannelGroup * GetChannelGroup(const std::string_view &name) const
Returns the existing group by its name.
IChannelGroup * CreateChannelGroup(const std::string_view &name)
Create a new channel group or return the existing group.
std::map< uint64_t, std::vector< ISampleObserver * > > fast_observer_list_
The fast observer list is used internally when reading data.
Definition idatagroup.h:141
IChannelGroup * GetChannelGroup(uint64_t record_id) const
Return a channel group by its record id.
std::vector< ISampleObserver * > observer_list_
List of observers.
Definition idatagroup.h:136
~IDataGroup() override=default
Default destructor.
void InitFastObserverList()
The function optimize the observer list before reading data.
bool IsRead() const
Return true if the DG blocks data has been read not the DG block itself.
Definition idatagroup.h:107
bool IsEmpty() const
Returns true if no samples has been stored yet.
void AttachSampleObserver(ISampleObserver *observer) const
Internal function that attach a sample observer to the measurement block.
virtual IMetaData * MetaData() const
Returns the existing meta-data (MD) block if it exist.
virtual IMetaData * CreateMetaData()
Create or return the existing meta-data (MD) block.
virtual IChannelGroup * CreateChannelGroup()=0
Create a new empty channel group.
Interface to a sample observer that handle incoming samples events.
Definition isampleobserver.h:23
All MDF blocks inherits from the IBlock class. The interface class is used internally in lists....
Main namespace for the MDF library.
Definition canmessage.h:17