a0Pack()

Packs data into a buffer.


Syntax

a0tError a0Pack(
a0tBuffer *buffer,
a0tDatatype datatype,
void *inbuf,
int incount );

Arguments

Namerd/wrDescription
buffer write Buffer descriptor to pack into.
datatype read Datatype of the data to pack.
inbuf read Address of the data.
incount read Number of elements to pack.

Description

Packs into buffer the incount occurances of datatype typed data starting at address inbuf of memory. The new data packed are added to the end of the data already packed inside the buffer.


Return Values

If an error condition occurs, it returns the error code, otherwise it returns A0ErrOk. Possible values are as follows:
Error CodeDescription
A0ErrFailPack It was not possible to pack all data.
A0ErrOkSuccessful completion.

See Also

a0Unpack() a0NewBuffer() a0ClearBuffer() a0SendBuffer() a0ReceiveBuffer() a0ISendBuffer() a0IReceiveBuffer() a0_DATATYPES