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

Interface to a higher-level EXI stream encoder - encode basic EXI types. More...

#include "errorHandle.h"
#include "procTypes.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...
 

Detailed Description

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

Definition in file streamEncode.h.

Function Documentation

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

Dynamically allocate a memory for the buffer

Parameters
[in,out]strmEXI stream of bits
[in]binary_valbinary value to be encoded
[in]nbyteslength of the binary content
Returns
Error handling code

Definition at line 123 of file streamEncode.c.

errorCode encodeBoolean ( 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,out]strmEXI stream of bits
[in]bool_val0-false, 1-true
Returns
Error handling code

Definition at line 57 of file streamEncode.c.

errorCode encodeDateTimeValue ( EXIStream strm,
EXIType  dtType,
EXIPDateTime  dt_val 
)
Parameters
[in,out]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
[in]dt_valDateTime value to be encoded
Returns
Error handling code.

Definition at line 228 of file streamEncode.c.

errorCode encodeDecimalValue ( 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,out]strmEXI stream of bits
[in]dec_valdecimal value to be encoded
Returns
Error handling code.

Definition at line 161 of file streamEncode.c.

errorCode encodeFloatValue ( 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,out]strmEXI stream of bits
[in]fl_valfloat value to be encoded
Returns
Error handling code.

Definition at line 216 of file streamEncode.c.

errorCode encodeIntegerValue ( 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,out]strmEXI stream of bits
[in]sint_valsigned integer value to be encoded
Returns
Error handling code.

Definition at line 139 of file streamEncode.c.

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

Definition at line 25 of file streamEncode.c.

errorCode encodeString ( EXIStream strm,
const String string_val 
)
Parameters
[in,out]strmEXI stream of bits
[in]string_valstring to be encoded
Returns
Error handling code

Definition at line 85 of file streamEncode.c.

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

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.

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

Definition at line 64 of file streamEncode.c.

errorCode writeEventCode ( EXIStream strm,
EventCode  ec 
)
Parameters
[in,out]strmEXI bit stream
[in]ecevent code to be encoded
Returns
EventCode the newly created Event Code

Definition at line 325 of file streamEncode.c.