exip
Alpha 0.5.4
|
Implements an interface to a higher-level EXI stream encoder - encode basic EXI types. More...
#include "streamEncode.h"
#include "streamWrite.h"
#include "stringManipulate.h"
#include "ioUtil.h"
#include <math.h>
Go to the source code of this file.
Functions | |
errorCode | encodeNBitUnsignedInteger (EXIStream *strm, unsigned char n, unsigned int int_val) |
Encode EXI n-bit Unsigned Integer. More... | |
errorCode | encodeBoolean (EXIStream *strm, boolean bool_val) |
Encode EXI Boolean Encode a single boolean value. More... | |
errorCode | encodeUnsignedInteger (EXIStream *strm, UnsignedInteger int_val) |
Encode EXI Unsigned Integer type Encode an arbitrary precision non negative integer using a sequence of octets. More... | |
errorCode | encodeString (EXIStream *strm, const String *string_val) |
Encode EXI String type Encode a string as a length-prefixed sequence of UCS codepoints, each of which is encoded as an integer. More... | |
errorCode | encodeStringOnly (EXIStream *strm, const String *string_val) |
Encode String without the length prefix 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 | encodeBinary (EXIStream *strm, char *binary_val, Index nbytes) |
Encode EXI Binary type Encode a binary value as a length-prefixed sequence of octets. More... | |
errorCode | encodeIntegerValue (EXIStream *strm, Integer sint_val) |
Encode EXI (signed) Integer type Encode an arbitrary precision integer using a sign bit followed by a sequence of octets. More... | |
errorCode | encodeDecimalValue (EXIStream *strm, Decimal dec_val) |
Encode EXI Decimal type Decode a decimal represented as a Boolean sign followed by two Unsigned Integers. More... | |
errorCode | encodeFloatValue (EXIStream *strm, Float fl_val) |
Encode EXI Float type Encode a Float represented as two consecutive Integers. More... | |
errorCode | encodeDateTimeValue (EXIStream *strm, EXIType dtType, EXIPDateTime dt_val) |
Encode EXI DateTime type. More... | |
errorCode | writeEventCode (EXIStream *strm, EventCode ec) |
Serialize an event code to an EXI stream. More... | |
Definition in file streamEncode.c.
Dynamically allocate a memory for the buffer
[in,out] | strm | EXI stream of bits |
[in] | binary_val | binary value to be encoded |
[in] | nbytes | length of the binary content |
Definition at line 123 of file streamEncode.c.
The value false is represented by the bit (byte) 0, and the value true is represented by the bit (byte) 1.
[in,out] | strm | EXI stream of bits |
[in] | bool_val | 0-false, 1-true |
Definition at line 57 of file streamEncode.c.
errorCode encodeDateTimeValue | ( | EXIStream * | strm, |
EXIType | dtType, | ||
EXIPDateTime | dt_val | ||
) |
[in,out] | 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 |
[in] | dt_val | DateTime value to be encoded |
Definition at line 228 of file streamEncode.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,out] | strm | EXI stream of bits |
[in] | dec_val | decimal value to be encoded |
Definition at line 161 of file streamEncode.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,out] | strm | EXI stream of bits |
[in] | fl_val | float value to be encoded |
Definition at line 216 of file streamEncode.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,out] | strm | EXI stream of bits |
[in] | sint_val | signed integer value to be encoded |
Definition at line 139 of file streamEncode.c.
[in,out] | strm | EXI stream of bits |
[in] | n | The number of bits in the range |
[in] | int_val | n-bit unsigned integer value |
Definition at line 25 of file streamEncode.c.
[in,out] | strm | EXI stream of bits |
[in] | string_val | string to be encoded |
Definition at line 85 of file streamEncode.c.
[in] | strm | EXI stream of bits |
[out] | string_val | decoded string |
Definition at line 98 of file streamEncode.c.
errorCode encodeUnsignedInteger | ( | 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,out] | strm | EXI stream of bits |
[in] | int_val | unsigned integer value |
Definition at line 64 of file streamEncode.c.