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

Interface class against an MDF HD block. More...

#include "mdf/iheader.h"

Inheritance diagram for mdf::IHeader:
Collaboration diagram for mdf::IHeader:

Public Member Functions

virtual void Author (const std::string &author)=0
 Sets the author of the file.
 
virtual std::string Author () const =0
 Returns the author of the file.
 
virtual void Department (const std::string &department)=0
 Sets the department name.
 
virtual std::string Department () const =0
 Returns the department.
 
virtual void Project (const std::string &name)=0
 Sets the project name.
 
virtual std::string Project () const =0
 Returns the project name.
 
virtual void Subject (const std::string &subject)=0
 Sets the subject of the file.
 
virtual std::string Subject () const =0
 Returns the subject of the file.
 
virtual void Description (const std::string &description)=0
 Sets the description of the file.
 
virtual std::string Description () const =0
 Returns the description of the file.
 
virtual void MeasurementId (const std::string &uuid)
 Sets a unique identifier for the measurement.
 
virtual std::string MeasurementId () const
 Returns the unique measurement identifier.
 
virtual void RecorderId (const std::string &uuid)
 Sets a unique identifier for the recorder.
 
virtual std::string RecorderId () const
 Returns the unique recorder identifier.
 
virtual void RecorderIndex (int64_t index)
 Sets the recorder order number.
 
virtual int64_t RecorderIndex () const
 Returns the recorder order number.
 
virtual void StartTime (uint64_t ns_since_1970)=0
 Sets the absolute measurement time for the file.
 
virtual void StartTime (ITimestamp &timestamp)=0
 Sets the absolute measurement time for the file.
 
virtual uint64_t StartTime () const =0
 Returns the absolute measurement time for the file.
 
virtual const IMdfTimestampStartTimestamp () const =0
 Returns the start timestamp of the measurement.
 
virtual IMetaDataCreateMetaData ()
 Returns meta data information object.
 
virtual IMetaDataMetaData () const
 Returns meta data information object.
 
virtual IAttachmentCreateAttachment ()
 Create a new attachment block.
 
virtual std::vector< IAttachment * > Attachments () const
 Returns a list of attachments.
 
virtual IFileHistoryCreateFileHistory ()
 Create a new file history block.
 
virtual std::vector< IFileHistory * > FileHistories () const
 Returns a list of file history blocks.
 
virtual IEventCreateEvent ()
 Creates a new event block.
 
virtual std::vector< IEvent * > Events () const
 Returns a list events.
 
virtual IChannelHierarchyCreateChannelHierarchy ()
 Creates a new channel hierarchy block.
 
virtual std::vector< IChannelHierarchy * > ChannelHierarchies () const
 Returns a list of channel hierarchy blocks.
 
virtual IDataGroupCreateDataGroup ()=0
 Creates a new data group block.
 
virtual std::vector< IDataGroup * > DataGroups () const =0
 Returns a list of measurements.
 
virtual IDataGroupLastDataGroup () const =0
 Returns the last measurement in the file.
 
virtual void StartAngle (double angle)
 Sets the start angle for the measurements.
 
virtual std::optional< double > StartAngle () const
 
virtual void StartDistance (double distance)
 Sets the start distance.
 
virtual std::optional< double > StartDistance () const
 Returns the start distance in meters.
 
- 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 Member Functions

 ~IHeader () override=default
 Default constructor.
 

Detailed Description

Interface class against a header block (HD) in a MDF file. The header block is the main root that holds all other blocks except the ID block.

Member Function Documentation

◆ Attachments()

virtual std::vector< IAttachment * > mdf::IHeader::Attachments ( ) const
nodiscardvirtual

Returns a list of attachments in the measurement file.

Returns
list of attachments

◆ Author() [1/2]

virtual std::string mdf::IHeader::Author ( ) const
nodiscardpure virtual

Returns the author of the file.

Returns
Author of the file.

◆ Author() [2/2]

virtual void mdf::IHeader::Author ( const std::string & author)
pure virtual

Sets the author of the files.

Parameters
authorAuthor of the file.

◆ ChannelHierarchies()

virtual std::vector< IChannelHierarchy * > mdf::IHeader::ChannelHierarchies ( ) const
nodiscardvirtual

Returns a list of channel hierarchy blocks in the measurement file.

Returns
List of interface pointers.

◆ CreateAttachment()

virtual IAttachment * mdf::IHeader::CreateAttachment ( )
nodiscardvirtual

Creates a new attachment block (AT) that reference an external file. This file can be just referenced or embedded into the MDF file. If it is embedded, the file may be compressed as well. Note that MDF3 doesn't support attachments.

Returns
An attachment interface pointer.

◆ CreateChannelHierarchy()

virtual IChannelHierarchy * mdf::IHeader::CreateChannelHierarchy ( )
nodiscardvirtual

Creates a new channel hierarchy (CH) block.

Returns
Returns a channel hierarchy interface pointer.

◆ CreateDataGroup()

virtual IDataGroup * mdf::IHeader::CreateDataGroup ( )
nodiscardpure virtual

Creates a new data group (DG) block.

Returns
Returns a data group interface pointer.

◆ CreateEvent()

virtual IEvent * mdf::IHeader::CreateEvent ( )
nodiscardvirtual

Creates a new event (EV) block.

Returns
An event interface pointer.

◆ CreateFileHistory()

virtual IFileHistory * mdf::IHeader::CreateFileHistory ( )
nodiscardvirtual

Creates a new file history (FH) block that reference a change/update of the MDF file.

Returns
A file history interface pointer.

◆ CreateMetaData()

virtual IMetaData * mdf::IHeader::CreateMetaData ( )
nodiscardvirtual

