/*
* Copyright (C) 2007-2011 Siemens AG
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
Code generated by EXIdizer
********************************************************************/ #ifdef __cplusplus extern "C" { #endif #include "EXITypes.h" #include "CoderChannel.h" #ifndef DECODER_CHANNEL_H #define DECODER_CHANNEL_H /** * Decode a byte value. */ int decode(bitstream_t* stream, uint8_t* b); /** * Decode a single boolean value. The value false is represented by the bit * 0, and the value true is represented by the bit 1. */ int decodeBoolean(bitstream_t* stream, int* b); /** * Decodes and returns an n-bit unsigned integer. */ int decodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t* uint32); /** * Decode 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 decodeUnsignedInteger(bitstream_t* stream, integer_t* iv); /** * Decode 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 decodeUnsignedInteger16(bitstream_t* stream, uint16_t* uint16); /** * Decode 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 decodeUnsignedInteger32(bitstream_t* stream, uint32_t* uint32); /** * Decode 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 decodeUnsignedInteger64(bitstream_t* stream, uint64_t* uint64); /** * Decode 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 decodeInteger(bitstream_t* stream, integer_t* iv); /** * Decode 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 decodeInteger32(bitstream_t* stream, int32_t* int32); /** * Decode 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 decodeInteger64(bitstream_t* stream, int64_t* int64); /** * Decode 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. */ int decodeFloat(bitstream_t* stream, float_me_t* f); /** * Decode 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 decodeDecimal(bitstream_t* stream, decimal_t* d); /** * Decode a sequence of characters for a given length. */ int decodeStringOnly(bitstream_t* stream, uint16_t len, string_ucs_t* s); /** * Decode a length prefixed sequence of characters. */ int decodeString(bitstream_t* stream, string_ucs_t* s); int decodeStringASCII(bitstream_t* stream, string_ascii_t* s); /** * Decode a length prefixed sequence of characters in the sense of string tables. * length == 0, local value partition hit * length == 1, global value partition hit * --> string literal is encoded as a String with the length incremented by two */ int decodeStringValue(bitstream_t* stream, string_ucs_t* s); /** * Restricted character set */ int decodeRCSStringValue(bitstream_t* stream, rcs_t* rcs, string_ucs_t* s); /** * Decode a sequence of characters according to a given length. */ int decodeCharacters(bitstream_t* stream, uint16_t len, uint32_t* chars); int decodeCharactersASCII(bitstream_t* stream, uint16_t len, char* chars); /** * Decode a binary value as a length-prefixed sequence of octets. */ int decodeBinary(bitstream_t* stream, bytes_t* bytes); /** * Decode Date-Time as sequence of values representing the individual * components of the Date-Time. */ int decodeDateTime(bitstream_t* stream, exi_datetime_type_t type, datetime_t* datetime); #endif #ifdef __cplusplus } #endif