Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

ASN1PEREncodeBuffer Class Reference
[PER Message Buffer Classes]

#include <asn1PerCppTypes.h>

Inheritance diagram for ASN1PEREncodeBuffer:

ASN1PERMessageBuffer List of all members.

Detailed Description

The ASN1PEREncodeBuffer class is derived from the ASN1PERMessageBuffer base class. It contains variables and methods specific to encoding ASN.1 messages. It is used to manage the buffer into which an ASN.1 PER message is to be encoded.


Public Member Functions

 ASN1PEREncodeBuffer (ASN1BOOL aligned)
 ASN1PEREncodeBuffer (ASN1OCTET *pMsgBuf, size_t msgBufLen, ASN1BOOL aligned)
size_t getMsgBitCnt ()
virtual ASN1OCTET * getMsgCopy ()
virtual const ASN1OCTET * getMsgPtr ()
int init ()
virtual ASN1BOOL isA (Type bufferType)
int GetMsgBitCnt ()


Constructor & Destructor Documentation

ASN1PEREncodeBuffer::ASN1PEREncodeBuffer ASN1BOOL  aligned  )  [inline]
 

The ASN1PEREncodeBuffer class has two overloaded constructors: This version that takes one argument, aligned flag (dynamic encoding version). Use getStatus() method to determine has error occured during the initialization or not.

Parameters:
aligned Flag indicating if aligned (TRUE) or unaligned (FALSE) encoding should be done.

ASN1PEREncodeBuffer::ASN1PEREncodeBuffer ASN1OCTET *  pMsgBuf,
size_t  msgBufLen,
ASN1BOOL  aligned
[inline]
 

The ASN1PEREncodeBuffer class has two overloaded constructors: This version that takes a message buffer and size argument and an aligned flag argument (static encoding version). Use getStatus() method to determine has error occured during the initialization or not.

Parameters:
pMsgBuf A pointer to a fixed-size message buffer to receive the encoded message.
msgBufLen Size of the fixed-size message buffer.
aligned Flag indicating if aligned (TRUE) or unaligned (FALSE) encoding should be done.


Member Function Documentation

size_t ASN1PEREncodeBuffer::getMsgBitCnt  )  [inline]
 

This method returns the length (in bits) of the encoded message.

Returns:
Length(in bits)of encoded message

virtual ASN1OCTET* ASN1PEREncodeBuffer::getMsgCopy  )  [virtual]
 

This method returns a copy of the current encoded message. Memory is allocated for the message using the ‘new’ operation. It is the user’s responsibility to free the memory using ‘delete’.

Returns:
Pointer to copy of encoded message. It is the user’s responsibility to release the memory using the ‘delete’ operator (i.e., delete [] ptr;)

virtual const ASN1OCTET* ASN1PEREncodeBuffer::getMsgPtr  )  [virtual]
 

This method returns the internal pointer to the current encoded message.

Returns:
Pointer to encoded message.

int ASN1PEREncodeBuffer::init  ) 
 

This method reinitializes the encode buffer pointer to allow a new message to be encoded. This makes it possible to reuse one message buffer object in a loop to encode multiple messages. After this method is called, any previously encoded message in the buffer will be overwritten on the next encode call.

Returns:
Completion status of operation:
  • 0 (ASN_OK) = success,
  • negative return value is error.

virtual ASN1BOOL ASN1PEREncodeBuffer::isA Type  bufferType  )  [inline, virtual]
 

This method checks the type of the message buffer.

Parameters:
bufferType Enumerated identifier specifying a derived class. The only possible value for this class is PEREncode.
Returns:
Boolean result of the match operation. True if this is the class corresponding to the identifier argument.


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

Copyright © 1997-2004 Objective Systems,Inc.
All Rights Reserved.
This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.

This file was last modified on 1 Oct 2004.
ASN1C PER Runtime, ASN1C v5.7x