exip
Alpha 0.5.4
|
Implementing the interface to a higher-level EXI stream decoder - decode basic EXI types. More...
#include "streamDecode.h"
#include "streamRead.h"
#include "stringManipulate.h"
#include "ioUtil.h"
#include <math.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... | |
Definition in file streamDecode.c.
Dynamically allocate a memory for the buffer
[in] | strm | EXI stream of bits |
[out] | binary_val | decoded binary value |
[out] | nbytes | length of decoded binary content |
Definition at line 122 of file streamDecode.c.
The value false is represented by the bit (byte) 0, and the value true is represented by the bit (byte) 1.
[in] | strm | EXI stream of bits |
[out] | bool_val | 0-false, 1-true |
Definition at line 62 of file streamDecode.c.
errorCode decodeDateTimeValue | ( | EXIStream * | strm, |
EXIType | dtType, | ||
EXIPDateTime * | dt_val | ||
) |
[in] | strm | EXI stream of bits |
[in] | dtType | the 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_val | decoded dateTime value as EXIPDateTime |
Definition at line 245 of file streamDecode.c.
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.
[in] | strm | EXI stream of bits |
[out] | dec_val | decoded decimal value |
Definition at line 169 of file streamDecode.c.
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
[in] | strm | EXI stream of bits |
[out] | fl_val | decoded float value as double |
Definition at line 215 of file streamDecode.c.
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.
[in] | strm | EXI stream of bits |
[out] | sint_val | decoded signed integer value |
Definition at line 144 of file streamDecode.c.
[in] | strm | EXI stream of bits |
[in] | n | The number of bits in the range [1,32]. |
[out] | int_val | resulting n-bit unsigned integer value |
Definition at line 24 of file streamDecode.c.
[in] | strm | EXI stream of bits |
[out] | string_val | decoded string |
Definition at line 89 of file streamDecode.c.
The memory to hold the string data should be allocated before calling this function.
[in] | strm | EXI stream of bits |
[in] | str_length | the length of the string |
[out] | string_val | decoded string |
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.
[in] | strm | EXI stream of bits |
[out] | int_val | resulting unsigned integer value |
Definition at line 69 of file streamDecode.c.