ASN1PERMessageBuffer Class Reference

class ASN1PERMessageBuffer : public ASN1MessageBuffer

The ASN1PERMessageBuffer class is derived from the ASN1MessageBuffer base class. It is the base class for the ASN1PEREncodeBuffer and ASN1PERDecodeBuffer derived classes. It contains variables and methods specific to encoding or decoding ASN.1 messages using the Packed Encoding Rules (PER). It is used to manage the buffer into which an ASN.1 message is to be encoded or decoded.

Public Member Functions
voidBinDump(const char *)
intGetMsgLen()
voidHexDump()
voidSetTrace(OSBOOL)
voidbinDump(const char *)
size_t getMsgLen()
voidhexDump()
EXTPERMETHOD intsetBuffer(const OSOCTET *, size_t)
voidsetTrace(OSBOOL)
Protected Member Functions
ASN1PERMessageBuffer(Type, OSBOOL)
ASN1PERMessageBuffer(Type, OSOCTET *, size_t, OSBOOL)
ASN1PERMessageBuffer(Type, OSOCTET *, size_t, OSBOOL, OSRTContext *)
Inherited Functions
ASN1MessageBuffer::ASN1MessageBuffer(Type)
ASN1MessageBuffer::ASN1MessageBuffer(Type,OSRTContext *)
ASN1MessageBuffer::GetMsgCopy()
ASN1MessageBuffer::GetMsgPtr()
ASN1MessageBuffer::PrintErrorInfo()
ASN1MessageBuffer::addEventHandler(Asn1NamedEventHandler *)
ASN1MessageBuffer::getAppInfo()
ASN1MessageBuffer::initBuffer(OSRTMEMBUF &)
ASN1MessageBuffer::initBuffer(OSUNICHAR *)
ASN1MessageBuffer::initBuffer(const OSUTF8CHAR *)
ASN1MessageBuffer::isA(Type)
ASN1MessageBuffer::removeEventHandler(Asn1NamedEventHandler *)
ASN1MessageBuffer::resetErrorInfo()
ASN1MessageBuffer::setAppInfo(void *)
ASN1MessageBuffer::setErrorHandler(Asn1ErrorHandler *)
ASN1MessageBuffer::setRunTimeKey(const OSOCTET *,size_t)
ASN1MessageBuffer::setStatus(int)
ASN1MessageBuffer::~ASN1MessageBuffer()
OSRTCtxtHolder::OSRTCtxtHolder(OSRTContext *)
OSRTCtxtHolder::~OSRTCtxtHolder()
OSRTCtxtHolderIF::~OSRTCtxtHolderIF()
OSRTMessageBuffer::OSRTMessageBuffer(Type,OSRTContext *)
OSRTMessageBuffer::getByteIndex()
OSRTMessageBuffer::getContext()
OSRTMessageBuffer::getCtxtPtr()
OSRTMessageBuffer::getErrorInfo()
OSRTMessageBuffer::getErrorInfo(char *,size_t &)
OSRTMessageBuffer::getMsgCopy()
OSRTMessageBuffer::getMsgPtr()
OSRTMessageBuffer::getStatus()const
OSRTMessageBuffer::init()
OSRTMessageBuffer::initBuffer(OSOCTET *,size_t)
OSRTMessageBuffer::printErrorInfo()
OSRTMessageBuffer::setDiag(OSBOOL)
OSRTMessageBuffer::~OSRTMessageBuffer()
Inherited Attributes
OSRTCtxtHolder::mpContext
OSRTMessageBuffer::mBufferType

Constructor & Destructor Documentation

ASN1PERMessageBuffer(Type, OSBOOL)

EXTPERMETHODASN1PERMessageBuffer(TypebufferType,
OSBOOLaligned
)[protected]

This constructor does not set a PER input source. It is used by the derived encode buffer classes. Use the getStatus() method to determine if an error has occured during initialization.

Parameters

Type bufferTypeType of message buffer that is being created (for example, PEREncode or PERDecode).
OSBOOL alignedFlag indicating if aligned (TRUE) or unaligned (FALSE) encoding should be done.

ASN1PERMessageBuffer(Type, OSOCTET *, size_t, OSBOOL)

EXTPERMETHODASN1PERMessageBuffer(TypebufferType,
OSOCTET *pMsgBuf,
size_tmsgBufLen,
OSBOOLaligned
)[protected]

This constructor allows a memory buffer holding a binary PER message to be specified. Use the getStatus() method to determine if an error has occured during initialization.

Parameters

Type bufferTypeType of message buffer that is being created (for example, PEREncode or PERDecode).
OSOCTET * pMsgBufA pointer to a fixed size message buffer to recieve the encoded message.
size_t msgBufLenSize of the fixed-size message buffer.
OSBOOL alignedFlag indicating if aligned (TRUE) or unaligned (FALSE) encoding should be done.

ASN1PERMessageBuffer(Type, OSOCTET *, size_t, OSBOOL, OSRTContext *)

EXTPERMETHODASN1PERMessageBuffer(TypebufferType,
OSOCTET *pMsgBuf,
size_tmsgBufLen,
OSBOOLaligned,
OSRTContext *pContext
)[protected]

This constructor allows a memory buffer holding a binary PER message to be specified. It also allows a pre-existing context to be associated with this buffer. Use the getStatus() method to determine if an error has occured during initialization.

Parameters

Type bufferTypeType of message buffer that is being created (for example, PEREncode or PERDecode).
OSOCTET * pMsgBufA pointer to a fixed size message buffer to recieve the encoded message.
size_t msgBufLenSize of the fixed-size message buffer.
OSBOOL alignedFlag indicating if aligned (TRUE) or unaligned (FALSE) encoding should be done.
OSRTContext * pContextA pointer to an OSRTContext structure.

Member Functions Documentation

BinDump(const char *)

voidBinDump(const char *varname)[inline]

Parameters

const char * varname

GetMsgLen()

intGetMsgLen()[inline]

HexDump()

voidHexDump()[inline]

SetTrace(OSBOOL)

voidSetTrace(OSBOOLvalue)[inline]

Parameters

OSBOOL value

binDump(const char *)

voidbinDump(const char *varname)[inline]

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

Parameters

const char * varnamechar pointer to current buffer

getMsgLen()

size_t getMsgLen()[inline]

This method returns the length of a previously encoded PER message.

hexDump()

voidhexDump()[inline]

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

setBuffer(const OSOCTET *, size_t)

EXTPERMETHOD intsetBuffer(const OSOCTET *pMsgBuf,
size_tmsgBufLen
)

This method sets a buffer to receive the encoded message.

Parameters

const OSOCTET * pMsgBufA pointer to a memory buffer to use to encode a message. The buffer should be declared as an array of unsigned characters (OSOCTETs). This parameter can be set to NULL to specify dynamic encoding (i.e., the encode functions will dynamically allocate a buffer for the message).
size_t msgBufLenThe length of the memory buffer in bytes. If pMsgBuf is NULL, this parameter specifies the initial size of the dynamic buffer; if 0 - the default size will be used.

setTrace(OSBOOL)

voidsetTrace(OSBOOLvalue)[inline]

This method turns PER diagnostic tracing on or off.

This enables the collection of the bit statistics inside the PER library functions that can be displayed using the binDump method.

Parameters

OSBOOL valueBoolean value indicating whether tracing should be on (true) or off (false).