Next: write_dpktf_def, Previous: read_hdr, Up: Internal Functions
Write a field definition to an I/O channel.
#include <bpipe/bpipe.h>static int write_defn( IOchannel *channel, char *name, BPDataType type, BPMatrix *matrix );
IOchannel *channel
- the iochannel
char *name
- the name of the data
BPDataType type
- the type of the data
Possible values for aBPDataType
are as follows:BPDType_char
,BPDType_double
,BPDType_int
,BPDType_uint
,BPDType_DVector2
,BPDType_DVector3
,BPDType_IVector2
,BPDType_IVector3
,BPDType_UIVector2
,BPDType_UIVector3
,BPDType_DComplex
,BPDType_DCVector2
,BPDType_DCVector3
BPMatrix *matrix
- the matrix
This routine writes a definition (either header field or data packet field) to an I/O channel. It's kludgy to avoid overrunning strings. one big sprintf would look nicer. maybe a bpipe_iochannel_printf?
It returns zero upon success, non-zero upon error.