EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
DataHeader Class Reference

Used by DataFile. More...

#include <DataFile.h>

Classes

struct  DataHeaderData
 The header data. More...
 

Public Types

enum  { FilenameLength = 40 }
 

Public Member Functions

 DataHeader (DataFile *datafile)
 Create header for given data file. More...
 
 ~DataHeader ()
 Destructor releases the current DataFile.
 
void clear ()
 Fill the data with zeroes, invalidate the data.
 
bool isValid ()
 Is offset valid?
 
size_t available ()
 Returns number of unused samples in buffer.
 
size_t capacity ()
 Returns max. number of values in buffer.
 
void read (FileOffset offset)
 Read (and convert) from offset in current DataFile, updating offset. More...
 
void write () const
 Convert and write to current offset in current DataFile. More...
 
bool read_next ()
 Read the next data header.
 
bool read_prev ()
 Read the previous data header.
 
void set_prev (const stdString &basename, FileOffset offset)
 Helper to set data.prev_file/offset.
 
void set_next (const stdString &basename, FileOffset offset)
 Helper to set data.next_file/offset.
 
void show (FILE *f, bool full_detail)
 Print data.
 

Public Attributes

struct DataHeader::DataHeaderData data
 header data
 
DataFiledatafile
 The currently used DataFile (DataHeader handles ref and release).
 
FileOffset offset
 Offset in current file for this header. More...
 

Detailed Description

Used by DataFile.

Each data block in the binary data files starts with a DataHeader.

Constructor & Destructor Documentation

DataHeader::DataHeader ( DataFile datafile)

Create header for given data file.

DataHeader references and releases the DataFile. Note that operations like readNext might switch to another DataFile!

Member Function Documentation

void DataHeader::read ( FileOffset  offset)

Read (and convert) from offset in current DataFile, updating offset.

Exceptions
GenericExceptionon error.
void DataHeader::write ( ) const

Convert and write to current offset in current DataFile.

Exceptions
GenericExceptionon error.

Member Data Documentation

FileOffset DataHeader::offset

Offset in current file for this header.

Note that this is the pointer to the DataHeaderData on the disk. Data files with tags have 'INFO' + channel name before that!


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