Returns meta data as a text string typically as an XML snippets. Note that this function also creates the MD block if it is missing.

Returns
Returns meta data.

◆ DataGroups()

virtual std::vector< IDataGroup * > mdf::IHeader::DataGroups ( ) const
nodiscardpure virtual

Returns a list of measurements in the file also known as DG blocks.

Returns
List of measurements.

◆ Department() [1/2]

virtual std::string mdf::IHeader::Department ( ) const
nodiscardpure virtual

Returns the department name.

Returns
Department name.

◆ Department() [2/2]

virtual void mdf::IHeader::Department ( const std::string & department)
pure virtual

Sets the department name.

Parameters
departmentDepartment name.

◆ Description() [1/2]

virtual std::string mdf::IHeader::Description ( ) const
nodiscardpure virtual

Returns the description of the file.

Returns
Description of the file.

◆ Description() [2/2]

virtual void mdf::IHeader::Description ( const std::string & description)
pure virtual

Sets the description of the file.

Parameters
descriptionDescription of the file.

◆ Events()

virtual std::vector< IEvent * > mdf::IHeader::Events ( ) const
nodiscardvirtual

Returns a list of event blocks in the measurement file.

Returns
List of event interface pointers.

◆ FileHistories()

virtual std::vector< IFileHistory * > mdf::IHeader::FileHistories ( ) const
nodiscardvirtual

Returns a list of file history blocks in the measurement file.

Returns
List of event interface pointers.

◆ LastDataGroup()

virtual IDataGroup * mdf::IHeader::LastDataGroup ( ) const
nodiscardpure virtual

Returns the last measurement in the file.

Returns
Last DG block.

◆ MeasurementId() [1/2]

virtual std::string mdf::IHeader::MeasurementId ( ) const
nodiscardvirtual

Returns the unique measurement identifier of the file.

Returns
Unique identifier (UUID) of the measurement.

◆ MeasurementId() [2/2]

virtual void mdf::IHeader::MeasurementId ( const std::string & uuid)
virtual

Sets a unique identifier (UUID) for the file. This identify files from the same measurement.

Parameters
uuidUnique identifier (UUID).

◆ MetaData()

virtual IMetaData * mdf::IHeader::MetaData ( ) const
nodiscardvirtual

Returns meta data as a text string typically as an XML snippets.

Returns
Returns meta data or a null pointer if no MD block.

◆ Project() [1/2]

virtual std::string mdf::IHeader::Project ( ) const
nodiscardpure virtual

Returns the project name.

Returns
Project name

◆ Project() [2/2]

virtual void mdf::IHeader::Project ( const std::string & name)
pure virtual

Sets the project name.

Parameters
nameProject name.

◆ RecorderId() [1/2]

virtual std::string mdf::IHeader::RecorderId ( ) const
nodiscardvirtual

Returns the unique recorder identifier of the file.

Returns
Unique identifier (UUID) of the recorder.

◆ RecorderId() [2/2]

virtual void mdf::IHeader::RecorderId ( const std::string & uuid)
virtual

Sets a unique identifier (UUID) for measurements from the same recorder.

Parameters
uuidUnique identifier (UUID).

◆ RecorderIndex() [1/2]

virtual int64_t mdf::IHeader::RecorderIndex ( ) const
nodiscardvirtual

Returns the recorder order number.

Returns
Order number.

◆ RecorderIndex() [2/2]

virtual void mdf::IHeader::RecorderIndex ( int64_t index)
virtual

Sets the recorder order number.

Parameters
indexOrder number

◆ StartAngle() [1/2]

virtual std::optional< double > mdf::IHeader::StartAngle ( ) const
nodiscardvirtual

Returns the start angle.

Returns the start angle of the measurement in radians.

Returns
Start angle in radians.

◆ StartAngle() [2/2]

virtual void mdf::IHeader::StartAngle ( double angle)
virtual

Sets the start angle for the measurements in radians.

Parameters
angleStart angle.

◆ StartDistance() [1/2]

virtual std::optional< double > mdf::IHeader::StartDistance ( ) const
nodiscardvirtual

Sets the start distance in meters.

Returns
Start distance in meters.

◆ StartDistance() [2/2]

virtual void mdf::IHeader::StartDistance ( double distance)
virtual

Sets the start distance in meter for all measurements.

Parameters
distanceStart distance in meters.

◆ StartTime() [1/3]

virtual uint64_t mdf::IHeader::StartTime ( ) const
nodiscardpure virtual

Returns the absolute start time for the measurement file.

Returns
Nanoseconds since 1970.

◆ StartTime() [2/3]

virtual void mdf::IHeader::StartTime ( ITimestamp & timestamp)
pure virtual

Sets the absolute start time for the measurement file using an ITimestamp object.

Parameters
timestampAn ITimestamp object representing the start time.

◆ StartTime() [3/3]

virtual void mdf::IHeader::StartTime ( uint64_t ns_since_1970)
pure virtual

Sets the absolute start time for the measurement file.

Parameters
ns_since_1970Nanoseconds since 1970.

◆ StartTimestamp()

virtual const IMdfTimestamp * mdf::IHeader::StartTimestamp ( ) const
nodiscardpure virtual

This function returns the start timestamp of the measurement as a pointer to an IMdfTimestamp object.

Returns
Pointer to an IMdfTimestamp object representing the start timestamp.

◆ Subject() [1/2]

virtual std::string mdf::IHeader::Subject ( ) const
nodiscardpure virtual

Returns the subject of the file

Returns
Subject of the file.

◆ Subject() [2/2]

virtual void mdf::IHeader::Subject ( const std::string & subject)
pure virtual

Sets the subject of the file.

Parameters
subjectSubject of the file.

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