Library for structured binary data I/O
Data Fields
BDIO Struct Reference

bdio file descriptor More...

#include <bdio.h>

Data Fields

int state
 
int mode
 
int endian
 
FILE * fp
 file pointer to the bdio file
 
FILE * msg
 file pointer to file for error messages (e.g. stderr)
 
int verbose
 0: silent mode, 1: print all errors, default: 0
 
char error [256]
 Error message of last error that occured.
 
char ferror [256]
 Error message of first error that occured.
 
int nerror
 number of errors that occured so far
 
unsigned char * buf
 
int hcnt
 number of headers encountered (including current)
 
int hmagic
 magic number of the last header
 
int hversion
 bdio version of the last header
 
int hdirinfo1
 
int hdirinfo2
 
int hcdate
 date of first creation of the last header
 
int hmdate
 date of last modification of the last header
 
char * hcuser
 user of first creation of the last header
 
char * hmuser
 user of last modification of the last header
 
char * hchost
 host of first creation of the last header
 
char * hmhost
 host of last modification of the last header
 
char * hpinfo
 protocol-info | schema | generator | spec of the last header
 
int hssize
 combined length of user/host/pinfo strings of the last header
 
uint64_t hstart
 starting position of last header record
 
uint64_t rstart
 start position of current record or header
 
int rcnt
 number of records encountered (including current)
 
uint64_t rlen
 
char rlongrec
 1 if record is a "long record", 0 else
 
uint64_t ridx
 offset within current record or header
 
int rfmt
 format of current record
 
int ruinfo
 user info of current record
 
int rdsize
 size of a data-item in the current record e.g int32 -> 4
 
char rswap
 1/0 = records data has/has not to be byte-swapped
 
uint64_t bufstart
 offset in record where the buffer starts
 
int bufidx
 

Detailed Description

bdio file descriptor

Contains the state of the BDIO file and all data from the last header.

Field Documentation

unsigned char* BDIO::buf

buffer containing the last header/record to be written

int BDIO::bufidx

position in buffer; a byte at position bufidx in the buffer is written to position rstart+bufstart+bufidx in the file

int BDIO::endian

native byte ordering of the machine BDIO_LEND or BDIO_BEND

int BDIO::hdirinfo1

minimal number of non-header records to follow the last encountered header, before EOF or next header

int BDIO::hdirinfo2

minimal number of non-header bytes to follow the last encountered header, before EOF or next header

int BDIO::mode

mode in which the bdio file was opened: BDIO_R_MODE, BDIO_W_MODE or BDIO_A_MODE

uint64_t BDIO::rlen

total length of current record or header including the record-head

int BDIO::state

state of an open bdio file: BDIO_H_STATE, BDIO_R_STATE, BDIO_N_STATE or BDIO_E_STATE


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