DTMwriteMsg(3DTM)

NAME
DTMwriteMsg - Write all header information and data to an output port.

SYNOPSIS
#include <dtm.h>

int DTMwriteMsg(int outport, char header, int header_length,
                void *data, int num_elements, DTMTYPE type)

DESCRIPTION
DTMwriteMsg combines the command sequence:

	DTMbeginWrite(outport, header, header_length);
	DTMwriteDataset(outport, data, num_elements, type);
	DTMendWrite(outport);

into one function. This function is useful if and only if all of the data to be sent can be placed into a single buffer. Using DTMwriteMsg avoids the overhead involved with making two additional function calls and allows all of the header and the data buffer to be sent at once instead of separately. If the data must be sent in small packets, then the three functions listed above must be used with multiple calls to DTMwriteDataset.

SEE ALSO
DTM, DTMbeginWrite, DTMwriteDataset, DTMendWrite

DIAGNOSTICS
DTMwriteDataset returns the value DTM_OK upon sucessful completion of transmitting the data. DTMERROR is returned when DTMwriteMsg fails. The variable DTMerrno can have any one of these possible values after failure:
	DTMBADPORT	Port identifier is bad/corrupt/stale
	DTMTIMEOUT	Timeout waiting for connection
	DTMPORTINIT	DTM port not initialized
	DTMSOCK	Socket error
	DTMEOF	EOF error