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

Encoding a real number.

The following limitations exist: (1) only a binary encoding format of base 2 is supported, (2) only exponent values that can be 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 encoded.

If either P6ASN1REAL_MINUSINFINITY or P6ASN1REAL_PLUSINFINITY is set in the flags parameter, then the numValue parameter will be ignored. Infinity values are encoded as a special value.

Parameters
pBuffer[ in out ] array of bytes to build an ASN.1 encoded message
bufSize[ in ] size in octets (i.e., bytes) of pBuffer
pIndex[ in ] current offset into pBuffer, that is, the next free byte to write into [ out ] As the unsigned number is encoded in pBuffer this index value increases in value
numValue[ in ] a P6FLOAT value to encode
flags[ in ] indicate a special value or way of encoding the real number (e.g., minus infinity)
overrideTag[ in ] define an application tag to be used instead of the standard integer tag. If set to zero, then the universal tag of real is used.
Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedA successful call to initialize was not made before this call.
P6R::eInvalidArgOne of the parameters is NULL.
P6R::eTooBigThe remaining space in pBuffer is insufficient to encode the integer value.
P6R::eNotSupportedThe required encoding is not currently provided.