cdds_writem - DDS, write binary stream and map buffer

SYNOPSIS

#include "cdds.h"

int cdds_writem(out_bin, out_tag, in_bin, in_tag, in_buf, count);

BIN_TAG out_bin
FIELD_TAG out_tag
BIN_TAG in_bin
FIELD_TAG in_tag
void *in_buf
int count

[ Input | Output | Examples ]


DESCRIPTION

This functions maps data from a type buffer and write it into a binary stream.

INPUT

Out_bin is a binary tag, previously obtained from cdds_open. It specifies an output binary stream.

out_tag is a field tag, previously obtained eg. from cdds_member. It specifies a tag associated with out_bin. This provides a scale factor for count. If out_tag is zero (nominal), it defaults to the SEQUENCE (trace type) associated with out_bin.

In_bin is a binary tag, previously obtained from cdds_open. It specifies an input binary stream.

in_tag is a field tag, previously obtained eg. from cdds_member. It specifies a tag associated with in_bin. This provides a scale factor for count. If in_tag is zero (nominal), it defaults to the SEQUENCE (trace type) associated with in_bin.

Data is written from in_buf. The minimum size is count times the size of in_tag.

OUTPUT

Data is moved from out_buf to a temporary buffer, while converting from in_tag to out_tag. A byte sequence is copied from the buffer into out_bin. cdds_writem is preferable to executing cdds_writeand cdds_mapdirectly.

The return value is the number of types actually mapped and written. EOF is returned, if an error occurred before any transfer.

EXAMPLES

          
            BIN_TAG in_bin, out_bin;
            char *out_buf;
            ...
            /* write 10 traces from type buffer */
            cdds_writem(out_bin, 0, in_bin, 0, in_buf, 10);
          

SEE ALSO

      cdds_write Write data into binary stream
      cdds_map Map data between formats
    

AUTHOR

R. L. Selzler, EPTG (Oct 1995)