a0Unpack()

Unpacks data from a buffer.


Syntax

a0tError a0Unpack(
a0tBuffer *buffer,
a0tDatatype datatype,
void *outbuf,
int outcount );

Arguments

Namerd/wrDescription
buffer read Buffer descriptor to unpack from.
datatype read Datatype of the data to unpack.
outbuf write Address to unpack to.
outcount read Number of elements to unpack.

Description

Unpacks from buffer the outcount occurances of datatype typed data and stores it in memory, starting at address outbuf. Successive unpacks extract data from the beginning of the buffer, until no more data exist.


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 unpack all data.
A0ErrOkSuccessful completion.

See Also

a0Pack() a0NewBuffer() a0SendBuffer() a0ReceiveBuffer() a0ISendBuffer() a0IReceiveBuffer() a0_DATATYPES