cpiAppendToBuffer

Purpose

Appends data to the buffer containing the bit stream representation of a message, for the specified parser object.

Syntax

void cpiAppendToBuffer(
  int*        returnCode,
  CciParser*  parser,
  CciByte*    data,
  CciSize     length);

Parameters

returnCode
Receives the return code from the function (output).
Possible return codes are:
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_PARSER_OBJECT
  • CCI_INV_DATA_POINTER
  • CCI_INV_LENGTH
parser
Specifies the address of the parser object (input).
data
The address of the data to be appended to the buffer (input).
length
The size in bytes of the data to be appended to the buffer (input).

Return values

None. If an error occurs, returnCode indicates the reason for the error.

Sample

This example is taken from the sample parser file BipSampPluginParser.c (line 634):

cpiAppendToBuffer(&rc, parser, (char *)"Some test data", 14);
Related concepts
User-defined parsers
User-defined extensions
Related tasks
Creating a parser in C
Related reference
cpiBufferByte
cpiBufferPointer
cpiBufferSize
C parser utility functions