OpenV2G
|
EXI Encoder Channel. More...
#include "EXITypes.h"
Go to the source code of this file.
Functions | |
int | encode (bitstream_t *stream, uint8_t b) |
Encode byte value. More... | |
int | encodeBoolean (bitstream_t *stream, int b) |
Encode a single boolean value. More... | |
int | encodeNBitUnsignedInteger (bitstream_t *stream, size_t nbits, uint32_t val) |
Encode n-bit unsigned integer. More... | |
int | encodeUnsignedInteger (bitstream_t *stream, exi_integer_t *iv) |
Encode unsigned integer. More... | |
int | encodeUnsignedInteger16 (bitstream_t *stream, uint16_t n) |
Encode unsigned integer. More... | |
int | encodeUnsignedInteger32 (bitstream_t *stream, uint32_t n) |
Encode unsigned integer. More... | |
int | encodeUnsignedInteger64 (bitstream_t *stream, uint64_t n) |
Encode unsigned integer. More... | |
int | encodeInteger (bitstream_t *stream, exi_integer_t *iv) |
Encode integer. More... | |
int | encodeInteger16 (bitstream_t *stream, int16_t n) |
Encode integer. More... | |
int | encodeInteger32 (bitstream_t *stream, int32_t n) |
Encode integer. More... | |
int | encodeInteger64 (bitstream_t *stream, int64_t n) |
Encode integer. More... | |
int | encodeFloat (bitstream_t *stream, exi_float_me_t *f) |
Encode float. More... | |
int | encodeDecimal (bitstream_t *stream, exi_decimal_t *d) |
Encode decimal. More... | |
int | encodeString (bitstream_t *stream, exi_string_t *string) |
Encode string. More... | |
int | encodeStringValue (bitstream_t *stream, exi_value_string_table_t *stringTable, size_t namespaceUriID, size_t localNameID, exi_string_value_t *string) |
Encode string value. More... | |
int | encodeRCSStringValue (bitstream_t *stream, exi_value_string_table_t *stringTable, size_t namespaceUriID, size_t localNameID, exi_rcs_t *rcs, exi_string_value_t *string) |
Encode restricted character set value. More... | |
int | encodeCharacters (bitstream_t *stream, exi_string_character_t *chars, size_t len) |
Encode characters. More... | |
int | encodeRCSCharacters (bitstream_t *stream, exi_string_character_t *chars, size_t len, size_t rcsCodeLength, size_t rcsSize, const exi_string_character_t rcsSet[]) |
Encode characters. More... | |
int | encodeBinary (bitstream_t *stream, exi_bytes_t *bytes) |
Encode binary. More... | |
int | encodeBytes (bitstream_t *stream, uint8_t *data, size_t len) |
Encode binary data. More... | |
int | encodeDateTime (bitstream_t *stream, exi_datetime_t *datetime) |
Encode datetime. More... | |
int | encodeFinish (bitstream_t *stream) |
Flush underlying bit output stream. More... | |
EXI Encoder Channel.
int encode | ( | bitstream_t * | stream, |
uint8_t | b | ||
) |
Encode byte value.
stream | Output Stream |
b | byte |
int encodeBinary | ( | bitstream_t * | stream, |
exi_bytes_t * | bytes | ||
) |
Encode binary.
Encode a binary value as a length-prefixed sequence of octets.
stream | Output Stream |
bytes | Byte values |
Encode a binary value as a length-prefixed sequence of octets.
int encodeBoolean | ( | bitstream_t * | stream, |
int | b | ||
) |
Encode a single boolean value.
A false value is encoded as 0 and true value is encode as 1.
stream | Output Stream |
b | boolean |
Encode a single boolean value. A false value is encoded as bit 0 and true value is encode as bit 1.
int encodeBytes | ( | bitstream_t * | stream, |
uint8_t * | data, | ||
size_t | len | ||
) |
Encode binary data.
Encode a sequence of octets.
stream | Output Stream |
data | Byte values |
len | Length |
int encodeCharacters | ( | bitstream_t * | stream, |
exi_string_character_t * | chars, | ||
size_t | len | ||
) |
Encode characters.
Encode a sequence of characters according to a given length. Each character is represented by its UCS [ISO/IEC 10646] code point encoded as an Unsigned Integer.
stream | Output Stream |
chars | Characters |
len | Numbr of characters |
Encode a sequence of characters according to a given length. Each character is represented by its UCS [ISO/IEC 10646] code point encoded as an Unsigned Integer
int encodeDateTime | ( | bitstream_t * | stream, |
exi_datetime_t * | datetime | ||
) |
Encode datetime.
Encode a datetime representation which is a sequence of values representing the individual components of the Date-Time.
stream | Output Stream |
datetime | Datetime values |
Encode a datetime representation which is a sequence of values representing the individual components of the Date-Time
int encodeDecimal | ( | bitstream_t * | stream, |
exi_decimal_t * | d | ||
) |
Encode decimal.
Encode a decimal represented as a Boolean sign followed by two Unsigned Integers. 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.
stream | Output Stream |
d | Decimal value |
Encode a decimal represented as a Boolean sign followed by two Unsigned Integers. 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.
int encodeFinish | ( | bitstream_t * | stream | ) |
Flush underlying bit output stream.
stream | Output Stream |
Flush underlying output stream.
int encodeFloat | ( | bitstream_t * | stream, |
exi_float_me_t * | f | ||
) |
Encode float.
Encode a Float datatype as two consecutive Integers. The first Integer represents the mantissa of the floating point number and the second Integer represents the base-10 exponent of the floating point number.
stream | Output Stream |
f | Float value |
The Float datatype representation is two consecutive Integers. The first Integer represents the mantissa of the floating point number and the second Integer represents the base-10 exponent of the floating point number.
int encodeInteger | ( | bitstream_t * | stream, |
exi_integer_t * | iv | ||
) |
Encode integer.
Encode an arbitrary precision integer using a sign boolean followed by a sequence of octets. 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.
stream | Output Stream |
iv | Integer value |
int encodeInteger16 | ( | bitstream_t * | stream, |
int16_t | n | ||
) |
Encode integer.
Encode an arbitrary precision integer using a sign boolean followed by a sequence of octets. 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.
stream | Output Stream |
n | Integer value 16 bits |
Encode an arbitrary precision integer using a sign bit followed by a sequence of octets. 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.
int encodeInteger32 | ( | bitstream_t * | stream, |
int32_t | n | ||
) |
Encode integer.
Encode an arbitrary precision integer using a sign boolean followed by a sequence of octets. 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.
stream | Output Stream |
n | Integer value 32 bits |
Encode an arbitrary precision integer using a sign bit followed by a sequence of octets. 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.
int encodeInteger64 | ( | bitstream_t * | stream, |
int64_t | n | ||
) |
Encode integer.
Encode an arbitrary precision integer using a sign boolean followed by a sequence of octets. 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.
stream | Output Stream |
n | Integer value 64 bits |
Encode an arbitrary precision integer using a sign bit followed by a sequence of octets. 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.
int encodeNBitUnsignedInteger | ( | bitstream_t * | stream, |
size_t | nbits, | ||
uint32_t | val | ||
) |
Encode n-bit unsigned integer.
The n least significant bits of parameter b starting with the most significant, i.e. from left to right.
stream | Output Stream |
nbits | number of bits |
val | value |
Encode n-bit unsigned integer. The n least significant bits of parameter b starting with the most significant, i.e. from left to right.
int encodeRCSCharacters | ( | bitstream_t * | stream, |
exi_string_character_t * | chars, | ||
size_t | len, | ||
size_t | rcsCodeLength, | ||
size_t | rcsSize, | ||
const exi_string_character_t | rcsSet[] | ||
) |
Encode characters.
Encode a sequence of characters according to a given length. Each character is represented by its UCS [ISO/IEC 10646] code point encoded as an Unsigned Integer.
stream | Output Stream |
chars | Characters |
len | Numbr of characters |
rcsCodeLength | RCS code-length |
rcsCodeLength | RCS size |
rcsCodeLength | RCS set |
int encodeRCSStringValue | ( | bitstream_t * | stream, |
exi_value_string_table_t * | stringTable, | ||
size_t | namespaceUriID, | ||
size_t | localNameID, | ||
exi_rcs_t * | rcs, | ||
exi_string_value_t * | string | ||
) |
Encode restricted character set value.
Encode a length prefixed sequence of characters in the sense of string tables
stream | Output Stream |
StringTable | StringTable |
namespaceUriID | Qualified Namespace ID |
localNameID | Qualified LocalName ID |
rcs | Restricted character set |
string | String value |
int encodeString | ( | bitstream_t * | stream, |
exi_string_t * | string | ||
) |
Encode string.
Encode a length prefixed sequence of characters.
stream | Output Stream |
string | String |
Encode a length prefixed sequence of characters.
int encodeStringValue | ( | bitstream_t * | stream, |
exi_value_string_table_t * | stringTable, | ||
size_t | namespaceUriID, | ||
size_t | localNameID, | ||
exi_string_value_t * | string | ||
) |
Encode string value.
Encode a length prefixed sequence of characters in the sense of string tables
stream | Output Stream |
stringTable | String Table |
namespaceUriID | Qualified Namespace ID |
localNameID | Qualified LocalName ID |
string | String value |
int encodeUnsignedInteger | ( | bitstream_t * | stream, |
exi_integer_t * | iv | ||
) |
Encode unsigned integer.
Encode an arbitrary precision non negative integer using a sequence of octets. 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.
stream | Output Stream |
iv | Unsigned integer value |
int encodeUnsignedInteger16 | ( | bitstream_t * | stream, |
uint16_t | n | ||
) |
Encode unsigned integer.
Encode an arbitrary precision non negative integer using a sequence of octets. 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.
stream | Output Stream |
n | Unsigned integer value 16 bits |
Encode an arbitrary precision non negative integer using a sequence of octets. 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.
int encodeUnsignedInteger32 | ( | bitstream_t * | stream, |
uint32_t | n | ||
) |
Encode unsigned integer.
Encode an arbitrary precision non negative integer using a sequence of octets. 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.
stream | Output Stream |
n | Unsigned integer value 32 bits |
Encode an arbitrary precision non negative integer using a sequence of octets. 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.
int encodeUnsignedInteger64 | ( | bitstream_t * | stream, |
uint64_t | n | ||
) |
Encode unsigned integer.
Encode an arbitrary precision non negative integer using a sequence of octets. 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.
stream | Output Stream |
n | Unsigned integer value 64 bits |
Encode an arbitrary precision non negative integer using a sequence of octets. 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.