exip  Alpha 0.5.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
streamDecode.h File Reference

Interface to a higher-level EXI stream decoder - decode basic EXI types. More...

#include "errorHandle.h"
#include "procTypes.h"

Go to the source code of this file.

Functions

errorCode decodeNBitUnsignedInteger (EXIStream *strm, unsigned char n, unsigned int *int_val)
 Decode EXI n-bit Unsigned Integer Decodes and returns an n-bit unsigned integer. More...
 
errorCode decodeBoolean (EXIStream *strm, boolean *bool_val)
 Decode EXI Boolean Decode a single boolean value. More...
 
errorCode decodeUnsignedInteger (EXIStream *strm, UnsignedInteger *int_val)
 Decode EXI Unsigned Integer type Decode an arbitrary precision non negative integer using a sequence of octets. More...
 
errorCode decodeString (EXIStream *strm, String *string_val)
 Decode EXI String type Decode a string as a length-prefixed sequence of UCS codepoints, each of which is encoded as an integer. More...
 
errorCode decodeStringOnly (EXIStream *strm, Index str_length, String *string_val)
 Decode String with the length of the String specified This function is used for Partitions Optimized for Frequent use of String Literals when there is a local name miss => the Length part is read first. More...
 
errorCode decodeBinary (EXIStream *strm, char **binary_val, Index *nbytes)
 Decode EXI Binary type Decode a binary value as a length-prefixed sequence of octets. More...
 
errorCode decodeIntegerValue (EXIStream *strm, Integer *sint_val)
 Decode EXI (signed) Integer type Decode an arbitrary precision integer using a sign bit followed by a sequence of octets. More...
 
errorCode decodeDecimalValue (EXIStream *strm, Decimal *dec_val)
 Decode EXI Decimal type Decode a decimal represented as a Boolean sign followed by two Unsigned Integers. More...
 
errorCode decodeFloatValue (EXIStream *strm, Float *fl_val)
 Decode EXI Float type Decode a Float represented as two consecutive Integers. More...
 
errorCode decodeDateTimeValue (EXIStream *strm, EXIType dtType, EXIPDateTime *dt_val)
 Decode DateTime type Included Components: Year, MonthDay, Time, presence, [FractionalSecs], presence, [TimeZone]. More...
 

Detailed Description

Date
Jul 7, 2010
Author
Rumen Kyusakov
Version
0.5
[Revision] $Id: streamDecode.h 328 2013-10-30 16:00:10Z kjussakov $

Definition in file streamDecode.h.

Function Documentation

errorCode decodeBinary ( EXIStream strm,
char **  binary_val,
Index nbytes 
)

Dynamically allocate a memory for the buffer

Parameters
[in]strmEXI stream of bits
[out]binary_valdecoded binary value
[out]nbyteslength of decoded binary content
Returns
Error handling code

Definition at line 122 of file streamDecode.c.

errorCode decodeBoolean ( EXIStream strm,
boolean bool_val 
)

The value false is represented by the bit (byte) 0, and the value true is represented by the bit (byte) 1.

Parameters
[in]strmEXI stream of bits
[out]bool_val0-false, 1-true
Returns
Error handling code

Definition at line 62 of file streamDecode.c.

errorCode decodeDateTimeValue ( EXIStream strm,
EXIType  dtType,
EXIPDateTime dt_val 
)
Parameters
[in]strmEXI stream of bits
[in]dtTypethe exact type of the dateTime value. Should be one of VALUE_TYPE_DATE_TIME, VALUE_TYPE_YEAR, VALUE_TYPE_DATE, VALUE_TYPE_MONTH, VALUE_TYPE_TIME
[out]dt_valdecoded dateTime value as EXIPDateTime
Returns
Error handling code.

Definition at line 245 of file streamDecode.c.

errorCode decodeDecimalValue ( EXIStream strm,
Decimal dec_val 
)

A sign value of zero (0) is used to represent positive Decimal values and a sign value of one (1) is used to represent negative Decimal values The first Integer represents the integral portion of the Decimal value. The second positive integer represents the fractional portion of the decimal with the digits in reverse order to preserve leading zeros.

Parameters
[in]strmEXI stream of bits
[out]dec_valdecoded decimal value
Returns
Error handling code.

Definition at line 169 of file streamDecode.c.

errorCode decodeFloatValue ( EXIStream strm,
Float fl_val 
)

The first Integer represents the mantissa of the floating point number and the second Integer represents the 10-based exponent of the floating point number

Parameters
[in]strmEXI stream of bits
[out]fl_valdecoded float value as double
Returns
Error handling code.

Definition at line 215 of file streamDecode.c.

errorCode decodeIntegerValue ( EXIStream strm,
Integer sint_val 
)

The most significant bit of the last octet is set to zero to indicate sequence termination. Only seven bits per octet are used to store the integer's value.

Parameters
[in]strmEXI stream of bits
[out]sint_valdecoded signed integer value
Returns
Error handling code.

Definition at line 144 of file streamDecode.c.

errorCode decodeNBitUnsignedInteger ( EXIStream strm,
unsigned char  n,
unsigned int *  int_val 
)
Parameters
[in]strmEXI stream of bits
[in]nThe number of bits in the range [1,32].
[out]int_valresulting n-bit unsigned integer value
Returns
Error handling code

Definition at line 24 of file streamDecode.c.

errorCode decodeString ( EXIStream strm,
String string_val 
)
Parameters
[in]strmEXI stream of bits
[out]string_valdecoded string
Returns
Error handling code

Definition at line 89 of file streamDecode.c.

errorCode decodeStringOnly ( EXIStream strm,
Index  str_length,
String string_val 
)

The memory to hold the string data should be allocated before calling this function.

Parameters
[in]strmEXI stream of bits
[in]str_lengththe length of the string
[out]string_valdecoded string
Returns
Error handling code

Definition at line 100 of file streamDecode.c.

errorCode decodeUnsignedInteger ( EXIStream strm,
UnsignedInteger int_val 
)

The most significant bit of the last octet is set to zero to indicate sequence termination. Only seven bits per octet are used to store the integer's value.

Parameters
[in]strmEXI stream of bits
[out]int_valresulting unsigned integer value
Returns
Error handling code.

Definition at line 69 of file streamDecode.c.