This function gets a single byte from the buffer containing the bit stream representation of the input message, for the specified parser object. The value of the index argument indicates which byte in the byte array is to be returned.
CciByte cpiBufferByte(
int* returnCode,
CciParser* parser,
CciSize index);
The requested byte is returned. If an error occurs, returnCode indicates the reason for the error.
This example is taken from the sample parser file BipSampPluginParser.c:
void advance(
PARSER_CONTEXT_ST* context,
CciParser* parser
){
int rc = 0;
/* Advance to the next character */
context->iIndex++;
/* Detect and handle the end condition */
if (context->iIndex == context->iSize) return;
/* Obtain the next character from the buffer */
context->iCurrentCharacter = cpiBufferByte(&rc, parser, context->iIndex);
}