Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IAsn1::decodeReal ( P6UINT8 pBuffer,
P6UINT32  bufSize,
P6UINT32 index,
P6FLOAT numValue,
P6ASN1REALFLAGS flags 
)
pure virtual

Decoding a real number.

The following limitations exist: (1) only a binary format of base 2 is supported, (2) only exponent values that are represented in at most 24 bits is supported, and (3) only a maximun of 64 bits can be used to encode a mantissa. Even with these limitations a large P6FLOAT value can be decoded.

If either P6ASN1REAL_MINUSINFINITY or P6ASN1REAL_PLUSINFINITY is returned in the flags parameter, then the numValue parameter should be ignored. Infinity values are encoded as special values.

Parameters
pBuffer[ in ] Byte array containg the ASN.1 encoded data to decode
bufSize[ in ] the amount of data (in bytes) pointed to by pBuffer
index[ in ] current offset into pBuffer, should be pointing to the length field of a real tagged value [ out ] this index moves down the pBuffer data as the data is decoded
numValue[ in ] a decoded P6FLOAT value, unless an infinity constant returned in flags
flags[ in ] indicate a special value (e.g., minus infinity)
Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedA successful call to initialize was not made before this call.
P6R::eInvalidArgpBuffer is set to NULL.
P6R::eFormatErrorCould not properly decode type into IP address.
P6R::eNotSupportedThe received encoding is not currently implemented.