cdds_name - query fields within DDS structures
SYNOPSIS
#include "cdds.h"
const char *cdds_name(bin_tag, field_tag);
-
BIN_TAG bin_tag
FIELD_TAG field_tag
DESCRIPTION
fdds_name returns the symbolic name associated with
the field_tag.
A NULL pointer is returned on any error.
INPUT
bin_tag is a binary tag, previously obtained from
cdds_open.
It specifies a particular binary stream.
field_tag is the tag of the field for which the information
is desired. A value of "0" will default to the trace (SEQUENCE).
EXAMPLE
BIN_TAG bin;
FIELD_TAG tag;
int RecNum_size, prec, algn, cnt;
char *name, *genus;
...
/* byte size of RecNum field */
tag = cdds_member(bin, 0, "RecNum");
RecNum_size = cdds_prec(bin, tag);
...
/* scan trace headers */
tag = cdds_member(bin, 0, "");
while (tag)
{
name = cdds_name(bin, tag);
genus = cdds_genus(bin, tag);
prec = cdds_prec(bin, tag);
algn = cdds_align(bin, tag);
cnt = cdds_count(bin, tag);
...
tag = cdds_next(bin, tag);
}
SEE ALSO
cdds_member Field member tag
cdds_next Field member next tag
cdds_prev Field member previous tag
cdds_parent Field member parent tag
cdds_prime Field member prime type tag
AUTHOR
Jerry Ehlers, BP America (May 2003)
|