sebastiankb 14 лет назад
Родитель
Сommit
60832535ef
56 измененных файлов с 0 добавлено и 25844 удалено
  1. 0 579
      src/codec/AbstractDecoderChannel.c
  2. 0 436
      src/codec/AbstractEncoderChannel.c
  3. 0 73
      src/codec/BitDecoderChannel.c
  4. 0 138
      src/codec/BitDecoderChannel.h
  5. 0 88
      src/codec/BitEncoderChannel.c
  6. 0 140
      src/codec/BitEncoderChannel.h
  7. 0 110
      src/codec/BitInputStream.c
  8. 0 48
      src/codec/BitInputStream.h
  9. 0 118
      src/codec/BitOutputStream.c
  10. 0 52
      src/codec/BitOutputStream.h
  11. 0 93
      src/codec/ByteDecoderChannel.c
  12. 0 125
      src/codec/ByteEncoderChannel.c
  13. 0 79
      src/codec/ByteStream.c
  14. 0 48
      src/codec/ByteStream.h
  15. 0 48
      src/codec/CoderChannel.h
  16. 0 178
      src/codec/DecoderChannel.h
  17. 0 1091
      src/codec/EXICoder.c
  18. 0 65
      src/codec/EXICoder.h
  19. 0 178
      src/codec/EXIDecoder.c
  20. 0 86
      src/codec/EXIDecoder.h
  21. 0 435
      src/codec/EXIEncoder.c
  22. 0 71
      src/codec/EXIEncoder.h
  23. 0 59
      src/codec/EXIHeaderDecoder.c
  24. 0 46
      src/codec/EXIHeaderDecoder.h
  25. 0 44
      src/codec/EXIHeaderEncoder.c
  26. 0 46
      src/codec/EXIHeaderEncoder.h
  27. 0 423
      src/codec/EXITypes.h
  28. 0 180
      src/codec/EncoderChannel.h
  29. 0 106
      src/codec/MethodsBag.c
  30. 0 59
      src/codec/MethodsBag.h
  31. 0 185
      src/codec/NameTableEntries.c
  32. 0 41
      src/codec/NameTableEntries.h
  33. 0 238
      src/codec/StringTable.c
  34. 0 67
      src/codec/StringTable.h
  35. 0 66
      src/codec/UCSString.c
  36. 0 52
      src/codec/UCSString.h
  37. 0 84
      src/service/v2g_service.h
  38. 0 44
      src/service/v2g_serviceClientDataTransmitter.h
  39. 0 3682
      src/service/v2g_serviceClientStubs.c
  40. 0 269
      src/service/v2g_serviceClientStubs.h
  41. 0 7947
      src/service/v2g_serviceDataSerialization.c
  42. 0 755
      src/service/v2g_serviceDataTypes.c
  43. 0 1814
      src/service/v2g_serviceDataTypes.h
  44. 0 2812
      src/service/v2g_serviceDispatcher.c
  45. 0 43
      src/service/v2g_serviceDispatcher.h
  46. 0 89
      src/service/v2g_serviceMethods.h
  47. 0 87
      src/test/evse_server.c
  48. 0 33
      src/test/evse_server.h
  49. 0 569
      src/test/evse_serviceMethods.c
  50. 0 42
      src/test/main.c
  51. 0 34
      src/test/main.h
  52. 0 499
      src/test/main_codec.c
  53. 0 951
      src/test/pev_service.c
  54. 0 47
      src/test/serviceClientDataTransmitter.c
  55. 0 98
      src/transport/v2gtp.c
  56. 0 54
      src/transport/v2gtp.h

+ 0 - 579
src/codec/AbstractDecoderChannel.c

@@ -1,579 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#include "DecoderChannel.h"
-#include "CoderChannel.h"
-#include "BitInputStream.h"
-#include "EXITypes.h"
-
-#ifndef ABSTRACT_DECODER_CHANNEL_C
-#define ABSTRACT_DECODER_CHANNEL_C
-
-/* unsigned long == 64 bits, 10 * 7bits = 70 bits */
-#define MAX_OCTETS_FOR_UNSIGNED_INTEGER_64 10
-/* unsigned int == 32 bits, 5 * 7bits = 35 bits */
-#define MAX_OCTETS_FOR_UNSIGNED_INTEGER_32 5
-
-/* buffer for reading (arbitrary) large integer values */
-static unsigned int maskedOctets[MAX_OCTETS_FOR_UNSIGNED_INTEGER_64];
-
-
-static int _decodeUnsignedInteger(bitstream_t* stream, integer_t* iv, int negative) {
-	int errn = 0;
-	int i, k;
-	uint8_t b;
-
-	for (i = 0; i < MAX_OCTETS_FOR_UNSIGNED_INTEGER_64; i++) {
-		/* Read the next octet */
-		errn = decode(stream, &b);
-		/* If the most significant bit of the octet was 1,
-		   another octet is going to come */
-		if (b < 128) {
-			/* no more octets */
-
-			/* For negative values, the Unsigned Integer holds the
-			 * magnitude of the value minus 1 */
-
-			switch(i) {
-			case 0: /* 7 bits */
-				if (negative) {
-					iv->val.int8 =  - ( b + 1);
-					iv->type = INTEGER_8;
-				} else {
-					iv->val.uint8 = b;
-					iv->type = UNSIGNED_INTEGER_8;
-				}
-				return 0;
-			case 1: /* 14 bits */
-				maskedOctets[i] = b;
-				iv->val.uint16 = 0;
-				for (k = i; k >= 0 ; k--) {
-					iv->val.uint16  = (iv->val.uint16 << 7) | maskedOctets[k];
-				}
-				if (negative) {
-					iv->val.int16 = - ( iv->val.uint16 + 1 );
-					iv->type = INTEGER_16;
-				} else {
-					iv->type = UNSIGNED_INTEGER_16;
-				}
-				return 0;
-			case 2: /* 21 bits */
-			case 3: /* 28 bits */
-				maskedOctets[i] = b;
-				iv->val.uint32 = 0;
-				for (k = i; k >= 0 ; k--) {
-					iv->val.uint32 = (iv->val.uint32 << 7) | maskedOctets[k];
-				}
-				if (negative) {
-					iv->val.int32 = - ( iv->val.uint32 + 1 );
-					if (iv->val.int32 <= INT16_MAX && iv->val.int32 >= INT16_MIN ) {
-						iv->type = INTEGER_16;
-					} else {
-						iv->type = INTEGER_32;
-					}
-				} else {
-					if (iv->val.uint32 <= UINT16_MAX) {
-						iv->type = UNSIGNED_INTEGER_16;
-					} else {
-						iv->type = UNSIGNED_INTEGER_32;
-					}
-				}
-				return 0;
-			case 4: /* 35 bits */
-			case 5: /* 42 bits */
-			case 6: /* 49 bits */
-			case 7: /* 56 bits */
-			case 8: /* 63 bits */
-			case 9: /* 70 bits */
-				maskedOctets[i] = b;
-				iv->val.uint64 = 0;
-				for (k = i; k >= 0 ; k--) {
-					iv->val.uint64  = (iv->val.uint64 << 7) | maskedOctets[k];
-				}
-				if (negative) {
-					if (i > 8) {
-						/* too large */
-						return EXI_UNSUPPORTED_INTEGER_VALUE;
-					}
-					iv->val.int64 = - ( iv->val.uint64 + 1 );
-					if (iv->val.int64 <= INT32_MAX && iv->val.int64 >= INT32_MIN ) {
-						iv->type = INTEGER_32;
-					} else {
-						iv->type = INTEGER_64;
-					}
-				} else {
-					if (iv->val.uint64 <= UINT32_MAX) {
-						iv->type = UNSIGNED_INTEGER_32;
-						/* iv->val.uint32 = iv->val.uint64;*/
-					} else {
-						iv->type = UNSIGNED_INTEGER_64;
-					}
-				}
-				return 0;
-			default:
-				return EXI_UNSUPPORTED_INTEGER_VALUE;
-			}
-		} else {
-			/* the 7 least significant bits hold the actual value */
-			maskedOctets[i] = (b & 127);
-		}
-	}
-
-
-	return EXI_UNSUPPORTED_INTEGER_VALUE;
-}
-
-int decodeUnsignedInteger(bitstream_t* stream, integer_t* iv) {
-	return _decodeUnsignedInteger(stream, iv, 0);
-}
-
-int decodeUnsignedInteger16(bitstream_t* stream, uint16_t* uint16) {
-	unsigned int mShift = 0;
-	int errn = 0;
-	uint8_t b;
-	*uint16 = 0;
-
-	do {
-		/* 1. Read the next octet */
-		errn = decode(stream, &b);
-		/* 2. Multiply the value of the unsigned number represented by the 7
-		 * least significant
-		 * bits of the octet by the current multiplier and add the result to
-		 * the current value */
-		*uint16 += (b & 127) << mShift;
-		/* 3. Multiply the multiplier by 128 */
-		mShift += 7;
-		/* 4. If the most significant bit of the octet was 1, go back to step 1 */
-	} while (errn >= 0 && (b >> 7) == 1);
-
-	return errn;
-}
-
-int decodeUnsignedInteger32(bitstream_t* stream, uint32_t* uint32) {
-	/* 0XXXXXXX ... 1XXXXXXX 1XXXXXXX */
-	unsigned int mShift = 0;
-	int errn = 0;
-	uint8_t b;
-	*uint32 = 0;
-
-	do {
-		/* 1. Read the next octet */
-		errn = decode(stream, &b);
-		/* 2. Multiply the value of the unsigned number represented by the 7
-		 * least significant
-		 * bits of the octet by the current multiplier and add the result to
-		 * the current value */
-		*uint32 += (b & 127) << mShift;
-		/* 3. Multiply the multiplier by 128 */
-		mShift += 7;
-		/* 4. If the most significant bit of the octet was 1, go back to step 1 */
-	} while (errn >= 0 && (b >> 7) == 1);
-
-	return errn;
-}
-
-/**
- * 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) {
-	unsigned int mShift = 0;
-	int errn = 0;
-	uint8_t b;
-	*uint64 = 0L;
-
-	do {
-		errn = decode(stream, &b);
-		*uint64 += ((uint64_t) (b & 127)) << mShift;
-		mShift += 7;
-	} while (errn >= 0 && (b >> 7) == 1);
-
-	return errn;
-}
-
-
-int decodeInteger(bitstream_t* stream, integer_t* iv) {
-	int b;
-	int errn = decodeBoolean(stream, &b);
-	if (errn < 0) {
-		return errn;
-	}
-
-	return _decodeUnsignedInteger(stream, iv, b);
-}
-
-/**
- * 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) {
-	int b;
-	uint32_t uint32;
-	int errn = decodeBoolean(stream, &b);
-
-	if (errn < 0) {
-		return errn;
-	}
-
-	if (b) {
-		/* For negative values, the Unsigned Integer holds the
-		 * magnitude of the value minus 1 */
-		errn = decodeUnsignedInteger32(stream, &uint32);
-		*int32 = -(uint32 + 1);
-	} else {
-		/* positive */
-		errn = decodeUnsignedInteger32(stream, &uint32);
-		*int32 = (int32_t)(uint32);
-	}
-
-	return errn;
-}
-
-/**
- * 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) {
-	int b;
-	uint64_t uint64;
-	int errn = decodeBoolean(stream, &b);
-
-	if (errn < 0) {
-		return errn;
-	}
-
-	if (b) {
-		/* For negative values, the Unsigned Integer holds the
-		 * magnitude of the value minus 1 */
-		errn = decodeUnsignedInteger64(stream, &uint64);
-		*int64 = -(uint64 + 1);
-	} else {
-		/* positive */
-		errn = decodeUnsignedInteger64(stream, &uint64);
-		*int64 = (int64_t)(uint64);
-	}
-
-	return errn;
-}
-
-/**
- * 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) {
-	int errn = decodeInteger64(stream, &f->mantissa);
-	if (errn < 0) {
-		return errn;
-	}
-	return decodeInteger32(stream, &f->exponent);
-}
-
-/**
- * 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) {
-	int errn = decodeBoolean(stream, &d->negative);
-	if (errn < 0) {
-		return errn;
-	}
-	errn = decodeUnsignedInteger(stream, &d->integral);
-	if (errn < 0) {
-		return errn;
-	}
-	errn = decodeUnsignedInteger(stream, &d->reverseFraction);
-
-	return errn;
-}
-
-/**
- * Decode a sequence of characters for a given length.
- */
-int decodeStringOnly(bitstream_t* stream, uint16_t len, string_ucs_t* s) {
-	if (len > s->size) {
-		/* not enough space */
-		return EXI_ERROR_OUT_OF_STRING_BUFFER;
-	}
-	decodeCharacters(stream, len, s->codepoints);
-	s->len = len;
-	return 0;
-}
-
-/**
- * Decode a length prefixed sequence of characters.
- */
-int decodeString(bitstream_t* stream, string_ucs_t* s) {
-	int errn = decodeUnsignedInteger16(stream, &s->len);
-	if (errn < 0) {
-		return errn;
-	}
-	return decodeStringOnly(stream, s->len, s);
-}
-
-int decodeStringASCII(bitstream_t* stream, string_ascii_t* s) {
-	uint16_t slen;
-	int errn = decodeUnsignedInteger16(stream, &slen);
-	if (errn < 0) {
-		return errn;
-	}
-	if (s->size < slen) {
-		return EXI_ERROR_OUT_OF_ASCII_BUFFER;
-	}
-
-	return decodeCharactersASCII(stream, slen, s->chars);
-
-}
-
-int decodeStringValue(bitstream_t* stream, string_ucs_t* s) {
-	int errn = decodeUnsignedInteger16(stream, &s->len);
-	if (errn < 0) {
-		return errn;
-	}
-
-	switch (s->len) {
-	case 0:
-		/* local value partition */
-		return EXI_UNSUPPORTED_STRING_TABLE_LOCAL_HIT;
-	case 1:
-		/* found in global value partition */
-		return EXI_UNSUPPORTED_STRING_TABLE_GLOBAL_HIT;
-	default:
-		/* not found in global value (and local value) partition
-		 * ==> string literal is encoded as a String with the length
-		 * incremented by two */
-		return decodeStringOnly(stream, ((s->len) - 2), s);
-		/* After encoding the string value, it is added to both the
-		 * associated "local" value string table partition and the global
-		 * value string table partition */
-		/* addValue(context, value); */
-	}
-}
-
-int decodeRCSStringValue(bitstream_t* stream, rcs_t* rcs, string_ucs_t* s) {
-	unsigned int i;
-	uint32_t cp;
-	int errn = decodeUnsignedInteger16(stream, &s->len);
-	if (errn < 0) {
-		return errn;
-	}
-
-	switch (s->len) {
-	case 0:
-		/* local value partition */
-		return EXI_UNSUPPORTED_STRING_TABLE_LOCAL_HIT;
-	case 1:
-		/* found in global value partition */
-		return EXI_UNSUPPORTED_STRING_TABLE_GLOBAL_HIT;
-	default:
-		/* not found in global value (and local value) partition
-		 * ==> string literal is encoded as a String with the length
-		 * incremented by two */
-		s->len = s->len - 2;
-
-		if (s->len > s->size) {
-			/* not enough space */
-			return EXI_ERROR_OUT_OF_STRING_BUFFER;
-		}
-
-		for (i = 0; i < s->len && errn >= 0; i++) {
-			errn = decodeNBitUnsignedInteger(stream, rcs->codingLength, &cp);
-			if (errn < 0) {
-				return errn;
-			}
-			s->codepoints[i] = rcs->codepoints[cp];
-		}
-		/* After encoding the string value, it is added to both the
-		 * associated "local" value string table partition and the global
-		 * value string table partition */
-		/* addValue(context, value); */
-		return 0;
-	}
-}
-
-/**
- * Decode 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 decodeCharacters(bitstream_t* stream, uint16_t len, uint32_t* chars) {
-	unsigned int i;
-	int errn = 0;
-	for (i = 0; i < len && errn >= 0; i++) {
-		errn = decodeUnsignedInteger32(stream, &chars[i]);
-		if (errn < 0) {
-			return errn;
-		}
-	}
-
-	return errn;
-}
-int decodeCharactersASCII(bitstream_t* stream, uint16_t len, char* chars) {
-	unsigned int i;
-	uint32_t c;
-	int errn = 0;
-	for (i = 0; i < len && errn >= 0; i++) {
-		errn = decodeUnsignedInteger32(stream, &c);
-		if (errn < 0) {
-			return errn;
-		}
-		if (c > 127) {
-			return EXI_ERROR_CONVERSION_NO_ASCII_CHARACTERS;
-		}
-		chars[i] = c;
-	}
-	chars[i] = '\0';
-
-	return errn;
-}
-
-
-/**
- * Decode a binary value as a length-prefixed sequence of octets.
- */
-int decodeBinary(bitstream_t* stream, bytes_t* bytes) {
-	unsigned int i;
-	uint8_t b;
-	int errn = decodeUnsignedInteger16(stream, &bytes->len);
-	if (errn < 0) {
-		return errn;
-	}
-	if (bytes->len > bytes->size) {
-		/* not enough space */
-		return EXI_ERROR_OUT_OF_BYTE_BUFFER;
-	}
-
-	for (i = 0; i < bytes->len && errn >= 0; i++) {
-		errn = decode(stream, &b);
-		if (errn < 0) {
-			return errn;
-		}
-		bytes->data[i] = (uint8_t)b;
-	}
-
-	return errn;
-}
-
-/**
- * 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){
-	int errn;
-
-	datetime->type = type;
-
-	datetime->year = 0;
-	datetime->monthDay = 0;
-	datetime->time = 0;
-	datetime->presenceFractionalSecs = 0;
-	datetime->fractionalSecs = 0;
-	datetime->presenceTimezone = 0;
-	datetime->timezone = 0;
-
-	switch (type) {
-	case exiGYear: /* Year, [Time-Zone] */
-		errn = decodeInteger32(stream, &datetime->year);
-		if (errn < 0) {
-			return errn;
-		}
-		datetime->year += DATETIME_YEAR_OFFSET;
-		break;
-	case exiGYearMonth: /* Year, MonthDay, [TimeZone] */
-	case exiDate:
-		errn = decodeInteger32(stream, &datetime->year);
-		if (errn < 0) {
-			return errn;
-		}
-		datetime->year += DATETIME_YEAR_OFFSET;
-		errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, &datetime->monthDay);
-		break;
-	case exiDateTime: /* Year, MonthDay, Time, [FractionalSecs], [TimeZone] */
-		/* e.g. "0001-01-01T00:00:00.111+00:33"  */
-		errn = decodeInteger32(stream, &datetime->year);
-		if (errn < 0) {
-			return errn;
-		}
-		datetime->year += DATETIME_YEAR_OFFSET;
-		errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, &datetime->monthDay);
-		if (errn < 0) {
-			return errn;
-		}
-		/* Note: *no* break  */
-	case exiTime: /* Time, [FractionalSecs], [TimeZone] */
-		/* e.g. "12:34:56.135"  */
-		errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIME, &datetime->time);
-		if (errn < 0) {
-			return errn;
-		}
-		errn = decodeBoolean(stream, &datetime->presenceFractionalSecs);
-		if (errn < 0) {
-			return errn;
-		}
-		if (datetime->presenceFractionalSecs) {
-			errn = decodeUnsignedInteger32(stream, &datetime->fractionalSecs);
-		}
-		break;
-	case exiGMonth: /* MonthDay, [TimeZone] */
-		/* e.g. "--12" */
-	case exiGMonthDay: /* MonthDay, [TimeZone] */
-		/* e.g. "--01-28"  */
-	case exiGDay: /* MonthDay, [TimeZone] */
-		/* "---16"  */
-		errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, &datetime->monthDay );
-		break;
-	default:
-		return -1;
-	}
-
-	errn = decodeBoolean(stream, &datetime->presenceTimezone );
-	if (errn < 0) {
-		return errn;
-	}
-	if (datetime->presenceTimezone) {
-		errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIMEZONE, &datetime->timezone);
-		datetime->timezone -= DATETIME_TIMEZONE_OFFSET_IN_MINUTES;
-	}
-
-	return errn;
-}
-
-#endif
-

+ 0 - 436
src/codec/AbstractEncoderChannel.c

@@ -1,436 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#include "EncoderChannel.h"
-#include "CoderChannel.h"
-#include "BitOutputStream.h"
-#include "EXITypes.h"
-#include "MethodsBag.h"
-
-#ifndef ABSTRACT_ENCODER_CHANNEL_C
-#define ABSTRACT_ENCODER_CHANNEL_C
-
-
-int encodeUnsignedInteger(bitstream_t* stream, integer_t* iv) {
-	int errn = 0;
-	switch(iv->type) {
-	/* Unsigned Integer */
-	case UNSIGNED_INTEGER_8:
-		errn = encodeUnsignedInteger32(stream, iv->val.uint8);
-		break;
-	case UNSIGNED_INTEGER_16:
-		errn = encodeUnsignedInteger32(stream, iv->val.uint16);
-		break;
-	case UNSIGNED_INTEGER_32:
-		errn = encodeUnsignedInteger32(stream, iv->val.uint32);
-		break;
-	case UNSIGNED_INTEGER_64:
-		errn = encodeUnsignedInteger64(stream, iv->val.uint64);
-		break;
-	/* (Signed) Integer */
-	case INTEGER_8:
-		if (iv->val.int8 < 0) {
-			return EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE;
-		}
-		errn = encodeUnsignedInteger32(stream, iv->val.int8);
-		break;
-	case INTEGER_16:
-		if (iv->val.int16 < 0) {
-			return EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE;
-		}
-		errn = encodeUnsignedInteger32(stream, iv->val.int16);
-		break;
-	case INTEGER_32:
-		if (iv->val.int32 < 0) {
-			return EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE;
-		}
-		errn = encodeUnsignedInteger32(stream, iv->val.int32);
-		break;
-	case INTEGER_64:
-		if (iv->val.int64 < 0) {
-			return EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE;
-		}
-		errn = encodeUnsignedInteger64(stream, iv->val.int64);
-		break;
-	default:
-		errn = EXI_UNSUPPORTED_INTEGER_VALUE_TYPE;
-	}
-
-	return errn;
-}
-
-/**
- * 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) {
-	int errn = 0;
-	if (n < 128) {
-		/* write byte as is */
-		errn = encode(stream, (uint8_t) n);
-	} else {
-		uint8_t n7BitBlocks = numberOf7BitBlocksToRepresent(n);
-
-		switch (n7BitBlocks) {
-		case 5:
-			errn = encode(stream, (uint8_t) (128 | n));
-			n = n >> 7;
-			if (errn < 0) {
-				break;
-			}
-		case 4:
-			errn = encode(stream, (uint8_t) (128 | n));
-			n = n >> 7;
-			if (errn < 0) {
-				break;
-			}
-		case 3:
-			errn = encode(stream, (uint8_t) (128 | n));
-			n = n >> 7;
-			if (errn < 0) {
-				break;
-			}
-		case 2:
-			errn = encode(stream, (uint8_t) (128 | n));
-			n = n >> 7;
-			if (errn < 0) {
-				break;
-			}
-		case 1:
-			/* 0 .. 7 (last byte) */
-			errn = encode(stream, (uint8_t) (0 | n));
-		}
-	}
-
-	return errn;
-}
-
-/**
- * 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) {
-	int errn = 0;
-	uint8_t lastEncode = (uint8_t) n;
-	n >>= 7;
-
-	while (n != 0) {
-		errn = encode(stream, lastEncode | 128);
-		if (errn < 0) {
-			return errn;
-		}
-		lastEncode = (uint8_t) n;
-		n >>= 7;
-	}
-
-	return encode(stream, lastEncode);
-}
-
-
-int encodeInteger(bitstream_t* stream, integer_t* iv) {
-	int errn = 0;
-	switch(iv->type) {
-	/* Unsigned Integer */
-	case UNSIGNED_INTEGER_8:
-		errn = encodeInteger32(stream, iv->val.uint8);
-		break;
-	case UNSIGNED_INTEGER_16:
-		errn = encodeInteger32(stream, iv->val.uint16);
-		break;
-	case UNSIGNED_INTEGER_32:
-		errn = encodeInteger64(stream, iv->val.uint32);
-		break;
-	case UNSIGNED_INTEGER_64:
-		errn = encodeInteger64(stream, iv->val.uint64);
-		break;
-	/* (Signed) Integer */
-	case INTEGER_8:
-		errn = encodeInteger32(stream, iv->val.int8);
-		break;
-	case INTEGER_16:
-		errn = encodeInteger32(stream, iv->val.int16);
-		break;
-	case INTEGER_32:
-		errn = encodeInteger32(stream, iv->val.int32);
-		break;
-	case INTEGER_64:
-		errn = encodeInteger64(stream, iv->val.int64);
-		break;
-	default:
-		errn = EXI_UNSUPPORTED_INTEGER_VALUE_TYPE;
-	}
-
-	return errn;
-}
-
-
-/**
- * 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) {
-	int errn;
-	/* signalize sign */
-	if (n < 0) {
-		errn = encodeBoolean(stream, 1);
-		/* For negative values, the Unsigned Integer holds the
-		 * magnitude of the value minus 1 */
-		n = (-n) - 1;
-	} else {
-		errn = encodeBoolean(stream, 0);
-	}
-	if (errn < 0) {
-		return errn;
-	}
-	return encodeUnsignedInteger32(stream, n);
-}
-
-/**
- * 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) {
-	int errn;
-	/* signalize sign */
-	if (n < 0) {
-		errn = encodeBoolean(stream, 1);
-		/* For negative values, the Unsigned Integer holds the
-		 * magnitude of the value minus 1 */
-		n = (-n) - 1;
-	} else {
-		errn = encodeBoolean(stream, 0);
-	}
-	if (errn < 0) {
-		return errn;
-	}
-	return encodeUnsignedInteger64(stream, n);
-}
-
-/**
- * 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 encodeFloat(bitstream_t* stream, float_me_t* f) {
-	int errn = encodeInteger64(stream, f->mantissa);
-	if (errn >= 0) {
-		errn = encodeInteger32(stream, f->exponent);
-	}
-	return errn;
-}
-
-/**
- * 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 encodeDecimal(bitstream_t* stream, decimal_t* d) {
-	/* sign, integral, reverse fractional */
-	int errn = encodeBoolean(stream, d->negative);
-	if (errn < 0) {
-		return errn;
-	}
-	errn = encodeUnsignedInteger(stream, &d->integral);
-	if (errn < 0) {
-		return errn;
-	}
-	errn = encodeUnsignedInteger(stream, &d->reverseFraction);
-
-	return errn;
-}
-
-
-/**
- * Encode a length prefixed sequence of characters.
- */
-int encodeASCII(bitstream_t* stream, const char* ascii) {
-	int errn;
-	uint32_t slen = (uint32_t) strlen(ascii);
-	errn = encodeUnsignedInteger32(stream, slen);
-	if (errn >= 0) {
-		errn = encodeASCIICharacters(stream, ascii, slen);
-	}
-	return errn;
-}
-
-int encodeString(bitstream_t* stream, string_ucs_t* string) {
-	int errn = encodeUnsignedInteger32(stream, string->len);
-	if (errn >= 0) {
-		errn = encodeUCSCharacters(stream, string->codepoints, string->len);
-	}
-	return errn;
-}
-
-int encodeStringValue(bitstream_t* stream, string_ucs_t* string) {
-	/* encode string as string table miss */
-	int errn = encodeUnsignedInteger32(stream, string->len + 2);
-	if (errn >= 0) {
-		errn = encodeUCSCharacters(stream, string->codepoints, string->len);
-	}
-	return errn;
-}
-
-
-int encodeRCSStringValue(bitstream_t* stream, rcs_t* rcs, string_ucs_t* string) {
-	unsigned int i;
-	uint32_t k;
-	/* encode string as string table miss */
-	int errn = encodeUnsignedInteger32(stream, string->len + 2);
-	if (errn >= 0) {
-		for (i = 0; i < string->len && errn >= 0; i++) {
-			for (k = 0; k < rcs->size && errn >= 0; k++) {
-				if (rcs->codepoints[k] == string->codepoints[i]) {
-					errn = encodeNBitUnsignedInteger(stream, rcs->codingLength, k);
-					break; /* break inner for loop */
-				}
-			}
-		}
-	}
-	return errn;
-}
-
-/**
- * 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 encodeUCSCharacters(bitstream_t* stream, uint32_t* chars, uint16_t len) {
-	unsigned int i;
-	int errn = 0;
-	for (i = 0; i < len && errn >= 0; i++) {
-		errn = encodeUnsignedInteger32(stream, chars[i]);
-	}
-	return errn;
-}
-
-int encodeASCIICharacters(bitstream_t* stream, const char* chars, uint16_t len) {
-	unsigned int i;
-	int errn = 0;
-	for (i = 0; i < len && errn >= 0; i++) {
-		errn = encode(stream, chars[i]);
-	}
-	return errn;
-}
-
-/**
- * Encode a binary value as a length-prefixed sequence of octets.
- */
-int encodeBinary(bitstream_t* stream, bytes_t* bytes) {
-	unsigned int i;
-	int errn = encodeUnsignedInteger32(stream, bytes->len);
-
-	for (i = 0; i < bytes->len && errn >= 0; i++) {
-		errn = encode(stream, bytes->data[i]);
-	}
-	return errn;
-}
-
-/**
- * Encode a datetime representation which is a sequence of values
- * representing the individual components of the Date-Time
- */
-int encodeDateTime(bitstream_t* stream, datetime_t* datetime) {
-	int errn = 0;
-	switch (datetime->type) {
-	case exiGYear: /* Year, [Time-Zone] */
-		errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET);
-		break;
-	case exiGYearMonth: /* Year, MonthDay, [TimeZone] */
-	case exiDate: /* Year, MonthDay, [TimeZone] */
-		errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET);
-		if (errn < 0) {
-			return errn;
-		}
-		errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, datetime->monthDay);
-		break;
-	case exiDateTime: /* Year, MonthDay, Time, [FractionalSecs], [TimeZone] */
-		errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET);
-		if (errn < 0) {
-			return errn;
-		}
-		errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, datetime->monthDay);
-		if (errn < 0) {
-			return errn;
-		}
-		/* Note: *no* break */
-	case exiTime: /* Time, [FractionalSecs], [TimeZone] */
-		errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIME, datetime->time);
-		if (errn < 0) {
-			return errn;
-		}
-		if (datetime->presenceFractionalSecs) {
-			encodeBoolean(stream, 1);
-			if (errn < 0) {
-				return errn;
-			}
-			encodeUnsignedInteger32(stream, datetime->fractionalSecs);
-		} else {
-			encodeBoolean(stream, 0);
-		}
-		break;
-	case exiGMonth: /* MonthDay, [TimeZone] */
-	case exiGMonthDay: /* MonthDay, [TimeZone] */
-	case exiGDay: /* MonthDay, [TimeZone] */
-		errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, datetime->monthDay);
-		break;
-	default:
-		return EXI_ERROR_UNEXPECTED_DATETIME_TYPE;
-	}
-	if (errn < 0) {
-		return errn;
-	}
-	/* [TimeZone] */
-	if (datetime->presenceTimezone) {
-		errn = encodeBoolean(stream, 1);
-		if (errn < 0) {
-			return errn;
-		}
-		encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIMEZONE, datetime->timezone
-				+ DATETIME_TIMEZONE_OFFSET_IN_MINUTES);
-	} else {
-		encodeBoolean(stream, 0);
-	}
-
-	return errn;
-}
-
-#endif
-

+ 0 - 73
src/codec/BitDecoderChannel.c

@@ -1,73 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#include "DecoderChannel.h"
-#include "BitInputStream.h"
-#include "EXITypes.h"
-
-#ifndef BIT_DECODER_CHANNEL_C
-#define BIT_DECODER_CHANNEL_C
-
-
-#if EXI_ALIGNMENT == BIT_PACKED
-
-int decode(bitstream_t* stream, uint8_t* b) {
-	uint32_t bb;
-	int errn =  readBits(stream, 8, &bb);
-	if (errn < 0) {
-		return errn;
-	}
-	if (bb > 256) {
-		return EXI_ERROR_UNEXPECTED_BYTE_VALUE;
-	} else {
-		*b = (uint8_t)bb;
-	}
-	return errn;
-}
-
-int decodeBoolean(bitstream_t* stream, int* b) {
-	uint32_t ub;
-	int errn = readBits(stream, 1, &ub);
-	*b = (ub == 0) ? 0 : 1;
-	return errn;
-}
-
-int decodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t* uint32) {
-	if (nbits == 0) {
-		*uint32 = 0;
-		return 0;
-	} else {
-		return readBits(stream, nbits, uint32);
-	}
-}
-
-#endif
-
-#endif
-

+ 0 - 138
src/codec/BitDecoderChannel.h

@@ -1,138 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-05-23 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "EXITypes.h"
-
-#ifndef BIT_DECODER_CHANNEL_H
-#define BIT_DECODER_CHANNEL_H
-
-/**
- * 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 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 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 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);
-
-
-/**
- * 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);
-
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-

+ 0 - 88
src/codec/BitEncoderChannel.c

@@ -1,88 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#include "EncoderChannel.h"
-#include "CoderChannel.h"
-#include "BitOutputStream.h"
-#include "EXITypes.h"
-
-#ifndef BIT_ENCODER_CHANNEL_C
-#define BIT_ENCODER_CHANNEL_C
-
-#if EXI_ALIGNMENT == BIT_PACKED
-
-
-int encode(bitstream_t* stream, uint8_t b) {
-	return writeBits(stream, 8, b);
-}
-
-/**
- * Encode a single boolean value. A false value is encoded as bit 0 and true
- * value is encode as bit 1.
- */
-int encodeBoolean(bitstream_t* stream, int b) {
-	uint8_t val = b ? 1 : 0;
-	return writeBits(stream, 1, 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.
- */
-int encodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t val)  {
-	if (nbits > 0) {
-		return writeBits(stream, nbits, val);
-	}
-	return 0;
-}
-
-/**
- * Flush underlying bit output stream.
- */
-int encodeFinish(bitstream_t* stream) {
-	return flush(stream);
-}
-
-
-#endif /* alignment */
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-

+ 0 - 140
src/codec/BitEncoderChannel.h

@@ -1,140 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-05-23 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-
-#include "EXITypes.h"
-
-#ifndef BIT_ENCODER_CHANNEL_H
-#define BIT_ENCODER_CHANNEL_H
-
-/**
- * Encode a single boolean value. A false value is encoded as bit 0 and true
- * value is encode as bit 1.
- */
-int encodeBoolean(bitstream_t* stream, int b);
-
-
-/**
- * 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 encodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t val);
-
-
-/**
- * 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 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 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 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 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 encodeFloat(bitstream_t* stream, float_me_t* f);
-
-
-/**
- * Encode a length prefixed sequence of characters.
- */
-int encodeString(bitstream_t* stream, string_ucs_t* string);
-int encodeASCII(bitstream_t* stream, const char* ascii);
-
-/**
- * Encode a length prefixed sequence of characters in the sense of string tables
- */
-int encodeStringValue(bitstream_t* stream, string_ucs_t* string);
-
-/**
- * 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 encodeUCSCharacters(bitstream_t* stream, uint32_t* chars, uint16_t len);
-
-int encodeASCIICharacters(bitstream_t* stream, const char* chars, uint16_t len);
-
-/**
- * Encode a binary value as a length-prefixed sequence of octets.
- */
-int encodeBinary(bitstream_t* stream, bytes_t* bytes);
-
-/**
- * Flush underlying bit output stream
- */
-int encodeFinish(bitstream_t* stream);
-
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-
-
-
-
-
-

+ 0 - 110
src/codec/BitInputStream.c

@@ -1,110 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#include "EXITypes.h"
-#include "BitInputStream.h"
-
-#ifndef BIT_INPUT_STREAM_C
-#define BIT_INPUT_STREAM_C
-
-/* internal method to (re)fill buffer */
-int readBuffer(bitstream_t* stream)
-{
-	int errn = 0;
-	if(stream->capacity==0)
-	{
-#if EXI_STREAM == BYTE_ARRAY
-		if ( (*stream->pos) < stream->size ) {
-			stream->buffer = stream->data[(*stream->pos)++];
-			stream->capacity = BITS_IN_BYTE;
-		} else {
-			errn = EXI_ERROR_INPUT_STREAM_EOF;
-		}
-#endif
-#if EXI_STREAM == FILE_STREAM
-		stream->buffer = getc(stream->file);
-		/* EOF cannot be used, 0xFF valid value */
-		if ( feof(stream->file) || ferror(stream->file) ) {
-			return EXI_ERROR_INPUT_STREAM_EOF;
-		}
-		stream->capacity = BITS_IN_BYTE;
-#endif
-	}
-	return errn;
-}
-
-int readBits(bitstream_t* stream, uint16_t num_bits, uint32_t* b)
-{
-	int errn = readBuffer(stream);
-	if (errn < 0) {
-		return errn;
-	}
-
-	/* read the bits in one step */
-	if(num_bits <= stream->capacity)
-	{
-		stream->capacity -= num_bits;
-		*b = (stream->buffer >> stream->capacity) & (0xff >> (BITS_IN_BYTE - num_bits));
-	}
-	else
-	{
-		/* read bits as much as possible */
-		*b = stream->buffer & (0xff >> (BITS_IN_BYTE - stream->capacity));
-		num_bits -= stream->capacity;
-		stream->capacity = 0;
-
-		/* read whole bytes */
-		while(num_bits >= 8)
-		{
-			errn = readBuffer(stream);
-			if (errn < 0) {
-				return errn;
-			}
-			*b = ((*b) << BITS_IN_BYTE) | stream->buffer;
-			num_bits -= BITS_IN_BYTE;
-			stream->capacity = 0;
-		}
-
-		/* read the spare bits in the buffer */
-		if(num_bits>0)
-		{
-			errn = readBuffer(stream);
-			if (errn < 0) {
-				return errn;
-			}
-			*b = ((*b) << num_bits) | (stream->buffer >> (BITS_IN_BYTE - num_bits));
-			stream->capacity = BITS_IN_BYTE - num_bits;
-		}
-		
-	}
-
-	return errn;
-}
-
-#endif

+ 0 - 48
src/codec/BitInputStream.h

@@ -1,48 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "EXITypes.h"
-
-#ifndef BIT_INPUT_STREAM_H
-#define BIT_INPUT_STREAM_H
-
-int readBits(bitstream_t* stream, uint16_t num_bits, uint32_t* b);
-
-int flush();
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 118
src/codec/BitOutputStream.c

@@ -1,118 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#include "EXITypes.h"
-#include "BitOutputStream.h"
-
-#ifndef BIT_OUTPUT_STREAM_C
-#define BIT_OUTPUT_STREAM_C
-
-/*	NOTE: nbits <= 8 */
-int writeBits(bitstream_t* stream, uint16_t nbits, uint32_t val) {
-	/*  is there enough space in the buffer */
-	if (nbits <= stream->capacity) {
-		/* all bits fit into the current buffer */
-		stream->buffer = (stream->buffer << (nbits)) | (val & (0xff
-				>> (BITS_IN_BYTE - nbits)));
-		stream->capacity -= nbits;
-		/* if the buffer is full write byte */
-		if (stream->capacity == 0) {
-#if EXI_STREAM == BYTE_ARRAY
-			if ((*stream->pos) >= stream->size) {
-				return EXI_ERROR_OUTPUT_STREAM_EOF;
-			}
-			stream->data[(*stream->pos)++] = stream->buffer;
-#endif
-#if EXI_STREAM == FILE_STREAM
-			if ( putc(stream->buffer, stream->file) == EOF ) {
-				return EXI_ERROR_OUTPUT_STREAM_EOF;
-			}
-#endif
-			stream->capacity = BITS_IN_BYTE;
-			stream->buffer = 0;
-		}
-	} else {
-		/* the buffer is not enough
-		 * fill the buffer */
-		stream->buffer = (stream->buffer << stream->capacity) | ((val >> (nbits
-				- stream->capacity)) & (0xff >> (BITS_IN_BYTE
-				- stream->capacity)));
-
-		nbits -= stream->capacity;
-#if EXI_STREAM == BYTE_ARRAY
-		if ((*stream->pos) >= stream->size) {
-			return EXI_ERROR_OUTPUT_STREAM_EOF;
-		}
-		stream->data[(*stream->pos)++] = stream->buffer;
-#endif
-#if EXI_STREAM == FILE_STREAM
-		if ( putc(stream->buffer, stream->file) == EOF ) {
-			return EXI_ERROR_OUTPUT_STREAM_EOF;
-		}
-#endif
-		stream->buffer = 0;
-
-		/* write whole bytes */
-		while (nbits >= BITS_IN_BYTE) {
-			nbits -= BITS_IN_BYTE;
-#if EXI_STREAM == BYTE_ARRAY
-			if ((*stream->pos) >= stream->size) {
-				return EXI_ERROR_OUTPUT_STREAM_EOF;
-			}
-			stream->data[(*stream->pos)++] = (val >> (nbits));
-#endif
-#if EXI_STREAM == FILE_STREAM
-			if ( putc((val >> (nbits)), stream->file) == EOF ) {
-				return EXI_ERROR_OUTPUT_STREAM_EOF;
-			}
-#endif
-		}
-
-		/* spared bits are kept in the buffer */
-		stream->buffer = val; /* Note: the high bits will be shifted out during further filling */
-		stream->capacity = BITS_IN_BYTE - (nbits);
-	}
-
-	return 0;
-}
-
-/**
- * Flush output
- */
-int flush(bitstream_t* stream) {
-	if (stream->capacity == BITS_IN_BYTE) {
-		/* nothing to do, no bits in buffer */
-		return 0;
-	} else {
-		return writeBits(stream, stream->capacity, 0);
-	}
-}
-
-#endif
-

+ 0 - 52
src/codec/BitOutputStream.h

@@ -1,52 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-
-#include "EXITypes.h"
-
-#ifndef BIT_OUTPUT_STREAM_H
-#define BIT_OUTPUT_STREAM_H
-
-int writeBits(bitstream_t* stream, uint16_t nbits, uint32_t bits);
-
-/* flush output */
-int flush(bitstream_t* stream);
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-

+ 0 - 93
src/codec/ByteDecoderChannel.c

@@ -1,93 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#include "DecoderChannel.h"
-#include "CoderChannel.h"
-#include "BitInputStream.h"
-#include "EXITypes.h"
-
-#ifndef BYTE_DECODER_CHANNEL_C
-#define BYTE_DECODER_CHANNEL_C
-
-
-#if EXI_ALIGNMENT == BYTE_ALIGNMENT
-
-int decode(bitstream_t* stream, uint8_t* b) {
-	int errn = 0;
-#if EXI_STREAM == BYTE_ARRAY
-	if ( (*stream->pos) < stream->size ) {
-		*b = stream->data[(*stream->pos)++];
-	} else {
-		errn = EXI_ERROR_INPUT_STREAM_EOF;
-	}
-#endif /* EXI_STREAM == BYTE_ARRAY */
-#if EXI_STREAM == FILE_STREAM
-	*b = getc(stream->file);
-	/* EOF cannot be used, 0xFF valid value */
-	if ( feof(stream->file) || ferror(stream->file) ) {
-		return EXI_ERROR_INPUT_STREAM_EOF;
-	}
-#endif /* EXI_STREAM == FILE_STREAM */
-
-	return errn;
-}
-
-int decodeBoolean(bitstream_t* stream, int* b) {
-	uint8_t bb;
-	int errn = decode(stream, &bb);
-	*b = (bb == 0) ? 0 : 1;
-	return errn;
-}
-
-/**
- * Decodes and returns an n-bit unsigned integer using the minimum number of
- * bytes required for n bits.
- */
-int decodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t* uint32) {
-	uint16_t bitsRead = 0;
-	uint8_t b;
-	int errn = 0;
-	*uint32 = 0;
-
-	while (bitsRead < nbits) {
-		errn = decode(stream, &b);
-		if (errn != 0) {
-			return errn;
-		}
-		*uint32 += (b << bitsRead);
-		bitsRead += 8;
-	}
-
-	return errn;
-}
-
-#endif
-
-#endif
-

+ 0 - 125
src/codec/ByteEncoderChannel.c

@@ -1,125 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#include "EncoderChannel.h"
-#include "CoderChannel.h"
-#include "BitOutputStream.h"
-#include "EXITypes.h"
-#include "MethodsBag.h"
-
-#ifndef BYTE_ENCODER_CHANNEL_C
-#define BYTE_ENCODER_CHANNEL_C
-
-#if EXI_ALIGNMENT == BYTE_ALIGNMENT
-
-
-int encode(bitstream_t* stream, uint8_t b) {
-#if EXI_STREAM == BYTE_ARRAY
-	if ( (*stream->pos) < stream->size ) {
-		stream->data[(*stream->pos)++] = b;
-		return 0;
-	} else {
-		return EXI_ERROR_OUTPUT_STREAM_EOF;
-	}
-#endif /* EXI_STREAM == BYTE_ARRAY */
-#if EXI_STREAM == FILE_STREAM
-	if ( putc(b, stream->file) == EOF ) {
-		return EXI_ERROR_OUTPUT_STREAM_EOF;
-	} else {
-		return 0;
-	}
-#endif /* EXI_STREAM == FILE_STREAM */
-}
-
-/**
- * Encode a single boolean value. A false value is encoded as byte 0 and true
- * value is encode as byte 1.
- */
-int encodeBoolean(bitstream_t* stream, int b) {
-	uint8_t val = b ? 1 : 0;
-	return encode(stream, 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.
- */
-int encodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t val)  {
-	if (nbits > 0) {
-		if (nbits < 9) {
-			/* 1 byte */
-			encode(stream, val & 0xff);
-		} else if (nbits < 17) {
-			/* 2 bytes */
-			encode(stream, val & 0x00ff);
-			encode(stream, (val & 0xff00) >> 8);
-		} else if (nbits < 25) {
-			/* 3 bytes */
-			encode(stream, val & 0x0000ff);
-			encode(stream, (val & 0x00ff00) >> 8);
-			encode(stream, (val & 0xff0000) >> 16);
-		} else if (nbits < 33) {
-			/* 4 bytes */
-			encode(stream, val & 0x000000ff);
-			encode(stream, (val & 0x0000ff00) >> 8);
-			encode(stream, (val & 0x00ff0000) >> 16);
-			encode(stream, (val & 0xff000000) >> 24);
-		} else {
-			/* TODO Currently not more than 4 Bytes allowed for NBitUnsignedInteger */
-			return EXI_UNSUPPORTED_NBIT_INTEGER_LENGTH;
-		}
-	}
-	return 0;
-}
-
-
-/**
- * Flush underlying bit output stream.
- */
-int encodeFinish(bitstream_t* stream) {
-	/* no pending bits in byte-aligned mode */
-	return 0;
-}
-
-#endif /* alignment */
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-

+ 0 - 79
src/codec/ByteStream.c

@@ -1,79 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#define _CRT_SECURE_NO_DEPRECATE 1
-
-#include "EXITypes.h"
-
-#ifndef BYTE_STREAM_C
-#define BYTE_STREAM_C
-
-int readBytesFromFile(const char * filename, uint8_t* data, uint32_t size, uint32_t pos) {
-	FILE* f;
-	int character;
-
-	f = fopen(filename, "rb");
-
-	if (f == NULL) {
-		return EXI_ERROR_INPUT_FILE_HANDLE;
-	} else {
-		/* read bytes */
-		while ((character = getc(f)) != EOF) {
-			if (pos >= size) {
-				return EXI_ERROR_OUT_OF_BYTE_BUFFER;
-			}
-			data[pos++] = (uint8_t) character;
-		}
-		fclose(f);
-	}
-
-	return pos;
-}
-
-int writeBytesToFile(uint8_t* data, uint32_t len, const char * filename) {
-	uint16_t rlen;
-	FILE* f = fopen(filename, "wb+");
-
-	if (f == NULL) {
-		return -1;
-	} else {
-		rlen = fwrite(data, sizeof(uint8_t), len, f);
-		fflush(f);
-		fclose(f);
-		if(rlen == len) {
-			return 0;
-		} else {
-			return EXI_ERROR_OUTPUT_FILE;
-		}
-	}
-}
-
-
-#endif
-

+ 0 - 48
src/codec/ByteStream.h

@@ -1,48 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "EXITypes.h"
-
-#ifndef BYTE_STREAM_H
-#define BYTE_STREAM_H
-
-int writeBytesToFile(uint8_t* data, uint32_t len, const char * filename);
-
-int readBytesFromFile(const char * filename, uint8_t* data, uint32_t size, uint32_t pos);
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 48
src/codec/CoderChannel.h

@@ -1,48 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "EXITypes.h"
-
-#ifndef CODER_CHANNEL_H
-#define CODER_CHANNEL_H
-
-/* EXI alignment mode */
-#define BIT_PACKED 1
-#define BYTE_ALIGNMENT 2
-#define EXI_ALIGNMENT BIT_PACKED
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-

+ 0 - 178
src/codec/DecoderChannel.h

@@ -1,178 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#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
-

Разница между файлами не показана из-за своего большого размера
+ 0 - 1091
src/codec/EXICoder.c


+ 0 - 65
src/codec/EXICoder.h

@@ -1,65 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef EXI_CODER_H
-#define EXI_CODER_H
-
-#include "EXITypes.h"
-
-#define IS_STRICT 0
-#define DOCUMENT 0
-#define DOC_CONTENT 1
-#define DOC_END 2
-#define UR_TYPE_GRAMMAR_0 97
-#define UR_TYPE_GRAMMAR_1 809
-
-
-
-int exiPushStack(exi_state_t* state, uint16_t newState, eqname_t* eqn);
-
-int exiPopStack(exi_state_t* state);
-
-int exiHandleXsiNilTrue(exi_state_t* state);
-
-int exiHandleXsiType(exi_state_t* state, eqname_t* xsiType);
-
-int exiIsStartContent(int16_t ruleID);
-
-int exiMoveToElementContentRule(exi_state_t* state);
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-

Разница между файлами не показана из-за своего большого размера
+ 0 - 178
src/codec/EXIDecoder.c


+ 0 - 86
src/codec/EXIDecoder.h

@@ -1,86 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef EXI_DECODER_H
-#define EXI_DECODER_H
-
-#include "EXITypes.h"
-
-int exiInitDecoder(bitstream_t* stream, exi_state_t* state, exi_name_table_runtime_t runtimeTable);
-
-int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
-		exi_event_t* nextEvent);
-
-int exiDecodeStartDocument(bitstream_t* stream, exi_state_t* state);
-
-int exiDecodeEndDocument(bitstream_t* stream, exi_state_t* state);
-
-int
-		exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
-				eqname_t* se);
-
-int exiDecodeStartElementGeneric(bitstream_t* stream, exi_state_t* state,
-		qname_t* qname);
-
-int exiDecodeEndElement(bitstream_t* stream, exi_state_t* state, eqname_t* ee);
-
-int exiDecodeEndElementUndeclared(bitstream_t* stream, exi_state_t* state, eqname_t* ee);
-
-int exiDecodeCharacters(bitstream_t* stream, exi_state_t* state,
-		exi_value_t* val);
-
-int exiDecodeCharactersGeneric(bitstream_t* stream, exi_state_t* state,
-		exi_value_t* val);
-
-int exiDecodeCharactersGenericUndeclared(bitstream_t* stream, exi_state_t* state,
-		exi_value_t* val);
-
-
-int exiDecodeAttribute(bitstream_t* stream, exi_state_t* state, eqname_t* at,
-		exi_value_t* val);
-
-int exiDecodeAttributeXsiNil(bitstream_t* stream, exi_state_t* state,
-		exi_value_t* val);
-
-int exiDecodeAttributeXsiType(bitstream_t* stream, exi_state_t* state,
-		exi_value_t* val);
-
-int exiDecodeAttributeGenericUndeclared(bitstream_t* stream, exi_state_t* state, qname_t* at,
-		exi_value_t* val);
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-

Разница между файлами не показана из-за своего большого размера
+ 0 - 435
src/codec/EXIEncoder.c


+ 0 - 71
src/codec/EXIEncoder.h

@@ -1,71 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef EXI_ENCODER_H
-#define EXI_ENCODER_H
-
-#include "EXITypes.h"
-
-int exiInitEncoder(bitstream_t* stream, exi_state_t* state, exi_name_table_runtime_t runtimeTable);
-
-int exiEncodeStartDocument(bitstream_t* stream, exi_state_t* state);
-
-int exiEncodeEndDocument(bitstream_t* stream, exi_state_t* state);
-
-int
-		exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
-				eqname_t* se);
-
-int exiEncodeStartElementGeneric(bitstream_t* stream, exi_state_t* state,
-		string_ascii_t* namespaceURI, string_ascii_t* localName);
-
-int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state);
-
-int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state,
-		exi_value_t* val);
-
-int exiEncodeAttribute(bitstream_t* stream, exi_state_t* state, eqname_t* at,
-		exi_value_t* val);
-
-int exiEncodeAttributeXsiNil(bitstream_t* stream, exi_state_t* state,
-		exi_value_t* val);
-
-int exiEncodeAttributeXsiType(bitstream_t* stream, exi_state_t* state,
-		exi_value_t* val);
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-

+ 0 - 59
src/codec/EXIHeaderDecoder.c

@@ -1,59 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#include "EXIHeaderDecoder.h"
-#include "BitInputStream.h"
-#include "DecoderChannel.h"
-
-#ifndef EXI_HEADER_DECODER_C
-#define EXI_HEADER_DECODER_C
-
-int readEXIHeader(bitstream_t* stream) {
-	uint32_t header = 0;
-	int errn = readBits(stream, 8, &header);
-	if (errn < 0) {
-		return errn;
-	}
-	if(header == '$') {
-		/*	we do not support "EXI Cookie" */
-		errn = EXI_UNSUPPORTED_HEADER_COOKIE;
-	} else if ( header & 0x20 ) {
-		/* we do not support "Presence Bit for EXI Options" */
-		errn = EXI_UNSUPPORTED_HEADER_OPTIONS;
-	} else {
-		/* Yes, a *simple* header */
-		errn = 0;
-	}
-	return errn;
-}
-
-
-#endif
-
-

+ 0 - 46
src/codec/EXIHeaderDecoder.h

@@ -1,46 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "EXITypes.h"
-
-#ifndef EXI_HEADER_DECODER_H
-#define EXI_HEADER_DECODER_H
-
-int readEXIHeader(bitstream_t* stream);
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 44
src/codec/EXIHeaderEncoder.c

@@ -1,44 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#include "EXIHeaderEncoder.h"
-#include "BitOutputStream.h"
-#include "EncoderChannel.h"
-
-#ifndef EXI_HEADER_ENCODER_C
-#define EXI_HEADER_ENCODER_C
-
-int writeEXIHeader(bitstream_t* stream) {
-	return writeBits(stream, 8, 128);
-}
-
-
-#endif
-
-

+ 0 - 46
src/codec/EXIHeaderEncoder.h

@@ -1,46 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "EXITypes.h"
-
-#ifndef EXI_HEADER_ENCODER_H
-#define EXI_HEADER_ENCODER_H
-
-int writeEXIHeader(bitstream_t* stream);
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 423
src/codec/EXITypes.h

@@ -1,423 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#include <stdint.h>
-#include <stdio.h>
-
-
-#ifndef EXI_TYPES_H
-#define EXI_TYPES_H
-
-#define BITS_IN_BYTE 8
-
-#define DATETIME_YEAR_OFFSET 2000
-#define DATETIME_NUMBER_BITS_MONTHDAY 9
-#define DATETIME_NUMBER_BITS_TIME 17
-#define DATETIME_NUMBER_BITS_TIMEZONE 11
-#define DATETIME_MONTH_MULTIPLICATOR 32
-#define DATETIME_TIMEZONE_OFFSET_IN_MINUTES 896
-
-#define UINT_MAX_VALUE 65535
-
-/* EXI stream */
-#define BYTE_ARRAY 1
-#define FILE_STREAM 2
-#define EXI_STREAM BYTE_ARRAY
-/* #define EXI_STREAM FILE_STREAM */
-
-#define EXI_ELEMENT_STACK_SIZE 16
-
-#define FLOAT_EXPONENT_SPECIAL_VALUES -16384
-#define FLOAT_MANTISSA_INFINITY 1
-#define FLOAT_MANTISSA_MINUS_INFINITY -1
-#define FLOAT_MANTISSA_NOT_A_NUMBER 0
-
-typedef struct {
-#if EXI_STREAM == BYTE_ARRAY
-	/*	Byte Array */
-	uint32_t size; /* array size */
-	uint8_t* data; /* int data array */
-	uint32_t* pos; /* next position in array */
-#endif
-#if EXI_STREAM == FILE_STREAM
-	/* FILE */
-	FILE *file;
-#endif
-	/* Current byte buffer & its remaining bit capacity */
-	uint8_t buffer;
-	uint8_t capacity;
-} bitstream_t;
-
-
-typedef enum {
-	/* Binary */
-	BINARY_BASE64,
-	BINARY_HEX,
-	/* Boolean */
-	BOOLEAN,
-	BOOLEAN_FACET,
-	/* Decimal */
-	DECIMAL,
-	/* Float & Double */
-	FLOAT,
-	/* N-Bit Unsigned Integer */
-	NBIT_UNSIGNED_INTEGER,
-	/* Unsigned Integer */
-	UNSIGNED_INTEGER,
-	/* (Signed) Integer */
-	INTEGER,
-	/* Datetime */
-	DATETIME,
-	/* String */
-	STRING,
-	/* Restricted Character Set String */
-	RCS_STRING,
-	/* Enumeration */
-	ENUMERATION,
-	/* List */
-	LIST
-} exi_datatype_t;
-
-
-typedef enum {
-	/* Unsigned Integer */
-	UNSIGNED_INTEGER_8,
-	UNSIGNED_INTEGER_16,
-	UNSIGNED_INTEGER_32,
-	UNSIGNED_INTEGER_64,
-	/* (Signed) Integer */
-	INTEGER_8,
-	INTEGER_16,
-	INTEGER_32,
-	INTEGER_64
-} exi_integer_type_t;
-
-typedef enum {
-	START_DOCUMENT,
-	END_DOCUMENT,
-	START_ELEMENT,
-	START_ELEMENT_GENERIC,
-	START_ELEMENT_GENERIC_UNDECLARED,
-	END_ELEMENT,
-	END_ELEMENT_UNDECLARED,
-	CHARACTERS,
-	CHARACTERS_GENERIC,
-	CHARACTERS_GENERIC_UNDECLARED,
-	ATTRIBUTE_XSI_TYPE,
-	ATTRIBUTE_XSI_NIL,
-	ATTRIBUTE,
-	ATTRIBUTE_GENERIC,
-	ATTRIBUTE_INVALID_VALUE,
-	ATTRIBUTE_ANY_INVALID_VALUE,
-	ATTRIBUTE_GENERIC_UNDECLARED,
-	/* error state */
-	ERROR
-} exi_event_t;
-
-
-/* differ datetime types */
-typedef enum {
-	exiGYear, exiGYearMonth, exiDate, exiDateTime, exiGMonth, exiGMonthDay, exiGDay, exiTime
-} exi_datetime_type_t;
-
-
-typedef struct {
-	/* Bytes Size and array container */
-	uint16_t size;
-	uint8_t* data;
-	/* current length (len <= size) */
-	uint16_t len;
-} bytes_t;
-
-/* Universal Character Set (UCS) strings */
-typedef struct {
-	/* UCS size and UCS character container*/
-	uint16_t size;
-	uint32_t* codepoints;
-	/* current length == number of code-points, (len <= size) */
-	uint16_t len;
-} string_ucs_t;
-
-/* Restricted Characeter Set */
-typedef struct {
-	/* size and UCS character codep*/
-	uint16_t size;
-	/* rcs codepoints */
-	uint32_t* codepoints;
-	/* character coding length*/
-	uint8_t codingLength; /* less than 256 characters */
-} rcs_t;
-
-/* ASCII strings */
-typedef struct {
-	/* size of String array */
-	uint16_t size;
-	char* chars;
-	/* current length can be retrieved by calling strlen(chars)*/
-} string_ascii_t;
-
-typedef struct {
-	exi_integer_type_t type;
-	union {
-		/* unsigned values */
-		int8_t int8;
-		int16_t int16;
-		int32_t int32;
-		int32_t int64;
-		/* (signed) values */
-		uint8_t uint8;
-		uint16_t uint16;
-		uint32_t uint32;
-		uint64_t uint64;
-	} val;
-} integer_t;
-
-typedef struct {
-	/* range of the mantissa is -(2^63) to 2^63-1 */
-	int64_t mantissa;
-	/* range of the exponent is - (2^14-1) to 2^14-1 */
-	int32_t exponent; /* base-10 */
-} float_me_t;
-
-typedef struct {
-	/* a sign value */
-	int negative;
-	/* represents the integral portion of the Decimal */
-	integer_t integral;
-	/* represents the fractional portion of the Decimal with the digits in reverse order to preserve leading zeros */
-	integer_t reverseFraction;
-} decimal_t;
-
-
-
-typedef struct {
-	/* datetime type */
-	exi_datetime_type_t type;
-	/* values */
-	int32_t year;
-	uint32_t monthDay;
-	uint32_t time;
-	int presenceFractionalSecs;
-	uint32_t fractionalSecs;
-	int presenceTimezone;
-	uint32_t timezone;
-} datetime_t;
-
-
-
-/* TODO list support */
-typedef struct {
-	/* list item type */
-	exi_datatype_t type;
-	/* number of items */
-	uint16_t len;
-	/* List container with memory size */
-	uint16_t size;
-	uint8_t* data;
-} list_t;
-
-/* efficient ID qname */
-typedef struct {
-	uint16_t namespaceURI;
-	uint16_t localPart;
-} eqname_t;
-
-/* ascii qname */
-typedef struct {
-	string_ascii_t namespaceURI;
-	string_ascii_t localName;
-} qname_t;
-
-/* ==================================== */
-/* LocalName Entries */
-struct exiNamePartition {
-	/* length of array */
-	uint16_t len;
-	/* array of string entries */
-	char** names;
-};
-
-typedef struct exiNameTablePrepopulated {
-	/* length of both arrays (uris & localNames) */
-	uint16_t len;
-	/* URI entries*/
-	char** uris;
-	/* localName entries divided by URI */
-	struct exiNamePartition * localNames;
-} exi_name_table_prepopulated_t;
-
-
-#define EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_CHARACTERS 500
-#define EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_ENTRIES 25
-#define EXI_RESERVED_NUMBER_URI_PARTITION_ENTRIES 5
-#define EXI_RESERVED_NUMBER_LOCALNAME_PARTITION_ENTRIES 10
-
-typedef enum {
-	URI_PARTITION,
-	LOCALNAME_PARTITION
-} exi_name_partition_type_t;
-
-typedef struct {
-	 char* uri;
-	 uint16_t uriID;
-} exi_uri_partition_t;
-
-typedef struct {
-	 char* localName;
-	 uint16_t localNameID;
-	 uint16_t uriID;
-} exi_localname_partition_t;
-
-typedef struct {
-	exi_name_partition_type_t namePartitionType;
-    struct
-    {
-		exi_uri_partition_t uriPartition;
-        exi_localname_partition_t localNamePartition;
-    } entry;
-} exi_name_partition_t;
-
-typedef struct exiNameTableRuntime {
-	/* maximum number of characters in the name partitions entries PLUS null terminators */
-	char characters[EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_CHARACTERS + EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_ENTRIES];
-	uint16_t numberOfUsedCharacters; /* initially zero <= EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_CHARACTERS */
-	/* maximum number of name partitions entries. Name partitions entries consist in all uri, and local-name partition entries */
-	exi_name_partition_t namePartitionsEntries[EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_ENTRIES];
-	/* uint16_t numberOfUsedNamePartitions; */ /* initially zero */
-	/* added entries */
-	uint16_t addedUriEntries; /* initially zero */
-	uint16_t addedLocalNameEntries; /* initially zero */
-} exi_name_table_runtime_t;
-
-
-
-
-
-
-typedef struct {
-	/* stack of grammar states */
-	int16_t grammarStack[EXI_ELEMENT_STACK_SIZE];
-	/* stack of grammar elements */
-	eqname_t elementStack[EXI_ELEMENT_STACK_SIZE];
-	uint16_t stackIndex;
-	/* event-code */
-	uint32_t eventCode;
-	/* string table entries */
-	exi_name_table_prepopulated_t nameTablePrepopulated;
-	exi_name_table_runtime_t nameTableRuntime;
-} exi_state_t;
-
-typedef struct {
-	/* type of value */
-	exi_datatype_t type;
-
-	/* base types */
-	int boolean;
-	integer_t integer;
-
-	/*uint16_t uint8;
-	uint16_t uint16;
-	uint32_t uint32;
-	uint64_t uint64;
-	int8_t int8;
-	int16_t int16;
-	int32_t int32;
-	int64_t int64;*/
-
-	uint32_t enumeration;
-
-	/* Bytes, Strings and Lists are not native types anymore */
-	bytes_t binary;
-	string_ucs_t string;
-	float_me_t float_me;
-	decimal_t decimal;
-	datetime_t datetime;
-	list_t list;
-	eqname_t eqname;
-} exi_value_t;
-
-/*
- * ERROR-Codes
- */
-#define EXI_ERROR_INPUT_STREAM_EOF -10
-#define EXI_ERROR_OUTPUT_STREAM_EOF -11
-#define EXI_ERROR_INPUT_FILE_HANDLE -12
-#define EXI_ERROR_OUTPUT_FILE -13
-
-#define EXI_ERROR_OUT_OF_BOUNDS -100
-#define EXI_ERROR_OUT_OF_STRING_BUFFER -101
-#define EXI_ERROR_OUT_OF_ASCII_BUFFER -102
-#define EXI_ERROR_OUT_OF_BYTE_BUFFER -103
-#define EXI_ERROR_OUT_OF_GRAMMAR_STACK -104
-
-#define EXI_ERROR_UNKOWN_EVENT -109
-#define EXI_ERROR_UNKOWN_EVENT_CODE -110
-#define EXI_ERROR_UNEXPECTED_EVENT_LEVEL1 -111
-#define EXI_ERROR_UNEXPECTED_EVENT_LEVEL2 -112
-
-#define EXI_ERROR_UNEXPECTED_START_DOCUMENT -113
-#define EXI_ERROR_UNEXPECTED_END_DOCUMENT -114
-#define EXI_ERROR_UNEXPECTED_START_ELEMENT -115
-#define EXI_ERROR_UNEXPECTED_START_ELEMENT_GENERIC -116
-#define EXI_ERROR_UNEXPECTED_END_ELEMENT -117
-#define EXI_ERROR_UNEXPECTED_CHARACTERS -118
-#define EXI_ERROR_UNEXPECTED_ATTRIBUTE -119
-#define EXI_ERROR_UNEXPECTED_ATTRIBUTE_XSI_TYPE -120
-#define EXI_ERROR_UNEXPECTED_ATTRIBUTE_XSI_NIL -121
-#define EXI_ERROR_UNEXPECTED_GRAMMAR_ID -122
-#define EXI_ERROR_UNEXPECTED_ATTRIBUTE_MOVE_TO_CONTENT_RULE -123
-
-
-#define EXI_UNSUPPORTED_STRING_TABLE_LOCAL_HIT -130
-#define EXI_UNSUPPORTED_STRING_TABLE_GLOBAL_HIT -131
-#define EXI_UNSUPPORTED_NBIT_INTEGER_LENGTH -132
-#define EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS -133
-#define EXI_UNSUPPORTED_INTEGER_VALUE_TYPE -134
-#define EXI_UNSUPPORTED_INTEGER_VALUE -135
-#define EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE -136
-#define EXI_UNSUPPORTED_LIST_VALUE_TYPE -137
-#define EXI_UNSUPPORTED_HEADER_COOKIE -138
-#define EXI_UNSUPPORTED_HEADER_OPTIONS -139
-
-#define EXI_ERROR_UNEXPECTED_BYTE_VALUE -200
-#define EXI_ERROR_UNEXPECTED_DATETIME_TYPE -201
-
-#define EXI_ERROR_CONVERSION_NO_ASCII_CHARACTERS -300
-#define EXI_ERROR_CONVERSION_TYPE_TO_STRING -301
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 180
src/codec/EncoderChannel.h

@@ -1,180 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "EXITypes.h"
-
-#ifndef ENCODER_CHANNEL_H
-#define ENCODER_CHANNEL_H
-
-/**
- * Encode a byte value.
- */
-int encode(bitstream_t* stream, uint8_t b);
-
-/**
- * Encode a single boolean value. A false value is encoded as 0 and true
- * value is encode as 1.
- */
-int encodeBoolean(bitstream_t* stream, int b);
-
-
-/**
- * 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 encodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t val);
-
-/**
- * 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 encodeUnsignedInteger(bitstream_t* stream, integer_t* iv);
-
-
-/**
- * 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 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 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.
- */
-int encodeInteger(bitstream_t* stream, integer_t* iv);
-
-/**
- * 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.
- */
-int encodeInteger32(bitstream_t* stream, int32_t n);
-
-/**
- * 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 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 encodeFloat(bitstream_t* stream, float_me_t* f);
-
-/**
- * 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 encodeDecimal(bitstream_t* stream, decimal_t* d);
-
-/**
- * Encode a length prefixed sequence of characters.
- */
-int encodeString(bitstream_t* stream, string_ucs_t* string);
-int encodeASCII(bitstream_t* stream, const char* ascii);
-
-/**
- * Encode a length prefixed sequence of characters in the sense of string tables
- */
-int encodeStringValue(bitstream_t* stream, string_ucs_t* string);
-
-/**
- * Restricted character set
- */
-int encodeRCSStringValue(bitstream_t* stream, rcs_t* rcs, string_ucs_t* string);
-
-/**
- * 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 encodeUCSCharacters(bitstream_t* stream, uint32_t* chars, uint16_t len);
-
-int encodeASCIICharacters(bitstream_t* stream, const char* chars, uint16_t len);
-
-/**
- * Encode a binary value as a length-prefixed sequence of octets.
- */
-int encodeBinary(bitstream_t* stream, bytes_t* bytes);
-
-/**
- * Encode a datetime representation which is a sequence of values
- * representing the individual components of the Date-Time
- */
-int encodeDateTime(bitstream_t* stream, datetime_t* datetime);
-
-/**
- * Flush underlying bit output stream
- */
-int encodeFinish(bitstream_t* stream);
-
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-
-
-
-
-
-

+ 0 - 106
src/codec/MethodsBag.c

@@ -1,106 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifndef METHODS_BAG_C
-#define METHODS_BAG_C
-
-#include "MethodsBag.h"
-#include "EXITypes.h"
-
-static const int smallLengths[] = { 0, 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4,
-		4, 4, 4 };
-
-int exiGetCodingLength(uint32_t characteristics, uint16_t* codingLength) {
-	if (characteristics < 17) {
-		*codingLength = smallLengths[characteristics];
-		return 0;
-	} else if (characteristics < 33) {
-		/* 17 .. 32 */
-		*codingLength = 5;
-		return 0;
-	} else if (characteristics < 65) {
-		/* 33 .. 64 */
-		*codingLength = 6;
-		return 0;
-	} else if (characteristics < 129) {
-		/* 65 .. 128 */
-		*codingLength = 7;
-		return 0;
-	} else if (characteristics < 257) {
-		/* 129 .. 256 */
-		*codingLength = 8;
-		return 0;
-	} else if (characteristics < 513) {
-		/* 257 .. 512 */
-		*codingLength = 9;
-		return 0;
-	} else if (characteristics < 1025) {
-		/* 513 .. 1024 */
-		*codingLength = 10;
-		return 0;
-	} else {
-		/*
-		return (int) Math.ceil(Math.log((double) (characteristics))
-				/ Math.log(2.0)); */
-		return EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
-	}
-
-}
-
-
-uint8_t numberOf7BitBlocksToRepresent(uint32_t n) {
-	/* assert (n >= 0); */
-
-	/* 7 bits */
-	if (n < 128) {
-		return 1;
-	}
-	/* 14 bits */
-	else if (n < 16384) {
-		return 2;
-	}
-	/* 21 bits */
-	else if (n < 2097152) {
-		return 3;
-	}
-	/* 28 bits */
-	else if (n < 268435456) {
-		return 4;
-	}
-	/* 35 bits */
-	else {
-		/* int, 32 bits */
-		return 5;
-	}
-}
-
-
-
-#endif
-

+ 0 - 59
src/codec/MethodsBag.h

@@ -1,59 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifndef METHODS_BAG_H
-#define METHODS_BAG_H
-
-#include <stdio.h>
-#include <stdint.h>
-#include <string.h>
-#include <stdlib.h>
-
-/**
- * Returns the number of bits to identify the characteristics.
- *
- * @param characteristics
- * @param codingLength (return value)
- *
- */
-int exiGetCodingLength(uint32_t characteristics, uint16_t* codingLength);
-
-/**
- * Returns the least number of 7 bit-blocks that is needed to represent the
- * int <param>n</param>. Returns 1 if <param>n</param> is 0.
- *
- * @param n
- *            integer value
- *
- */
-uint8_t numberOf7BitBlocksToRepresent(uint32_t n);
-
-
-#endif
-

+ 0 - 185
src/codec/NameTableEntries.c

@@ -1,185 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifndef NAME_TABLE_ENTRIES_C
-#define NAME_TABLE_ENTRIES_C
-
-#include "NameTableEntries.h"
-
-
-
-/* ==================================== */
-/* String Table Population */
-
-/* localName entries for URI id = 0 */
-char * localNames0[] = {
-  "Algorithm",  "Encoding",  "Id",  "MimeType",  "Target",
-  "Type",  "URI"
-};
-/* localName entries for URI id = 1 */
-char * localNames1[] = {
-  "base",  "id",  "lang",  "space"
-};
-/* localName entries for URI id = 2 */
-char * localNames2[] = {
-  "nil",  "type"
-};
-/* localName entries for URI id = 3 */
-char * localNames3[] = {
-  "ENTITIES",  "ENTITY",  "ID",  "IDREF",  "IDREFS",
-  "NCName",  "NMTOKEN",  "NMTOKENS",  "NOTATION",  "Name",
-  "QName",  "anySimpleType",  "anyType",  "anyURI",  "base64Binary",
-  "boolean",  "byte",  "date",  "dateTime",  "decimal",
-  "double",  "duration",  "float",  "gDay",  "gMonth",
-  "gMonthDay",  "gYear",  "gYearMonth",  "hexBinary",  "int",
-  "integer",  "language",  "long",  "negativeInteger",  "nonNegativeInteger",
-  "nonPositiveInteger",  "normalizedString",  "positiveInteger",  "short",  "string",
-  "time",  "token",  "unsignedByte",  "unsignedInt",  "unsignedLong",
-  "unsignedShort"
-};
-/* localName entries for URI id = 4 */
-char * localNames4[] = {
-  "CanonicalizationMethod",  "CanonicalizationMethodType",  "CryptoBinary",  "DSAKeyValue",  "DSAKeyValueType",
-  "DigestMethod",  "DigestMethodType",  "DigestValue",  "DigestValueType",  "Exponent",
-  "G",  "HMACOutputLength",  "HMACOutputLengthType",  "J",  "KeyInfo",
-  "KeyInfoType",  "KeyName",  "KeyValue",  "KeyValueType",  "Manifest",
-  "ManifestType",  "MgmtData",  "Modulus",  "Object",  "ObjectType",
-  "P",  "PGPData",  "PGPDataType",  "PGPKeyID",  "PGPKeyPacket",
-  "PgenCounter",  "Q",  "RSAKeyValue",  "RSAKeyValueType",  "Reference",
-  "ReferenceType",  "RetrievalMethod",  "RetrievalMethodType",  "SPKIData",  "SPKIDataType",
-  "SPKISexp",  "Seed",  "Signature",  "SignatureMethod",  "SignatureMethodType",
-  "SignatureProperties",  "SignaturePropertiesType",  "SignatureProperty",  "SignaturePropertyType",  "SignatureType",
-  "SignatureValue",  "SignatureValueType",  "SignedInfo",  "SignedInfoType",  "Transform",
-  "TransformType",  "Transforms",  "TransformsType",  "X509CRL",  "X509Certificate",
-  "X509Data",  "X509DataType",  "X509IssuerName",  "X509IssuerSerial",  "X509IssuerSerialType",
-  "X509SKI",  "X509SerialNumber",  "X509SubjectName",  "XPath",  "Y"
-
-};
-/* localName entries for URI id = 5 */
-char * localNames5[] = {
-  "AC_EVSEStatus",  "AC_PEVStatus",  "BulkChargingComplete",  "CableCheckReq",  "CableCheckReqType",
-  "CableCheckRes",  "CableCheckResType",  "CertificateInstallationReq",  "CertificateInstallationReqType",  "CertificateInstallationRes",
-  "CertificateInstallationResType",  "CertificateUpdateReq",  "CertificateUpdateReqType",  "CertificateUpdateRes",  "CertificateUpdateResType",
-  "ChargeCurrentRequest",  "ChargeParameterDiscoveryReq",  "ChargeParameterDiscoveryReqType",  "ChargeParameterDiscoveryRes",  "ChargeParameterDiscoveryResType",
-  "ChargeService",  "ChargingComplete",  "ChargingProfile",  "ContractAuthenticationReq",  "ContractAuthenticationReqType",
-  "ContractAuthenticationRes",  "ContractAuthenticationResType",  "ContractEncryptionCert",  "ContractEncryptionCertChain",  "ContractEncryptionPrivateKey",
-  "ContractID",  "ContractSignatureCertChain",  "ContractSignaturePrivateKey",  "CurrentDemandReq",  "CurrentDemandReqType",
-  "CurrentDemandRes",  "CurrentDemandResType",  "CurrentDifferential",  "DC_EVSEStatus",  "DC_PEVStatus",
-  "EVSECurrentLimitAchieved",  "EVSEID",  "EVSEMaxPower",  "EVSEMaximumCurrentLimit",  "EVSEMaximumPowerLimit",
-  "EVSEMaximumVoltageLimit",  "EVSEPowerLimitAchieved",  "EVSEPresentCurrent",  "EVSEPresentVoltage",  "EVSEVoltageLimitAchieved",
-  "EnergyProvider",  "GenChallenge",  "LineLockReq",  "LineLockReqType",  "LineLockRes",
-  "LineLockResType",  "MeterInfo",  "MeteringReceiptReq",  "MeteringReceiptReqType",  "MeteringReceiptRes",
-  "MeteringReceiptResType",  "MeteringStatusReq",  "MeteringStatusReqType",  "MeteringStatusRes",  "MeteringStatusResType",
-  "OEMProvisioningCert",  "PCurrent",  "PEVDemandCurrent",  "PEVID",  "PEVMaximumCurrentLimit",
-  "PEVMaximumPowerLimit",  "PEVMaximumVoltageLimit",  "PEVRESSVoltage",  "PEVRequestedEnergyTransferType",  "PEVTargetVoltage",
-  "PaymentDetailsReq",  "PaymentDetailsReqType",  "PaymentDetailsRes",  "PaymentDetailsResType",  "PaymentOptions",
-  "PowerDeliveryReq",  "PowerDeliveryReqType",  "PowerDeliveryRes",  "PowerDeliveryResType",  "PreChargeReq",
-  "PreChargeReqType",  "PreChargeRes",  "PreChargeResType",  "ReceiptSignature",  "RemainingTimeToBulkSoC",
-  "RemainingTimeToFullSoC",  "ReqLockStatus",  "ReqSwitchStatus",  "ResponseCode",  "RetryCounter",
-  "SelectedPaymentOption",  "ServiceDetailReq",  "ServiceDetailReqType",  "ServiceDetailRes",  "ServiceDetailResType",
-  "ServiceDiscoveryReq",  "ServiceDiscoveryReqType",  "ServiceDiscoveryRes",  "ServiceDiscoveryResType",  "ServiceID",
-  "ServiceList",  "ServicePaymentSelectionReq",  "ServicePaymentSelectionReqType",  "ServicePaymentSelectionRes",  "ServicePaymentSelectionResType",
-  "ServiceScope",  "ServiceTag",  "ServiceType",  "SessionID",  "SessionSetupReq",
-  "SessionSetupReqType",  "SessionSetupRes",  "SessionSetupResType",  "TCurrent",  "Tariff",
-  "TariffTable",  "TerminateChargingReq",  "TerminateChargingReqType",  "TerminateChargingRes",  "TerminateChargingResType",
-  "VoltageDifferential",  "WeldingDetectionReq",  "WeldingDetectionReqType",  "WeldingDetectionRes",  "WeldingDetectionResType",
-  "v2g_Service"
-};
-/* localName entries for URI id = 6 */
-char * localNames6[] = {
-  "AC_EVSEChargeParameter",  "AC_EVSEChargeParameterType",  "AC_EVSEStatus",  "AC_EVSEStatusType",  "AC_PEVChargeParameter",
-  "AC_PEVChargeParameterType",  "AC_PEVPowerDeliveryParameter",  "AC_PEVPowerDeliveryParameterType",  "AC_PEVStatus",  "AC_PEVStatusType",
-  "AC_rcdType",  "BulkChargingComplete",  "BulkSOC",  "Certificate",  "CertificateChainType",
-  "CertificateInstall",  "CertificateUpdate",  "ChargingComplete",  "ChargingProfileEntryMaxPower",  "ChargingProfileEntryStart",
-  "ChargingProfileType",  "ConnectorLocked",  "Currency",  "DC_BulkChargingCompleteType",  "DC_ChargingCompleteType",
-  "DC_EVSEChargeParameter",  "DC_EVSEChargeParameterType",  "DC_EVSEStatus",  "DC_EVSEStatusCodeType",  "DC_EVSEStatusType",
-  "DC_PEVChargeParameter",  "DC_PEVChargeParameterType",  "DC_PEVPowerDeliveryParameter",  "DC_PEVPowerDeliveryParameterType",  "DC_PEVReadyType",
-  "DC_PEVStatus",  "DC_PEVStatusCodeType",  "DC_PEVStatusType",  "DC_protocolVersionType",  "EAmount",
-  "EPrice",  "EPriceMultiplier",  "EPriceType",  "EPriceUnit",  "EVSEChargeParameter",
-  "EVSEChargeParameterType",  "EVSECurrentRegulationTolerance",  "EVSEEnergyToBeDelivered",  "EVSEMaxCurrent",  "EVSEMaxPhases",
-  "EVSEMaxVoltage",  "EVSEMaximumCurrentLimit",  "EVSEMaximumPowerLimit",  "EVSEMaximumVoltageLimit",  "EVSEMinCurrent",
-  "EVSEMinVoltage",  "EVSEMinimumCurrentLimit",  "EVSEMinimumVoltageLimit",  "EVSEPeakCurrentRipple",  "EVSEProtocolVersion",
-  "EVSEStandby",  "EVSEStatus",  "EVSEStatusCode",  "EVSEStatusType",  "EVSESupportedEnergyTransferType",
-  "EnergyTransferType",  "EoC",  "FaultCode",  "FaultMsg",  "FloatingValueType",
-  "FreeService",  "FullSOC",  "MeterID",  "MeterInfoType",  "MeterPubKey",
-  "MeterReading",  "MeterStatus",  "Multiplier",  "NotificationType",  "PEVChargeParameter",
-  "PEVChargeParameterType",  "PEVEnergyCapacity",  "PEVEnergyRequest",  "PEVMaxCurrent",  "PEVMaxPhases",
-  "PEVMaxPower",  "PEVMaxVoltage",  "PEVMaximumCurrentLimit",  "PEVMaximumPowerLimit",  "PEVMaximumVoltageLimit",
-  "PEVMinCurrent",  "PEVMinVoltage",  "PEVPowerDeliveryParameter",  "PEVPowerDeliveryParameterType",  "PEVProtocolVersion",
-  "PEVRESSSOC",  "PEVReady",  "PEVRequestedEnergyTransferType",  "PEVStandby",  "PEVStatus",
-  "PEVStatusCode",  "PEVStatusType",  "PMaxType",  "PaymentOption",  "PowerSwitchClosed",
-  "ProfileEntry",  "ProfileEntryType",  "ProtocolVersion",  "RCD",  "SecurityType",
-  "Service",  "ServiceCategory",  "ServiceCertificate",  "ServiceCertificateType",  "ServiceCharge",
-  "ServiceChargeType",  "ServiceCustom",  "ServiceCustomType",  "ServiceDetails",  "ServiceDetailsType",
-  "ServiceID",  "ServiceInternet",  "ServiceInternetType",  "ServiceName",  "ServiceRCS",
-  "ServiceRCSType",  "ServiceScope",  "ServiceSessionID",  "ServiceTag",  "ServiceTagListType",
-  "ServiceTagType",  "ServiceType",  "SessionID",  "SessionInformationType",  "ShutDownTime",
-  "SigMeterReading",  "StopCharging",  "SubCertificates",  "SubCertificatesType",  "TMeter",
-  "Tariff",  "TariffDescrType",  "TariffDescription",  "TariffEntries",  "TariffEntriesType",
-  "TariffEntry",  "TariffEntryType",  "TariffID",  "TariffPMax",  "TariffStart",
-  "TariffTableType",  "Unit",  "Value",  "certificateType",  "challengeSignatureType",
-  "contractIDType",  "currencyType",  "ePriceType",  "encryptionPrivateKeyType",  "energyProviderType",
-  "evseIDType",  "faultCodeType",  "faultMsgType",  "genChallengeType",  "lockStatusType",
-  "maxPhasesType",  "messageSignatureType",  "meterIDType",  "meterSignatureType",  "meterStatusType",
-  "paymentOptionType",  "paymentOptionsType",  "percentValueType",  "pevIDType",  "protocolVersionType",
-  "pubKeyType",  "responseCodeType",  "retryCounterType",  "serviceCategoryType",  "serviceIDType",
-  "serviceNameType",  "serviceScopeType",  "sessionIDType",  "signaturePrivateKeyType",  "standbyType",
-  "switchStatusType",  "tariffDescriptionType",  "tariffIDType",  "tariffStartType",  "timeType",
-  "unitMultiplierType",  "unitSymbolType"
-};
-/* localName entries for URI id = 7 */
-char * localNames7[] = {
-  "Body",  "BodyBaseType",  "BodyElement",  "BodyType",  "Header",
-  "V2G_Message"
-};
-/* localName entries for URI id = 8 */
-char * localNames8[] = {
-  "MessageHeaderType",  "Notification",  "Security",  "SessionInformation"
-};
-struct exiNamePartition localNamePartitions[9] = {
- { 7, localNames0 },
- { 4, localNames1 },
- { 2, localNames2 },
- { 46, localNames3 },
- { 70, localNames4 },
- { 131, localNames5 },
- { 192, localNames6 },
- { 6, localNames7 },
- { 4, localNames8 }
-};
-char * uris[] = {
-  "",  "http://www.w3.org/XML/1998/namespace",  "http://www.w3.org/2001/XMLSchema-instance",  "http://www.w3.org/2001/XMLSchema",  "http://www.w3.org/2000/09/xmldsig#",  "urn:iso:15118:2:2010:MsgBody",  "urn:iso:15118:2:2010:MsgDataTypes",  "urn:iso:15118:2:2010:MsgDef",  "urn:iso:15118:2:2010:MsgHeader"
-};
-exi_name_table_prepopulated_t nameTablePrepopulated = { 9, uris, localNamePartitions };
-
-
-exi_name_table_prepopulated_t nameTablePrepopulated;
-
-#endif
-

+ 0 - 41
src/codec/NameTableEntries.h

@@ -1,41 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifndef NAME_TABLE_ENTRIES_H
-#define NAME_TABLE_ENTRIES_H
-
-#include "EXITypes.h"
-
-/* ==================================== */
-/* String Table Population */
-
-extern exi_name_table_prepopulated_t nameTablePrepopulated;
-
-#endif
-

+ 0 - 238
src/codec/StringTable.c

@@ -1,238 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifndef STRING_TABLE_C
-#define STRING_TABLE_C
-
-#include <string.h>
-
-#include "StringTable.h"
-#include "NameTableEntries.h"
-
-int exiGetUri(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID,
-		const char** uri) {
-	if (uriID < prepopulatedTable->len) {
-		*uri = prepopulatedTable->uris[uriID];
-	} else {
-		int i = 0;
-		uriID -= prepopulatedTable->len;
-		for(i=0; i<(runtimeTable->addedUriEntries+runtimeTable->addedLocalNameEntries); i++) {
-			if ( runtimeTable->namePartitionsEntries[i].namePartitionType == URI_PARTITION ) {
-				if (uriID == 0) {
-					*uri = runtimeTable->namePartitionsEntries[i].entry.uriPartition.uri;
-					return 0;
-				}
-				uriID--;
-			}
-		}
-
-		return EXI_ERROR_OUT_OF_BOUNDS;
-	}
-
-	return 0;
-}
-
-int exiGetUriSize(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t* uriLength) {
-	*uriLength = prepopulatedTable->len;
-	return 0;
-}
-
-/*  0 ... Success, 1 ... Miss, -1 ... Error */
-int exiGetUriID(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, const char* uri,
-		uint16_t* uriID) {
-	unsigned int i;
-	for (i = 0; i < prepopulatedTable->len; i++) {
-		if (strcmp(uri, prepopulatedTable->uris[i]) == 0) {
-			*uriID = i;
-			return 0;
-		}
-	}
-	if (runtimeTable->addedUriEntries > 0) {
-		*uriID = prepopulatedTable->len - 1;
-		for(i=0; i< (runtimeTable->addedUriEntries + runtimeTable->addedLocalNameEntries); i++) {
-			if ( runtimeTable->namePartitionsEntries[i].namePartitionType == URI_PARTITION ) {
-				*uriID = *uriID + 1;
-				if (strcmp(uri, runtimeTable->namePartitionsEntries[i].entry.uriPartition.uri) == 0) {
-					return 0;
-				}
-			}
-		}
-	}
-	/* no URI ID found */
-	return +1;
-}
-
-int exiGetLocalName(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID,
-		uint16_t localNameID, const char** localName) {
-	int i;
-	if (uriID < prepopulatedTable->len) {
-		if (localNameID < prepopulatedTable->localNames[uriID].len) {
-			*localName = prepopulatedTable->localNames[uriID].names[localNameID];
-			return 0;
-		} else {
-			localNameID -= prepopulatedTable->localNames[uriID].len;
-		}
-	}
-
-	/* runtime tables */
-	for(i=0; i<(runtimeTable->addedLocalNameEntries+runtimeTable->addedUriEntries); i++) {
-		if ( runtimeTable->namePartitionsEntries[i].namePartitionType == LOCALNAME_PARTITION &&
-				runtimeTable->namePartitionsEntries[i].entry.localNamePartition.uriID == uriID ) {
-			if (localNameID == 0) {
-				*localName = runtimeTable->namePartitionsEntries[i].entry.localNamePartition.localName;
-				return 0;
-			}
-			localNameID--;
-		}
-	}
-
-	return EXI_ERROR_OUT_OF_BOUNDS;
-}
-
-int exiGetLocalNameSize(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable,
-		uint16_t uriID, uint16_t* localNameLength) {
-	*localNameLength = 0;
-	/* 1. pre-populated entries*/
-	if (uriID < prepopulatedTable->len) {
-		(*localNameLength) += prepopulatedTable->localNames[uriID].len;
-	} else {
-		/* range check */
-		if (uriID >= ( prepopulatedTable->len + runtimeTable->addedUriEntries )) {
-			return EXI_ERROR_OUT_OF_BOUNDS;
-		}
-	}
-	/* 2. runtime entries */
-	if (runtimeTable->addedLocalNameEntries > 0 ) {
-		int i;
-		for(i=0; i<(runtimeTable->addedUriEntries+runtimeTable->addedLocalNameEntries); i++) {
-			if ( runtimeTable->namePartitionsEntries[i].namePartitionType == LOCALNAME_PARTITION &&
-					runtimeTable->namePartitionsEntries[i].entry.localNamePartition.uriID == uriID ) {
-				(*localNameLength)++;
-			}
-		}
-	}
-
-	return 0;
-}
-
-/*  0 ... Success, 1 ... Miss, -1 ... Error */
-int exiGetLocalNameID(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID,
-		const char* localName, uint16_t* localNameID) {
-	unsigned int i;
-	if (uriID < prepopulatedTable->len) {
-		/* pre-populated names */
-		/* TODO binary search */
-		for (i = 0; i < prepopulatedTable->localNames[uriID].len; i++) {
-			if (strcmp(localName, prepopulatedTable->localNames[uriID].names[i]) == 0) {
-				*localNameID = i;
-				return 0;
-			}
-		}
-		/* runtime names */
-		for (i = 0; i < (runtimeTable->addedUriEntries + runtimeTable->addedLocalNameEntries); i++) {
-			if (runtimeTable->namePartitionsEntries[i].namePartitionType == LOCALNAME_PARTITION &&
-					strcmp(localName, runtimeTable->namePartitionsEntries[i].entry.localNamePartition.localName ) == 0) {
-				*localNameID = runtimeTable->namePartitionsEntries[i].entry.localNamePartition.localNameID;
-				return 0;
-			}
-		}
-
-		/* no localName ID found */
-		return +1;
-	} else if (uriID == prepopulatedTable->len) {
-		/* UCD profile */
-		/* no localName ID found */
-		return +1;
-	} else {
-		return EXI_ERROR_OUT_OF_BOUNDS;
-	}
-}
-
-/* inline */
-static int _max(int a, int b) {
-	return (a > b) ? a : b;
-}
-
-int exiInitNameTableRuntime(exi_name_table_runtime_t* runtimeTable) {
-	runtimeTable->numberOfUsedCharacters = 0;
-	runtimeTable->addedLocalNameEntries = 0;
-	runtimeTable->addedUriEntries = 0;
-	return 0;
-}
-
-int exiAddUri(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, char* uri) {
-	if (runtimeTable->addedUriEntries < EXI_RESERVED_NUMBER_URI_PARTITION_ENTRIES
-			|| runtimeTable->addedUriEntries
-					< (EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_ENTRIES - _max(
-							runtimeTable->addedLocalNameEntries,
-							EXI_RESERVED_NUMBER_LOCALNAME_PARTITION_ENTRIES))) {
-		uint16_t index = runtimeTable->addedUriEntries + runtimeTable->addedLocalNameEntries;
-		int charsIndex = runtimeTable->numberOfUsedCharacters+runtimeTable->addedUriEntries+runtimeTable->addedLocalNameEntries;
-		runtimeTable->namePartitionsEntries[index].namePartitionType = URI_PARTITION;
-		strcpy(runtimeTable->characters+charsIndex, uri);
-		runtimeTable->namePartitionsEntries[index].entry.uriPartition.uri = runtimeTable->characters+charsIndex;
-		runtimeTable->namePartitionsEntries[index].entry.uriPartition.uriID = prepopulatedTable->len + runtimeTable->addedUriEntries;
-		runtimeTable->addedUriEntries++;
-		runtimeTable->numberOfUsedCharacters += strlen(uri);
-		return 0;
-	} else {
-		return -1;
-	}
-}
-
-int exiAddLocalName(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID,
-		char* localName) {
-	if (runtimeTable->addedUriEntries < EXI_RESERVED_NUMBER_LOCALNAME_PARTITION_ENTRIES
-			|| runtimeTable->addedLocalNameEntries
-					< (EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_ENTRIES - _max(
-							runtimeTable->addedUriEntries,
-							EXI_RESERVED_NUMBER_URI_PARTITION_ENTRIES))) {
-		uint16_t index = runtimeTable->addedUriEntries + runtimeTable->addedLocalNameEntries;
-		int charsIndex = runtimeTable->numberOfUsedCharacters+runtimeTable->addedUriEntries+runtimeTable->addedLocalNameEntries;
-		uint16_t localNameID;
-		int errn = exiGetLocalNameSize(prepopulatedTable, runtimeTable, uriID, &localNameID);
-		if (errn < 0) {
-			return errn;
-		}
-
-		runtimeTable->namePartitionsEntries[index].namePartitionType = LOCALNAME_PARTITION;
-		strcpy(runtimeTable->characters+charsIndex, localName);
-		runtimeTable->namePartitionsEntries[index].entry.localNamePartition.localName = runtimeTable->characters+charsIndex;
-		runtimeTable->namePartitionsEntries[index].entry.localNamePartition.localNameID = localNameID;
-		runtimeTable->namePartitionsEntries[index].entry.localNamePartition.uriID = uriID;
-		runtimeTable->addedLocalNameEntries++;
-		runtimeTable->numberOfUsedCharacters += strlen(localName);
-		return 0;
-	} else {
-		return -1;
-	}
-}
-
-#endif
-

+ 0 - 67
src/codec/StringTable.h

@@ -1,67 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef STRING_TABLE_H
-#define STRING_TABLE_H
-
-#include "EXITypes.h"
-
-int exiGetUri(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID, const char** uri);
-
-int exiGetUriSize(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t* uriLength);
-
-/*  0 ... Success, 1 ... Miss, -1 ... Error */
-int exiGetUriID(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, const char* uri, uint16_t* uriID);
-
-int exiGetLocalName(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID, uint16_t localNameID, const char** localName);
-
-int exiGetLocalNameSize(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID, uint16_t* localNameLength);
-
-/*  0 ... Success, 1 ... Miss, -1 ... Error */
-int exiGetLocalNameID(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID, const char* localName, uint16_t* localNameID);
-
-/* inits counter et cetera */
-int exiInitNameTableRuntime(exi_name_table_runtime_t* runtimeTable);
-
-/* add runtime URI entry */
-int exiAddUri(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, char* uri);
-
-/* add runtime local-name entry */
-int exiAddLocalName(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID, char* localName);
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-

+ 0 - 66
src/codec/UCSString.c

@@ -1,66 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#include <string.h>
-
-#include "DecoderChannel.h"
-#include "BitInputStream.h"
-#include "EXITypes.h"
-
-#ifndef UCS_STRING_C
-#define UCS_STRING_C
-
-int toUCSString(char* chars, string_ucs_t* s) {
-	unsigned int i;
-	s->len = strlen(chars);
-
-	if (s->len <= s->size) {
-		for(i=0; i<s->len; i++) {
-			s->codepoints[i] = chars[i];
-		}
-		return 0;
-	} else {
-		return EXI_ERROR_OUT_OF_STRING_BUFFER;
-	}
-}
-
-/* Note A: fails if string contains non ASCII characters */
-/* Note B: causes harm if char array is not sufficiently long */
-int toASCIIString(string_ucs_t* string, char* outASCII) {
-	unsigned int i;
-	for(i=0; i<string->len; i++) {
-		outASCII[i] = (char)string->codepoints[i];
-	}
-	outASCII[string->len] = '\0';
-
-	return 0;
-}
-
-#endif
-

+ 0 - 52
src/codec/UCSString.h

@@ -1,52 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-12-02 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "EXITypes.h"
-
-/* TODO utf8/cstring//wchar_t/char16_t/char32_t methods */
-
-
-#ifndef UCS_STRING_H
-#define UCS_STRING_H
-
-int toUCSString(char* chars, string_ucs_t* s);
-
-/* Note: fails if string contains non ASCII characters */
-int toASCIIString(string_ucs_t* string, char* outASCII);
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 84
src/service/v2g_service.h

@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2007-2010 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef EXI_SERVICE_H_
-#define EXI_SERVICE_H_
-
-#include "v2g_serviceDataTypes.h"
-#include "EXITypes.h"
-
-struct uniqueIDPath
-{
-	int id[10];
-	size_t pos;
-};
-
-
-struct EXIService
-{
-	/* in-/ out-stream */
-	bitstream_t inStream;
-	bitstream_t outStream;
-
-	/* EXI */
-	exi_state_t stateDecode;
-	exi_state_t stateEncode;
-	exi_event_t event;
-	eqname_t eqn;
-	exi_value_t val;
-
-	/* v2g message data structure */
-	struct EXIDocumentType exiMsg;
-
-	/* unique id for ambiguous elements */
-	struct uniqueIDPath idPath;
-
-	/* error code */
-	uint8_t errorCode;
-
-	/* offset for transported header data */
-	uint16_t transportHeaderOffset;
-};
-
-enum responseMessages
-{
-	has_to_be_filled
-}; 
-
-/* define error codes (TODO: define precise error codes) */
-#define EXI_NON_VALID_MESSAGE 0x01
-#define EXI_SERIALIZATION_FAILED 0x02
-
-#define EXI_UNKNOWN_ERROR 0xFF
-
-#endif /* EXI_SERVICE_H_ */
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 44
src/service/v2g_serviceClientDataTransmitter.h

@@ -1,44 +0,0 @@
-
-/*
- * Copyright (C) 2007-2010 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef V2G_SERVICECLIENTDATATRANSMITTER_H_
-#define V2G_SERVICECLIENTDATATRANSMITTER_H_
-
-#include "EXITypes.h"
-
-/* This method has to be implemented!
- * This method sends EXI stream (outStream) to the EVSE and receives response stream (inStream)*/
-int serviceDataTransmitter(uint8_t* outStream, uint16_t outStreamLength, uint8_t* inStream);
-
-#endif /* V2G_SERVICECLIENTDATATRANSMITTER_H_ */
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 3682
src/service/v2g_serviceClientStubs.c

@@ -1,3682 +0,0 @@
-
-
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXISeGen</p>
- *
- ********************************************************************/
-
- 
- #include "v2g_serviceDataTypes.h"
-  #include "v2g_serviceDataTypes.c"
- #include "v2g_serviceClientStubs.h"
- #include "v2g_serviceDataSerialization.c"
- #include "v2g_serviceClientDataTransmitter.h"
- #include "EXITypes.h"
- #include "EXIDecoder.h"
- #include "EXIEncoder.h"
- #include "StringTable.h"
- #include <string.h>
- 
-
-static int deserializeMessage(struct EXIService* service);
-
-
-static int _setInt32Value(integer_t* iv, int32_t* int32) {
-	int errn = 0;
-	switch(iv->type) {
-	/* Unsigned Integer */
-	case UNSIGNED_INTEGER_8:
-		*int32 = iv->val.uint8;
-		break;
-	case UNSIGNED_INTEGER_16:
-		*int32 = iv->val.uint16;
-		break;
-	case UNSIGNED_INTEGER_32:
-		if (iv->val.uint32 <= 2147483647) {
-			*int32 = iv->val.uint32;
-		} else {
-			errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-		}
-		break;
-	case UNSIGNED_INTEGER_64:
-		errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-		break;
-	/* (Signed) Integer */
-	case INTEGER_8:
-		*int32 = iv->val.int8;
-		break;
-	case INTEGER_16:
-		*int32 = iv->val.int16;
-		break;
-	case INTEGER_32:
-		*int32 = iv->val.int32;
-		break;
-	case INTEGER_64:
-		errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-	}
-	return errn;
-}
-
-
-static int _setInt16Value(integer_t* iv, int16_t* int16) {
-	int errn = 0;
-	switch(iv->type) {
-	/* Unsigned Integer */
-	case UNSIGNED_INTEGER_8:
-		*int16 = iv->val.uint8;
-		break;
-	case UNSIGNED_INTEGER_16:
-		*int16 = iv->val.uint16;
-		break;
-	case UNSIGNED_INTEGER_32:
-		if (iv->val.uint32 <= 2147483647) {
-			*int16 = iv->val.uint32;
-		} else {
-			errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-		}
-		break;
-	case UNSIGNED_INTEGER_64:
-		errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-		break;
-	/* (Signed) Integer */
-	case INTEGER_8:
-		*int16 = iv->val.int8;
-		break;
-	case INTEGER_16:
-		*int16 = iv->val.int16;
-		break;
-	case INTEGER_32:
-		*int16 = iv->val.int32;
-		break;
-	case INTEGER_64:
-		errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-	}
-	return errn;
-}
-
-
-
-
-/**
- * \brief   Calls the remote sessionSetup method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct SessionSetupReqType* Request data for the server (has to be set up before)
- * \param	result   struct SessionSetupResType* Contains the response data from the server
- * \return  0 = 0K; -1 = ERROR */
-int call_sessionSetup(struct EXIService* service, struct MessageHeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-
-
-
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.SessionSetupReq = params;
-	service->exiMsg.V2G_Message.Body.isused.SessionSetupReq=1;
-
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{
-
-		return -1;
-	}
-
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode)
- 	{
-		return -1;
- 	}
-
-
-
- 	service->exiMsg.V2G_Message.Body.SessionSetupRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
-
- 		return -1;
- 	}
-
-
-
-	return 0;
-}
-
-/**
- * \brief   Calls the remote serviceDiscovery method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct ServiceDiscoveryReqType* Request data for the server (has to be set up before)
- * \param	result   struct ServiceDiscoveryResType* Contains the response data from the server
- * \return  0 = 0K; -1 = ERROR */
-int call_serviceDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-
-
-
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq = params;
-	service->exiMsg.V2G_Message.Body.isused.ServiceDiscoveryReq=1;
-
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{
-
-		return -1;
-	}
-
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode)
- 	{
-		return -1;
- 	}
-
-
-	init_ServiceDiscoveryResType(result);
-
- 	service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
-
- 		return -1;
- 	}
-
-
-
-	return 0;
-}
-
-/**
- * \brief   Calls the remote serviceDetail method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct ServiceDetailReqType* Request data for the server (has to be set up before)
- * \param	result   struct ServiceDetailResType* Contains the response data from the server
- * \return  0 = 0K; -1 = ERROR */
-int call_serviceDetail(struct EXIService* service, struct MessageHeaderType* header, struct ServiceDetailReqType* params, struct ServiceDetailResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-
-
-
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.ServiceDetailReq = params;
-	service->exiMsg.V2G_Message.Body.isused.ServiceDetailReq=1;
-
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{
-
-		return -1;
-	}
-
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode)
- 	{
-		return -1;
- 	}
-
-
- 	init_ServiceDetailResType(result);
- 	service->exiMsg.V2G_Message.Body.ServiceDetailRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
-
- 		return -1;
- 	}
-
-
-
-	return 0;
-}
-
-/**
- * \brief   Calls the remote selectedServicePayment method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct ServicePaymentSelectionReqType* Request data for the server (has to be set up before)
- * \param	result   struct ServicePaymentSelectionResType* Contains the response data from the server
- * \return  0 = 0K; -1 = ERROR */
-int call_selectedServicePayment(struct EXIService* service, struct MessageHeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-
-
-
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.ServicePaymentSelectionReq = params;
-	service->exiMsg.V2G_Message.Body.isused.ServicePaymentSelectionReq=1;
-
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{
-
-		return -1;
-	}
-
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode)
- 	{
-		return -1;
- 	}
-
-
-
- 	service->exiMsg.V2G_Message.Body.ServicePaymentSelectionRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
-
- 		return -1;
- 	}
-
-
-
-	return 0;
-}
-
-/**
- * \brief   Calls the remote paymentDetails method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct PaymentDetailsReqType* Request data for the server (has to be set up before)
- * \param	result   struct PaymentDetailsResType* Contains the response data from the server
- * \return  0 = 0K; -1 = ERROR */
-int call_paymentDetails(struct EXIService* service, struct MessageHeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-
-
-
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.PaymentDetailsReq = params;
-	service->exiMsg.V2G_Message.Body.isused.PaymentDetailsReq=1;
-
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{
-
-		return -1;
-	}
-
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode)
- 	{
-		return -1;
- 	}
-
-
-
- 	service->exiMsg.V2G_Message.Body.PaymentDetailsRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
-
- 		return -1;
- 	}
-
-
-
-	return 0;
-}
-
-
-/** 
- * \brief   Calls the remote contractAuthentication method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct ContractAuthenticationReqType* Request data for the server (has to be set up before)
- * \param	result   struct ContractAuthenticationResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_contractAuthentication(struct EXIService* service, struct MessageHeaderType* header, struct ContractAuthenticationReqType* params, struct ContractAuthenticationResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.ContractAuthenticationReq = params;
-	service->exiMsg.V2G_Message.Body.isused.ContractAuthenticationReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
-
- 	service->exiMsg.V2G_Message.Body.ContractAuthenticationRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
-/** 
- * \brief   Calls the remote chargeParameterDiscovery method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct ChargeParameterDiscoveryReqType* Request data for the server (has to be set up before)
- * \param	result   struct ChargeParameterDiscoveryResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_chargeParameterDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* params, struct ChargeParameterDiscoveryResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq = params;
-	service->exiMsg.V2G_Message.Body.isused.ChargeParameterDiscoveryReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
-
- 	service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
-/** 
- * \brief   Calls the remote lineLock method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct LineLockReqType* Request data for the server (has to be set up before)
- * \param	result   struct LineLockResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_lineLock(struct EXIService* service, struct MessageHeaderType* header, struct LineLockReqType* params, struct LineLockResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.LineLockReq = params;
-	service->exiMsg.V2G_Message.Body.isused.LineLockReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
-
- 	service->exiMsg.V2G_Message.Body.LineLockRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
-/** 
- * \brief   Calls the remote powerDelivery method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct PowerDeliveryReqType* Request data for the server (has to be set up before)
- * \param	result   struct PowerDeliveryResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_powerDelivery(struct EXIService* service, struct MessageHeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.PowerDeliveryReq = params;
-	service->exiMsg.V2G_Message.Body.isused.PowerDeliveryReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
-
- 	service->exiMsg.V2G_Message.Body.PowerDeliveryRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
-/** 
- * \brief   Calls the remote meteringStatus method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct MeteringStatusReqType* Request data for the server (has to be set up before)
- * \param	result   struct MeteringStatusResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_meteringStatus(struct EXIService* service, struct MessageHeaderType* header, struct MeteringStatusReqType* params, struct MeteringStatusResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.MeteringStatusReq = params;
-	service->exiMsg.V2G_Message.Body.isused.MeteringStatusReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
-
- 	service->exiMsg.V2G_Message.Body.MeteringStatusRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
-/** 
- * \brief   Calls the remote meteringReceipt method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct MeteringReceiptReqType* Request data for the server (has to be set up before)
- * \param	result   struct MeteringReceiptResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_meteringReceipt(struct EXIService* service, struct MessageHeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.MeteringReceiptReq = params;
-	service->exiMsg.V2G_Message.Body.isused.MeteringReceiptReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
-
- 	service->exiMsg.V2G_Message.Body.MeteringReceiptRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
-/** 
- * \brief   Calls the remote certificateUpdate method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct CertificateUpdateReqType* Request data for the server (has to be set up before)
- * \param	result   struct CertificateUpdateResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_certificateUpdate(struct EXIService* service, struct MessageHeaderType* header, struct CertificateUpdateReqType* params, struct CertificateUpdateResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.CertificateUpdateReq = params;
-	service->exiMsg.V2G_Message.Body.isused.CertificateUpdateReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
-
- 	service->exiMsg.V2G_Message.Body.CertificateUpdateRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
-/** 
- * \brief   Calls the remote certificateInstallation method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct CertificateInstallationReqType* Request data for the server (has to be set up before)
- * \param	result   struct CertificateInstallationResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_certificateInstallation(struct EXIService* service, struct MessageHeaderType* header, struct CertificateInstallationReqType* params, struct CertificateInstallationResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.CertificateInstallationReq = params;
-	service->exiMsg.V2G_Message.Body.isused.CertificateInstallationReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
- 	init_CertificateInstallationResType(result);
- 	service->exiMsg.V2G_Message.Body.CertificateInstallationRes = result;
-
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
-/** 
- * \brief   Calls the remote cableCheck method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct CableCheckReqType* Request data for the server (has to be set up before)
- * \param	result   struct CableCheckResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_cableCheck(struct EXIService* service, struct MessageHeaderType* header, struct CableCheckReqType* params, struct CableCheckResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.CableCheckReq = params;
-	service->exiMsg.V2G_Message.Body.isused.CableCheckReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
-
- 	service->exiMsg.V2G_Message.Body.CableCheckRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
-/** 
- * \brief   Calls the remote preCharge method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct PreChargeReqType* Request data for the server (has to be set up before)
- * \param	result   struct PreChargeResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_preCharge(struct EXIService* service, struct MessageHeaderType* header, struct PreChargeReqType* params, struct PreChargeResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.PreChargeReq = params;
-	service->exiMsg.V2G_Message.Body.isused.PreChargeReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
-
- 	service->exiMsg.V2G_Message.Body.PreChargeRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
-/** 
- * \brief   Calls the remote currentDemand method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct CurrentDemandReqType* Request data for the server (has to be set up before)
- * \param	result   struct CurrentDemandResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_currentDemand(struct EXIService* service, struct MessageHeaderType* header, struct CurrentDemandReqType* params, struct CurrentDemandResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.CurrentDemandReq = params;
-	service->exiMsg.V2G_Message.Body.isused.CurrentDemandReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
-
- 	service->exiMsg.V2G_Message.Body.CurrentDemandRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
-/** 
- * \brief   Calls the remote weldingDetection method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct WeldingDetectionReqType* Request data for the server (has to be set up before)
- * \param	result   struct WeldingDetectionResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_weldingDetection(struct EXIService* service, struct MessageHeaderType* header, struct WeldingDetectionReqType* params, struct WeldingDetectionResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.WeldingDetectionReq = params;
-	service->exiMsg.V2G_Message.Body.isused.WeldingDetectionReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
-
- 	service->exiMsg.V2G_Message.Body.WeldingDetectionRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
-/** 
- * \brief   Calls the remote terminateCharging method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct TerminateChargingReqType* Request data for the server (has to be set up before)
- * \param	result   struct TerminateChargingResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-int call_terminateCharging(struct EXIService* service, struct MessageHeaderType* header, struct TerminateChargingReqType* params, struct TerminateChargingResType* result)
-{
-	uint32_t posEncode, posDecode;
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-	
-	/* init outStream data structure */
-	posEncode = service->transportHeaderOffset;
-	service->outStream.pos = &posEncode;
-	service->outStream.buffer = 0;
-	service->outStream.capacity = 8;
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init inStream data structure */
-	posDecode = service->transportHeaderOffset;
-	service->inStream.pos = &posDecode;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-	
-
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-	
-
-	
-	/* assign data to service data structure */
- 	service->exiMsg.V2G_Message.Header = header;
-	service->exiMsg.V2G_Message.Body.TerminateChargingReq = params;
-	service->exiMsg.V2G_Message.Body.isused.TerminateChargingReq=1;
-	
-	/* encode data to exi stream*/
-	if(serialize_message(service))
-	{ 
-	
-		return -1;
-	}
- 
- 	/* send data to server and wait for the response message */
- 	service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data);
- 	if(service->errorCode) 
- 	{
-		return -1;
- 	}
- 	
- 	
-
- 	service->exiMsg.V2G_Message.Body.TerminateChargingRes = result;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-
-	/* deserilize the response message */
- 	if(deserializeMessage(service)<0)
- 	{
- 	 
- 		return -1;
- 	}
-
- 		
- 	
-	return 0;
-}	
-
- 
-
- /**
- * Deserialize an element value of the EXI stream and assign it to the
- * service data structure 
- */
-static int deserializeElementCharacter(struct EXIService* service)
-{
-
-	switch(service->eqn.namespaceURI) {
-		case 0:
-			switch(service->eqn.localPart) {
-				case 0: /*attr_Algorithm*/
-
-				if(service->val.type == STRING) 
-					{
-						if( service->idPath.id[5] == 0)
-						{
-							memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.CanonicalizationMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.CanonicalizationMethod.attr_Algorithm.arraylen.data = service->val.string.len;
-
-						} else if(service->idPath.id[5] == 43)
-						{
-							memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.SignatureMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.SignatureMethod.attr_Algorithm.arraylen.data = service->val.string.len;
-
-						} else if(service->idPath.id[6] == 5)
-						{
-							/* memcpy(service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].DigestMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].DigestMethod.attr_Algorithm.arraylen.data = service->val.string.len; */
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 2: /*attr_Id*/
-
-				if(service->val.type == STRING) 
-					{
-						if( service->idPath.id[3] == 42)
-						{
-							memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->attr_Id.arraylen.data = service->val.string.len;
-
-						} else if(service->idPath.id[4] == 52)
-						{
-						/*	memcpy(service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.attr_Id.arraylen.data = service->val.string.len; */
-
-						} else if(service->idPath.id[4] == 14)
-						{
-							memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.attr_Id.arraylen.data = service->val.string.len;
-
-						} else if(service->idPath.id[5] == 34)
-						{
-						/*	memcpy(service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].attr_Id.arraylen.data = service->val.string.len; */
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 6: /*attr_URI*/
-
-				if(service->val.type == STRING) 
-					{
-					/*	memcpy(service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].attr_URI.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].attr_URI.arraylen.data = service->val.string.len; */
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 5: /*attr_Type*/
-
-				if(service->val.type == STRING) 
-					{
-					/*	memcpy(service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].attr_Type.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].attr_Type.arraylen.data = service->val.string.len; */
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;	
-			} /* close switch(service->eqn.localPart) */	
-		break;
-		case 4:
-			switch(service->eqn.localPart) {
-			case 7: /*DigestValue*/
-				if(service->val.type == BINARY_BASE64)
-				{
-					memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.Reference.DigestValue.data, service->val.binary.data,service->val.binary.len);
-					service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.Reference.DigestValue.arraylen.data = service->val.binary.len;
-
-
-				}
-				else
-				{
-					return -1; /* wrong data type */
-				}
-
-			break;
-			case 50: /*SignatureValue*/
-
-			if(service->val.type == BINARY_BASE64)
-			{
-				memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignatureValue.data, service->val.binary.data,service->val.binary.len);
-				service->exiMsg.V2G_Message.Header->Security.Signature->SignatureValue.arraylen.data = service->val.binary.len;
-
-
-			}
-			else
-			{
-				return -1; /* wrong data type */
-			}
-
-			break;
-			case 62: /*X509IssuerName*/
-
-				if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509IssuerSerial.X509IssuerName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509IssuerSerial.X509IssuerName.arraylen.data = service->val.string.len;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 66: /*X509SerialNumber*/
-
-				if(service->val.type == INTEGER) 
-					{
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509IssuerSerial.X509SerialNumber = service->val.integer.val.int64;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 65: /*X509SKI*/
-
-				if(service->val.type == BINARY_BASE64) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509SKI.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509SKI.arraylen.data = service->val.binary.len;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 67: /*X509SubjectName*/
-
-				if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509SubjectName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509SubjectName.arraylen.data = service->val.string.len;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 59: /*X509Certificate*/
-
-				if(service->val.type == BINARY_BASE64) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509Certificate.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509Certificate.arraylen.data = service->val.binary.len;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 58: /*X509CRL*/
-
-				if(service->val.type == BINARY_BASE64) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509CRL.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509CRL.arraylen.data = service->val.binary.len;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;	
-			} /* close switch(service->eqn.localPart) */	
-		break;
-		case 5:
-			switch(service->eqn.localPart) {
-				case 93: /*ResponseCode*/
-
-				if(service->val.type == ENUMERATION) 
-					{
-						if( service->idPath.id[2] == 116)
-						{
-							service->exiMsg.V2G_Message.Body.SessionSetupRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 102)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 98)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDetailRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 108)
-						{
-							service->exiMsg.V2G_Message.Body.ServicePaymentSelectionRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 77)
-						{
-							service->exiMsg.V2G_Message.Body.PaymentDetailsRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 25)
-						{
-							service->exiMsg.V2G_Message.Body.ContractAuthenticationRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 18)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 82)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 63)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 59)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 13)
-						{
-							service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 9)
-						{
-							service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 54)
-						{
-							service->exiMsg.V2G_Message.Body.LineLockRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 5)
-						{
-							service->exiMsg.V2G_Message.Body.CableCheckRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 86)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 35)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 128)
-						{
-							service->exiMsg.V2G_Message.Body.WeldingDetectionRes->ResponseCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 123)
-						{
-							service->exiMsg.V2G_Message.Body.TerminateChargingRes->ResponseCode = service->val.enumeration;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 41: /*EVSEID*/
-
-				if(service->val.type == BINARY_HEX) 
-					{
-						if( service->idPath.id[2] == 116)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEID.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[2] == 63)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEID.arraylen.data = service->val.binary.len;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 118: /*TCurrent*/
-
-				if(service->val.type == INTEGER) 
-					{
-						if( service->idPath.id[2] == 116)
-						{
-							_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.SessionSetupRes->TCurrent));
-
-						} else if(service->idPath.id[2] == 77)
-						{
-							_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.PaymentDetailsRes->TCurrent));
-
-						} else if(service->idPath.id[2] == 63)
-						{
-							_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.MeteringStatusRes->TCurrent));
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 51: /*GenChallenge*/
-
-				if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.PaymentDetailsRes->GenChallenge.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.PaymentDetailsRes->GenChallenge.arraylen.data = service->val.string.len;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 50: /*EnergyProvider*/
-
-				if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EnergyProvider.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EnergyProvider.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->isused.EnergyProvider=1;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 32: /*ContractSignaturePrivateKey*/
-
-				if(service->val.type == BINARY_BASE64) 
-					{
-
-
-						if( service->idPath.id[2] == 13)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractSignaturePrivateKey.data, service->val.binary.data,service->val.binary.len);
-							service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractSignaturePrivateKey.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[2] == 9)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractSignaturePrivateKey.data, service->val.binary.data,service->val.binary.len);
-							service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractSignaturePrivateKey.arraylen.data = service->val.binary.len;
-
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 29: /*ContractEncryptionPrivateKey*/
-
-				if(service->val.type == BINARY_BASE64) 
-					{
-						if( service->idPath.id[2] == 13)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractEncryptionPrivateKey.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractEncryptionPrivateKey.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[2] == 9)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractEncryptionPrivateKey.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractEncryptionPrivateKey.arraylen.data = service->val.binary.len;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 30: /*ContractID*/
-
-				if(service->val.type == STRING) 
-					{
-						if( service->idPath.id[2] == 13)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractID.arraylen.data = service->val.string.len;
-
-						} else if(service->idPath.id[2] == 9)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractID.arraylen.data = service->val.string.len;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 94: /*RetryCounter*/
-
-				if(service->val.type == NBIT_UNSIGNED_INTEGER)
-					{
-						service->exiMsg.V2G_Message.Body.CertificateUpdateRes->RetryCounter = service->val.integer.val.int8;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 40: /*EVSECurrentLimitAchieved*/
-
-				if(service->val.type == BOOLEAN) 
-					{
-						service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSECurrentLimitAchieved = service->val.boolean;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 49: /*EVSEVoltageLimitAchieved*/
-
-				if(service->val.type == BOOLEAN) 
-					{
-						service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEVoltageLimitAchieved = service->val.boolean;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 46: /*EVSEPowerLimitAchieved*/
-
-				if(service->val.type == BOOLEAN) 
-					{
-						service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPowerLimitAchieved = service->val.boolean;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;	
-			} /* close switch(service->eqn.localPart) */	
-		break;
-		case 6:
-			switch(service->eqn.localPart) {
-				case 132: /*SessionID*/
-
-				if(service->val.type == BINARY_HEX) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.SessionID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Header->SessionInformation.SessionID.arraylen.data = service->val.binary.len;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 127: /*ServiceSessionID*/
-
-				if(service->val.type == BINARY_HEX) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.ServiceSessionID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Header->SessionInformation.ServiceSessionID.arraylen.data = service->val.binary.len;
-						service->exiMsg.V2G_Message.Header->SessionInformation.isused.ServiceSessionID=1;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 107: /*ProtocolVersion*/
-
-				if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.ProtocolVersion.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->SessionInformation.ProtocolVersion.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Header->SessionInformation.isused.ProtocolVersion=1;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 67: /*FaultCode*/
-
-				if(service->val.type == ENUMERATION) 
-					{
-						service->exiMsg.V2G_Message.Header->Notification.FaultCode = service->val.enumeration;
-						service->exiMsg.V2G_Message.Header->Notification.isused.FaultCode=1;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 68: /*FaultMsg*/
-
-				if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->Notification.FaultMsg.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Notification.FaultMsg.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Header->Notification.isused.FaultMsg=1;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 103: /*PaymentOption*/
-
-				if(service->val.type == ENUMERATION) 
-					{
-						if( service->idPath.id[2] == 102)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->PaymentOptions.PaymentOption[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->PaymentOptions.arraylen.PaymentOption++] = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 98)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDetailRes->PaymentOptions.PaymentOption[service->exiMsg.V2G_Message.Body.ServiceDetailRes->PaymentOptions.arraylen.PaymentOption++] = service->val.enumeration;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 120: /*ServiceID*/
-
-				if(service->val.type == BINARY_HEX) 
-					{
-						if( service->idPath.id[3] == 111)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceTag.ServiceID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceTag.ServiceID.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[3] == 20)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.ServiceTag.ServiceID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.ServiceTag.ServiceID.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[3] == 105)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceID.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[3] == 114)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCharge->ServiceTag.ServiceID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCharge->ServiceTag.ServiceID.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[3] == 112)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCertificate->ServiceTag.ServiceID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCertificate->ServiceTag.ServiceID.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[3] == 116)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCustom->ServiceTag.ServiceID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCustom->ServiceTag.ServiceID.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[3] == 124)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceRCS->ServiceTag.ServiceID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceRCS->ServiceTag.ServiceID.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[3] == 121)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceInternet->ServiceTag.ServiceID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceInternet->ServiceTag.ServiceID.arraylen.data = service->val.binary.len;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 123: /*ServiceName*/
-
-				if(service->val.type == STRING) 
-					{
-						if( service->idPath.id[3] == 111)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceTag.ServiceName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceTag.ServiceName.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceTag.isused.ServiceName=1;
-
-						} else if(service->idPath.id[3] == 20)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.ServiceTag.ServiceName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.ServiceTag.ServiceName.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.ServiceTag.isused.ServiceName=1;
-
-						} else if(service->idPath.id[3] == 105)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceName.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].isused.ServiceName=1;
-
-						} else if(service->idPath.id[3] == 114)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCharge->ServiceTag.ServiceName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCharge->ServiceTag.ServiceName.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCharge->ServiceTag.isused.ServiceName=1;
-
-						} else if(service->idPath.id[3] == 112)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCertificate->ServiceTag.ServiceName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCertificate->ServiceTag.ServiceName.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCertificate->ServiceTag.isused.ServiceName=1;
-
-						} else if(service->idPath.id[3] == 116)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCustom->ServiceTag.ServiceName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCustom->ServiceTag.ServiceName.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCustom->ServiceTag.isused.ServiceName=1;
-
-						} else if(service->idPath.id[3] == 124)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceRCS->ServiceTag.ServiceName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceRCS->ServiceTag.ServiceName.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceRCS->ServiceTag.isused.ServiceName=1;
-
-						} else if(service->idPath.id[3] == 121)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceInternet->ServiceTag.ServiceName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceInternet->ServiceTag.ServiceName.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceInternet->ServiceTag.isused.ServiceName=1;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 111: /*ServiceCategory*/
-
-				if(service->val.type == ENUMERATION) 
-					{
-						if( service->idPath.id[3] == 111)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceTag.ServiceCategory = service->val.enumeration;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceTag.isused.ServiceCategory=1;
-
-						} else if(service->idPath.id[3] == 20)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.ServiceTag.ServiceCategory = service->val.enumeration;
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.ServiceTag.isused.ServiceCategory=1;
-
-						} else if(service->idPath.id[3] == 105)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceCategory = service->val.enumeration;
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].isused.ServiceCategory=1;
-
-						} else if(service->idPath.id[3] == 114)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCharge->ServiceTag.ServiceCategory = service->val.enumeration;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCharge->ServiceTag.isused.ServiceCategory=1;
-
-						} else if(service->idPath.id[3] == 112)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCertificate->ServiceTag.ServiceCategory = service->val.enumeration;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCertificate->ServiceTag.isused.ServiceCategory=1;
-
-						} else if(service->idPath.id[3] == 116)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCustom->ServiceTag.ServiceCategory = service->val.enumeration;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCustom->ServiceTag.isused.ServiceCategory=1;
-
-						} else if(service->idPath.id[3] == 124)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceRCS->ServiceTag.ServiceCategory = service->val.enumeration;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceRCS->ServiceTag.isused.ServiceCategory=1;
-
-						} else if(service->idPath.id[3] == 121)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceInternet->ServiceTag.ServiceCategory = service->val.enumeration;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceInternet->ServiceTag.isused.ServiceCategory=1;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 126: /*ServiceScope*/
-
-				if(service->val.type == STRING) 
-					{
-						if( service->idPath.id[3] == 111)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceTag.ServiceScope.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceTag.ServiceScope.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceTag.isused.ServiceScope=1;
-
-						} else if(service->idPath.id[3] == 20)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.ServiceTag.ServiceScope.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.ServiceTag.ServiceScope.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.ServiceTag.isused.ServiceScope=1;
-
-						} else if(service->idPath.id[3] == 105)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceScope.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceScope.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].isused.ServiceScope=1;
-
-						} else if(service->idPath.id[3] == 114)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCharge->ServiceTag.ServiceScope.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCharge->ServiceTag.ServiceScope.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCharge->ServiceTag.isused.ServiceScope=1;
-
-						} else if(service->idPath.id[3] == 112)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCertificate->ServiceTag.ServiceScope.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCertificate->ServiceTag.ServiceScope.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCertificate->ServiceTag.isused.ServiceScope=1;
-
-						} else if(service->idPath.id[3] == 116)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCustom->ServiceTag.ServiceScope.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCustom->ServiceTag.ServiceScope.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCustom->ServiceTag.isused.ServiceScope=1;
-
-						} else if(service->idPath.id[3] == 124)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceRCS->ServiceTag.ServiceScope.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceRCS->ServiceTag.ServiceScope.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceRCS->ServiceTag.isused.ServiceScope=1;
-
-						} else if(service->idPath.id[3] == 121)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceInternet->ServiceTag.ServiceScope.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceInternet->ServiceTag.ServiceScope.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceInternet->ServiceTag.isused.ServiceScope=1;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 70: /*FreeService*/
-
-				if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[2] == 102)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.FreeService = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 98)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCharge->FreeService = service->val.boolean;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 65: /*EnergyTransferType*/
-
-				if(service->val.type == ENUMERATION) 
-					{
-						if( service->idPath.id[2] == 102)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.EnergyTransferType = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 98)
-						{
-							service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCharge->EnergyTransferType = service->val.enumeration;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 15: /*CertificateInstall*/
-
-				if(service->val.type == BOOLEAN) 
-					{
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCertificate->CertificateInstall = service->val.boolean;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 16: /*CertificateUpdate*/
-
-				if(service->val.type == BOOLEAN) 
-					{
-						service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceCertificate->CertificateUpdate = service->val.boolean;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 13: /*Certificate*/
-
-				if(service->val.type == BINARY_BASE64) 
-					{
-						if( service->idPath.id[3] == 31 && service->idPath.id[2] == 13)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractSignatureCertChain.Certificate.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractSignatureCertChain.Certificate.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[3] == 28 && service->idPath.id[2] == 13)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractEncryptionCertChain.Certificate.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractEncryptionCertChain.Certificate.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[4] == 137 && service->idPath.id[3] == 31)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractSignatureCertChain.SubCertificates.Certificate[service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractSignatureCertChain.SubCertificates.arraylen.Certificate].data, service->val.binary.data,service->val.binary.len);
-							service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractSignatureCertChain.SubCertificates.Certificate[service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractSignatureCertChain.SubCertificates.arraylen.Certificate].arraylen.data = service->val.binary.len;
-
-						}
-						else if(service->idPath.id[3] == 31 && service->idPath.id[2] == 9)
-						{
-
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractSignatureCertChain.Certificate.data, service->val.binary.data,service->val.binary.len);
-							service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractSignatureCertChain.Certificate.arraylen.data = service->val.binary.len;
-
-						}
-						else if(service->idPath.id[4] == 137 && service->idPath.id[2] == 9)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractEncryptionCertChain.SubCertificates.Certificate[service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractEncryptionCertChain.SubCertificates.arraylen.Certificate].data, service->val.binary.data,service->val.binary.len);
-							service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractEncryptionCertChain.SubCertificates.Certificate[service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractEncryptionCertChain.SubCertificates.arraylen.Certificate].arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[3] == 28 && service->idPath.id[2] == 9)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractEncryptionCertChain.Certificate.data, service->val.binary.data,service->val.binary.len);
-							service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractEncryptionCertChain.Certificate.arraylen.data = service->val.binary.len;
-
-
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 77: /*Multiplier*/
-
-				if(service->val.type == NBIT_UNSIGNED_INTEGER)
-					{
-						if( service->idPath.id[3] == 42)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEMaxPower.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 66)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->PCurrent.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 86)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 35)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 47)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 45)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumVoltageLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 43)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumCurrentLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 44)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumPowerLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 128)
-						{
-							service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 123)
-						{
-							service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEPresentVoltage.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 50)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxVoltage.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 55)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMinVoltage.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 48)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxCurrent.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 54)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMinCurrent.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 51)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumCurrentLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 52)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumPowerLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 53)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumVoltageLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 56)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumCurrentLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 57)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumVoltageLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 46)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSECurrentRegulationTolerance.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 58)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEPeakCurrentRipple.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 47)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEEnergyToBeDelivered.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 75)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterReading.Multiplier = service->val.integer.val.int8;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 151: /*Unit*/
-
-				if(service->val.type == ENUMERATION) 
-					{
-						if( service->idPath.id[3] == 42)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEMaxPower.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 66)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->PCurrent.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 86)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 35)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 47)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 45)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumVoltageLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 43)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumCurrentLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 44)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumPowerLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 128)
-						{
-							service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 123)
-						{
-							service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEPresentVoltage.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 50)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxVoltage.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 55)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMinVoltage.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 48)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxCurrent.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 54)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMinCurrent.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 51)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumCurrentLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 52)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumPowerLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 53)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumVoltageLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 56)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumCurrentLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 57)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumVoltageLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 46)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSECurrentRegulationTolerance.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 58)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEPeakCurrentRipple.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 47)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEEnergyToBeDelivered.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 75)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterReading.Unit = service->val.enumeration;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 152: /*Value*/
-
-				if(service->val.type == INTEGER) 
-					{
-					_setInt16Value( &(service->val.integer),&(service->val.integer.val.int16));
-
-						if( service->idPath.id[3] == 42)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEMaxPower.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 66)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->PCurrent.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 86)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 35)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 47)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 45)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumVoltageLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 43)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumCurrentLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 44)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumPowerLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 128)
-						{
-							service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 123)
-						{
-							service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEPresentVoltage.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 50)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxVoltage.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 55)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMinVoltage.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 48)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxCurrent.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 54)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMinCurrent.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 51)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumCurrentLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 52)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumPowerLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 53)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumVoltageLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 56)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumCurrentLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 57)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumVoltageLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 46)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSECurrentRegulationTolerance.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 58)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEPeakCurrentRipple.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 47)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEEnergyToBeDelivered.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 75)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterReading.Value = service->val.integer.val.int16;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 148: /*TariffPMax*/
-
-				if(service->val.type == INTEGER) 
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].TariffPMax = service->val.integer.val.int16;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 40: /*EPrice*/
-
-				if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].EPrice.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].EPrice.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].isused.EPrice=1;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 147: /*TariffID*/
-
-				if(service->val.type == INTEGER) 
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffID = service->val.integer.val.int16;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 142: /*TariffDescription*/
-
-				if(service->val.type == ENUMERATION) 
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffDescription = service->val.enumeration;
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].isused.TariffDescription=1;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 22: /*Currency*/
-
-				if(service->val.type == ENUMERATION) 
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Currency = service->val.enumeration;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 43: /*EPriceUnit*/
-
-				if(service->val.type == ENUMERATION) 
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.EPriceUnit = service->val.enumeration;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 41: /*EPriceMultiplier*/
-
-				if(service->val.type == NBIT_UNSIGNED_INTEGER)
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.EPriceMultiplier = service->val.integer.val.int8;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 60: /*EVSEStandby*/
-
-				if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[3] == 2 && service->idPath.id[2] == 82)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryRes->AC_EVSEStatus->EVSEStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 2 && service->idPath.id[2] == 63)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->AC_EVSEStatus->EVSEStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 2 && service->idPath.id[2] == 59)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptRes->AC_EVSEStatus->EVSEStandby = service->val.boolean;
-
-						}  else if(service->idPath.id[3] == 27 && service->idPath.id[2] == 82)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryRes->DC_EVSEStatus->EVSEStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 27 && service->idPath.id[2] == 63)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->DC_EVSEStatus->EVSEStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 27 && service->idPath.id[2] == 59)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptRes->DC_EVSEStatus->EVSEStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 38 && service->idPath.id[2] == 5)
-						{
-							service->exiMsg.V2G_Message.Body.CableCheckRes->DC_EVSEStatus.EVSEStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 38 && service->idPath.id[2] == 86)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeRes->DC_EVSEStatus.EVSEStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 38 && service->idPath.id[2] == 35)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->DC_EVSEStatus.EVSEStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 38 && service->idPath.id[2] == 128)
-						{
-							service->exiMsg.V2G_Message.Body.WeldingDetectionRes->DC_EVSEStatus.EVSEStandby = service->val.boolean;
-
-						} else if(service->idPath.id[4] == 2)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->AC_EVSEStatus.EVSEStandby = service->val.boolean;
-						}  else if(service->idPath.id[4] == 27)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->DC_EVSEStatus.EVSEStandby = service->val.boolean;
-						}
-						else if(service->idPath.id[3] == 0)
-						{
-							service->exiMsg.V2G_Message.Body.LineLockRes->AC_EVSEStatus.EVSEStandby = service->val.boolean;
-
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 21: /*ConnectorLocked*/
-
-				if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[2] == 82)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryRes->AC_EVSEStatus->ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 63)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->AC_EVSEStatus->ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 59)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptRes->AC_EVSEStatus->ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 54)
-						{
-							service->exiMsg.V2G_Message.Body.LineLockRes->AC_EVSEStatus.ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[4] == 2)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->AC_EVSEStatus.ConnectorLocked = service->val.boolean;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 104: /*PowerSwitchClosed*/
-
-				if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[2] == 82)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryRes->AC_EVSEStatus->PowerSwitchClosed = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 63)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->AC_EVSEStatus->PowerSwitchClosed = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 59)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptRes->AC_EVSEStatus->PowerSwitchClosed = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 54)
-						{
-							service->exiMsg.V2G_Message.Body.LineLockRes->AC_EVSEStatus.PowerSwitchClosed = service->val.boolean;
-
-						} else if(service->idPath.id[4] == 2)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->AC_EVSEStatus.PowerSwitchClosed = service->val.boolean;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 108: /*RCD*/
-
-				if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[2] == 82)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryRes->AC_EVSEStatus->RCD = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 63)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->AC_EVSEStatus->RCD = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 59)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptRes->AC_EVSEStatus->RCD = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 54)
-						{
-							service->exiMsg.V2G_Message.Body.LineLockRes->AC_EVSEStatus.RCD = service->val.boolean;
-
-						} else if(service->idPath.id[4] == 2)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->AC_EVSEStatus.RCD = service->val.boolean;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 134: /*ShutDownTime*/
-
-				if(service->val.type == INTEGER) 
-					{
-						if( service->idPath.id[2] == 82)
-						{
-							_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.PowerDeliveryRes->AC_EVSEStatus->ShutDownTime));
-
-						} else if(service->idPath.id[2] == 63)
-						{
-							_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.MeteringStatusRes->AC_EVSEStatus->ShutDownTime));
-
-						} else if(service->idPath.id[2] == 59)
-						{
-							_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.MeteringReceiptRes->AC_EVSEStatus->ShutDownTime));
-
-						} else if(service->idPath.id[2] == 54)
-						{
-							_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.LineLockRes->AC_EVSEStatus.ShutDownTime));
-
-						} else if(service->idPath.id[4] == 2)
-						{
-							_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->AC_EVSEStatus.ShutDownTime));
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 136: /*StopCharging*/
-
-				if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[2] == 82)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryRes->AC_EVSEStatus->StopCharging = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 63)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->AC_EVSEStatus->StopCharging = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 59)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptRes->AC_EVSEStatus->StopCharging = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 54)
-						{
-							service->exiMsg.V2G_Message.Body.LineLockRes->AC_EVSEStatus.StopCharging = service->val.boolean;
-
-						} else if(service->idPath.id[4] == 2)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->AC_EVSEStatus.StopCharging = service->val.boolean;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 49: /*EVSEMaxPhases*/
-
-				if(service->val.type == NBIT_UNSIGNED_INTEGER)
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxPhases = service->val.integer.val.int8;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 62: /*EVSEStatusCode*/
-
-				if(service->val.type == ENUMERATION) 
-					{
-						if( service->idPath.id[2] == 82)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryRes->DC_EVSEStatus->EVSEStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 63)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusRes->DC_EVSEStatus->EVSEStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 59)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptRes->DC_EVSEStatus->EVSEStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 5)
-						{
-							service->exiMsg.V2G_Message.Body.CableCheckRes->DC_EVSEStatus.EVSEStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 86)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeRes->DC_EVSEStatus.EVSEStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 35)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandRes->DC_EVSEStatus.EVSEStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 128)
-						{
-							service->exiMsg.V2G_Message.Body.WeldingDetectionRes->DC_EVSEStatus.EVSEStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 27)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->DC_EVSEStatus.EVSEStatusCode = service->val.enumeration;
-						}
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 59: /*EVSEProtocolVersion*/
-
-				if(service->val.type == NBIT_UNSIGNED_INTEGER)
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEProtocolVersion = service->val.integer.val.int8;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 72: /*MeterID*/
-
-				if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterID.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.isused.MeterID=1;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 74: /*MeterPubKey*/
-
-				if(service->val.type == BINARY_BASE64) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterPubKey.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterPubKey.arraylen.data = service->val.binary.len;
-						service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.isused.MeterPubKey=1;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 76: /*MeterStatus*/
-				if(service->val.type == INTEGER) 
-					{
-						_setInt16Value( &(service->val.integer),&(service->val.integer.val.int16));
-						service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterStatus = service->val.integer.val.int16;
-						service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.isused.MeterStatus=1;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;
-				case 139: /*TMeter*/
-
-				if(service->val.type == INTEGER) 
-					{
-						_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.TMeter));
-						service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.isused.TMeter=1;
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-		
-
-				break;	
-			} /* close switch(service->eqn.localPart) */	
-		break;
-	
-	} /* close switch(service->eqn.namespaceURI) */
-	return 0;
-}
- 
-/**
- * Deserialize an element of the EXI stream
- * @return 0 = 0K; -1 = ERROR
- */
-static int deserializeElement(struct EXIService* service)
-{
-	switch(service->eqn.namespaceURI) {
-		case 0:
-			switch(service->eqn.localPart) {
-
-			}
-		break;
-		case 4:
-			switch(service->eqn.localPart) {
-
-				case 14:/* KeyInfo */	
-
-								service->exiMsg.V2G_Message.Header->Security.Signature->isused.KeyInfo=1;
-		  
-				break;	
-				case 42:/* Signature */	
-
-								service->exiMsg.V2G_Message.Header->Security.isused.Signature=1;
-		  
-				break;	
-
-			}
-		break;
-		case 5:
-			switch(service->eqn.localPart) {
-				case 105:/* ServiceList */	
-
-								service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->isused.ServiceList=1;
-		  
-				break;	
-				case 120:/* TariffTable */	
-
-								service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->isused.TariffTable=1;
-		  
-				break;	
-				case 66:/* PCurrent */	
-
-								service->exiMsg.V2G_Message.Body.MeteringStatusRes->isused.PCurrent=1;
-		  
-				break;	
-				case 56:/* MeterInfo */	
-
-								service->exiMsg.V2G_Message.Body.MeteringStatusRes->isused.MeterInfo=1;
-		  
-				break;	
-				case 45:/* EVSEMaximumVoltageLimit */	
-
-								service->exiMsg.V2G_Message.Body.CurrentDemandRes->isused.EVSEMaximumVoltageLimit=1;
-		  
-				break;	
-				case 43:/* EVSEMaximumCurrentLimit */	
-
-								service->exiMsg.V2G_Message.Body.CurrentDemandRes->isused.EVSEMaximumCurrentLimit=1;
-		  
-				break;	
-				case 44:/* EVSEMaximumPowerLimit */	
-
-								service->exiMsg.V2G_Message.Body.CurrentDemandRes->isused.EVSEMaximumPowerLimit=1;
-		  
-				break;	
-
-			}
-		break;
-		case 6:
-			switch(service->eqn.localPart) {
-				case 110:/* Service */	
-
-								service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service++;
-		  
-				break;	
-				case 114:/* ServiceCharge */	
-
-								service->exiMsg.V2G_Message.Body.ServiceDetailRes->isused.ServiceCharge=1;
-		  
-				break;	
-				case 112:/* ServiceCertificate */	
-
-								service->exiMsg.V2G_Message.Body.ServiceDetailRes->isused.ServiceCertificate=1;
-		  
-				break;	
-				case 116:/* ServiceCustom */	
-
-								service->exiMsg.V2G_Message.Body.ServiceDetailRes->isused.ServiceCustom=1;
-		  
-				break;	
-				case 124:/* ServiceRCS */	
-
-								service->exiMsg.V2G_Message.Body.ServiceDetailRes->isused.ServiceRCS=1;
-		  
-				break;	
-				case 121:/* ServiceInternet */	
-
-								service->exiMsg.V2G_Message.Body.ServiceDetailRes->isused.ServiceInternet=1;
-		  
-				break;	
-				case 137:/* SubCertificates */	
-
-					if( service->idPath.id[-1] == -1)
-				{
-								service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractSignatureCertChain.isused.SubCertificates=1;
-
-				} else if(service->idPath.id[-1] == -1)
-				{
-								service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractEncryptionCertChain.isused.SubCertificates=1;
-
-				} else if(service->idPath.id[-1] == -1)
-				{
-								service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractSignatureCertChain.isused.SubCertificates=1;
-
-				} else if(service->idPath.id[-1] == -1)
-				{
-								service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractEncryptionCertChain.isused.SubCertificates=1;
-				}
-		  
-				break;	
-				case 145:/* TariffEntry */	
-
-								service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry++;
-		  
-				break;	
-				case 140:/* Tariff */	
-
-								service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff++;
-		  
-				break;	
-				case 52:/* EVSEMaximumPowerLimit */	
-
-								service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->isused.EVSEMaximumPowerLimit=1;
-		  
-				break;	
-				case 46:/* EVSECurrentRegulationTolerance */	
-
-								service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->isused.EVSECurrentRegulationTolerance=1;
-		  
-				break;	
-				case 47:/* EVSEEnergyToBeDelivered */	
-
-								service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->isused.EVSEEnergyToBeDelivered=1;
-		  
-				break;	
-				case 0:/* AC_EVSEChargeParameter */	
-
-								service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->isused.AC_EVSEChargeParameter=1;
-		  
-				break;	
-				case 25:/* DC_EVSEChargeParameter */	
-
-								service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->isused.DC_EVSEChargeParameter=1;
-		  
-				break;	
-				case 2:/* AC_EVSEStatus */	
-
-					if( service->idPath.id[2] == 82)
-				{
-								service->exiMsg.V2G_Message.Body.PowerDeliveryRes->isused.AC_EVSEStatus=1;
-
-				} else if(service->idPath.id[2] == 63)
-				{
-								service->exiMsg.V2G_Message.Body.MeteringStatusRes->isused.AC_EVSEStatus=1;
-
-				} else if(service->idPath.id[2] == 59)
-				{
-								service->exiMsg.V2G_Message.Body.MeteringReceiptRes->isused.AC_EVSEStatus=1;
-				}
-		  
-				break;	
-				case 27:/* DC_EVSEStatus */	
-
-					if( service->idPath.id[2] == 82)
-				{
-								service->exiMsg.V2G_Message.Body.PowerDeliveryRes->isused.DC_EVSEStatus=1;
-
-				} else if(service->idPath.id[2] == 63)
-				{
-								service->exiMsg.V2G_Message.Body.MeteringStatusRes->isused.DC_EVSEStatus=1;
-
-				} else if(service->idPath.id[2] == 59)
-				{
-								service->exiMsg.V2G_Message.Body.MeteringReceiptRes->isused.DC_EVSEStatus=1;
-				}
-		  
-				break;	
-				case 75:/* MeterReading */	
-
-								service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.isused.MeterReading=1;
-		  
-				break;	
-				case 135:/* SigMeterReading */	
-
-								service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.isused.SigMeterReading=1;
-		  
-				break;	
-
-			}
-		break;
-		case 8:
-			switch(service->eqn.localPart) {
-				case 1:/* Notification */	
-
-								service->exiMsg.V2G_Message.Header->isused.Notification=1;
-		  
-				break;	
-				case 2:/* Security */	
-
-								service->exiMsg.V2G_Message.Header->isused.Security=1;
-		  
-				break;	
-
-			}
-		break;
-		
-
-	}
-	return 0;
-}
-
-
-/**
- * Deserialize an attribute of the EXI stream
- * @return 0 = 0K; -1 = ERROR
- */
-static int deserializeAttributeCharacter(struct EXIService* service)
-{
-	switch(service->eqn.namespaceURI) {
-			case 0:
-				switch(service->eqn.localPart) {
-
-					case 2:/* Id */
-				if(service->val.type == STRING)
-					{
-
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->attr_Id.arraylen.data = service->val.string.len;
-					}
-
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-					break;
-					case 0:/* Algorithm */
-						if(service->val.type == STRING)
-							{
-							if( service->idPath.id[5] == 0)
-									{
-							memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.CanonicalizationMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-							service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.CanonicalizationMethod.attr_Algorithm.arraylen.data = service->val.string.len;
-							}
-							else if( service->idPath.id[5] == 43)
-							{
-
-								memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.SignatureMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-								service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.SignatureMethod.attr_Algorithm.arraylen.data = service->val.string.len;
-							}
-							else if( service->idPath.id[6] == 5)
-							{
-
-								memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.Reference.DigestMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-								service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.Reference.DigestMethod.attr_Algorithm.arraylen.data = service->val.string.len;
-							}
-						}
-						break;
-						case 6:/* URI */
-							if(service->val.type == STRING)
-								{
-
-								memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.Reference.attr_URI.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-								service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.Reference.attr_URI.arraylen.data = service->val.string.len;
-
-							}
-						break;
-				}
-			break;
-	}
-
-	return 0;
-}
-
- 
- 
- /** 
- * Deserialize the EXI stream
- * @return 0 = 0K; -1 = ERROR
- */
-static int deserializeMessage(struct EXIService* service)
-{
-	int noEndOfDocument = 1; /* true */
-	int returnCode=0;
-	
-
-	do {
-			exiDecodeNextEvent(&(service->inStream), &(service->stateDecode), &(service->event));
-			if (returnCode < 0) {
-				printf("[ERROR] %d \n", returnCode);
-				return returnCode;
-			}
-
-			switch (service->event) {
-			case START_DOCUMENT:
-
-				returnCode = exiDecodeStartDocument(&(service->inStream), &(service->stateDecode));
-
-				break;
-			case END_DOCUMENT:
-
-				returnCode = exiDecodeEndDocument(&(service->inStream), &(service->stateDecode));
-				noEndOfDocument = 0; /* false */
-				break;
-			case START_ELEMENT:
-				returnCode = exiDecodeStartElement(&(service->inStream), &(service->stateDecode), &(service->eqn));
-				service->idPath.id[service->idPath.pos++]=service->eqn.localPart;
-				 
-				break;
-			case END_ELEMENT:
-
-				returnCode = exiDecodeEndElement(&(service->inStream), &(service->stateDecode), &(service->eqn));
-				service->idPath.pos--;
-				 
-				returnCode = deserializeElement(service);
-				break;
-			case CHARACTERS:
-				/* decode */
-				returnCode = exiDecodeCharacters(&(service->inStream), &(service->stateDecode), &(service->val));
-				 
-				/* assign character data to the v2g message structure */
-				returnCode = deserializeElementCharacter(service);
-				break;
-			case ATTRIBUTE:
-				/* decode */
-				returnCode = exiDecodeAttribute(&(service->inStream), &(service->stateDecode), &(service->eqn), &(service->val));
-				returnCode = deserializeAttributeCharacter(service);
-				break;
-			default:
-				/* ERROR */
-				return -1;
-			}
-
-		} while (noEndOfDocument);
-
-	return 0;
-}
-
-
-
- 
- 
- /* Initialize the v2g client */
-int init_v2gServiceClient(struct EXIService* service, bytes_t bytes, string_ucs_t string, uint8_t* inStream, size_t max_inStream_size, uint8_t* outStream, size_t max_outStream_size, uint16_t transportHeaderOffset)
-{
-
-	/* init byte array */
-	 service->val.binary = bytes;
-
-	/* init string array */
-	 service->val.string = string;
-
-	 /* init input / output stream */
-	 service->inStream.data=inStream;
-	 service->inStream.size=max_inStream_size;
-
-	 service->outStream.data=outStream;
-	 service->outStream.size=max_outStream_size;
-
-	/* init offset for transport protocoll */
-	 service->transportHeaderOffset=transportHeaderOffset;
-
-	return 0;
-}
-

+ 0 - 269
src/service/v2g_serviceClientStubs.h

@@ -1,269 +0,0 @@
-
-
-
-
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXISeGen</p>
- *
- ********************************************************************/
-
- 
- 
- #ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef SERVICECLIENTSTUBS_H
-#define SERVICECLIENTSTUBS_H
-
- #include "v2g_service.h"
- #include "v2g_serviceDataTypes.h"
- #include "v2g_serviceClientStubs.h"
- 
-/**  
- * \brief   Calls the remote sessionSetup method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct SessionSetupReqType* Request data for the server (has to be set up before)
- * \param	result   struct SessionSetupResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_sessionSetup(struct EXIService* service, struct MessageHeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote serviceDiscovery method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct ServiceDiscoveryReqType* Request data for the server (has to be set up before)
- * \param	result   struct ServiceDiscoveryResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_serviceDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote serviceDetail method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct ServiceDetailReqType* Request data for the server (has to be set up before)
- * \param	result   struct ServiceDetailResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_serviceDetail(struct EXIService* service, struct MessageHeaderType* header, struct ServiceDetailReqType* params, struct ServiceDetailResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote selectedServicePayment method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct ServicePaymentSelectionReqType* Request data for the server (has to be set up before)
- * \param	result   struct ServicePaymentSelectionResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_selectedServicePayment(struct EXIService* service, struct MessageHeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote paymentDetails method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct PaymentDetailsReqType* Request data for the server (has to be set up before)
- * \param	result   struct PaymentDetailsResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_paymentDetails(struct EXIService* service, struct MessageHeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote contractAuthentication method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct ContractAuthenticationReqType* Request data for the server (has to be set up before)
- * \param	result   struct ContractAuthenticationResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_contractAuthentication(struct EXIService* service, struct MessageHeaderType* header, struct ContractAuthenticationReqType* params, struct ContractAuthenticationResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote chargeParameterDiscovery method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct ChargeParameterDiscoveryReqType* Request data for the server (has to be set up before)
- * \param	result   struct ChargeParameterDiscoveryResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_chargeParameterDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* params, struct ChargeParameterDiscoveryResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote lineLock method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct LineLockReqType* Request data for the server (has to be set up before)
- * \param	result   struct LineLockResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_lineLock(struct EXIService* service, struct MessageHeaderType* header, struct LineLockReqType* params, struct LineLockResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote powerDelivery method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct PowerDeliveryReqType* Request data for the server (has to be set up before)
- * \param	result   struct PowerDeliveryResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_powerDelivery(struct EXIService* service, struct MessageHeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote meteringStatus method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct MeteringStatusReqType* Request data for the server (has to be set up before)
- * \param	result   struct MeteringStatusResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_meteringStatus(struct EXIService* service, struct MessageHeaderType* header, struct MeteringStatusReqType* params, struct MeteringStatusResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote meteringReceipt method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct MeteringReceiptReqType* Request data for the server (has to be set up before)
- * \param	result   struct MeteringReceiptResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_meteringReceipt(struct EXIService* service, struct MessageHeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote certificateUpdate method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct CertificateUpdateReqType* Request data for the server (has to be set up before)
- * \param	result   struct CertificateUpdateResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_certificateUpdate(struct EXIService* service, struct MessageHeaderType* header, struct CertificateUpdateReqType* params, struct CertificateUpdateResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote certificateInstallation method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct CertificateInstallationReqType* Request data for the server (has to be set up before)
- * \param	result   struct CertificateInstallationResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_certificateInstallation(struct EXIService* service, struct MessageHeaderType* header, struct CertificateInstallationReqType* params, struct CertificateInstallationResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote cableCheck method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct CableCheckReqType* Request data for the server (has to be set up before)
- * \param	result   struct CableCheckResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_cableCheck(struct EXIService* service, struct MessageHeaderType* header, struct CableCheckReqType* params, struct CableCheckResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote preCharge method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct PreChargeReqType* Request data for the server (has to be set up before)
- * \param	result   struct PreChargeResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_preCharge(struct EXIService* service, struct MessageHeaderType* header, struct PreChargeReqType* params, struct PreChargeResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote currentDemand method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct CurrentDemandReqType* Request data for the server (has to be set up before)
- * \param	result   struct CurrentDemandResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_currentDemand(struct EXIService* service, struct MessageHeaderType* header, struct CurrentDemandReqType* params, struct CurrentDemandResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote weldingDetection method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct WeldingDetectionReqType* Request data for the server (has to be set up before)
- * \param	result   struct WeldingDetectionResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_weldingDetection(struct EXIService* service, struct MessageHeaderType* header, struct WeldingDetectionReqType* params, struct WeldingDetectionResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote terminateCharging method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct TerminateChargingReqType* Request data for the server (has to be set up before)
- * \param	result   struct TerminateChargingResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_terminateCharging(struct EXIService* service, struct MessageHeaderType* header, struct TerminateChargingReqType* params, struct TerminateChargingResType* result);
-
- 
-
-	
-
-	/* Initialize the v2g client */
-	int init_v2gServiceClient(struct EXIService* service, bytes_t bytes, string_ucs_t string, uint8_t* inStream, size_t max_inStream_size, uint8_t* outStream, size_t max_outStream_size, uint16_t transportHeaderOffset);
- 
-#endif
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 7947
src/service/v2g_serviceDataSerialization.c

@@ -1,7947 +0,0 @@
-
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXISeGen</p>
- *
- ********************************************************************/
-
-
-#include "v2g_service.h"
-#include "v2g_serviceDataTypes.h"
-#include "EXITypes.h"
-#include "EXIEncoder.h"
-#include <string.h>
- 
- 
-
-
-
-
-static int serialize_SessionInformationType(struct SessionInformationType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of SessionID*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=132;
-			/* encode start element SessionID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_HEX;
-			service->val.binary.len = type->SessionID.arraylen.data;
-			memcpy(service->val.binary.data, type->SessionID.data,type->SessionID.arraylen.data);
-
-		/* encode character  SessionID */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of SessionID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.ServiceSessionID)
-		{
-
-			/* element ID assignment of ServiceSessionID*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=127;
-			/* encode start element ServiceSessionID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_HEX;
-		service->val.binary.len = type->ServiceSessionID.arraylen.data;
-		service->val.binary.data= type->ServiceSessionID.data;
-
-		/* encode character  ServiceSessionID */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of ServiceSessionID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ProtocolVersion)
-		{
-
-			/* element ID assignment of ProtocolVersion*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=107;
-			/* encode start element ProtocolVersion */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->ProtocolVersion.arraylen.data;
-			service->val.string.codepoints = type->ProtocolVersion.data;
-
-			/* encode character  ProtocolVersion */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of ProtocolVersion */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_NotificationType(struct NotificationType* type, struct EXIService* service)
-{
-
-	if(type->isused.FaultCode)
-		{
-
-			/* element ID assignment of FaultCode*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=67;
-			/* encode start element FaultCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->FaultCode;
-
-			/* encode character  FaultCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of FaultCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.FaultMsg)
-		{
-
-			/* element ID assignment of FaultMsg*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=68;
-			/* encode start element FaultMsg */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->FaultMsg.arraylen.data;
-			service->val.string.codepoints = type->FaultMsg.data;
-
-			/* encode character  FaultMsg */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of FaultMsg */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_CanonicalizationMethodType(struct CanonicalizationMethodType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of attr_Algorithm*/
-			service->eqn.namespaceURI=0;
-			service->eqn.localPart=0;
-
-
-			service->val.type = STRING;
-			service->val.string.len = type->attr_Algorithm.arraylen.data;
-			service->val.string.codepoints = type->attr_Algorithm.data;
-
-			if (exiEncodeAttribute(&(service->outStream), &(service->stateEncode), &(service->eqn),&(service->val)))
-			{
-					return -1;
-			}
-
-
-
-
-	return 0;
-}
-
-
-static int serialize_SignatureMethodType(struct SignatureMethodType* type, struct EXIService* service)
-{
-
-	/* element ID assignment of attr_Algorithm*/
-	service->eqn.namespaceURI=0;
-	service->eqn.localPart=0;
-
-
-	service->val.type = STRING;
-	service->val.string.len = type->attr_Algorithm.arraylen.data;
-	service->val.string.codepoints = type->attr_Algorithm.data;
-
-	if (exiEncodeAttribute(&(service->outStream), &(service->stateEncode), &(service->eqn),&(service->val)))
-	{
-			return -1;
-	}
-
-
-
-	return 0;
-}
-
-
-static int serialize_DigestMethodType(struct DigestMethodType* type, struct EXIService* service)
-{
-
-	/* element ID assignment of attr_Algorithm*/
-	service->eqn.namespaceURI=0;
-	service->eqn.localPart=0;
-
-
-	service->val.type = STRING;
-	service->val.string.len = type->attr_Algorithm.arraylen.data;
-	service->val.string.codepoints = type->attr_Algorithm.data;
-
-	if (exiEncodeAttribute(&(service->outStream), &(service->stateEncode), &(service->eqn),&(service->val)))
-	{
-			return -1;
-	}
-
-
-
-	return 0;
-}
-
-
-static int serialize_ReferenceType(struct ReferenceType* type, struct EXIService* service)
-{
-
-
-			/* element ID assignment of attr_URI*/
-			service->eqn.namespaceURI=0;
-			service->eqn.localPart=6;
-
-
-			service->val.type = STRING;
-			service->val.string.len = type->attr_URI.arraylen.data;
-			service->val.string.codepoints = type->attr_URI.data;
-
-			if (exiEncodeAttribute(&(service->outStream), &(service->stateEncode), &(service->eqn),&(service->val)))
-			{
-					return -1;
-			}
-
-
-
-
-			/* element ID assignment of DigestMethod*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=5;
-			/* encode start element DigestMethod */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DigestMethod */
-			if(serialize_DigestMethodType( &(type->DigestMethod),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DigestMethod */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of DigestValue*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=7;
-			/* encode start element DigestValue */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->DigestValue.arraylen.data;
-		service->val.binary.data= type->DigestValue.data;
-
-		/* encode character  DigestValue */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of DigestValue */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-
-	return 0;
-}
-
-
-static int serialize_SignedInfoType(struct SignedInfoType* type, struct EXIService* service)
-{
-
-
-
-
-			/* element ID assignment of CanonicalizationMethod*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=0;
-			/* encode start element CanonicalizationMethod */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of CanonicalizationMethod */
-			if(serialize_CanonicalizationMethodType( &(type->CanonicalizationMethod),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of CanonicalizationMethod */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of SignatureMethod*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=43;
-			/* encode start element SignatureMethod */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of SignatureMethod */
-			if(serialize_SignatureMethodType( &(type->SignatureMethod),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of SignatureMethod */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of Reference*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=34;
-			/* encode start element Reference */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of Reference */
-			if(serialize_ReferenceType(&(type->Reference),service))
-			{
-				return -1;
-			}
-
-
-			/* encode end element of Reference */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-
-
-	return 0;
-}
-
-
-static int serialize_SignatureValueType(struct SignatureValueType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of attr_Id*/
-			service->eqn.namespaceURI=0;
-			service->eqn.localPart=2;
-			/* encode start element attr_Id */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-	/* service->val.string.len = type->attr_Id.arraylen.data;
-			service->val.string.codepoints = type->attr_Id.data;
-*/
-			/* encode character  attr_Id */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of attr_Id */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_X509IssuerSerialType(struct X509IssuerSerialType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of X509IssuerName*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=62;
-			/* encode start element X509IssuerName */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->X509IssuerName.arraylen.data;
-			service->val.string.codepoints = type->X509IssuerName.data;
-
-			/* encode character  X509IssuerName */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of X509IssuerName */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of X509SerialNumber*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=66;
-			/* encode start element X509SerialNumber */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int64=type->X509SerialNumber;
-			service->val.integer.type = INTEGER_64;
-
-			/* encode character  X509SerialNumber */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of X509SerialNumber */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_X509DataType(struct X509DataType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of X509IssuerSerial*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=63;
-			/* encode start element X509IssuerSerial */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of X509IssuerSerial */
-			if(serialize_X509IssuerSerialType( &(type->X509IssuerSerial),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of X509IssuerSerial */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of X509SKI*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=65;
-			/* encode start element X509SKI */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->X509SKI.arraylen.data;
-		service->val.binary.data= type->X509SKI.data;
-
-		/* encode character  X509SKI */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of X509SKI */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of X509SubjectName*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=67;
-			/* encode start element X509SubjectName */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->X509SubjectName.arraylen.data;
-			service->val.string.codepoints = type->X509SubjectName.data;
-
-			/* encode character  X509SubjectName */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of X509SubjectName */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of X509Certificate*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=59;
-			/* encode start element X509Certificate */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->X509Certificate.arraylen.data;
-		service->val.binary.data= type->X509Certificate.data;
-
-		/* encode character  X509Certificate */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of X509Certificate */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of X509CRL*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=58;
-			/* encode start element X509CRL */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->X509CRL.arraylen.data;
-		service->val.binary.data= type->X509CRL.data;
-
-		/* encode character  X509CRL */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of X509CRL */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_KeyInfoType(struct KeyInfoType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of X509Data*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=60;
-			/* encode start element X509Data */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of X509Data */
-			if(serialize_X509DataType( &(type->X509Data),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of X509Data */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of attr_Id*/
-			service->eqn.namespaceURI=0;
-			service->eqn.localPart=2;
-			/* encode start element attr_Id */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->attr_Id.arraylen.data;
-			service->val.string.codepoints = type->attr_Id.data;
-
-			/* encode character  attr_Id */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of attr_Id */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_SignatureType(struct SignatureType* type, struct EXIService* service)
-{
-
-
-	/* element ID assignment of attr_Id*/
-	service->eqn.namespaceURI=0;
-	service->eqn.localPart=2;
-
-
-	service->val.type = STRING;
-	service->val.string.len = type->attr_Id.arraylen.data;
-	service->val.string.codepoints = type->attr_Id.data;
-
-	if (exiEncodeAttribute(&(service->outStream), &(service->stateEncode), &(service->eqn),&(service->val)))
-	{
-			return -1;
-	}
-
-
-
-			/* element ID assignment of SignedInfo*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=52;
-			/* encode start element SignedInfo */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of SignedInfo */
-			if(serialize_SignedInfoType( &(type->SignedInfo),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of SignedInfo */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of SignatureValue*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=50;
-			/* encode start element SignatureValue */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BINARY_BASE64;
-			service->val.binary.len = type->SignatureValue.arraylen.data;
-			service->val.binary.data= type->SignatureValue.data;
-
-		/* encode character  DigestValue */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of SignatureValue */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.KeyInfo)
-		{
-
-			/* element ID assignment of KeyInfo*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=14;
-			/* encode start element KeyInfo */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of KeyInfo */
-			if(serialize_KeyInfoType( &(type->KeyInfo),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of KeyInfo */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-
-
-
-	return 0;
-}
-
-
-static int serialize_SecurityType(struct SecurityType* type, struct EXIService* service)
-{
-
-	if(type->isused.Signature)
-		{
-
-			/* element ID assignment of Signature*/
-			service->eqn.namespaceURI=4;
-			service->eqn.localPart=42;
-			/* encode start element Signature */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of Signature */
-			if(serialize_SignatureType( type->Signature,service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of Signature */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_MessageHeaderType(struct MessageHeaderType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of SessionInformation*/
-			service->eqn.namespaceURI=8;
-			service->eqn.localPart=3;
-			/* encode start element SessionInformation */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of SessionInformation */
-			if(serialize_SessionInformationType( &(type->SessionInformation),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of SessionInformation */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.Notification)
-		{
-
-			/* element ID assignment of Notification*/
-			service->eqn.namespaceURI=8;
-			service->eqn.localPart=1;
-			/* encode start element Notification */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of Notification */
-			if(serialize_NotificationType( &(type->Notification),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of Notification */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.Security)
-		{
-
-			/* element ID assignment of Security*/
-			service->eqn.namespaceURI=8;
-			service->eqn.localPart=2;
-			/* encode start element Security */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of Security */
-			if(serialize_SecurityType( &(type->Security),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of Security */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struct EXIService* service)
-{
-
-	if(type->isused.PEVID)
-		{
-
-			/* element ID assignment of PEVID*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=68;
-			/* encode start element PEVID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->PEVID.arraylen.data;
-			service->val.string.codepoints = type->PEVID.data;
-
-			/* encode character  PEVID */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of PEVID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_SessionSetupResType(struct SessionSetupResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEID*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=41;
-			/* encode start element EVSEID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_HEX;
-		service->val.binary.len = type->EVSEID.arraylen.data;
-		service->val.binary.data= type->EVSEID.data;
-
-		/* encode character  EVSEID */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of EVSEID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of TCurrent*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=118;
-			/* encode start element TCurrent */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int32=type->TCurrent;
-			service->val.integer.type = INTEGER_32;
-
-			/* encode character  TCurrent */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of TCurrent */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type, struct EXIService* service)
-{
-
-	if(type->isused.ServiceScope)
-		{
-
-			/* element ID assignment of ServiceScope*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=110;
-			/* encode start element ServiceScope */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->ServiceScope.arraylen.data;
-			service->val.string.codepoints = type->ServiceScope.data;
-
-			/* encode character  ServiceScope */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of ServiceScope */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServiceType)
-		{
-
-			/* element ID assignment of ServiceType*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=112;
-			/* encode start element ServiceType */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ServiceType;
-
-			/* encode character  ServiceType */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ServiceType */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_PaymentOptionsType(struct PaymentOptionsType* type, struct EXIService* service)
-{
-
-			size_t i_loop;
-
-	for(i_loop=0;i_loop < type->arraylen.PaymentOption;i_loop++)
-		{
-
-			/* element ID assignment of PaymentOption*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=103;
-			/* encode start element PaymentOption */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->PaymentOption[i_loop];
-
-			/* encode character  PaymentOption */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of PaymentOption */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_ServiceTagType(struct ServiceTagType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ServiceID*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=120;
-			/* encode start element ServiceID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_HEX;
-		service->val.binary.len = type->ServiceID.arraylen.data;
-		service->val.binary.data= type->ServiceID.data;
-
-		/* encode character  ServiceID */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of ServiceID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.ServiceName)
-		{
-
-			/* element ID assignment of ServiceName*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=123;
-			/* encode start element ServiceName */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->ServiceName.arraylen.data;
-			service->val.string.codepoints = type->ServiceName.data;
-
-			/* encode character  ServiceName */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of ServiceName */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServiceCategory)
-		{
-
-			/* element ID assignment of ServiceCategory*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=111;
-			/* encode start element ServiceCategory */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ServiceCategory;
-
-			/* encode character  ServiceCategory */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ServiceCategory */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServiceScope)
-		{
-
-			/* element ID assignment of ServiceScope*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=126;
-			/* encode start element ServiceScope */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->ServiceScope.arraylen.data;
-			service->val.string.codepoints = type->ServiceScope.data;
-
-			/* encode character  ServiceScope */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of ServiceScope */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_ServiceChargeType(struct ServiceChargeType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ServiceTag*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=128;
-			/* encode start element ServiceTag */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceTag */
-			if(serialize_ServiceTagType( &(type->ServiceTag),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceTag */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of FreeService*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=70;
-			/* encode start element FreeService */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->FreeService;
-
-			/* encode character  FreeService */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of FreeService */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EnergyTransferType*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=65;
-			/* encode start element EnergyTransferType */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->EnergyTransferType;
-
-			/* encode character  EnergyTransferType */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of EnergyTransferType */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ServiceTagListType(struct ServiceTagListType* type, struct EXIService* service)
-{
-
-			size_t i_loop;
-
-	for(i_loop=0;i_loop < type->arraylen.Service;i_loop++)
-		{
-
-			/* element ID assignment of Service*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=110;
-			/* encode start element Service */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of Service */
-			if(serialize_ServiceTagType(&(type->Service[i_loop]),service))
-			{
-				return -1;
-			}
-
-
-			/* encode end element of Service */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_ServiceDiscoveryResType(struct ServiceDiscoveryResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PaymentOptions*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=79;
-			/* encode start element PaymentOptions */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PaymentOptions */
-			if(serialize_PaymentOptionsType( &(type->PaymentOptions),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PaymentOptions */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ChargeService*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=20;
-			/* encode start element ChargeService */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ChargeService */
-			if(serialize_ServiceChargeType( &(type->ChargeService),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ChargeService */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.ServiceList)
-		{
-
-			/* element ID assignment of ServiceList*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=105;
-			/* encode start element ServiceList */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceList */
-			if(serialize_ServiceTagListType( &(type->ServiceList),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceList */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_ServiceDetailReqType(struct ServiceDetailReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ServiceID*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=104;
-			/* encode start element ServiceID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_HEX;
-		service->val.binary.len = type->ServiceID.arraylen.data;
-		service->val.binary.data= type->ServiceID.data;
-
-		/* encode character  ServiceID */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of ServiceID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ServiceCertificateType(struct ServiceCertificateType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ServiceTag*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=128;
-			/* encode start element ServiceTag */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceTag */
-			if(serialize_ServiceTagType( &(type->ServiceTag),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceTag */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of FreeService*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=70;
-			/* encode start element FreeService */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->FreeService;
-
-			/* encode character  FreeService */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of FreeService */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of CertificateInstall*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=15;
-			/* encode start element CertificateInstall */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->CertificateInstall;
-
-			/* encode character  CertificateInstall */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of CertificateInstall */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of CertificateUpdate*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=16;
-			/* encode start element CertificateUpdate */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->CertificateUpdate;
-
-			/* encode character  CertificateUpdate */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of CertificateUpdate */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ServiceDetailsType(struct ServiceDetailsType* type, struct EXIService* service)
-{
-
-
-	return 0;
-}
-
-
-static int serialize_ServiceCustomType(struct ServiceCustomType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ServiceTag*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=128;
-			/* encode start element ServiceTag */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceTag */
-			if(serialize_ServiceTagType( &(type->ServiceTag),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceTag */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of FreeService*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=70;
-			/* encode start element FreeService */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->FreeService;
-
-			/* encode character  FreeService */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of FreeService */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ServiceDetails*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=118;
-			/* encode start element ServiceDetails */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceDetails */
-			if(serialize_ServiceDetailsType( &(type->ServiceDetails),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceDetails */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ServiceRCSType(struct ServiceRCSType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ServiceTag*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=128;
-			/* encode start element ServiceTag */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceTag */
-			if(serialize_ServiceTagType( &(type->ServiceTag),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceTag */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of FreeService*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=70;
-			/* encode start element FreeService */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->FreeService;
-
-			/* encode character  FreeService */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of FreeService */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ServiceDetails*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=118;
-			/* encode start element ServiceDetails */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceDetails */
-			if(serialize_ServiceDetailsType( &(type->ServiceDetails),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceDetails */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ServiceInternetType(struct ServiceInternetType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ServiceTag*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=128;
-			/* encode start element ServiceTag */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceTag */
-			if(serialize_ServiceTagType( &(type->ServiceTag),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceTag */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of FreeService*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=70;
-			/* encode start element FreeService */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->FreeService;
-
-			/* encode character  FreeService */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of FreeService */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ServiceDetails*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=118;
-			/* encode start element ServiceDetails */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceDetails */
-			if(serialize_ServiceDetailsType( &(type->ServiceDetails),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceDetails */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ServiceDetailResType(struct ServiceDetailResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ServiceTag*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=111;
-			/* encode start element ServiceTag */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceTag */
-			if(serialize_ServiceTagType( &(type->ServiceTag),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceTag */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PaymentOptions*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=79;
-			/* encode start element PaymentOptions */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PaymentOptions */
-			if(serialize_PaymentOptionsType( &(type->PaymentOptions),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PaymentOptions */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.ServiceCharge)
-		{
-
-			/* element ID assignment of ServiceCharge*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=114;
-			/* encode start element ServiceCharge */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceCharge */
-			if(serialize_ServiceChargeType( (type->ServiceCharge),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceCharge */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServiceCertificate)
-		{
-
-			/* element ID assignment of ServiceCertificate*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=112;
-			/* encode start element ServiceCertificate */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceCertificate */
-			if(serialize_ServiceCertificateType( (type->ServiceCertificate),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceCertificate */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServiceCustom)
-		{
-
-			/* element ID assignment of ServiceCustom*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=116;
-			/* encode start element ServiceCustom */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceCustom */
-			if(serialize_ServiceCustomType( (type->ServiceCustom),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceCustom */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServiceRCS)
-		{
-
-			/* element ID assignment of ServiceRCS*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=124;
-			/* encode start element ServiceRCS */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceRCS */
-			if(serialize_ServiceRCSType( (type->ServiceRCS),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceRCS */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServiceInternet)
-		{
-
-			/* element ID assignment of ServiceInternet*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=121;
-			/* encode start element ServiceInternet */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceInternet */
-			if(serialize_ServiceInternetType( (type->ServiceInternet),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceInternet */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_ServicePaymentSelectionReqType(struct ServicePaymentSelectionReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of SelectedPaymentOption*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=95;
-			/* encode start element SelectedPaymentOption */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->SelectedPaymentOption;
-
-			/* encode character  SelectedPaymentOption */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of SelectedPaymentOption */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ServiceList*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=105;
-			/* encode start element ServiceList */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceList */
-			if(serialize_ServiceTagListType( &(type->ServiceList),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceList */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ServicePaymentSelectionResType(struct ServicePaymentSelectionResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_SubCertificatesType(struct SubCertificatesType* type, struct EXIService* service)
-{
-
-			size_t i_loop;
-
-	for(i_loop=0;i_loop < type->arraylen.Certificate;i_loop++)
-		{
-
-			/* element ID assignment of Certificate*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=13;
-			/* encode start element Certificate */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->Certificate[i_loop].arraylen.data;
-		service->val.binary.data= type->Certificate[i_loop].data;
-
-		/* encode character  Certificate */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of Certificate */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_CertificateChainType(struct CertificateChainType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of Certificate*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=13;
-			/* encode start element Certificate */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->Certificate.arraylen.data;
-		service->val.binary.data= type->Certificate.data;
-
-		/* encode character  Certificate */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of Certificate */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.SubCertificates)
-		{
-
-			/* element ID assignment of SubCertificates*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=137;
-			/* encode start element SubCertificates */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of SubCertificates */
-			if(serialize_SubCertificatesType( &(type->SubCertificates),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of SubCertificates */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_PaymentDetailsReqType(struct PaymentDetailsReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ContractID*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=30;
-			/* encode start element ContractID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->ContractID.arraylen.data;
-			service->val.string.codepoints = type->ContractID.data;
-
-			/* encode character  ContractID */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of ContractID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractSignatureCertChain*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=31;
-			/* encode start element ContractSignatureCertChain */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ContractSignatureCertChain */
-			if(serialize_CertificateChainType( &(type->ContractSignatureCertChain),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ContractSignatureCertChain */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_PaymentDetailsResType(struct PaymentDetailsResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of GenChallenge*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=51;
-			/* encode start element GenChallenge */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->GenChallenge.arraylen.data;
-			service->val.string.codepoints = type->GenChallenge.data;
-
-			/* encode character  GenChallenge */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of GenChallenge */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of TCurrent*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=118;
-			/* encode start element TCurrent */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int32=type->TCurrent;
-			service->val.integer.type = INTEGER_32;
-
-			/* encode character  TCurrent */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of TCurrent */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ContractAuthenticationReqType(struct ContractAuthenticationReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of GenChallenge*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=51;
-			/* encode start element GenChallenge */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->GenChallenge.arraylen.data;
-			service->val.string.codepoints = type->GenChallenge.data;
-
-			/* encode character  GenChallenge */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of GenChallenge */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ContractAuthenticationResType(struct ContractAuthenticationResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_AC_PEVStatusType(struct AC_PEVStatusType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ConnectorLocked*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=21;
-			/* encode start element ConnectorLocked */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->ConnectorLocked;
-
-			/* encode character  ConnectorLocked */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ConnectorLocked */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVStandby*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=98;
-			/* encode start element PEVStandby */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->PEVStandby;
-
-			/* encode character  PEVStandby */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of PEVStandby */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_FloatingValueType(struct FloatingValueType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of Multiplier*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=77;
-			/* encode start element Multiplier */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = NBIT_UNSIGNED_INTEGER;
-			service->val.integer.val.int8=type->Multiplier;
-			service->val.integer.type = INTEGER_8;
-
-			/* encode character  Multiplier */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of Multiplier */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of Unit*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=151;
-			/* encode start element Unit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->Unit;
-
-			/* encode character  Unit */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of Unit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of Value*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=152;
-			/* encode start element Value */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int16=type->Value;
-			service->val.integer.type = INTEGER_16;
-
-			/* encode character  Value */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of Value */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_AC_PEVChargeParameterType(struct AC_PEVChargeParameterType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of AC_PEVStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=8;
-			/* encode start element AC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_PEVStatus */
-			if(serialize_AC_PEVStatusType( &(type->AC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EoC*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=66;
-			/* encode start element EoC */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int32=type->EoC;
-			service->val.integer.type = INTEGER_32;
-
-			/* encode character  EoC */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of EoC */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EAmount*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=39;
-			/* encode start element EAmount */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EAmount */
-			if(serialize_FloatingValueType( &(type->EAmount),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EAmount */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVMaxPower*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=85;
-			/* encode start element PEVMaxPower */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVMaxPower */
-			if(serialize_FloatingValueType( &(type->PEVMaxPower),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVMaxPower */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVMaxPhases*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=84;
-			/* encode start element PEVMaxPhases */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = NBIT_UNSIGNED_INTEGER;
-			service->val.integer.val.int8=type->PEVMaxPhases;
-			service->val.integer.type = INTEGER_8;
-
-			/* encode character  PEVMaxPhases */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of PEVMaxPhases */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVMaxVoltage*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=86;
-			/* encode start element PEVMaxVoltage */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVMaxVoltage */
-			if(serialize_FloatingValueType( &(type->PEVMaxVoltage),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVMaxVoltage */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVMinVoltage*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=91;
-			/* encode start element PEVMinVoltage */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVMinVoltage */
-			if(serialize_FloatingValueType( &(type->PEVMinVoltage),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVMinVoltage */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVMaxCurrent*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=83;
-			/* encode start element PEVMaxCurrent */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVMaxCurrent */
-			if(serialize_FloatingValueType( &(type->PEVMaxCurrent),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVMaxCurrent */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVMinCurrent*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=90;
-			/* encode start element PEVMinCurrent */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVMinCurrent */
-			if(serialize_FloatingValueType( &(type->PEVMinCurrent),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVMinCurrent */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_DC_PEVStatusType(struct DC_PEVStatusType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of PEVStandby*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=98;
-			/* encode start element PEVStandby */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->PEVStandby;
-
-			/* encode character  PEVStandby */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of PEVStandby */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ConnectorLocked*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=21;
-			/* encode start element ConnectorLocked */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->ConnectorLocked;
-
-			/* encode character  ConnectorLocked */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ConnectorLocked */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVReady*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=96;
-			/* encode start element PEVReady */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->PEVReady;
-
-			/* encode character  PEVReady */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of PEVReady */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVStatusCode*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=100;
-			/* encode start element PEVStatusCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->PEVStatusCode;
-
-			/* encode character  PEVStatusCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of PEVStatusCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVRESSSOC*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=95;
-			/* encode start element PEVRESSSOC */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = NBIT_UNSIGNED_INTEGER;
-			service->val.integer.val.int8=type->PEVRESSSOC;
-			service->val.integer.type = INTEGER_8;
-
-			/* encode character  PEVRESSSOC */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of PEVRESSSOC */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_DC_PEVChargeParameterType(struct DC_PEVChargeParameterType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of DC_PEVStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=35;
-			/* encode start element DC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_PEVStatus */
-			if(serialize_DC_PEVStatusType( &(type->DC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVMaximumCurrentLimit*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=87;
-			/* encode start element PEVMaximumCurrentLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVMaximumCurrentLimit */
-			if(serialize_FloatingValueType( &(type->PEVMaximumCurrentLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVMaximumCurrentLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.PEVMaximumPowerLimit)
-		{
-
-			/* element ID assignment of PEVMaximumPowerLimit*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=88;
-			/* encode start element PEVMaximumPowerLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVMaximumPowerLimit */
-			if(serialize_FloatingValueType( &(type->PEVMaximumPowerLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVMaximumPowerLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of PEVMaximumVoltageLimit*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=89;
-			/* encode start element PEVMaximumVoltageLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVMaximumVoltageLimit */
-			if(serialize_FloatingValueType( &(type->PEVMaximumVoltageLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVMaximumVoltageLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.PEVEnergyCapacity)
-		{
-
-			/* element ID assignment of PEVEnergyCapacity*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=81;
-			/* encode start element PEVEnergyCapacity */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVEnergyCapacity */
-			if(serialize_FloatingValueType( &(type->PEVEnergyCapacity),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVEnergyCapacity */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.PEVEnergyRequest)
-		{
-
-			/* element ID assignment of PEVEnergyRequest*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=82;
-			/* encode start element PEVEnergyRequest */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVEnergyRequest */
-			if(serialize_FloatingValueType( &(type->PEVEnergyRequest),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVEnergyRequest */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.FullSOC)
-		{
-
-			/* element ID assignment of FullSOC*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=71;
-			/* encode start element FullSOC */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = NBIT_UNSIGNED_INTEGER;
-			service->val.integer.val.int8=type->FullSOC;
-			service->val.integer.type = INTEGER_8;
-
-			/* encode character  FullSOC */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of FullSOC */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.BulkSOC)
-		{
-
-			/* element ID assignment of BulkSOC*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=12;
-			/* encode start element BulkSOC */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = NBIT_UNSIGNED_INTEGER;
-			service->val.integer.val.int8=type->BulkSOC;
-			service->val.integer.type = INTEGER_8;
-
-			/* encode character  BulkSOC */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of BulkSOC */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of PEVProtocolVersion*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=94;
-			/* encode start element PEVProtocolVersion */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = NBIT_UNSIGNED_INTEGER;
-			service->val.integer.val.int8=type->PEVProtocolVersion;
-			service->val.integer.type = INTEGER_8;
-
-			/* encode character  PEVProtocolVersion */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of PEVProtocolVersion */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ChargeParameterDiscoveryReqType(struct ChargeParameterDiscoveryReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of PEVRequestedEnergyTransferType*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=73;
-			/* encode start element PEVRequestedEnergyTransferType */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->PEVRequestedEnergyTransferType;
-
-			/* encode character  PEVRequestedEnergyTransferType */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of PEVRequestedEnergyTransferType */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.AC_PEVChargeParameter)
-		{
-
-			/* element ID assignment of AC_PEVChargeParameter*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=4;
-			/* encode start element AC_PEVChargeParameter */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_PEVChargeParameter */
-			if(serialize_AC_PEVChargeParameterType( (type->AC_PEVChargeParameter),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_PEVChargeParameter */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.DC_PEVChargeParameter)
-		{
-
-			/* element ID assignment of DC_PEVChargeParameter*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=30;
-			/* encode start element DC_PEVChargeParameter */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_PEVChargeParameter */
-			if(serialize_DC_PEVChargeParameterType( (type->DC_PEVChargeParameter),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_PEVChargeParameter */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_TariffEntryType(struct TariffEntryType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of TariffStart*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=149;
-			/* encode start element TariffStart */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = UNSIGNED_INTEGER;
-			service->val.integer.val.uint32=type->TariffStart;
-			service->val.integer.type = UNSIGNED_INTEGER_32;
-
-			/* encode character  TariffStart */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of TariffStart */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of TariffPMax*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=148;
-			/* encode start element TariffPMax */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int16=type->TariffPMax;
-			service->val.integer.type = INTEGER_16;
-
-			/* encode character  TariffPMax */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of TariffPMax */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.EPrice)
-		{
-
-			/* element ID assignment of EPrice*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=40;
-			/* encode start element EPrice */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->EPrice.arraylen.data;
-			service->val.string.codepoints = type->EPrice.data;
-
-			/* encode character  EPrice */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of EPrice */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_TariffEntriesType(struct TariffEntriesType* type, struct EXIService* service)
-{
-
-			size_t i_loop;
-
-	for(i_loop=0;i_loop < type->arraylen.TariffEntry;i_loop++)
-		{
-
-			/* element ID assignment of TariffEntry*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=145;
-			/* encode start element TariffEntry */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of TariffEntry */
-			if(serialize_TariffEntryType(&(type->TariffEntry[i_loop]),service))
-			{
-				return -1;
-			}
-
-
-			/* encode end element of TariffEntry */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_TariffDescrType(struct TariffDescrType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of TariffID*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=147;
-			/* encode start element TariffID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int16=type->TariffID;
-			service->val.integer.type = INTEGER_16;
-
-			/* encode character  TariffID */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of TariffID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.TariffDescription)
-		{
-
-			/* element ID assignment of TariffDescription*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=142;
-			/* encode start element TariffDescription */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->TariffDescription;
-
-			/* encode character  TariffDescription */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of TariffDescription */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of TariffEntries*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=143;
-			/* encode start element TariffEntries */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of TariffEntries */
-			if(serialize_TariffEntriesType( &(type->TariffEntries),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of TariffEntries */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_TariffTableType(struct TariffTableType* type, struct EXIService* service)
-{
-
-			size_t i_loop;
-
-			/* element ID assignment of Currency*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=22;
-			/* encode start element Currency */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->Currency;
-
-			/* encode character  Currency */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of Currency */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	for(i_loop=0;i_loop < type->arraylen.Tariff;i_loop++)
-		{
-
-			/* element ID assignment of Tariff*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=140;
-			/* encode start element Tariff */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of Tariff */
-			if(serialize_TariffDescrType(&(type->Tariff[i_loop]),service))
-			{
-				return -1;
-			}
-
-
-			/* encode end element of Tariff */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of EPriceUnit*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=43;
-			/* encode start element EPriceUnit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->EPriceMultiplier;
-
-			/* encode character  EPriceUnit */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of EPriceUnit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EPriceMultiplier*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=41;
-			/* encode start element EPriceMultiplier */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = NBIT_UNSIGNED_INTEGER;
-			service->val.integer.val.int8=type->EPriceMultiplier;
-			service->val.integer.type = INTEGER_8;
-
-			/* encode character  EPriceMultiplier */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of EPriceMultiplier */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_AC_EVSEStatusType(struct AC_EVSEStatusType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of EVSEStandby*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=60;
-			/* encode start element EVSEStandby */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->EVSEStandby;
-
-			/* encode character  EVSEStandby */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of EVSEStandby */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ConnectorLocked*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=21;
-			/* encode start element ConnectorLocked */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->ConnectorLocked;
-
-			/* encode character  ConnectorLocked */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ConnectorLocked */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PowerSwitchClosed*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=104;
-			/* encode start element PowerSwitchClosed */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->PowerSwitchClosed;
-
-			/* encode character  PowerSwitchClosed */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of PowerSwitchClosed */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of RCD*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=108;
-			/* encode start element RCD */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->RCD;
-
-			/* encode character  RCD */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of RCD */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ShutDownTime*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=134;
-			/* encode start element ShutDownTime */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int32=type->ShutDownTime;
-			service->val.integer.type = INTEGER_32;
-
-			/* encode character  ShutDownTime */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ShutDownTime */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of StopCharging*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=136;
-			/* encode start element StopCharging */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->StopCharging;
-
-			/* encode character  StopCharging */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of StopCharging */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_AC_EVSEChargeParameterType(struct AC_EVSEChargeParameterType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of AC_EVSEStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=2;
-			/* encode start element AC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_EVSEStatus */
-			if(serialize_AC_EVSEStatusType( &(type->AC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEMaxVoltage*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=50;
-			/* encode start element EVSEMaxVoltage */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMaxVoltage */
-			if(serialize_FloatingValueType( &(type->EVSEMaxVoltage),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMaxVoltage */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEMinVoltage*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=55;
-			/* encode start element EVSEMinVoltage */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMinVoltage */
-			if(serialize_FloatingValueType( &(type->EVSEMinVoltage),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMinVoltage */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEMaxCurrent*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=48;
-			/* encode start element EVSEMaxCurrent */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMaxCurrent */
-			if(serialize_FloatingValueType( &(type->EVSEMaxCurrent),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMaxCurrent */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEMinCurrent*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=54;
-			/* encode start element EVSEMinCurrent */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMinCurrent */
-			if(serialize_FloatingValueType( &(type->EVSEMinCurrent),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMinCurrent */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEMaxPhases*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=49;
-			/* encode start element EVSEMaxPhases */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = NBIT_UNSIGNED_INTEGER;
-			service->val.integer.val.int8=type->EVSEMaxPhases;
-			service->val.integer.type = INTEGER_8;
-
-			/* encode character  EVSEMaxPhases */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of EVSEMaxPhases */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_DC_EVSEStatusType(struct DC_EVSEStatusType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of EVSEStandby*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=60;
-			/* encode start element EVSEStandby */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->EVSEStandby;
-
-			/* encode character  EVSEStandby */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of EVSEStandby */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEStatusCode*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=62;
-			/* encode start element EVSEStatusCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->EVSEStatusCode;
-
-			/* encode character  EVSEStatusCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of EVSEStatusCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_DC_EVSEChargeParameterType(struct DC_EVSEChargeParameterType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of DC_EVSEStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=27;
-			/* encode start element DC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_EVSEStatus */
-			if(serialize_DC_EVSEStatusType( &(type->DC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEMaximumCurrentLimit*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=51;
-			/* encode start element EVSEMaximumCurrentLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMaximumCurrentLimit */
-			if(serialize_FloatingValueType( &(type->EVSEMaximumCurrentLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMaximumCurrentLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.EVSEMaximumPowerLimit)
-		{
-
-			/* element ID assignment of EVSEMaximumPowerLimit*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=52;
-			/* encode start element EVSEMaximumPowerLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMaximumPowerLimit */
-			if(serialize_FloatingValueType( &(type->EVSEMaximumPowerLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMaximumPowerLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of EVSEMaximumVoltageLimit*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=53;
-			/* encode start element EVSEMaximumVoltageLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMaximumVoltageLimit */
-			if(serialize_FloatingValueType( &(type->EVSEMaximumVoltageLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMaximumVoltageLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEMinimumCurrentLimit*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=56;
-			/* encode start element EVSEMinimumCurrentLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMinimumCurrentLimit */
-			if(serialize_FloatingValueType( &(type->EVSEMinimumCurrentLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMinimumCurrentLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEMinimumVoltageLimit*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=57;
-			/* encode start element EVSEMinimumVoltageLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMinimumVoltageLimit */
-			if(serialize_FloatingValueType( &(type->EVSEMinimumVoltageLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMinimumVoltageLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.EVSECurrentRegulationTolerance)
-		{
-
-			/* element ID assignment of EVSECurrentRegulationTolerance*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=46;
-			/* encode start element EVSECurrentRegulationTolerance */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSECurrentRegulationTolerance */
-			if(serialize_FloatingValueType( &(type->EVSECurrentRegulationTolerance),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSECurrentRegulationTolerance */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of EVSEPeakCurrentRipple*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=58;
-			/* encode start element EVSEPeakCurrentRipple */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEPeakCurrentRipple */
-			if(serialize_FloatingValueType( &(type->EVSEPeakCurrentRipple),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEPeakCurrentRipple */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.EVSEEnergyToBeDelivered)
-		{
-
-			/* element ID assignment of EVSEEnergyToBeDelivered*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=47;
-			/* encode start element EVSEEnergyToBeDelivered */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEEnergyToBeDelivered */
-			if(serialize_FloatingValueType( &(type->EVSEEnergyToBeDelivered),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEEnergyToBeDelivered */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of EVSEProtocolVersion*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=59;
-			/* encode start element EVSEProtocolVersion */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = NBIT_UNSIGNED_INTEGER;
-			service->val.integer.val.int8=type->EVSEProtocolVersion;
-			service->val.integer.type = INTEGER_8;
-
-			/* encode character  EVSEProtocolVersion */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of EVSEProtocolVersion */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ChargeParameterDiscoveryResType(struct ChargeParameterDiscoveryResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.EnergyProvider)
-		{
-
-			/* element ID assignment of EnergyProvider*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=50;
-			/* encode start element EnergyProvider */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->EnergyProvider.arraylen.data;
-			service->val.string.codepoints = type->EnergyProvider.data;
-
-			/* encode character  EnergyProvider */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of EnergyProvider */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.TariffTable)
-		{
-
-			/* element ID assignment of TariffTable*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=120;
-			/* encode start element TariffTable */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of TariffTable */
-			if(serialize_TariffTableType( &(type->TariffTable),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of TariffTable */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.AC_EVSEChargeParameter)
-		{
-
-			/* element ID assignment of AC_EVSEChargeParameter*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=0;
-			/* encode start element AC_EVSEChargeParameter */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_EVSEChargeParameter */
-			if(serialize_AC_EVSEChargeParameterType( (type->AC_EVSEChargeParameter),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_EVSEChargeParameter */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.DC_EVSEChargeParameter)
-		{
-
-			/* element ID assignment of DC_EVSEChargeParameter*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=25;
-			/* encode start element DC_EVSEChargeParameter */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_EVSEChargeParameter */
-			if(serialize_DC_EVSEChargeParameterType( (type->DC_EVSEChargeParameter),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_EVSEChargeParameter */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_ProfileEntryType(struct ProfileEntryType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ChargingProfileEntryStart*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=19;
-			/* encode start element ChargingProfileEntryStart */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int32=type->ChargingProfileEntryStart;
-			service->val.integer.type = INTEGER_32;
-
-			/* encode character  ChargingProfileEntryStart */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ChargingProfileEntryStart */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ChargingProfileEntryMaxPower*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=18;
-			/* encode start element ChargingProfileEntryMaxPower */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int16=type->ChargingProfileEntryMaxPower;
-			service->val.integer.type = INTEGER_16;
-
-			/* encode character  ChargingProfileEntryMaxPower */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ChargingProfileEntryMaxPower */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_ChargingProfileType(struct ChargingProfileType* type, struct EXIService* service)
-{
-
-			size_t i_loop;
-
-	for(i_loop=0;i_loop < type->arraylen.ProfileEntry;i_loop++)
-		{
-
-			/* element ID assignment of ProfileEntry*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=105;
-			/* encode start element ProfileEntry */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ProfileEntry */
-			if(serialize_ProfileEntryType(&(type->ProfileEntry[i_loop]),service))
-			{
-				return -1;
-			}
-
-
-			/* encode end element of ProfileEntry */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_AC_PEVPowerDeliveryParameterType(struct AC_PEVPowerDeliveryParameterType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of AC_PEVStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=8;
-			/* encode start element AC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_PEVStatus */
-			if(serialize_AC_PEVStatusType( &(type->AC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_DC_PEVPowerDeliveryParameterType(struct DC_PEVPowerDeliveryParameterType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of DC_PEVStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=35;
-			/* encode start element DC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_PEVStatus */
-			if(serialize_DC_PEVStatusType( &(type->DC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.BulkChargingComplete)
-		{
-
-			/* element ID assignment of BulkChargingComplete*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=11;
-			/* encode start element BulkChargingComplete */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->BulkChargingComplete;
-
-			/* encode character  BulkChargingComplete */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of BulkChargingComplete */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of ChargingComplete*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=17;
-			/* encode start element ChargingComplete */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->ChargingComplete;
-
-			/* encode character  ChargingComplete */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ChargingComplete */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, struct EXIService* service)
-{
-
-	if(type->isused.Tariff)
-		{
-
-			/* element ID assignment of Tariff*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=119;
-			/* encode start element Tariff */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int16=type->Tariff;
-			service->val.integer.type = INTEGER_16;
-
-			/* encode character  Tariff */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of Tariff */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ChargingProfile)
-		{
-
-			/* element ID assignment of ChargingProfile*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=22;
-			/* encode start element ChargingProfile */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ChargingProfile */
-			if(serialize_ChargingProfileType( &(type->ChargingProfile),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ChargingProfile */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of ReqSwitchStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=92;
-			/* encode start element ReqSwitchStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->ReqSwitchStatus;
-
-			/* encode character  ReqSwitchStatus */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ReqSwitchStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.AC_PEVPowerDeliveryParameter)
-		{
-
-			/* element ID assignment of AC_PEVPowerDeliveryParameter*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=6;
-			/* encode start element AC_PEVPowerDeliveryParameter */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_PEVPowerDeliveryParameter */
-			if(serialize_AC_PEVPowerDeliveryParameterType( (type->AC_PEVPowerDeliveryParameter),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_PEVPowerDeliveryParameter */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.DC_PEVPowerDeliveryParameter)
-		{
-
-			/* element ID assignment of DC_PEVPowerDeliveryParameter*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=32;
-			/* encode start element DC_PEVPowerDeliveryParameter */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_PEVPowerDeliveryParameter */
-			if(serialize_DC_PEVPowerDeliveryParameterType( (type->DC_PEVPowerDeliveryParameter),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_PEVPowerDeliveryParameter */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_PowerDeliveryResType(struct PowerDeliveryResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.AC_EVSEStatus)
-		{
-
-			/* element ID assignment of AC_EVSEStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=2;
-			/* encode start element AC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_EVSEStatus */
-			if(serialize_AC_EVSEStatusType( (type->AC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.DC_EVSEStatus)
-		{
-
-			/* element ID assignment of DC_EVSEStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=27;
-			/* encode start element DC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_EVSEStatus */
-			if(serialize_DC_EVSEStatusType( (type->DC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_MeteringStatusReqType(struct MeteringStatusReqType* type, struct EXIService* service)
-{
-
-	if(type->isused.AC_PEVStatus)
-		{
-
-			/* element ID assignment of AC_PEVStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=8;
-			/* encode start element AC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_PEVStatus */
-			if(serialize_AC_PEVStatusType( (type->AC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.DC_PEVStatus)
-		{
-
-			/* element ID assignment of DC_PEVStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=35;
-			/* encode start element DC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_PEVStatus */
-			if(serialize_DC_PEVStatusType( (type->DC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_AnyType(struct AnyType* type, struct EXIService* service)
-{
-
-
-	return 0;
-}
-
-
-static int serialize_MeterInfoType(struct MeterInfoType* type, struct EXIService* service)
-{
-
-	if(type->isused.MeterID)
-		{
-
-			/* element ID assignment of MeterID*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=72;
-			/* encode start element MeterID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->MeterID.arraylen.data;
-			service->val.string.codepoints = type->MeterID.data;
-
-			/* encode character  MeterID */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of MeterID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.MeterPubKey)
-		{
-
-			/* element ID assignment of MeterPubKey*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=74;
-			/* encode start element MeterPubKey */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->MeterPubKey.arraylen.data;
-		service->val.binary.data= type->MeterPubKey.data;
-
-		/* encode character  MeterPubKey */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of MeterPubKey */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.MeterReading)
-		{
-
-			/* element ID assignment of MeterReading*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=75;
-			/* encode start element MeterReading */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of MeterReading */
-			if(serialize_FloatingValueType( &(type->MeterReading),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of MeterReading */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.SigMeterReading)
-		{
-
-			/* element ID assignment of SigMeterReading*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=135;
-			/* encode start element SigMeterReading */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of SigMeterReading */
-			if(serialize_AnyType( &(type->SigMeterReading),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of SigMeterReading */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.MeterStatus)
-		{
-
-			/* element ID assignment of MeterStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=76;
-			/* encode start element MeterStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int16=type->MeterStatus;
-			service->val.integer.type = INTEGER_16;
-
-			/* encode character  MeterStatus */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of MeterStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.TMeter)
-		{
-
-			/* element ID assignment of TMeter*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=139;
-			/* encode start element TMeter */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int32=type->TMeter;
-			service->val.integer.type = INTEGER_32;
-
-			/* encode character  TMeter */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of TMeter */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEID*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=41;
-			/* encode start element EVSEID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_HEX;
-		service->val.binary.len = type->EVSEID.arraylen.data;
-		service->val.binary.data= type->EVSEID.data;
-
-		/* encode character  EVSEID */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of EVSEID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of TCurrent*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=118;
-			/* encode start element TCurrent */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int32=type->TCurrent;
-			service->val.integer.type = INTEGER_32;
-
-			/* encode character  TCurrent */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of TCurrent */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEMaxPower*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=42;
-			/* encode start element EVSEMaxPower */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMaxPower */
-			if(serialize_FloatingValueType( &(type->EVSEMaxPower),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMaxPower */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.PCurrent)
-		{
-
-			/* element ID assignment of PCurrent*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=66;
-			/* encode start element PCurrent */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PCurrent */
-			if(serialize_FloatingValueType( &(type->PCurrent),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PCurrent */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.MeterInfo)
-		{
-
-			/* element ID assignment of MeterInfo*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=56;
-			/* encode start element MeterInfo */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of MeterInfo */
-			if(serialize_MeterInfoType( &(type->MeterInfo),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of MeterInfo */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.AC_EVSEStatus)
-		{
-
-			/* element ID assignment of AC_EVSEStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=2;
-			/* encode start element AC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_EVSEStatus */
-			if(serialize_AC_EVSEStatusType( (type->AC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.DC_EVSEStatus)
-		{
-
-			/* element ID assignment of DC_EVSEStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=27;
-			/* encode start element DC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_EVSEStatus */
-			if(serialize_DC_EVSEStatusType( (type->DC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, struct EXIService* service)
-{
-
-	if(type->isused.PEVID)
-		{
-
-			/* element ID assignment of PEVID*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=68;
-			/* encode start element PEVID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->PEVID.arraylen.data;
-			service->val.string.codepoints = type->PEVID.data;
-
-			/* encode character  PEVID */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of PEVID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of EVSEID*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=41;
-			/* encode start element EVSEID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_HEX;
-		service->val.binary.len = type->EVSEID.arraylen.data;
-		service->val.binary.data= type->EVSEID.data;
-
-		/* encode character  EVSEID */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of EVSEID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of SessionID*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=113;
-			/* encode start element SessionID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_HEX;
-		service->val.binary.len = type->SessionID.arraylen.data;
-		service->val.binary.data= type->SessionID.data;
-
-		/* encode character  SessionID */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of SessionID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of MeterInfo*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=56;
-			/* encode start element MeterInfo */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of MeterInfo */
-			if(serialize_MeterInfoType( &(type->MeterInfo),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of MeterInfo */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.TCurrent)
-		{
-
-			/* element ID assignment of TCurrent*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=118;
-			/* encode start element TCurrent */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int32=type->TCurrent;
-			service->val.integer.type = INTEGER_32;
-
-			/* encode character  TCurrent */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of TCurrent */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of Tariff*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=119;
-			/* encode start element Tariff */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = INTEGER;
-			service->val.integer.val.int16=type->Tariff;
-			service->val.integer.type = INTEGER_16;
-
-			/* encode character  Tariff */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of Tariff */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ReceiptSignature*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=88;
-			/* encode start element ReceiptSignature */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->ReceiptSignature.arraylen.data;
-		service->val.binary.data= type->ReceiptSignature.data;
-
-		/* encode character  ReceiptSignature */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of ReceiptSignature */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.AC_PEVStatus)
-		{
-
-			/* element ID assignment of AC_PEVStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=8;
-			/* encode start element AC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_PEVStatus */
-			if(serialize_AC_PEVStatusType( (type->AC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.DC_PEVStatus)
-		{
-
-			/* element ID assignment of DC_PEVStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=35;
-			/* encode start element DC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_PEVStatus */
-			if(serialize_DC_PEVStatusType( (type->DC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_MeteringReceiptResType(struct MeteringReceiptResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.AC_EVSEStatus)
-		{
-
-			/* element ID assignment of AC_EVSEStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=2;
-			/* encode start element AC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_EVSEStatus */
-			if(serialize_AC_EVSEStatusType( (type->AC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.DC_EVSEStatus)
-		{
-
-			/* element ID assignment of DC_EVSEStatus*/
-			service->eqn.namespaceURI=6;
-			service->eqn.localPart=27;
-			/* encode start element DC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_EVSEStatus */
-			if(serialize_DC_EVSEStatusType( (type->DC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_CertificateUpdateReqType(struct CertificateUpdateReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ContractSignatureCertChain*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=31;
-			/* encode start element ContractSignatureCertChain */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ContractSignatureCertChain */
-			if(serialize_CertificateChainType( &(type->ContractSignatureCertChain),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ContractSignatureCertChain */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractEncryptionCert*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=27;
-			/* encode start element ContractEncryptionCert */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->ContractEncryptionCert.arraylen.data;
-		service->val.binary.data= type->ContractEncryptionCert.data;
-
-		/* encode character  ContractEncryptionCert */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of ContractEncryptionCert */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractID*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=30;
-			/* encode start element ContractID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->ContractID.arraylen.data;
-			service->val.string.codepoints = type->ContractID.data;
-
-			/* encode character  ContractID */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of ContractID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_CertificateUpdateResType(struct CertificateUpdateResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractSignatureCertChain*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=31;
-			/* encode start element ContractSignatureCertChain */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ContractSignatureCertChain */
-			if(serialize_CertificateChainType( &(type->ContractSignatureCertChain),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ContractSignatureCertChain */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractSignaturePrivateKey*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=32;
-			/* encode start element ContractSignaturePrivateKey */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->ContractSignaturePrivateKey.arraylen.data;
-		service->val.binary.data= type->ContractSignaturePrivateKey.data;
-
-		/* encode character  ContractSignaturePrivateKey */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of ContractSignaturePrivateKey */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractEncryptionCertChain*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=28;
-			/* encode start element ContractEncryptionCertChain */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ContractEncryptionCertChain */
-			if(serialize_CertificateChainType( &(type->ContractEncryptionCertChain),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ContractEncryptionCertChain */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractEncryptionPrivateKey*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=29;
-			/* encode start element ContractEncryptionPrivateKey */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->ContractEncryptionPrivateKey.arraylen.data;
-		service->val.binary.data= type->ContractEncryptionPrivateKey.data;
-
-		/* encode character  ContractEncryptionPrivateKey */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of ContractEncryptionPrivateKey */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractID*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=30;
-			/* encode start element ContractID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->ContractID.arraylen.data;
-			service->val.string.codepoints = type->ContractID.data;
-
-			/* encode character  ContractID */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of ContractID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of RetryCounter*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=94;
-			/* encode start element RetryCounter */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = NBIT_UNSIGNED_INTEGER;
-			service->val.integer.val.int8=type->RetryCounter;
-			service->val.integer.type = INTEGER_8;
-
-			/* encode character  RetryCounter */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of RetryCounter */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_CertificateInstallationReqType(struct CertificateInstallationReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of OEMProvisioningCert*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=65;
-			/* encode start element OEMProvisioningCert */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->OEMProvisioningCert.arraylen.data;
-		service->val.binary.data= type->OEMProvisioningCert.data;
-
-		/* encode character  OEMProvisioningCert */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of OEMProvisioningCert */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_CertificateInstallationResType(struct CertificateInstallationResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractSignatureCertChain*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=31;
-			/* encode start element ContractSignatureCertChain */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ContractSignatureCertChain */
-			if(serialize_CertificateChainType( &(type->ContractSignatureCertChain),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ContractSignatureCertChain */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractSignaturePrivateKey*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=32;
-			/* encode start element ContractSignaturePrivateKey */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->ContractSignaturePrivateKey.arraylen.data;
-		service->val.binary.data= type->ContractSignaturePrivateKey.data;
-
-		/* encode character  ContractSignaturePrivateKey */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of ContractSignaturePrivateKey */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractEncryptionCertChain*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=28;
-			/* encode start element ContractEncryptionCertChain */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ContractEncryptionCertChain */
-			if(serialize_CertificateChainType( &(type->ContractEncryptionCertChain),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ContractEncryptionCertChain */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractEncryptionPrivateKey*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=29;
-			/* encode start element ContractEncryptionPrivateKey */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-			service->val.type = BINARY_BASE64;
-		service->val.binary.len = type->ContractEncryptionPrivateKey.arraylen.data;
-		service->val.binary.data= type->ContractEncryptionPrivateKey.data;
-
-		/* encode character  ContractEncryptionPrivateKey */
-		if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-		{
-
-				return -1;
-		}
-
-
-
-			/* encode end element of ContractEncryptionPrivateKey */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ContractID*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=30;
-			/* encode start element ContractID */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = STRING;
-			service->val.string.len = type->ContractID.arraylen.data;
-			service->val.string.codepoints = type->ContractID.data;
-
-			/* encode character  ContractID */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-					return -1;
-			}
-
-
-			/* encode end element of ContractID */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_LineLockReqType(struct LineLockReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of AC_PEVStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=1;
-			/* encode start element AC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_PEVStatus */
-			if(serialize_AC_PEVStatusType( &(type->AC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ReqLockStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=91;
-			/* encode start element ReqLockStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->ReqLockStatus;
-
-			/* encode character  ReqLockStatus */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ReqLockStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_LineLockResType(struct LineLockResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of AC_EVSEStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=0;
-			/* encode start element AC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of AC_EVSEStatus */
-			if(serialize_AC_EVSEStatusType( &(type->AC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of AC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_CableCheckReqType(struct CableCheckReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of DC_PEVStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=39;
-			/* encode start element DC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_PEVStatus */
-			if(serialize_DC_PEVStatusType( &(type->DC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_CableCheckResType(struct CableCheckResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of DC_EVSEStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=38;
-			/* encode start element DC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_EVSEStatus */
-			if(serialize_DC_EVSEStatusType( &(type->DC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_PreChargeReqType(struct PreChargeReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of DC_PEVStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=39;
-			/* encode start element DC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_PEVStatus */
-			if(serialize_DC_PEVStatusType( &(type->DC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVRESSVoltage*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=72;
-			/* encode start element PEVRESSVoltage */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVRESSVoltage */
-			if(serialize_FloatingValueType( &(type->PEVRESSVoltage),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVRESSVoltage */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVTargetVoltage*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=74;
-			/* encode start element PEVTargetVoltage */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVTargetVoltage */
-			if(serialize_FloatingValueType( &(type->PEVTargetVoltage),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVTargetVoltage */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of PEVDemandCurrent*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=67;
-			/* encode start element PEVDemandCurrent */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVDemandCurrent */
-			if(serialize_FloatingValueType( &(type->PEVDemandCurrent),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVDemandCurrent */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of VoltageDifferential*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=125;
-			/* encode start element VoltageDifferential */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of VoltageDifferential */
-			if(serialize_FloatingValueType( &(type->VoltageDifferential),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of VoltageDifferential */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_PreChargeResType(struct PreChargeResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of DC_EVSEStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=38;
-			/* encode start element DC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_EVSEStatus */
-			if(serialize_DC_EVSEStatusType( &(type->DC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEPresentVoltage*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=48;
-			/* encode start element EVSEPresentVoltage */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEPresentVoltage */
-			if(serialize_FloatingValueType( &(type->EVSEPresentVoltage),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEPresentVoltage */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_CurrentDemandReqType(struct CurrentDemandReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of DC_PEVStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=39;
-			/* encode start element DC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_PEVStatus */
-			if(serialize_DC_PEVStatusType( &(type->DC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of ChargeCurrentRequest*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=15;
-			/* encode start element ChargeCurrentRequest */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ChargeCurrentRequest */
-			if(serialize_FloatingValueType( &(type->ChargeCurrentRequest),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ChargeCurrentRequest */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.PEVMaximumVoltageLimit)
-		{
-
-			/* element ID assignment of PEVMaximumVoltageLimit*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=71;
-			/* encode start element PEVMaximumVoltageLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVMaximumVoltageLimit */
-			if(serialize_FloatingValueType( &(type->PEVMaximumVoltageLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVMaximumVoltageLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.PEVMaximumCurrentLimit)
-		{
-
-			/* element ID assignment of PEVMaximumCurrentLimit*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=69;
-			/* encode start element PEVMaximumCurrentLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVMaximumCurrentLimit */
-			if(serialize_FloatingValueType( &(type->PEVMaximumCurrentLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVMaximumCurrentLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.PEVMaximumPowerLimit)
-		{
-
-			/* element ID assignment of PEVMaximumPowerLimit*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=70;
-			/* encode start element PEVMaximumPowerLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVMaximumPowerLimit */
-			if(serialize_FloatingValueType( &(type->PEVMaximumPowerLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVMaximumPowerLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.BulkChargingComplete)
-		{
-
-			/* element ID assignment of BulkChargingComplete*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=2;
-			/* encode start element BulkChargingComplete */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->BulkChargingComplete;
-
-			/* encode character  BulkChargingComplete */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of BulkChargingComplete */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of ChargingComplete*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=21;
-			/* encode start element ChargingComplete */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->ChargingComplete;
-
-			/* encode character  ChargingComplete */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ChargingComplete */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.RemainingTimeToFullSoC)
-		{
-
-			/* element ID assignment of RemainingTimeToFullSoC*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=90;
-			/* encode start element RemainingTimeToFullSoC */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of RemainingTimeToFullSoC */
-			if(serialize_FloatingValueType( &(type->RemainingTimeToFullSoC),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of RemainingTimeToFullSoC */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.RemainingTimeToBulkSoC)
-		{
-
-			/* element ID assignment of RemainingTimeToBulkSoC*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=89;
-			/* encode start element RemainingTimeToBulkSoC */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of RemainingTimeToBulkSoC */
-			if(serialize_FloatingValueType( &(type->RemainingTimeToBulkSoC),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of RemainingTimeToBulkSoC */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-			/* element ID assignment of PEVTargetVoltage*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=74;
-			/* encode start element PEVTargetVoltage */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PEVTargetVoltage */
-			if(serialize_FloatingValueType( &(type->PEVTargetVoltage),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PEVTargetVoltage */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of CurrentDifferential*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=37;
-			/* encode start element CurrentDifferential */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of CurrentDifferential */
-			if(serialize_FloatingValueType( &(type->CurrentDifferential),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of CurrentDifferential */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of VoltageDifferential*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=125;
-			/* encode start element VoltageDifferential */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of VoltageDifferential */
-			if(serialize_FloatingValueType( &(type->VoltageDifferential),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of VoltageDifferential */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_CurrentDemandResType(struct CurrentDemandResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of DC_EVSEStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=38;
-			/* encode start element DC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_EVSEStatus */
-			if(serialize_DC_EVSEStatusType( &(type->DC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEPresentVoltage*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=48;
-			/* encode start element EVSEPresentVoltage */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEPresentVoltage */
-			if(serialize_FloatingValueType( &(type->EVSEPresentVoltage),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEPresentVoltage */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEPresentCurrent*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=47;
-			/* encode start element EVSEPresentCurrent */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEPresentCurrent */
-			if(serialize_FloatingValueType( &(type->EVSEPresentCurrent),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEPresentCurrent */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSECurrentLimitAchieved*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=40;
-			/* encode start element EVSECurrentLimitAchieved */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->EVSECurrentLimitAchieved;
-
-			/* encode character  EVSECurrentLimitAchieved */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of EVSECurrentLimitAchieved */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEVoltageLimitAchieved*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=49;
-			/* encode start element EVSEVoltageLimitAchieved */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->EVSEVoltageLimitAchieved;
-
-			/* encode character  EVSEVoltageLimitAchieved */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of EVSEVoltageLimitAchieved */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEPowerLimitAchieved*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=46;
-			/* encode start element EVSEPowerLimitAchieved */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = BOOLEAN;
-			service->val.boolean=type->EVSEPowerLimitAchieved;
-
-			/* encode character  EVSEPowerLimitAchieved */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of EVSEPowerLimitAchieved */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-	if(type->isused.EVSEMaximumVoltageLimit)
-		{
-
-			/* element ID assignment of EVSEMaximumVoltageLimit*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=45;
-			/* encode start element EVSEMaximumVoltageLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMaximumVoltageLimit */
-			if(serialize_FloatingValueType( &(type->EVSEMaximumVoltageLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMaximumVoltageLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.EVSEMaximumCurrentLimit)
-		{
-
-			/* element ID assignment of EVSEMaximumCurrentLimit*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=43;
-			/* encode start element EVSEMaximumCurrentLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMaximumCurrentLimit */
-			if(serialize_FloatingValueType( &(type->EVSEMaximumCurrentLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMaximumCurrentLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.EVSEMaximumPowerLimit)
-		{
-
-			/* element ID assignment of EVSEMaximumPowerLimit*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=44;
-			/* encode start element EVSEMaximumPowerLimit */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEMaximumPowerLimit */
-			if(serialize_FloatingValueType( &(type->EVSEMaximumPowerLimit),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEMaximumPowerLimit */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_WeldingDetectionReqType(struct WeldingDetectionReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of DC_PEVStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=39;
-			/* encode start element DC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_PEVStatus */
-			if(serialize_DC_PEVStatusType( &(type->DC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_WeldingDetectionResType(struct WeldingDetectionResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of DC_EVSEStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=38;
-			/* encode start element DC_EVSEStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_EVSEStatus */
-			if(serialize_DC_EVSEStatusType( &(type->DC_EVSEStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_EVSEStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEPresentVoltage*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=48;
-			/* encode start element EVSEPresentVoltage */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEPresentVoltage */
-			if(serialize_FloatingValueType( &(type->EVSEPresentVoltage),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEPresentVoltage */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_TerminateChargingReqType(struct TerminateChargingReqType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of DC_PEVStatus*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=39;
-			/* encode start element DC_PEVStatus */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of DC_PEVStatus */
-			if(serialize_DC_PEVStatusType( &(type->DC_PEVStatus),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of DC_PEVStatus */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_TerminateChargingResType(struct TerminateChargingResType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of ResponseCode*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=93;
-			/* encode start element ResponseCode */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			service->val.type = ENUMERATION;
-			service->val.enumeration=type->ResponseCode;
-
-			/* encode character  ResponseCode */
-			if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-			{
-
-				return -1;
-			}
-
-
-			/* encode end element of ResponseCode */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of EVSEPresentVoltage*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=48;
-			/* encode start element EVSEPresentVoltage */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of EVSEPresentVoltage */
-			if(serialize_FloatingValueType( &(type->EVSEPresentVoltage),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of EVSEPresentVoltage */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_BodyType(struct BodyType* type, struct EXIService* service)
-{
-
-	if(type->isused.SessionSetupReq)
-		{
-
-			/* element ID assignment of SessionSetupReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=114;
-			/* encode start element SessionSetupReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of SessionSetupReq */
-			if(serialize_SessionSetupReqType( (type->SessionSetupReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of SessionSetupReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.SessionSetupRes)
-		{
-
-			/* element ID assignment of SessionSetupRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=116;
-			/* encode start element SessionSetupRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of SessionSetupRes */
-			if(serialize_SessionSetupResType( (type->SessionSetupRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of SessionSetupRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServiceDiscoveryReq)
-		{
-
-			/* element ID assignment of ServiceDiscoveryReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=100;
-			/* encode start element ServiceDiscoveryReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceDiscoveryReq */
-			if(serialize_ServiceDiscoveryReqType( (type->ServiceDiscoveryReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceDiscoveryReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServiceDiscoveryRes)
-		{
-
-			/* element ID assignment of ServiceDiscoveryRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=102;
-			/* encode start element ServiceDiscoveryRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceDiscoveryRes */
-			if(serialize_ServiceDiscoveryResType( (type->ServiceDiscoveryRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceDiscoveryRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServiceDetailReq)
-		{
-
-			/* element ID assignment of ServiceDetailReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=96;
-			/* encode start element ServiceDetailReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceDetailReq */
-			if(serialize_ServiceDetailReqType( (type->ServiceDetailReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceDetailReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServiceDetailRes)
-		{
-
-			/* element ID assignment of ServiceDetailRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=98;
-			/* encode start element ServiceDetailRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServiceDetailRes */
-			if(serialize_ServiceDetailResType( (type->ServiceDetailRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServiceDetailRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServicePaymentSelectionReq)
-		{
-
-			/* element ID assignment of ServicePaymentSelectionReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=106;
-			/* encode start element ServicePaymentSelectionReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServicePaymentSelectionReq */
-			if(serialize_ServicePaymentSelectionReqType( (type->ServicePaymentSelectionReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServicePaymentSelectionReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ServicePaymentSelectionRes)
-		{
-
-			/* element ID assignment of ServicePaymentSelectionRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=108;
-			/* encode start element ServicePaymentSelectionRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ServicePaymentSelectionRes */
-			if(serialize_ServicePaymentSelectionResType( (type->ServicePaymentSelectionRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ServicePaymentSelectionRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.PaymentDetailsReq)
-		{
-
-			/* element ID assignment of PaymentDetailsReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=75;
-			/* encode start element PaymentDetailsReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PaymentDetailsReq */
-			if(serialize_PaymentDetailsReqType( (type->PaymentDetailsReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PaymentDetailsReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.PaymentDetailsRes)
-		{
-
-			/* element ID assignment of PaymentDetailsRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=77;
-			/* encode start element PaymentDetailsRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PaymentDetailsRes */
-			if(serialize_PaymentDetailsResType( (type->PaymentDetailsRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PaymentDetailsRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ContractAuthenticationReq)
-		{
-
-			/* element ID assignment of ContractAuthenticationReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=23;
-			/* encode start element ContractAuthenticationReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ContractAuthenticationReq */
-			if(serialize_ContractAuthenticationReqType( (type->ContractAuthenticationReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ContractAuthenticationReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ContractAuthenticationRes)
-		{
-
-			/* element ID assignment of ContractAuthenticationRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=25;
-			/* encode start element ContractAuthenticationRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ContractAuthenticationRes */
-			if(serialize_ContractAuthenticationResType( (type->ContractAuthenticationRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ContractAuthenticationRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ChargeParameterDiscoveryReq)
-		{
-
-			/* element ID assignment of ChargeParameterDiscoveryReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=16;
-			/* encode start element ChargeParameterDiscoveryReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ChargeParameterDiscoveryReq */
-			if(serialize_ChargeParameterDiscoveryReqType( (type->ChargeParameterDiscoveryReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ChargeParameterDiscoveryReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.ChargeParameterDiscoveryRes)
-		{
-
-			/* element ID assignment of ChargeParameterDiscoveryRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=18;
-			/* encode start element ChargeParameterDiscoveryRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of ChargeParameterDiscoveryRes */
-			if(serialize_ChargeParameterDiscoveryResType( (type->ChargeParameterDiscoveryRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of ChargeParameterDiscoveryRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.PowerDeliveryReq)
-		{
-
-			/* element ID assignment of PowerDeliveryReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=80;
-			/* encode start element PowerDeliveryReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PowerDeliveryReq */
-			if(serialize_PowerDeliveryReqType( (type->PowerDeliveryReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PowerDeliveryReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.PowerDeliveryRes)
-		{
-
-			/* element ID assignment of PowerDeliveryRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=82;
-			/* encode start element PowerDeliveryRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PowerDeliveryRes */
-			if(serialize_PowerDeliveryResType( (type->PowerDeliveryRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PowerDeliveryRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.MeteringStatusReq)
-		{
-
-			/* element ID assignment of MeteringStatusReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=61;
-			/* encode start element MeteringStatusReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of MeteringStatusReq */
-			if(serialize_MeteringStatusReqType( (type->MeteringStatusReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of MeteringStatusReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.MeteringStatusRes)
-		{
-
-			/* element ID assignment of MeteringStatusRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=63;
-			/* encode start element MeteringStatusRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of MeteringStatusRes */
-			if(serialize_MeteringStatusResType( (type->MeteringStatusRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of MeteringStatusRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.MeteringReceiptReq)
-		{
-
-			/* element ID assignment of MeteringReceiptReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=57;
-			/* encode start element MeteringReceiptReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of MeteringReceiptReq */
-			if(serialize_MeteringReceiptReqType( (type->MeteringReceiptReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of MeteringReceiptReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.MeteringReceiptRes)
-		{
-
-			/* element ID assignment of MeteringReceiptRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=59;
-			/* encode start element MeteringReceiptRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of MeteringReceiptRes */
-			if(serialize_MeteringReceiptResType( (type->MeteringReceiptRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of MeteringReceiptRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.CertificateUpdateReq)
-		{
-
-			/* element ID assignment of CertificateUpdateReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=11;
-			/* encode start element CertificateUpdateReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of CertificateUpdateReq */
-			if(serialize_CertificateUpdateReqType( (type->CertificateUpdateReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of CertificateUpdateReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.CertificateUpdateRes)
-		{
-
-			/* element ID assignment of CertificateUpdateRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=13;
-			/* encode start element CertificateUpdateRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of CertificateUpdateRes */
-			if(serialize_CertificateUpdateResType( (type->CertificateUpdateRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of CertificateUpdateRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.CertificateInstallationReq)
-		{
-
-			/* element ID assignment of CertificateInstallationReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=7;
-			/* encode start element CertificateInstallationReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of CertificateInstallationReq */
-			if(serialize_CertificateInstallationReqType( (type->CertificateInstallationReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of CertificateInstallationReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.CertificateInstallationRes)
-		{
-
-			/* element ID assignment of CertificateInstallationRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=9;
-			/* encode start element CertificateInstallationRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of CertificateInstallationRes */
-			if(serialize_CertificateInstallationResType( (type->CertificateInstallationRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of CertificateInstallationRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.LineLockReq)
-		{
-
-			/* element ID assignment of LineLockReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=52;
-			/* encode start element LineLockReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of LineLockReq */
-			if(serialize_LineLockReqType( (type->LineLockReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of LineLockReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.LineLockRes)
-		{
-
-			/* element ID assignment of LineLockRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=54;
-			/* encode start element LineLockRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of LineLockRes */
-			if(serialize_LineLockResType( (type->LineLockRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of LineLockRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.CableCheckReq)
-		{
-
-			/* element ID assignment of CableCheckReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=3;
-			/* encode start element CableCheckReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of CableCheckReq */
-			if(serialize_CableCheckReqType( (type->CableCheckReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of CableCheckReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.CableCheckRes)
-		{
-
-			/* element ID assignment of CableCheckRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=5;
-			/* encode start element CableCheckRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of CableCheckRes */
-			if(serialize_CableCheckResType( (type->CableCheckRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of CableCheckRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.PreChargeReq)
-		{
-
-			/* element ID assignment of PreChargeReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=84;
-			/* encode start element PreChargeReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PreChargeReq */
-			if(serialize_PreChargeReqType( (type->PreChargeReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PreChargeReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.PreChargeRes)
-		{
-
-			/* element ID assignment of PreChargeRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=86;
-			/* encode start element PreChargeRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of PreChargeRes */
-			if(serialize_PreChargeResType( (type->PreChargeRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of PreChargeRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.CurrentDemandReq)
-		{
-
-			/* element ID assignment of CurrentDemandReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=33;
-			/* encode start element CurrentDemandReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of CurrentDemandReq */
-			if(serialize_CurrentDemandReqType( (type->CurrentDemandReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of CurrentDemandReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.CurrentDemandRes)
-		{
-
-			/* element ID assignment of CurrentDemandRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=35;
-			/* encode start element CurrentDemandRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of CurrentDemandRes */
-			if(serialize_CurrentDemandResType( (type->CurrentDemandRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of CurrentDemandRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.WeldingDetectionReq)
-		{
-
-			/* element ID assignment of WeldingDetectionReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=126;
-			/* encode start element WeldingDetectionReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of WeldingDetectionReq */
-			if(serialize_WeldingDetectionReqType( (type->WeldingDetectionReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of WeldingDetectionReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.WeldingDetectionRes)
-		{
-
-			/* element ID assignment of WeldingDetectionRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=128;
-			/* encode start element WeldingDetectionRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of WeldingDetectionRes */
-			if(serialize_WeldingDetectionResType( (type->WeldingDetectionRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of WeldingDetectionRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.TerminateChargingReq)
-		{
-
-			/* element ID assignment of TerminateChargingReq*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=121;
-			/* encode start element TerminateChargingReq */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of TerminateChargingReq */
-			if(serialize_TerminateChargingReqType( (type->TerminateChargingReq),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of TerminateChargingReq */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-	if(type->isused.TerminateChargingRes)
-		{
-
-			/* element ID assignment of TerminateChargingRes*/
-			service->eqn.namespaceURI=5;
-			service->eqn.localPart=123;
-			/* encode start element TerminateChargingRes */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of TerminateChargingRes */
-			if(serialize_TerminateChargingResType( (type->TerminateChargingRes),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of TerminateChargingRes */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-		}
-
-
-	return 0;
-}
-
-
-static int serialize_AnonType_V2G_Message(struct AnonType_V2G_Message* type, struct EXIService* service)
-{
-
-			/* element ID assignment of Header*/
-			service->eqn.namespaceURI=7;
-			service->eqn.localPart=4;
-			/* encode start element Header */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of Header */
-			if(serialize_MessageHeaderType( (type->Header),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of Header */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-			/* element ID assignment of Body*/
-			service->eqn.namespaceURI=7;
-			service->eqn.localPart=0;
-			/* encode start element Body */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of Body */
-			if(serialize_BodyType( &(type->Body),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of Body */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-static int serialize_EXIDocumentType(struct EXIDocumentType* type, struct EXIService* service)
-{
-
-			/* element ID assignment of V2G_Message*/
-			service->eqn.namespaceURI=7;
-			service->eqn.localPart=5;
-			/* encode start element V2G_Message */
-			if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-			{
-					return -1;
-			}
-
-			/* encode children of V2G_Message */
-			if(serialize_AnonType_V2G_Message( &(type->V2G_Message),service))
-			{
-				return -1;
-			}
-
-
-
-			/* encode end element of V2G_Message */
-			exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-	return 0;
-}
-
-
-
-
-
-
- /* marshal data to EXI stream */
-static int serialize_message(struct EXIService* service)
- {
-
-
-	/* encode start document */
-	if (exiEncodeStartDocument(&(service->outStream), &(service->stateEncode)) )
-	{
-
-		return -1;
-	}
-
-	/* encode root element of V2G_Message */
-	if (serialize_EXIDocumentType(&(service->exiMsg), service))
-	{
-
-		return -1;
-	}
-
-
-	/* encode end document */
-	if (exiEncodeEndDocument(&(service->outStream), &(service->stateEncode))) {
-
-	return -1;
-	}
-
- 	return 0;
-
- }
-
-
-
-
-
-
-
-
-
-
-

+ 0 - 755
src/service/v2g_serviceDataTypes.c

@@ -1,755 +0,0 @@
-
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXISeGen</p>
- *
- ********************************************************************/
-
-
-#include "EXITypes.h"
-#include "v2g_serviceDataTypes.h"
-
-
-static  void init_sessionIDType(struct sessionIDType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_protocolVersionType(struct protocolVersionType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_SessionInformationType(struct SessionInformationType* type)
-{	
-	init_sessionIDType(&(type->SessionID));	
-	init_sessionIDType(&(type->ServiceSessionID));	
-	type->isused.ServiceSessionID=0;	
-	init_protocolVersionType(&(type->ProtocolVersion));	
-	type->isused.ProtocolVersion=0;
-
-}
-
-static  void init_faultMsgType(struct faultMsgType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_NotificationType(struct NotificationType* type)
-{		
-	type->isused.FaultCode=0;	
-	init_faultMsgType(&(type->FaultMsg));	
-	type->isused.FaultMsg=0;
-
-}
-
-static  void init_service_string(struct service_string* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_CanonicalizationMethodType(struct CanonicalizationMethodType* type)
-{	
-	init_service_string(&(type->attr_Algorithm));
-
-}
-
-static  void init_SignatureMethodType(struct SignatureMethodType* type)
-{	
-	init_service_string(&(type->attr_Algorithm));
-
-}
-
-static  void init_DigestMethodType(struct DigestMethodType* type)
-{	
-	init_service_string(&(type->attr_Algorithm));
-
-}
-
-static  void init_DigestValueType(struct DigestValueType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_ReferenceType(struct ReferenceType* type)
-{	
-	init_DigestMethodType(&(type->DigestMethod));	
-	init_DigestValueType(&(type->DigestValue));	
-	init_service_string(&(type->attr_URI));	
-
-}
-
-static  void init_SignedInfoType(struct SignedInfoType* type)
-{
-
-	init_CanonicalizationMethodType(&(type->CanonicalizationMethod));	
-	init_SignatureMethodType(&(type->SignatureMethod));	
-
-
-	init_ReferenceType(&(type->Reference));
-
-
-}
-
-static  void init_SignatureValueType(struct SignatureValueType* type)
-{	
-
-
-}
-
-static  void init_X509IssuerSerialType(struct X509IssuerSerialType* type)
-{	
-	init_service_string(&(type->X509IssuerName));	
-
-}
-
-static  void init_service_byte(struct service_byte* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_X509DataType(struct X509DataType* type)
-{	
-	init_X509IssuerSerialType(&(type->X509IssuerSerial));	
-	init_service_byte(&(type->X509SKI));	
-	init_service_string(&(type->X509SubjectName));	
-	init_service_byte(&(type->X509Certificate));	
-	init_service_byte(&(type->X509CRL));
-
-}
-
-static  void init_KeyInfoType(struct KeyInfoType* type)
-{	
-	init_X509DataType(&(type->X509Data));	
-	init_service_string(&(type->attr_Id));
-
-}
-
-static  void init_SignatureType(struct SignatureType* type)
-{	
-	/*
-	init_SignedInfoType(&(type->SignedInfo));	
-	init_SignatureValueType(&(type->SignatureValue));	
-	init_KeyInfoType(&(type->KeyInfo));	
-	type->isused.KeyInfo=0;	
-	init_service_string(&(type->attr_Id));
-*/
-}
-
-static  void init_SecurityType(struct SecurityType* type)
-{	
-	init_SignatureType(type->Signature);
-	type->isused.Signature=0;
-
-}
-
-static  void init_MessageHeaderType(struct MessageHeaderType* type)
-{	
-	init_SessionInformationType(&(type->SessionInformation));	
-	init_NotificationType(&(type->Notification));	
-	type->isused.Notification=0;	
-	init_SecurityType(&(type->Security));	
-	type->isused.Security=0;
-
-}
-
-static  void init_pevIDType(struct pevIDType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_SessionSetupReqType(struct SessionSetupReqType* type)
-{	
-	init_pevIDType(&(type->PEVID));	
-	type->isused.PEVID=0;
-
-}
-
-static  void init_evseIDType(struct evseIDType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_SessionSetupResType(struct SessionSetupResType* type)
-{		
-	init_evseIDType(&(type->EVSEID));	
-
-}
-
-static  void init_serviceScopeType(struct serviceScopeType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type)
-{	
-	init_serviceScopeType(&(type->ServiceScope));	
-	type->isused.ServiceScope=0;		
-	type->isused.ServiceType=0;
-
-}
-
-static  void init_PaymentOptionsType(struct PaymentOptionsType* type)
-{
-		
-	type->arraylen.PaymentOption=0;
-
-}
-
-static  void init_serviceIDType(struct serviceIDType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_serviceNameType(struct serviceNameType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_ServiceTagType(struct ServiceTagType* type)
-{	
-	init_serviceIDType(&(type->ServiceID));	
-	init_serviceNameType(&(type->ServiceName));	
-	type->isused.ServiceName=0;		
-	type->isused.ServiceCategory=0;	
-	init_serviceScopeType(&(type->ServiceScope));	
-	type->isused.ServiceScope=0;
-
-}
-
-static  void init_ServiceChargeType(struct ServiceChargeType* type)
-{	
-	init_ServiceTagType(&(type->ServiceTag));		
-
-}
-
-static  void init_ServiceTagListType(struct ServiceTagListType* type)
-{
-	int i_loop;
-		
-	for(i_loop=0; i_loop<32;i_loop++)
-	{
-		init_ServiceTagType(&(type->Service[i_loop]));
-	}
-	
-	type->arraylen.Service=0;
-
-}
-
-static  void init_ServiceDiscoveryResType(struct ServiceDiscoveryResType* type)
-{		
-	init_PaymentOptionsType(&(type->PaymentOptions));	
-	init_ServiceChargeType(&(type->ChargeService));	
-	init_ServiceTagListType(&(type->ServiceList));	
-	type->isused.ServiceList=0;
-
-}
-
-static  void init_ServiceDetailReqType(struct ServiceDetailReqType* type)
-{	
-	init_serviceIDType(&(type->ServiceID));
-
-}
-
-static  void init_ServiceCertificateType(struct ServiceCertificateType* type)
-{	
-	init_ServiceTagType(&(type->ServiceTag));			
-
-}
-
-static  void init_ServiceCustomType(struct ServiceCustomType* type)
-{	
-	init_ServiceTagType(&(type->ServiceTag));		
-
-}
-
-static  void init_ServiceRCSType(struct ServiceRCSType* type)
-{	
-	init_ServiceTagType(&(type->ServiceTag));		
-
-}
-
-static  void init_ServiceInternetType(struct ServiceInternetType* type)
-{	
-	init_ServiceTagType(&(type->ServiceTag));		
-
-}
-
-static  void init_ServiceDetailResType(struct ServiceDetailResType* type)
-{		
-	init_ServiceTagType(&(type->ServiceTag));	
-	init_PaymentOptionsType(&(type->PaymentOptions));		
-	type->isused.ServiceCharge=0;		
-	type->isused.ServiceCertificate=0;		
-	type->isused.ServiceCustom=0;		
-	type->isused.ServiceRCS=0;		
-	type->isused.ServiceInternet=0;
-
-}
-
-static  void init_ServicePaymentSelectionReqType(struct ServicePaymentSelectionReqType* type)
-{		
-	init_ServiceTagListType(&(type->ServiceList));
-
-}
-
-static  void init_contractIDType(struct contractIDType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_certificateType(struct certificateType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_SubCertificatesType(struct SubCertificatesType* type)
-{
-	int i_loop;
-		
-	for(i_loop=0; i_loop<5;i_loop++)
-	{
-		init_certificateType(&(type->Certificate[i_loop]));
-	}
-	
-	type->arraylen.Certificate=0;
-
-}
-
-static  void init_CertificateChainType(struct CertificateChainType* type)
-{	
-	init_certificateType(&(type->Certificate));	
-	init_SubCertificatesType(&(type->SubCertificates));	
-	type->isused.SubCertificates=0;
-
-}
-
-static  void init_PaymentDetailsReqType(struct PaymentDetailsReqType* type)
-{	
-	init_contractIDType(&(type->ContractID));	
-	init_CertificateChainType(&(type->ContractSignatureCertChain));
-
-}
-
-static  void init_genChallengeType(struct genChallengeType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_PaymentDetailsResType(struct PaymentDetailsResType* type)
-{		
-	init_genChallengeType(&(type->GenChallenge));	
-
-}
-
-static  void init_ContractAuthenticationReqType(struct ContractAuthenticationReqType* type)
-{	
-	init_genChallengeType(&(type->GenChallenge));
-
-}
-
-static  void init_AC_PEVChargeParameterType(struct AC_PEVChargeParameterType* type)
-{									
-
-}
-
-static  void init_DC_PEVChargeParameterType(struct DC_PEVChargeParameterType* type)
-{				
-	type->isused.PEVMaximumPowerLimit=0;			
-	type->isused.PEVEnergyCapacity=0;		
-	type->isused.PEVEnergyRequest=0;		
-	type->isused.FullSOC=0;		
-	type->isused.BulkSOC=0;	
-
-}
-
-static  void init_ChargeParameterDiscoveryReqType(struct ChargeParameterDiscoveryReqType* type)
-{			
-	type->isused.AC_PEVChargeParameter=0;		
-	type->isused.DC_PEVChargeParameter=0;
-
-}
-
-static  void init_energyProviderType(struct energyProviderType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_ePriceType(struct ePriceType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_TariffEntryType(struct TariffEntryType* type)
-{			
-	init_ePriceType(&(type->EPrice));	
-	type->isused.EPrice=0;
-
-}
-
-static  void init_TariffEntriesType(struct TariffEntriesType* type)
-{
-	int i_loop;
-		
-	for(i_loop=0; i_loop<8;i_loop++)
-	{
-		init_TariffEntryType(&(type->TariffEntry[i_loop]));
-	}
-	
-	type->arraylen.TariffEntry=0;
-
-}
-
-static  void init_TariffDescrType(struct TariffDescrType* type)
-{			
-	type->isused.TariffDescription=0;	
-	init_TariffEntriesType(&(type->TariffEntries));
-
-}
-
-static  void init_TariffTableType(struct TariffTableType* type)
-{
-	int i_loop;
-			
-	for(i_loop=0; i_loop<6;i_loop++)
-	{
-		init_TariffDescrType(&(type->Tariff[i_loop]));
-	}
-	
-	type->arraylen.Tariff=0;		
-
-}
-
-static  void init_AC_EVSEChargeParameterType(struct AC_EVSEChargeParameterType* type)
-{						
-
-}
-
-static  void init_DC_EVSEChargeParameterType(struct DC_EVSEChargeParameterType* type)
-{				
-	type->isused.EVSEMaximumPowerLimit=0;					
-	type->isused.EVSECurrentRegulationTolerance=0;			
-	type->isused.EVSEEnergyToBeDelivered=0;	
-
-}
-
-static  void init_ChargeParameterDiscoveryResType(struct ChargeParameterDiscoveryResType* type)
-{		
-	init_energyProviderType(&(type->EnergyProvider));	
-	type->isused.EnergyProvider=0;	
-	init_TariffTableType(&(type->TariffTable));	
-	type->isused.TariffTable=0;		
-	type->isused.AC_EVSEChargeParameter=0;		
-	type->isused.DC_EVSEChargeParameter=0;
-
-}
-
-static  void init_ChargingProfileType(struct ChargingProfileType* type)
-{
-
-	type->arraylen.ProfileEntry=0;
-
-}
-
-static  void init_AC_PEVPowerDeliveryParameterType(struct AC_PEVPowerDeliveryParameterType* type)
-{	
-
-}
-
-static  void init_DC_PEVPowerDeliveryParameterType(struct DC_PEVPowerDeliveryParameterType* type)
-{			
-	type->isused.BulkChargingComplete=0;	
-
-}
-
-static  void init_PowerDeliveryReqType(struct PowerDeliveryReqType* type)
-{		
-	type->isused.Tariff=0;	
-	init_ChargingProfileType(&(type->ChargingProfile));	
-	type->isused.ChargingProfile=0;			
-	type->isused.AC_PEVPowerDeliveryParameter=0;		
-	type->isused.DC_PEVPowerDeliveryParameter=0;
-
-}
-
-static  void init_PowerDeliveryResType(struct PowerDeliveryResType* type)
-{			
-	type->isused.AC_EVSEStatus=0;		
-	type->isused.DC_EVSEStatus=0;
-
-}
-
-static  void init_MeteringStatusReqType(struct MeteringStatusReqType* type)
-{		
-	type->isused.AC_PEVStatus=0;		
-	type->isused.DC_PEVStatus=0;
-
-}
-
-static  void init_meterIDType(struct meterIDType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_pubKeyType(struct pubKeyType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_MeterInfoType(struct MeterInfoType* type)
-{	
-	init_meterIDType(&(type->MeterID));	
-	type->isused.MeterID=0;	
-	init_pubKeyType(&(type->MeterPubKey));	
-	type->isused.MeterPubKey=0;		
-	type->isused.MeterReading=0;		
-	type->isused.SigMeterReading=0;		
-	type->isused.MeterStatus=0;		
-	type->isused.TMeter=0;
-
-}
-
-static  void init_MeteringStatusResType(struct MeteringStatusResType* type)
-{		
-	init_evseIDType(&(type->EVSEID));				
-	type->isused.PCurrent=0;	
-	init_MeterInfoType(&(type->MeterInfo));	
-	type->isused.MeterInfo=0;		
-	type->isused.AC_EVSEStatus=0;		
-	type->isused.DC_EVSEStatus=0;
-
-}
-
-static  void init_meterSignatureType(struct meterSignatureType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_MeteringReceiptReqType(struct MeteringReceiptReqType* type)
-{	
-	init_pevIDType(&(type->PEVID));	
-	type->isused.PEVID=0;	
-	init_evseIDType(&(type->EVSEID));	
-	init_sessionIDType(&(type->SessionID));	
-	init_MeterInfoType(&(type->MeterInfo));		
-	type->isused.TCurrent=0;		
-	init_meterSignatureType(&(type->ReceiptSignature));		
-	type->isused.AC_PEVStatus=0;		
-	type->isused.DC_PEVStatus=0;
-
-}
-
-static  void init_MeteringReceiptResType(struct MeteringReceiptResType* type)
-{			
-	type->isused.AC_EVSEStatus=0;		
-	type->isused.DC_EVSEStatus=0;
-
-}
-
-static  void init_CertificateUpdateReqType(struct CertificateUpdateReqType* type)
-{	
-	init_CertificateChainType(&(type->ContractSignatureCertChain));	
-	init_certificateType(&(type->ContractEncryptionCert));	
-	init_contractIDType(&(type->ContractID));
-
-}
-
-static  void init_signaturePrivateKeyType(struct signaturePrivateKeyType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_encryptionPrivateKeyType(struct encryptionPrivateKeyType* type)
-{	
-	type->arraylen.data=0;
-
-}
-
-static  void init_CertificateUpdateResType(struct CertificateUpdateResType* type)
-{		
-	init_CertificateChainType(&(type->ContractSignatureCertChain));	
-	init_signaturePrivateKeyType(&(type->ContractSignaturePrivateKey));	
-	init_CertificateChainType(&(type->ContractEncryptionCertChain));	
-	init_encryptionPrivateKeyType(&(type->ContractEncryptionPrivateKey));	
-	init_contractIDType(&(type->ContractID));	
-
-}
-
-static  void init_CertificateInstallationReqType(struct CertificateInstallationReqType* type)
-{	
-	init_certificateType(&(type->OEMProvisioningCert));
-
-}
-
-static  void init_CertificateInstallationResType(struct CertificateInstallationResType* type)
-{		
-	init_CertificateChainType(&(type->ContractSignatureCertChain));	
-	init_pubKeyType(&(type->ContractSignaturePrivateKey));	
-	init_CertificateChainType(&(type->ContractEncryptionCertChain));	
-	init_encryptionPrivateKeyType(&(type->ContractEncryptionPrivateKey));	
-	init_contractIDType(&(type->ContractID));
-
-}
-
-static  void init_LineLockReqType(struct LineLockReqType* type)
-{		
-
-}
-
-static  void init_LineLockResType(struct LineLockResType* type)
-{		
-
-}
-
-static  void init_CableCheckReqType(struct CableCheckReqType* type)
-{	
-
-}
-
-static  void init_CableCheckResType(struct CableCheckResType* type)
-{		
-
-}
-
-static  void init_PreChargeReqType(struct PreChargeReqType* type)
-{					
-
-}
-
-static  void init_PreChargeResType(struct PreChargeResType* type)
-{			
-
-}
-
-static  void init_CurrentDemandReqType(struct CurrentDemandReqType* type)
-{				
-	type->isused.PEVMaximumVoltageLimit=0;		
-	type->isused.PEVMaximumCurrentLimit=0;		
-	type->isused.PEVMaximumPowerLimit=0;		
-	type->isused.BulkChargingComplete=0;			
-	type->isused.RemainingTimeToFullSoC=0;		
-	type->isused.RemainingTimeToBulkSoC=0;			
-
-}
-
-static  void init_CurrentDemandResType(struct CurrentDemandResType* type)
-{									
-	type->isused.EVSEMaximumVoltageLimit=0;		
-	type->isused.EVSEMaximumCurrentLimit=0;		
-	type->isused.EVSEMaximumPowerLimit=0;
-
-}
-
-static  void init_WeldingDetectionReqType(struct WeldingDetectionReqType* type)
-{	
-
-}
-
-static  void init_WeldingDetectionResType(struct WeldingDetectionResType* type)
-{			
-
-}
-
-static  void init_TerminateChargingReqType(struct TerminateChargingReqType* type)
-{	
-
-}
-
-static  void init_TerminateChargingResType(struct TerminateChargingResType* type)
-{		
-
-}
-
-static  void init_BodyType(struct BodyType* type)
-{		
-	type->isused.SessionSetupReq=0;		
-	type->isused.SessionSetupRes=0;		
-	type->isused.ServiceDiscoveryReq=0;		
-	type->isused.ServiceDiscoveryRes=0;		
-	type->isused.ServiceDetailReq=0;		
-	type->isused.ServiceDetailRes=0;		
-	type->isused.ServicePaymentSelectionReq=0;		
-	type->isused.ServicePaymentSelectionRes=0;		
-	type->isused.PaymentDetailsReq=0;		
-	type->isused.PaymentDetailsRes=0;		
-	type->isused.ContractAuthenticationReq=0;		
-	type->isused.ContractAuthenticationRes=0;		
-	type->isused.ChargeParameterDiscoveryReq=0;		
-	type->isused.ChargeParameterDiscoveryRes=0;		
-	type->isused.PowerDeliveryReq=0;		
-	type->isused.PowerDeliveryRes=0;		
-	type->isused.MeteringStatusReq=0;		
-	type->isused.MeteringStatusRes=0;		
-	type->isused.MeteringReceiptReq=0;		
-	type->isused.MeteringReceiptRes=0;		
-	type->isused.CertificateUpdateReq=0;		
-	type->isused.CertificateUpdateRes=0;		
-	type->isused.CertificateInstallationReq=0;		
-	type->isused.CertificateInstallationRes=0;		
-	type->isused.LineLockReq=0;		
-	type->isused.LineLockRes=0;		
-	type->isused.CableCheckReq=0;		
-	type->isused.CableCheckRes=0;		
-	type->isused.PreChargeReq=0;		
-	type->isused.PreChargeRes=0;		
-	type->isused.CurrentDemandReq=0;		
-	type->isused.CurrentDemandRes=0;		
-	type->isused.WeldingDetectionReq=0;		
-	type->isused.WeldingDetectionRes=0;		
-	type->isused.TerminateChargingReq=0;		
-	type->isused.TerminateChargingRes=0;
-
-}
-
-static  void init_AnonType_V2G_Message(struct AnonType_V2G_Message* type)
-{		
-	init_BodyType(&(type->Body));
-
-}
-
-static  void init_EXIDocumentType(struct EXIDocumentType* type)
-{	
-	init_AnonType_V2G_Message(&(type->V2G_Message));
-
-}

+ 0 - 1814
src/service/v2g_serviceDataTypes.h

@@ -1,1814 +0,0 @@
-
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXISeGen</p>
- *
- ********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef SERVICEDATATYPES_H
-#define SERVICEDATATYPES_H
-
-#include "EXITypes.h"
-
-
-	
-
-enum faultCodeType
-{
-	ParsingError_faultCodeType, 
-	V2GProtocolVersionNotSupported_faultCodeType, 
-	NoTLSRootCertificatAvailable_faultCodeType, 
-	UnknownError_faultCodeType
-
-}; 
-
-enum responseCodeType
-{
-	OK_responseCodeType, 
-	FAILED_UnknownError_responseCodeType, 
-	OK_NewSessionEstablished_responseCodeType, 
-	OK_OldSessionJoined_responseCodeType, 
-	FAILED_UnknownSession_responseCodeType, 
-	FAILED_SessionEstablishmentError_responseCodeType, 
-	FAILED_NoServicesOfThisType_responseCodeType, 
-	FAILED_NoServicesInThisScope_responseCodeType, 
-	FAILED_NoServicesOfThisTypeScope_responseCodeType, 
-	FAILED_NoServicesFound_responseCodeType, 
-	FAILED_ServiceSelectionInvalid_responseCodeType, 
-	FAILED_PaymentSelectionInvalid_responseCodeType, 
-	FAILED_PaymentDetailsInvalid_responseCodeType, 
-	OK_CertificateExpiresSoon_responseCodeType, 
-	FAILED_CertificateExpired_responseCodeType, 
-	FAILED_CertificateRevoked_responseCodeType, 
-	FAILED_NoRootCertificate_responseCodeType, 
-	FAILED_CertificateCryptoError_responseCodeType, 
-	FAILED_SignatureError_responseCodeType, 
-	FAILED_NetworkError_responseCodeType, 
-	FAILED_ServerNotFoundError_responseCodeType, 
-	FAILED_TimeOut_responseCodeType, 
-	FAILED_NoCertificateAvailable_responseCodeType, 
-	FAILED_ContractCanceled_responseCodeType, 
-	FAILED_BatteryNotCompatible_responseCodeType, 
-	FAILED_LineLockNotApplied_responseCodeType, 
-	FAILED_PowerDeliveryNotApplied_responseCodeType, 
-	FAILED_TariffSelectionInvalid_responseCodeType, 
-	FAILED_ChargingProfileInvalid_responseCodeType, 
-	FAILED_EVSEPresentVoltageToLow_responseCodeType, 
-	FAILED_NotReady_responseCodeType, 
-	FAILED_PrepaidLimitsExceeded_responseCodeType, 
-	FAILED_ChargingSystemIncompatibility_responseCodeType, 
-	FAILED_EVSE_Malfunction_responseCodeType, 
-	NoData_responseCodeType
-
-}; 
-
-enum serviceCategoryType
-{
-	PEVRechargeCharge_serviceCategoryType, 
-	RemoteCustomerSupportRCS_serviceCategoryType, 
-	Internet_serviceCategoryType, 
-	ContractCertificateUpdate_serviceCategoryType, 
-	ContractCertificateInstalation_serviceCategoryType, 
-	OtherCustom_serviceCategoryType
-
-}; 
-
-enum paymentOptionType
-{
-	Contract_paymentOptionType, 
-	ExternalPayment_paymentOptionType
-
-}; 
-
-enum EVSESupportedEnergyTransferType
-{
-	AC_single_phase_core_EVSESupportedEnergyTransferType, 
-	AC_three_phase_core_EVSESupportedEnergyTransferType, 
-	DC_core_EVSESupportedEnergyTransferType, 
-	DC_extended_EVSESupportedEnergyTransferType, 
-	DC_combo_core_EVSESupportedEnergyTransferType, 
-	DC_dual_EVSESupportedEnergyTransferType, 
-	AC_core_DC_extended_EVSESupportedEnergyTransferType, 
-	AC_single_DC_core_EVSESupportedEnergyTransferType, 
-	AC_single_phase_three_phase_core_DC_extended_EVSESupportedEnergyTransferType, 
-	Reserved_9_EVSESupportedEnergyTransferType, 
-	Reserved_A_EVSESupportedEnergyTransferType, 
-	Reserved_B_EVSESupportedEnergyTransferType, 
-	Reserved_C_EVSESupportedEnergyTransferType, 
-	Reserved_D_EVSESupportedEnergyTransferType, 
-	Reserved_E_EVSESupportedEnergyTransferType, 
-	Undetermined_EVSESupportedEnergyTransferType
-
-}; 
-
-enum PEVRequestedEnergyTransferType
-{
-	AC_single_phase_core_PEVRequestedEnergyTransferType, 
-	AC_three_phase_core_PEVRequestedEnergyTransferType, 
-	DC_core_PEVRequestedEnergyTransferType, 
-	DC_extended_PEVRequestedEnergyTransferType, 
-	DC_combo_core_PEVRequestedEnergyTransferType, 
-	DC_unique_PEVRequestedEnergyTransferType, 
-	DC_reverse_PEVRequestedEnergyTransferType, 
-	AC_reverse_PEVRequestedEnergyTransferType, 
-	Reserved_8_PEVRequestedEnergyTransferType, 
-	Reserved_9_PEVRequestedEnergyTransferType, 
-	Reserved_A_PEVRequestedEnergyTransferType, 
-	Reserved_B_PEVRequestedEnergyTransferType, 
-	Reserved_C_PEVRequestedEnergyTransferType, 
-	Reserved_D_PEVRequestedEnergyTransferType, 
-	Reserved_E_PEVRequestedEnergyTransferType, 
-	Undetermined_PEVRequestedEnergyTransferType
-
-}; 
-
-enum unitSymbolType
-{
-	h_unitSymbolType, 
-	m_unitSymbolType, 
-	s_unitSymbolType, 
-	A_unitSymbolType, 
-	Ah_unitSymbolType, 
-	V_unitSymbolType, 
-	VA_unitSymbolType, 
-	W_unitSymbolType, 
-	W_s_unitSymbolType, 
-	Wh_unitSymbolType
-
-}; 
-
-enum DC_PEVStatusCodeType
-{
-	PEVNotReady_DC_PEVStatusCodeType, 
-	PEVEnergyTransfer_DC_PEVStatusCodeType, 
-	FAILED_RESSTemperatureInhibit_DC_PEVStatusCodeType, 
-	FAILED_PEVShiftPosition_DC_PEVStatusCodeType, 
-	FAILED_ChargerConnectorLockFault_DC_PEVStatusCodeType, 
-	PEVCabinConditioning_DC_PEVStatusCodeType, 
-	PEVRESSConditioning_DC_PEVStatusCodeType, 
-	FAILED_PEVRESSMalfunction_DC_PEVStatusCodeType, 
-	FAILED_ChargingCurrentdifferential_DC_PEVStatusCodeType, 
-	FAILED_ChargingVoltageOutOfRange_DC_PEVStatusCodeType, 
-	Reserved_A_DC_PEVStatusCodeType, 
-	Reserved_B_DC_PEVStatusCodeType, 
-	Reserved_C_DC_PEVStatusCodeType, 
-	FAILED_ChargingSystemIncompatibility_DC_PEVStatusCodeType, 
-	NoData_DC_PEVStatusCodeType
-
-}; 
-
-enum currencyType
-{
-	AED_currencyType, 
-	AFN_currencyType, 
-	ALL_currencyType, 
-	AMD_currencyType, 
-	ANG_currencyType, 
-	AOA_currencyType, 
-	ARS_currencyType, 
-	AUD_currencyType, 
-	AWG_currencyType, 
-	AZN_currencyType, 
-	BAM_currencyType, 
-	BBD_currencyType, 
-	BDT_currencyType, 
-	BGN_currencyType, 
-	BHD_currencyType, 
-	BIF_currencyType, 
-	BMD_currencyType, 
-	BND_currencyType, 
-	BOB_currencyType, 
-	BRL_currencyType, 
-	BSD_currencyType, 
-	BTN_currencyType, 
-	BWP_currencyType, 
-	BYR_currencyType, 
-	BZD_currencyType, 
-	CAD_currencyType, 
-	CDF_currencyType, 
-	CHF_currencyType, 
-	CLP_currencyType, 
-	CNY_currencyType, 
-	COP_currencyType, 
-	CRC_currencyType, 
-	CUP_currencyType, 
-	CVE_currencyType, 
-	CZK_currencyType, 
-	DJF_currencyType, 
-	DKK_currencyType, 
-	DOP_currencyType, 
-	DZD_currencyType, 
-	EEK_currencyType, 
-	EGP_currencyType, 
-	ERN_currencyType, 
-	ETB_currencyType, 
-	EUR_currencyType, 
-	FJD_currencyType, 
-	FKP_currencyType, 
-	GBP_currencyType, 
-	GEL_currencyType, 
-	GHS_currencyType, 
-	GIP_currencyType, 
-	GMD_currencyType, 
-	GNF_currencyType, 
-	GTQ_currencyType, 
-	GYD_currencyType, 
-	GWP_currencyType, 
-	HKD_currencyType, 
-	HNL_currencyType, 
-	HRK_currencyType, 
-	HTG_currencyType, 
-	HUF_currencyType, 
-	IDR_currencyType, 
-	ILS_currencyType, 
-	INR_currencyType, 
-	IQD_currencyType, 
-	IRR_currencyType, 
-	ISK_currencyType, 
-	JMD_currencyType, 
-	JOD_currencyType, 
-	JPY_currencyType, 
-	KES_currencyType, 
-	KGS_currencyType, 
-	KHR_currencyType, 
-	KMF_currencyType, 
-	KPW_currencyType, 
-	KRW_currencyType, 
-	KWD_currencyType, 
-	KYD_currencyType, 
-	KZT_currencyType, 
-	LAK_currencyType, 
-	LBP_currencyType, 
-	LKR_currencyType, 
-	LRD_currencyType, 
-	LSL_currencyType, 
-	LTL_currencyType, 
-	LVL_currencyType, 
-	LYD_currencyType, 
-	MAD_currencyType, 
-	MDL_currencyType, 
-	MGA_currencyType, 
-	MKD_currencyType, 
-	MMK_currencyType, 
-	MNT_currencyType, 
-	MOP_currencyType, 
-	MRO_currencyType, 
-	MUR_currencyType, 
-	MVR_currencyType, 
-	MWK_currencyType, 
-	MXN_currencyType, 
-	MYR_currencyType, 
-	MZN_currencyType, 
-	NAD_currencyType, 
-	NGN_currencyType, 
-	NIO_currencyType, 
-	NOK_currencyType, 
-	NPR_currencyType, 
-	NZD_currencyType, 
-	OMR_currencyType, 
-	PAB_currencyType, 
-	PEN_currencyType, 
-	PGK_currencyType, 
-	PHP_currencyType, 
-	PKR_currencyType, 
-	PLN_currencyType, 
-	PYG_currencyType, 
-	QAR_currencyType, 
-	RON_currencyType, 
-	RSD_currencyType, 
-	RUB_currencyType, 
-	RWF_currencyType, 
-	SAR_currencyType, 
-	SBD_currencyType, 
-	SCR_currencyType, 
-	SDG_currencyType, 
-	SEK_currencyType, 
-	SGD_currencyType, 
-	SHP_currencyType, 
-	SKK_currencyType, 
-	SLL_currencyType, 
-	SOS_currencyType, 
-	SRD_currencyType, 
-	STD_currencyType, 
-	SVC_currencyType, 
-	SYP_currencyType, 
-	SZL_currencyType, 
-	THB_currencyType, 
-	TJS_currencyType, 
-	TMM_currencyType, 
-	TND_currencyType, 
-	TOP_currencyType, 
-	TRY_currencyType, 
-	TTD_currencyType, 
-	TWD_currencyType, 
-	TZS_currencyType, 
-	UAH_currencyType, 
-	UGX_currencyType, 
-	USD_currencyType, 
-	UYU_currencyType, 
-	UZS_currencyType, 
-	VEF_currencyType, 
-	VND_currencyType, 
-	VUV_currencyType, 
-	WST_currencyType, 
-	XAF_currencyType, 
-	XAG_currencyType, 
-	XAU_currencyType, 
-	XCD_currencyType, 
-	XDR_currencyType, 
-	XOF_currencyType, 
-	XPD_currencyType, 
-	XPF_currencyType, 
-	XPT_currencyType, 
-	XXX_currencyType, 
-	YER_currencyType, 
-	ZAR_currencyType, 
-	ZMK_currencyType, 
-	ZWR_currencyType
-
-}; 
-
-enum tariffDescriptionType
-{
-	Standard_charge_tariffDescriptionType, 
-	Fast_charge_tariffDescriptionType, 
-	Green_charge_tariffDescriptionType, 
-	Grid_friendly_charge_tariffDescriptionType, 
-	Freely_parameterisable_charge_tariffDescriptionType, 
-	Charge_under_reserve_tariffDescriptionType
-
-}; 
-
-enum DC_EVSEStatusCodeType
-{
-	EVSE_Shutdown_DC_EVSEStatusCodeType, 
-	UtilityInterruptEvent_DC_EVSEStatusCodeType, 
-	IsolationMonitoringInternal_DC_EVSEStatusCodeType, 
-	IsolationMonitoringActive_DC_EVSEStatusCodeType, 
-	EVSE_EmergencyShutdown_DC_EVSEStatusCodeType, 
-	Reserved_8_DC_EVSEStatusCodeType, 
-	Reserved_9_DC_EVSEStatusCodeType, 
-	Reserved_A_DC_EVSEStatusCodeType, 
-	Reserved_B_DC_EVSEStatusCodeType, 
-	Reserved_C_DC_EVSEStatusCodeType
-
-}; 
-
-
-
-
-struct arraylen_sessionIDType
-{
-	size_t data;
-
-
-};
-
-struct sessionIDType
-{
-	uint8_t data[8];
-	struct arraylen_sessionIDType arraylen;
-
-};
-
-struct selection_SessionInformationType
-{
-	unsigned int ServiceSessionID:1;
-	unsigned int ProtocolVersion:1;
-
-
-};
-
-struct arraylen_protocolVersionType
-{
-	size_t data;
-
-
-};
-
-struct protocolVersionType
-{
-	uint32_t data[5];
-	struct arraylen_protocolVersionType arraylen;
-
-};
-
-struct SessionInformationType
-{
-	struct sessionIDType SessionID;
-	struct sessionIDType ServiceSessionID;
-	struct protocolVersionType ProtocolVersion;
-	struct selection_SessionInformationType isused;
-
-};
-
-struct selection_NotificationType
-{
-	unsigned int FaultCode:1;
-	unsigned int FaultMsg:1;
-
-
-};
-
-struct arraylen_faultMsgType
-{
-	size_t data;
-
-
-};
-
-struct faultMsgType
-{
-	uint32_t data[64];
-	struct arraylen_faultMsgType arraylen;
-
-};
-
-struct NotificationType
-{
-	enum faultCodeType FaultCode;
-	struct faultMsgType FaultMsg;
-	struct selection_NotificationType isused;
-
-};
-
-struct selection_MessageHeaderType
-{
-	unsigned int Notification:1;
-	unsigned int Security:1;
-
-
-};
-
-struct arraylen_service_string
-{
-	size_t data;
-
-
-};
-
-struct service_string
-{
-	uint32_t data[128];
-	struct arraylen_service_string arraylen;
-
-};
-
-struct CanonicalizationMethodType
-{
-	struct service_string attr_Algorithm;
-
-
-};
-
-struct SignatureMethodType
-{
-	struct service_string attr_Algorithm;
-
-
-};
-
-struct DigestMethodType
-{
-	struct service_string attr_Algorithm;
-
-
-};
-
-struct arraylen_DigestValueType
-{
-	size_t data;
-
-
-};
-
-struct DigestValueType
-{
-	uint8_t data[128];
-	struct arraylen_DigestValueType arraylen;
-
-};
-
-struct ReferenceType
-{
-	struct DigestMethodType DigestMethod;
-	struct DigestValueType DigestValue;
-	struct service_string attr_URI;
-
-
-
-};
-
-
-struct SignedInfoType
-{
-	struct CanonicalizationMethodType CanonicalizationMethod;
-	struct SignatureMethodType SignatureMethod;
-	struct ReferenceType Reference;
-
-};
-
-struct arraylen_SignatureValueType
-{
-	size_t data;
-
-
-};
-
-struct SignatureValueType
-{
-
-
-	uint8_t data[128];
-	struct arraylen_SignatureValueType arraylen;
-
-};
-
-struct X509IssuerSerialType
-{
-	struct service_string X509IssuerName;
-	int64_t X509SerialNumber;
-
-
-};
-
-struct arraylen_service_byte
-{
-	size_t data;
-
-
-};
-
-struct service_byte
-{
-	uint8_t data[128];
-	struct arraylen_service_byte arraylen;
-
-};
-
-struct X509DataType
-{
-	struct X509IssuerSerialType X509IssuerSerial;
-	struct service_byte X509SKI;
-	struct service_string X509SubjectName;
-	struct service_byte X509Certificate;
-	struct service_byte X509CRL;
-
-
-};
-
-struct KeyInfoType
-{
-	struct X509DataType X509Data;
-	struct service_string attr_Id;
-
-
-};
-
-struct selection_SignatureType
-{
-	unsigned int KeyInfo:1;
-
-
-};
-
-struct SignatureType
-{
-	struct SignedInfoType SignedInfo;
-	struct SignatureValueType SignatureValue;
-	struct KeyInfoType KeyInfo;
-	struct service_string attr_Id;
-	struct selection_SignatureType isused;
-
-};
-
-struct selection_SecurityType
-{
-	unsigned int Signature:1;
-
-
-};
-
-struct SecurityType
-{
-	struct SignatureType* Signature;
-	struct selection_SecurityType isused;
-
-};
-
-struct MessageHeaderType
-{
-	struct SessionInformationType SessionInformation;
-	struct NotificationType Notification;
-	struct SecurityType Security;
-	struct selection_MessageHeaderType isused;
-
-};
-
-struct arraylen_pevIDType
-{
-	size_t data;
-
-
-};
-
-struct pevIDType
-{
-	uint32_t data[32];
-	struct arraylen_pevIDType arraylen;
-
-};
-
-struct selection_SessionSetupReqType
-{
-	unsigned int PEVID:1;
-
-
-};
-
-struct SessionSetupReqType
-{
-	struct pevIDType PEVID;
-	struct selection_SessionSetupReqType isused;
-
-};
-
-struct selection_BodyType
-{
-	unsigned int SessionSetupReq:1;
-	unsigned int SessionSetupRes:1;
-	unsigned int ServiceDiscoveryReq:1;
-	unsigned int ServiceDiscoveryRes:1;
-	unsigned int ServiceDetailReq:1;
-	unsigned int ServiceDetailRes:1;
-	unsigned int ServicePaymentSelectionReq:1;
-	unsigned int ServicePaymentSelectionRes:1;
-	unsigned int PaymentDetailsReq:1;
-	unsigned int PaymentDetailsRes:1;
-	unsigned int ContractAuthenticationReq:1;
-	unsigned int ContractAuthenticationRes:1;
-	unsigned int ChargeParameterDiscoveryReq:1;
-	unsigned int ChargeParameterDiscoveryRes:1;
-	unsigned int PowerDeliveryReq:1;
-	unsigned int PowerDeliveryRes:1;
-	unsigned int MeteringStatusReq:1;
-	unsigned int MeteringStatusRes:1;
-	unsigned int MeteringReceiptReq:1;
-	unsigned int MeteringReceiptRes:1;
-	unsigned int CertificateUpdateReq:1;
-	unsigned int CertificateUpdateRes:1;
-	unsigned int CertificateInstallationReq:1;
-	unsigned int CertificateInstallationRes:1;
-	unsigned int LineLockReq:1;
-	unsigned int LineLockRes:1;
-	unsigned int CableCheckReq:1;
-	unsigned int CableCheckRes:1;
-	unsigned int PreChargeReq:1;
-	unsigned int PreChargeRes:1;
-	unsigned int CurrentDemandReq:1;
-	unsigned int CurrentDemandRes:1;
-	unsigned int WeldingDetectionReq:1;
-	unsigned int WeldingDetectionRes:1;
-	unsigned int TerminateChargingReq:1;
-	unsigned int TerminateChargingRes:1;
-
-
-};
-
-struct arraylen_evseIDType
-{
-	size_t data;
-
-
-};
-
-struct evseIDType
-{
-	uint8_t data[32];
-	struct arraylen_evseIDType arraylen;
-
-};
-
-struct SessionSetupResType
-{
-	enum responseCodeType ResponseCode;
-	struct evseIDType EVSEID;
-	int32_t TCurrent;
-
-
-};
-
-struct arraylen_serviceScopeType
-{
-	size_t data;
-
-
-};
-
-struct serviceScopeType
-{
-	uint32_t data[64];
-	struct arraylen_serviceScopeType arraylen;
-
-};
-
-struct selection_ServiceDiscoveryReqType
-{
-	unsigned int ServiceScope:1;
-	unsigned int ServiceType:1;
-
-
-};
-
-struct ServiceDiscoveryReqType
-{
-	struct serviceScopeType ServiceScope;
-	enum serviceCategoryType ServiceType;
-	struct selection_ServiceDiscoveryReqType isused;
-
-};
-
-struct arraylen_PaymentOptionsType
-{
-	size_t PaymentOption;
-
-
-};
-
-struct PaymentOptionsType
-{
-	enum paymentOptionType PaymentOption[2];
-	struct arraylen_PaymentOptionsType arraylen;
-
-};
-
-struct arraylen_serviceIDType
-{
-	size_t data;
-
-
-};
-
-struct serviceIDType
-{
-	uint8_t data[8];
-	struct arraylen_serviceIDType arraylen;
-
-};
-
-struct arraylen_serviceNameType
-{
-	size_t data;
-
-
-};
-
-struct serviceNameType
-{
-	uint32_t data[32];
-	struct arraylen_serviceNameType arraylen;
-
-};
-
-struct selection_ServiceTagType
-{
-	unsigned int ServiceName:1;
-	unsigned int ServiceCategory:1;
-	unsigned int ServiceScope:1;
-
-
-};
-
-struct ServiceTagType
-{
-	struct serviceIDType ServiceID;
-	struct serviceNameType ServiceName;
-	enum serviceCategoryType ServiceCategory;
-	struct serviceScopeType ServiceScope;
-	struct selection_ServiceTagType isused;
-
-};
-
-struct ServiceChargeType
-{
-	struct ServiceTagType ServiceTag;
-	int FreeService;
-	enum EVSESupportedEnergyTransferType EnergyTransferType;
-
-
-};
-
-struct arraylen_ServiceTagListType
-{
-	size_t Service;
-
-
-};
-
-struct ServiceTagListType
-{
-	struct ServiceTagType Service[32];
-	struct arraylen_ServiceTagListType arraylen;
-
-};
-
-struct selection_ServiceDiscoveryResType
-{
-	unsigned int ServiceList:1;
-
-
-};
-
-struct ServiceDiscoveryResType
-{
-	enum responseCodeType ResponseCode;
-	struct PaymentOptionsType PaymentOptions;
-	struct ServiceChargeType ChargeService;
-	struct ServiceTagListType ServiceList;
-	struct selection_ServiceDiscoveryResType isused;
-
-};
-
-struct ServiceDetailReqType
-{
-	struct serviceIDType ServiceID;
-
-
-};
-
-struct selection_ServiceDetailResType
-{
-	unsigned int ServiceCharge:1;
-	unsigned int ServiceCertificate:1;
-	unsigned int ServiceCustom:1;
-	unsigned int ServiceRCS:1;
-	unsigned int ServiceInternet:1;
-
-
-};
-
-struct ServiceCertificateType
-{
-	struct ServiceTagType ServiceTag;
-	int FreeService;
-	int CertificateInstall;
-	int CertificateUpdate;
-
-
-};
-
-struct ServiceDetailsType
-{
-
- 
-	int NO_MEMBER:1;
-	
-};
-
-struct ServiceCustomType
-{
-	struct ServiceTagType ServiceTag;
-	int FreeService;
-	struct ServiceDetailsType ServiceDetails;
-
-
-};
-
-struct ServiceRCSType
-{
-	struct ServiceTagType ServiceTag;
-	int FreeService;
-	struct ServiceDetailsType ServiceDetails;
-
-
-};
-
-struct ServiceInternetType
-{
-	struct ServiceTagType ServiceTag;
-	int FreeService;
-	struct ServiceDetailsType ServiceDetails;
-
-
-};
-
-struct ServiceDetailResType
-{
-	enum responseCodeType ResponseCode;
-	struct ServiceTagType ServiceTag;
-	struct PaymentOptionsType PaymentOptions;
-	struct ServiceChargeType* ServiceCharge;
-	struct ServiceCertificateType* ServiceCertificate;
-	struct ServiceCustomType* ServiceCustom;
-	struct ServiceRCSType* ServiceRCS;
-	struct ServiceInternetType* ServiceInternet;
-	struct selection_ServiceDetailResType isused;
-
-};
-
-struct ServicePaymentSelectionReqType
-{
-	enum paymentOptionType SelectedPaymentOption;
-	struct ServiceTagListType ServiceList;
-
-
-};
-
-struct ServicePaymentSelectionResType
-{
-	enum responseCodeType ResponseCode;
-
-
-};
-
-struct arraylen_contractIDType
-{
-	size_t data;
-
-
-};
-
-struct contractIDType
-{
-	uint32_t data[64];
-	struct arraylen_contractIDType arraylen;
-
-};
-
-struct arraylen_certificateType
-{
-	size_t data;
-
-
-};
-
-struct certificateType
-{
-	uint8_t data[128];
-	struct arraylen_certificateType arraylen;
-
-};
-
-struct arraylen_SubCertificatesType
-{
-	size_t Certificate;
-
-
-};
-
-struct SubCertificatesType
-{
-	struct certificateType Certificate[5];
-	struct arraylen_SubCertificatesType arraylen;
-
-};
-
-struct selection_CertificateChainType
-{
-	unsigned int SubCertificates:1;
-
-
-};
-
-struct CertificateChainType
-{
-	struct certificateType Certificate;
-	struct SubCertificatesType SubCertificates;
-	struct selection_CertificateChainType isused;
-
-};
-
-struct PaymentDetailsReqType
-{
-	struct contractIDType ContractID;
-	struct CertificateChainType ContractSignatureCertChain;
-
-
-};
-
-struct arraylen_genChallengeType
-{
-	size_t data;
-
-
-};
-
-struct genChallengeType
-{
-	uint32_t data[128];
-	struct arraylen_genChallengeType arraylen;
-
-};
-
-struct PaymentDetailsResType
-{
-	enum responseCodeType ResponseCode;
-	struct genChallengeType GenChallenge;
-	int32_t TCurrent;
-
-
-};
-
-struct ContractAuthenticationReqType
-{
-	struct genChallengeType GenChallenge;
-
-
-};
-
-struct ContractAuthenticationResType
-{
-	enum responseCodeType ResponseCode;
-
-
-};
-
-struct AC_PEVStatusType
-{
-	int ConnectorLocked;
-	int PEVStandby;
-
-
-};
-
-struct FloatingValueType
-{
-	int8_t Multiplier;
-	enum unitSymbolType Unit;
-	int16_t Value;
-
-
-};
-
-struct AC_PEVChargeParameterType
-{
-	struct AC_PEVStatusType AC_PEVStatus;
-	int32_t EoC;
-	struct FloatingValueType EAmount;
-	struct FloatingValueType PEVMaxPower;
-	int8_t PEVMaxPhases;
-	struct FloatingValueType PEVMaxVoltage;
-	struct FloatingValueType PEVMinVoltage;
-	struct FloatingValueType PEVMaxCurrent;
-	struct FloatingValueType PEVMinCurrent;
-
-
-};
-
-struct selection_ChargeParameterDiscoveryReqType
-{
-	unsigned int AC_PEVChargeParameter:1;
-	unsigned int DC_PEVChargeParameter:1;
-
-
-};
-
-struct DC_PEVStatusType
-{
-	int PEVStandby;
-	int ConnectorLocked;
-	int PEVReady;
-	enum DC_PEVStatusCodeType PEVStatusCode;
-	int8_t PEVRESSSOC;
-
-
-};
-
-struct selection_DC_PEVChargeParameterType
-{
-	unsigned int PEVMaximumPowerLimit:1;
-	unsigned int PEVEnergyCapacity:1;
-	unsigned int PEVEnergyRequest:1;
-	unsigned int FullSOC:1;
-	unsigned int BulkSOC:1;
-
-
-};
-
-struct DC_PEVChargeParameterType
-{
-	struct DC_PEVStatusType DC_PEVStatus;
-	struct FloatingValueType PEVMaximumCurrentLimit;
-	struct FloatingValueType PEVMaximumPowerLimit;
-	struct FloatingValueType PEVMaximumVoltageLimit;
-	struct FloatingValueType PEVEnergyCapacity;
-	struct FloatingValueType PEVEnergyRequest;
-	int8_t FullSOC;
-	int8_t BulkSOC;
-	int8_t PEVProtocolVersion;
-	struct selection_DC_PEVChargeParameterType isused;
-
-};
-
-struct ChargeParameterDiscoveryReqType
-{
-	enum PEVRequestedEnergyTransferType PEVRequestedEnergyTransferType;
-	struct AC_PEVChargeParameterType* AC_PEVChargeParameter;
-	struct DC_PEVChargeParameterType* DC_PEVChargeParameter;
-	struct selection_ChargeParameterDiscoveryReqType isused;
-
-};
-
-struct arraylen_energyProviderType
-{
-	size_t data;
-
-
-};
-
-struct energyProviderType
-{
-	uint32_t data[64];
-	struct arraylen_energyProviderType arraylen;
-
-};
-
-struct selection_ChargeParameterDiscoveryResType
-{
-	unsigned int EnergyProvider:1;
-	unsigned int TariffTable:1;
-	unsigned int AC_EVSEChargeParameter:1;
-	unsigned int DC_EVSEChargeParameter:1;
-
-
-};
-
-struct selection_TariffDescrType
-{
-	unsigned int TariffDescription:1;
-
-
-};
-
-struct arraylen_ePriceType
-{
-	size_t data;
-
-
-};
-
-struct ePriceType
-{
-	uint32_t data[128];
-	struct arraylen_ePriceType arraylen;
-
-};
-
-struct selection_TariffEntryType
-{
-	unsigned int EPrice:1;
-
-
-};
-
-struct TariffEntryType
-{
-	uint32_t TariffStart;
-	int16_t TariffPMax;
-	struct ePriceType EPrice;
-	struct selection_TariffEntryType isused;
-
-};
-
-struct arraylen_TariffEntriesType
-{
-	size_t TariffEntry;
-
-
-};
-
-struct TariffEntriesType
-{
-	struct TariffEntryType TariffEntry[8];
-	struct arraylen_TariffEntriesType arraylen;
-
-};
-
-struct TariffDescrType
-{
-	int16_t TariffID;
-	enum tariffDescriptionType TariffDescription;
-	struct TariffEntriesType TariffEntries;
-	struct selection_TariffDescrType isused;
-
-};
-
-struct arraylen_TariffTableType
-{
-	size_t Tariff;
-
-
-};
-
-struct TariffTableType
-{
-	enum currencyType Currency;
-	struct TariffDescrType Tariff[6];
-	enum unitSymbolType EPriceUnit;
-	int8_t EPriceMultiplier;
-	struct arraylen_TariffTableType arraylen;
-
-};
-
-struct AC_EVSEStatusType
-{
-	int EVSEStandby;
-	int ConnectorLocked;
-	int PowerSwitchClosed;
-	int RCD;
-	int32_t ShutDownTime;
-	int StopCharging;
-
-
-};
-
-struct AC_EVSEChargeParameterType
-{
-	struct AC_EVSEStatusType AC_EVSEStatus;
-	struct FloatingValueType EVSEMaxVoltage;
-	struct FloatingValueType EVSEMinVoltage;
-	struct FloatingValueType EVSEMaxCurrent;
-	struct FloatingValueType EVSEMinCurrent;
-	int8_t EVSEMaxPhases;
-
-
-};
-
-struct DC_EVSEStatusType
-{
-	int EVSEStandby;
-	enum DC_EVSEStatusCodeType EVSEStatusCode;
-
-
-};
-
-struct selection_DC_EVSEChargeParameterType
-{
-	unsigned int EVSEMaximumPowerLimit:1;
-	unsigned int EVSECurrentRegulationTolerance:1;
-	unsigned int EVSEEnergyToBeDelivered:1;
-
-
-};
-
-struct DC_EVSEChargeParameterType
-{
-	struct DC_EVSEStatusType DC_EVSEStatus;
-	struct FloatingValueType EVSEMaximumCurrentLimit;
-	struct FloatingValueType EVSEMaximumPowerLimit;
-	struct FloatingValueType EVSEMaximumVoltageLimit;
-	struct FloatingValueType EVSEMinimumCurrentLimit;
-	struct FloatingValueType EVSEMinimumVoltageLimit;
-	struct FloatingValueType EVSECurrentRegulationTolerance;
-	struct FloatingValueType EVSEPeakCurrentRipple;
-	struct FloatingValueType EVSEEnergyToBeDelivered;
-	int8_t EVSEProtocolVersion;
-	struct selection_DC_EVSEChargeParameterType isused;
-
-};
-
-struct ChargeParameterDiscoveryResType
-{
-	enum responseCodeType ResponseCode;
-	struct energyProviderType EnergyProvider;
-	struct TariffTableType TariffTable;
-	struct AC_EVSEChargeParameterType* AC_EVSEChargeParameter;
-	struct DC_EVSEChargeParameterType* DC_EVSEChargeParameter;
-	struct selection_ChargeParameterDiscoveryResType isused;
-
-};
-
-struct selection_PowerDeliveryReqType
-{
-	unsigned int Tariff:1;
-	unsigned int ChargingProfile:1;
-	unsigned int AC_PEVPowerDeliveryParameter:1;
-	unsigned int DC_PEVPowerDeliveryParameter:1;
-
-
-};
-
-struct ProfileEntryType
-{
-	int32_t ChargingProfileEntryStart;
-	int16_t ChargingProfileEntryMaxPower;
-
-
-};
-
-struct arraylen_ChargingProfileType
-{
-	size_t ProfileEntry;
-
-
-};
-
-struct ChargingProfileType
-{
-	struct ProfileEntryType ProfileEntry[128];
-	struct arraylen_ChargingProfileType arraylen;
-
-};
-
-struct AC_PEVPowerDeliveryParameterType
-{
-	struct AC_PEVStatusType AC_PEVStatus;
-
-
-};
-
-struct selection_DC_PEVPowerDeliveryParameterType
-{
-	unsigned int BulkChargingComplete:1;
-
-
-};
-
-struct DC_PEVPowerDeliveryParameterType
-{
-	struct DC_PEVStatusType DC_PEVStatus;
-	int BulkChargingComplete;
-	int ChargingComplete;
-	struct selection_DC_PEVPowerDeliveryParameterType isused;
-
-};
-
-struct PowerDeliveryReqType
-{
-	int16_t Tariff;
-	struct ChargingProfileType ChargingProfile;
-	int ReqSwitchStatus;
-	struct AC_PEVPowerDeliveryParameterType* AC_PEVPowerDeliveryParameter;
-	struct DC_PEVPowerDeliveryParameterType* DC_PEVPowerDeliveryParameter;
-	struct selection_PowerDeliveryReqType isused;
-
-};
-
-struct selection_PowerDeliveryResType
-{
-	unsigned int AC_EVSEStatus:1;
-	unsigned int DC_EVSEStatus:1;
-
-
-};
-
-struct PowerDeliveryResType
-{
-	enum responseCodeType ResponseCode;
-	struct AC_EVSEStatusType* AC_EVSEStatus;
-	struct DC_EVSEStatusType* DC_EVSEStatus;
-	struct selection_PowerDeliveryResType isused;
-
-};
-
-struct selection_MeteringStatusReqType
-{
-	unsigned int AC_PEVStatus:1;
-	unsigned int DC_PEVStatus:1;
-
-
-};
-
-struct MeteringStatusReqType
-{
-	struct AC_PEVStatusType* AC_PEVStatus;
-	struct DC_PEVStatusType* DC_PEVStatus;
-	struct selection_MeteringStatusReqType isused;
-
-};
-
-struct selection_MeteringStatusResType
-{
-	unsigned int PCurrent:1;
-	unsigned int MeterInfo:1;
-	unsigned int AC_EVSEStatus:1;
-	unsigned int DC_EVSEStatus:1;
-
-
-};
-
-struct arraylen_meterIDType
-{
-	size_t data;
-
-
-};
-
-struct meterIDType
-{
-	uint32_t data[32];
-	struct arraylen_meterIDType arraylen;
-
-};
-
-struct selection_MeterInfoType
-{
-	unsigned int MeterID:1;
-	unsigned int MeterPubKey:1;
-	unsigned int MeterReading:1;
-	unsigned int SigMeterReading:1;
-	unsigned int MeterStatus:1;
-	unsigned int TMeter:1;
-
-
-};
-
-struct arraylen_pubKeyType
-{
-	size_t data;
-
-
-};
-
-struct pubKeyType
-{
-	uint8_t data[128];
-	struct arraylen_pubKeyType arraylen;
-
-};
-
-struct AnyType
-{
-
- 
-	int NO_MEMBER:1;
-	
-};
-
-struct MeterInfoType
-{
-	struct meterIDType MeterID;
-	struct pubKeyType MeterPubKey;
-	struct FloatingValueType MeterReading;
-	struct AnyType SigMeterReading;
-	int16_t MeterStatus;
-	int32_t TMeter;
-	struct selection_MeterInfoType isused;
-
-};
-
-struct MeteringStatusResType
-{
-	enum responseCodeType ResponseCode;
-	struct evseIDType EVSEID;
-	int32_t TCurrent;
-	struct FloatingValueType EVSEMaxPower;
-	struct FloatingValueType PCurrent;
-	struct MeterInfoType MeterInfo;
-	struct AC_EVSEStatusType* AC_EVSEStatus;
-	struct DC_EVSEStatusType* DC_EVSEStatus;
-	struct selection_MeteringStatusResType isused;
-
-};
-
-struct selection_MeteringReceiptReqType
-{
-	unsigned int PEVID:1;
-	unsigned int TCurrent:1;
-	unsigned int AC_PEVStatus:1;
-	unsigned int DC_PEVStatus:1;
-
-
-};
-
-struct arraylen_meterSignatureType
-{
-	size_t data;
-
-
-};
-
-struct meterSignatureType
-{
-	uint8_t data[128];
-	struct arraylen_meterSignatureType arraylen;
-
-};
-
-struct MeteringReceiptReqType
-{
-	struct pevIDType PEVID;
-	struct evseIDType EVSEID;
-	struct sessionIDType SessionID;
-	struct MeterInfoType MeterInfo;
-	int32_t TCurrent;
-	int16_t Tariff;
-	struct meterSignatureType ReceiptSignature;
-	struct AC_PEVStatusType* AC_PEVStatus;
-	struct DC_PEVStatusType* DC_PEVStatus;
-	struct selection_MeteringReceiptReqType isused;
-
-};
-
-struct selection_MeteringReceiptResType
-{
-	unsigned int AC_EVSEStatus:1;
-	unsigned int DC_EVSEStatus:1;
-
-
-};
-
-struct MeteringReceiptResType
-{
-	enum responseCodeType ResponseCode;
-	struct AC_EVSEStatusType* AC_EVSEStatus;
-	struct DC_EVSEStatusType* DC_EVSEStatus;
-	struct selection_MeteringReceiptResType isused;
-
-};
-
-struct CertificateUpdateReqType
-{
-	struct CertificateChainType ContractSignatureCertChain;
-	struct certificateType ContractEncryptionCert;
-	struct contractIDType ContractID;
-
-
-};
-
-struct arraylen_signaturePrivateKeyType
-{
-	size_t data;
-
-
-};
-
-struct signaturePrivateKeyType
-{
-	uint8_t data[128];
-	struct arraylen_signaturePrivateKeyType arraylen;
-
-};
-
-struct arraylen_encryptionPrivateKeyType
-{
-	size_t data;
-
-
-};
-
-struct encryptionPrivateKeyType
-{
-	uint8_t data[128];
-	struct arraylen_encryptionPrivateKeyType arraylen;
-
-};
-
-struct CertificateUpdateResType
-{
-	enum responseCodeType ResponseCode;
-	struct CertificateChainType ContractSignatureCertChain;
-	struct signaturePrivateKeyType ContractSignaturePrivateKey;
-	struct CertificateChainType ContractEncryptionCertChain;
-	struct encryptionPrivateKeyType ContractEncryptionPrivateKey;
-	struct contractIDType ContractID;
-	int8_t RetryCounter;
-
-
-};
-
-struct CertificateInstallationReqType
-{
-	struct certificateType OEMProvisioningCert;
-
-
-};
-
-struct CertificateInstallationResType
-{
-	enum responseCodeType ResponseCode;
-	struct CertificateChainType ContractSignatureCertChain;
-	struct pubKeyType ContractSignaturePrivateKey;
-	struct CertificateChainType ContractEncryptionCertChain;
-	struct encryptionPrivateKeyType ContractEncryptionPrivateKey;
-	struct contractIDType ContractID;
-
-
-};
-
-struct LineLockReqType
-{
-	struct AC_PEVStatusType AC_PEVStatus;
-	int ReqLockStatus;
-
-
-};
-
-struct LineLockResType
-{
-	enum responseCodeType ResponseCode;
-	struct AC_EVSEStatusType AC_EVSEStatus;
-
-
-};
-
-struct CableCheckReqType
-{
-	struct DC_PEVStatusType DC_PEVStatus;
-
-
-};
-
-struct CableCheckResType
-{
-	enum responseCodeType ResponseCode;
-	struct DC_EVSEStatusType DC_EVSEStatus;
-
-
-};
-
-struct PreChargeReqType
-{
-	struct DC_PEVStatusType DC_PEVStatus;
-	struct FloatingValueType PEVRESSVoltage;
-	struct FloatingValueType PEVTargetVoltage;
-	struct FloatingValueType PEVDemandCurrent;
-	struct FloatingValueType VoltageDifferential;
-
-
-};
-
-struct PreChargeResType
-{
-	enum responseCodeType ResponseCode;
-	struct DC_EVSEStatusType DC_EVSEStatus;
-	struct FloatingValueType EVSEPresentVoltage;
-
-
-};
-
-struct selection_CurrentDemandReqType
-{
-	unsigned int PEVMaximumVoltageLimit:1;
-	unsigned int PEVMaximumCurrentLimit:1;
-	unsigned int PEVMaximumPowerLimit:1;
-	unsigned int BulkChargingComplete:1;
-	unsigned int RemainingTimeToFullSoC:1;
-	unsigned int RemainingTimeToBulkSoC:1;
-
-
-};
-
-struct CurrentDemandReqType
-{
-	struct DC_PEVStatusType DC_PEVStatus;
-	struct FloatingValueType ChargeCurrentRequest;
-	struct FloatingValueType PEVMaximumVoltageLimit;
-	struct FloatingValueType PEVMaximumCurrentLimit;
-	struct FloatingValueType PEVMaximumPowerLimit;
-	int BulkChargingComplete;
-	int ChargingComplete;
-	struct FloatingValueType RemainingTimeToFullSoC;
-	struct FloatingValueType RemainingTimeToBulkSoC;
-	struct FloatingValueType PEVTargetVoltage;
-	struct FloatingValueType CurrentDifferential;
-	struct FloatingValueType VoltageDifferential;
-	struct selection_CurrentDemandReqType isused;
-
-};
-
-struct selection_CurrentDemandResType
-{
-	unsigned int EVSEMaximumVoltageLimit:1;
-	unsigned int EVSEMaximumCurrentLimit:1;
-	unsigned int EVSEMaximumPowerLimit:1;
-
-
-};
-
-struct CurrentDemandResType
-{
-	enum responseCodeType ResponseCode;
-	struct DC_EVSEStatusType DC_EVSEStatus;
-	struct FloatingValueType EVSEPresentVoltage;
-	struct FloatingValueType EVSEPresentCurrent;
-	int EVSECurrentLimitAchieved;
-	int EVSEVoltageLimitAchieved;
-	int EVSEPowerLimitAchieved;
-	struct FloatingValueType EVSEMaximumVoltageLimit;
-	struct FloatingValueType EVSEMaximumCurrentLimit;
-	struct FloatingValueType EVSEMaximumPowerLimit;
-	struct selection_CurrentDemandResType isused;
-
-};
-
-struct WeldingDetectionReqType
-{
-	struct DC_PEVStatusType DC_PEVStatus;
-
-
-};
-
-struct WeldingDetectionResType
-{
-	enum responseCodeType ResponseCode;
-	struct DC_EVSEStatusType DC_EVSEStatus;
-	struct FloatingValueType EVSEPresentVoltage;
-
-
-};
-
-struct TerminateChargingReqType
-{
-	struct DC_PEVStatusType DC_PEVStatus;
-
-
-};
-
-struct TerminateChargingResType
-{
-	enum responseCodeType ResponseCode;
-	struct FloatingValueType EVSEPresentVoltage;
-
-
-};
-
-struct BodyType
-{
-	struct SessionSetupReqType* SessionSetupReq;
-	struct SessionSetupResType* SessionSetupRes;
-	struct ServiceDiscoveryReqType* ServiceDiscoveryReq;
-	struct ServiceDiscoveryResType* ServiceDiscoveryRes;
-	struct ServiceDetailReqType* ServiceDetailReq;
-	struct ServiceDetailResType* ServiceDetailRes;
-	struct ServicePaymentSelectionReqType* ServicePaymentSelectionReq;
-	struct ServicePaymentSelectionResType* ServicePaymentSelectionRes;
-	struct PaymentDetailsReqType* PaymentDetailsReq;
-	struct PaymentDetailsResType* PaymentDetailsRes;
-	struct ContractAuthenticationReqType* ContractAuthenticationReq;
-	struct ContractAuthenticationResType* ContractAuthenticationRes;
-	struct ChargeParameterDiscoveryReqType* ChargeParameterDiscoveryReq;
-	struct ChargeParameterDiscoveryResType* ChargeParameterDiscoveryRes;
-	struct PowerDeliveryReqType* PowerDeliveryReq;
-	struct PowerDeliveryResType* PowerDeliveryRes;
-	struct MeteringStatusReqType* MeteringStatusReq;
-	struct MeteringStatusResType* MeteringStatusRes;
-	struct MeteringReceiptReqType* MeteringReceiptReq;
-	struct MeteringReceiptResType* MeteringReceiptRes;
-	struct CertificateUpdateReqType* CertificateUpdateReq;
-	struct CertificateUpdateResType* CertificateUpdateRes;
-	struct CertificateInstallationReqType* CertificateInstallationReq;
-	struct CertificateInstallationResType* CertificateInstallationRes;
-	struct LineLockReqType* LineLockReq;
-	struct LineLockResType* LineLockRes;
-	struct CableCheckReqType* CableCheckReq;
-	struct CableCheckResType* CableCheckRes;
-	struct PreChargeReqType* PreChargeReq;
-	struct PreChargeResType* PreChargeRes;
-	struct CurrentDemandReqType* CurrentDemandReq;
-	struct CurrentDemandResType* CurrentDemandRes;
-	struct WeldingDetectionReqType* WeldingDetectionReq;
-	struct WeldingDetectionResType* WeldingDetectionRes;
-	struct TerminateChargingReqType* TerminateChargingReq;
-	struct TerminateChargingResType* TerminateChargingRes;
-	struct selection_BodyType isused;
-
-};
-
-struct AnonType_V2G_Message
-{
-	struct MessageHeaderType* Header;
-	struct BodyType Body;
-
-
-};
-
-struct EXIDocumentType
-{
-	struct AnonType_V2G_Message V2G_Message;
-
-
-};
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 2812
src/service/v2g_serviceDispatcher.c

@@ -1,2812 +0,0 @@
-
-
-
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXISeGen</p>
- *
- ********************************************************************/
-
-
-#include "v2g_service.h"
-#include "v2g_serviceDispatcher.h"
-#include "v2g_serviceDataTypes.h"
-#include "v2g_serviceDataTypes.c"
-#include "v2g_serviceMethods.h"
-#include "v2g_serviceDataSerialization.c"
-#include "EXITypes.h"
-#include "EXIDecoder.h"
-#include "EXIEncoder.h"
-#include "StringTable.h"
-#include <string.h>
-
-
-static int deserializeMessage(struct EXIService* service);
-
-
-static int _setInt32Value(integer_t* iv, int32_t* int32) {
-	int errn = 0;
-	switch(iv->type) {
-	/* Unsigned Integer */
-	case UNSIGNED_INTEGER_8:
-		*int32 = iv->val.uint8;
-		break;
-	case UNSIGNED_INTEGER_16:
-		*int32 = iv->val.uint16;
-		break;
-	case UNSIGNED_INTEGER_32:
-		if (iv->val.uint32 <= 2147483647) {
-			*int32 = iv->val.uint32;
-		} else {
-			errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-		}
-		break;
-	case UNSIGNED_INTEGER_64:
-		errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-		break;
-	/* (Signed) Integer */
-	case INTEGER_8:
-		*int32 = iv->val.int8;
-		break;
-	case INTEGER_16:
-		*int32 = iv->val.int16;
-		break;
-	case INTEGER_32:
-		*int32 = iv->val.int32;
-		break;
-	case INTEGER_64:
-		errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-	}
-	return errn;
-}
-
-static int _setInt16Value(integer_t* iv, int16_t* int16) {
-	int errn = 0;
-	switch(iv->type) {
-	/* Unsigned Integer */
-	case UNSIGNED_INTEGER_8:
-		*int16 = iv->val.uint8;
-		break;
-	case UNSIGNED_INTEGER_16:
-		*int16 = iv->val.uint16;
-		break;
-	case UNSIGNED_INTEGER_32:
-		if (iv->val.uint32 <= 2147483647) {
-			*int16 = iv->val.uint32;
-		} else {
-			errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-		}
-		break;
-	case UNSIGNED_INTEGER_64:
-		errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-		break;
-	/* (Signed) Integer */
-	case INTEGER_8:
-		*int16 = iv->val.int8;
-		break;
-	case INTEGER_16:
-		*int16 = iv->val.int16;
-		break;
-	case INTEGER_32:
-		*int16 = iv->val.int32;
-		break;
-	case INTEGER_64:
-		errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-	}
-	return errn;
-}
-
-/**
- * Deserialize an element value of the EXI stream and assign it to the
- * service data structure 
- */
-static int deserializeElementCharacter(struct EXIService* service)
-{
-
-	switch(service->eqn.namespaceURI) {
-		case 0:
-			switch(service->eqn.localPart) {
-				case 0: /*attr_Algorithm*/
-		if(service->val.type == STRING) 
-					{
-						if( service->idPath.id[5] == 0)
-						{
-							memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.CanonicalizationMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.CanonicalizationMethod.attr_Algorithm.arraylen.data = service->val.string.len;
-
-						} else if(service->idPath.id[5] == 43)
-						{
-							memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.SignatureMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.SignatureMethod.attr_Algorithm.arraylen.data = service->val.string.len;
-
-						} else if(service->idPath.id[6] == 5)
-						{
-					/*		memcpy(service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].DigestMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].DigestMethod.attr_Algorithm.arraylen.data = service->val.string.len; */
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 2: /*attr_Id*/
-		if(service->val.type == STRING) 
-					{
-						if( service->idPath.id[3] == 42)
-						{
-							memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->attr_Id.arraylen.data = service->val.string.len;
-
-						} else if(service->idPath.id[4] == 52)
-						{
-							/*memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo->attr_Id.arraylen.data = service->val.string.len;
-*/
-						} else if(service->idPath.id[4] == 50)
-						{
-						/*	memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignatureValue.attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security->Signature.SignatureValue.attr_Id.arraylen.data = service->val.string.len;
-*/
-						} else if(service->idPath.id[4] == 14)
-						{
-							memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.attr_Id.arraylen.data = service->val.string.len;
-
-						} else if(service->idPath.id[5] == 34)
-						{
-/*							memcpy(service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].attr_Id.arraylen.data = service->val.string.len; */
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 6: /*attr_URI*/
-		if(service->val.type == STRING) 
-					{
-						/*memcpy(service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].attr_URI.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].attr_URI.arraylen.data = service->val.string.len; */
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 5: /*attr_Type*/
-		if(service->val.type == STRING) 
-					{
-					/*	memcpy(service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].attr_Type.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.Reference[service->exiMsg.V2G_Message.Header->Security.Signature.SignedInfo.arraylen.Reference].attr_Type.arraylen.data = service->val.string.len; */
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;	
-			} /* close switch(service->eqn.localPart) */	
-		break;
-		case 4:
-			switch(service->eqn.localPart) {
-				case 7: /*DigestValue*/
-		if(service->val.type == BINARY_BASE64) 
-		{
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.Reference.DigestValue.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.Reference.DigestValue.arraylen.data = service->val.binary.len;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 50: /*SignatureValue*/
-
-				if(service->val.type == BINARY_BASE64)
-				{
-					memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignatureValue.data, service->val.binary.data,service->val.binary.len);
-					service->exiMsg.V2G_Message.Header->Security.Signature->SignatureValue.arraylen.data = service->val.binary.len;
-
-
-				}
-				else
-				{
-					return -1; /* wrong data type */
-				}
-
-
-				break;
-				case 62: /*X509IssuerName*/
-		if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509IssuerSerial.X509IssuerName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509IssuerSerial.X509IssuerName.arraylen.data = service->val.string.len;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 66: /*X509SerialNumber*/
-		if(service->val.type == INTEGER) 
-					{
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509IssuerSerial.X509SerialNumber = service->val.integer.val.int64;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 65: /*X509SKI*/
-		if(service->val.type == BINARY_BASE64) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509SKI.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509SKI.arraylen.data = service->val.binary.len;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 67: /*X509SubjectName*/
-		if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509SubjectName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509SubjectName.arraylen.data = service->val.string.len;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 59: /*X509Certificate*/
-		if(service->val.type == BINARY_BASE64) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509Certificate.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509Certificate.arraylen.data = service->val.binary.len;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 58: /*X509CRL*/
-		if(service->val.type == BINARY_BASE64) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509CRL.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Header->Security.Signature->KeyInfo.X509Data.X509CRL.arraylen.data = service->val.binary.len;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;	
-			} /* close switch(service->eqn.localPart) */	
-		break;
-		case 5:
-			switch(service->eqn.localPart) {
-				case 68: /*PEVID*/
-		if(service->val.type == STRING) 
-					{
-						if( service->idPath.id[2] == 114)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.SessionSetupReq->PEVID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.SessionSetupReq->PEVID.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.SessionSetupReq->isused.PEVID=1;
-
-						} else if(service->idPath.id[2] == 57)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->PEVID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->PEVID.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->isused.PEVID=1;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 110: /*ServiceScope*/
-		if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq->ServiceScope.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq->ServiceScope.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq->isused.ServiceScope=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 112: /*ServiceType*/
-		if(service->val.type == ENUMERATION) 
-					{
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq->ServiceType = service->val.enumeration;
-						service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq->isused.ServiceType=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 104: /*ServiceID*/
-		if(service->val.type == BINARY_HEX) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailReq->ServiceID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.ServiceDetailReq->ServiceID.arraylen.data = service->val.binary.len;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 95: /*SelectedPaymentOption*/
-		if(service->val.type == ENUMERATION) 
-					{
-						service->exiMsg.V2G_Message.Body.ServicePaymentSelectionReq->SelectedPaymentOption = service->val.enumeration;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 30: /*ContractID*/
-		if(service->val.type == STRING) 
-					{
-						if( service->idPath.id[2] == 75)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.PaymentDetailsReq->ContractID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.PaymentDetailsReq->ContractID.arraylen.data = service->val.string.len;
-
-						} else if(service->idPath.id[2] == 11)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateUpdateReq->ContractID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.CertificateUpdateReq->ContractID.arraylen.data = service->val.string.len;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 51: /*GenChallenge*/
-		if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.ContractAuthenticationReq->GenChallenge.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.ContractAuthenticationReq->GenChallenge.arraylen.data = service->val.string.len;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 73: /*PEVRequestedEnergyTransferType*/
-		if(service->val.type == ENUMERATION) 
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVRequestedEnergyTransferType = service->val.enumeration;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 119: /*Tariff*/
-		if(service->val.type == INTEGER) 
-					{
-						_setInt16Value( &(service->val.integer),&(service->val.integer.val.int16));
-						if( service->idPath.id[2] == 80)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryReq->Tariff = service->val.integer.val.int16;
-						service->exiMsg.V2G_Message.Body.PowerDeliveryReq->isused.Tariff=1;
-
-						} else if(service->idPath.id[2] == 57)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptReq->Tariff = service->val.integer.val.int16;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 92: /*ReqSwitchStatus*/
-		if(service->val.type == BOOLEAN) 
-					{
-						service->exiMsg.V2G_Message.Body.PowerDeliveryReq->ReqSwitchStatus = service->val.boolean;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 41: /*EVSEID*/
-		if(service->val.type == BINARY_HEX) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->EVSEID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->EVSEID.arraylen.data = service->val.binary.len;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 113: /*SessionID*/
-		if(service->val.type == BINARY_HEX) 
-					{
-						if( service->idPath.id[1] == 4)
-						{
-							memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.SessionID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Header->SessionInformation.SessionID.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[1] == 0)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->SessionID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->SessionID.arraylen.data = service->val.binary.len;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 118: /*TCurrent*/
-		if(service->val.type == INTEGER) 
-					{
-						_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->TCurrent));
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->isused.TCurrent=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 88: /*ReceiptSignature*/
-		if(service->val.type == BINARY_BASE64) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->ReceiptSignature.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->ReceiptSignature.arraylen.data = service->val.binary.len;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 27: /*ContractEncryptionCert*/
-		if(service->val.type == BINARY_BASE64) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.CertificateUpdateReq->ContractEncryptionCert.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.CertificateUpdateReq->ContractEncryptionCert.arraylen.data = service->val.binary.len;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 65: /*OEMProvisioningCert*/
-		if(service->val.type == BINARY_BASE64) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.CertificateInstallationReq->OEMProvisioningCert.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.CertificateInstallationReq->OEMProvisioningCert.arraylen.data = service->val.binary.len;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 91: /*ReqLockStatus*/
-		if(service->val.type == BOOLEAN) 
-					{
-						service->exiMsg.V2G_Message.Body.LineLockReq->ReqLockStatus = service->val.boolean;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 2: /*BulkChargingComplete*/
-		if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->BulkChargingComplete = service->val.boolean;
-						service->exiMsg.V2G_Message.Body.CurrentDemandReq->isused.BulkChargingComplete=1;
-
-						} else if(service->idPath.id[3] == 32)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryReq->DC_PEVPowerDeliveryParameter->BulkChargingComplete = service->val.boolean;
-						service->exiMsg.V2G_Message.Body.PowerDeliveryReq->DC_PEVPowerDeliveryParameter->isused.BulkChargingComplete=1;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 21: /*ChargingComplete*/
-		if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->ChargingComplete = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 32)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryReq->DC_PEVPowerDeliveryParameter->ChargingComplete = service->val.boolean;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;	
-			} /* close switch(service->eqn.localPart) */	
-		break;
-		case 6:
-			switch(service->eqn.localPart) {
-				case 132: /*SessionID*/
-		if(service->val.type == BINARY_HEX) 
-					{
-						if( service->idPath.id[1] == 4)
-						{
-							memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.SessionID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Header->SessionInformation.SessionID.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[1] == 0)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->SessionID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->SessionID.arraylen.data = service->val.binary.len;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 127: /*ServiceSessionID*/
-		if(service->val.type == BINARY_HEX) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.ServiceSessionID.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Header->SessionInformation.ServiceSessionID.arraylen.data = service->val.binary.len;
-						service->exiMsg.V2G_Message.Header->SessionInformation.isused.ServiceSessionID=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 107: /*ProtocolVersion*/
-		if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.ProtocolVersion.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->SessionInformation.ProtocolVersion.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Header->SessionInformation.isused.ProtocolVersion=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 67: /*FaultCode*/
-		if(service->val.type == ENUMERATION) 
-					{
-						service->exiMsg.V2G_Message.Header->Notification.FaultCode = service->val.enumeration;
-						service->exiMsg.V2G_Message.Header->Notification.isused.FaultCode=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 68: /*FaultMsg*/
-		if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Header->Notification.FaultMsg.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Notification.FaultMsg.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Header->Notification.isused.FaultMsg=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 13: /*Certificate*/
-		if(service->val.type == BINARY_BASE64) 
-					{
-						if( service->idPath.id[3] == 31)
-						{
-							memcpy(service->exiMsg.V2G_Message.Body.CertificateUpdateReq->ContractSignatureCertChain.Certificate.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.CertificateUpdateReq->ContractSignatureCertChain.Certificate.arraylen.data = service->val.binary.len;
-
-						} else if(service->idPath.id[2] == 75)
-						{
-				/*			memcpy(service->exiMsg.V2G_Message.Body.PaymentDetailsReq->ContractSignatureCertChain.SubCertificates.Certificate.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.PaymentDetailsReq->ContractSignatureCertChain.SubCertificates.Certificate.arraylen.data = service->val.binary.len; */
-
-						} else if(service->idPath.id[2] == 11)
-						{
-							/* memcpy(service->exiMsg.V2G_Message.Body.CertificateUpdateReq->ContractSignatureCertChain.SubCertificates.Certificate.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.CertificateUpdateReq->ContractSignatureCertChain.SubCertificates.Certificate.arraylen.data = service->val.binary.len; */
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 21: /*ConnectorLocked*/
-		if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[3] == 8 && service->idPath.id[2] == 61)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusReq->AC_PEVStatus->ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 8 && service->idPath.id[2] == 57)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptReq->AC_PEVStatus->ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 1)
-						{
-							service->exiMsg.V2G_Message.Body.LineLockReq->AC_PEVStatus.ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 35 && service->idPath.id[2] == 61)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusReq->DC_PEVStatus->ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 35 && service->idPath.id[2] == 57)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptReq->DC_PEVStatus->ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 3)
-						{
-							service->exiMsg.V2G_Message.Body.CableCheckReq->DC_PEVStatus.ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 84)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->DC_PEVStatus.ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->DC_PEVStatus.ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 126)
-						{
-							service->exiMsg.V2G_Message.Body.WeldingDetectionReq->DC_PEVStatus.ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 121)
-						{
-							service->exiMsg.V2G_Message.Body.TerminateChargingReq->DC_PEVStatus.ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 4)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->AC_PEVStatus.ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 30)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->DC_PEVStatus.ConnectorLocked = service->val.boolean;
-
-						}else if(service->idPath.id[3] == 6)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryReq->AC_PEVPowerDeliveryParameter->AC_PEVStatus.ConnectorLocked = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 32)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryReq->DC_PEVPowerDeliveryParameter->DC_PEVStatus.ConnectorLocked = service->val.boolean;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 98: /*PEVStandby*/
-		if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[3] == 8 && service->idPath.id[2] == 61)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusReq->AC_PEVStatus->PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 8 && service->idPath.id[2] == 57)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptReq->AC_PEVStatus->PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 1)
-						{
-							service->exiMsg.V2G_Message.Body.LineLockReq->AC_PEVStatus.PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 35 && service->idPath.id[2] == 61)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusReq->DC_PEVStatus->PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 35 && service->idPath.id[2] == 57)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptReq->DC_PEVStatus->PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 3)
-						{
-							service->exiMsg.V2G_Message.Body.CableCheckReq->DC_PEVStatus.PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 84)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->DC_PEVStatus.PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->DC_PEVStatus.PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 126)
-						{
-							service->exiMsg.V2G_Message.Body.WeldingDetectionReq->DC_PEVStatus.PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 121)
-						{
-							service->exiMsg.V2G_Message.Body.TerminateChargingReq->DC_PEVStatus.PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 4 && service->idPath.id[5] == 98)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->AC_PEVStatus.PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 30)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->DC_PEVStatus.PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 6)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryReq->AC_PEVPowerDeliveryParameter->AC_PEVStatus.PEVStandby = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 32)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryReq->DC_PEVPowerDeliveryParameter->DC_PEVStatus.PEVStandby = service->val.boolean;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 77: /*Multiplier*/
-		if(service->val.type == NBIT_UNSIGNED_INTEGER)
-					{
-						if( service->idPath.id[3] == 72)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->PEVRESSVoltage.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 74 && service->idPath.id[2] == 84)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->PEVTargetVoltage.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 67)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->PEVDemandCurrent.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 125 && service->idPath.id[2] == 84)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->VoltageDifferential.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 15)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->ChargeCurrentRequest.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 71)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumVoltageLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 69)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumCurrentLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 70)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumPowerLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 90)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->RemainingTimeToFullSoC.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 89)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->RemainingTimeToBulkSoC.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 74 && service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVTargetVoltage.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 37)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->CurrentDifferential.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[3] == 125 && service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->VoltageDifferential.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 39)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->EAmount.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 85)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMaxPower.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 86)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMaxVoltage.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 91)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMinVoltage.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 83)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMaxCurrent.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 90)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMinCurrent.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 87)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVMaximumCurrentLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 88)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVMaximumPowerLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 89)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVMaximumVoltageLimit.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 81)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVEnergyCapacity.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 82)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVEnergyRequest.Multiplier = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[4] == 75)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterReading.Multiplier = service->val.integer.val.int8;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 151: /*Unit*/
-		if(service->val.type == ENUMERATION) 
-					{
-						if( service->idPath.id[3] == 72)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->PEVRESSVoltage.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 74 && service->idPath.id[2] == 84)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->PEVTargetVoltage.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 67)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->PEVDemandCurrent.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 125 && service->idPath.id[2] == 84)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->VoltageDifferential.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 15)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->ChargeCurrentRequest.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 71)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumVoltageLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 69)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumCurrentLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 70)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumPowerLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 90)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->RemainingTimeToFullSoC.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 89)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->RemainingTimeToBulkSoC.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 74 && service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVTargetVoltage.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 37)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->CurrentDifferential.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[3] == 125 && service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->VoltageDifferential.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 39)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->EAmount.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 85)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMaxPower.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 86)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMaxVoltage.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 91)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMinVoltage.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 83)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMaxCurrent.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 90)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMinCurrent.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 87)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVMaximumCurrentLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 88)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVMaximumPowerLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 89)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVMaximumVoltageLimit.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 81)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVEnergyCapacity.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 82)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVEnergyRequest.Unit = service->val.enumeration;
-
-						} else if(service->idPath.id[4] == 75)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterReading.Unit = service->val.enumeration;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 152: /*Value*/
-		if(service->val.type == INTEGER) 
-					{
-
-						_setInt16Value( &(service->val.integer),&(service->val.integer.val.int16));
-
-						if( service->idPath.id[3] == 72)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->PEVRESSVoltage.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 74 && service->idPath.id[2] == 84)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->PEVTargetVoltage.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 67)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->PEVDemandCurrent.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 125 && service->idPath.id[2] == 84)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->VoltageDifferential.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 15)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->ChargeCurrentRequest.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 71)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumVoltageLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 69)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumCurrentLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 70)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumPowerLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 90)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->RemainingTimeToFullSoC.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 89)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->RemainingTimeToBulkSoC.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 74 && service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVTargetVoltage.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 37)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->CurrentDifferential.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[3] == 125 && service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->VoltageDifferential.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 39)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->EAmount.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 85)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMaxPower.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 86)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMaxVoltage.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 91)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMinVoltage.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 83)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMaxCurrent.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 90)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMinCurrent.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 87)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVMaximumCurrentLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 88)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVMaximumPowerLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 89)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVMaximumVoltageLimit.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 81)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVEnergyCapacity.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 82)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVEnergyRequest.Value = service->val.integer.val.int16;
-
-						} else if(service->idPath.id[4] == 75)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterReading.Value = service->val.integer.val.int16;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 66: /*EoC*/
-		if(service->val.type == INTEGER) 
-					{
-						_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->EoC));
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 84: /*PEVMaxPhases*/
-		if(service->val.type == NBIT_UNSIGNED_INTEGER)
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_PEVChargeParameter->PEVMaxPhases = service->val.integer.val.int8;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 96: /*PEVReady*/
-		if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[2] == 61)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusReq->DC_PEVStatus->PEVReady = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 57)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptReq->DC_PEVStatus->PEVReady = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 3)
-						{
-							service->exiMsg.V2G_Message.Body.CableCheckReq->DC_PEVStatus.PEVReady = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 84)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->DC_PEVStatus.PEVReady = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->DC_PEVStatus.PEVReady = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 126)
-						{
-							service->exiMsg.V2G_Message.Body.WeldingDetectionReq->DC_PEVStatus.PEVReady = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 121)
-						{
-							service->exiMsg.V2G_Message.Body.TerminateChargingReq->DC_PEVStatus.PEVReady = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 16)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->DC_PEVStatus.PEVReady = service->val.boolean;
-
-						} else if(service->idPath.id[2] == 80)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryReq->DC_PEVPowerDeliveryParameter->DC_PEVStatus.PEVReady = service->val.boolean;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 100: /*PEVStatusCode*/
-		if(service->val.type == ENUMERATION) 
-					{
-						if( service->idPath.id[2] == 61)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusReq->DC_PEVStatus->PEVStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 57)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptReq->DC_PEVStatus->PEVStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 3)
-						{
-							service->exiMsg.V2G_Message.Body.CableCheckReq->DC_PEVStatus.PEVStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 84)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->DC_PEVStatus.PEVStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->DC_PEVStatus.PEVStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 126)
-						{
-							service->exiMsg.V2G_Message.Body.WeldingDetectionReq->DC_PEVStatus.PEVStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 121)
-						{
-							service->exiMsg.V2G_Message.Body.TerminateChargingReq->DC_PEVStatus.PEVStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 16)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->DC_PEVStatus.PEVStatusCode = service->val.enumeration;
-
-						} else if(service->idPath.id[2] == 80)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryReq->DC_PEVPowerDeliveryParameter->DC_PEVStatus.PEVStatusCode = service->val.enumeration;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 95: /*PEVRESSSOC*/
-		if(service->val.type == NBIT_UNSIGNED_INTEGER)
-					{
-						if( service->idPath.id[2] == 61)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringStatusReq->DC_PEVStatus->PEVRESSSOC = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[2] == 57)
-						{
-							service->exiMsg.V2G_Message.Body.MeteringReceiptReq->DC_PEVStatus->PEVRESSSOC = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[2] == 3)
-						{
-							service->exiMsg.V2G_Message.Body.CableCheckReq->DC_PEVStatus.PEVRESSSOC = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[2] == 84)
-						{
-							service->exiMsg.V2G_Message.Body.PreChargeReq->DC_PEVStatus.PEVRESSSOC = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->DC_PEVStatus.PEVRESSSOC = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[2] == 126)
-						{
-							service->exiMsg.V2G_Message.Body.WeldingDetectionReq->DC_PEVStatus.PEVRESSSOC = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[2] == 121)
-						{
-							service->exiMsg.V2G_Message.Body.TerminateChargingReq->DC_PEVStatus.PEVRESSSOC = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[2] == 16)
-						{
-							service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->DC_PEVStatus.PEVRESSSOC = service->val.integer.val.int8;
-
-						} else if(service->idPath.id[2] == 80)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryReq->DC_PEVPowerDeliveryParameter->DC_PEVStatus.PEVRESSSOC = service->val.integer.val.int8;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 71: /*FullSOC*/
-		if(service->val.type == NBIT_UNSIGNED_INTEGER)
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->FullSOC = service->val.integer.val.int8;
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->isused.FullSOC=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 12: /*BulkSOC*/
-		if(service->val.type == NBIT_UNSIGNED_INTEGER)
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->BulkSOC = service->val.integer.val.int8;
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->isused.BulkSOC=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 94: /*PEVProtocolVersion*/
-		if(service->val.type == NBIT_UNSIGNED_INTEGER)
-					{
-						service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->PEVProtocolVersion = service->val.integer.val.int8;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 19: /*ChargingProfileEntryStart*/
-		if(service->val.type == INTEGER) 
-					{
-						_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.PowerDeliveryReq->ChargingProfile.ProfileEntry[service->exiMsg.V2G_Message.Body.PowerDeliveryReq->ChargingProfile.arraylen.ProfileEntry].ChargingProfileEntryStart));
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 18: /*ChargingProfileEntryMaxPower*/
-		if(service->val.type == INTEGER) 
-					{
-						service->exiMsg.V2G_Message.Body.PowerDeliveryReq->ChargingProfile.ProfileEntry[service->exiMsg.V2G_Message.Body.PowerDeliveryReq->ChargingProfile.arraylen.ProfileEntry].ChargingProfileEntryMaxPower = service->val.integer.val.int16;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 11: /*BulkChargingComplete*/
-		if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->BulkChargingComplete = service->val.boolean;
-						service->exiMsg.V2G_Message.Body.CurrentDemandReq->isused.BulkChargingComplete=1;
-
-						} else if(service->idPath.id[3] == 32)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryReq->DC_PEVPowerDeliveryParameter->BulkChargingComplete = service->val.boolean;
-						service->exiMsg.V2G_Message.Body.PowerDeliveryReq->DC_PEVPowerDeliveryParameter->isused.BulkChargingComplete=1;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 17: /*ChargingComplete*/
-		if(service->val.type == BOOLEAN) 
-					{
-						if( service->idPath.id[2] == 33)
-						{
-							service->exiMsg.V2G_Message.Body.CurrentDemandReq->ChargingComplete = service->val.boolean;
-
-						} else if(service->idPath.id[3] == 32)
-						{
-							service->exiMsg.V2G_Message.Body.PowerDeliveryReq->DC_PEVPowerDeliveryParameter->ChargingComplete = service->val.boolean;
-						}
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 72: /*MeterID*/
-		if(service->val.type == STRING) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterID.arraylen.data = service->val.string.len;
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.isused.MeterID=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 74: /*MeterPubKey*/
-		if(service->val.type == BINARY_BASE64) 
-					{
-						memcpy(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterPubKey.data, service->val.binary.data,service->val.binary.len);
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterPubKey.arraylen.data = service->val.binary.len;
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.isused.MeterPubKey=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 76: /*MeterStatus*/
-		if(service->val.type == INTEGER) 
-					{
-						_setInt16Value( &(service->val.integer),&(service->val.integer.val.int16));
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterStatus = service->val.integer.val.int16;
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.isused.MeterStatus=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;
-				case 139: /*TMeter*/
-		if(service->val.type == INTEGER) 
-					{
-						_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.TMeter));
-						service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.isused.TMeter=1;
-
-
-					} 
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-				break;	
-			} /* close switch(service->eqn.localPart) */	
-		break;
-	
-	} /* close switch(service->eqn.namespaceURI) */
-	return 0;
-}
-
-/**
- * Deserialize an attribute of the EXI stream
- * @return 0 = 0K; -1 = ERROR
- */
-static int deserializeAttributeCharacter(struct EXIService* service)
-{
-	switch(service->eqn.namespaceURI) {
-			case 0:
-				switch(service->eqn.localPart) {
-
-					case 2:/* Id */
-				if(service->val.type == STRING)
-					{
-
-
-						memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-						service->exiMsg.V2G_Message.Header->Security.Signature->attr_Id.arraylen.data = service->val.string.len;
-					}
-
-					else
-					{
-						return -1; /* wrong data type */
-					}
-
-					break;
-					case 0:/* Algorithm */
-						if(service->val.type == STRING)
-							{
-							if( service->idPath.id[5] == 0)
-									{
-							memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.CanonicalizationMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-							service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.CanonicalizationMethod.attr_Algorithm.arraylen.data = service->val.string.len;
-							}
-							else if( service->idPath.id[5] == 43)
-							{
-
-								memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.SignatureMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-								service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.SignatureMethod.attr_Algorithm.arraylen.data = service->val.string.len;
-							}
-							else if( service->idPath.id[6] == 5)
-							{
-
-								memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.Reference.DigestMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-								service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.Reference.DigestMethod.attr_Algorithm.arraylen.data = service->val.string.len;
-							}
-						}
-						break;
-						case 6:/* URI */
-							if(service->val.type == STRING)
-								{
-
-								memcpy(service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.Reference.attr_URI.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t));
-								service->exiMsg.V2G_Message.Header->Security.Signature->SignedInfo.Reference.attr_URI.arraylen.data = service->val.string.len;
-
-							}
-						break;
-				}
-			break;
-	}
-
-	return 0;
-}
-
-/**
- * Depending on the current EXI event a message element is deserialized or a
- * defined service method is called in here
- */
-static int deserializeElementOrServiceCall(struct EXIService* service)
-{
-
-	switch(service->eqn.namespaceURI) {
-		case 0:
-			switch(service->eqn.localPart) {
-			}
-		break;
-		case 4:
-			switch(service->eqn.localPart) {
-
-				case 14:/* KeyInfo */	
-	
- 					service->exiMsg.V2G_Message.Header->Security.Signature->isused.KeyInfo=1;
-
-				break;
-				case 42:/* Signature */	
-	
- 					service->exiMsg.V2G_Message.Header->Security.isused.Signature=1;
-
-				break;
-			}
-		break;
-		case 5:
-			switch(service->eqn.localPart) {
-				case 22:/* ChargingProfile */	
-	
- 					service->exiMsg.V2G_Message.Body.PowerDeliveryReq->isused.ChargingProfile=1;
-
-				break;
-				case 71:/* PEVMaximumVoltageLimit */	
-	
- 					service->exiMsg.V2G_Message.Body.CurrentDemandReq->isused.PEVMaximumVoltageLimit=1;
-
-				break;
-				case 69:/* PEVMaximumCurrentLimit */	
-	
- 					service->exiMsg.V2G_Message.Body.CurrentDemandReq->isused.PEVMaximumCurrentLimit=1;
-
-				break;
-				case 70:/* PEVMaximumPowerLimit */	
-	
- 					service->exiMsg.V2G_Message.Body.CurrentDemandReq->isused.PEVMaximumPowerLimit=1;
-
-				break;
-				case 90:/* RemainingTimeToFullSoC */	
-	
- 					service->exiMsg.V2G_Message.Body.CurrentDemandReq->isused.RemainingTimeToFullSoC=1;
-
-				break;
-				case 89:/* RemainingTimeToBulkSoC */	
-	
- 					service->exiMsg.V2G_Message.Body.CurrentDemandReq->isused.RemainingTimeToBulkSoC=1;
-
-				break;
-				case 114:/* SessionSetupReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					sessionSetup((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.SessionSetupReq), (service->exiMsg.V2G_Message.Body.SessionSetupRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.SessionSetupRes=1;
-					service->exiMsg.V2G_Message.Body.isused.SessionSetupReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 100:/* ServiceDiscoveryReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					serviceDiscovery((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq), (service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.ServiceDiscoveryRes=1;
-					service->exiMsg.V2G_Message.Body.isused.ServiceDiscoveryReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 96:/* ServiceDetailReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					serviceDetail((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.ServiceDetailReq), (service->exiMsg.V2G_Message.Body.ServiceDetailRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.ServiceDetailRes=1;
-					service->exiMsg.V2G_Message.Body.isused.ServiceDetailReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 106:/* ServicePaymentSelectionReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					selectedServicePayment((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.ServicePaymentSelectionReq), (service->exiMsg.V2G_Message.Body.ServicePaymentSelectionRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.ServicePaymentSelectionRes=1;
-					service->exiMsg.V2G_Message.Body.isused.ServicePaymentSelectionReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 75:/* PaymentDetailsReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					paymentDetails((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.PaymentDetailsReq), (service->exiMsg.V2G_Message.Body.PaymentDetailsRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.PaymentDetailsRes=1;
-					service->exiMsg.V2G_Message.Body.isused.PaymentDetailsReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 23:/* ContractAuthenticationReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					contractAuthentication((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.ContractAuthenticationReq), (service->exiMsg.V2G_Message.Body.ContractAuthenticationRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.ContractAuthenticationRes=1;
-					service->exiMsg.V2G_Message.Body.isused.ContractAuthenticationReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 16:/* ChargeParameterDiscoveryReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					chargeParameterDiscovery((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq), (service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.ChargeParameterDiscoveryRes=1;
-					service->exiMsg.V2G_Message.Body.isused.ChargeParameterDiscoveryReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 80:/* PowerDeliveryReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					powerDelivery((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.PowerDeliveryReq), (service->exiMsg.V2G_Message.Body.PowerDeliveryRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.PowerDeliveryRes=1;
-					service->exiMsg.V2G_Message.Body.isused.PowerDeliveryReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 61:/* MeteringStatusReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					meteringStatus((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.MeteringStatusReq), (service->exiMsg.V2G_Message.Body.MeteringStatusRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.MeteringStatusRes=1;
-					service->exiMsg.V2G_Message.Body.isused.MeteringStatusReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 57:/* MeteringReceiptReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					meteringReceipt((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.MeteringReceiptReq), (service->exiMsg.V2G_Message.Body.MeteringReceiptRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.MeteringReceiptRes=1;
-					service->exiMsg.V2G_Message.Body.isused.MeteringReceiptReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 11:/* CertificateUpdateReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					certificateUpdate((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.CertificateUpdateReq), (service->exiMsg.V2G_Message.Body.CertificateUpdateRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.CertificateUpdateRes=1;
-					service->exiMsg.V2G_Message.Body.isused.CertificateUpdateReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 7:/* CertificateInstallationReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					certificateInstallation((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.CertificateInstallationReq), (service->exiMsg.V2G_Message.Body.CertificateInstallationRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.CertificateInstallationRes=1;
-					service->exiMsg.V2G_Message.Body.isused.CertificateInstallationReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 52:/* LineLockReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					lineLock((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.LineLockReq), (service->exiMsg.V2G_Message.Body.LineLockRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.LineLockRes=1;
-					service->exiMsg.V2G_Message.Body.isused.LineLockReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 3:/* CableCheckReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					cableCheck((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.CableCheckReq), (service->exiMsg.V2G_Message.Body.CableCheckRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.CableCheckRes=1;
-					service->exiMsg.V2G_Message.Body.isused.CableCheckReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 84:/* PreChargeReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					preCharge((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.PreChargeReq), (service->exiMsg.V2G_Message.Body.PreChargeRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.PreChargeRes=1;
-					service->exiMsg.V2G_Message.Body.isused.PreChargeReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 33:/* CurrentDemandReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					currentDemand((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.CurrentDemandReq), (service->exiMsg.V2G_Message.Body.CurrentDemandRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.CurrentDemandRes=1;
-					service->exiMsg.V2G_Message.Body.isused.CurrentDemandReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 126:/* WeldingDetectionReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					weldingDetection((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.WeldingDetectionReq), (service->exiMsg.V2G_Message.Body.WeldingDetectionRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.WeldingDetectionRes=1;
-					service->exiMsg.V2G_Message.Body.isused.WeldingDetectionReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-				case 121:/* TerminateChargingReq */	
-	
- 		
-			
-							
-					/* test, if data length is unequal to the expected payload  */
-					/*if((service->inStream.size)!= *(service->inStream.pos))
-					{
-						service->errorCode = EXI_NON_VALID_MESSAGE;
-						return -1;
-					}	*/		
-			
-					/* service call */
-					terminateCharging((service->exiMsg.V2G_Message.Header),(service->exiMsg.V2G_Message.Body.TerminateChargingReq), (service->exiMsg.V2G_Message.Body.TerminateChargingRes));
-							
-					/* signalize the response message */
-					service->exiMsg.V2G_Message.Body.isused.TerminateChargingRes=1;
-					service->exiMsg.V2G_Message.Body.isused.TerminateChargingReq=0;
-					
-					/* serialize the response data */
-					if(serialize_message(service))
-					{
-						/* serializiation error*/
-						service->errorCode= EXI_SERIALIZATION_FAILED;
-					} 
-
-			
-		
-				break;
-			}
-		break;
-		case 6:
-			switch(service->eqn.localPart) {
-				case 110:/* Service */	
-	
- 					service->exiMsg.V2G_Message.Body.ServicePaymentSelectionReq->ServiceList.arraylen.Service++;
-
-				break;
-				case 137:/* SubCertificates */	
-	
- 		if( service->idPath.id[2] == 75)
-				{
-								service->exiMsg.V2G_Message.Body.PaymentDetailsReq->ContractSignatureCertChain.isused.SubCertificates=1;
-
-				} else if(service->idPath.id[2] == 11)
-				{
-								service->exiMsg.V2G_Message.Body.CertificateUpdateReq->ContractSignatureCertChain.isused.SubCertificates=1;
-				}
-
-				break;
-				case 88:/* PEVMaximumPowerLimit */	
-	
- 					service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->isused.PEVMaximumPowerLimit=1;
-
-				break;
-				case 81:/* PEVEnergyCapacity */	
-	
- 					service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->isused.PEVEnergyCapacity=1;
-
-				break;
-				case 82:/* PEVEnergyRequest */	
-	
- 					service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->DC_PEVChargeParameter->isused.PEVEnergyRequest=1;
-
-				break;
-				case 4:/* AC_PEVChargeParameter */	
-	
- 					service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->isused.AC_PEVChargeParameter=1;
-
-				break;
-				case 30:/* DC_PEVChargeParameter */	
-	
- 					service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->isused.DC_PEVChargeParameter=1;
-
-				break;
-				case 105:/* ProfileEntry */	
-	
- 					service->exiMsg.V2G_Message.Body.PowerDeliveryReq->ChargingProfile.arraylen.ProfileEntry++;
-
-				break;
-				case 6:/* AC_PEVPowerDeliveryParameter */	
-	
- 					service->exiMsg.V2G_Message.Body.PowerDeliveryReq->isused.AC_PEVPowerDeliveryParameter=1;
-
-				break;
-				case 32:/* DC_PEVPowerDeliveryParameter */	
-	
- 					service->exiMsg.V2G_Message.Body.PowerDeliveryReq->isused.DC_PEVPowerDeliveryParameter=1;
-
-				break;
-				case 8:/* AC_PEVStatus */	
-	
- 		if( service->idPath.id[2] == 61)
-				{
-								service->exiMsg.V2G_Message.Body.MeteringStatusReq->isused.AC_PEVStatus=1;
-
-				} else if(service->idPath.id[2] == 57)
-				{
-								service->exiMsg.V2G_Message.Body.MeteringReceiptReq->isused.AC_PEVStatus=1;
-				}
-
-				break;
-				case 35:/* DC_PEVStatus */	
-	
- 		if( service->idPath.id[2] == 61)
-				{
-								service->exiMsg.V2G_Message.Body.MeteringStatusReq->isused.DC_PEVStatus=1;
-
-				} else if(service->idPath.id[2] == 57)
-				{
-								service->exiMsg.V2G_Message.Body.MeteringReceiptReq->isused.DC_PEVStatus=1;
-				}
-
-				break;
-				case 75:/* MeterReading */	
-	
- 					service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.isused.MeterReading=1;
-
-				break;
-				case 135:/* SigMeterReading */	
-	
- 					service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.isused.SigMeterReading=1;
-
-				break;
-			}
-		break;
-		case 8:
-			switch(service->eqn.localPart) {
-				case 1:/* Notification */	
-	
- 					service->exiMsg.V2G_Message.Header->isused.Notification=1;
-
-				break;
-				case 2:/* Security */	
-	
- 					service->exiMsg.V2G_Message.Header->isused.Security=1;
-
-				break;
-			}
-		break;
-		
-
-	}
-	return 0;
-}
-static int deserializeSessionSetupReqMsg(struct EXIService* service)
-{
-	struct SessionSetupReqType reqMsg;
-	struct SessionSetupResType resMsg;
-	service->exiMsg.V2G_Message.Body.SessionSetupReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.SessionSetupRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeServiceDiscoveryReqMsg(struct EXIService* service)
-{
-	struct ServiceDiscoveryReqType reqMsg;
-	struct ServiceDiscoveryResType resMsg;
-	init_ServiceDiscoveryReqType(&reqMsg);
-	
-	service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeServiceDetailReqMsg(struct EXIService* service)
-{
-	struct ServiceDetailReqType reqMsg;
-	struct ServiceDetailResType resMsg;
-	service->exiMsg.V2G_Message.Body.ServiceDetailReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.ServiceDetailRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeServicePaymentSelectionReqMsg(struct EXIService* service)
-{
-	struct ServicePaymentSelectionReqType reqMsg;
-	struct ServicePaymentSelectionResType resMsg;
-	service->exiMsg.V2G_Message.Body.ServicePaymentSelectionReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.ServicePaymentSelectionRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializePaymentDetailsReqMsg(struct EXIService* service)
-{
-	struct PaymentDetailsReqType reqMsg;
-	struct PaymentDetailsResType resMsg;
-	init_PaymentDetailsReqType(&reqMsg);
-	
-	service->exiMsg.V2G_Message.Body.PaymentDetailsReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.PaymentDetailsRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeContractAuthenticationReqMsg(struct EXIService* service)
-{
-	struct ContractAuthenticationReqType reqMsg;
-	struct ContractAuthenticationResType resMsg;
-	service->exiMsg.V2G_Message.Body.ContractAuthenticationReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.ContractAuthenticationRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeChargeParameterDiscoveryReqMsg(struct EXIService* service)
-{
-	struct ChargeParameterDiscoveryReqType reqMsg;
-	struct ChargeParameterDiscoveryResType resMsg;
-	struct DC_PEVChargeParameterType dc_pev;
-	struct AC_PEVChargeParameterType ac_pev;
-	struct DC_EVSEChargeParameterType dc_evse;
-	struct AC_EVSEChargeParameterType ac_evse;
-
-	init_ChargeParameterDiscoveryReqType(&reqMsg);
-	init_DC_EVSEChargeParameterType(&dc_evse);
-	init_AC_EVSEChargeParameterType(&ac_evse);
-	init_DC_PEVChargeParameterType(&dc_pev);
-	init_AC_PEVChargeParameterType(&ac_pev);
-	
-	reqMsg.AC_PEVChargeParameter = &ac_pev;
-	reqMsg.DC_PEVChargeParameter = &dc_pev;
-	resMsg.AC_EVSEChargeParameter = &ac_evse;
-	resMsg.DC_EVSEChargeParameter= &dc_evse;
-
-	service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeLineLockReqMsg(struct EXIService* service)
-{
-	struct LineLockReqType reqMsg;
-	struct LineLockResType resMsg;
-	init_LineLockReqType(&reqMsg);
-	
-	service->exiMsg.V2G_Message.Body.LineLockReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.LineLockRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializePowerDeliveryReqMsg(struct EXIService* service)
-{
-	struct PowerDeliveryReqType reqMsg;
-	struct PowerDeliveryResType resMsg;
-	struct DC_PEVPowerDeliveryParameterType dc_pev;
-	struct AC_PEVPowerDeliveryParameterType ac_pev;
-	struct DC_EVSEStatusType dc_evse;
-	struct AC_EVSEStatusType ac_evse;
-
-	init_PowerDeliveryReqType(&reqMsg);
-	init_DC_PEVPowerDeliveryParameterType(&dc_pev);
-	init_AC_PEVPowerDeliveryParameterType(&ac_pev);
-
-	reqMsg.AC_PEVPowerDeliveryParameter = &ac_pev;
-	reqMsg.DC_PEVPowerDeliveryParameter = &dc_pev;
-	resMsg.AC_EVSEStatus = &ac_evse;
-	resMsg.DC_EVSEStatus = &dc_evse;
-
-	service->exiMsg.V2G_Message.Body.PowerDeliveryReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.PowerDeliveryRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeMeteringStatusReqMsg(struct EXIService* service)
-{
-	struct MeteringStatusReqType reqMsg;
-	struct MeteringStatusResType resMsg;
-	struct DC_PEVStatusType dc_pev;
-	struct AC_PEVStatusType ac_pev;
-	struct DC_EVSEStatusType dc_evse;
-	struct AC_EVSEStatusType ac_evse;
-
-	reqMsg.AC_PEVStatus=&ac_pev;
-	reqMsg.DC_PEVStatus=&dc_pev;
-	resMsg.DC_EVSEStatus=&dc_evse;
-	resMsg.AC_EVSEStatus=&ac_evse;
-
-	init_MeteringStatusReqType(&reqMsg);
-
-	service->exiMsg.V2G_Message.Body.MeteringStatusReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.MeteringStatusRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeMeteringReceiptReqMsg(struct EXIService* service)
-{
-	struct MeteringReceiptReqType reqMsg;
-	struct MeteringReceiptResType resMsg;
-	struct DC_PEVStatusType dc_pev;
-	struct AC_PEVStatusType ac_pev;
-	struct DC_EVSEStatusType dc_evse;
-	struct AC_EVSEStatusType ac_evse;
-
-	reqMsg.AC_PEVStatus=&ac_pev;
-	reqMsg.DC_PEVStatus=&dc_pev;
-	resMsg.DC_EVSEStatus=&dc_evse;
-	resMsg.AC_EVSEStatus=&ac_evse;
-
-	init_MeteringReceiptReqType(&reqMsg);
-	
-	service->exiMsg.V2G_Message.Body.MeteringReceiptReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.MeteringReceiptRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeCertificateUpdateReqMsg(struct EXIService* service)
-{
-	struct CertificateUpdateReqType reqMsg;
-	struct CertificateUpdateResType resMsg;
-	init_CertificateUpdateReqType(&reqMsg);
-	
-	service->exiMsg.V2G_Message.Body.CertificateUpdateReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.CertificateUpdateRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeCertificateInstallationReqMsg(struct EXIService* service)
-{
-	struct CertificateInstallationReqType reqMsg;
-	struct CertificateInstallationResType resMsg;
-	service->exiMsg.V2G_Message.Body.CertificateInstallationReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.CertificateInstallationRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeCableCheckReqMsg(struct EXIService* service)
-{
-	struct CableCheckReqType reqMsg;
-	struct CableCheckResType resMsg;
-	service->exiMsg.V2G_Message.Body.CableCheckReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.CableCheckRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializePreChargeReqMsg(struct EXIService* service)
-{
-	struct PreChargeReqType reqMsg;
-	struct PreChargeResType resMsg;
-	init_PreChargeReqType(&reqMsg);
-	
-	service->exiMsg.V2G_Message.Body.PreChargeReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.PreChargeRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeCurrentDemandReqMsg(struct EXIService* service)
-{
-	struct CurrentDemandReqType reqMsg;
-	struct CurrentDemandResType resMsg;
-	init_CurrentDemandReqType(&reqMsg);
-	
-	service->exiMsg.V2G_Message.Body.CurrentDemandReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.CurrentDemandRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeWeldingDetectionReqMsg(struct EXIService* service)
-{
-	struct WeldingDetectionReqType reqMsg;
-	struct WeldingDetectionResType resMsg;
-	service->exiMsg.V2G_Message.Body.WeldingDetectionReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.WeldingDetectionRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-
-static int deserializeTerminateChargingReqMsg(struct EXIService* service)
-{
-	struct TerminateChargingReqType reqMsg;
-	struct TerminateChargingResType resMsg;
-	service->exiMsg.V2G_Message.Body.TerminateChargingReq = &reqMsg;
-	service->exiMsg.V2G_Message.Body.TerminateChargingRes = &resMsg;
-	
-	return deserializeMessage(service);
-}
-/** 
- * Deserialize the EXI stream
- * @return 0 = 0K; -1 = ERROR
- */
-static int deserializeMessage(struct EXIService* service)
-{
-	int noEndOfDocument = 1; /* true */
-	int returnCode=0;
-
-
-	do {
-			exiDecodeNextEvent(&(service->inStream), &(service->stateDecode), &(service->event));
-			if (returnCode) 
-			{
-				
-				if(service->errorCode==0) 
-				{
-					service->errorCode= EXI_NON_VALID_MESSAGE;
-				}
-			
-				return returnCode;
-			}
-
-			switch (service->event) {
-			case START_DOCUMENT:
-
-				returnCode = exiDecodeStartDocument(&(service->inStream), &(service->stateDecode));
-
-				break;
-			case END_DOCUMENT:
-
-				returnCode = exiDecodeEndDocument(&(service->inStream), &(service->stateDecode));
-				noEndOfDocument = 0; /* false */
-				break;
-			case START_ELEMENT:
-				returnCode = exiDecodeStartElement(&(service->inStream), &(service->stateDecode), &(service->eqn));
-				service->idPath.id[service->idPath.pos++]=service->eqn.localPart;
-				 
-				 /* setup the request context*/
-				 if(service->eqn.localPart==114 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeSessionSetupReqMsg(service);
-				   } else if(service->eqn.localPart==100 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeServiceDiscoveryReqMsg(service);
-				   } else if(service->eqn.localPart==96 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeServiceDetailReqMsg(service);
-				   } else if(service->eqn.localPart==106 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeServicePaymentSelectionReqMsg(service);
-				   } else if(service->eqn.localPart==75 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializePaymentDetailsReqMsg(service);
-				   } else if(service->eqn.localPart==23 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeContractAuthenticationReqMsg(service);
-				   } else if(service->eqn.localPart==16 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeChargeParameterDiscoveryReqMsg(service);
-				   } else if(service->eqn.localPart==80 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializePowerDeliveryReqMsg(service);
-				   } else if(service->eqn.localPart==61 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeMeteringStatusReqMsg(service);
-				   } else if(service->eqn.localPart==57 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeMeteringReceiptReqMsg(service);
-				   } else if(service->eqn.localPart==11 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeCertificateUpdateReqMsg(service);
-				   } else if(service->eqn.localPart==7 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeCertificateInstallationReqMsg(service);
-				   } else if(service->eqn.localPart==52 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeLineLockReqMsg(service);
-				   } else if(service->eqn.localPart==3 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeCableCheckReqMsg(service);
-				   } else if(service->eqn.localPart==84 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializePreChargeReqMsg(service);
-				   } else if(service->eqn.localPart==33 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeCurrentDemandReqMsg(service);
-				   } else if(service->eqn.localPart==126 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeWeldingDetectionReqMsg(service);
-				   } else if(service->eqn.localPart==121 && service->eqn.namespaceURI==5)
-				  {
-				 	return deserializeTerminateChargingReqMsg(service);
-				   } 				 
-				 
-				 
-				break;
-			case END_ELEMENT:
-
-				returnCode = exiDecodeEndElement(&(service->inStream), &(service->stateDecode), &(service->eqn));
-				returnCode = deserializeElementOrServiceCall(service);
-				service->idPath.pos--;
-				 
-				break;
-			case CHARACTERS:
-				/* decode */
-				returnCode = exiDecodeCharacters(&(service->inStream), &(service->stateDecode), &(service->val));
-				 
-				/* assign data to the EXI message structure */
-				returnCode = deserializeElementCharacter(service);
-				break;
-			case ATTRIBUTE:
-				/* decode */
-				returnCode = exiDecodeAttribute(&(service->inStream), &(service->stateDecode), &(service->eqn), &(service->val));
-				returnCode = deserializeAttributeCharacter(service);
-				break;
-			default:
-				/* ERROR */
-				return -1;
-			}
-
-		} while (noEndOfDocument);
-
-	return 0;
-}
-
-
-/** 
- * \brief Takes the EXI stream, invokes the called service method, and provides the response EXI stream
- * \param	service   struct EXIService* Represent the service data structure
- * \param	inStream   uint8_t* EXI in stream
- * \param	sizeInStream   uint16_t Length of the inStream
- * \param	outStream   uint8_t* Represent the out stream
- * \param	sizeOutStream   uint16_t Size of the out stream
- * \param	outStreamLength   uint16_t* Length of the stream
- * \return  0 = 0K; -1 = ERROR
- */
-int messageDispatcher(struct EXIService* service, uint8_t* inStream, uint16_t sizeInStream, uint8_t* outStream, uint16_t sizeOutStream, uint16_t* outStreamLength)
-{
-	struct MessageHeaderType header;
-	struct SignatureType signature;
-
-	uint32_t inPos, outPos;
-	
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-	
-	/* assign inStream data to service EXI structure */
-	inPos = service->transportHeaderOffset;
-	service->inStream.data = inStream;
-	service->inStream.size = sizeInStream+inPos;
-	service->inStream.pos = &inPos;
-	service->inStream.buffer=0;
-	service->inStream.capacity=0;
-
-	
-	/* assign outStream data to service EXI structure */
-	outPos=service->transportHeaderOffset;
-	service->outStream.data = outStream;
-	service->outStream.size = sizeOutStream;
-	service->outStream.pos = &outPos;
-	service->outStream.buffer=0;
-	service->outStream.capacity=8;
-	
-	/* clear error code */
-	service->errorCode = 0;
-	
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode);
-	
-	/* init encoder (write header, set initial state) */
-	exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode);
-
-	/* init uniqueID stack */
-	service->idPath.pos=0;
-
-	init_MessageHeaderType(&header);
-	service->exiMsg.V2G_Message.Header = &header;
-	service->exiMsg.V2G_Message.Header->Security.Signature=&signature;
-
-	/* init EXI message */
-	init_EXIDocumentType(&(service->exiMsg));
-
-	/* deserialize the input stream and call the corresponding service */
-	if(deserializeMessage(service))
-	{
-		return -1; /* something went wrong */
-	}
-
-	/* determine payload size (without transport offset) */	
-	outPos -= service->transportHeaderOffset;
-	*outStreamLength = outPos;
-
-	
-	return 0;
-}
-
-/** 
- * \brief Init the v2g service data structure
- * \param	service   struct EXIService* Service data structure
- * \param	bytes   bytes_t setted up byte data structure
- * \param	string_ucs_t   setted up string data structure
- * \param	transportHeaderOffset uint16_t Transport protocol offset
- * \return  0 = 0K; -1 = ERROR
- */
-int init_v2gservice(struct EXIService* service, bytes_t bytes, string_ucs_t string, uint16_t transportHeaderOffset)
-{
-
-	/* init byte array */
-	 service->val.binary = bytes;
-
-	/* init string array */
-	 service->val.string = string;
-
-	/* init offset for transport protocoll */
-	 service->transportHeaderOffset=transportHeaderOffset;
-
-	return 0;
-}

+ 0 - 43
src/service/v2g_serviceDispatcher.h

@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2007-2010 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef V2GSERVER_H_
-#define V2GSERVER_H_
-
-#include "v2g_serviceDataTypes.h"
-
-
-int init_v2gservice(struct EXIService* service,bytes_t bytes, string_ucs_t string, uint16_t transportHeaderOffset);
-int messageDispatcher(struct EXIService* service, uint8_t* inStream, uint16_t sizeInStream, uint8_t* outStream, uint16_t sizeOutStream, uint16_t* outPos);
-
-#endif /* V2GSERVER_H_ */
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 89
src/service/v2g_serviceMethods.h

@@ -1,89 +0,0 @@
-
-
-
-
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXISeGen</p>
- *
- ********************************************************************/
-
- 
- #ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef SERVICEMETHODS_H
-#define SERVICEMETHODS_H
-
-#include "v2g_serviceDataTypes.h"
-#include "EXITypes.h"
-
-/* This service methods has to be implemented by the EVSE server */
-int	sessionSetup(struct MessageHeaderType* header, struct SessionSetupReqType* param, struct SessionSetupResType* result);
-					
-int	serviceDiscovery(struct MessageHeaderType* header, struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result);
-					
-int	serviceDetail(struct MessageHeaderType* header, struct ServiceDetailReqType* param, struct ServiceDetailResType* result);
-					
-int	selectedServicePayment(struct MessageHeaderType* header, struct ServicePaymentSelectionReqType* param, struct ServicePaymentSelectionResType* result);
-					
-int	paymentDetails(struct MessageHeaderType* header, struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result);
-					
-int	contractAuthentication(struct MessageHeaderType* header, struct ContractAuthenticationReqType* param, struct ContractAuthenticationResType* result);
-					
-int	chargeParameterDiscovery(struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* param, struct ChargeParameterDiscoveryResType* result);
-					
-int	powerDelivery(struct MessageHeaderType* header, struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result);
-					
-int	meteringStatus(struct MessageHeaderType* header, struct MeteringStatusReqType* param, struct MeteringStatusResType* result);
-					
-int	meteringReceipt(struct MessageHeaderType* header, struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result);
-					
-int	certificateUpdate(struct MessageHeaderType* header, struct CertificateUpdateReqType* param, struct CertificateUpdateResType* result);
-					
-int	certificateInstallation(struct MessageHeaderType* header, struct CertificateInstallationReqType* param, struct CertificateInstallationResType* result);
-					
-int	lineLock(struct MessageHeaderType* header, struct LineLockReqType* param, struct LineLockResType* result);
-					
-int	cableCheck(struct MessageHeaderType* header, struct CableCheckReqType* param, struct CableCheckResType* result);
-					
-int	preCharge(struct MessageHeaderType* header, struct PreChargeReqType* param, struct PreChargeResType* result);
-					
-int	currentDemand(struct MessageHeaderType* header, struct CurrentDemandReqType* param, struct CurrentDemandResType* result);
-					
-int	weldingDetection(struct MessageHeaderType* header, struct WeldingDetectionReqType* param, struct WeldingDetectionResType* result);
-					
-int	terminateCharging(struct MessageHeaderType* header, struct TerminateChargingReqType* param, struct TerminateChargingResType* result);
-						
-	
-
-	
-	
-	
-#endif
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 87
src/test/evse_server.c

@@ -1,87 +0,0 @@
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @@version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-#include "evse_server.h"
-#include "v2g_service.h"
-#include "v2g_serviceDispatcher.h"
-#include "v2gtp.h"
-
-#define MAX_BYTE_SIZE 64
-#define MAX_STRING_SIZE 64
-#define MAX_STREAM_SIZE 100
-
-int testV2GService(uint8_t* inStream, uint16_t inStreamLength, uint8_t* outStream, uint16_t* outStreamLength)
-{
-	static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/
-	static uint32_t string_array[MAX_STRING_SIZE]; /* define MAX_STRING_SIZE before*/
-
-
-	uint16_t exiMsgLength;
-
-	struct EXIService service;
-
-	/* BINARY memory setup */
-	bytes_t bytes = { MAX_BYTE_SIZE, byte_array, 0 };
-
-	/* STRING memory setup */
-	string_ucs_t string = { MAX_STRING_SIZE, string_array, 0 };
-
-	/**********************************************
-	 * Init V2G server and initialize array types *
-	 * for the EXI decoding	as well as the offset *
-	 * for the transportation header			  *
-	 **********************************************/
-
-	init_v2gservice(&service, bytes, string, V2GTP_HEADER_LENGTH);
-
-	/* check, if the DoIP header is correct and determine payload */
-	if(read_v2gtpHeader(inStream,inStreamLength, &exiMsgLength))
-	{
-		/* v2gtp header not correct */
-		return -1;
-	}
-
-	/****************************************************************************
-	 * Pass the received EXI message stream (inStream + exiMsgLength) to the    *
-	 * v2g message dispatcher. 	The outStream contains the response message     *
-	 * stream.  																*
-	 ****************************************************************************/
-
-	if(messageDispatcher(&service, inStream, exiMsgLength, outStream, MAX_STREAM_SIZE, outStreamLength))
-	{
-		/* an error occured */
-
-	}
-	else
-	{
-		/* write v2gtp header */
-		write_v2gtpHeader(outStream, outStreamLength, V2GTP_EXI_TYPE);
-
-	}
-
-
-	return 0;
-
-}

+ 0 - 33
src/test/evse_server.h

@@ -1,33 +0,0 @@
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @@version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-#ifndef V2G_SERVER_H_
-#define V2G_SERVER_H_
-
-#include "EXITypes.h"
-
-int testV2GService(uint8_t* inStream, uint16_t inStreamLength, uint8_t* outStream,uint16_t* outStreamLength);
-
-#endif /* V2G_SERVER_H_ */

+ 0 - 569
src/test/evse_serviceMethods.c

@@ -1,569 +0,0 @@
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-#include "v2g_serviceMethods.h"
-#include "v2g_serviceDataTypes.h"
-#include <stdio.h>
-
-int	sessionSetup(struct MessageHeaderType* header, struct SessionSetupReqType* param, struct SessionSetupResType* result)
-{
-
-	printf("EVSE: sessionSetup called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t Header SessionID=%d\n",header->SessionInformation.SessionID.data[0]);
-	printf("\t\t PEVID=%d\n",param->PEVID.data[0]);
-
-	header->SessionInformation.SessionID.data[0] = 10;
-	header->SessionInformation.SessionID.arraylen.data=1;
-
-	/* Prepare data for PEV */
-	result->ResponseCode = OK_responseCodeType;
-	result->EVSEID.data[0]=1;
-	result->EVSEID.arraylen.data=1;
-	result->TCurrent=12345678;
-
-	return 0;
-
-}
-
-int	serviceDiscovery(struct MessageHeaderType* header, struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result)
-{
-	printf("EVSE: serviceDiscovery called\n"  );
-	printf("\tReceived data:\n");
-
-	printf("\t\t ServiceType=%d\n", param->ServiceType);
-
-	result->isused.ServiceList=0;
-	result->ResponseCode= OK_responseCodeType;
-	result->ChargeService.ServiceTag.ServiceID.data[0]=1;
-	result->ChargeService.ServiceTag.ServiceID.arraylen.data=1;
-
-	result->ChargeService.ServiceTag.isused.ServiceName=0;
-	result->ChargeService.ServiceTag.isused.ServiceCategory=0;
-	result->ChargeService.ServiceTag.isused.ServiceScope=0;
-
-	result->ChargeService.FreeService = 1;
-	result->PaymentOptions.PaymentOption[0] = ExternalPayment_paymentOptionType; /* only free of charge yet ;-) */
-	result->PaymentOptions.arraylen.PaymentOption=1;
-	result->ChargeService.EnergyTransferType = DC_core_EVSESupportedEnergyTransferType;
-
-	result->isused.ServiceList=0;
-
-	return 0;
-}
-
-int	selectedServicePayment(struct MessageHeaderType* header, struct ServicePaymentSelectionReqType* param, struct ServicePaymentSelectionResType* result)
-{
-	return 0;
-}
-
-int	paymentDetails(struct MessageHeaderType* header, struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result)
-{
-	return 0;
-}
-
-int	chargeParameterDiscovery(struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* param, struct ChargeParameterDiscoveryResType* result)
-{
-	struct FloatingValueType f;
-
-	printf("EVSE: chargeParameterDiscovery called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVRequestedEnergyTransferType=%d\n",param->PEVRequestedEnergyTransferType);
-
-	/* check,if DC or AC is requested */
-	if(param->PEVRequestedEnergyTransferType==DC_core_PEVRequestedEnergyTransferType || param->isused.DC_PEVChargeParameter==1)
-	{
-
-		printf("\t\t PEVStatus:\n\t\t\t PEVStandby=%d\n",param->DC_PEVChargeParameter->DC_PEVStatus.PEVStandby);
-		printf("\t\t\t PEVReady=%d\n", param->DC_PEVChargeParameter->DC_PEVStatus.PEVReady);
-		printf("\t\t\t PEVRESSSOC=%d\n", param->DC_PEVChargeParameter->DC_PEVStatus.PEVRESSSOC);
-		printf("\t\t\t PEVStatusCode=%d\n", param->DC_PEVChargeParameter->DC_PEVStatus.PEVStatusCode);
-		printf("\t\t\t ConnectorLocked=%d\n", param->DC_PEVChargeParameter->DC_PEVStatus.ConnectorLocked);
-
-		printf("\t\t PEVMaximumCurrentLimit=%d\n", param->DC_PEVChargeParameter->PEVMaximumCurrentLimit.Value);
-		printf("\t\t PEVMaximumPowerLimit=%d\n", param->DC_PEVChargeParameter->PEVMaximumPowerLimit.Value);
-		printf("\t\t PEVMaximumVoltageLimit=%d\n", param->DC_PEVChargeParameter->PEVMaximumVoltageLimit.Value);
-		printf("\t\t PEVEnergyCapacity=%d\n", param->DC_PEVChargeParameter->PEVEnergyCapacity.Value);
-		printf("\t\t PEVEnergyRequest=%d\n", param->DC_PEVChargeParameter->PEVEnergyRequest.Value);
-		printf("\t\t FullSOC=%d\n", param->DC_PEVChargeParameter->FullSOC);
-		printf("\t\t BulkSOC=%d\n", param->DC_PEVChargeParameter->BulkSOC);
-		printf("\t\t PEVProtocolVersion=%d\n", param->DC_PEVChargeParameter->PEVProtocolVersion);
-
-		result->ResponseCode = OK_responseCodeType;
-		result->isused.EnergyProvider=0;
-		result->isused.TariffTable=0;
-
-
-		result->isused.DC_EVSEChargeParameter = 1;
-		result->isused.AC_EVSEChargeParameter = 0;
-		result->DC_EVSEChargeParameter->DC_EVSEStatus.EVSEStandby = 1;
-		result->DC_EVSEChargeParameter->DC_EVSEStatus.EVSEStatusCode = IsolationMonitoringActive_DC_EVSEStatusCodeType;
-
-		f.Multiplier = 0;
-		f.Unit = A_unitSymbolType;
-		f.Value = 100;
-
-		result->DC_EVSEChargeParameter->EVSEMaximumCurrentLimit=f;
-
-		f.Unit = W_unitSymbolType;
-		f.Value = 200;
-
-		result->DC_EVSEChargeParameter->EVSEMaximumPowerLimit=f;
-		result->DC_EVSEChargeParameter->isused.EVSEMaximumPowerLimit=1;
-
-		f.Unit = V_unitSymbolType;
-		f.Value = 300;
-
-		result->DC_EVSEChargeParameter->EVSEMaximumVoltageLimit=f;
-
-		f.Unit = A_unitSymbolType;
-		f.Value = 400;
-
-		result->DC_EVSEChargeParameter->EVSEMinimumCurrentLimit=f;
-
-		f.Unit = V_unitSymbolType;
-		f.Value = 500;
-
-		result->DC_EVSEChargeParameter->EVSEMinimumVoltageLimit=f;
-
-		f.Unit = A_unitSymbolType;
-		f.Value = 600;
-
-		result->DC_EVSEChargeParameter->EVSECurrentRegulationTolerance=f;
-		result->DC_EVSEChargeParameter->isused.EVSECurrentRegulationTolerance=1;
-
-		f.Unit = V_unitSymbolType;
-		f.Value = 700;
-
-		result->DC_EVSEChargeParameter->EVSEPeakCurrentRipple=f;
-
-		f.Unit = A_unitSymbolType;
-		f.Value = 800;
-
-		result->DC_EVSEChargeParameter->EVSEEnergyToBeDelivered=f;
-		result->DC_EVSEChargeParameter->isused.EVSEEnergyToBeDelivered=1;
-
-		result->DC_EVSEChargeParameter->EVSEProtocolVersion=12;
-
-	} else { /* AC related */
-
-		printf("\t\t PEVStatus:\n\t\t\t PEVStandby=%d\n",param->AC_PEVChargeParameter->AC_PEVStatus.PEVStandby);
-		printf("\t\t\t ConnectorLocked=%d\n", param->AC_PEVChargeParameter->AC_PEVStatus.ConnectorLocked);
-
-
-		printf("\t\t EAmount=%d\n", param->AC_PEVChargeParameter->EAmount.Value);
-		printf("\t\t EoC=%d\n", param->AC_PEVChargeParameter->EoC);
-		printf("\t\t PEVMaxCurrent=%d\n", param->AC_PEVChargeParameter->PEVMaxCurrent.Value);
-		printf("\t\t PEVMaxPhases=%d\n", param->AC_PEVChargeParameter->PEVMaxPhases);
-		printf("\t\t PEVMaxPower=%d\n", param->AC_PEVChargeParameter->PEVMaxPower.Value);
-		printf("\t\t PEVMaxVoltage=%d\n", param->AC_PEVChargeParameter->PEVMaxVoltage.Value);
-		printf("\t\t PEVMinCurrent=%d\n", param->AC_PEVChargeParameter->PEVMinCurrent.Value);
-		printf("\t\t PEVMinVoltage=%d\n", param->AC_PEVChargeParameter->PEVMinVoltage.Value);
-
-
-		result->ResponseCode = OK_responseCodeType;
-		result->isused.EnergyProvider=0;
-		result->isused.TariffTable=0;
-
-
-		result->isused.AC_EVSEChargeParameter = 1;
-		result->isused.DC_EVSEChargeParameter = 0;
-
-
-
-
-		result->AC_EVSEChargeParameter->AC_EVSEStatus.ConnectorLocked=1;
-		result->AC_EVSEChargeParameter->AC_EVSEStatus.EVSEStandby=1;
-		result->AC_EVSEChargeParameter->AC_EVSEStatus.PowerSwitchClosed=1;
-		result->AC_EVSEChargeParameter->AC_EVSEStatus.RCD=1;
-		result->AC_EVSEChargeParameter->AC_EVSEStatus.ShutDownTime=12345;
-		result->AC_EVSEChargeParameter->AC_EVSEStatus.StopCharging=1;
-
-
-		f.Multiplier = 0;
-		f.Unit = A_unitSymbolType;
-		f.Value = 100;
-
-		result->AC_EVSEChargeParameter->EVSEMaxCurrent=f;
-		result->AC_EVSEChargeParameter->EVSEMaxPhases=3;
-
-		f.Unit = V_unitSymbolType;
-		f.Value = 200;
-		result->AC_EVSEChargeParameter->EVSEMaxVoltage=f;
-
-		f.Unit = A_unitSymbolType;
-		f.Value = 300;
-		result->AC_EVSEChargeParameter->EVSEMinCurrent=f;
-
-		f.Unit = V_unitSymbolType;
-		f.Value = 400;
-		result->AC_EVSEChargeParameter->EVSEMinVoltage=f;
-
-	}
-
-
-
-	return 0;
-}
-
-int	lineLock(struct MessageHeaderType* header, struct LineLockReqType* param, struct LineLockResType* result)
-{
-	printf("EVSE: lineLock called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t PEVStandby=%d\n",param->AC_PEVStatus.PEVStandby);
-	printf("\t\t\t ConnectorLocked=%d\n", param->AC_PEVStatus.ConnectorLocked);
-	printf("\t\t ReqLockStatus=%d\n", param->ReqLockStatus);
-
-
-	result->ResponseCode = OK_responseCodeType;
-	result->AC_EVSEStatus.ConnectorLocked=1;
-	result->AC_EVSEStatus.EVSEStandby=1;
-	result->AC_EVSEStatus.PowerSwitchClosed=1;
-	result->AC_EVSEStatus.RCD=1;
-	result->AC_EVSEStatus.ShutDownTime=12345;
-	result->AC_EVSEStatus.StopCharging=1;
-
-
-	return 0;
-}
-
-int	powerDelivery(struct MessageHeaderType* header, struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result)
-{
-	printf("EVSE: powerDelivery called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t\t ReqSwitchStatus=%d\n", param->ReqSwitchStatus);
-
-
-	if(param->isused.DC_PEVPowerDeliveryParameter)
-	{
-
-		printf("\t\t PEVStatus:\n\t\t\t PEVStandby=%d\n",param->DC_PEVPowerDeliveryParameter->DC_PEVStatus.PEVStandby);
-		printf("\t\t\t PEVReady=%d\n", param->DC_PEVPowerDeliveryParameter->DC_PEVStatus.PEVReady);
-		printf("\t\t\t PEVRESSSOC=%d\n", param->DC_PEVPowerDeliveryParameter->DC_PEVStatus.PEVRESSSOC);
-		printf("\t\t\t PEVStatusCode=%d\n", param->DC_PEVPowerDeliveryParameter->DC_PEVStatus.PEVStatusCode);
-		printf("\t\t\t ConnectorLocked=%d\n", param->DC_PEVPowerDeliveryParameter->DC_PEVStatus.ConnectorLocked);
-		printf("\t\t BulkChargingComplete=%d\n", param->DC_PEVPowerDeliveryParameter->BulkChargingComplete);
-		printf("\t\t ChargingComplete=%d\n", param->DC_PEVPowerDeliveryParameter->ChargingComplete);
-
-		result->ResponseCode = FAILED_NotReady_responseCodeType;
-		result->DC_EVSEStatus->EVSEStandby =1;
-		result->DC_EVSEStatus->EVSEStatusCode = IsolationMonitoringActive_DC_EVSEStatusCodeType;
-		result->isused.DC_EVSEStatus=1;
-		result->isused.AC_EVSEStatus=0;
-	} else {
-
-		printf("\t\t PEVStatus:\n\t\t\t PEVStandby=%d\n",param->AC_PEVPowerDeliveryParameter->AC_PEVStatus.PEVStandby);
-		printf("\t\t\t ConnectorLocked=%d\n", param->AC_PEVPowerDeliveryParameter->AC_PEVStatus.ConnectorLocked);
-
-
-		result->ResponseCode = OK_responseCodeType;
-		result->AC_EVSEStatus->ConnectorLocked=1;
-		result->AC_EVSEStatus->EVSEStandby=1;
-		result->AC_EVSEStatus->PowerSwitchClosed=1;
-		result->AC_EVSEStatus->RCD=1;
-		result->AC_EVSEStatus->ShutDownTime=12345;
-		result->AC_EVSEStatus->StopCharging=1;
-
-
-		result->isused.AC_EVSEStatus=1;
-		result->isused.DC_EVSEStatus=0;
-	}
-
-	return 0;
-}
-
-int	meteringStatus(struct MessageHeaderType* header, struct MeteringStatusReqType* param, struct MeteringStatusResType* result)
-{
-	printf("EVSE: meteringStatus called\n"  );
-
-	if(param->isused.AC_PEVStatus==1)
-	{
-		printf("\t\t PEVStatus:\n\t\t\t PEVStandby=%d\n",param->AC_PEVStatus->PEVStandby);
-		printf("\t\t\t ConnectorLocked=%d\n", param->AC_PEVStatus->ConnectorLocked);
-	}
-
-
-	result->ResponseCode=OK_responseCodeType;
-	result->EVSEID.data[0]=1;
-	result->EVSEID.arraylen.data=1;
-	result->isused.AC_EVSEStatus=1;
-	result->isused.DC_EVSEStatus=0;
-	result->AC_EVSEStatus->ConnectorLocked=1;
-	result->AC_EVSEStatus->EVSEStandby=1;
-	result->AC_EVSEStatus->PowerSwitchClosed=1;
-	result->AC_EVSEStatus->RCD=1;
-	result->AC_EVSEStatus->ShutDownTime=12345;
-	result->AC_EVSEStatus->StopCharging=1;
-	result->TCurrent=12345678;
-	result->EVSEMaxPower.Multiplier = 2;
-	result->EVSEMaxPower.Unit = A_unitSymbolType;
-	result->EVSEMaxPower.Value = 400;
-
-	result->isused.MeterInfo=1;
-	result->MeterInfo.MeterID.arraylen.data=1;
-	result->MeterInfo.MeterID.data[0]=2;
-	result->MeterInfo.MeterReading.Multiplier = 0;
-	result->MeterInfo.MeterReading.Unit = A_unitSymbolType;
-	result->MeterInfo.MeterReading.Value = 500;
-	result->MeterInfo.MeterStatus = 4321;
-	result->MeterInfo.TMeter =123456789;
-	result->MeterInfo.isused.MeterID=1;
-	result->MeterInfo.isused.MeterReading = 1;
-	result->MeterInfo.isused.MeterStatus=1;
-	result->MeterInfo.isused.TMeter=1;
-
-	result->isused.PCurrent=1;
-	result->PCurrent.Value=4321;
-
-	return 0;
-}
-
-int	meteringReceipt(struct MessageHeaderType* header, struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result)
-{
-
-	printf("EVSE: meteringReceipt called\n"  );
-	printf("\tReceived data:\n");
-
-	if(param->isused.AC_PEVStatus)
-	{
-		printf("\t\t PEVStatus:\n\t\t\t PEVStandby=%d\n",param->AC_PEVStatus->PEVStandby);
-		printf("\t\t\t ConnectorLocked=%d\n", param->AC_PEVStatus->ConnectorLocked);
-	}
-
-	printf("\t\t TCurrent=%d\n", param->TCurrent);
-	printf("\t\t Tariff=%d\n", param->Tariff);
-	printf("\t\t MeterInfo.MeterStatus=%d\n", param->MeterInfo.MeterStatus);
-	printf("\t\t MeterInfo.MeterID=%d\n",		param->MeterInfo.MeterID.data[0]);
-	printf("\t\t MeterInfo.isused.MeterReading=%d\n", param->MeterInfo.isused.MeterReading);
-	printf("\t\t MeterReading.Value=%d\n",		param->MeterInfo.MeterReading.Value);
-	printf("\t\t MeterInfo.TMeter=%d\n",		param->MeterInfo.TMeter);
-	if(param->Tariff==12)
-		printf("\t\t Tariff==Green_charge_tariffIDType\n");
-	result->ResponseCode = 0;
-
-	result->isused.AC_EVSEStatus=1;
-	result->isused.DC_EVSEStatus=0;
-	result->AC_EVSEStatus->ConnectorLocked=1;
-	result->AC_EVSEStatus->EVSEStandby=1;
-	result->AC_EVSEStatus->PowerSwitchClosed=1;
-	result->AC_EVSEStatus->RCD=1;
-	result->AC_EVSEStatus->ShutDownTime=12345;
-	result->AC_EVSEStatus->StopCharging=1;
-
-	return 0;
-}
-
-int	cableCheck(struct MessageHeaderType* header, struct CableCheckReqType* param, struct CableCheckResType* result)
-{
-	printf("EVSE: cableCheck called\n"  );
-	printf("\tReceived data:\n");
-
-
-	printf("\t\t PEVStatus:\n\t\t\t PEVStandby=%d\n",param->DC_PEVStatus.PEVStandby);
-	printf("\t\t\t PEVReady=%d\n", param->DC_PEVStatus.PEVReady);
-	printf("\t\t\t PEVRESSSOC=%d\n", param->DC_PEVStatus.PEVRESSSOC);
-	printf("\t\t\t PEVStatusCode=%d\n", param->DC_PEVStatus.PEVStatusCode);
-	printf("\t\t\t ConnectorLocked=%d\n", param->DC_PEVStatus.ConnectorLocked);
-
-	result->ResponseCode = OK_responseCodeType;
-	result->DC_EVSEStatus.EVSEStandby = 1;
-	result->DC_EVSEStatus.EVSEStatusCode = IsolationMonitoringActive_DC_EVSEStatusCodeType;
-
-	return 0;
-}
-
-
-int	preCharge(struct MessageHeaderType* header, struct PreChargeReqType* param, struct PreChargeResType* result)
-{
-	struct FloatingValueType float_type;
-
-
-	printf("EVSE: preCharge called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t PEVStandby=%d\n",param->DC_PEVStatus.PEVStandby);
-	printf("\t\t\t PEVReady=%d\n", param->DC_PEVStatus.PEVReady);
-	printf("\t\t\t PEVRESSSOC=%d\n", param->DC_PEVStatus.PEVRESSSOC);
-	printf("\t\t\t PEVStatusCode=%d\n", param->DC_PEVStatus.PEVStatusCode);
-	printf("\t\t\t ConnectorLocked=%d\n", param->DC_PEVStatus.ConnectorLocked);
-
-	result->ResponseCode = OK_responseCodeType;
-	result->DC_EVSEStatus.EVSEStandby = 1;
-	result->DC_EVSEStatus.EVSEStatusCode = IsolationMonitoringActive_DC_EVSEStatusCodeType;
-
-	float_type.Multiplier = 0;
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 100;
-	result->EVSEPresentVoltage = float_type;
-
-
-
-
-	return 0;
-
-
-}
-
-int	currentDemand(struct MessageHeaderType* header, struct CurrentDemandReqType* param, struct CurrentDemandResType* result)
-{
-
-	struct FloatingValueType f;
-
-	printf("EVSE: currentDemand called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t PEVStandby=%d\n",param->DC_PEVStatus.PEVStandby);
-	printf("\t\t\t PEVReady=%d\n", param->DC_PEVStatus.PEVReady);
-	printf("\t\t\t PEVRESSSOC=%d\n", param->DC_PEVStatus.PEVRESSSOC);
-	printf("\t\t\t PEVStatusCode=%d\n", param->DC_PEVStatus.PEVStatusCode);
-	printf("\t\t\t ConnectorLocked=%d\n", param->DC_PEVStatus.ConnectorLocked);
-
-	printf("\t\t ChargeCurrentRequest=%d\n", param->ChargeCurrentRequest.Value);
-	printf("\t\t PEVMaximumVoltageLimit=%d\n", param->PEVMaximumVoltageLimit.Value);
-	printf("\t\t PEVMaximumPowerLimit=%d\n", param->PEVMaximumPowerLimit.Value);
-	printf("\t\t PEVMaximumCurrentLimit=%d\n", param->PEVMaximumCurrentLimit.Value);
-	printf("\t\t BulkChargingComplete=%d\n", param->BulkChargingComplete);
-	printf("\t\t ChargingComplete=%d\n", param->ChargingComplete);
-	printf("\t\t RemainingTimeToFullSoC=%d\n", param->RemainingTimeToFullSoC.Value);
-	printf("\t\t RemainingTimeToBulkSoC=%d\n", param->RemainingTimeToBulkSoC.Value);
-
-	printf("\t\t PEVTargetVoltage=%d\n", param->PEVTargetVoltage.Value);
-	printf("\t\t CurrentDifferential=%d\n", param->CurrentDifferential.Value);
-
-	printf("\t\t VoltageDifferential=%d\n", param->VoltageDifferential.Value);
-
-
-	result->ResponseCode = OK_responseCodeType;
-	result->DC_EVSEStatus.EVSEStandby = 1;
-	result->DC_EVSEStatus.EVSEStatusCode = IsolationMonitoringActive_DC_EVSEStatusCodeType;
-
-	f.Multiplier = 0;
-	f.Unit = V_unitSymbolType;
-	f.Value = 100;
-
-	result->EVSEPresentVoltage=f;
-
-	f.Unit = A_unitSymbolType;
-	f.Value = 200;
-
-	result->EVSEPresentCurrent=f;
-
-	result->EVSECurrentLimitAchieved=1;
-
-	result->EVSEVoltageLimitAchieved=0;
-
-	result->EVSEPowerLimitAchieved=1;
-
-	f.Unit = V_unitSymbolType;
-	f.Value = 300;
-
-	result->EVSEMaximumVoltageLimit=f;
-	result->isused.EVSEMaximumVoltageLimit=1;
-
-	f.Unit = A_unitSymbolType;
-	f.Value = 400;
-
-	result->EVSEMaximumCurrentLimit=f;
-	result->isused.EVSEMaximumCurrentLimit=1;
-
-	f.Unit = W_unitSymbolType;
-	f.Value = 500;
-
-	result->EVSEMaximumPowerLimit=f;
-	result->isused.EVSEMaximumPowerLimit=1;
-
-	return 0;
-}
-
-int	weldingDetection(struct MessageHeaderType* header, struct WeldingDetectionReqType* param, struct WeldingDetectionResType* result)
-{
-
-	printf("EVSE: weldingDetection called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t PEVStandby=%d\n",param->DC_PEVStatus.PEVStandby);
-	printf("\t\t\t PEVReady=%d\n", param->DC_PEVStatus.PEVReady);
-	printf("\t\t\t PEVRESSSOC=%d\n", param->DC_PEVStatus.PEVRESSSOC);
-	printf("\t\t\t PEVStatusCode=%d\n", param->DC_PEVStatus.PEVStatusCode);
-	printf("\t\t\t ConnectorLocked=%d\n", param->DC_PEVStatus.ConnectorLocked);
-
-	result->ResponseCode = OK_responseCodeType;
-	result->DC_EVSEStatus.EVSEStandby = 1;
-	result->DC_EVSEStatus.EVSEStatusCode = IsolationMonitoringActive_DC_EVSEStatusCodeType;
-	result->EVSEPresentVoltage.Value = 123;
-	result->EVSEPresentVoltage.Unit = V_unitSymbolType;
-	result->EVSEPresentVoltage.Multiplier = 0;
-
-	return 0;
-}
-
-int	terminateCharging(struct MessageHeaderType* header, struct TerminateChargingReqType* param, struct TerminateChargingResType* result)
-{
-
-	printf("EVSE: terminateCharging called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t PEVStandby=%d\n",param->DC_PEVStatus.PEVStandby);
-	printf("\t\t\t PEVReady=%d\n", param->DC_PEVStatus.PEVReady);
-	printf("\t\t\t PEVRESSSOC=%d\n", param->DC_PEVStatus.PEVRESSSOC);
-	printf("\t\t\t PEVStatusCode=%d\n", param->DC_PEVStatus.PEVStatusCode);
-	printf("\t\t\t ConnectorLocked=%d\n", param->DC_PEVStatus.ConnectorLocked);
-
-
-	result->ResponseCode = OK_responseCodeType;
-	result->EVSEPresentVoltage.Value = 123;
-	result->EVSEPresentVoltage.Unit = V_unitSymbolType;
-	result->EVSEPresentVoltage.Multiplier = 0;
-
-
-
-	return 0;
-
-}
-
-int	serviceDetail(struct MessageHeaderType* header, struct ServiceDetailReqType* param, struct ServiceDetailResType* result)
-{
-	return 0;
-}
-
-int	contractAuthentication(struct MessageHeaderType* header, struct ContractAuthenticationReqType* param, struct ContractAuthenticationResType* result)
-{
-	return 0;
-}
-
-int	certificateUpdate(struct MessageHeaderType* header, struct CertificateUpdateReqType* param, struct CertificateUpdateResType* result)
-{
-	return 0;
-}
-
-int	certificateInstallation(struct MessageHeaderType* header, struct CertificateInstallationReqType* param, struct CertificateInstallationResType* result)
-{
-
-	printf("EVSE: certificateInstallation called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t\t OEMProvisioningCert=%d\n", param->OEMProvisioningCert.data[0]);
-
-	return 0;
-}
-
-
-
-

+ 0 - 42
src/test/main.c

@@ -1,42 +0,0 @@
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Switch for sample programs: EXI codec only or for entire V2G service</p>
- *
- ********************************************************************/
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "main.h"
-
-int main(int argc, char *argv[]) {
-	/* EXI codec only */
-	/*return main_codec(argc, argv); */
-
-	/* V2G client / service example scenario */
-	return main_service(argc, argv);
-
-}
-

+ 0 - 34
src/test/main.h

@@ -1,34 +0,0 @@
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- *
- ********************************************************************/
-
-#ifndef MAIN_H_
-#define MAIN_H_
-
-int main_codec(int argc, char *argv[]);
-int main_service(int argc, char *argv[]);
-
-#endif

+ 0 - 499
src/test/main_codec.c

@@ -1,499 +0,0 @@
-/*
- * 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 <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 2011-11-08
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-/*******************************************************************
- *
- * <p>Sample program to illustrate how to read an EXI stream and
- *  directly write it again to an output</p>
- *
- *  <p>e.g., data/test/sessionSetupReq.xml.exi out/test/sessionSetupReq.xml.exi</p>
- ********************************************************************/
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "EXIDecoder.h"
-#include "StringTable.h"
-#include "EXIEncoder.h"
-#include "EXITypes.h"
-#include "ByteStream.h"
-
-#define DEBUG 1
-
-#if EXI_STREAM == BYTE_ARRAY
-/* 64 kilobytes = 65 536 bytes */
-/* 1 megabyte = 1 048 576 bytes*/
-#define BUFFER_SIZE 1048576
-uint8_t bufferIn[BUFFER_SIZE];
-uint8_t bufferOut[BUFFER_SIZE];
-#endif /* EXI_STREAM == BYTE_ARRAY */
-
-/* avoids warning: initializer element is not computable at load time */
-#define ARRAY_SIZE_BYTES 300
-uint8_t bytesData[ARRAY_SIZE_BYTES];
-#define ARRAY_SIZE_STRINGS 30000
-uint32_t codepoints[ARRAY_SIZE_STRINGS];
-#define ARRAY_SIZE_STRINGS_ASCII 150
-char charsNamespaceURI[ARRAY_SIZE_STRINGS_ASCII];
-char charsLocalName[ARRAY_SIZE_STRINGS_ASCII];
-
-void debugValue(exi_value_t* val) ;
-
-int main_codec(int argc, char *argv[]) {
-
-	int errn = 0;
-
-	bitstream_t iStream, oStream;
-	uint32_t posDecode;
-	uint32_t posEncode;
-
-	/* EXI set-up */
-	exi_state_t stateDecode;
-	exi_state_t stateEncode;
-	exi_event_t event;
-	eqname_t eqn; /* efficient qname */
-	qname_t qn; /* ascii qname */
-	exi_value_t val;
-
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-
-	/* BINARY memory setup */
-	bytes_t bytes = { ARRAY_SIZE_BYTES, bytesData, 0 };
-
-	const char * localName;
-	const char * namespaceURI;
-	int noEndOfDocument = 1; /* true */
-
-	/* STRING memory setup */
-	string_ucs_t string = { ARRAY_SIZE_STRINGS, codepoints, 0 };
-	string_ascii_t stringNamespaceURI = { ARRAY_SIZE_STRINGS_ASCII, charsNamespaceURI };
-	string_ascii_t stringLocalName = { ARRAY_SIZE_STRINGS_ASCII, charsLocalName };
-	qn.namespaceURI = stringNamespaceURI;
-	qn.localName = stringLocalName;
-
-	if (argc != 3) {
-		printf("Usage: %s exiInput exiOutput\n", argv[0]);
-		return -1;
-	}
-
-	/* input pos */
-	posDecode = 0;
-
-#if EXI_STREAM == BYTE_ARRAY
-	/* parse EXI stream to internal byte structures  */
-	errn = readBytesFromFile(argv[1], bufferIn, BUFFER_SIZE, posDecode);
-	if (errn < 0) {
-		printf("Problems while reading file into buffer\n");
-		return errn;
-	}
-#endif /* EXI_STREAM == BYTE_ARRAY */
-
-	/* setup input stream */
-#if EXI_STREAM == BYTE_ARRAY
-	iStream.size = BUFFER_SIZE;
-	iStream.data = bufferIn;
-	iStream.pos = &posDecode;
-#endif /* EXI_STREAM == BYTE_ARRAY */
-#if EXI_STREAM == FILE_STREAM
-	iStream.file = fopen(argv[1],"rb");
-#endif /* EXI_STREAM == FILE_STREAM */
-
-	iStream.buffer = 0;
-	iStream.capacity = 0;
-
-	/* setup output stream */
-	posEncode = 0;
-#if EXI_STREAM == BYTE_ARRAY
-	oStream.size = BUFFER_SIZE;
-	oStream.data = bufferOut;
-	oStream.pos = &posEncode;
-#endif
-#if EXI_STREAM == FILE_STREAM
-	oStream.file = fopen(argv[2],"wb");
-#endif /* EXI_STREAM == FILE_STREAM */
-	oStream.buffer = 0;
-	oStream.capacity = 8;
-
-	val.binary = bytes;
-	val.string = string;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	errn = exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&iStream, &stateDecode, runtimeTableDecode);
-
-	/* init encoder (write header, set initial state) */
-	errn = exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&oStream, &stateEncode, runtimeTableEncode);
-
-	if (DEBUG) {
-		printf("[DECODE] >>> EXI  >>> [ENCODE] \n");
-	}
-
-	do {
-		if (errn < 0) {
-			if (DEBUG) {
-				printf("[Encode-ERROR] %d \n", errn);
-			}
-			return errn;
-		}
-
-		errn = exiDecodeNextEvent(&iStream, &stateDecode, &event);
-		if (errn < 0) {
-			if (DEBUG) {
-				printf("[Decode-ERROR] %d \n", errn);
-			}
-			return errn;
-		}
-
-		switch (event) {
-		case START_DOCUMENT:
-			/* decode */
-			errn = exiDecodeStartDocument(&iStream, &stateDecode);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-SD] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				printf(">> START_DOCUMENT \n");
-			}
-			/* encode */
-			errn = exiEncodeStartDocument(&oStream, &stateEncode);
-			break;
-		case END_DOCUMENT:
-			/* decode */
-			errn = exiDecodeEndDocument(&iStream, &stateDecode);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-ED] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				printf(">> END_DOCUMENT \n");
-			}
-			/* encode */
-			errn = exiEncodeEndDocument(&oStream, &stateEncode);
-			/* signalize end of document */
-			noEndOfDocument = 0; /* false */
-			break;
-		case START_ELEMENT:
-			/* decode */
-			errn = exiDecodeStartElement(&iStream, &stateDecode, &eqn);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-SE] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				exiGetLocalName(&(stateDecode.nameTablePrepopulated), &(stateDecode.nameTableRuntime), eqn.namespaceURI, eqn.localPart, &localName);
-				exiGetUri(&(stateDecode.nameTablePrepopulated), &(stateDecode.nameTableRuntime), eqn.namespaceURI, &namespaceURI);
-				printf(">> SE {%s}%s \n", namespaceURI, localName);
-			}
-			/* encode */
-			errn = exiEncodeStartElement(&oStream, &stateEncode, &eqn);
-			break;
-		case START_ELEMENT_GENERIC:
-			/* decode */
-			errn = exiDecodeStartElementGeneric(&iStream, &stateDecode, &qn);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-SEgen] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				printf(">> SE_Gen {%s}%s \n", stringNamespaceURI.chars, stringLocalName.chars);
-			}
-			/* encode */
-			errn = exiEncodeStartElementGeneric(&oStream, &stateEncode,
-					&stringNamespaceURI, &stringLocalName);
-			break;
-		case END_ELEMENT:
-			/* decode */
-			errn = exiDecodeEndElement(&iStream, &stateDecode, &eqn);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-EE] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				printf("<< EE \n");
-			}
-			/* encode */
-			errn = exiEncodeEndElement(&oStream, &stateEncode);
-			break;
-		case END_ELEMENT_UNDECLARED:
-			/* decode */
-			errn = exiDecodeEndElementUndeclared(&iStream, &stateDecode, &eqn);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-EE-Undecl] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				printf("<< EEundecl \n");
-			}
-			/* encode */
-			errn = exiEncodeEndElement(&oStream, &stateEncode);
-			break;
-		case CHARACTERS:
-			/* decode */
-			errn = exiDecodeCharacters(&iStream, &stateDecode, &val);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-CH] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				debugValue(&val);
-			}
-			/* encode */
-			errn = exiEncodeCharacters(&oStream, &stateEncode, &val);
-			break;
-		case CHARACTERS_GENERIC:
-			/* decode */
-			errn = exiDecodeCharactersGeneric(&iStream, &stateDecode, &val);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-CHgen] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				debugValue(&val);
-			}
-			/* encode */
-			errn = exiEncodeCharacters(&oStream, &stateEncode, &val);
-			break;
-		case CHARACTERS_GENERIC_UNDECLARED:
-			/* decode */
-			errn = exiDecodeCharactersGenericUndeclared(&iStream, &stateDecode, &val);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-CHgenUndecl] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				debugValue(&val);
-			}
-			/* encode */
-			errn = exiEncodeCharacters(&oStream, &stateEncode, &val);
-			break;
-		case ATTRIBUTE:
-			/* decode */
-			errn = exiDecodeAttribute(&iStream, &stateDecode, &eqn, &val);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-AT] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				exiGetLocalName(&(stateDecode.nameTablePrepopulated), &(stateDecode.nameTableRuntime), eqn.namespaceURI, eqn.localPart, &localName);
-				exiGetUri(&(stateDecode.nameTablePrepopulated), &(stateDecode.nameTableRuntime), eqn.namespaceURI, &namespaceURI);
-				printf(" AT {%s}%s \n", namespaceURI, localName);
-				debugValue(&val);
-			}
-			/* encode */
-			errn = exiEncodeAttribute(&oStream, &stateEncode, &eqn, &val);
-			break;
-		case ATTRIBUTE_XSI_NIL:
-			/* decode */
-			errn = exiDecodeAttributeXsiNil(&iStream, &stateDecode, &val);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-AT-NIL] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				printf(" AT {xsi}nil == %i \n", val.boolean);
-			}
-			/* encode */
-			errn = exiEncodeAttributeXsiNil(&oStream, &stateEncode, &val);
-			break;
-		case ATTRIBUTE_XSI_TYPE:
-			/* decode */
-			errn = exiDecodeAttributeXsiType(&iStream, &stateDecode, &val);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-AT-TYPE] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				exiGetLocalName(&(stateDecode.nameTablePrepopulated), &(stateDecode.nameTableRuntime), val.eqname.namespaceURI, val.eqname.localPart, &localName);
-				exiGetUri(&(stateDecode.nameTablePrepopulated), &(stateDecode.nameTableRuntime), val.eqname.namespaceURI, &namespaceURI);
-				printf(" AT {type}type == {%s}%s \n", namespaceURI, localName);
-			}
-			/* encode */
-			errn = exiEncodeAttributeXsiType(&oStream, &stateEncode, &val);
-			break;
-		case ATTRIBUTE_GENERIC_UNDECLARED:
-			/* decode */
-			errn = exiDecodeAttributeGenericUndeclared(&iStream, &stateDecode, &qn, &val);
-			if (errn < 0) {
-				if (DEBUG) {
-					printf("[Decode-ERROR-ATgenUnd] %d \n", errn);
-				}
-				return errn;
-			}
-			if (DEBUG) {
-				/* exiGetLocalName(&(stateDecode.nameTablePrepopulated), &(stateDecode.nameTableRuntime), eqn.namespaceURI, eqn.localPart, &localName);
-				exiGetUri(&(stateDecode.nameTablePrepopulated), &(stateDecode.nameTableRuntime), eqn.namespaceURI, &namespaceURI); */
-				printf(" AT {%s}%s \n", qn.namespaceURI.chars, qn.localName.chars);
-				debugValue(&val);
-			}
-			/* encode */
-			errn = exiEncodeAttribute(&oStream, &stateEncode, &eqn, &val);
-			break;
-		default:
-			/* ERROR */
-			if (DEBUG) {
-				printf("[Unknown-Event] %d \n", event);
-			}
-			return EXI_ERROR_UNKOWN_EVENT;
-		}
-
-	} while (noEndOfDocument);
-
-#if EXI_STREAM == BYTE_ARRAY
-	/* write to file */
-	writeBytesToFile(oStream.data, posEncode, argv[2]);
-#endif
-#if EXI_STREAM == FILE_STREAM
-	fclose(iStream.file);
-	fclose(oStream.file);
-#endif
-
-	return 0;
-}
-
-static int _setInt32Value(integer_t* iv, int32_t* int32) {
-	int errn = 0;
-	switch(iv->type) {
-	/* Unsigned Integer */
-	case UNSIGNED_INTEGER_8:
-		*int32 = iv->val.uint8;
-		break;
-	case UNSIGNED_INTEGER_16:
-		*int32 = iv->val.uint16;
-		break;
-	case UNSIGNED_INTEGER_32:
-		if (iv->val.uint32 <= 2147483647) {
-			*int32 = iv->val.uint32;
-		} else {
-			errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-		}
-		break;
-	case UNSIGNED_INTEGER_64:
-		errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-		break;
-	/* (Signed) Integer */
-	case INTEGER_8:
-		*int32 = iv->val.int8;
-		break;
-	case INTEGER_16:
-		*int32 = iv->val.int16;
-		break;
-	case INTEGER_32:
-		*int32 = iv->val.int32;
-		break;
-	case INTEGER_64:
-		errn = EXI_UNSUPPORTED_INTEGER_VALUE;
-	}
-	return errn;
-}
-
-
-void debugValue(exi_value_t* val) {
-	int i;
-	switch(val->type) {
-	case INTEGER:
-		switch(val->integer.type) {
-		/* Unsigned Integer */
-		case UNSIGNED_INTEGER_8:
-			printf(" Value uint8 : %d \n", val->integer.val.uint8);
-			break;
-		case UNSIGNED_INTEGER_16:
-			printf(" Value uint16 : %d \n", val->integer.val.uint16);
-			break;
-		case UNSIGNED_INTEGER_32:
-			printf(" Value uint32 : %d \n", val->integer.val.uint32);
-			break;
-		case UNSIGNED_INTEGER_64:
-			printf(" Value uint64 : %ld \n", (long unsigned int) val->integer.val.uint64);
-			break;
-		/* (Signed) Integer */
-		case INTEGER_8:
-			printf(" Value int8 : %d \n", val->integer.val.int8);
-			break;
-		case INTEGER_16:
-			printf(" Value int16 : %d \n", val->integer.val.int16);
-			break;
-		case INTEGER_32:
-			printf(" Value int32 : %d \n", val->integer.val.int32);
-			break;
-		case INTEGER_64:
-			printf(" Value int64 : %ld \n", (long int) val->integer.val.int64);
-			break;
-		}
-		break;
-	case BINARY_BASE64:
-	case BINARY_HEX:
-		printf(" Value Binary (len == %d) : ", val->binary.len);
-		for (i = 0; i < val->binary.len; i++) {
-			printf(" [%d]", val->binary.data[i]);
-		}
-		printf("\n");
-		break;
-	case BOOLEAN:
-		printf(" Value Boolean : %d \n", val->boolean);
-		break;
-	case STRING:
-		printf(" Value String (len==%d) : '", val->string.len);
-		for (i = 0; i < val->string.len; i++) {
-			printf("%c", (char) val->string.codepoints[i]);
-		}
-		printf("'\n");
-		break;
-	default:
-		printf(" Value ?? \n");
-	}
-}
-

+ 0 - 951
src/test/pev_service.c

@@ -1,951 +0,0 @@
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-
-
-#include "v2g_service.h"
-#include "v2g_serviceDataTypes.h"
-#include "v2g_serviceClientStubs.h"
-#include "EXITypes.h"
-#include "v2gtp.h"
-
-#include <stdio.h>
-
-#define MAX_BYTE_SIZE 128
-#define MAX_STRING_SIZE 256
-#define MAX_STREAM_SIZE 100
-
-
-static void printErrorMessage(struct EXIService* service);
-static void printDCEVSEStatus(struct DC_EVSEStatusType* status);
-static void printACEVSEStatus(struct AC_EVSEStatusType* status);
-static void printASCIIString(uint32_t* string, uint32_t len);
-
-
-static int ac_charging()
-{
-
-
-	static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/
-	static uint32_t string_array[MAX_STRING_SIZE]; /* define MAX_STRING_SIZE before*/
-
-	/* define in and out byte stream */
-	uint8_t inStream[MAX_STREAM_SIZE]; /* define MAX_STREAM_SIZE before */
-	uint8_t outStream[MAX_STREAM_SIZE]; /* define MAX_STREAM_SIZE before */
-
-	/* define offset variable for transport header data */
-	uint16_t transportHeaderOffset;
-
-
-	/* service data structure for AC*/
-	struct EXIService service;
-	struct MessageHeaderType v2gHeader;
-	struct SessionSetupReqType sessionSetup;
-	struct SessionSetupResType resultSessionSetup;
-	struct ServiceDiscoveryReqType serviceDiscovery;
-	struct ServiceDiscoveryResType resultServiceDiscovery;
-	struct ChargeParameterDiscoveryReqType powerDiscovery;
-	struct ChargeParameterDiscoveryResType resultPowerDiscovery;
-	struct LineLockReqType lineLock;
-	struct LineLockResType resultLineLock;
-	struct PowerDeliveryReqType powerDelivery;
-	struct PowerDeliveryResType resultPowerDelivery;
-	struct MeteringStatusReqType meteringStatus;
-	struct MeteringStatusResType resultMeteringStatus;
-	struct MeteringReceiptReqType meteringReceipt;
-	struct MeteringReceiptResType resultMeteringReceipt;
-
-
-	struct AC_PEVStatusType pevStatus;
-	struct AC_EVSEStatusType evseStatus;
-	struct AC_PEVChargeParameterType pevChargeParameter;
-	struct AC_EVSEChargeParameterType evseChargeParameter;
-	struct AC_PEVPowerDeliveryParameterType pevPowerDelivery;
-
-
-	struct FloatingValueType float_type; /* test float type*/
-
-	/* BINARY memory setup */
-	bytes_t bytes = { MAX_BYTE_SIZE, byte_array, 0 };
-
-	/* STRING memory setup */
-	string_ucs_t string = { MAX_STRING_SIZE, string_array, 0 };
-
-	/* setup offset for DoIP header (otherwise set
-	 * transportHeaderOffset=0 if no transfer protocol is used)*/
-	transportHeaderOffset = V2GTP_HEADER_LENGTH;
-
-
-	/*******************
-	 * Init V2G Client *
-	 *******************/
-
-	init_v2gServiceClient(&service,bytes,string,inStream,MAX_STREAM_SIZE, outStream, MAX_STREAM_SIZE, transportHeaderOffset);
-
-
-	/*******************************
-	 * Setup data for sessionSetup *
-	 *******************************/
-
-	/* setup header information */
-	v2gHeader.SessionInformation.SessionID.data[0] = 0; /* sessionID is always '0' at the beginning (the response contains the valid sessionID)*/
-	v2gHeader.SessionInformation.SessionID.arraylen.data = 1; /* no session id in the initial message -> array length = 0*/
-	v2gHeader.SessionInformation.ProtocolVersion.data[0]='1'; /* assign protocol version number*/
-	v2gHeader.SessionInformation.ProtocolVersion.arraylen.data=1; /* array string length =1 of protocol version */
-	v2gHeader.SessionInformation.isused.ProtocolVersion = 1; /* important: optional elements have to be set used (=1) or not used (=0) */
-	v2gHeader.SessionInformation.isused.ServiceSessionID = 0; /* service session is not used */
-	v2gHeader.isused.Notification=0; /* no notification */
-	v2gHeader.isused.Security=0; /* no security */
-
-	/* setup sessionSetup parameter */
-	sessionSetup.isused.PEVID=1; /*  PEVID is transported */
-	sessionSetup.PEVID.arraylen.data=1;
-	sessionSetup.PEVID.data[0]=10;
-
-
-	printf("PEV: call EVSE sessionSetup\n");
-
-	/*********************
-	 * Call sessionSetup *
-	 *********************/
-	if(call_sessionSetup(&service,&v2gHeader, &sessionSetup,&resultSessionSetup))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-		/* show result of the answer message of EVSE sessionSetup */
-		printf("PEV: received response message from EVSE\n");
-		printf("\tHeader SessionID=%d\n",v2gHeader.SessionInformation.SessionID.data[0]);
-		printf("\tResponseCode=%d\n",resultSessionSetup.ResponseCode);
-		printf("\tEVSEID=%d\n",	resultSessionSetup.EVSEID.data[0]);
-		printf("\tTCurrent=%d\n",resultSessionSetup.TCurrent);
-	}
-
-
-	/*******************************************
-	 * Setup data for serviceDiscovery *
-	 *******************************************/
-
-	serviceDiscovery.isused.ServiceType=1;
-	serviceDiscovery.ServiceType = 	PEVRechargeCharge_serviceCategoryType;
-	serviceDiscovery.isused.ServiceScope=0;
-
-
-	printf("PEV: call EVSE serviceDiscovery\n");
-
-	/*************************
-	 * Call serviceDiscovery *
-	 *************************/
-	if(call_serviceDiscovery(&service,&v2gHeader, &serviceDiscovery,&resultServiceDiscovery))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-		/* show result of the answer message of EVSE sessionSetup */
-		printf("PEV: received response message from EVSE\n");
-		printf("\t Header SessionID=%d\n",v2gHeader.SessionInformation.SessionID.data[0]);
-		printf("\t ResponseCode=%d\n",resultServiceDiscovery.ResponseCode);
-		printf("\t ServiceID=%d\n",	resultServiceDiscovery.ChargeService.ServiceTag.ServiceID.data[0]);
-		printf("\t PaymentOption=%d\n",	resultServiceDiscovery.PaymentOptions.PaymentOption[0]);
-		printf("\t EnergyTransferType=%d\n",	resultServiceDiscovery.ChargeService.EnergyTransferType);
-	}
-
-
-	/*******************************************
-	 * Setup data for chargeParameterDiscovery *
-	 *******************************************/
-
-	powerDiscovery.PEVRequestedEnergyTransferType = AC_three_phase_core_PEVRequestedEnergyTransferType;
-
-	/* setup PEVStatus */
-	pevStatus.ConnectorLocked = 1;
-	pevStatus.PEVStandby = 1;
-
-	pevChargeParameter.AC_PEVStatus = pevStatus;
-
-
-	float_type.Multiplier = 0;
-	float_type.Unit = W_unitSymbolType;
-	float_type.Value = 100;
-
-	pevChargeParameter.EAmount = float_type;
-
-	pevChargeParameter.EoC = 89;
-
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 200;
-
-	pevChargeParameter.PEVMaxCurrent= float_type;
-
-	pevChargeParameter.PEVMaxPhases= 3;
-
-	float_type.Unit = W_unitSymbolType;
-	float_type.Value = 300;
-
-	pevChargeParameter.PEVMaxPower= float_type;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 400;
-
-	pevChargeParameter.PEVMaxVoltage=float_type;
-
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 500;
-
-	pevChargeParameter.PEVMinCurrent=float_type;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 600;
-
-	pevChargeParameter.PEVMinVoltage = float_type;
-
-	powerDiscovery.AC_PEVChargeParameter = &pevChargeParameter;
-	powerDiscovery.isused.AC_PEVChargeParameter = 1; /* we use here DC based charging parameters */
-	powerDiscovery.isused.DC_PEVChargeParameter = 0;
-
-
-	resultPowerDiscovery.AC_EVSEChargeParameter = &evseChargeParameter; /* we expect DC-based parameters from the evse*/
-
-	/*********************************
-	 * Call chargeParameterDiscovery *
-	 *********************************/
-	printf("\nPEV: call EVSE chargeParameterDiscovery\n");
-
-	if(call_chargeParameterDiscovery(&service,&v2gHeader,&powerDiscovery,&resultPowerDiscovery))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\t\t Header SessionID=%d\n",v2gHeader.SessionInformation.SessionID.data[0]);
-		printf("\tResponseCode=%d\n",resultPowerDiscovery.ResponseCode);
-		printACEVSEStatus(&(resultPowerDiscovery.AC_EVSEChargeParameter->AC_EVSEStatus));
-
-		printf("\t EVSEMaxCurrent=%d\n",resultPowerDiscovery.AC_EVSEChargeParameter->EVSEMaxCurrent.Value);
-		printf("\t EVSEMaxPhases=%d\n",resultPowerDiscovery.AC_EVSEChargeParameter->EVSEMaxPhases);
-		printf("\t EVSEMaxVoltage=%d\n",resultPowerDiscovery.AC_EVSEChargeParameter->EVSEMaxVoltage.Value);
-		printf("\t EVSEMinimumCurrentLimit=%d\n",resultPowerDiscovery.AC_EVSEChargeParameter->EVSEMinCurrent.Value);
-
-		printf("\t EVSEMinVoltage=%d\n",resultPowerDiscovery.AC_EVSEChargeParameter->EVSEMinVoltage.Value);
-
-	}
-
-
-
-	/*********************************
-	 * Setup data for lineLock *
-	 *********************************/
-
-	lineLock.AC_PEVStatus = pevStatus;
-	lineLock.ReqLockStatus = 1;
-
-	/***********************
-	 * Call lineLock *
-	 ***********************/
-	printf("\nPEV: call EVSE lineLock\n");
-
-	if(call_lineLock(&service,&v2gHeader,&lineLock,&resultLineLock))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultLineLock.ResponseCode);
-		printACEVSEStatus(&resultLineLock.AC_EVSEStatus);
-
-	}
-
-
-
-	/*********************************
-	 * Setup data for powerDelivery *
-	 *********************************/
-
-	powerDelivery.ReqSwitchStatus = 1;
-	powerDelivery.isused.Tariff = 0;
-	powerDelivery.isused.ChargingProfile= 0;
-
-	powerDelivery.isused.DC_PEVPowerDeliveryParameter=0;
-	powerDelivery.isused.AC_PEVPowerDeliveryParameter=1;
-	pevPowerDelivery.AC_PEVStatus = pevStatus;
-
-
-	powerDelivery.AC_PEVPowerDeliveryParameter = &pevPowerDelivery;
-
-	resultPowerDelivery.AC_EVSEStatus = &evseStatus; /* we expect the AC-based EVSE status */
-
-	/***********************
-	 * Call powerDelivery *
-	 ***********************/
-	printf("\nPEV: call EVSE powerDelivery\n");
-
-	if(call_powerDelivery(&service,&v2gHeader,&powerDelivery,&resultPowerDelivery))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultPowerDelivery.ResponseCode);
-		printACEVSEStatus(&evseStatus);
-	}
-
-
-
-
-
-	/********************
-	 * Call meterStatus *
-	 ********************/
-
-	meteringStatus.AC_PEVStatus = &pevStatus;
-	meteringStatus.isused.AC_PEVStatus=1;
-	meteringStatus.isused.DC_PEVStatus=0;
-
-	resultMeteringStatus.AC_EVSEStatus = &evseStatus;
-
-	printf("\nPEV: call EVSE meterStatus\n");
-
-	if(call_meteringStatus(&service,&v2gHeader,&meteringStatus,&resultMeteringStatus))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultPowerDiscovery.ResponseCode);
-		printACEVSEStatus(resultMeteringStatus.AC_EVSEStatus);
-		printf("\tEVSEID=%d\n",resultMeteringStatus.EVSEID.data[0]);
-		printf("\tEVSEMaxPower=%d\n",resultMeteringStatus.EVSEMaxPower.Value);
-		printf("\tisused.MeterInfo=%d\n",		resultMeteringStatus.isused.MeterInfo);
-		printf("\t\tMeterInfo.MeterID=%d\n",		resultMeteringStatus.MeterInfo.MeterID.data[0]);
-		printf("\t\tMeterInfo.MeterReading.Value=%d\n",		resultMeteringStatus.MeterInfo.MeterReading.Value);
-		printf("\t\tMeterInfo.MeterStatus=%d\n",		resultMeteringStatus.MeterInfo.MeterStatus);
-	}
-
-
-
-	/*********************************
-	 * Setup data for meteringReceipt *
-	 *********************************/
-
-	meteringReceipt.PEVID.arraylen.data=1;
-	meteringReceipt.PEVID.data[0]=10;
-	meteringReceipt.isused.PEVID=1;
-
-	meteringReceipt.AC_PEVStatus = &pevStatus;
-	meteringReceipt.isused.AC_PEVStatus =1;
-	meteringReceipt.isused.DC_PEVStatus =0;
-	meteringReceipt.TCurrent = 12345;
-	meteringReceipt.isused.TCurrent = 1;
-	meteringReceipt.Tariff = 12;
-	meteringReceipt.MeterInfo.MeterStatus = 2;
-	meteringReceipt.MeterInfo.isused.MeterStatus = 1;
-
-
-	meteringReceipt.MeterInfo.MeterID.arraylen.data=1;
-	meteringReceipt.MeterInfo.MeterID.data[0]=3;
-	meteringReceipt.MeterInfo.isused.MeterID = 1;
-
-	meteringReceipt.MeterInfo.MeterReading.Multiplier = 0;
-	meteringReceipt.MeterInfo.MeterReading.Unit = A_unitSymbolType;
-	meteringReceipt.MeterInfo.MeterReading.Value = 500;
-	meteringReceipt.MeterInfo.isused.MeterReading = 1;
-
-	meteringReceipt.MeterInfo.TMeter =123456789;
-	meteringReceipt.MeterInfo.isused.TMeter = 1;
-
-
-	resultMeteringReceipt.AC_EVSEStatus = &evseStatus;
-
-	/***********************
-	 * Call meteringReceipt *
-	 ***********************/
-	printf("\nPEV: call EVSE meteringReceipt\n");
-
-
-
-	if(call_meteringReceipt(&service,&v2gHeader,&meteringReceipt,&resultMeteringReceipt))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultMeteringReceipt.ResponseCode);
-		printACEVSEStatus(resultMeteringReceipt.AC_EVSEStatus);
-	}
-
-	return 0;
-}
-
-static int dc_charging()
-{
-
-
-
-	static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/
-	static uint32_t string_array[MAX_STRING_SIZE]; /* define MAX_STRING_SIZE before*/
-
-	/* define in and out byte stream */
-	uint8_t inStream[MAX_STREAM_SIZE]; /* define MAX_STREAM_SIZE before */
-	uint8_t outStream[MAX_STREAM_SIZE]; /* define MAX_STREAM_SIZE before */
-
-
-
-	/* define offset variable for transport header data */
-	uint16_t transportHeaderOffset;
-
-
-	/* service data structure for DC*/
-	struct EXIService service;
-	struct MessageHeaderType v2gHeader;
-	struct SessionSetupReqType sessionSetup;
-	struct SessionSetupResType resultSessionSetup;
-	struct ServiceDiscoveryReqType serviceDiscovery;
-	struct ServiceDiscoveryResType resultServiceDiscovery;
-	struct ChargeParameterDiscoveryReqType powerDiscovery;
-	struct ChargeParameterDiscoveryResType resultPowerDiscovery;
-	struct CableCheckReqType cableCheck;
-	struct CableCheckResType resultCableCheck;
-	struct PowerDeliveryReqType powerDelivery;
-	struct PowerDeliveryResType resultPowerDelivery;
-	struct PreChargeReqType preCharge;
-	struct PreChargeResType resultPreCharge;
-	struct CurrentDemandReqType currentDemand;
-	struct CurrentDemandResType resultCurrentDemand;
-	struct WeldingDetectionReqType weldingDetection;
-	struct WeldingDetectionResType resultWeldingDetection;
-	struct TerminateChargingReqType terminateCharging;
-	struct TerminateChargingResType resultTerminateCharging;
-
-	struct DC_PEVStatusType pevStatus;
-	struct DC_EVSEStatusType evseStatus;
-	struct DC_PEVChargeParameterType pevChargeParameter;
-	struct DC_EVSEChargeParameterType evseChargeParameter;
-	struct DC_PEVPowerDeliveryParameterType pevPowerDelivery;
-
-
-	struct FloatingValueType float_type; /* test float type*/
-
-	/* BINARY memory setup */
-	bytes_t bytes = { MAX_BYTE_SIZE, byte_array, 0 };
-
-	/* STRING memory setup */
-	string_ucs_t string = { MAX_STRING_SIZE, string_array, 0 };
-
-	/* setup offset for DoIP header (otherwise set
-	 * transportHeaderOffset=0 if no transfer protocol is used)*/
-	transportHeaderOffset = V2GTP_HEADER_LENGTH;
-
-
-	/*******************
-	 * Init V2G Client *
-	 *******************/
-
-	init_v2gServiceClient(&service,bytes,string,inStream,MAX_STREAM_SIZE, outStream, MAX_STREAM_SIZE, transportHeaderOffset);
-
-
-	/*******************************
-	 * Setup data for sessionSetup *
-	 *******************************/
-
-	/* setup header information */
-	v2gHeader.SessionInformation.SessionID.data[0] = 0; /* sessionID is always '0' at the beginning (the response contains the valid sessionID)*/
-	v2gHeader.SessionInformation.SessionID.arraylen.data = 1; /* no session id in the initial message -> array length = 0*/
-	v2gHeader.SessionInformation.ProtocolVersion.data[0]='1'; /* assign protocol version number*/
-	v2gHeader.SessionInformation.ProtocolVersion.arraylen.data=1; /* array string length =1 of protocol version */
-	v2gHeader.SessionInformation.isused.ProtocolVersion = 1; /* important: optional elements have to be set used (=1) or not used (=0) */
-	v2gHeader.SessionInformation.isused.ServiceSessionID = 0; /* service session is not used */
-	v2gHeader.isused.Notification=0; /* no notification */
-	v2gHeader.isused.Security=0; /* no security */
-
-	/* setup sessionSetup parameter */
-	sessionSetup.isused.PEVID=1; /*  PEVID is transported */
-	sessionSetup.PEVID.arraylen.data=1;
-	sessionSetup.PEVID.data[0]=10;
-
-
-	printf("PEV: call EVSE sessionSetup\n");
-
-	/*********************
-	 * Call sessionSetup *
-	 *********************/
-	if(call_sessionSetup(&service,&v2gHeader, &sessionSetup,&resultSessionSetup))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-		/* show result of the answer message of EVSE sessionSetup */
-		printf("PEV: received response message from EVSE\n");
-		printf("\tHeader SessionID=%d\n",v2gHeader.SessionInformation.SessionID.data[0]);
-		printf("\tResponseCode=%d\n",resultSessionSetup.ResponseCode);
-		printf("\tEVSEID=%d\n",	resultSessionSetup.EVSEID.data[0]);
-		printf("\tTCurrent=%d\n",resultSessionSetup.TCurrent);
-	}
-
-
-
-
-
-	/*******************************************
-	 * Setup data for serviceDiscovery *
-	 *******************************************/
-
-	serviceDiscovery.isused.ServiceType=1;
-	serviceDiscovery.ServiceType = 	PEVRechargeCharge_serviceCategoryType;
-	serviceDiscovery.isused.ServiceScope=0;
-
-
-	printf("PEV: call EVSE serviceDiscovery\n");
-
-	/*************************
-	 * Call serviceDiscovery *
-	 *************************/
-	if(call_serviceDiscovery(&service,&v2gHeader, &serviceDiscovery,&resultServiceDiscovery))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-		/* show result of the answer message of EVSE sessionSetup */
-		printf("PEV: received response message from EVSE\n");
-		printf("\t Header SessionID=%d\n",v2gHeader.SessionInformation.SessionID.data[0]);
-		printf("\t ResponseCode=%d\n",resultServiceDiscovery.ResponseCode);
-		printf("\t ServiceID=%d\n",	resultServiceDiscovery.ChargeService.ServiceTag.ServiceID.data[0]);
-		printf("\t PaymentOption=%d\n",	resultServiceDiscovery.PaymentOptions.PaymentOption[0]);
-		printf("\t EnergyTransferType=%d\n",	resultServiceDiscovery.ChargeService.EnergyTransferType);
-	}
-
-
-
-
-
-
-
-	/*******************************************
-	 * Setup data for chargeParameterDiscovery *
-	 *******************************************/
-
-	powerDiscovery.PEVRequestedEnergyTransferType = DC_core_PEVRequestedEnergyTransferType;
-
-	/* setup PEVStatus */
-	pevStatus.ConnectorLocked = 1;
-	pevStatus.PEVRESSSOC = 89;
-	pevStatus.PEVReady = 1;
-	pevStatus.PEVStandby = 1;
-	pevStatus.PEVStatusCode = PEVCabinConditioning_DC_PEVStatusCodeType;
-
-	pevChargeParameter.DC_PEVStatus = pevStatus;
-
-
-	float_type.Multiplier = 0;
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 100;
-
-	pevChargeParameter.PEVMaximumCurrentLimit = float_type;
-
-	float_type.Unit = W_unitSymbolType;
-	float_type.Value = 200;
-
-	pevChargeParameter.PEVMaximumPowerLimit = float_type;
-	pevChargeParameter.isused.PEVMaximumPowerLimit = 1;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 300;
-
-	pevChargeParameter.PEVMaximumVoltageLimit= float_type;
-
-	float_type.Unit = W_s_unitSymbolType;
-	float_type.Value = 400;
-
-	pevChargeParameter.PEVEnergyCapacity= float_type;
-	pevChargeParameter.isused.PEVEnergyCapacity = 1;
-
-	float_type.Unit = W_s_unitSymbolType;
-	float_type.Value = 500;
-
-	pevChargeParameter.PEVEnergyRequest= float_type;
-	pevChargeParameter.isused.PEVEnergyRequest = 1;
-
-	pevChargeParameter.FullSOC=0;
-	pevChargeParameter.isused.FullSOC = 1;
-
-	pevChargeParameter.BulkSOC=100;
-	pevChargeParameter.isused.BulkSOC = 1;
-
-	pevChargeParameter.PEVProtocolVersion = 12;
-
-	powerDiscovery.DC_PEVChargeParameter = &pevChargeParameter;
-	powerDiscovery.isused.DC_PEVChargeParameter = 1; /* we use here DC based charging parameters */
-	powerDiscovery.isused.AC_PEVChargeParameter = 0;
-
-	resultPowerDiscovery.DC_EVSEChargeParameter = &evseChargeParameter; /* we expect DC-based parameters from the evse*/
-
-	/*********************************
-	 * Call chargeParameterDiscovery *
-	 *********************************/
-	printf("\nPEV: call EVSE chargeParameterDiscovery\n");
-
-	if(call_chargeParameterDiscovery(&service,&v2gHeader,&powerDiscovery,&resultPowerDiscovery))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\t\t Header SessionID=%d\n",v2gHeader.SessionInformation.SessionID.data[0]);
-		printf("\tResponseCode=%d\n",resultPowerDiscovery.ResponseCode);
-		printDCEVSEStatus(&(resultPowerDiscovery.DC_EVSEChargeParameter->DC_EVSEStatus));
-		printf("\tEVSEMaximumCurrentLimit=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEMaximumCurrentLimit.Value);
-		printf("\tEVSEMaximumPowerLimit=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEMaximumPowerLimit.Value);
-		printf("\tEVSEMaximumVoltageLimit=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEMaximumVoltageLimit.Value);
-		printf("\tEVSEMinimumCurrentLimit=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEMinimumCurrentLimit.Value);
-
-		printf("\tEVSEMinimumVoltageLimit=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEMinimumVoltageLimit.Value);
-		printf("\tEVSECurrentRegulationTolerance=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSECurrentRegulationTolerance.Value);
-		printf("\tEVSEPeakCurrentRipple=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEPeakCurrentRipple.Value);
-		printf("\tEVSEEnergyToBeDelivered=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEEnergyToBeDelivered.Value);
-		printf("\tEVSEProtocolVersion=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEProtocolVersion);
-	}
-
-
-
-
-	/***********************
-	 * Call cableCheck     *
-	 ***********************/
-	printf("\nPEV: call EVSE cableCheck\n");
-
-	cableCheck.DC_PEVStatus =pevStatus;
-
-
-
-	if(call_cableCheck(&service,&v2gHeader,&cableCheck,&resultCableCheck))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE powerDiscovery*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultCableCheck.ResponseCode);
-		printDCEVSEStatus(&(resultCableCheck.DC_EVSEStatus));
-	}
-
-
-	/***********************
-	 * Call preCharge      *
-	 ***********************/
-	printf("\nPEV: call EVSE preCharge\n");
-
-	preCharge.DC_PEVStatus =pevStatus;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 100;
-	preCharge.PEVRESSVoltage = float_type;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 200;
-	preCharge.PEVTargetVoltage = float_type;
-
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 300;
-	preCharge.PEVTargetVoltage = float_type;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 400;
-	preCharge.PEVTargetVoltage = float_type;
-
-
-
-	if(call_preCharge(&service,&v2gHeader,&preCharge,&resultPreCharge))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE powerDiscovery*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultPreCharge.ResponseCode);
-		printDCEVSEStatus(&resultPreCharge.DC_EVSEStatus);
-		printf("\tVoltageOutput=%d\n",resultPreCharge.EVSEPresentVoltage.Value);
-	}
-
-
-
-		/*********************************
-		 * Setup data for powerDelivery *
-		 *********************************/
-
-		powerDelivery.ReqSwitchStatus = 1;
-		powerDelivery.isused.Tariff = 0;
-		powerDelivery.isused.ChargingProfile= 0;
-
-		powerDelivery.isused.DC_PEVPowerDeliveryParameter=1;
-		powerDelivery.isused.AC_PEVPowerDeliveryParameter=0;
-		pevPowerDelivery.DC_PEVStatus = pevStatus;
-		pevPowerDelivery.BulkChargingComplete = 1;
-		pevPowerDelivery.isused.BulkChargingComplete = 1;
-		pevPowerDelivery.ChargingComplete = 0;
-
-		powerDelivery.DC_PEVPowerDeliveryParameter = &pevPowerDelivery;
-
-		resultPowerDelivery.DC_EVSEStatus = &evseStatus; /* we expect the DC-based EVSE status */
-
-		/***********************
-		 * Call powerDelivery *
-		 ***********************/
-		printf("\nPEV: call EVSE powerDelivery\n");
-
-		if(call_powerDelivery(&service,&v2gHeader,&powerDelivery,&resultPowerDelivery))
-		{
-			printErrorMessage(&service);
-		}
-		else
-		{
-
-			/* show result of the answer message of EVSE sessionSetup*/
-			printf("PEV: received response message from EVSE\n");
-			printf("\tResponseCode=%d\n",resultPowerDelivery.ResponseCode);
-			printDCEVSEStatus(resultPowerDelivery.DC_EVSEStatus);
-		}
-
-
-
-
-
-		/***********************
-		 * Call currentDemand      *
-		 ***********************/
-		printf("\nPEV: call EVSE currentDemand\n");
-
-		currentDemand.DC_PEVStatus = pevStatus;
-
-		float_type.Unit = A_unitSymbolType;
-		float_type.Value = 100;
-
-		currentDemand.ChargeCurrentRequest = float_type;
-
-		float_type.Unit = V_unitSymbolType;
-		float_type.Value = 200;
-
-		currentDemand.PEVMaximumVoltageLimit = float_type;
-		currentDemand.isused.PEVMaximumVoltageLimit = 1;
-
-		float_type.Unit = W_unitSymbolType;
-		float_type.Value = 300;
-
-		currentDemand.PEVMaximumPowerLimit = float_type;
-		currentDemand.isused.PEVMaximumPowerLimit = 1;
-
-		float_type.Unit = A_unitSymbolType;
-		float_type.Value = 400;
-
-		currentDemand.PEVMaximumCurrentLimit = float_type;
-		currentDemand.isused.PEVMaximumCurrentLimit = 1;
-
-		currentDemand.BulkChargingComplete = 1;
-		currentDemand.isused.BulkChargingComplete = 1;
-
-		currentDemand.ChargingComplete = 0;
-
-		float_type.Unit = s_unitSymbolType;
-		float_type.Value = 500;
-
-		currentDemand.RemainingTimeToFullSoC = float_type;
-		currentDemand.isused.RemainingTimeToFullSoC = 1;
-
-		float_type.Unit = s_unitSymbolType;
-		float_type.Value = 600;
-
-		currentDemand.RemainingTimeToBulkSoC = float_type;
-		currentDemand.isused.RemainingTimeToBulkSoC = 1;
-
-
-		float_type.Unit = V_unitSymbolType;
-		float_type.Value = 700;
-
-		currentDemand.PEVTargetVoltage = float_type;
-
-		float_type.Unit = A_unitSymbolType;
-		float_type.Value = 800;
-
-		currentDemand.CurrentDifferential = float_type;
-
-		float_type.Unit = V_unitSymbolType;
-		float_type.Value = 900;
-
-		currentDemand.VoltageDifferential = float_type;
-
-
-		if(call_currentDemand(&service,&v2gHeader,&currentDemand,&resultCurrentDemand))
-		{
-			printErrorMessage(&service);
-		}
-		else
-		{
-
-			/* show result of the answer message of EVSE powerDiscovery*/
-			printf("PEV: received response message from EVSE\n");
-			printf("\tResponseCode=%d\n",resultCurrentDemand.ResponseCode);
-			printDCEVSEStatus(&resultCurrentDemand.DC_EVSEStatus);
-			printf("\tResponseCode=%d\n",resultCurrentDemand.ResponseCode);
-			printDCEVSEStatus(&(resultCurrentDemand.DC_EVSEStatus));
-			printf("\t EVSEPresentVoltage=%d\n",resultCurrentDemand.EVSEPresentVoltage.Value);
-			printf("\t EVSEPresentCurrent=%d\n",resultCurrentDemand.EVSEPresentCurrent.Value);
-			printf("\t EVSECurrentLimitAchieved=%d\n",resultCurrentDemand.EVSECurrentLimitAchieved);
-			printf("\t EVSEVoltageLimitAchieved=%d\n",resultCurrentDemand.EVSEVoltageLimitAchieved);
-
-			printf("\t EVSEPowerLimitAchieved=%d\n",resultCurrentDemand.EVSEPowerLimitAchieved);
-			printf("\t EVSEMaximumVoltageLimit=%d\n",resultCurrentDemand.EVSEMaximumVoltageLimit.Value);
-			printf("\t EVSEMaximumCurrentLimit=%d\n",resultCurrentDemand.EVSEMaximumCurrentLimit.Value);
-			printf("\t EVSEMaximumPowerLimit=%d\n",resultCurrentDemand.EVSEMaximumPowerLimit.Value);
-
-		}
-
-		/***********************
-		 * Call weldingDetection     *
-		 ***********************/
-
-		printf("\nPEV: call EVSE weldingDetection\n");
-		weldingDetection.DC_PEVStatus =pevStatus;
-
-		if(call_weldingDetection(&service,&v2gHeader,&weldingDetection,&resultWeldingDetection))
-		{
-			printErrorMessage(&service);
-		}
-		else
-		{
-
-			/* show result of the answer message of EVSE powerDiscovery*/
-			printf("PEV: received response message from EVSE\n");
-			printf("\tResponseCode=%d\n",resultWeldingDetection.ResponseCode);
-			printDCEVSEStatus(&resultWeldingDetection.DC_EVSEStatus);
-			printf("\tEVSEPresentVoltage=%d\n",resultWeldingDetection.EVSEPresentVoltage.Value);
-		}
-
-
-
-		/*************************
-		 * Call terminateCharging*
-		 *************************/
-		printf("\nPEV: call EVSE terminateCharging\n");
-		terminateCharging.DC_PEVStatus =pevStatus;
-
-		if(call_terminateCharging(&service,&v2gHeader,&terminateCharging,&resultTerminateCharging))
-		{
-			printErrorMessage(&service);
-		}
-		else
-		{
-
-			/* show result of the answer message of EVSE powerDiscovery*/
-			printf("PEV: received response message from EVSE\n");
-			printf("\tResponseCode=%d\n",resultTerminateCharging.ResponseCode);
-			printf("\tEVSEPresentVoltage=%d\n",resultTerminateCharging.EVSEPresentVoltage.Value);
-		}
-
-		return 0;
-
-	}
-
-
-
-int main_service()
-{
-	printf("+++ Start V2G client / service example for AC charging +++\n\n");
-
-	 ac_charging();
-
-	printf("\n+++Terminate V2G Client / Service example for AC charging +++\n");
-	printf("Please press enter for DC charging!\n");
-	fflush(stdout);
-	getchar();
-
-	printf("+++ Start V2G client / service example for DC charging +++\n\n");
-
-	dc_charging();
-
-	printf("\n+++Terminate V2G client / service example for DC charging +++");
-
-	return 0;
-}
-
-static void printACEVSEStatus(struct AC_EVSEStatusType* status)
-{
-	printf("\tEVSEStatus:\n\t\tConnectorLocked=%d\n",status->ConnectorLocked);
-	printf("\t\tEVSEStandby=%d\n",status->EVSEStandby);
-	printf("\t\tPowerSwitchClosed=%d\n",status->PowerSwitchClosed);
-	printf("\t\tRCD=%d\n",status->RCD);
-	printf("\t\tShutDownTime=%d\n",status->ShutDownTime);
-	printf("\t\tStopCharging=%d\n",status->StopCharging);
-}
-
-static void printDCEVSEStatus(struct DC_EVSEStatusType* status)
-{
-	printf("\tEVSEStatus:\n\t\tEVSEStandby=%d\n",status->EVSEStandby);
-	printf("\t\tEVSEStatusCode=%d\n",status->EVSEStatusCode);
-
-}
-
-static void printErrorMessage(struct EXIService* service)
-{
-	if(service->errorCode==EXI_NON_VALID_MESSAGE)
-	{
-		printf("PEV did not send a valid V2G message!\n");
-	}
-	else if(service->errorCode==EXI_SERIALIZATION_FAILED)
-	{
-		printf("EVSE error: Could not serialize the response message\n");
-	}
-}
-
-static void printASCIIString(uint32_t* string, uint32_t len) {
-	unsigned int i;
-	for(i=0; i<len; i++) {
-		printf("%c",(char)string[i]);
-	}
-	printf("\n");
-}
-
-

+ 0 - 47
src/test/serviceClientDataTransmitter.c

@@ -1,47 +0,0 @@
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @@version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-#include "v2g_serviceClientDataTransmitter.h"
-#include "evse_server.h"
-#include "v2gtp.h"
-
-/* This method has to be implemented!
- * Send EXI stream (outStream) to EVSE and receive response stream (inStream)*/
-int serviceDataTransmitter(uint8_t* outStream, uint16_t outStreamLength, uint8_t* inStream)
-{
-	/* send output stream to the underlying network to the EVSE and wait for response
-	 * --> here provide data to the V2G server directly*/
-
-	uint16_t inStreamLength = 0;
-	uint16_t payloadLength = 0;
-
-	/* setup v2gtp header information; outStreamLength==payloadLength*/
-	write_v2gtpHeader(outStream,&outStreamLength,V2GTP_EXI_TYPE);
-
-	/* send data to EVSE server (add v2g offset)*/
-	testV2GService(outStream, outStreamLength, inStream, &inStreamLength);
-
-	return read_v2gtpHeader(inStream,inStreamLength, &payloadLength);
-}

+ 0 - 98
src/transport/v2gtp.c

@@ -1,98 +0,0 @@
-
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-/*
- * This file implements the v2gtp header writer and reader.
- *
- */
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <math.h>
-#include <string.h>
-
-#include "v2gtp.h"
-
-
-int write_v2gtpHeader(uint8_t* outStream, uint16_t* outStreamLength, uint16_t payloadType)
-{
-
-	/* write v2gtp version number 1=byte */
-	outStream[0]=V2GTP_VERSION;
-
-	/* write inverse v2gtp version */
-	outStream[1]=V2GTP_VERSION_INV;
-
-
-	/* write payload type */
-	outStream[2] = (uint8_t)(payloadType & 0xFF);
-	outStream[3] = (uint8_t)(payloadType >> 8 & 0xFF);
-
-	/* write payload length */
-	outStream[4] = (uint8_t)(*outStreamLength & 0xFF);
-	outStream[5] = (uint8_t)(*outStreamLength>>8 & 0xFF);
-	outStream[6] = (uint8_t)(*outStreamLength>>16 & 0xFF);
-	outStream[7] = (uint8_t)(*outStreamLength>>24 & 0xFF);
-
-	/* here, the outStream length have to be resized by the v2gtp offset*/
-	*outStreamLength += V2GTP_HEADER_LENGTH;
-
-	return 0;
-}
-
-int read_v2gtpHeader(uint8_t* inStream, uint16_t inStreamLength, uint16_t* payloadLength)
-{
-	uint16_t payloadType=0;
-
-
-	/* check, if we support this v2gtp version */
-	if(inStream[0]!=V2GTP_VERSION && inStream[1]!=V2GTP_VERSION_INV)
-		return -1;
-
-
-	/* check, if we support this payload type*/
-	payloadType = inStream[3];
-	payloadType = (payloadType << 8 | inStream[2]);
-
-	if(payloadType != V2GTP_EXI_TYPE)
-		return -1;
-
-
-	/* determine payload length*/
-	*payloadLength = inStream[7];
-	*payloadLength = (*payloadLength << 8 | inStream[6]);
-	*payloadLength = (*payloadLength << 16 | inStream[5]);
-	*payloadLength = (*payloadLength << 24 | inStream[4]);
-
-	if((*payloadLength+V2GTP_HEADER_LENGTH)!=inStreamLength)
-		return -1;
-
-
-	return 0;
-}
-

+ 0 - 54
src/transport/v2gtp.h

@@ -1,54 +0,0 @@
-
-/*
- * 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.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.5
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef V2GTP_H_
-#define V2GTP_H_
-
-/* generic V2GTP header length */
-#define V2GTP_HEADER_LENGTH 8
-
-/* define V2GTP Version */
-#define V2GTP_VERSION 0x01
-#define V2GTP_VERSION_INV 0xFE
-
-/* define V2GTP payload types*/
-#define V2GTP_EXI_TYPE 0x8001
-
-
-
-int write_v2gtpHeader(uint8_t* outStream, uint16_t* outStreamLength, uint16_t payloadType);
-
-int read_v2gtpHeader(uint8_t* inStream, uint16_t inStreamLength, uint16_t* payloadLength);
-
-#endif /* V2GTP_H_ */
-
-#ifdef __cplusplus
-}
-#endif

Некоторые файлы не были показаны из-за большого количества измененных файлов