Next: dpktf_node_name_cmp, Previous: dpktf_name_cmp, Up: Internal Functions
Create and initialize a data packet field.
#include <bpipe/bpipe.h>static DpktField *dpktf_new( const char *name, BPDataType type );
const char *name
- name of data packet field
BPDataType type
- storage class of field
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
This routine creates and initializes a data packet field structure. It duplicates the passed field name, and type. They are all assumed to be valid.
It returns a pointer to a dynamically allocated and initialized
DpktField
structure. Upon error it returns NULL
and
sets bpipe_errno
.
Upon error bpipe_errno
is set to one of the following:
BPENOMEM