ASN1BERMessageBuffer Class Reference
[BER Message Buffer Classes]

#include <asn1BerCppTypes.h>

Inheritance diagram for ASN1BERMessageBuffer:
ASN1BERDecodeBuffer ASN1BEREncodeBuffer

List of all members.

Public Member Functions

int calcIndefLen (OSOCTET *buf_p, int bufSize=INT_MAX)
void binDump ()
void hexDump (int numocts)
int CalcIndefLen (OSOCTET *buf_p)
void BinDump ()
void HexDump (int numocts)

Protected Member Functions

 ASN1BERMessageBuffer (Type bufferType)
 ASN1BERMessageBuffer (Type bufferType, OSRTContext *pContext)

Detailed Description

The ASN1BERMessageBuffer class is derived from the ASN1MessageBuffer base class. It is the base class for the ASN1BEREncodeBuffer and ASN1BERDecodeBuffer derived classes. It contains variables and methods specific to encoding or decoding ASN.1 messages using the Basic Encoding Rules(BER) and Distinguished Encoding Rules (DER). It is used to manage the buffer into which an ASN.1 message is to be encoded or decoded.


Constructor & Destructor Documentation

ASN1BERMessageBuffer::ASN1BERMessageBuffer ( Type  bufferType  )  [inline, protected]

The protected constructor creates a new context and sets the buffer class type. Use getStatus() method to determine has error occured during the initialization or not.

Parameters:
bufferType Type of message buffer that is being created (for example, BEREncode or BERDecode).
ASN1BERMessageBuffer::ASN1BERMessageBuffer ( Type  bufferType,
OSRTContext *  pContext 
) [inline, protected]

The protected constructor uses an existing context and sets the buffer class type. Use getStatus() method to determine has error occured during the initialization or not.

Parameters:
bufferType Type of message buffer that is being created (for example, BEREncode or BERDecode).
pContext A pointer to the context structure with which this buffer is associated.

Member Function Documentation

void ASN1BERMessageBuffer::binDump (  )  [inline]

This method outputs a formatted binary dump of the current buffer contents to stdout.

Calling Sequence:

messageBuffer.binDump ();

where messageBuffer is an ASN1BERMessageBuffer derived class object.

References xu_dump().

int ASN1BERMessageBuffer::calcIndefLen ( OSOCTET *  buf_p,
int  bufSize = INT_MAX 
) [inline]

This method calculates the actual length of an indefinite length message component.

Calling Sequence:

len=messageBuffer.calcIndefLen (buf_p);

where messageBuffer is an ASN1BERMessageBuffer derived class object.

Parameters:
buf_p A pointer to a message component encoded using indefinite length encoding.
bufSize Size of the buffer buf_p (in octets).
Returns:
Length, in octets, of message component, as int.

References xd_indeflen_ex().

void ASN1BERMessageBuffer::hexDump ( int  numocts  )  [inline]

This method outputs a hexadecimal dump of the current buffer contents to stdout.

Calling sequence:

messageBuffer.hexDump ();

where messageBuffer is an ASN1BERMessageBuffer derived class object.


The documentation for this class was generated from the following file: