EPICS ARCHIVER V4
|
#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 | |
DataFile * | datafile |
The currently used DataFile (DataHeader handles ref and release). | |
FileOffset | offset |
Offset in current file for this header. More... | |
Used by DataFile.
Each data block in the binary data files starts with a DataHeader.
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!
void DataHeader::read | ( | FileOffset | offset | ) |
Read (and convert) from offset in current DataFile, updating offset.
GenericException | on error. |
void DataHeader::write | ( | ) | const |
Convert and write to current offset in current DataFile.
GenericException | on error. |
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!