From 782fc539fc8bb7f8480c4f2fe87fd589f1827ccc Mon Sep 17 00:00:00 2001 From: sebastiankb Date: Thu, 1 Dec 2011 19:24:25 +0000 Subject: [PATCH] OpeOpenV2G 0.5 init --- src/codec/AbstractDecoderChannel.c | 579 ++ src/codec/AbstractEncoderChannel.c | 436 + src/codec/BitDecoderChannel.c | 257 +- src/codec/BitDecoderChannel.h | 9 +- src/codec/BitEncoderChannel.c | 236 +- src/codec/BitEncoderChannel.h | 11 +- src/codec/BitInputStream.c | 20 +- src/codec/BitInputStream.h | 6 +- src/codec/BitOutputStream.c | 41 +- src/codec/BitOutputStream.h | 6 +- src/codec/ByteDecoderChannel.c | 93 + src/codec/ByteEncoderChannel.c | 125 + src/codec/ByteStream.c | 68 +- src/codec/ByteStream.h | 56 +- src/codec/CoderChannel.h | 48 + src/codec/DecoderChannel.h | 178 + src/codec/EXICoder.c | 903 +- src/codec/EXICoder.h | 26 +- src/codec/EXIDecoder.c | 9037 ++++++++++++++--- src/codec/EXIDecoder.h | 40 +- src/codec/EXIEncoder.c | 8067 ++++++++++++--- src/codec/EXIEncoder.h | 26 +- src/codec/EXIHeaderDecoder.c | 59 +- src/codec/EXIHeaderDecoder.h | 52 +- src/codec/EXIHeaderEncoder.c | 57 +- src/codec/EXIHeaderEncoder.h | 52 +- src/codec/EXITypes.h | 366 +- src/codec/EncoderChannel.h | 180 + src/codec/MethodsBag.c | 106 + src/codec/MethodsBag.h | 59 + src/codec/NameTableEntries.c | 185 + ...tringTableEntries.h => NameTableEntries.h} | 33 +- src/codec/StringTable.c | 205 +- src/codec/StringTable.h | 30 +- src/codec/StringTableEntries.c | 134 - src/codec/UCSString.c | 60 +- src/codec/UCSString.h | 50 +- src/service/v2g_service.h | 11 +- .../v2g_serviceClientDataTransmitter.h | 4 +- src/service/v2g_serviceClientStubs.c | 3045 ++++-- src/service/v2g_serviceClientStubs.h | 83 +- src/service/v2g_serviceDataSerialization.c | 8576 +++++++++++----- src/service/v2g_serviceDataTypes.c | 533 +- src/service/v2g_serviceDataTypes.h | 1402 ++- src/service/v2g_serviceDispatcher.c | 2081 +++- src/service/v2g_serviceDispatcher.h | 4 +- src/service/v2g_serviceMethods.h | 40 +- src/test/evse_server.c | 87 + src/test/evse_server.h | 33 + src/test/evse_serviceMethods.c | 569 ++ src/test/main.c | 43 + src/test/main.h | 34 + src/test/main_codec.old | 259 + src/test/pev_service.c | 951 ++ src/test/serviceClientDataTransmitter.c | 47 + src/transport/v2gtp.c | 98 + src/transport/v2gtp.h | 54 + 57 files changed, 31803 insertions(+), 8047 deletions(-) create mode 100644 src/codec/AbstractDecoderChannel.c create mode 100644 src/codec/AbstractEncoderChannel.c create mode 100644 src/codec/ByteDecoderChannel.c create mode 100644 src/codec/ByteEncoderChannel.c create mode 100644 src/codec/CoderChannel.h create mode 100644 src/codec/DecoderChannel.h create mode 100644 src/codec/EncoderChannel.h create mode 100644 src/codec/MethodsBag.c create mode 100644 src/codec/MethodsBag.h create mode 100644 src/codec/NameTableEntries.c rename src/codec/{StringTableEntries.h => NameTableEntries.h} (63%) delete mode 100644 src/codec/StringTableEntries.c create mode 100644 src/test/evse_server.c create mode 100644 src/test/evse_server.h create mode 100644 src/test/evse_serviceMethods.c create mode 100644 src/test/main.c create mode 100644 src/test/main.h create mode 100644 src/test/main_codec.old create mode 100644 src/test/pev_service.c create mode 100644 src/test/serviceClientDataTransmitter.c create mode 100644 src/transport/v2gtp.c create mode 100644 src/transport/v2gtp.h diff --git a/src/codec/AbstractDecoderChannel.c b/src/codec/AbstractDecoderChannel.c new file mode 100644 index 0000000..6d79370 --- /dev/null +++ b/src/codec/AbstractDecoderChannel.c @@ -0,0 +1,579 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + + + +#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, 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 gYear: /* Year, [Time-Zone] */ + errn = decodeInteger32(stream, &datetime->year); + if (errn < 0) { + return errn; + } + datetime->year += DATETIME_YEAR_OFFSET; + break; + case gYearMonth: /* Year, MonthDay, [TimeZone] */ + case date: + 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 dateTime: /* 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 time: /* 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 gMonth: /* MonthDay, [TimeZone] */ + /* e.g. "--12" */ + case gMonthDay: /* MonthDay, [TimeZone] */ + /* e.g. "--01-28" */ + case gDay: /* 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 + diff --git a/src/codec/AbstractEncoderChannel.c b/src/codec/AbstractEncoderChannel.c new file mode 100644 index 0000000..442e4d5 --- /dev/null +++ b/src/codec/AbstractEncoderChannel.c @@ -0,0 +1,436 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + + + +#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 gYear: /* Year, [Time-Zone] */ + errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET); + break; + case gYearMonth: /* Year, MonthDay, [TimeZone] */ + case date: /* 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 dateTime: /* 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 time: /* 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 gMonth: /* MonthDay, [TimeZone] */ + case gMonthDay: /* MonthDay, [TimeZone] */ + case gDay: /* 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 + diff --git a/src/codec/BitDecoderChannel.c b/src/codec/BitDecoderChannel.c index 000d155..62a55e2 100644 --- a/src/codec/BitDecoderChannel.c +++ b/src/codec/BitDecoderChannel.c @@ -10,6 +10,7 @@ * 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 . @@ -18,29 +19,36 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * - * Bit decoding functionalities - * + *

Code generated by EXIdizer

********************************************************************/ -#include -#include -#include -#include -#include -#include "BitDecoderChannel.h" + +#include "DecoderChannel.h" #include "BitInputStream.h" #include "EXITypes.h" #ifndef BIT_DECODER_CHANNEL_C #define BIT_DECODER_CHANNEL_C -/* only the least significant 8 bits are filled properly */ -int _decode(bitstream_t* stream, uint32_t* b) { - return readBits(stream, 8, b); + +#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) { @@ -59,230 +67,7 @@ int decodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t* uin } } -int decodeUnsignedInteger16(bitstream_t* stream, uint16_t* uint16) { - unsigned int mShift = 0; - int errn = 0; - uint32_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; - uint32_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; - uint32_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; -} - -/** - * 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 sequence of characters for a given length. - */ -int decodeStringOnly(bitstream_t* stream, uint16_t len, string_ucs_t* s) { - 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 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 */ - printf("[ERROR] String local value partition hit not supported \n"); - return -2; - case 1: - /* found in global value partition */ - printf("[ERROR] String global value partition hit not supported \n"); - return -3; - 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); */ - } -} - -/** - * 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; -} - -/** - * Decode a binary value as a length-prefixed sequence of octets. - */ -int decodeBinary(bitstream_t* stream, bytes_t* bytes) { - unsigned int i; - uint32_t b; - int errn = decodeUnsignedInteger16(stream, &bytes->len); - if (errn < 0) { - return errn; - } - - 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; -} +#endif #endif diff --git a/src/codec/BitDecoderChannel.h b/src/codec/BitDecoderChannel.h index e89d05b..12bd106 100644 --- a/src/codec/BitDecoderChannel.h +++ b/src/codec/BitDecoderChannel.h @@ -10,6 +10,7 @@ * 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 . @@ -18,11 +19,14 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 2011-05-23 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ + + #ifdef __cplusplus extern "C" { #endif @@ -102,6 +106,8 @@ int decodeStringOnly(bitstream_t* stream, uint16_t len, string_ucs_t* s); */ 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 @@ -115,6 +121,7 @@ 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. diff --git a/src/codec/BitEncoderChannel.c b/src/codec/BitEncoderChannel.c index 0c64109..e333107 100644 --- a/src/codec/BitEncoderChannel.c +++ b/src/codec/BitEncoderChannel.c @@ -10,6 +10,7 @@ * 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 . @@ -18,54 +19,23 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ -#include -#include -#include -#include "BitEncoderChannel.h" + + +#include "EncoderChannel.h" +#include "CoderChannel.h" #include "BitOutputStream.h" #include "EXITypes.h" #ifndef BIT_ENCODER_CHANNEL_C #define BIT_ENCODER_CHANNEL_C -/** - * Returns the least number of 7 bit-blocks that is needed to represent the - * int n. Returns 1 if n is 0. - * - * @param n - * integer value - * - */ -uint8_t numberOf7BitBlocksToRepresent(int 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; - } -} +#if EXI_ALIGNMENT == BIT_PACKED int encode(bitstream_t* stream, uint8_t b) { @@ -87,192 +57,10 @@ int encodeBoolean(bitstream_t* stream, int b) { * b starting with the most significant, i.e. from left to right. */ int encodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t val) { - return writeBits(stream, nbits, 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) { - 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)); - } + if (nbits > 0) { + return writeBits(stream, nbits, val); } - - 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); -} - - -/** - * 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 length prefixed sequence of characters. - */ -int encodeString(bitstream_t* stream, string_ucs_t* string) { - int errn = encodeUnsignedInteger32(stream, string->len); - if (errn >= 0) { - errn = encodeCharacters(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 = encodeCharacters(stream, string->codepoints, string->len); - } - 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 encodeCharacters(bitstream_t* stream, uint32_t* chars, uint16_t len) { - unsigned int i; - int errn = 0; - for(i=0; i=0; i++) { - errn = encodeUnsignedInteger32(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; ilen && errn>=0; i++) { - errn = encode(stream, bytes->data[i]); - } - return errn; + return 0; } /** @@ -283,6 +71,8 @@ int encodeFinish(bitstream_t* stream) { } +#endif /* alignment */ + #endif diff --git a/src/codec/BitEncoderChannel.h b/src/codec/BitEncoderChannel.h index c4fc7c8..081c43f 100644 --- a/src/codec/BitEncoderChannel.h +++ b/src/codec/BitEncoderChannel.h @@ -10,6 +10,7 @@ * 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 . @@ -18,11 +19,14 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 2011-05-23 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ + + #ifdef __cplusplus extern "C" { #endif @@ -93,6 +97,7 @@ 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 @@ -104,7 +109,9 @@ int encodeStringValue(bitstream_t* stream, string_ucs_t* string); * Each character is represented by its UCS [ISO/IEC 10646] * code point encoded as an Unsigned Integer */ -int encodeCharacters(bitstream_t* stream, uint32_t* chars, uint16_t len); +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. diff --git a/src/codec/BitInputStream.c b/src/codec/BitInputStream.c index 08fe353..fd48dd1 100644 --- a/src/codec/BitInputStream.c +++ b/src/codec/BitInputStream.c @@ -10,6 +10,7 @@ * 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 . @@ -18,14 +19,13 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ -#include -#include -#include + #include "EXITypes.h" #include "BitInputStream.h" @@ -39,12 +39,22 @@ 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 = -1; + 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; } diff --git a/src/codec/BitInputStream.h b/src/codec/BitInputStream.h index d8db9ce..a9df41f 100644 --- a/src/codec/BitInputStream.h +++ b/src/codec/BitInputStream.h @@ -10,6 +10,7 @@ * 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 . @@ -18,11 +19,14 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ + + #ifdef __cplusplus extern "C" { #endif diff --git a/src/codec/BitOutputStream.c b/src/codec/BitOutputStream.c index 71e9f84..6eaaafe 100644 --- a/src/codec/BitOutputStream.c +++ b/src/codec/BitOutputStream.c @@ -10,6 +10,7 @@ * 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 . @@ -18,12 +19,13 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ -#include + #include "EXITypes.h" #include "BitOutputStream.h" @@ -39,12 +41,19 @@ int writeBits(bitstream_t* stream, uint16_t nbits, uint32_t val) { stream->buffer = (stream->buffer << (nbits)) | (val & (0xff >> (BITS_IN_BYTE - nbits))); stream->capacity -= nbits; - /* if the buffer is full write it into the data */ + /* if the buffer is full write byte */ if (stream->capacity == 0) { +#if EXI_STREAM == BYTE_ARRAY if ((*stream->pos) >= stream->size) { - return -1; + return EXI_ERROR_OUTPUT_STREAM_EOF; } - stream->data[(*stream->pos)++] = 0xFF & stream->buffer; + 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; } @@ -56,19 +65,33 @@ int writeBits(bitstream_t* stream, uint16_t nbits, uint32_t val) { - stream->capacity))); nbits -= stream->capacity; +#if EXI_STREAM == BYTE_ARRAY if ((*stream->pos) >= stream->size) { - return -1; + return EXI_ERROR_OUTPUT_STREAM_EOF; } - stream->data[(*stream->pos)++] = 0xFF & stream->buffer; + 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 -1; + return EXI_ERROR_OUTPUT_STREAM_EOF; } - stream->data[(*stream->pos)++] = 0xFF & (val >> (nbits)); + 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 */ diff --git a/src/codec/BitOutputStream.h b/src/codec/BitOutputStream.h index 942d5c5..173426f 100644 --- a/src/codec/BitOutputStream.h +++ b/src/codec/BitOutputStream.h @@ -10,6 +10,7 @@ * 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 . @@ -18,11 +19,14 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ + + #ifdef __cplusplus extern "C" { #endif diff --git a/src/codec/ByteDecoderChannel.c b/src/codec/ByteDecoderChannel.c new file mode 100644 index 0000000..fa1c43b --- /dev/null +++ b/src/codec/ByteDecoderChannel.c @@ -0,0 +1,93 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + + + +#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 + diff --git a/src/codec/ByteEncoderChannel.c b/src/codec/ByteEncoderChannel.c new file mode 100644 index 0000000..0dc9f7c --- /dev/null +++ b/src/codec/ByteEncoderChannel.c @@ -0,0 +1,125 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + + + +#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 + + + + + + + + + + + + diff --git a/src/codec/ByteStream.c b/src/codec/ByteStream.c index 87e611a..3dae435 100644 --- a/src/codec/ByteStream.c +++ b/src/codec/ByteStream.c @@ -1,58 +1,54 @@ -/* - * 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 . - */ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + -/******************************************************************* - * - * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 - * @contact Joerg.Heuer@siemens.com - * - ********************************************************************/ #define _CRT_SECURE_NO_DEPRECATE 1 -#include -#include -#include -#include -#include - #include "EXITypes.h" #ifndef BYTE_STREAM_C #define BYTE_STREAM_C -int readBytesFromFile(const char * filename, uint8_t* data, uint16_t size, uint16_t pos) { +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) { - printf("\n[Error] no valid file handle !\n"); - return -1; + return EXI_ERROR_INPUT_FILE_HANDLE; } else { /* read bytes */ while ((character = getc(f)) != EOF) { if (pos >= size) { - return -1; + return EXI_ERROR_OUT_OF_BYTE_BUFFER; } data[pos++] = (uint8_t) character; - /* printf("%u \n", character); */ } fclose(f); } @@ -60,7 +56,7 @@ int readBytesFromFile(const char * filename, uint8_t* data, uint16_t size, uint1 return pos; } -int writeBytesToFile(uint8_t* data, uint16_t len, const char * filename) { +int writeBytesToFile(uint8_t* data, uint32_t len, const char * filename) { uint16_t rlen; FILE* f = fopen(filename, "wb+"); @@ -73,7 +69,7 @@ int writeBytesToFile(uint8_t* data, uint16_t len, const char * filename) { if(rlen == len) { return 0; } else { - return -1; + return EXI_ERROR_OUTPUT_FILE; } } } diff --git a/src/codec/ByteStream.h b/src/codec/ByteStream.h index 859dca3..b870f3b 100644 --- a/src/codec/ByteStream.h +++ b/src/codec/ByteStream.h @@ -1,42 +1,44 @@ -/* - * 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 . - */ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + -/******************************************************************* - * - * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 - * @contact Joerg.Heuer@siemens.com - * - ********************************************************************/ #ifdef __cplusplus extern "C" { #endif -#include - #include "EXITypes.h" #ifndef BYTE_STREAM_H #define BYTE_STREAM_H -int writeBytesToFile(uint8_t* data, uint16_t len, const char * filename); +int writeBytesToFile(uint8_t* data, uint32_t len, const char * filename); -int readBytesFromFile(const char * filename, uint8_t* data, uint16_t size, uint16_t pos); +int readBytesFromFile(const char * filename, uint8_t* data, uint32_t size, uint32_t pos); #endif diff --git a/src/codec/CoderChannel.h b/src/codec/CoderChannel.h new file mode 100644 index 0000000..85d7441 --- /dev/null +++ b/src/codec/CoderChannel.h @@ -0,0 +1,48 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + + + +#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 + diff --git a/src/codec/DecoderChannel.h b/src/codec/DecoderChannel.h new file mode 100644 index 0000000..606804e --- /dev/null +++ b/src/codec/DecoderChannel.h @@ -0,0 +1,178 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#include "EXITypes.h" +#include "CoderChannel.h" + +#ifndef DECODER_CHANNEL_H +#define DECODER_CHANNEL_H + +/** + * Decode a byte value. + */ +int decode(bitstream_t* stream, uint8_t* b); + +/** + * Decode a single boolean value. The value false is represented by the bit + * 0, and the value true is represented by the bit 1. + */ +int decodeBoolean(bitstream_t* stream, int* b); + +/** + * Decodes and returns an n-bit unsigned integer. + */ +int decodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t* uint32); + +/** + * Decode an arbitrary precision non negative integer using a sequence of + * octets. The most significant bit of the last octet is set to zero to + * indicate sequence termination. Only seven bits per octet are used to + * store the integer's value. + */ +int decodeUnsignedInteger(bitstream_t* stream, integer_t* iv); + +/** + * Decode an arbitrary precision non negative integer using a sequence of + * octets. The most significant bit of the last octet is set to zero to + * indicate sequence termination. Only seven bits per octet are used to + * store the integer's value. + */ +int decodeUnsignedInteger16(bitstream_t* stream, uint16_t* uint16); + +/** + * Decode an arbitrary precision non negative integer using a sequence of + * octets. The most significant bit of the last octet is set to zero to + * indicate sequence termination. Only seven bits per octet are used to + * store the integer's value. + */ +int decodeUnsignedInteger32(bitstream_t* stream, uint32_t* uint32); + +/** + * Decode an arbitrary precision non negative integer using a sequence of + * octets. The most significant bit of the last octet is set to zero to + * indicate sequence termination. Only seven bits per octet are used to + * store the integer's value. + */ +int decodeUnsignedInteger64(bitstream_t* stream, uint64_t* uint64); + +/** + * Decode an arbitrary precision integer using a sign bit followed by a + * sequence of octets. The most significant bit of the last octet is set to + * zero to indicate sequence termination. Only seven bits per octet are used + * to store the integer's value. + */ +int decodeInteger(bitstream_t* stream, integer_t* iv); + +/** + * Decode an arbitrary precision integer using a sign bit followed by a + * sequence of octets. The most significant bit of the last octet is set to + * zero to indicate sequence termination. Only seven bits per octet are used + * to store the integer's value. + */ +int decodeInteger32(bitstream_t* stream, int32_t* int32); + +/** + * Decode an arbitrary precision integer using a sign bit followed by a + * sequence of octets. The most significant bit of the last octet is set to + * zero to indicate sequence termination. Only seven bits per octet are used + * to store the integer's value. + */ +int decodeInteger64(bitstream_t* stream, int64_t* int64); + +/** + * Decode a Float datatype as two consecutive Integers. + * The first Integer represents the mantissa of the floating point + * number and the second Integer represents the base-10 exponent + * of the floating point number. + */ +int decodeFloat(bitstream_t* stream, float_me_t* f); + +/** + * Decode a decimal represented as a Boolean sign followed by two Unsigned + * Integers. A sign value of zero (0) is used to represent positive Decimal + * values and a sign value of one (1) is used to represent negative Decimal + * values The first Integer represents the integral portion of the Decimal + * value. The second positive integer represents the fractional portion of + * the decimal with the digits in reverse order to preserve leading zeros. + */ +int decodeDecimal(bitstream_t* stream, decimal_t* d); + +/** + * Decode a sequence of characters for a given length. + */ +int decodeStringOnly(bitstream_t* stream, uint16_t len, string_ucs_t* s); + +/** + * Decode a length prefixed sequence of characters. + */ +int decodeString(bitstream_t* stream, string_ucs_t* s); + +int decodeStringASCII(bitstream_t* stream, string_ascii_t* s); + +/** + * Decode a length prefixed sequence of characters in the sense of string tables. + * length == 0, local value partition hit + * length == 1, global value partition hit + * --> string literal is encoded as a String with the length incremented by two + */ +int decodeStringValue(bitstream_t* stream, string_ucs_t* s); + +/** + * Restricted character set + */ +int decodeRCSStringValue(bitstream_t* stream, rcs_t* rcs, string_ucs_t* s); + +/** + * Decode a sequence of characters according to a given length. + */ +int decodeCharacters(bitstream_t* stream, uint16_t len, uint32_t* chars); +int decodeCharactersASCII(bitstream_t* stream, uint16_t len, char* chars); + +/** + * Decode a binary value as a length-prefixed sequence of octets. + */ +int decodeBinary(bitstream_t* stream, bytes_t* bytes); + +/** + * Decode Date-Time as sequence of values representing the individual + * components of the Date-Time. + */ +int decodeDateTime(bitstream_t* stream, datetime_type_t type, datetime_t* datetime); + +#endif + + +#ifdef __cplusplus +} +#endif + diff --git a/src/codec/EXICoder.c b/src/codec/EXICoder.c index 20d4672..b118e8a 100644 --- a/src/codec/EXICoder.c +++ b/src/codec/EXICoder.c @@ -10,6 +10,7 @@ * 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 . @@ -18,42 +19,38 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ + + #ifndef EXI_CODER_C #define EXI_CODER_C -#include -#include -#include -#include - #include "EXITypes.h" #include "BitInputStream.h" -#include "BitDecoderChannel.h" +#include "DecoderChannel.h" -#include "assert.h" #include "EXICoder.h" -/* - uint16_t exiGetCurrentState(struct exiState* state) { - return state->grammarStates[state->currentStack]; - // return 0; - } - */ int exiPushStack(exi_state_t* state, uint16_t newState, eqname_t* eqn) { if ((state->stackIndex + 1) < EXI_ELEMENT_STACK_SIZE) { state->grammarStack[++state->stackIndex] = newState; - /* copy qname */ - state->elementStack[state->stackIndex].localPart = eqn->localPart; - state->elementStack[state->stackIndex].namespaceURI = eqn->namespaceURI; + /* qname IF set */ + if (eqn == NULL) { + /* generic SE, UCD profile */ + } else { + /* copy IDs */ + state->elementStack[state->stackIndex].localPart = eqn->localPart; + state->elementStack[state->stackIndex].namespaceURI = eqn->namespaceURI; + } return 0; } else { - return EXI_ERROR_OUT_OF_BOUNDS; + return EXI_ERROR_OUT_OF_GRAMMAR_STACK; } } @@ -66,5 +63,875 @@ int exiPopStack(exi_state_t* state) { } } +int exiHandleXsiNilTrue(exi_state_t* state) { + switch (state->grammarStack[state->stackIndex]) { + + } + + return EXI_ERROR_UNEXPECTED_ATTRIBUTE_XSI_NIL; +} + +int exiHandleXsiType(exi_state_t* state, eqname_t* xsiType) { + switch(xsiType->namespaceURI) { + case 0: + switch(xsiType->localPart) { + } + break; + case 1: + switch(xsiType->localPart) { + } + break; + case 2: + switch(xsiType->localPart) { + } + break; + case 3: + switch(xsiType->localPart) { + case 0: + /* {http://www.w3.org/2001/XMLSchema}ENTITIES */ + state->grammarStack[state->stackIndex] = 657; + break; + case 1: + /* {http://www.w3.org/2001/XMLSchema}ENTITY */ + state->grammarStack[state->stackIndex] = 693; + break; + case 2: + /* {http://www.w3.org/2001/XMLSchema}ID */ + state->grammarStack[state->stackIndex] = 661; + break; + case 3: + /* {http://www.w3.org/2001/XMLSchema}IDREF */ + state->grammarStack[state->stackIndex] = 666; + break; + case 4: + /* {http://www.w3.org/2001/XMLSchema}IDREFS */ + state->grammarStack[state->stackIndex] = 659; + break; + case 5: + /* {http://www.w3.org/2001/XMLSchema}NCName */ + state->grammarStack[state->stackIndex] = 664; + break; + case 6: + /* {http://www.w3.org/2001/XMLSchema}NMTOKEN */ + state->grammarStack[state->stackIndex] = 687; + break; + case 7: + /* {http://www.w3.org/2001/XMLSchema}NMTOKENS */ + state->grammarStack[state->stackIndex] = 685; + break; + case 8: + /* {http://www.w3.org/2001/XMLSchema}NOTATION */ + state->grammarStack[state->stackIndex] = 694; + break; + case 9: + /* {http://www.w3.org/2001/XMLSchema}Name */ + state->grammarStack[state->stackIndex] = 667; + break; + case 10: + /* {http://www.w3.org/2001/XMLSchema}QName */ + state->grammarStack[state->stackIndex] = 700; + break; + case 11: + /* {http://www.w3.org/2001/XMLSchema}anySimpleType */ + state->grammarStack[state->stackIndex] = 673; + break; + case 12: + /* {http://www.w3.org/2001/XMLSchema}anyType */ + state->grammarStack[state->stackIndex] = 702; + break; + case 13: + /* {http://www.w3.org/2001/XMLSchema}anyURI */ + state->grammarStack[state->stackIndex] = 705; + break; + case 14: + /* {http://www.w3.org/2001/XMLSchema}base64Binary */ + state->grammarStack[state->stackIndex] = 677; + break; + case 15: + /* {http://www.w3.org/2001/XMLSchema}boolean */ + state->grammarStack[state->stackIndex] = 704; + break; + case 16: + /* {http://www.w3.org/2001/XMLSchema}byte */ + state->grammarStack[state->stackIndex] = 676; + break; + case 17: + /* {http://www.w3.org/2001/XMLSchema}date */ + state->grammarStack[state->stackIndex] = 710; + break; + case 18: + /* {http://www.w3.org/2001/XMLSchema}dateTime */ + state->grammarStack[state->stackIndex] = 672; + break; + case 19: + /* {http://www.w3.org/2001/XMLSchema}decimal */ + state->grammarStack[state->stackIndex] = 670; + break; + case 20: + /* {http://www.w3.org/2001/XMLSchema}double */ + state->grammarStack[state->stackIndex] = 690; + break; + case 21: + /* {http://www.w3.org/2001/XMLSchema}duration */ + state->grammarStack[state->stackIndex] = 668; + break; + case 22: + /* {http://www.w3.org/2001/XMLSchema}float */ + state->grammarStack[state->stackIndex] = 706; + break; + case 23: + /* {http://www.w3.org/2001/XMLSchema}gDay */ + state->grammarStack[state->stackIndex] = 678; + break; + case 24: + /* {http://www.w3.org/2001/XMLSchema}gMonth */ + state->grammarStack[state->stackIndex] = 684; + break; + case 25: + /* {http://www.w3.org/2001/XMLSchema}gMonthDay */ + state->grammarStack[state->stackIndex] = 692; + break; + case 26: + /* {http://www.w3.org/2001/XMLSchema}gYear */ + state->grammarStack[state->stackIndex] = 699; + break; + case 27: + /* {http://www.w3.org/2001/XMLSchema}gYearMonth */ + state->grammarStack[state->stackIndex] = 686; + break; + case 28: + /* {http://www.w3.org/2001/XMLSchema}hexBinary */ + state->grammarStack[state->stackIndex] = 682; + break; + case 29: + /* {http://www.w3.org/2001/XMLSchema}int */ + state->grammarStack[state->stackIndex] = 660; + break; + case 30: + /* {http://www.w3.org/2001/XMLSchema}integer */ + state->grammarStack[state->stackIndex] = 708; + break; + case 31: + /* {http://www.w3.org/2001/XMLSchema}language */ + state->grammarStack[state->stackIndex] = 674; + break; + case 32: + /* {http://www.w3.org/2001/XMLSchema}long */ + state->grammarStack[state->stackIndex] = 695; + break; + case 33: + /* {http://www.w3.org/2001/XMLSchema}negativeInteger */ + state->grammarStack[state->stackIndex] = 669; + break; + case 34: + /* {http://www.w3.org/2001/XMLSchema}nonNegativeInteger */ + state->grammarStack[state->stackIndex] = 665; + break; + case 35: + /* {http://www.w3.org/2001/XMLSchema}nonPositiveInteger */ + state->grammarStack[state->stackIndex] = 662; + break; + case 36: + /* {http://www.w3.org/2001/XMLSchema}normalizedString */ + state->grammarStack[state->stackIndex] = 675; + break; + case 37: + /* {http://www.w3.org/2001/XMLSchema}positiveInteger */ + state->grammarStack[state->stackIndex] = 696; + break; + case 38: + /* {http://www.w3.org/2001/XMLSchema}short */ + state->grammarStack[state->stackIndex] = 683; + break; + case 39: + /* {http://www.w3.org/2001/XMLSchema}string */ + state->grammarStack[state->stackIndex] = 707; + break; + case 40: + /* {http://www.w3.org/2001/XMLSchema}time */ + state->grammarStack[state->stackIndex] = 703; + break; + case 41: + /* {http://www.w3.org/2001/XMLSchema}token */ + state->grammarStack[state->stackIndex] = 709; + break; + case 42: + /* {http://www.w3.org/2001/XMLSchema}unsignedByte */ + state->grammarStack[state->stackIndex] = 658; + break; + case 43: + /* {http://www.w3.org/2001/XMLSchema}unsignedInt */ + state->grammarStack[state->stackIndex] = 681; + break; + case 44: + /* {http://www.w3.org/2001/XMLSchema}unsignedLong */ + state->grammarStack[state->stackIndex] = 698; + break; + case 45: + /* {http://www.w3.org/2001/XMLSchema}unsignedShort */ + state->grammarStack[state->stackIndex] = 688; + break; + } + break; + case 4: + switch(xsiType->localPart) { + case 1: + /* {http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethodType */ + state->grammarStack[state->stackIndex] = 68; + break; + case 2: + /* {http://www.w3.org/2000/09/xmldsig#}CryptoBinary */ + state->grammarStack[state->stackIndex] = 219; + break; + case 4: + /* {http://www.w3.org/2000/09/xmldsig#}DSAKeyValueType */ + state->grammarStack[state->stackIndex] = 217; + break; + case 6: + /* {http://www.w3.org/2000/09/xmldsig#}DigestMethodType */ + state->grammarStack[state->stackIndex] = 226; + break; + case 8: + /* {http://www.w3.org/2000/09/xmldsig#}DigestValueType */ + state->grammarStack[state->stackIndex] = 230; + break; + case 12: + /* {http://www.w3.org/2000/09/xmldsig#}HMACOutputLengthType */ + state->grammarStack[state->stackIndex] = 607; + break; + case 15: + /* {http://www.w3.org/2000/09/xmldsig#}KeyInfoType */ + state->grammarStack[state->stackIndex] = 232; + break; + case 18: + /* {http://www.w3.org/2000/09/xmldsig#}KeyValueType */ + state->grammarStack[state->stackIndex] = 236; + break; + case 20: + /* {http://www.w3.org/2000/09/xmldsig#}ManifestType */ + state->grammarStack[state->stackIndex] = 283; + break; + case 24: + /* {http://www.w3.org/2000/09/xmldsig#}ObjectType */ + state->grammarStack[state->stackIndex] = 331; + break; + case 27: + /* {http://www.w3.org/2000/09/xmldsig#}PGPDataType */ + state->grammarStack[state->stackIndex] = 264; + break; + case 33: + /* {http://www.w3.org/2000/09/xmldsig#}RSAKeyValueType */ + state->grammarStack[state->stackIndex] = 238; + break; + case 35: + /* {http://www.w3.org/2000/09/xmldsig#}ReferenceType */ + state->grammarStack[state->stackIndex] = 286; + break; + case 37: + /* {http://www.w3.org/2000/09/xmldsig#}RetrievalMethodType */ + state->grammarStack[state->stackIndex] = 242; + break; + case 39: + /* {http://www.w3.org/2000/09/xmldsig#}SPKIDataType */ + state->grammarStack[state->stackIndex] = 271; + break; + case 44: + /* {http://www.w3.org/2000/09/xmldsig#}SignatureMethodType */ + state->grammarStack[state->stackIndex] = 604; + break; + case 46: + /* {http://www.w3.org/2000/09/xmldsig#}SignaturePropertiesType */ + state->grammarStack[state->stackIndex] = 614; + break; + case 48: + /* {http://www.w3.org/2000/09/xmldsig#}SignaturePropertyType */ + state->grammarStack[state->stackIndex] = 617; + break; + case 49: + /* {http://www.w3.org/2000/09/xmldsig#}SignatureType */ + state->grammarStack[state->stackIndex] = 597; + break; + case 51: + /* {http://www.w3.org/2000/09/xmldsig#}SignatureValueType */ + state->grammarStack[state->stackIndex] = 611; + break; + case 53: + /* {http://www.w3.org/2000/09/xmldsig#}SignedInfoType */ + state->grammarStack[state->stackIndex] = 600; + break; + case 55: + /* {http://www.w3.org/2000/09/xmldsig#}TransformType */ + state->grammarStack[state->stackIndex] = 248; + break; + case 57: + /* {http://www.w3.org/2000/09/xmldsig#}TransformsType */ + state->grammarStack[state->stackIndex] = 246; + break; + case 61: + /* {http://www.w3.org/2000/09/xmldsig#}X509DataType */ + state->grammarStack[state->stackIndex] = 253; + break; + case 64: + /* {http://www.w3.org/2000/09/xmldsig#}X509IssuerSerialType */ + state->grammarStack[state->stackIndex] = 255; + break; + } + break; + case 5: + switch(xsiType->localPart) { + case 4: + /* {urn:iso:15118:2:2010:MsgBody}CableCheckReqType */ + state->grammarStack[state->stackIndex] = 49; + break; + case 6: + /* {urn:iso:15118:2:2010:MsgBody}CableCheckResType */ + state->grammarStack[state->stackIndex] = 60; + break; + case 8: + /* {urn:iso:15118:2:2010:MsgBody}CertificateInstallationReqType */ + state->grammarStack[state->stackIndex] = 73; + break; + case 10: + /* {urn:iso:15118:2:2010:MsgBody}CertificateInstallationResType */ + state->grammarStack[state->stackIndex] = 76; + break; + case 12: + /* {urn:iso:15118:2:2010:MsgBody}CertificateUpdateReqType */ + state->grammarStack[state->stackIndex] = 91; + break; + case 14: + /* {urn:iso:15118:2:2010:MsgBody}CertificateUpdateResType */ + state->grammarStack[state->stackIndex] = 95; + break; + case 17: + /* {urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReqType */ + state->grammarStack[state->stackIndex] = 105; + break; + case 19: + /* {urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryResType */ + state->grammarStack[state->stackIndex] = 121; + break; + case 24: + /* {urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReqType */ + state->grammarStack[state->stackIndex] = 177; + break; + case 26: + /* {urn:iso:15118:2:2010:MsgBody}ContractAuthenticationResType */ + state->grammarStack[state->stackIndex] = 180; + break; + case 34: + /* {urn:iso:15118:2:2010:MsgBody}CurrentDemandReqType */ + state->grammarStack[state->stackIndex] = 182; + break; + case 36: + /* {urn:iso:15118:2:2010:MsgBody}CurrentDemandResType */ + state->grammarStack[state->stackIndex] = 197; + break; + case 53: + /* {urn:iso:15118:2:2010:MsgBody}LineLockReqType */ + state->grammarStack[state->stackIndex] = 277; + break; + case 55: + /* {urn:iso:15118:2:2010:MsgBody}LineLockResType */ + state->grammarStack[state->stackIndex] = 280; + break; + case 58: + /* {urn:iso:15118:2:2010:MsgBody}MeteringReceiptReqType */ + state->grammarStack[state->stackIndex] = 293; + break; + case 60: + /* {urn:iso:15118:2:2010:MsgBody}MeteringReceiptResType */ + state->grammarStack[state->stackIndex] = 318; + break; + case 62: + /* {urn:iso:15118:2:2010:MsgBody}MeteringStatusReqType */ + state->grammarStack[state->stackIndex] = 321; + break; + case 64: + /* {urn:iso:15118:2:2010:MsgBody}MeteringStatusResType */ + state->grammarStack[state->stackIndex] = 323; + break; + case 76: + /* {urn:iso:15118:2:2010:MsgBody}PaymentDetailsReqType */ + state->grammarStack[state->stackIndex] = 338; + break; + case 78: + /* {urn:iso:15118:2:2010:MsgBody}PaymentDetailsResType */ + state->grammarStack[state->stackIndex] = 341; + break; + case 81: + /* {urn:iso:15118:2:2010:MsgBody}PowerDeliveryReqType */ + state->grammarStack[state->stackIndex] = 345; + break; + case 83: + /* {urn:iso:15118:2:2010:MsgBody}PowerDeliveryResType */ + state->grammarStack[state->stackIndex] = 482; + break; + case 85: + /* {urn:iso:15118:2:2010:MsgBody}PreChargeReqType */ + state->grammarStack[state->stackIndex] = 485; + break; + case 87: + /* {urn:iso:15118:2:2010:MsgBody}PreChargeResType */ + state->grammarStack[state->stackIndex] = 491; + break; + case 97: + /* {urn:iso:15118:2:2010:MsgBody}ServiceDetailReqType */ + state->grammarStack[state->stackIndex] = 523; + break; + case 99: + /* {urn:iso:15118:2:2010:MsgBody}ServiceDetailResType */ + state->grammarStack[state->stackIndex] = 525; + break; + case 101: + /* {urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReqType */ + state->grammarStack[state->stackIndex] = 545; + break; + case 103: + /* {urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryResType */ + state->grammarStack[state->stackIndex] = 548; + break; + case 107: + /* {urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReqType */ + state->grammarStack[state->stackIndex] = 586; + break; + case 109: + /* {urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionResType */ + state->grammarStack[state->stackIndex] = 589; + break; + case 115: + /* {urn:iso:15118:2:2010:MsgBody}SessionSetupReqType */ + state->grammarStack[state->stackIndex] = 591; + break; + case 117: + /* {urn:iso:15118:2:2010:MsgBody}SessionSetupResType */ + state->grammarStack[state->stackIndex] = 593; + break; + case 122: + /* {urn:iso:15118:2:2010:MsgBody}TerminateChargingReqType */ + state->grammarStack[state->stackIndex] = 622; + break; + case 124: + /* {urn:iso:15118:2:2010:MsgBody}TerminateChargingResType */ + state->grammarStack[state->stackIndex] = 624; + break; + case 127: + /* {urn:iso:15118:2:2010:MsgBody}WeldingDetectionReqType */ + state->grammarStack[state->stackIndex] = 648; + break; + case 129: + /* {urn:iso:15118:2:2010:MsgBody}WeldingDetectionResType */ + state->grammarStack[state->stackIndex] = 650; + break; + } + break; + case 6: + switch(xsiType->localPart) { + case 1: + /* {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameterType */ + state->grammarStack[state->stackIndex] = 3; + break; + case 3: + /* {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatusType */ + state->grammarStack[state->stackIndex] = 5; + break; + case 5: + /* {urn:iso:15118:2:2010:MsgDataTypes}AC_PEVChargeParameterType */ + state->grammarStack[state->stackIndex] = 33; + break; + case 7: + /* {urn:iso:15118:2:2010:MsgDataTypes}AC_PEVPowerDeliveryParameterType */ + state->grammarStack[state->stackIndex] = 46; + break; + case 9: + /* {urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatusType */ + state->grammarStack[state->stackIndex] = 35; + break; + case 10: + /* {urn:iso:15118:2:2010:MsgDataTypes}AC_rcdType */ + state->grammarStack[state->stackIndex] = 15; + break; + case 14: + /* {urn:iso:15118:2:2010:MsgDataTypes}CertificateChainType */ + state->grammarStack[state->stackIndex] = 79; + break; + case 20: + /* {urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileType */ + state->grammarStack[state->stackIndex] = 348; + break; + case 23: + /* {urn:iso:15118:2:2010:MsgDataTypes}DC_BulkChargingCompleteType */ + state->grammarStack[state->stackIndex] = 214; + break; + case 24: + /* {urn:iso:15118:2:2010:MsgDataTypes}DC_ChargingCompleteType */ + state->grammarStack[state->stackIndex] = 216; + break; + case 26: + /* {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameterType */ + state->grammarStack[state->stackIndex] = 165; + break; + case 28: + /* {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatusCodeType */ + state->grammarStack[state->stackIndex] = 67; + break; + case 29: + /* {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatusType */ + state->grammarStack[state->stackIndex] = 64; + break; + case 31: + /* {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVChargeParameterType */ + state->grammarStack[state->stackIndex] = 109; + break; + case 33: + /* {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVPowerDeliveryParameterType */ + state->grammarStack[state->stackIndex] = 211; + break; + case 34: + /* {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVReadyType */ + state->grammarStack[state->stackIndex] = 55; + break; + case 36: + /* {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatusCodeType */ + state->grammarStack[state->stackIndex] = 57; + break; + case 37: + /* {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatusType */ + state->grammarStack[state->stackIndex] = 51; + break; + case 38: + /* {urn:iso:15118:2:2010:MsgDataTypes}DC_protocolVersionType */ + state->grammarStack[state->stackIndex] = 119; + break; + case 42: + /* {urn:iso:15118:2:2010:MsgDataTypes}EPriceType */ + state->grammarStack[state->stackIndex] = 697; + break; + case 45: + /* {urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameterType */ + state->grammarStack[state->stackIndex] = 663; + break; + case 63: + /* {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusType */ + state->grammarStack[state->stackIndex] = 691; + break; + case 64: + /* {urn:iso:15118:2:2010:MsgDataTypes}EVSESupportedEnergyTransferType */ + state->grammarStack[state->stackIndex] = 516; + break; + case 69: + /* {urn:iso:15118:2:2010:MsgDataTypes}FloatingValueType */ + state->grammarStack[state->stackIndex] = 21; + break; + case 73: + /* {urn:iso:15118:2:2010:MsgDataTypes}MeterInfoType */ + state->grammarStack[state->stackIndex] = 301; + break; + case 78: + /* {urn:iso:15118:2:2010:MsgDataTypes}NotificationType */ + state->grammarStack[state->stackIndex] = 637; + break; + case 80: + /* {urn:iso:15118:2:2010:MsgDataTypes}PEVChargeParameterType */ + state->grammarStack[state->stackIndex] = 656; + break; + case 93: + /* {urn:iso:15118:2:2010:MsgDataTypes}PEVPowerDeliveryParameterType */ + state->grammarStack[state->stackIndex] = 655; + break; + case 97: + /* {urn:iso:15118:2:2010:MsgDataTypes}PEVRequestedEnergyTransferType */ + state->grammarStack[state->stackIndex] = 107; + break; + case 101: + /* {urn:iso:15118:2:2010:MsgDataTypes}PEVStatusType */ + state->grammarStack[state->stackIndex] = 679; + break; + case 102: + /* {urn:iso:15118:2:2010:MsgDataTypes}PMaxType */ + state->grammarStack[state->stackIndex] = 142; + break; + case 106: + /* {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntryType */ + state->grammarStack[state->stackIndex] = 350; + break; + case 109: + /* {urn:iso:15118:2:2010:MsgDataTypes}SecurityType */ + state->grammarStack[state->stackIndex] = 643; + break; + case 113: + /* {urn:iso:15118:2:2010:MsgDataTypes}ServiceCertificateType */ + state->grammarStack[state->stackIndex] = 495; + break; + case 115: + /* {urn:iso:15118:2:2010:MsgDataTypes}ServiceChargeType */ + state->grammarStack[state->stackIndex] = 512; + break; + case 117: + /* {urn:iso:15118:2:2010:MsgDataTypes}ServiceCustomType */ + state->grammarStack[state->stackIndex] = 517; + break; + case 119: + /* {urn:iso:15118:2:2010:MsgDataTypes}ServiceDetailsType */ + state->grammarStack[state->stackIndex] = 521; + break; + case 122: + /* {urn:iso:15118:2:2010:MsgDataTypes}ServiceInternetType */ + state->grammarStack[state->stackIndex] = 534; + break; + case 125: + /* {urn:iso:15118:2:2010:MsgDataTypes}ServiceRCSType */ + state->grammarStack[state->stackIndex] = 538; + break; + case 129: + /* {urn:iso:15118:2:2010:MsgDataTypes}ServiceTagListType */ + state->grammarStack[state->stackIndex] = 553; + break; + case 130: + /* {urn:iso:15118:2:2010:MsgDataTypes}ServiceTagType */ + state->grammarStack[state->stackIndex] = 497; + break; + case 131: + /* {urn:iso:15118:2:2010:MsgDataTypes}ServiceType */ + state->grammarStack[state->stackIndex] = 689; + break; + case 133: + /* {urn:iso:15118:2:2010:MsgDataTypes}SessionInformationType */ + state->grammarStack[state->stackIndex] = 631; + break; + case 138: + /* {urn:iso:15118:2:2010:MsgDataTypes}SubCertificatesType */ + state->grammarStack[state->stackIndex] = 82; + break; + case 141: + /* {urn:iso:15118:2:2010:MsgDataTypes}TariffDescrType */ + state->grammarStack[state->stackIndex] = 130; + break; + case 144: + /* {urn:iso:15118:2:2010:MsgDataTypes}TariffEntriesType */ + state->grammarStack[state->stackIndex] = 136; + break; + case 146: + /* {urn:iso:15118:2:2010:MsgDataTypes}TariffEntryType */ + state->grammarStack[state->stackIndex] = 138; + break; + case 150: + /* {urn:iso:15118:2:2010:MsgDataTypes}TariffTableType */ + state->grammarStack[state->stackIndex] = 126; + break; + case 153: + /* {urn:iso:15118:2:2010:MsgDataTypes}certificateType */ + state->grammarStack[state->stackIndex] = 75; + break; + case 154: + /* {urn:iso:15118:2:2010:MsgDataTypes}challengeSignatureType */ + state->grammarStack[state->stackIndex] = 680; + break; + case 155: + /* {urn:iso:15118:2:2010:MsgDataTypes}contractIDType */ + state->grammarStack[state->stackIndex] = 90; + break; + case 156: + /* {urn:iso:15118:2:2010:MsgDataTypes}currencyType */ + state->grammarStack[state->stackIndex] = 128; + break; + case 157: + /* {urn:iso:15118:2:2010:MsgDataTypes}ePriceType */ + state->grammarStack[state->stackIndex] = 144; + break; + case 158: + /* {urn:iso:15118:2:2010:MsgDataTypes}encryptionPrivateKeyType */ + state->grammarStack[state->stackIndex] = 88; + break; + case 159: + /* {urn:iso:15118:2:2010:MsgDataTypes}energyProviderType */ + state->grammarStack[state->stackIndex] = 124; + break; + case 160: + /* {urn:iso:15118:2:2010:MsgDataTypes}evseIDType */ + state->grammarStack[state->stackIndex] = 297; + break; + case 161: + /* {urn:iso:15118:2:2010:MsgDataTypes}faultCodeType */ + state->grammarStack[state->stackIndex] = 639; + break; + case 162: + /* {urn:iso:15118:2:2010:MsgDataTypes}faultMsgType */ + state->grammarStack[state->stackIndex] = 641; + break; + case 163: + /* {urn:iso:15118:2:2010:MsgDataTypes}genChallengeType */ + state->grammarStack[state->stackIndex] = 179; + break; + case 164: + /* {urn:iso:15118:2:2010:MsgDataTypes}lockStatusType */ + state->grammarStack[state->stackIndex] = 11; + break; + case 165: + /* {urn:iso:15118:2:2010:MsgDataTypes}maxPhasesType */ + state->grammarStack[state->stackIndex] = 32; + break; + case 166: + /* {urn:iso:15118:2:2010:MsgDataTypes}messageSignatureType */ + state->grammarStack[state->stackIndex] = 671; + break; + case 167: + /* {urn:iso:15118:2:2010:MsgDataTypes}meterIDType */ + state->grammarStack[state->stackIndex] = 303; + break; + case 168: + /* {urn:iso:15118:2:2010:MsgDataTypes}meterSignatureType */ + state->grammarStack[state->stackIndex] = 315; + break; + case 169: + /* {urn:iso:15118:2:2010:MsgDataTypes}meterStatusType */ + state->grammarStack[state->stackIndex] = 310; + break; + case 170: + /* {urn:iso:15118:2:2010:MsgDataTypes}paymentOptionType */ + state->grammarStack[state->stackIndex] = 531; + break; + case 171: + /* {urn:iso:15118:2:2010:MsgDataTypes}paymentOptionsType */ + state->grammarStack[state->stackIndex] = 529; + break; + case 172: + /* {urn:iso:15118:2:2010:MsgDataTypes}percentValueType */ + state->grammarStack[state->stackIndex] = 59; + break; + case 173: + /* {urn:iso:15118:2:2010:MsgDataTypes}pevIDType */ + state->grammarStack[state->stackIndex] = 295; + break; + case 174: + /* {urn:iso:15118:2:2010:MsgDataTypes}protocolVersionType */ + state->grammarStack[state->stackIndex] = 635; + break; + case 175: + /* {urn:iso:15118:2:2010:MsgDataTypes}pubKeyType */ + state->grammarStack[state->stackIndex] = 85; + break; + case 176: + /* {urn:iso:15118:2:2010:MsgDataTypes}responseCodeType */ + state->grammarStack[state->stackIndex] = 62; + break; + case 177: + /* {urn:iso:15118:2:2010:MsgDataTypes}retryCounterType */ + state->grammarStack[state->stackIndex] = 104; + break; + case 178: + /* {urn:iso:15118:2:2010:MsgDataTypes}serviceCategoryType */ + state->grammarStack[state->stackIndex] = 503; + break; + case 179: + /* {urn:iso:15118:2:2010:MsgDataTypes}serviceIDType */ + state->grammarStack[state->stackIndex] = 499; + break; + case 180: + /* {urn:iso:15118:2:2010:MsgDataTypes}serviceNameType */ + state->grammarStack[state->stackIndex] = 501; + break; + case 181: + /* {urn:iso:15118:2:2010:MsgDataTypes}serviceScopeType */ + state->grammarStack[state->stackIndex] = 505; + break; + case 182: + /* {urn:iso:15118:2:2010:MsgDataTypes}sessionIDType */ + state->grammarStack[state->stackIndex] = 299; + break; + case 183: + /* {urn:iso:15118:2:2010:MsgDataTypes}signaturePrivateKeyType */ + state->grammarStack[state->stackIndex] = 99; + break; + case 184: + /* {urn:iso:15118:2:2010:MsgDataTypes}standbyType */ + state->grammarStack[state->stackIndex] = 7; + break; + case 185: + /* {urn:iso:15118:2:2010:MsgDataTypes}switchStatusType */ + state->grammarStack[state->stackIndex] = 13; + break; + case 186: + /* {urn:iso:15118:2:2010:MsgDataTypes}tariffDescriptionType */ + state->grammarStack[state->stackIndex] = 134; + break; + case 187: + /* {urn:iso:15118:2:2010:MsgDataTypes}tariffIDType */ + state->grammarStack[state->stackIndex] = 132; + break; + case 188: + /* {urn:iso:15118:2:2010:MsgDataTypes}tariffStartType */ + state->grammarStack[state->stackIndex] = 140; + break; + case 189: + /* {urn:iso:15118:2:2010:MsgDataTypes}timeType */ + state->grammarStack[state->stackIndex] = 17; + break; + case 190: + /* {urn:iso:15118:2:2010:MsgDataTypes}unitMultiplierType */ + state->grammarStack[state->stackIndex] = 23; + break; + case 191: + /* {urn:iso:15118:2:2010:MsgDataTypes}unitSymbolType */ + state->grammarStack[state->stackIndex] = 25; + break; + } + break; + case 7: + switch(xsiType->localPart) { + case 1: + /* {urn:iso:15118:2:2010:MsgDef}BodyBaseType */ + state->grammarStack[state->stackIndex] = 701; + break; + case 3: + /* {urn:iso:15118:2:2010:MsgDef}BodyType */ + state->grammarStack[state->stackIndex] = 646; + break; + } + break; + case 8: + switch(xsiType->localPart) { + case 0: + /* {urn:iso:15118:2:2010:MsgHeader}MessageHeaderType */ + state->grammarStack[state->stackIndex] = 629; + break; + } + break; + } + + + return 0; +} + +/* + * RUNTIME RULES + * each rule has 2 ids and counts backwards from -1, -2, ... + * 1) StartTagContent (e.g., -1, -3, -5, ...) + * 2) ElementContent (e.g., -2, -4, -6) + * + */ + +int exiIsStartContent(int16_t ruleID) { + return (ruleID % 2 != 0); +} + +int exiMoveToElementContentRule(exi_state_t* state) { + int16_t currentID = state->grammarStack[state->stackIndex]; + switch (currentID) { + + } + + if (currentID < 0) { + if( exiIsStartContent(currentID) ) { + state->grammarStack[state->stackIndex] = currentID - 1; + } + } else { + return EXI_ERROR_UNEXPECTED_ATTRIBUTE_MOVE_TO_CONTENT_RULE; + } + + return 0; +} + + #endif diff --git a/src/codec/EXICoder.h b/src/codec/EXICoder.h index 3b0b731..7a530a0 100644 --- a/src/codec/EXICoder.h +++ b/src/codec/EXICoder.h @@ -10,6 +10,7 @@ * 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 . @@ -18,11 +19,14 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ + + #ifdef __cplusplus extern "C" { #endif @@ -30,19 +34,29 @@ extern "C" { #ifndef EXI_CODER_H #define EXI_CODER_H -#include -#include -#include - #include "EXITypes.h" +#define IS_STRICT 1 +#define DOCUMENT 0 +#define DOC_CONTENT 1 +#define DOC_END 2 +#define UR_TYPE_GRAMMAR_0 71 +#define UR_TYPE_GRAMMAR_1 654 + -/* uint16_t exiGetCurrentState(struct exiState* state); */ 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 diff --git a/src/codec/EXIDecoder.c b/src/codec/EXIDecoder.c index f72065d..b1a1365 100644 --- a/src/codec/EXIDecoder.c +++ b/src/codec/EXIDecoder.c @@ -10,6 +10,7 @@ * 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 . @@ -18,858 +19,2250 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * - *

NOTE: Code generated by EXIdizer v0.1

+ *

Code generated by EXIdizer

********************************************************************/ + + #ifndef EXI_DECODER_C #define EXI_DECODER_C -#include -#include -#include -#include - #include "EXITypes.h" #include "BitInputStream.h" -#include "BitDecoderChannel.h" +#include "DecoderChannel.h" +#include "CoderChannel.h" + +#include "StringTable.h" +#include "NameTableEntries.h" +#include "MethodsBag.h" #include "EXICoder.h" #include "EXIHeaderDecoder.h" -int exiInitDecoder(bitstream_t* stream, exi_state_t* state) { + +/* local variables */ +static uint32_t xsi; +static uint32_t bits; +static int errn; + +/* temporary over-read list values */ +static int _decodeListValues(bitstream_t* stream, exi_datatype_t dt, uint16_t len) { + unsigned int i, k; + + uint8_t uint8; + uint16_t uint16; + uint32_t uint32; + integer_t iv; + int64_t int64; + + for(i = 0; istackIndex = 0; - state->grammarStack[0] = 0; + state->grammarStack[0] = DOCUMENT; + /* string table */ + state->nameTablePrepopulated = nameTablePrepopulated; + state->nameTableRuntime = runtimeTable; /* decode header */ return readEXIHeader(stream); } -int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, +int exiDecodeNext2Event(bitstream_t* stream, exi_state_t* state, exi_event_t* nextEvent) { + uint32_t eventCode2 = 0; switch (state->grammarStack[state->stackIndex]) { - case 2: - /* DocEnd[END_DOCUMENT] */ - *nextEvent = END_DOCUMENT; - return 0; - case 88: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - case 145: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - case 157: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - case 23: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - case 198: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 225: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - case 230: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 2, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = END_ELEMENT; - return 0; - } - case 220: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 5, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 3) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 4) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 5) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 6) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 7) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 8) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 9) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 10) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 11) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 12) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 13) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 14) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 15) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 16) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 17) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 18) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 19) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 20) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 21) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 22) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 23) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 24) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 25) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 26) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 27) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 28) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 29) { - *nextEvent = END_ELEMENT; - return 0; - } - case 143: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - case 196: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 224: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 2, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 3) { - *nextEvent = END_ELEMENT; - return 0; - } - case 102: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries)] */ - case 13: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 138: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff)] */ - case 27: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - case 5: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 35: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked)] */ - case 36: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby)] */ - case 38: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ReadyToCharge)] */ - case 6: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 43: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 46: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FatalError)] */ - case 47: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEStandby)] */ - case 49: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked)] */ - case 50: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}PowerSwitchClosed)] */ - case 51: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}RCD)] */ - case 53: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ShutDownTime)] */ - case 55: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby)] */ - case 57: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEMalfunction)] */ - case 58: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}StopCharging)] */ - case 7: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 62: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargingMode)] */ - case 63: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EoC)] */ - case 65: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EAmount)] */ - case 66: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPower)] */ - case 68: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPhases)] */ - case 69: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxVoltage)] */ - case 71: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinVoltage)] */ - case 72: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxCurrent)] */ - case 73: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinCurrent)] */ - case 67: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Multiplier)] */ - case 75: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Unit)] */ - case 77: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Value)] */ - case 8: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 81: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 83: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxVoltage)] */ - case 84: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinVoltage)] */ - case 85: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxCurrent)] */ - case 86: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinCurrent)] */ - case 87: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPhases)] */ - case 92: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Currency)] */ - case 93: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff)] */ - case 96: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffID)] */ - case 104: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries)] */ - case 107: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry)] */ - case 109: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffStart)] */ - case 117: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffPMax)] */ - case 9: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 121: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage)] */ - case 122: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent)] */ - case 123: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDifferential)] */ - case 124: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential)] */ - case 10: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 126: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 128: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - case 129: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentCurrent)] */ - case 11: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 131: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqLockStatus)] */ - case 12: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 133: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 136: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 139: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff)] */ - case 140: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo)] */ - case 14: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 16: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 151: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID)] */ - case 153: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 155: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - case 156: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPower)] */ - case 17: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ContractID)] */ - case 18: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 162: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - case 19: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 165: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqSwitchStatus)] */ - case 20: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 168: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 21: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 171: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage)] */ - case 172: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent)] */ - case 173: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential)] */ - case 22: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 175: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 177: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - case 24: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 186: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service)] */ - case 188: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceID)] */ - case 25: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList)] */ - case 26: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 205: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 28: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 207: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID)] */ - case 209: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 210: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - case 29: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 30: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 213: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 215: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - case 31: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Header)] */ - case 217: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Body)] */ - case 218: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}SessionInformation)] */ - case 222: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}SessionID)] */ - case 235: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Event)] */ - case 32: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 33: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 240: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 242: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - *nextEvent = START_ELEMENT; - return 0; - case 3: - /* First(xsi:type)StartTag[END_ELEMENT] */ - case 34: - /* Element[END_ELEMENT] */ - case 40: - /* Element[END_ELEMENT] */ - case 42: - /* Element[END_ELEMENT] */ - case 45: - /* Element[END_ELEMENT] */ - case 60: - /* Element[END_ELEMENT] */ - case 74: - /* Element[END_ELEMENT] */ - case 79: - /* Element[END_ELEMENT] */ - case 91: - /* Element[END_ELEMENT] */ - case 101: - /* Element[END_ELEMENT] */ - case 106: - /* Element[END_ELEMENT] */ - case 116: - /* Element[END_ELEMENT] */ - case 120: - /* Element[END_ELEMENT] */ - case 125: - /* Element[END_ELEMENT] */ - case 130: - /* Element[END_ELEMENT] */ - case 132: - /* Element[END_ELEMENT] */ - case 135: - /* Element[END_ELEMENT] */ - case 141: - /* Element[END_ELEMENT] */ - case 148: - /* Element[END_ELEMENT] */ - case 149: - /* Element[END_ELEMENT] */ - case 15: - /* FirstStartTag[END_ELEMENT] */ - case 159: - /* Element[END_ELEMENT] */ - case 160: - /* Element[END_ELEMENT] */ - case 164: - /* Element[END_ELEMENT] */ - case 167: - /* Element[END_ELEMENT] */ - case 170: - /* Element[END_ELEMENT] */ - case 174: - /* Element[END_ELEMENT] */ - case 178: - /* Element[END_ELEMENT] */ - case 181: - /* Element[END_ELEMENT] */ - case 185: - /* Element[END_ELEMENT] */ - case 195: - /* Element[END_ELEMENT] */ - case 201: - /* Element[END_ELEMENT] */ - case 202: - /* Element[END_ELEMENT] */ - case 203: - /* Element[END_ELEMENT] */ - case 206: - /* Element[END_ELEMENT] */ - case 211: - /* Element[END_ELEMENT] */ - case 212: - /* Element[END_ELEMENT] */ - case 216: - /* Element[END_ELEMENT] */ - case 219: - /* Element[END_ELEMENT] */ - case 223: - /* Element[END_ELEMENT] */ - case 228: - /* Element[END_ELEMENT] */ - case 234: - /* Element[END_ELEMENT] */ - case 236: - /* Element[END_ELEMENT] */ - case 238: - /* Element[END_ELEMENT] */ - case 239: - /* Element[END_ELEMENT] */ - case 243: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 37: - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - case 39: - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - case 41: - /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ - case 44: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 48: - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - case 52: - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - case 54: - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - case 56: - /* FirstStartTag[CHARACTERS[INTEGER_32]] */ - case 59: - /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ - case 61: - /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ - case 64: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 76: - /* FirstStartTag[CHARACTERS[INTEGER_16]] */ - case 78: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 80: - /* First(xsi:type)StartTag[CHARACTERS[INTEGER_32]] */ - case 70: - /* FirstStartTag[CHARACTERS[INTEGER_16]] */ - case 82: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 90: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 94: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 103: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 105: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 118: - /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER_32]] */ - case 127: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 134: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 137: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 144: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 147: - /* FirstStartTag[CHARACTERS[INTEGER_16]] */ - case 150: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 152: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 154: - /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ - case 161: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 163: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 169: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 176: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 180: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 182: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 184: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 197: - /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ - case 199: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 204: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 208: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 214: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 226: - /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ - case 229: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 231: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 233: - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - case 237: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 241: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 142: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 3, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 3) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 4) { - *nextEvent = END_ELEMENT; - return 0; - } - case 89: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - case 95: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 97: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 98: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 99: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 100: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 108: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 110: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 111: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 112: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 113: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 114: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 115: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 119: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EPrice), END_ELEMENT] */ - case 146: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - case 158: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - case 166: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff), END_ELEMENT] */ - case 179: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - case 183: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList), END_ELEMENT] */ - case 187: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 189: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 190: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 191: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 192: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 193: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 194: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 200: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 221: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}Notification), END_ELEMENT] */ - case 227: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - case 232: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 1: - /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), START_ELEMENT_GENERIC] */ - decodeNBitUnsignedInteger(stream, 5, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 3) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 4) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 5) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 6) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 7) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 8) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 9) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 10) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 11) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 12) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 13) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 14) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 15) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 16) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 17) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 18) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 19) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 20) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 21) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 22) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 23) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 24) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 25) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 26) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 27) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 28) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 29) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 30) { - *nextEvent = START_ELEMENT_GENERIC; - return 0; - } - case 0: - /* Document[START_DOCUMENT] */ - *nextEvent = START_DOCUMENT; - return 0; default: *nextEvent = ERROR; - return -1; + return EXI_ERROR_UNEXPECTED_EVENT_LEVEL2; } - return -1; + return EXI_ERROR_UNEXPECTED_EVENT_LEVEL2; +} + + +int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, + exi_event_t* nextEvent) { + state->eventCode = 0; + + switch (state->grammarStack[state->stackIndex]) { + case 176: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 231: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 317: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 120: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 48: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 337: + /* First(xsi:type)StartTag[END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = END_ELEMENT; + return errn; + case 1: + /* 2nd level events */ + *nextEvent = ATTRIBUTE_XSI_TYPE; + return errn; + } + break; + case 703: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 119: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 706: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + case 85: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 516: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 673: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 641: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 709: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 17: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 128: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 501: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 140: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 310: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 90: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 680: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 670: + /* FirstStartTag[CHARACTERS[DECIMAL]] */ + case 7: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 32: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 692: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 665: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 699: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 676: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 214: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 683: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 23: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 697: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 704: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 666: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 142: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 687: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 705: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 216: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 690: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + case 134: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 107: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 660: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 678: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 661: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 299: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 688: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 685: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 505: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 13: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 700: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 315: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 659: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 104: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 664: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 635: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 695: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 671: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 55: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 686: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 57: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 684: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 672: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 303: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 99: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 681: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 657: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 674: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 612: + /* StartTag[CHARACTERS[BINARY_BASE64]] */ + case 503: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 59: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 25: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 230: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 75: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 67: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 297: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 124: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 677: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 707: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 11: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 658: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 669: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 662: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 144: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 667: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 668: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 132: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 693: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 219: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 708: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 639: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 179: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 607: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 698: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 499: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 88: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 62: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 531: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 696: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 675: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 682: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 295: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 694: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 15: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 710: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + *nextEvent = CHARACTERS; + return errn; + case 158: + /* Element[END_ELEMENT] */ + case 74: + /* Element[END_ELEMENT] */ + case 282: + /* Element[END_ELEMENT] */ + case 245: + /* Element[END_ELEMENT] */ + case 63: + /* Element[END_ELEMENT] */ + case 647: + /* Element[END_ELEMENT] */ + case 320: + /* Element[END_ELEMENT] */ + case 151: + /* Element[END_ELEMENT] */ + case 103: + /* Element[END_ELEMENT] */ + case 490: + /* Element[END_ELEMENT] */ + case 26: + /* Element[END_ELEMENT] */ + case 590: + /* Element[END_ELEMENT] */ + case 547: + /* Element[END_ELEMENT] */ + case 215: + /* Element[END_ELEMENT] */ + case 292: + /* Element[END_ELEMENT] */ + case 640: + /* Element[END_ELEMENT] */ + case 626: + /* Element[END_ELEMENT] */ + case 240: + /* Element[END_ELEMENT] */ + case 494: + /* Element[END_ELEMENT] */ + case 135: + /* Element[END_ELEMENT] */ + case 524: + /* Element[END_ELEMENT] */ + case 655: + /* FirstStartTag[END_ELEMENT] */ + case 181: + /* Element[END_ELEMENT] */ + case 8: + /* Element[END_ELEMENT] */ + case 663: + /* FirstStartTag[END_ELEMENT] */ + case 31: + /* Element[END_ELEMENT] */ + case 701: + /* FirstStartTag[END_ELEMENT] */ + case 656: + /* FirstStartTag[END_ELEMENT] */ + case 58: + /* Element[END_ELEMENT] */ + case 596: + /* Element[END_ELEMENT] */ + case 552: + /* Element[END_ELEMENT] */ + case 481: + /* Element[END_ELEMENT] */ + case 649: + /* Element[END_ELEMENT] */ + case 644: + /* Element[END_ELEMENT] */ + case 316: + /* Element[END_ELEMENT] */ + case 210: + /* Element[END_ELEMENT] */ + case 544: + /* Element[END_ELEMENT] */ + case 340: + /* Element[END_ELEMENT] */ + case 585: + /* Element[END_ELEMENT] */ + case 532: + /* Element[END_ELEMENT] */ + case 592: + /* Element[END_ELEMENT] */ + case 522: + /* Element[END_ELEMENT] */ + case 352: + /* Element[END_ELEMENT] */ + case 50: + /* Element[END_ELEMENT] */ + case 479: + /* Element[END_ELEMENT] */ + case 691: + /* FirstStartTag[END_ELEMENT] */ + case 279: + /* Element[END_ELEMENT] */ + case 588: + /* Element[END_ELEMENT] */ + case 118: + /* Element[END_ELEMENT] */ + case 175: + /* Element[END_ELEMENT] */ + case 515: + /* Element[END_ELEMENT] */ + case 258: + /* Element[END_ELEMENT] */ + case 89: + /* Element[END_ELEMENT] */ + case 143: + /* Element[END_ELEMENT] */ + case 47: + /* Element[END_ELEMENT] */ + case 537: + /* Element[END_ELEMENT] */ + case 94: + /* Element[END_ELEMENT] */ + case 45: + /* Element[END_ELEMENT] */ + case 679: + /* FirstStartTag[END_ELEMENT] */ + case 541: + /* Element[END_ELEMENT] */ + case 533: + /* Element[END_ELEMENT] */ + case 37: + /* Element[END_ELEMENT] */ + case 634: + /* Element[END_ELEMENT] */ + case 653: + /* Element[END_ELEMENT] */ + case 330: + /* Element[END_ELEMENT] */ + case 178: + /* Element[END_ELEMENT] */ + case 81: + /* Element[END_ELEMENT] */ + case 623: + /* Element[END_ELEMENT] */ + case 225: + /* Element[END_ELEMENT] */ + case 66: + /* Element[END_ELEMENT] */ + case 344: + /* Element[END_ELEMENT] */ + case 164: + /* Element[END_ELEMENT] */ + case 645: + /* Element[END_ELEMENT] */ + case 18: + /* Element[END_ELEMENT] */ + case 520: + /* Element[END_ELEMENT] */ + case 108: + /* Element[END_ELEMENT] */ + case 196: + /* Element[END_ELEMENT] */ + case 484: + /* Element[END_ELEMENT] */ + case 311: + /* Element[END_ELEMENT] */ + case 642: + /* Element[END_ELEMENT] */ + case 510: + /* Element[END_ELEMENT] */ + case 322: + /* Element[END_ELEMENT] */ + case 504: + /* Element[END_ELEMENT] */ + *nextEvent = END_ELEMENT; + return errn; + case 606: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 654: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 69: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 227: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 229: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 336: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 334: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 308: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 72: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 70: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 620: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 335: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 228: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 1: + *nextEvent = END_ELEMENT; + return errn; + case 2: + *nextEvent = CHARACTERS_GENERIC; + return errn; + } + break; + case 528: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCertificate), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCustom), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceInternet), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceRCS), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}v2g_Service)] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + *nextEvent = START_ELEMENT; + return errn; + } + break; + case 307: + /* First(xsi:type)StartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = ATTRIBUTE_GENERIC; + return errn; + case 1: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 2: + *nextEvent = END_ELEMENT; + return errn; + case 3: + *nextEvent = CHARACTERS_GENERIC; + return errn; + case 4: + /* 2nd level events */ + *nextEvent = ATTRIBUTE_XSI_TYPE; + return errn; + } + break; + case 288: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = ATTRIBUTE; + return errn; + case 1: + case 2: + *nextEvent = START_ELEMENT; + return errn; + } + break; + case 702: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 71: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = ATTRIBUTE_GENERIC; + return errn; + case 1: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 2: + *nextEvent = END_ELEMENT; + return errn; + case 3: + *nextEvent = CHARACTERS_GENERIC; + return errn; + } + break; + case 646: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 6, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + *nextEvent = START_ELEMENT; + return errn; + case 37: + *nextEvent = END_ELEMENT; + return errn; + } + break; + case 617: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Target)] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = ATTRIBUTE; + return errn; + } + break; + case 116: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + case 346: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + case 220: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + case 212: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + case 293: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 152: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + case 171: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + case 154: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + case 173: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEProtocolVersion)] */ + case 111: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumVoltageLimit)] */ + case 192: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage)] */ + case 187: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 129: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + case 167: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + case 264: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ + case 289: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 155: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + case 153: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + case 300: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + case 131: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = START_ELEMENT; + return errn; + } + break; + case 286: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + *nextEvent = ATTRIBUTE; + return errn; + case 3: + case 4: + *nextEvent = START_ELEMENT; + return errn; + } + break; + case 521: + /* FirstStartTag[START_ELEMENT_GENERIC] */ + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 287: + /* StartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = ATTRIBUTE; + return errn; + case 2: + case 3: + *nextEvent = START_ELEMENT; + return errn; + } + break; + case 236: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 241: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = START_ELEMENT; + return errn; + case 2: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 3: + *nextEvent = CHARACTERS_GENERIC; + return errn; + } + break; + case 233: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 276: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 4, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + *nextEvent = START_ELEMENT; + return errn; + case 7: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 8: + *nextEvent = CHARACTERS_GENERIC; + return errn; + } + break; + case 331: + /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + *nextEvent = ATTRIBUTE; + return errn; + case 3: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 4: + *nextEvent = END_ELEMENT; + return errn; + case 5: + *nextEvent = CHARACTERS_GENERIC; + return errn; + } + break; + case 232: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 4, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = ATTRIBUTE; + return errn; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + *nextEvent = START_ELEMENT; + return errn; + case 8: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 9: + *nextEvent = CHARACTERS_GENERIC; + return errn; + } + break; + case 333: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = ATTRIBUTE; + return errn; + case 1: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 2: + *nextEvent = END_ELEMENT; + return errn; + case 3: + *nextEvent = CHARACTERS_GENERIC; + return errn; + } + break; + case 237: + /* Element[END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = END_ELEMENT; + return errn; + case 1: + *nextEvent = CHARACTERS_GENERIC; + return errn; + } + break; + case 242: + /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = ATTRIBUTE; + return errn; + case 2: + *nextEvent = START_ELEMENT; + return errn; + case 3: + *nextEvent = END_ELEMENT; + return errn; + } + break; + case 604: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 226: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 248: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 68: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 618: + /* StartTag[ATTRIBUTE[STRING](Target)] */ + *nextEvent = ATTRIBUTE; + return errn; + case 272: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT_GENERIC, END_ELEMENT] */ + case 265: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT_GENERIC, END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = START_ELEMENT; + return errn; + case 1: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 2: + *nextEvent = END_ELEMENT; + return errn; + } + break; + case 611: + /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = ATTRIBUTE; + return errn; + case 1: + *nextEvent = CHARACTERS; + return errn; + } + break; + case 621: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 619: + /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 1: + *nextEvent = CHARACTERS_GENERIC; + return errn; + } + break; + case 254: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SKI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT_GENERIC, END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + *nextEvent = START_ELEMENT; + return errn; + case 5: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 6: + *nextEvent = END_ELEMENT; + return errn; + } + break; + case 0: + /* Document[START_DOCUMENT] */ + *nextEvent = START_DOCUMENT; + return errn; + case 269: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + case 267: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 1: + *nextEvent = END_ELEMENT; + return errn; + } + break; + case 542: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = START_ELEMENT; + return errn; + case 1: + /* 2nd level events */ + *nextEvent = ATTRIBUTE_XSI_TYPE; + return errn; + } + break; + case 614: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 283: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 600: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 597: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = ATTRIBUTE; + return errn; + case 1: + *nextEvent = START_ELEMENT; + return errn; + } + break; + case 234: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 4, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + *nextEvent = START_ELEMENT; + return errn; + case 7: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 8: + *nextEvent = END_ELEMENT; + return errn; + case 9: + *nextEvent = CHARACTERS_GENERIC; + return errn; + } + break; + case 2: + /* DocEnd[END_DOCUMENT] */ + *nextEvent = END_DOCUMENT; + return errn; + case 253: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SKI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT_GENERIC] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + *nextEvent = START_ELEMENT; + return errn; + case 5: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + } + break; + case 1: + /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Manifest), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStatus), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCertificate), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCustom), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceInternet), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceRCS), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperties), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({urn:iso:15118:2:2010:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}v2g_Service), START_ELEMENT_GENERIC] */ + errn = decodeNBitUnsignedInteger(stream, 7, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + *nextEvent = START_ELEMENT; + return errn; + case 83: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + } + break; + case 332: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = ATTRIBUTE; + return errn; + case 2: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 3: + *nextEvent = END_ELEMENT; + return errn; + case 4: + *nextEvent = CHARACTERS_GENERIC; + return errn; + } + break; + case 243: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = ATTRIBUTE; + return errn; + case 1: + *nextEvent = START_ELEMENT; + return errn; + case 2: + *nextEvent = END_ELEMENT; + return errn; + } + break; + case 302: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + *nextEvent = START_ELEMENT; + return errn; + case 5: + *nextEvent = END_ELEMENT; + return errn; + } + break; + case 327: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + case 122: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter)] */ + case 113: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + case 184: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + *nextEvent = START_ELEMENT; + return errn; + } + break; + case 277: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_PEVStatus)] */ + case 487: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage)] */ + case 162: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + case 493: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 156: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + case 238: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + case 689: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 513: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 651: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 193: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage)] */ + case 529: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + case 549: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + case 622: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + case 12: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + case 98: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionCertChain)] */ + case 165: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + case 648: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + case 553: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + case 221: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + case 256: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber)] */ + case 615: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 65: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + case 195: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}VoltageDifferential)] */ + case 168: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + case 95: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 4: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage)] */ + case 312: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + case 631: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */ + case 182: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + case 20: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinVoltage)] */ + case 52: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + case 602: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod)] */ + case 540: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails)] */ + case 46: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus)] */ + case 34: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EoC)] */ + case 97: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignaturePrivateKey)] */ + case 174: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEProtocolVersion)] */ + case 201: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved)] */ + case 550: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeService)] */ + case 36: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStandby)] */ + case 5: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby)] */ + case 325: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + case 489: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}VoltageDifferential)] */ + case 586: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + case 625: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStatusCode)] */ + case 39: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaxPower)] */ + case 86: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionPrivateKey)] */ + case 77: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 482: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 488: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVDemandCurrent)] */ + case 188: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 110: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumCurrentLimit)] */ + case 183: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeCurrentRequest)] */ + case 126: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency)] */ + case 318: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 650: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 105: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVRequestedEnergyTransferType)] */ + case 213: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + case 204: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved)] */ + case 338: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 526: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceTag)] */ + case 93: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 518: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 211: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus)] */ + case 38: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EAmount)] */ + case 139: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffPMax)] */ + case 194: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDifferential)] */ + case 536: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails)] */ + case 535: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 35: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + case 271: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + case 202: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved)] */ + case 24: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + case 49: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + case 324: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 587: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */ + case 629: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionInformation)] */ + case 92: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionCert)] */ + case 527: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + case 538: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 492: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 136: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */ + case 40: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaxPhases)] */ + case 159: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + case 278: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus)] */ + case 84: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionCertChain)] */ + case 348: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry)] */ + case 21: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + case 200: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent)] */ + case 109: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus)] */ + case 534: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 543: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 523: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + case 326: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower)] */ + case 199: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 298: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + case 624: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 16: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}StopCharging)] */ + case 323: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 496: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 130: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */ + case 76: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 296: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + case 239: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent)] */ + case 598: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + case 42: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMinVoltage)] */ + case 41: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaxVoltage)] */ + case 347: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + case 517: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 514: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType)] */ + case 343: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + case 350: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + case 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 506: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}CertificateInstall)] */ + case 91: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 313: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptSignature)] */ + case 29: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent)] */ + case 28: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent)] */ + case 22: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit)] */ + case 79: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 87: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 601: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 593: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 290: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 10: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + case 56: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVRESSSOC)] */ + case 525: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 218: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q)] */ + case 82: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 599: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue)] */ + case 491: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 73: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + case 628: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + case 351: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + case 112: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumVoltageLimit)] */ + case 138: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */ + case 44: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMinCurrent)] */ + case 281: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + case 652: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 198: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 603: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 180: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 64: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby)] */ + case 14: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + case 495: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 117: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + case 51: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStandby)] */ + case 30: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxPhases)] */ + case 508: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}CertificateUpdate)] */ + case 53: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVReady)] */ + case 512: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 61: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 519: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails)] */ + case 96: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 163: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + case 485: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + case 594: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 177: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 341: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 539: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 100: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionPrivateKey)] */ + case 6: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + case 486: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVRESSVoltage)] */ + case 160: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + case 284: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 497: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 294: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 102: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RetryCounter)] */ + case 133: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + case 121: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 627: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + case 246: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + case 291: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue)] */ + case 255: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + case 224: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter)] */ + case 43: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaxCurrent)] */ + case 33: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus)] */ + case 170: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit)] */ + case 342: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 166: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit)] */ + case 60: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 280: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 589: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 3: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + case 548: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 157: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + case 197: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 339: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 172: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + case 169: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit)] */ + case 595: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + case 127: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff)] */ + case 78: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignaturePrivateKey)] */ + *nextEvent = START_ELEMENT; + return errn; + case 301: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + *nextEvent = START_ELEMENT; + return errn; + case 6: + *nextEvent = END_ELEMENT; + return errn; + } + break; + case 545: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), END_ELEMENT] */ + case 500: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 222: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + case 306: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 637: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + case 630: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Security), END_ELEMENT] */ + case 208: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 610: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + case 632: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = START_ELEMENT; + return errn; + case 2: + *nextEvent = END_ELEMENT; + return errn; + } + break; + case 304: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + *nextEvent = START_ELEMENT; + return errn; + case 4: + *nextEvent = END_ELEMENT; + return errn; + } + break; + case 185: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 328: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + case 123: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter)] */ + case 114: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + *nextEvent = START_ELEMENT; + return errn; + } + break; + case 305: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 498: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 206: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + *nextEvent = START_ELEMENT; + return errn; + case 3: + *nextEvent = END_ELEMENT; + return errn; + } + break; + case 250: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 249: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 608: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 605: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 252: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = START_ELEMENT; + return errn; + case 1: + *nextEvent = START_ELEMENT_GENERIC; + return errn; + case 2: + *nextEvent = END_ELEMENT; + return errn; + case 3: + *nextEvent = CHARACTERS_GENERIC; + return errn; + } + break; + case 555: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 353: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 466: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 372: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 432: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 422: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 442: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 223: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + case 354: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 355: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 636: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Security), END_ELEMENT] */ + case 475: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 141: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ + case 393: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 383: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 448: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 392: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 417: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 568: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 244: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 364: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 402: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 578: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 439: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 579: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 423: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 581: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 360: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 359: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 377: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 458: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 449: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 382: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 147: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 406: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 380: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 563: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 274: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), END_ELEMENT] */ + case 469: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 137: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 530: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] */ + case 582: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 428: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 446: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 386: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 357: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 477: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 80: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] */ + case 633: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + case 410: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 401: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 474: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 146: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 441: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 149: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 400: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 145: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 247: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), END_ELEMENT] */ + case 462: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 559: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 381: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 358: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 309: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 421: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 407: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 415: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 583: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 419: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 395: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 378: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 399: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 209: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 438: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 388: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 564: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 580: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 394: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 452: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 471: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 420: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 440: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 368: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 584: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 403: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 361: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 437: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 443: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 379: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 285: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + case 567: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 638: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + case 473: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 591: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), END_ELEMENT] */ + case 376: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 454: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 430: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 408: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 570: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 450: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 413: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 643: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + case 374: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 463: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 572: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 566: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 502: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 384: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 150: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 476: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 461: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 366: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 453: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 397: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 349: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 557: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 436: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 434: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 478: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 363: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 445: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 571: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 455: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 414: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 427: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 575: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 574: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 371: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 556: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 558: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 385: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 457: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 470: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 367: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 424: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 465: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 459: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 369: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 418: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 389: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 554: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 390: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 577: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 468: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 426: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 616: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), END_ELEMENT] */ + case 447: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 391: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 565: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 546: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), END_ELEMENT] */ + case 148: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 356: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 435: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 370: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 609: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + case 561: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 409: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 416: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 569: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 396: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 551: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + case 613: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + case 429: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 387: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 456: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 362: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 425: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 83: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] */ + case 467: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 375: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 373: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 404: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 576: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 562: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 398: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 560: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 444: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 573: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 472: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 433: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 451: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 431: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 411: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 405: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 464: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 460: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 412: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 365: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = START_ELEMENT; + return errn; + case 1: + *nextEvent = END_ELEMENT; + return errn; + } + break; + case 480: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVPowerDeliveryParameter)] */ + case 345: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + case 190: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToFullSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage)] */ + case 321: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStatus)] */ + case 186: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 106: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVChargeParameter)] */ + case 483: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + case 329: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + case 125: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter)] */ + case 115: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + case 314: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStatus)] */ + case 217: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}P), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + case 319: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + *nextEvent = START_ELEMENT; + return errn; + } + break; + case 189: + /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ + case 268: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 191: + /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ + case 262: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 203: + /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ + case 509: + /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ + case 259: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 270: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 19: + /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ + case 207: + /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ + case 27: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 511: + /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ + case 263: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 205: + /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ + case 257: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 507: + /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ + case 260: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 261: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 275: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 235: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 266: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 251: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 273: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = CHARACTERS; + return errn; + case 1: + /* 2nd level events */ + *nextEvent = ATTRIBUTE_XSI_TYPE; + return errn; + } + break; + + default: + *nextEvent = ERROR; + return EXI_ERROR_UNEXPECTED_EVENT_LEVEL1; + } + + return EXI_ERROR_UNEXPECTED_EVENT_LEVEL1; } int exiDecodeStartDocument(bitstream_t* stream, exi_state_t* state) { @@ -879,7 +2272,7 @@ int exiDecodeStartDocument(bitstream_t* stream, exi_state_t* state) { return 0; } - return -1; + return EXI_ERROR_UNEXPECTED_START_DOCUMENT; } int exiDecodeEndDocument(bitstream_t* stream, exi_state_t* state) { @@ -887,7 +2280,7 @@ int exiDecodeEndDocument(bitstream_t* stream, exi_state_t* state) { return 0; } - return -1; + return EXI_ERROR_UNEXPECTED_END_DOCUMENT; } static int _exiDecodeStartElement(exi_state_t* state, eqname_t* se, @@ -905,1135 +2298,5431 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state, eqname_t* se) { switch (state->grammarStack[state->stackIndex]) { case 1: - /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), START_ELEMENT_GENERIC] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 6, 2, 2, 3); + /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Manifest), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStatus), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCertificate), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCustom), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceInternet), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceRCS), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperties), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({urn:iso:15118:2:2010:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}v2g_Service), START_ELEMENT_GENERIC] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 0, 2, 3); + case 1: + return _exiDecodeStartElement(state, se, 6, 2, 2, 5); + case 2: + return _exiDecodeStartElement(state, se, 6, 4, 2, 33); + case 3: + return _exiDecodeStartElement(state, se, 6, 6, 2, 46); + case 4: + return _exiDecodeStartElement(state, se, 6, 8, 2, 35); + case 5: + return _exiDecodeStartElement(state, se, 7, 2, 2, 48); + case 6: + return _exiDecodeStartElement(state, se, 5, 3, 2, 49); + case 7: + return _exiDecodeStartElement(state, se, 5, 5, 2, 60); + case 8: + return _exiDecodeStartElement(state, se, 4, 0, 2, 68); + case 9: + return _exiDecodeStartElement(state, se, 5, 7, 2, 73); + case 10: + return _exiDecodeStartElement(state, se, 5, 9, 2, 76); + case 11: + return _exiDecodeStartElement(state, se, 5, 11, 2, 91); + case 12: + return _exiDecodeStartElement(state, se, 5, 13, 2, 95); + case 13: + return _exiDecodeStartElement(state, se, 5, 16, 2, 105); + case 14: + return _exiDecodeStartElement(state, se, 5, 18, 2, 121); + case 15: + return _exiDecodeStartElement(state, se, 5, 23, 2, 177); + case 16: + return _exiDecodeStartElement(state, se, 5, 25, 2, 180); + case 17: + return _exiDecodeStartElement(state, se, 5, 33, 2, 182); + case 18: + return _exiDecodeStartElement(state, se, 5, 35, 2, 197); + case 19: + return _exiDecodeStartElement(state, se, 6, 25, 2, 165); + case 20: + return _exiDecodeStartElement(state, se, 6, 27, 2, 64); + case 21: + return _exiDecodeStartElement(state, se, 6, 30, 2, 109); + case 22: + return _exiDecodeStartElement(state, se, 6, 32, 2, 211); + case 23: + return _exiDecodeStartElement(state, se, 6, 35, 2, 51); + case 24: + return _exiDecodeStartElement(state, se, 4, 3, 2, 217); + case 25: + return _exiDecodeStartElement(state, se, 4, 5, 2, 226); + case 26: + return _exiDecodeStartElement(state, se, 4, 7, 2, 230); + case 27: + return _exiDecodeStartElement(state, se, 6, 44, 2, 176); + case 28: + return _exiDecodeStartElement(state, se, 6, 61, 2, 231); + case 29: + return _exiDecodeStartElement(state, se, 4, 14, 2, 232); + case 30: + return _exiDecodeStartElement(state, se, 4, 16, 2, 235); + case 31: + return _exiDecodeStartElement(state, se, 4, 17, 2, 236); + case 32: + return _exiDecodeStartElement(state, se, 5, 52, 2, 277); + case 33: + return _exiDecodeStartElement(state, se, 5, 54, 2, 280); + case 34: + return _exiDecodeStartElement(state, se, 4, 19, 2, 283); + case 35: + return _exiDecodeStartElement(state, se, 5, 57, 2, 293); + case 36: + return _exiDecodeStartElement(state, se, 5, 59, 2, 318); + case 37: + return _exiDecodeStartElement(state, se, 5, 61, 2, 321); + case 38: + return _exiDecodeStartElement(state, se, 5, 63, 2, 323); + case 39: + return _exiDecodeStartElement(state, se, 4, 21, 2, 275); + case 40: + return _exiDecodeStartElement(state, se, 4, 23, 2, 331); + case 41: + return _exiDecodeStartElement(state, se, 6, 79, 2, 120); + case 42: + return _exiDecodeStartElement(state, se, 6, 92, 2, 337); + case 43: + return _exiDecodeStartElement(state, se, 6, 99, 2, 317); + case 44: + return _exiDecodeStartElement(state, se, 4, 26, 2, 264); + case 45: + return _exiDecodeStartElement(state, se, 5, 75, 2, 338); + case 46: + return _exiDecodeStartElement(state, se, 5, 77, 2, 341); + case 47: + return _exiDecodeStartElement(state, se, 5, 80, 2, 345); + case 48: + return _exiDecodeStartElement(state, se, 5, 82, 2, 482); + case 49: + return _exiDecodeStartElement(state, se, 5, 84, 2, 485); + case 50: + return _exiDecodeStartElement(state, se, 5, 86, 2, 491); + case 51: + return _exiDecodeStartElement(state, se, 4, 32, 2, 238); + case 52: + return _exiDecodeStartElement(state, se, 4, 34, 2, 286); + case 53: + return _exiDecodeStartElement(state, se, 4, 36, 2, 242); + case 54: + return _exiDecodeStartElement(state, se, 4, 38, 2, 271); + case 55: + return _exiDecodeStartElement(state, se, 6, 112, 2, 495); + case 56: + return _exiDecodeStartElement(state, se, 6, 114, 2, 512); + case 57: + return _exiDecodeStartElement(state, se, 6, 116, 2, 517); + case 58: + return _exiDecodeStartElement(state, se, 5, 96, 2, 523); + case 59: + return _exiDecodeStartElement(state, se, 5, 98, 2, 525); + case 60: + return _exiDecodeStartElement(state, se, 5, 100, 2, 545); + case 61: + return _exiDecodeStartElement(state, se, 5, 102, 2, 548); + case 62: + return _exiDecodeStartElement(state, se, 6, 121, 2, 534); + case 63: + return _exiDecodeStartElement(state, se, 5, 106, 2, 586); + case 64: + return _exiDecodeStartElement(state, se, 5, 108, 2, 589); + case 65: + return _exiDecodeStartElement(state, se, 6, 124, 2, 538); + case 66: + return _exiDecodeStartElement(state, se, 5, 114, 2, 591); + case 67: + return _exiDecodeStartElement(state, se, 5, 116, 2, 593); + case 68: + return _exiDecodeStartElement(state, se, 4, 42, 2, 597); + case 69: + return _exiDecodeStartElement(state, se, 4, 43, 2, 604); + case 70: + return _exiDecodeStartElement(state, se, 4, 45, 2, 614); + case 71: + return _exiDecodeStartElement(state, se, 4, 47, 2, 617); + case 72: + return _exiDecodeStartElement(state, se, 4, 50, 2, 611); + case 73: + return _exiDecodeStartElement(state, se, 4, 52, 2, 600); + case 74: + return _exiDecodeStartElement(state, se, 5, 121, 2, 622); + case 75: + return _exiDecodeStartElement(state, se, 5, 123, 2, 624); + case 76: + return _exiDecodeStartElement(state, se, 4, 54, 2, 248); + case 77: + return _exiDecodeStartElement(state, se, 4, 56, 2, 246); + case 78: + return _exiDecodeStartElement(state, se, 7, 5, 2, 627); + case 79: + return _exiDecodeStartElement(state, se, 5, 126, 2, 648); + case 80: + return _exiDecodeStartElement(state, se, 5, 128, 2, 650); + case 81: + return _exiDecodeStartElement(state, se, 4, 60, 2, 253); + case 82: + return _exiDecodeStartElement(state, se, 5, 130, 2, 542); + case 83: + return _exiDecodeStartElement(state, se, -1, -1, 2, 71); } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 0, 2, 5); + break; + case 3: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 2, 4, 5); } - else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 4, 2, 2, 6); - } - else if (state->eventCode == 3) { - return _exiDecodeStartElement(state, se, 4, 4, 2, 7); - } - else if (state->eventCode == 4) { - return _exiDecodeStartElement(state, se, 4, 6, 2, 8); - } - else if (state->eventCode == 5) { - return _exiDecodeStartElement(state, se, 4, 10, 2, 9); - } - else if (state->eventCode == 6) { - return _exiDecodeStartElement(state, se, 4, 12, 2, 10); - } - else if (state->eventCode == 7) { - return _exiDecodeStartElement(state, se, 4, 28, 2, 11); - } - else if (state->eventCode == 8) { - return _exiDecodeStartElement(state, se, 4, 30, 2, 12); - } - else if (state->eventCode == 9) { - return _exiDecodeStartElement(state, se, 4, 33, 2, 13); - } - else if (state->eventCode == 10) { - return _exiDecodeStartElement(state, se, 4, 35, 2, 14); - } - else if (state->eventCode == 11) { - return _exiDecodeStartElement(state, se, 4, 37, 2, 15); - } - else if (state->eventCode == 12) { - return _exiDecodeStartElement(state, se, 4, 39, 2, 16); - } - else if (state->eventCode == 13) { - return _exiDecodeStartElement(state, se, 4, 52, 2, 17); - } - else if (state->eventCode == 14) { - return _exiDecodeStartElement(state, se, 4, 54, 2, 18); - } - else if (state->eventCode == 15) { - return _exiDecodeStartElement(state, se, 4, 56, 2, 19); - } - else if (state->eventCode == 16) { - return _exiDecodeStartElement(state, se, 4, 58, 2, 20); - } - else if (state->eventCode == 17) { - return _exiDecodeStartElement(state, se, 4, 60, 2, 21); - } - else if (state->eventCode == 18) { - return _exiDecodeStartElement(state, se, 4, 62, 2, 22); - } - else if (state->eventCode == 19) { - return _exiDecodeStartElement(state, se, 4, 67, 2, 23); - } - else if (state->eventCode == 20) { - return _exiDecodeStartElement(state, se, 4, 69, 2, 24); - } - else if (state->eventCode == 21) { - return _exiDecodeStartElement(state, se, 4, 72, 2, 25); - } - else if (state->eventCode == 22) { - return _exiDecodeStartElement(state, se, 4, 74, 2, 26); - } - else if (state->eventCode == 23) { - return _exiDecodeStartElement(state, se, 4, 78, 2, 27); - } - else if (state->eventCode == 24) { - return _exiDecodeStartElement(state, se, 4, 80, 2, 28); - } - else if (state->eventCode == 25) { - return _exiDecodeStartElement(state, se, 4, 85, 2, 29); - } - else if (state->eventCode == 26) { - return _exiDecodeStartElement(state, se, 4, 87, 2, 30); - } - else if (state->eventCode == 27) { - return _exiDecodeStartElement(state, se, 6, 5, 2, 31); - } - else if (state->eventCode == 28) { - return _exiDecodeStartElement(state, se, 4, 90, 2, 32); - } - else if (state->eventCode == 29) { - return _exiDecodeStartElement(state, se, 4, 92, 2, 33); + break; + case 4: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 50, 20, 21); } break; case 5: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 34, 35); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 60, 6, 7); + } break; case 6: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 43, 44); - break; - case 7: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 62, 35); - break; - case 8: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 81, 82); - break; - case 9: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 121, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 21, 10, 11); + } break; case 10: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 126, 127); - break; - case 11: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 131, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 104, 12, 13); + } break; case 12: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 133, 134); - break; - case 13: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 43, 136, 137); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 50, 138, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 108, 14, 15); } break; case 14: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 149, 150); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 134, 16, 17); + } break; case 16: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 151, 152); - break; - case 17: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ContractID)] */ - return _exiDecodeStartElement(state, se, 4, 9, 160, 161); - break; - case 18: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 162, 163); - break; - case 19: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 165, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}StopCharging)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 136, 18, 19); + } break; case 20: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 168, 169); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 55, 28, 21); + } break; case 21: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 171, 35); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 77, 22, 23); + } break; case 22: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 175, 176); - break; - case 23: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 77, 179, 180); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 76, 181, 182); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 151, 24, 25); } break; case 24: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 183, 184); - break; - case 25: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList)] */ - return _exiDecodeStartElement(state, se, 4, 71, 202, 186); - break; - case 26: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 203, 204); - break; - case 27: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 43, 205, 137); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 50, 206, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 152, 26, 27); } break; case 28: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 207, 208); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 48, 29, 21); + } break; case 29: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 212, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 54, 30, 21); + } break; case 30: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 213, 214); - break; - case 31: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Header)] */ - return _exiDecodeStartElement(state, se, 6, 4, 217, 218); - break; - case 32: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 239, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxPhases)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 49, 31, 32); + } break; case 33: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 240, 241); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 8, 34, 35); + } + break; + case 34: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EoC)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 66, 38, 17); + } break; case 35: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked)] */ - return _exiDecodeStartElement(state, se, 5, 4, 36, 37); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 21, 36, 11); + } break; case 36: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby)] */ - return _exiDecodeStartElement(state, se, 5, 0, 38, 39); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStandby)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 98, 37, 7); + } break; case 38: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ReadyToCharge)] */ - return _exiDecodeStartElement(state, se, 5, 27, 40, 41); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EAmount)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 39, 39, 21); + } + break; + case 39: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaxPower)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 85, 40, 21); + } + break; + case 40: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaxPhases)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 84, 41, 32); + } + break; + case 41: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaxVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 86, 42, 21); + } + break; + case 42: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMinVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 91, 43, 21); + } break; case 43: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 45, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaxCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 83, 44, 21); + } + break; + case 44: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMinCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 90, 45, 21); + } break; case 46: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FatalError)] */ - return _exiDecodeStartElement(state, se, 5, 13, 47, 48); - break; - case 47: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEStandby)] */ - return _exiDecodeStartElement(state, se, 5, 8, 49, 39); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 8, 47, 35); + } break; case 49: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked)] */ - return _exiDecodeStartElement(state, se, 5, 4, 50, 37); - break; - case 50: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}PowerSwitchClosed)] */ - return _exiDecodeStartElement(state, se, 5, 24, 51, 52); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 39, 50, 51); + } break; case 51: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}RCD)] */ - return _exiDecodeStartElement(state, se, 5, 26, 53, 54); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStandby)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 98, 52, 7); + } + break; + case 52: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 21, 53, 11); + } break; case 53: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ShutDownTime)] */ - return _exiDecodeStartElement(state, se, 5, 38, 55, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVReady)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 96, 54, 55); + } break; - case 55: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby)] */ - return _exiDecodeStartElement(state, se, 5, 0, 57, 39); + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStatusCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 100, 56, 57); + } break; - case 57: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEMalfunction)] */ - return _exiDecodeStartElement(state, se, 5, 7, 58, 59); + case 56: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVRESSSOC)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 95, 58, 59); + } break; - case 58: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}StopCharging)] */ - return _exiDecodeStartElement(state, se, 5, 39, 60, 61); + case 60: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 61, 62); + } break; - case 62: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargingMode)] */ - return _exiDecodeStartElement(state, se, 4, 8, 63, 64); + case 61: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 38, 63, 64); + } break; - case 63: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EoC)] */ - return _exiDecodeStartElement(state, se, 4, 27, 65, 56); + case 64: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 60, 65, 7); + } break; case 65: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EAmount)] */ - return _exiDecodeStartElement(state, se, 4, 15, 66, 67); - break; - case 66: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPower)] */ - return _exiDecodeStartElement(state, se, 4, 46, 68, 67); - break; - case 67: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Multiplier)] */ - return _exiDecodeStartElement(state, se, 5, 21, 75, 76); - break; - case 68: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPhases)] */ - return _exiDecodeStartElement(state, se, 4, 45, 69, 70); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 62, 66, 67); + } break; case 69: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 47, 71, 67); + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 70, 71); + } + break; + case 70: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 70, 71); + } break; case 71: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 49, 72, 67); + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, -1, -1, 654, 71); + } break; case 72: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 44, 73, 67); + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 70, 71); + } break; case 73: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 48, 74, 67); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 65, 74, 75); + } break; - case 75: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Unit)] */ - return _exiDecodeStartElement(state, se, 5, 52, 77, 78); + case 76: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 77, 62); + } break; case 77: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Value)] */ - return _exiDecodeStartElement(state, se, 5, 53, 79, 80); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 31, 78, 79); + } break; - case 81: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 83, 46); + case 78: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignaturePrivateKey)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 32, 84, 85); + } + break; + case 79: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 13, 80, 75); + } + break; + case 80: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 137, 81, 82); + } + break; + case 82: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 13, 83, 75); + } break; case 83: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 20, 84, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 13, 83, 75); + } break; case 84: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 22, 85, 67); - break; - case 85: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 17, 86, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionCertChain)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 28, 86, 79); + } break; case 86: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 21, 87, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionPrivateKey)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 29, 87, 88); + } break; case 87: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPhases)] */ - return _exiDecodeStartElement(state, se, 4, 18, 88, 70); - break; - case 88: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 26, 89, 90); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 84, 91, 92); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 30, 89, 90); } break; - case 89: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 84, 91, 92); + case 91: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 31, 92, 79); } break; case 92: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Currency)] */ - return _exiDecodeStartElement(state, se, 5, 5, 93, 94); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionCert)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 27, 93, 75); + } break; case 93: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff)] */ - return _exiDecodeStartElement(state, se, 5, 41, 95, 96); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 30, 94, 90); + } break; case 95: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 41, 97, 96); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 96, 62); } break; case 96: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffID)] */ - return _exiDecodeStartElement(state, se, 5, 48, 102, 103); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 31, 97, 79); + } break; case 97: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 41, 98, 96); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignaturePrivateKey)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 32, 98, 99); } break; case 98: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 41, 99, 96); - } - break; - case 99: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 41, 100, 96); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionCertChain)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 28, 100, 79); } break; case 100: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 41, 101, 96); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionPrivateKey)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 29, 101, 88); + } + break; + case 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 30, 102, 90); } break; case 102: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries)] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 43, 104, 105); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 44, 106, 107); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RetryCounter)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 94, 103, 104); } break; - case 104: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries)] */ - return _exiDecodeStartElement(state, se, 5, 44, 106, 107); + case 105: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVRequestedEnergyTransferType)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 73, 106, 107); + } break; - case 107: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry)] */ - return _exiDecodeStartElement(state, se, 5, 46, 108, 109); - break; - case 108: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 110, 109); + case 106: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVChargeParameter)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 4, 108, 33); + case 1: + return _exiDecodeStartElement(state, se, 6, 30, 108, 109); + case 2: + return _exiDecodeStartElement(state, se, 6, 79, 108, 120); } break; case 109: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffStart)] */ - return _exiDecodeStartElement(state, se, 5, 50, 117, 118); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 35, 110, 51); + } break; case 110: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 111, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumCurrentLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 87, 111, 21); } break; case 111: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 112, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumVoltageLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 88, 112, 21); + case 1: + return _exiDecodeStartElement(state, se, 6, 89, 113, 21); } break; case 112: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 113, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumVoltageLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 89, 113, 21); } break; case 113: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 114, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 81, 114, 21); + case 1: + return _exiDecodeStartElement(state, se, 6, 82, 115, 21); + case 2: + return _exiDecodeStartElement(state, se, 6, 71, 116, 59); + case 3: + return _exiDecodeStartElement(state, se, 6, 12, 117, 59); + case 4: + return _exiDecodeStartElement(state, se, 6, 94, 118, 119); } break; case 114: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 115, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 82, 115, 21); + case 1: + return _exiDecodeStartElement(state, se, 6, 71, 116, 59); + case 2: + return _exiDecodeStartElement(state, se, 6, 12, 117, 59); + case 3: + return _exiDecodeStartElement(state, se, 6, 94, 118, 119); } break; case 115: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 116, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 71, 116, 59); + case 1: + return _exiDecodeStartElement(state, se, 6, 12, 117, 59); + case 2: + return _exiDecodeStartElement(state, se, 6, 94, 118, 119); + } + break; + case 116: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 12, 117, 59); + case 1: + return _exiDecodeStartElement(state, se, 6, 94, 118, 119); } break; case 117: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffPMax)] */ - return _exiDecodeStartElement(state, se, 5, 49, 119, 67); - break; - case 119: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EPrice), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 6, 120, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 94, 118, 119); } break; case 121: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 51, 122, 67); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 122, 62); + } break; case 122: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 42, 123, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 50, 123, 124); + case 1: + return _exiDecodeStartElement(state, se, 5, 120, 125, 126); + case 2: + return _exiDecodeStartElement(state, se, 6, 0, 164, 3); + case 3: + return _exiDecodeStartElement(state, se, 6, 25, 164, 165); + case 4: + return _exiDecodeStartElement(state, se, 6, 44, 164, 176); + } break; case 123: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDifferential)] */ - return _exiDecodeStartElement(state, se, 4, 14, 124, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 120, 125, 126); + case 1: + return _exiDecodeStartElement(state, se, 6, 0, 164, 3); + case 2: + return _exiDecodeStartElement(state, se, 6, 25, 164, 165); + case 3: + return _exiDecodeStartElement(state, se, 6, 44, 164, 176); + } break; - case 124: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential)] */ - return _exiDecodeStartElement(state, se, 4, 89, 125, 67); + case 125: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 0, 164, 3); + case 1: + return _exiDecodeStartElement(state, se, 6, 25, 164, 165); + case 2: + return _exiDecodeStartElement(state, se, 6, 44, 164, 176); + } break; case 126: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 128, 46); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 22, 127, 128); + } break; - case 128: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 24, 129, 67); + case 127: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 140, 129, 130); + } break; case 129: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 23, 130, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 140, 152, 130); + case 1: + return _exiDecodeStartElement(state, se, 6, 43, 163, 25); + } + break; + case 130: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 147, 131, 132); + } break; case 131: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqLockStatus)] */ - return _exiDecodeStartElement(state, se, 4, 64, 132, 37); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 142, 133, 134); + case 1: + return _exiDecodeStartElement(state, se, 6, 143, 135, 136); + } break; case 133: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 135, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 143, 135, 136); + } break; case 136: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 138, 35); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 145, 137, 138); + } + break; + case 137: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 145, 145, 138); + } break; case 138: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff)] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 82, 139, 56); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 83, 140, 103); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 149, 139, 140); } break; case 139: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff)] */ - return _exiDecodeStartElement(state, se, 4, 83, 140, 103); - break; - case 140: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo)] */ - return _exiDecodeStartElement(state, se, 4, 32, 141, 142); - break; - case 142: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 17, 143, 144); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 19, 145, 67); - } - else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 5, 20, 146, 147); - } - else if (state->eventCode == 3) { - return _exiDecodeStartElement(state, se, 5, 40, 148, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffPMax)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 148, 141, 142); } break; - case 143: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 19, 145, 67); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 20, 146, 147); - } - else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 5, 40, 148, 56); + case 141: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 40, 143, 144); } break; case 145: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 20, 146, 147); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 40, 148, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 145, 146, 138); } break; case 146: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 40, 148, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 145, 147, 138); } break; - case 151: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID)] */ - return _exiDecodeStartElement(state, se, 4, 16, 153, 154); + case 147: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 145, 148, 138); + } + break; + case 148: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 145, 149, 138); + } + break; + case 149: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 145, 150, 138); + } + break; + case 150: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 145, 151, 138); + } + break; + case 152: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 140, 153, 130); + case 1: + return _exiDecodeStartElement(state, se, 6, 43, 162, 25); + } break; case 153: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 155, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 140, 154, 130); + case 1: + return _exiDecodeStartElement(state, se, 6, 43, 161, 25); + } + break; + case 154: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 140, 155, 130); + case 1: + return _exiDecodeStartElement(state, se, 6, 43, 160, 25); + } break; case 155: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 82, 156, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 140, 156, 130); + case 1: + return _exiDecodeStartElement(state, se, 6, 43, 159, 25); + } break; case 156: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPower)] */ - return _exiDecodeStartElement(state, se, 4, 19, 157, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 43, 157, 25); + } break; case 157: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 41, 158, 67); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 32, 159, 142); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 41, 158, 23); } break; - case 158: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 32, 159, 142); + case 159: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 41, 158, 23); + } + break; + case 160: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 41, 158, 23); + } + break; + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 41, 158, 23); } break; case 162: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 82, 164, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 41, 158, 23); + } + break; + case 163: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 41, 158, 23); + } break; case 165: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqSwitchStatus)] */ - return _exiDecodeStartElement(state, se, 4, 65, 166, 52); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 27, 166, 64); + } break; case 166: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 83, 167, 103); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 51, 167, 21); + } + break; + case 167: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 52, 168, 21); + case 1: + return _exiDecodeStartElement(state, se, 6, 53, 169, 21); } break; case 168: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 170, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 53, 169, 21); + } + break; + case 169: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 56, 170, 21); + } + break; + case 170: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 57, 171, 21); + } break; case 171: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 51, 172, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 46, 172, 21); + case 1: + return _exiDecodeStartElement(state, se, 6, 58, 173, 21); + } break; case 172: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 42, 173, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 58, 173, 21); + } break; case 173: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential)] */ - return _exiDecodeStartElement(state, se, 4, 89, 174, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEProtocolVersion)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 47, 174, 21); + case 1: + return _exiDecodeStartElement(state, se, 6, 59, 175, 119); + } break; - case 175: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 177, 46); + case 174: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEProtocolVersion)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 59, 175, 119); + } break; case 177: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 24, 178, 67); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 51, 178, 179); + } break; - case 179: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 76, 181, 182); + case 180: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 181, 62); + } + break; + case 182: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 39, 183, 51); } break; case 183: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 71, 185, 186); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeCurrentRequest)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 15, 184, 21); + } + break; + case 184: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 71, 185, 21); + case 1: + return _exiDecodeStartElement(state, se, 5, 69, 186, 21); + case 2: + return _exiDecodeStartElement(state, se, 5, 70, 187, 21); + case 3: + return _exiDecodeStartElement(state, se, 5, 2, 188, 189); + case 4: + return _exiDecodeStartElement(state, se, 5, 21, 190, 191); + } + break; + case 185: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 69, 186, 21); + case 1: + return _exiDecodeStartElement(state, se, 5, 70, 187, 21); + case 2: + return _exiDecodeStartElement(state, se, 5, 2, 188, 189); + case 3: + return _exiDecodeStartElement(state, se, 5, 21, 190, 191); } break; case 186: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service)] */ - return _exiDecodeStartElement(state, se, 5, 28, 187, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 70, 187, 21); + case 1: + return _exiDecodeStartElement(state, se, 5, 2, 188, 189); + case 2: + return _exiDecodeStartElement(state, se, 5, 21, 190, 191); + } break; case 187: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 189, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 2, 188, 189); + case 1: + return _exiDecodeStartElement(state, se, 5, 21, 190, 191); } break; case 188: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceID)] */ - return _exiDecodeStartElement(state, se, 5, 30, 196, 197); - break; - case 189: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 190, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 21, 190, 191); } break; case 190: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 191, 188); - } - break; - case 191: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 192, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToFullSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 90, 192, 21); + case 1: + return _exiDecodeStartElement(state, se, 5, 89, 193, 21); + case 2: + return _exiDecodeStartElement(state, se, 5, 74, 194, 21); } break; case 192: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 193, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 89, 193, 21); + case 1: + return _exiDecodeStartElement(state, se, 5, 74, 194, 21); } break; case 193: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 194, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 74, 194, 21); } break; case 194: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 195, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDifferential)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 37, 195, 21); } break; - case 196: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 32, 198, 199); + case 195: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}VoltageDifferential)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 125, 196, 21); } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 35, 200, 180); - } - else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 5, 33, 201, 182); + break; + case 197: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 198, 62); } break; case 198: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 35, 200, 180); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 38, 199, 64); } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 33, 201, 182); + break; + case 199: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 48, 200, 21); } break; case 200: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 33, 201, 182); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 47, 201, 21); } break; - case 205: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 206, 35); + case 201: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 40, 202, 203); + } break; - case 207: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID)] */ - return _exiDecodeStartElement(state, se, 4, 16, 209, 154); + case 202: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 49, 204, 205); + } + break; + case 204: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 46, 206, 207); + } + break; + case 206: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 45, 208, 21); + case 1: + return _exiDecodeStartElement(state, se, 5, 43, 209, 21); + case 2: + return _exiDecodeStartElement(state, se, 5, 44, 210, 21); + } + break; + case 208: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 43, 209, 21); + case 1: + return _exiDecodeStartElement(state, se, 5, 44, 210, 21); + } break; case 209: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 210, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 44, 210, 21); + } break; - case 210: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 82, 211, 56); + case 211: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 35, 212, 51); + } + break; + case 212: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 11, 213, 214); + case 1: + return _exiDecodeStartElement(state, se, 6, 17, 215, 216); + } break; case 213: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 215, 46); - break; - case 215: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 24, 216, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 17, 215, 216); + } break; case 217: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Body)] */ - return _exiDecodeStartElement(state, se, 6, 0, 219, 220); + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}P), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 25, 218, 219); + case 1: + return _exiDecodeStartElement(state, se, 4, 10, 221, 219); + case 2: + return _exiDecodeStartElement(state, se, 4, 69, 222, 219); + } break; case 218: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}SessionInformation)] */ - return _exiDecodeStartElement(state, se, 7, 2, 221, 222); + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 31, 220, 219); + } break; case 220: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 6, 2, 238, 3); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 0, 238, 5); - } - else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 4, 2, 238, 6); - } - else if (state->eventCode == 3) { - return _exiDecodeStartElement(state, se, 4, 4, 238, 7); - } - else if (state->eventCode == 4) { - return _exiDecodeStartElement(state, se, 4, 6, 238, 8); - } - else if (state->eventCode == 5) { - return _exiDecodeStartElement(state, se, 4, 10, 238, 9); - } - else if (state->eventCode == 6) { - return _exiDecodeStartElement(state, se, 4, 12, 238, 10); - } - else if (state->eventCode == 7) { - return _exiDecodeStartElement(state, se, 4, 28, 238, 11); - } - else if (state->eventCode == 8) { - return _exiDecodeStartElement(state, se, 4, 30, 238, 12); - } - else if (state->eventCode == 9) { - return _exiDecodeStartElement(state, se, 4, 33, 238, 13); - } - else if (state->eventCode == 10) { - return _exiDecodeStartElement(state, se, 4, 35, 238, 14); - } - else if (state->eventCode == 11) { - return _exiDecodeStartElement(state, se, 4, 37, 238, 15); - } - else if (state->eventCode == 12) { - return _exiDecodeStartElement(state, se, 4, 39, 238, 16); - } - else if (state->eventCode == 13) { - return _exiDecodeStartElement(state, se, 4, 52, 238, 17); - } - else if (state->eventCode == 14) { - return _exiDecodeStartElement(state, se, 4, 54, 238, 18); - } - else if (state->eventCode == 15) { - return _exiDecodeStartElement(state, se, 4, 56, 238, 19); - } - else if (state->eventCode == 16) { - return _exiDecodeStartElement(state, se, 4, 58, 238, 20); - } - else if (state->eventCode == 17) { - return _exiDecodeStartElement(state, se, 4, 60, 238, 21); - } - else if (state->eventCode == 18) { - return _exiDecodeStartElement(state, se, 4, 62, 238, 22); - } - else if (state->eventCode == 19) { - return _exiDecodeStartElement(state, se, 4, 67, 238, 23); - } - else if (state->eventCode == 20) { - return _exiDecodeStartElement(state, se, 4, 69, 238, 24); - } - else if (state->eventCode == 21) { - return _exiDecodeStartElement(state, se, 4, 72, 238, 25); - } - else if (state->eventCode == 22) { - return _exiDecodeStartElement(state, se, 4, 74, 238, 26); - } - else if (state->eventCode == 23) { - return _exiDecodeStartElement(state, se, 4, 78, 238, 27); - } - else if (state->eventCode == 24) { - return _exiDecodeStartElement(state, se, 4, 80, 238, 28); - } - else if (state->eventCode == 25) { - return _exiDecodeStartElement(state, se, 4, 85, 238, 29); - } - else if (state->eventCode == 26) { - return _exiDecodeStartElement(state, se, 4, 87, 238, 30); - } - else if (state->eventCode == 27) { - return _exiDecodeStartElement(state, se, 4, 90, 238, 32); - } - else if (state->eventCode == 28) { - return _exiDecodeStartElement(state, se, 4, 92, 238, 33); + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 10, 221, 219); + case 1: + return _exiDecodeStartElement(state, se, 4, 69, 222, 219); } break; case 221: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}Notification), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 7, 1, 223, 224); + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 69, 222, 219); } break; case 222: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}SessionID)] */ - return _exiDecodeStartElement(state, se, 5, 36, 225, 226); + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 13, 223, 219); + case 1: + return _exiDecodeStartElement(state, se, 4, 41, 224, 219); + } + break; + case 223: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 41, 224, 219); + } break; case 224: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 14, 230, 231); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 15, 232, 233); - } - else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 5, 11, 234, 235); - } - break; - case 225: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 34, 227, 226); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 25, 228, 229); + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 30, 225, 219); } break; case 227: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 25, 228, 229); + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 228, 71); } break; - case 230: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 15, 232, 233); + case 228: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 228, 71); } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 11, 234, 235); + break; + case 229: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 228, 71); } break; case 232: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 11, 234, 235); + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 4, 16, 234, 235); + case 2: + return _exiDecodeStartElement(state, se, 4, 17, 234, 236); + case 3: + return _exiDecodeStartElement(state, se, 4, 36, 234, 242); + case 4: + return _exiDecodeStartElement(state, se, 4, 60, 234, 253); + case 5: + return _exiDecodeStartElement(state, se, 4, 26, 234, 264); + case 6: + return _exiDecodeStartElement(state, se, 4, 38, 234, 271); + case 7: + return _exiDecodeStartElement(state, se, 4, 21, 234, 275); + case 8: + return _exiDecodeStartElement(state, se, -1, -1, 234, 71); } break; - case 235: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Event)] */ - return _exiDecodeStartElement(state, se, 5, 10, 236, 237); + case 233: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 16, 234, 235); + case 1: + return _exiDecodeStartElement(state, se, 4, 17, 234, 236); + case 2: + return _exiDecodeStartElement(state, se, 4, 36, 234, 242); + case 3: + return _exiDecodeStartElement(state, se, 4, 60, 234, 253); + case 4: + return _exiDecodeStartElement(state, se, 4, 26, 234, 264); + case 5: + return _exiDecodeStartElement(state, se, 4, 38, 234, 271); + case 6: + return _exiDecodeStartElement(state, se, 4, 21, 234, 275); + case 7: + return _exiDecodeStartElement(state, se, -1, -1, 234, 71); + } break; - case 240: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 242, 46); + case 234: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 16, 234, 235); + case 1: + return _exiDecodeStartElement(state, se, 4, 17, 234, 236); + case 2: + return _exiDecodeStartElement(state, se, 4, 36, 234, 242); + case 3: + return _exiDecodeStartElement(state, se, 4, 60, 234, 253); + case 4: + return _exiDecodeStartElement(state, se, 4, 26, 234, 264); + case 5: + return _exiDecodeStartElement(state, se, 4, 38, 234, 271); + case 6: + return _exiDecodeStartElement(state, se, 4, 21, 234, 275); + case 7: + return _exiDecodeStartElement(state, se, -1, -1, 234, 71); + } + break; + case 236: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 3, 237, 217); + case 1: + return _exiDecodeStartElement(state, se, 4, 32, 237, 238); + case 2: + return _exiDecodeStartElement(state, se, -1, -1, 237, 71); + } + break; + case 238: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 22, 239, 219); + } + break; + case 239: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 9, 240, 219); + } + break; + case 241: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 3, 237, 217); + case 1: + return _exiDecodeStartElement(state, se, 4, 32, 237, 238); + case 2: + return _exiDecodeStartElement(state, se, -1, -1, 237, 71); + } break; case 242: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 24, 243, 67); + /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + switch(state->eventCode) { + case 2: + return _exiDecodeStartElement(state, se, 4, 56, 245, 246); + } + break; + case 243: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 4, 56, 245, 246); + } + break; + case 244: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 56, 245, 246); + } + break; + case 246: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 54, 247, 248); + } + break; + case 247: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 54, 247, 248); + } + break; + case 249: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 68, 250, 251); + case 1: + return _exiDecodeStartElement(state, se, -1, -1, 250, 71); + } + break; + case 250: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 68, 250, 251); + case 1: + return _exiDecodeStartElement(state, se, -1, -1, 250, 71); + } + break; + case 252: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 68, 250, 251); + case 1: + return _exiDecodeStartElement(state, se, -1, -1, 250, 71); + } + break; + case 253: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SKI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT_GENERIC] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 63, 254, 255); + case 1: + return _exiDecodeStartElement(state, se, 4, 65, 254, 260); + case 2: + return _exiDecodeStartElement(state, se, 4, 67, 254, 261); + case 3: + return _exiDecodeStartElement(state, se, 4, 59, 254, 262); + case 4: + return _exiDecodeStartElement(state, se, 4, 58, 254, 263); + case 5: + return _exiDecodeStartElement(state, se, -1, -1, 254, 71); + } + break; + case 254: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SKI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT_GENERIC, END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 63, 254, 255); + case 1: + return _exiDecodeStartElement(state, se, 4, 65, 254, 260); + case 2: + return _exiDecodeStartElement(state, se, 4, 67, 254, 261); + case 3: + return _exiDecodeStartElement(state, se, 4, 59, 254, 262); + case 4: + return _exiDecodeStartElement(state, se, 4, 58, 254, 263); + case 5: + return _exiDecodeStartElement(state, se, -1, -1, 254, 71); + } + break; + case 255: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 62, 256, 257); + } + break; + case 256: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 66, 258, 259); + } + break; + case 264: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 28, 265, 266); + case 1: + return _exiDecodeStartElement(state, se, 4, 29, 269, 270); + } + break; + case 265: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT_GENERIC, END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 29, 267, 268); + case 1: + return _exiDecodeStartElement(state, se, -1, -1, 267, 71); + } + break; + case 267: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 267, 71); + } + break; + case 269: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 269, 71); + } + break; + case 271: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 40, 272, 273); + } + break; + case 272: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT_GENERIC, END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 40, 272, 273); + case 1: + return _exiDecodeStartElement(state, se, -1, -1, 274, 71); + } + break; + case 274: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 40, 272, 273); + } + break; + case 276: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 16, 234, 235); + case 1: + return _exiDecodeStartElement(state, se, 4, 17, 234, 236); + case 2: + return _exiDecodeStartElement(state, se, 4, 36, 234, 242); + case 3: + return _exiDecodeStartElement(state, se, 4, 60, 234, 253); + case 4: + return _exiDecodeStartElement(state, se, 4, 26, 234, 264); + case 5: + return _exiDecodeStartElement(state, se, 4, 38, 234, 271); + case 6: + return _exiDecodeStartElement(state, se, 4, 21, 234, 275); + case 7: + return _exiDecodeStartElement(state, se, -1, -1, 234, 71); + } + break; + case 277: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_PEVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 1, 278, 35); + } + break; + case 278: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 91, 279, 11); + } + break; + case 280: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 281, 62); + } + break; + case 281: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 0, 282, 5); + } + break; + case 283: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 4, 34, 285, 286); + } + break; + case 284: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 34, 285, 286); + } + break; + case 285: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 34, 285, 286); + } + break; + case 286: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + switch(state->eventCode) { + case 3: + return _exiDecodeStartElement(state, se, 4, 56, 290, 246); + case 4: + return _exiDecodeStartElement(state, se, 4, 5, 291, 226); + } + break; + case 287: + /* StartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + switch(state->eventCode) { + case 2: + return _exiDecodeStartElement(state, se, 4, 56, 290, 246); + case 3: + return _exiDecodeStartElement(state, se, 4, 5, 291, 226); + } + break; + case 288: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 4, 56, 290, 246); + case 2: + return _exiDecodeStartElement(state, se, 4, 5, 291, 226); + } + break; + case 289: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 56, 290, 246); + case 1: + return _exiDecodeStartElement(state, se, 4, 5, 291, 226); + } + break; + case 290: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 5, 291, 226); + } + break; + case 291: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 7, 292, 230); + } + break; + case 293: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 68, 294, 295); + case 1: + return _exiDecodeStartElement(state, se, 5, 41, 296, 297); + } + break; + case 294: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 41, 296, 297); + } + break; + case 296: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 113, 298, 299); + } + break; + case 298: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 56, 300, 301); + } + break; + case 300: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 118, 312, 17); + case 1: + return _exiDecodeStartElement(state, se, 5, 119, 313, 132); + } + break; + case 301: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 72, 302, 303); + case 1: + return _exiDecodeStartElement(state, se, 6, 74, 304, 85); + case 2: + return _exiDecodeStartElement(state, se, 6, 75, 305, 21); + case 3: + return _exiDecodeStartElement(state, se, 6, 135, 306, 307); + case 4: + return _exiDecodeStartElement(state, se, 6, 76, 309, 310); + case 5: + return _exiDecodeStartElement(state, se, 6, 139, 311, 17); + } + break; + case 302: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 74, 304, 85); + case 1: + return _exiDecodeStartElement(state, se, 6, 75, 305, 21); + case 2: + return _exiDecodeStartElement(state, se, 6, 135, 306, 307); + case 3: + return _exiDecodeStartElement(state, se, 6, 76, 309, 310); + case 4: + return _exiDecodeStartElement(state, se, 6, 139, 311, 17); + } + break; + case 304: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 75, 305, 21); + case 1: + return _exiDecodeStartElement(state, se, 6, 135, 306, 307); + case 2: + return _exiDecodeStartElement(state, se, 6, 76, 309, 310); + case 3: + return _exiDecodeStartElement(state, se, 6, 139, 311, 17); + } + break; + case 305: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 135, 306, 307); + case 1: + return _exiDecodeStartElement(state, se, 6, 76, 309, 310); + case 2: + return _exiDecodeStartElement(state, se, 6, 139, 311, 17); + } + break; + case 306: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 76, 309, 310); + case 1: + return _exiDecodeStartElement(state, se, 6, 139, 311, 17); + } + break; + case 307: + /* First(xsi:type)StartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, -1, -1, 308, 71); + } + break; + case 308: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 308, 71); + } + break; + case 309: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 139, 311, 17); + } + break; + case 312: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 119, 313, 132); + } + break; + case 313: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptSignature)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 88, 314, 315); + } + break; + case 314: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 8, 316, 35); + case 1: + return _exiDecodeStartElement(state, se, 6, 35, 316, 51); + case 2: + return _exiDecodeStartElement(state, se, 6, 99, 316, 317); + } + break; + case 318: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 319, 62); + } + break; + case 319: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 2, 320, 5); + case 1: + return _exiDecodeStartElement(state, se, 6, 27, 320, 64); + case 2: + return _exiDecodeStartElement(state, se, 6, 61, 320, 231); + } + break; + case 321: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 8, 322, 35); + case 1: + return _exiDecodeStartElement(state, se, 6, 35, 322, 51); + case 2: + return _exiDecodeStartElement(state, se, 6, 99, 322, 317); + } + break; + case 323: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 324, 62); + } + break; + case 324: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 41, 325, 297); + } + break; + case 325: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 118, 326, 17); + } + break; + case 326: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 42, 327, 21); + } + break; + case 327: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 66, 328, 21); + case 1: + return _exiDecodeStartElement(state, se, 5, 56, 329, 301); + case 2: + return _exiDecodeStartElement(state, se, 6, 2, 330, 5); + case 3: + return _exiDecodeStartElement(state, se, 6, 27, 330, 64); + case 4: + return _exiDecodeStartElement(state, se, 6, 61, 330, 231); + } + break; + case 328: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 56, 329, 301); + case 1: + return _exiDecodeStartElement(state, se, 6, 2, 330, 5); + case 2: + return _exiDecodeStartElement(state, se, 6, 27, 330, 64); + case 3: + return _exiDecodeStartElement(state, se, 6, 61, 330, 231); + } + break; + case 329: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 2, 330, 5); + case 1: + return _exiDecodeStartElement(state, se, 6, 27, 330, 64); + case 2: + return _exiDecodeStartElement(state, se, 6, 61, 330, 231); + } + break; + case 331: + /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 3: + return _exiDecodeStartElement(state, se, -1, -1, 335, 71); + } + break; + case 332: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 2: + return _exiDecodeStartElement(state, se, -1, -1, 335, 71); + } + break; + case 333: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, -1, -1, 335, 71); + } + break; + case 334: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 335, 71); + } + break; + case 335: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 335, 71); + } + break; + case 336: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 335, 71); + } + break; + case 338: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 30, 339, 90); + } + break; + case 339: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 31, 340, 79); + } + break; + case 341: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 342, 62); + } + break; + case 342: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 51, 343, 179); + } + break; + case 343: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 118, 344, 17); + } + break; + case 345: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 119, 346, 132); + case 1: + return _exiDecodeStartElement(state, se, 5, 22, 347, 348); + case 2: + return _exiDecodeStartElement(state, se, 5, 92, 480, 13); + } + break; + case 346: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 22, 347, 348); + case 1: + return _exiDecodeStartElement(state, se, 5, 92, 480, 13); + } + break; + case 347: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 92, 480, 13); + } + break; + case 348: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 349, 350); + } + break; + case 349: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 353, 350); + } + break; + case 350: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 19, 351, 17); + } + break; + case 351: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 18, 352, 142); + } + break; + case 353: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 354, 350); + } + break; + case 354: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 355, 350); + } + break; + case 355: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 356, 350); + } + break; + case 356: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 357, 350); + } + break; + case 357: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 358, 350); + } + break; + case 358: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 359, 350); + } + break; + case 359: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 360, 350); + } + break; + case 360: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 361, 350); + } + break; + case 361: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 362, 350); + } + break; + case 362: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 363, 350); + } + break; + case 363: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 364, 350); + } + break; + case 364: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 365, 350); + } + break; + case 365: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 366, 350); + } + break; + case 366: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 367, 350); + } + break; + case 367: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 368, 350); + } + break; + case 368: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 369, 350); + } + break; + case 369: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 370, 350); + } + break; + case 370: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 371, 350); + } + break; + case 371: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 372, 350); + } + break; + case 372: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 373, 350); + } + break; + case 373: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 374, 350); + } + break; + case 374: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 375, 350); + } + break; + case 375: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 376, 350); + } + break; + case 376: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 377, 350); + } + break; + case 377: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 378, 350); + } + break; + case 378: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 379, 350); + } + break; + case 379: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 380, 350); + } + break; + case 380: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 381, 350); + } + break; + case 381: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 382, 350); + } + break; + case 382: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 383, 350); + } + break; + case 383: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 384, 350); + } + break; + case 384: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 385, 350); + } + break; + case 385: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 386, 350); + } + break; + case 386: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 387, 350); + } + break; + case 387: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 388, 350); + } + break; + case 388: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 389, 350); + } + break; + case 389: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 390, 350); + } + break; + case 390: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 391, 350); + } + break; + case 391: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 392, 350); + } + break; + case 392: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 393, 350); + } + break; + case 393: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 394, 350); + } + break; + case 394: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 395, 350); + } + break; + case 395: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 396, 350); + } + break; + case 396: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 397, 350); + } + break; + case 397: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 398, 350); + } + break; + case 398: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 399, 350); + } + break; + case 399: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 400, 350); + } + break; + case 400: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 401, 350); + } + break; + case 401: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 402, 350); + } + break; + case 402: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 403, 350); + } + break; + case 403: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 404, 350); + } + break; + case 404: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 405, 350); + } + break; + case 405: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 406, 350); + } + break; + case 406: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 407, 350); + } + break; + case 407: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 408, 350); + } + break; + case 408: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 409, 350); + } + break; + case 409: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 410, 350); + } + break; + case 410: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 411, 350); + } + break; + case 411: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 412, 350); + } + break; + case 412: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 413, 350); + } + break; + case 413: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 414, 350); + } + break; + case 414: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 415, 350); + } + break; + case 415: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 416, 350); + } + break; + case 416: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 417, 350); + } + break; + case 417: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 418, 350); + } + break; + case 418: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 419, 350); + } + break; + case 419: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 420, 350); + } + break; + case 420: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 421, 350); + } + break; + case 421: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 422, 350); + } + break; + case 422: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 423, 350); + } + break; + case 423: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 424, 350); + } + break; + case 424: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 425, 350); + } + break; + case 425: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 426, 350); + } + break; + case 426: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 427, 350); + } + break; + case 427: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 428, 350); + } + break; + case 428: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 429, 350); + } + break; + case 429: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 430, 350); + } + break; + case 430: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 431, 350); + } + break; + case 431: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 432, 350); + } + break; + case 432: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 433, 350); + } + break; + case 433: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 434, 350); + } + break; + case 434: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 435, 350); + } + break; + case 435: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 436, 350); + } + break; + case 436: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 437, 350); + } + break; + case 437: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 438, 350); + } + break; + case 438: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 439, 350); + } + break; + case 439: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 440, 350); + } + break; + case 440: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 441, 350); + } + break; + case 441: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 442, 350); + } + break; + case 442: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 443, 350); + } + break; + case 443: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 444, 350); + } + break; + case 444: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 445, 350); + } + break; + case 445: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 446, 350); + } + break; + case 446: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 447, 350); + } + break; + case 447: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 448, 350); + } + break; + case 448: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 449, 350); + } + break; + case 449: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 450, 350); + } + break; + case 450: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 451, 350); + } + break; + case 451: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 452, 350); + } + break; + case 452: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 453, 350); + } + break; + case 453: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 454, 350); + } + break; + case 454: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 455, 350); + } + break; + case 455: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 456, 350); + } + break; + case 456: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 457, 350); + } + break; + case 457: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 458, 350); + } + break; + case 458: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 459, 350); + } + break; + case 459: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 460, 350); + } + break; + case 460: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 461, 350); + } + break; + case 461: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 462, 350); + } + break; + case 462: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 463, 350); + } + break; + case 463: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 464, 350); + } + break; + case 464: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 465, 350); + } + break; + case 465: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 466, 350); + } + break; + case 466: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 467, 350); + } + break; + case 467: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 468, 350); + } + break; + case 468: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 469, 350); + } + break; + case 469: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 470, 350); + } + break; + case 470: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 471, 350); + } + break; + case 471: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 472, 350); + } + break; + case 472: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 473, 350); + } + break; + case 473: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 474, 350); + } + break; + case 474: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 475, 350); + } + break; + case 475: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 476, 350); + } + break; + case 476: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 477, 350); + } + break; + case 477: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 478, 350); + } + break; + case 478: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 479, 350); + } + break; + case 480: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVPowerDeliveryParameter)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 6, 481, 46); + case 1: + return _exiDecodeStartElement(state, se, 6, 32, 481, 211); + case 2: + return _exiDecodeStartElement(state, se, 6, 92, 481, 337); + } + break; + case 482: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 483, 62); + } + break; + case 483: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 2, 484, 5); + case 1: + return _exiDecodeStartElement(state, se, 6, 27, 484, 64); + case 2: + return _exiDecodeStartElement(state, se, 6, 61, 484, 231); + } + break; + case 485: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 39, 486, 51); + } + break; + case 486: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVRESSVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 72, 487, 21); + } + break; + case 487: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 74, 488, 21); + } + break; + case 488: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVDemandCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 67, 489, 21); + } + break; + case 489: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}VoltageDifferential)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 125, 490, 21); + } + break; + case 491: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 492, 62); + } + break; + case 492: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 38, 493, 64); + } + break; + case 493: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 48, 494, 21); + } + break; + case 495: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 128, 496, 497); + } + break; + case 496: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 70, 506, 507); + } + break; + case 497: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 120, 498, 499); + } + break; + case 498: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 123, 500, 501); + case 1: + return _exiDecodeStartElement(state, se, 6, 111, 502, 503); + case 2: + return _exiDecodeStartElement(state, se, 6, 126, 504, 505); + } + break; + case 500: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 111, 502, 503); + case 1: + return _exiDecodeStartElement(state, se, 6, 126, 504, 505); + } + break; + case 502: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 126, 504, 505); + } + break; + case 506: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}CertificateInstall)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 15, 508, 509); + } + break; + case 508: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}CertificateUpdate)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 16, 510, 511); + } + break; + case 512: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 128, 513, 497); + } + break; + case 513: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 70, 514, 507); + } + break; + case 514: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 65, 515, 516); + } + break; + case 517: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 128, 518, 497); + } + break; + case 518: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 70, 519, 507); + } + break; + case 519: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 118, 520, 521); + } + break; + case 521: + /* FirstStartTag[START_ELEMENT_GENERIC] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 522, 71); + } + break; + case 523: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 104, 524, 499); + } + break; + case 525: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 526, 62); + } + break; + case 526: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 111, 527, 497); + } + break; + case 527: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 79, 528, 529); + } + break; + case 528: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCertificate), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCustom), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceInternet), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceRCS), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}v2g_Service)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 112, 533, 495); + case 1: + return _exiDecodeStartElement(state, se, 6, 114, 533, 512); + case 2: + return _exiDecodeStartElement(state, se, 6, 116, 533, 517); + case 3: + return _exiDecodeStartElement(state, se, 6, 121, 533, 534); + case 4: + return _exiDecodeStartElement(state, se, 6, 124, 533, 538); + case 5: + return _exiDecodeStartElement(state, se, 5, 130, 533, 542); + } + break; + case 529: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 103, 530, 531); + } + break; + case 530: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 103, 532, 531); + } + break; + case 534: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 128, 535, 497); + } + break; + case 535: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 70, 536, 507); + } + break; + case 536: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 118, 537, 521); + } + break; + case 538: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 128, 539, 497); + } + break; + case 539: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 70, 540, 507); + } + break; + case 540: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 118, 541, 521); + } + break; + case 542: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 128, 543, 497); + } + break; + case 543: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 70, 544, 507); + } + break; + case 545: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 110, 546, 505); + case 1: + return _exiDecodeStartElement(state, se, 5, 112, 547, 503); + } + break; + case 546: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 112, 547, 503); + } + break; + case 548: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 549, 62); + } + break; + case 549: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 79, 550, 529); + } + break; + case 550: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeService)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 20, 551, 512); + } + break; + case 551: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 105, 552, 553); + } + break; + case 553: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 554, 497); + } + break; + case 554: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 555, 497); + } + break; + case 555: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 556, 497); + } + break; + case 556: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 557, 497); + } + break; + case 557: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 558, 497); + } + break; + case 558: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 559, 497); + } + break; + case 559: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 560, 497); + } + break; + case 560: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 561, 497); + } + break; + case 561: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 562, 497); + } + break; + case 562: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 563, 497); + } + break; + case 563: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 564, 497); + } + break; + case 564: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 565, 497); + } + break; + case 565: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 566, 497); + } + break; + case 566: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 567, 497); + } + break; + case 567: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 568, 497); + } + break; + case 568: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 569, 497); + } + break; + case 569: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 570, 497); + } + break; + case 570: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 571, 497); + } + break; + case 571: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 572, 497); + } + break; + case 572: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 573, 497); + } + break; + case 573: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 574, 497); + } + break; + case 574: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 575, 497); + } + break; + case 575: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 576, 497); + } + break; + case 576: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 577, 497); + } + break; + case 577: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 578, 497); + } + break; + case 578: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 579, 497); + } + break; + case 579: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 580, 497); + } + break; + case 580: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 581, 497); + } + break; + case 581: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 582, 497); + } + break; + case 582: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 583, 497); + } + break; + case 583: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 584, 497); + } + break; + case 584: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 110, 585, 497); + } + break; + case 586: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 95, 587, 531); + } + break; + case 587: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 105, 588, 553); + } + break; + case 589: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 590, 62); + } + break; + case 591: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 68, 592, 295); + } + break; + case 593: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 594, 62); + } + break; + case 594: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 41, 595, 297); + } + break; + case 595: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 118, 596, 17); + } + break; + case 597: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 4, 52, 599, 600); + } + break; + case 598: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 52, 599, 600); + } + break; + case 599: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 50, 610, 611); + } + break; + case 600: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 4, 0, 602, 68); + } + break; + case 601: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 0, 602, 68); + } + break; + case 602: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 43, 603, 604); + } + break; + case 603: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 34, 609, 286); + } + break; + case 605: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 11, 606, 607); + case 1: + return _exiDecodeStartElement(state, se, -1, -1, 606, 71); + } + break; + case 606: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 606, 71); + } + break; + case 608: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 11, 606, 607); + case 1: + return _exiDecodeStartElement(state, se, -1, -1, 606, 71); + } + break; + case 609: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 34, 609, 286); + } + break; + case 610: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 14, 613, 232); + case 1: + return _exiDecodeStartElement(state, se, 4, 23, 613, 331); + } + break; + case 613: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 23, 613, 331); + } + break; + case 614: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 4, 47, 616, 617); + } + break; + case 615: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 47, 616, 617); + } + break; + case 616: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 47, 616, 617); + } + break; + case 619: + /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 620, 71); + } + break; + case 620: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 620, 71); + } + break; + case 621: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 620, 71); + } + break; + case 622: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 39, 623, 51); + } + break; + case 624: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 625, 62); + } + break; + case 625: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 48, 626, 21); + } + break; + case 627: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 7, 4, 628, 629); + } + break; + case 628: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 7, 0, 645, 646); + } + break; + case 629: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionInformation)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 8, 3, 630, 631); + } + break; + case 630: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Security), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 8, 1, 636, 637); + case 1: + return _exiDecodeStartElement(state, se, 8, 2, 642, 643); + } + break; + case 631: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 132, 632, 299); + } + break; + case 632: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 127, 633, 299); + case 1: + return _exiDecodeStartElement(state, se, 6, 107, 634, 635); + } + break; + case 633: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 107, 634, 635); + } + break; + case 636: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Security), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 8, 2, 642, 643); + } + break; + case 637: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 67, 638, 639); + case 1: + return _exiDecodeStartElement(state, se, 6, 68, 640, 641); + } + break; + case 638: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 68, 640, 641); + } + break; + case 643: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 42, 644, 597); + } + break; + case 646: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 7, 2, 647, 48); + case 1: + return _exiDecodeStartElement(state, se, 5, 3, 647, 49); + case 2: + return _exiDecodeStartElement(state, se, 5, 5, 647, 60); + case 3: + return _exiDecodeStartElement(state, se, 5, 7, 647, 73); + case 4: + return _exiDecodeStartElement(state, se, 5, 9, 647, 76); + case 5: + return _exiDecodeStartElement(state, se, 5, 11, 647, 91); + case 6: + return _exiDecodeStartElement(state, se, 5, 13, 647, 95); + case 7: + return _exiDecodeStartElement(state, se, 5, 16, 647, 105); + case 8: + return _exiDecodeStartElement(state, se, 5, 18, 647, 121); + case 9: + return _exiDecodeStartElement(state, se, 5, 23, 647, 177); + case 10: + return _exiDecodeStartElement(state, se, 5, 25, 647, 180); + case 11: + return _exiDecodeStartElement(state, se, 5, 33, 647, 182); + case 12: + return _exiDecodeStartElement(state, se, 5, 35, 647, 197); + case 13: + return _exiDecodeStartElement(state, se, 5, 52, 647, 277); + case 14: + return _exiDecodeStartElement(state, se, 5, 54, 647, 280); + case 15: + return _exiDecodeStartElement(state, se, 5, 57, 647, 293); + case 16: + return _exiDecodeStartElement(state, se, 5, 59, 647, 318); + case 17: + return _exiDecodeStartElement(state, se, 5, 61, 647, 321); + case 18: + return _exiDecodeStartElement(state, se, 5, 63, 647, 323); + case 19: + return _exiDecodeStartElement(state, se, 5, 75, 647, 338); + case 20: + return _exiDecodeStartElement(state, se, 5, 77, 647, 341); + case 21: + return _exiDecodeStartElement(state, se, 5, 80, 647, 345); + case 22: + return _exiDecodeStartElement(state, se, 5, 82, 647, 482); + case 23: + return _exiDecodeStartElement(state, se, 5, 84, 647, 485); + case 24: + return _exiDecodeStartElement(state, se, 5, 86, 647, 491); + case 25: + return _exiDecodeStartElement(state, se, 5, 96, 647, 523); + case 26: + return _exiDecodeStartElement(state, se, 5, 98, 647, 525); + case 27: + return _exiDecodeStartElement(state, se, 5, 100, 647, 545); + case 28: + return _exiDecodeStartElement(state, se, 5, 102, 647, 548); + case 29: + return _exiDecodeStartElement(state, se, 5, 106, 647, 586); + case 30: + return _exiDecodeStartElement(state, se, 5, 108, 647, 589); + case 31: + return _exiDecodeStartElement(state, se, 5, 114, 647, 591); + case 32: + return _exiDecodeStartElement(state, se, 5, 116, 647, 593); + case 33: + return _exiDecodeStartElement(state, se, 5, 121, 647, 622); + case 34: + return _exiDecodeStartElement(state, se, 5, 123, 647, 624); + case 35: + return _exiDecodeStartElement(state, se, 5, 126, 647, 648); + case 36: + return _exiDecodeStartElement(state, se, 5, 128, 647, 650); + } + break; + case 648: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 39, 649, 51); + } + break; + case 650: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 93, 651, 62); + } + break; + case 651: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 38, 652, 64); + } + break; + case 652: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 48, 653, 21); + } + break; + case 654: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, -1, -1, 654, 71); + } + break; + case 689: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 128, 543, 497); + } + break; + case 702: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, -1, -1, 308, 71); + } break; default: - return -1; + return EXI_ERROR_UNEXPECTED_START_ELEMENT; } - return -1; + return EXI_ERROR_UNEXPECTED_START_ELEMENT; } -int exiDecodeStartElementGeneric(bitstream_t* stream, exi_state_t* state, - eqname_t* se) { - switch (state->grammarStack[state->stackIndex]) { -/* $EXI_DECODE_START_ELEMENT_GENERIC$ */ - default: - return -1; + +static int _exiDecodeNamespaceUri(bitstream_t* stream, exi_name_table_prepopulated_t* nameTable, exi_name_table_runtime_t* runtimeTable, + string_ascii_t* namespaceURI, uint32_t* uriID) { + uint16_t uriSize, uriCodingLength; + int errn; + + errn = exiGetUriSize(nameTable, runtimeTable, &uriSize); + if (errn) { + return errn; + } + /* URI Entries + 1 */ + errn = exiGetCodingLength(uriSize + 1, &uriCodingLength); + if (errn) { + return errn; } - return -1; -} + errn = decodeNBitUnsignedInteger(stream, uriCodingLength, uriID); + if (errn) { + return errn; + } -int exiDecodeEndElement(bitstream_t* stream, exi_state_t* state, - eqname_t* ee) { - /* pop item and update ahead of time element qname */ - ee->localPart = state->elementStack[state->stackIndex].localPart; - ee->namespaceURI = state->elementStack[state->stackIndex].namespaceURI; - return exiPopStack(state); -} - -int exiDecodeCharacters(bitstream_t* stream, exi_state_t* state, - exi_value_t* val) { - uint32_t xsi; - uint32_t bits; - switch (state->grammarStack[state->stackIndex]) { - case 103: - /* CHARACTERS[ENUMERATION] */ - case 169: - /* CHARACTERS[ENUMERATION] */ - case 184: - /* CHARACTERS[ENUMERATION] */ - case 208: - /* CHARACTERS[ENUMERATION] */ - case 237: - /* CHARACTERS[ENUMERATION] */ - val->type = ENUMERATION; - decodeNBitUnsignedInteger(stream, 3, &val->enumeration); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 44: - /* CHARACTERS[ENUMERATION] */ - case 64: - /* CHARACTERS[ENUMERATION] */ - case 127: - /* CHARACTERS[ENUMERATION] */ - case 150: - /* CHARACTERS[ENUMERATION] */ - case 152: - /* CHARACTERS[ENUMERATION] */ - case 176: - /* CHARACTERS[ENUMERATION] */ - case 214: - /* CHARACTERS[ENUMERATION] */ - case 241: - /* CHARACTERS[ENUMERATION] */ - val->type = ENUMERATION; - decodeNBitUnsignedInteger(stream, 1, &val->enumeration); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 80: - /* CHARACTERS[INTEGER_32] */ - /* xsi:type OR xsi:nil */ - decodeNBitUnsignedInteger(stream, 1, &xsi); - val->type = INTEGER_32; - decodeInteger32(stream, &val->int32); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 82: - /* CHARACTERS[ENUMERATION] */ - case 134: - /* CHARACTERS[ENUMERATION] */ - case 163: - /* CHARACTERS[ENUMERATION] */ - case 180: - /* CHARACTERS[ENUMERATION] */ - case 204: - /* CHARACTERS[ENUMERATION] */ - case 231: - /* CHARACTERS[ENUMERATION] */ - val->type = ENUMERATION; - decodeNBitUnsignedInteger(stream, 2, &val->enumeration); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 90: - /* CHARACTERS[STRING] */ - case 94: - /* CHARACTERS[STRING] */ - case 105: - /* CHARACTERS[STRING] */ - case 137: - /* CHARACTERS[STRING] */ - case 144: - /* CHARACTERS[STRING] */ - case 161: - /* CHARACTERS[STRING] */ - case 182: - /* CHARACTERS[STRING] */ - case 199: - /* CHARACTERS[STRING] */ - case 229: - /* CHARACTERS[STRING] */ - val->type = STRING; - decodeStringValue(stream, &val->string); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 76: - /* CHARACTERS[INTEGER_16] */ - case 70: - /* CHARACTERS[INTEGER_16] */ - case 147: - /* CHARACTERS[INTEGER_16] */ - val->type = INTEGER_16; - decodeInteger32(stream, &val->int32); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 78: - /* CHARACTERS[ENUMERATION] */ - val->type = ENUMERATION; - decodeNBitUnsignedInteger(stream, 5, &val->enumeration); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 118: - /* CHARACTERS[UNSIGNED_INTEGER_32] */ - val->type = UNSIGNED_INTEGER_32; - decodeUnsignedInteger32(stream, &val->uint32); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 37: - /* CHARACTERS[BOOLEAN] */ - case 39: - /* CHARACTERS[BOOLEAN] */ - case 48: - /* CHARACTERS[BOOLEAN] */ - case 52: - /* CHARACTERS[BOOLEAN] */ - case 54: - /* CHARACTERS[BOOLEAN] */ - val->type = BOOLEAN; - decodeBoolean(stream, &val->boolean); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 41: - /* CHARACTERS[BOOLEAN] */ - case 59: - /* CHARACTERS[BOOLEAN] */ - case 61: - /* CHARACTERS[BOOLEAN] */ - /* xsi:type OR xsi:nil */ - decodeNBitUnsignedInteger(stream, 1, &xsi); - val->type = BOOLEAN; - decodeBoolean(stream, &val->boolean); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 56: - /* CHARACTERS[INTEGER_32] */ - val->type = INTEGER_32; - decodeInteger32(stream, &val->int32); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 233: - /* CHARACTERS[STRING] */ - /* xsi:type OR xsi:nil */ - decodeNBitUnsignedInteger(stream, 1, &xsi); - val->type = STRING; - decodeStringValue(stream, &val->string); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 154: - /* CHARACTERS[BINARY_HEX] */ - case 197: - /* CHARACTERS[BINARY_HEX] */ - case 226: - /* CHARACTERS[BINARY_HEX] */ - val->type = BINARY_HEX; - decodeBinary(stream, &val->binary); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - - default: - return -1; + if (*uriID == 0) { + /* uri string value was not found */ + /* ==> zero (0) as an n-nit unsigned integer */ + /* followed by uri encoded as string */ + decodeStringASCII(stream, namespaceURI); + /* after encoding string value is added to table */ + errn = exiAddUri(nameTable, runtimeTable, namespaceURI->chars); + if (errn) { + return errn; + } + *uriID = uriSize; + } else { + /* uri string value found */ + /* ==> value(i+1) is encoded as n-bit unsigned integer */ + *uriID = *uriID - 1; } return 0; } +static int _exiDecodeLocalName(bitstream_t* stream, exi_name_table_prepopulated_t* nameTable, exi_name_table_runtime_t* runtimeTable, + string_ascii_t* localName, + uint32_t* localNameID, uint32_t uriID) { + uint16_t slen; + uint16_t localNameSize; + uint16_t localNameCodingLength; + + + int errn = decodeUnsignedInteger16(stream, &slen); + if (errn) { + return errn; + } + + if (slen > 0) { + /* string value was not found in local partition */ + /* ==> string literal is encoded as a String */ + /* with the length of the string incremented by one */ + if (slen-- >= localName->size) { + return EXI_ERROR_OUT_OF_BOUNDS; + } + errn = decodeCharactersASCII(stream, slen, localName->chars); + if (errn) { + return errn; + } + /* After encoding the string value, it is added to the string table */ + /* partition and assigned the next available compact identifier */ + errn = exiAddLocalName(nameTable, runtimeTable, uriID, localName->chars); + if (errn) { + return errn; + } + /* TODO UCD Profile */ + /* qname = addLocalName(localName, uriID); */ + } else { + /* string value found in local partition */ + /* ==> string value is represented as zero (0) encoded as an */ + /* Unsigned Integer */ + /* followed by an the compact identifier of the string value as an */ + /* n-bit unsigned integer */ + /* n is log2 m and m is the number of entries in the string table */ + /* partition */ + errn = exiGetLocalNameSize(nameTable, runtimeTable, uriID, &localNameSize); + if (errn) { + return errn; + } + errn = exiGetCodingLength(localNameSize, &localNameCodingLength); + if (errn) { + return errn; + } + errn = decodeNBitUnsignedInteger(stream, localNameCodingLength, localNameID); + if (errn) { + return errn; + } + } + + return 0; +} + +static int _exiDecodeQName(bitstream_t* stream, exi_name_table_prepopulated_t* nameTable, exi_name_table_runtime_t* runtimeTable, + qname_t* qname) { + uint32_t uriID; + uint32_t localNameID; + /* const char * clocalName; */ + + /* uri */ + int errn =_exiDecodeNamespaceUri(stream, nameTable, runtimeTable, &qname->namespaceURI, &uriID); + if (errn) { + return errn; + } + /* localName */ + errn = _exiDecodeLocalName(stream, nameTable, runtimeTable, &qname->localName, &localNameID, uriID); + if (errn) { + return errn; + } + + /* + errn = exiGetLocalName(nameTable, runtimeTable, uriID, localNameID, &clocalName); + if (errn) { + return errn; + } + strcpy ( qname->localName.chars, clocalName ); + */ + + return 0 ; +} + +int exiDecodeStartElementGeneric(bitstream_t* stream, exi_state_t* state, + qname_t* qname) { + /* decode qname */ + int errn = _exiDecodeQName(stream, &(state->nameTablePrepopulated), &(state->nameTableRuntime), qname); + if (errn) { + return errn; + } + + switch (state->grammarStack[state->stackIndex]) { + /* $EXI_DECODE_START_ELEMENT_GENERIC$ */ + case DOC_CONTENT: + /* move on to DocEnd */ + state->grammarStack[state->stackIndex] = DOC_END; + /* push new ur-type grammar on stack */ + return exiPushStack(state, UR_TYPE_GRAMMAR_0, NULL); + break; + case UR_TYPE_GRAMMAR_0: + /* move on to UR_TYPE_GRAMMAR_1 */ + state->grammarStack[state->stackIndex] = UR_TYPE_GRAMMAR_1; + /* push new ur-type grammar on stack */ + return exiPushStack(state, UR_TYPE_GRAMMAR_0, NULL); + break; + case UR_TYPE_GRAMMAR_1: + /* remain in UR_TYPE_GRAMMAR_1 */ + /* push new ur-type grammar on stack */ + return exiPushStack(state, UR_TYPE_GRAMMAR_0, NULL); + break; + default: + return EXI_ERROR_UNEXPECTED_START_ELEMENT_GENERIC; + } + + return EXI_ERROR_UNEXPECTED_START_ELEMENT_GENERIC; +} + +int exiDecodeEndElement(bitstream_t* stream, exi_state_t* state, eqname_t* ee) { + /* copy IDs */ + ee->localPart = state->elementStack[state->stackIndex].localPart; + ee->namespaceURI = state->elementStack[state->stackIndex].namespaceURI; + + return exiPopStack(state); +} + +int exiDecodeEndElementUndeclared(bitstream_t* stream, exi_state_t* state, eqname_t* ee) { + int16_t currentID = state->grammarStack[state->stackIndex]; + if (currentID < 0) { + /* runtime grammars do have IDs smaller than 0 */ + /* TODO learn EE event */ + return -1; + } + + return exiDecodeEndElement(stream, state, ee); +} + +int exiDecodeCharacters(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + switch (state->grammarStack[state->stackIndex]) { + case 692: + /* DATETIME */ + val->type = DATETIME; + errn = decodeDateTime(stream, gMonthDay, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 619: + /* STRING */ + case 621: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 621; + return 0; + case 658: + /* NBIT_UNSIGNED_INTEGER */ + val->type = NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 8, &bits); + val->integer.val.uint8 = bits + 0; + val->integer.type = UNSIGNED_INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 250: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 250; + return 0; + case 32: + /* NBIT_UNSIGNED_INTEGER */ + val->type = NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 3, &bits); + val->integer.val.int8 = bits + 1; + val->integer.type = INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 227: + /* STRING */ + case 229: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 229; + return 0; + case 7: + /* BOOLEAN */ + case 11: + /* BOOLEAN */ + case 13: + /* BOOLEAN */ + case 15: + /* BOOLEAN */ + case 19: + /* BOOLEAN */ + case 55: + /* BOOLEAN */ + case 189: + /* BOOLEAN */ + case 191: + /* BOOLEAN */ + case 203: + /* BOOLEAN */ + case 205: + /* BOOLEAN */ + case 207: + /* BOOLEAN */ + case 214: + /* BOOLEAN */ + case 216: + /* BOOLEAN */ + case 507: + /* BOOLEAN */ + case 509: + /* BOOLEAN */ + case 511: + /* BOOLEAN */ + case 704: + /* BOOLEAN */ + val->type = BOOLEAN; + errn = decodeBoolean(stream, &val->boolean); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 670: + /* DECIMAL */ + val->type = DECIMAL; + errn = decodeDecimal(stream, &val->decimal); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 59: + /* NBIT_UNSIGNED_INTEGER */ + val->type = NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 7, &bits); + val->integer.val.int8 = bits + 0; + val->integer.type = INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 703: + /* DATETIME */ + val->type = DATETIME; + errn = decodeDateTime(stream, time, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 657: + /* LIST */ + case 659: + /* LIST */ + case 685: + /* LIST */ + val->type = LIST; + /* List not supported properly yet */ + val->list.type = STRING; + errn = decodeUnsignedInteger16(stream, &val->list.len); + if (errn) { + return errn; + } + errn = _decodeListValues(stream, val->list.type, val->list.len); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 605: + /* STRING */ + case 608: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 608; + return 0; + case 531: + /* ENUMERATION */ + val->type = ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 1, &val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 70: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 70; + return 0; + case 25: + /* ENUMERATION */ + case 57: + /* ENUMERATION */ + case 67: + /* ENUMERATION */ + case 107: + /* ENUMERATION */ + case 516: + /* ENUMERATION */ + val->type = ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 4, &val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 606: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 606; + return 0; + case 234: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 234; + return 0; + case 75: + /* BINARY_BASE64 */ + case 85: + /* BINARY_BASE64 */ + case 88: + /* BINARY_BASE64 */ + case 99: + /* BINARY_BASE64 */ + case 219: + /* BINARY_BASE64 */ + case 230: + /* BINARY_BASE64 */ + case 260: + /* BINARY_BASE64 */ + case 262: + /* BINARY_BASE64 */ + case 263: + /* BINARY_BASE64 */ + case 266: + /* BINARY_BASE64 */ + case 268: + /* BINARY_BASE64 */ + case 270: + /* BINARY_BASE64 */ + case 273: + /* BINARY_BASE64 */ + case 315: + /* BINARY_BASE64 */ + case 612: + /* BINARY_BASE64 */ + case 611: + /* BINARY_BASE64 */ + case 671: + /* BINARY_BASE64 */ + case 677: + /* BINARY_BASE64 */ + case 680: + /* BINARY_BASE64 */ + val->type = BINARY_BASE64; + errn = decodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 17: + /* INTEGER */ + case 27: + /* INTEGER */ + case 132: + /* INTEGER */ + case 142: + /* INTEGER */ + case 259: + /* INTEGER */ + case 310: + /* INTEGER */ + case 607: + /* INTEGER */ + case 660: + /* INTEGER */ + case 662: + /* INTEGER */ + case 669: + /* INTEGER */ + case 683: + /* INTEGER */ + case 695: + /* INTEGER */ + case 708: + /* INTEGER */ + val->type = INTEGER; + errn = decodeInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 128: + /* ENUMERATION */ + val->type = ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 8, &val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 690: + /* FLOAT */ + case 706: + /* FLOAT */ + val->type = FLOAT; + errn = decodeFloat(stream, &val->float_me); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 335: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 335; + return 0; + case 620: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 620; + return 0; + case 69: + /* STRING */ + case 72: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 72; + return 0; + case 684: + /* DATETIME */ + val->type = DATETIME; + errn = decodeDateTime(stream, gMonth, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 23: + /* NBIT_UNSIGNED_INTEGER */ + val->type = NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 3, &bits); + val->integer.val.int8 = bits + -3; + val->integer.type = INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 639: + /* ENUMERATION */ + val->type = ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 2, &val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 308: + /* STRING */ + case 307: + /* STRING */ + case 702: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 308; + return 0; + case 710: + /* DATETIME */ + val->type = DATETIME; + errn = decodeDateTime(stream, date, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 237: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 237; + return 0; + case 672: + /* DATETIME */ + val->type = DATETIME; + errn = decodeDateTime(stream, dateTime, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 90: + /* STRING */ + case 124: + /* STRING */ + case 144: + /* STRING */ + case 179: + /* STRING */ + case 235: + /* STRING */ + case 251: + /* STRING */ + case 257: + /* STRING */ + case 261: + /* STRING */ + case 275: + /* STRING */ + case 295: + /* STRING */ + case 303: + /* STRING */ + case 501: + /* STRING */ + case 505: + /* STRING */ + case 635: + /* STRING */ + case 641: + /* STRING */ + case 661: + /* STRING */ + case 664: + /* STRING */ + case 666: + /* STRING */ + case 667: + /* STRING */ + case 668: + /* STRING */ + case 673: + /* STRING */ + case 674: + /* STRING */ + case 675: + /* STRING */ + case 687: + /* STRING */ + case 693: + /* STRING */ + case 694: + /* STRING */ + case 697: + /* STRING */ + case 700: + /* STRING */ + case 705: + /* STRING */ + case 707: + /* STRING */ + case 709: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 62: + /* ENUMERATION */ + val->type = ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 6, &val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 119: + /* NBIT_UNSIGNED_INTEGER */ + val->type = NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 4, &bits); + val->integer.val.int8 = bits + 0; + val->integer.type = INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 228: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 228; + return 0; + case 134: + /* ENUMERATION */ + case 503: + /* ENUMERATION */ + val->type = ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 3, &val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 686: + /* DATETIME */ + val->type = DATETIME; + errn = decodeDateTime(stream, gYearMonth, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 236: + /* STRING */ + case 241: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 241; + return 0; + case 233: + /* STRING */ + case 276: + /* STRING */ + case 232: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 276; + return 0; + case 104: + /* NBIT_UNSIGNED_INTEGER */ + case 676: + /* NBIT_UNSIGNED_INTEGER */ + val->type = NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 8, &bits); + val->integer.val.int8 = bits + -128; + val->integer.type = INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 249: + /* STRING */ + case 252: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 252; + return 0; + case 140: + /* UNSIGNED_INTEGER */ + case 665: + /* UNSIGNED_INTEGER */ + case 681: + /* UNSIGNED_INTEGER */ + case 688: + /* UNSIGNED_INTEGER */ + case 696: + /* UNSIGNED_INTEGER */ + case 698: + /* UNSIGNED_INTEGER */ + val->type = UNSIGNED_INTEGER; + errn = decodeUnsignedInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 654: + /* STRING */ + case 71: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 654; + return 0; + case 678: + /* DATETIME */ + val->type = DATETIME; + errn = decodeDateTime(stream, gDay, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 699: + /* DATETIME */ + val->type = DATETIME; + errn = decodeDateTime(stream, gYear, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 334: + /* STRING */ + case 336: + /* STRING */ + case 333: + /* STRING */ + case 332: + /* STRING */ + case 331: + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 336; + return 0; + case 297: + /* BINARY_HEX */ + case 299: + /* BINARY_HEX */ + case 499: + /* BINARY_HEX */ + case 682: + /* BINARY_HEX */ + val->type = BINARY_HEX; + errn = decodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + + default: + return EXI_ERROR_UNEXPECTED_CHARACTERS; + } + + return 0; +} + +int exiDecodeCharactersGeneric(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + return exiDecodeCharacters(stream, state, val); +} + +int exiDecodeCharactersGenericUndeclared(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + int errn = 0; + if (state->grammarStack[state->stackIndex] < 0) { + /* runtime grammars do have IDs smaller than 0 */ + /* TODO learn CH event */ + return -1; + } + + /* update current rule --> element content rule (if not already) */ + errn = exiMoveToElementContentRule(state); + if (errn) { + return errn; + } + + /* read content value */ + /* STRING */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + return errn; +} + + int exiDecodeAttribute(bitstream_t* stream, exi_state_t* state, eqname_t* at, exi_value_t* val) { switch (state->grammarStack[state->stackIndex]) { + case 68: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 0; + /* move on */ + state->grammarStack[state->stackIndex] = 69; + return 0; + break; + } + break; + case 226: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 0; + /* move on */ + state->grammarStack[state->stackIndex] = 227; + return 0; + break; + } + break; + case 232: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 233; + return 0; + break; + } + break; + case 242: + /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 5; + /* move on */ + state->grammarStack[state->stackIndex] = 243; + return 0; + break; + case 1: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 6; + /* move on */ + state->grammarStack[state->stackIndex] = 244; + return 0; + break; + } + break; + case 243: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 6; + /* move on */ + state->grammarStack[state->stackIndex] = 244; + return 0; + break; + } + break; + case 248: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 0; + /* move on */ + state->grammarStack[state->stackIndex] = 249; + return 0; + break; + } + break; + case 283: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 284; + return 0; + break; + } + break; + case 286: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 287; + return 0; + break; + case 1: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 5; + /* move on */ + state->grammarStack[state->stackIndex] = 288; + return 0; + break; + case 2: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 6; + /* move on */ + state->grammarStack[state->stackIndex] = 289; + return 0; + break; + } + break; + case 287: + /* StartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 5; + /* move on */ + state->grammarStack[state->stackIndex] = 288; + return 0; + break; + case 1: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 6; + /* move on */ + state->grammarStack[state->stackIndex] = 289; + return 0; + break; + } + break; + case 288: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 6; + /* move on */ + state->grammarStack[state->stackIndex] = 289; + return 0; + break; + } + break; + case 331: + /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 1; + /* move on */ + state->grammarStack[state->stackIndex] = 332; + return 0; + break; + case 1: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 333; + return 0; + break; + case 2: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 3; + /* move on */ + state->grammarStack[state->stackIndex] = 334; + return 0; + break; + } + break; + case 332: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 333; + return 0; + break; + case 1: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 3; + /* move on */ + state->grammarStack[state->stackIndex] = 334; + return 0; + break; + } + break; + case 333: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 3; + /* move on */ + state->grammarStack[state->stackIndex] = 334; + return 0; + break; + } + break; + case 597: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 598; + return 0; + break; + } + break; + case 600: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 601; + return 0; + break; + } + break; + case 604: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 0; + /* move on */ + state->grammarStack[state->stackIndex] = 605; + return 0; + break; + } + break; + case 611: + /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 612; + return 0; + break; + } + break; + case 614: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 615; + return 0; + break; + } + break; + case 617: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Target)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 618; + return 0; + break; + case 1: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 4; + /* move on */ + state->grammarStack[state->stackIndex] = 619; + return 0; + break; + } + break; + case 618: + /* StartTag[ATTRIBUTE[STRING](Target)] */ + switch(state->eventCode) { + case 0: + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 4; + /* move on */ + state->grammarStack[state->stackIndex] = 619; + return 0; + break; + } + break; default: + return EXI_ERROR_UNEXPECTED_ATTRIBUTE; + } + return EXI_ERROR_UNEXPECTED_ATTRIBUTE; +} + + + +int exiDecodeAttributeXsiNil(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + errn = decodeBoolean(stream, &val->boolean); + if (errn >= 0 && val->boolean) { + /* handle xsi:nil == true */ + errn = exiHandleXsiNilTrue(state); + } + return errn; +} + + +int exiDecodeAttributeXsiType(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + uint32_t uriID; + uint32_t localNameID; + /* uri */ + errn =_exiDecodeNamespaceUri(stream, &(state->nameTablePrepopulated), &(state->nameTableRuntime), NULL, &uriID); + if (errn) { + return errn; + } + /* localName */ + errn = _exiDecodeLocalName(stream, &(state->nameTablePrepopulated), &(state->nameTableRuntime), NULL, &localNameID, uriID); + if (errn) { + return errn; + } + + val->eqname.namespaceURI = uriID; + val->eqname.localPart = localNameID; + + /* handle xsi type cast */ + errn = exiHandleXsiType(state, &val->eqname); + + return errn; +} + +int exiDecodeAttributeGenericUndeclared(bitstream_t* stream, exi_state_t* state, + qname_t* at, exi_value_t* val) { + int errn; + int16_t currentID = state->grammarStack[state->stackIndex]; + + if (currentID < 0) { + /* TODO runtime elements */ + return -1; + } else { + /* decode qname */ + errn = _exiDecodeQName(stream, &(state->nameTablePrepopulated), &(state->nameTableRuntime), at); + if (errn) { + return errn; + } + } + + + if (currentID < 0) { + /* TODO learn AT event */ return -1; } - return -1; + + /* decode attribute value */ + val->type = STRING; + errn = decodeStringValue(stream, &val->string); + + /* we do not move forward in grammars */ + + return errn; } diff --git a/src/codec/EXIDecoder.h b/src/codec/EXIDecoder.h index 91e650e..cda8607 100644 --- a/src/codec/EXIDecoder.h +++ b/src/codec/EXIDecoder.h @@ -10,6 +10,7 @@ * 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 . @@ -18,11 +19,14 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ + + #ifdef __cplusplus extern "C" { #endif @@ -32,7 +36,7 @@ extern "C" { #include "EXITypes.h" -int exiInitDecoder(bitstream_t* stream, exi_state_t* state); +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); @@ -41,20 +45,38 @@ 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 + exiDecodeStartElement(bitstream_t* stream, exi_state_t* state, + eqname_t* se); int exiDecodeStartElementGeneric(bitstream_t* stream, exi_state_t* state, - eqname_t* se); + qname_t* qname); -int exiDecodeEndElement(bitstream_t* stream, exi_state_t* state, - eqname_t* ee); +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 exiDecodeAttribute(bitstream_t* stream, exi_state_t* state, - eqname_t* at, 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 diff --git a/src/codec/EXIEncoder.c b/src/codec/EXIEncoder.c index 12222e5..1151b8e 100644 --- a/src/codec/EXIEncoder.c +++ b/src/codec/EXIEncoder.c @@ -10,6 +10,7 @@ * 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 . @@ -18,33 +19,190 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * - *

NOTE: Code generated by EXIdizer v0.1

+ *

Code generated by EXIdizer

********************************************************************/ + + #ifndef EXI_ENCODER_C #define EXI_ENCODER_C -#include -#include -#include -#include - #include "EXITypes.h" #include "BitOutputStream.h" -#include "BitEncoderChannel.h" +#include "EncoderChannel.h" + +#include "StringTable.h" +#include "NameTableEntries.h" +#include "MethodsBag.h" #include "EXICoder.h" #include "EXIHeaderEncoder.h" + + + +/* local variables */ +uint32_t bits; +static int errn; + /* ==================================== */ -int exiInitEncoder(bitstream_t* stream, exi_state_t* state) { +/* <0 ... Error, 1 .. Not-Found, 0.. Success */ +static int _exiGet1stLevelEventCode(exi_state_t* state, exi_event_t eventType, uint16_t* resGrammarID) { + /* retrieve current grammar-rule ID */ + uint16_t grammarID = state->grammarStack[ state->stackIndex ]; + + switch(grammarID) { + case DOCUMENT: + switch(eventType) { + case START_DOCUMENT: + *resGrammarID = 0; + return 0; + default: + return 1; /* not found */ + } + break; + case DOC_CONTENT: + switch(eventType) { + /* TODO other IDs */ + case START_ELEMENT_GENERIC: + *resGrammarID = 0; + return 0; + default: + return 1; /* not found */ + } + break; + case DOC_END: + switch(eventType) { + case END_DOCUMENT: + *resGrammarID = 0; + return 0; + default: + return 1; /* not found */ + } + break; + case UR_TYPE_GRAMMAR_0: + switch(eventType) { + case ATTRIBUTE_GENERIC: + *resGrammarID = 0; + return 0; + case START_ELEMENT_GENERIC: + *resGrammarID = 1; + return 0; + case END_ELEMENT: + *resGrammarID = 2; + return 0; + case CHARACTERS_GENERIC: + *resGrammarID = 3; + return 0; + default: + return 1; /* not found */ + } + break; + case UR_TYPE_GRAMMAR_1: + switch(eventType) { + case START_ELEMENT_GENERIC: + *resGrammarID = 0; + return 0; + case END_ELEMENT: + *resGrammarID = 1; + return 0; + case CHARACTERS_GENERIC: + *resGrammarID = 2; + return 0; + default: + return 1; /* not found */ + } + break; + } + + return 1; /* not found */ +} + + +static int _exiGetEventCodeLength(exi_state_t* state, uint16_t* eventCodeLength) { + /* retrieve current grammar-rule ID */ + uint16_t grammarID = state->grammarStack[ state->stackIndex ]; + + switch(grammarID) { + /* TODO OTHER IDs */ + case DOCUMENT: + *eventCodeLength = 0; + return 0; + case DOC_CONTENT: + /* TODO other root elements */ + *eventCodeLength = IS_STRICT ? 0 : 1; + return 0; + case DOC_END: + *eventCodeLength = IS_STRICT ? 0 : 1; + return 0; + case UR_TYPE_GRAMMAR_0: + *eventCodeLength = IS_STRICT ? 4 : 5; + return 0; + case UR_TYPE_GRAMMAR_1: + *eventCodeLength = IS_STRICT ? 3 : 4; + return 0; + } + + return EXI_ERROR_UNEXPECTED_GRAMMAR_ID; +} + +static int _encodeNBitIntegerValue(bitstream_t* stream, integer_t* iv, uint16_t nbits, int32_t lowerBound) { + int errn; + uint32_t val; + switch(iv->type) { + /* Unsigned Integer */ + case UNSIGNED_INTEGER_8: + val = iv->val.int8 - lowerBound; + break; + case UNSIGNED_INTEGER_16: + val = iv->val.int16 - lowerBound; + break; + case UNSIGNED_INTEGER_32: + val = iv->val.int32 - lowerBound; + break; + case UNSIGNED_INTEGER_64: + val = iv->val.int64 - lowerBound; + break; + /* (Signed) Integer */ + case INTEGER_8: + val = iv->val.uint8 - lowerBound; + break; + case INTEGER_16: + val = iv->val.uint16 - lowerBound; + break; + case INTEGER_32: + val = iv->val.uint32 - lowerBound; + break; + case INTEGER_64: + val = iv->val.uint64 - lowerBound; + break; + } + + errn = encodeNBitUnsignedInteger(stream, nbits, val); + return errn; +} + +#define MAX_NUMBER_CHARACTERS 50 +char nameCharacters [MAX_NUMBER_CHARACTERS]; + +/* +#define MAX_NUMBER_URI 1 +#define MAX_NUMBER_LOCALNAMES 0 +char * uris [MAX_NUMBER_URI]; +exi_name_table_runtime_t nameTableRuntime = {MAX_NUMBER_URI, uris, 0}; +*/ + +int exiInitEncoder(bitstream_t* stream, exi_state_t* state, exi_name_table_runtime_t runtimeTable) { /* init grammar state */ state->stackIndex = 0; - state->grammarStack[0] = 0; + state->grammarStack[0] = DOCUMENT; + /* string tables */ + state->nameTablePrepopulated = nameTablePrepopulated; + state->nameTableRuntime = runtimeTable; /* encode header */ return writeEXIHeader(stream); } @@ -56,7 +214,7 @@ int exiEncodeStartDocument(bitstream_t* stream, exi_state_t* state) { return 0; } - return -1; + return EXI_ERROR_UNEXPECTED_START_DOCUMENT; } int exiEncodeEndDocument(bitstream_t* stream, exi_state_t* state) { @@ -65,11 +223,176 @@ int exiEncodeEndDocument(bitstream_t* stream, exi_state_t* state) { return 0; } - return -1; + return EXI_ERROR_UNEXPECTED_END_DOCUMENT; } -static int _exiEncodeStartElement(bitstream_t* stream, uint16_t nbits, uint32_t val, - exi_state_t* state, eqname_t* se, uint16_t stackId, uint16_t newState) { +static int _exiEncodeNamespaceUriID(bitstream_t* stream, exi_name_table_prepopulated_t* nameTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID) { + int errn; + uint16_t uriCodingLength; + uint16_t uriSize; + + errn = exiGetUriSize(nameTable, runtimeTable, &uriSize); + if (errn) { + return errn; + } + /* URI Entries + 1 */ + errn = exiGetCodingLength(uriSize + 1, &uriCodingLength); + if (errn) { + return errn; + } + + /* uri string value found */ + /* ==> value(i+1) is encoded as n-bit unsigned integer */ + errn = encodeNBitUnsignedInteger(stream, uriCodingLength, uriID+1); + + return errn; +} + + +static int _exiEncodeNamespaceUri(bitstream_t* stream, exi_name_table_prepopulated_t* nameTable, exi_name_table_runtime_t* runtimeTable, + char** uri, uint16_t* uriID) { + int errn; + uint16_t uriCodingLength; + uint16_t uriSize; + + errn = exiGetUriSize(nameTable, runtimeTable, &uriSize); + if (errn) { + return errn; + } + /* URI Entries + 1 */ + errn = exiGetCodingLength(uriSize + 1, &uriCodingLength); + if (errn) { + return errn; + } + + errn = exiGetUriID(nameTable, runtimeTable, *uri, uriID); + if (errn < 0) { + return errn; + } else if (errn == 1) { + /* uri string value was not found */ + /* ==> zero (0) as an n-nit unsigned integer */ + /* followed by uri encoded as string */ + errn = encodeNBitUnsignedInteger(stream, uriCodingLength, 0); + if (errn) { + return errn; + } + /* ASCII String */ + errn = encodeASCII(stream, *uri); + if (errn) { + return errn; + } + /* after encoding string value is added to table */ + /* in UCD Profile NOT */ + *uriID = uriSize; + } else { + /* uri string value found */ + /* ==> value(i+1) is encoded as n-bit unsigned integer */ + errn = encodeNBitUnsignedInteger(stream, uriCodingLength, *uriID + 1); + } + + return errn; +} + + +static int _exiEncodeLocalNameID(bitstream_t* stream, exi_name_table_prepopulated_t* nameTable, exi_name_table_runtime_t* runtimeTable, + uint16_t uriID, uint16_t localNameID) { + int errn; + uint16_t localNameSize; + uint16_t localNameCodingLength; + + /* string value found in local partition */ + /* ==> string value is represented as zero (0) encoded as an */ + errn = encodeUnsignedInteger32(stream, 0 ); + if (errn < 0) { + return errn; + } + /* Unsigned Integer followed by an the compact identifier of the */ + /* string value as an n-bit unsigned integer n is log2 m and m is */ + /* the number of entries in the string table partition */ + errn = exiGetLocalNameSize(nameTable, runtimeTable, uriID, &localNameSize); + if (errn < 0) { + return errn; + } + errn = exiGetCodingLength(localNameSize, &localNameCodingLength); + if (errn) { + return errn; + } + errn = encodeNBitUnsignedInteger(stream, localNameCodingLength, localNameID); + return errn; + +} + + +static int _exiEncodeLocalName(bitstream_t* stream, exi_name_table_prepopulated_t* nameTable, exi_name_table_runtime_t* runtimeTable, + char** localName, + uint16_t uriID) { + int errn; + uint16_t localNameID; + uint16_t localNameSize; + uint16_t localNameCodingLength; + uint32_t slen; + + /* look for localNameID */ + errn = exiGetLocalNameID(nameTable, runtimeTable, uriID, *localName, &localNameID); + if (errn < 0) { + return errn; + } + + if (errn == 1) { + /* string value was not found in local partition */ + /* ==> string literal is encoded as a String */ + /* with the length of the string incremented by one */ + slen = (uint32_t)strlen(*localName); + errn = encodeUnsignedInteger32(stream, slen + 1 ); + if (errn >= 0) { + errn = encodeASCIICharacters(stream, *localName, slen); + } + } else { + /* string value found in local partition */ + /* ==> string value is represented as zero (0) encoded as an */ + errn = encodeUnsignedInteger32(stream, 0 ); + if (errn < 0) { + return errn; + } + /* Unsigned Integer followed by an the compact identifier of the */ + /* string value as an n-bit unsigned integer n is log2 m and m is */ + /* the number of entries in the string table partition */ + errn = exiGetLocalNameSize(nameTable, runtimeTable, uriID, &localNameSize); + if (errn < 0) { + return errn; + } + errn = exiGetCodingLength(localNameSize, &localNameCodingLength); + if (errn) { + return errn; + } + errn = encodeNBitUnsignedInteger(stream, localNameCodingLength, localNameID); + } + + return errn; +} + + +static int _exiEncodeQName(bitstream_t* stream, exi_name_table_prepopulated_t* nameTable, exi_name_table_runtime_t* runtimeTable, + char** uri, char** localName) { + uint16_t uriID; + /* uri */ + int errn =_exiEncodeNamespaceUri(stream, nameTable, runtimeTable, uri, &uriID); + if (errn) { + return errn; + } + /* localName */ + errn = _exiEncodeLocalName(stream, nameTable, runtimeTable, localName, uriID); + if (errn) { + return errn; + } + + return 0 ; +} + +static int _exiEncodeStartElement(bitstream_t* stream, uint16_t nbits, + uint32_t val, exi_state_t* state, eqname_t* se, uint16_t stackId, + uint16_t newState) { + /* event-code */ int errn = encodeNBitUnsignedInteger(stream, nbits, val); if (errn) { return errn; @@ -80,1740 +403,6914 @@ static int _exiEncodeStartElement(bitstream_t* stream, uint16_t nbits, uint32_t return exiPushStack(state, newState, se); } -int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state, - eqname_t* se) { +static eqname_t eqnGeneric = {65535, 65535}; /* UNSIGNED_INT16_MAX */ + +static int _exiEncodeStartElementGeneric(bitstream_t* stream, uint16_t nbits, + uint32_t val, exi_state_t* state, char** uri, char** localName, uint16_t stackId, + uint16_t newState) { + uint16_t uriID; + /* event-code */ + int errn = encodeNBitUnsignedInteger(stream, nbits, val); + if (errn) { + return errn; + } + /* qualified name */ + errn = _exiEncodeNamespaceUri(stream, &(state->nameTablePrepopulated), &(state->nameTableRuntime), uri, &uriID); + if (errn) { + return errn; + } + errn = _exiEncodeLocalName(stream, &(state->nameTablePrepopulated), &(state->nameTableRuntime), localName, uriID); + if (errn) { + return errn; + } + + /* move on */ + state->grammarStack[state->stackIndex] = stackId; + /* push element on stack */ + return exiPushStack(state, newState, &eqnGeneric); +} + +int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state, eqname_t* se) { switch (state->grammarStack[state->stackIndex]) { - case 1: - /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), START_ELEMENT_GENERIC] */ - if ( se->localPart == 2 && se->namespaceURI == 6 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement) */ - return _exiEncodeStartElement(stream, 5, 0, state, se, 2, 3); + case 1: + /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Manifest), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStatus), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCertificate), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCustom), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceInternet), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceRCS), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperties), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({urn:iso:15118:2:2010:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}v2g_Service), START_ELEMENT_GENERIC] */ + if ( se->localPart == 0 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 7, 0, state, se, 2, 3); + } + else if ( se->localPart == 2 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 7, 1, state, se, 2, 5); + } + else if ( se->localPart == 4 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_PEVChargeParameter ) */ + return _exiEncodeStartElement(stream, 7, 2, state, se, 2, 33); + } + else if ( se->localPart == 6 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_PEVPowerDeliveryParameter ) */ + return _exiEncodeStartElement(stream, 7, 3, state, se, 2, 46); + } + else if ( se->localPart == 8 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 7, 4, state, se, 2, 35); + } + else if ( se->localPart == 2 && se->namespaceURI == 7 ) { + /* SE( {urn:iso:15118:2:2010:MsgDef}BodyElement ) */ + return _exiEncodeStartElement(stream, 7, 5, state, se, 2, 48); + } + else if ( se->localPart == 3 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CableCheckReq ) */ + return _exiEncodeStartElement(stream, 7, 6, state, se, 2, 49); + } + else if ( se->localPart == 5 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CableCheckRes ) */ + return _exiEncodeStartElement(stream, 7, 7, state, se, 2, 60); } else if ( se->localPart == 0 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq) */ - return _exiEncodeStartElement(stream, 5, 1, state, se, 2, 5); + /* SE( {http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod ) */ + return _exiEncodeStartElement(stream, 7, 8, state, se, 2, 68); } - else if ( se->localPart == 2 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes) */ - return _exiEncodeStartElement(stream, 5, 2, state, se, 2, 6); + else if ( se->localPart == 7 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq ) */ + return _exiEncodeStartElement(stream, 7, 9, state, se, 2, 73); } - else if ( se->localPart == 4 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq) */ - return _exiEncodeStartElement(stream, 5, 3, state, se, 2, 7); + else if ( se->localPart == 9 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes ) */ + return _exiEncodeStartElement(stream, 7, 10, state, se, 2, 76); } - else if ( se->localPart == 6 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes) */ - return _exiEncodeStartElement(stream, 5, 4, state, se, 2, 8); + else if ( se->localPart == 11 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq ) */ + return _exiEncodeStartElement(stream, 7, 11, state, se, 2, 91); } - else if ( se->localPart == 10 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq) */ - return _exiEncodeStartElement(stream, 5, 5, state, se, 2, 9); + else if ( se->localPart == 13 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes ) */ + return _exiEncodeStartElement(stream, 7, 12, state, se, 2, 95); } - else if ( se->localPart == 12 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes) */ - return _exiEncodeStartElement(stream, 5, 6, state, se, 2, 10); + else if ( se->localPart == 16 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq ) */ + return _exiEncodeStartElement(stream, 7, 13, state, se, 2, 105); } - else if ( se->localPart == 28 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq) */ - return _exiEncodeStartElement(stream, 5, 7, state, se, 2, 11); + else if ( se->localPart == 18 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes ) */ + return _exiEncodeStartElement(stream, 7, 14, state, se, 2, 121); } - else if ( se->localPart == 30 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes) */ - return _exiEncodeStartElement(stream, 5, 8, state, se, 2, 12); + else if ( se->localPart == 23 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq ) */ + return _exiEncodeStartElement(stream, 7, 15, state, se, 2, 177); } - else if ( se->localPart == 33 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq) */ - return _exiEncodeStartElement(stream, 5, 9, state, se, 2, 13); + else if ( se->localPart == 25 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes ) */ + return _exiEncodeStartElement(stream, 7, 16, state, se, 2, 180); } - else if ( se->localPart == 35 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes) */ - return _exiEncodeStartElement(stream, 5, 10, state, se, 2, 14); + else if ( se->localPart == 33 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CurrentDemandReq ) */ + return _exiEncodeStartElement(stream, 7, 17, state, se, 2, 182); } - else if ( se->localPart == 37 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq) */ - return _exiEncodeStartElement(stream, 5, 11, state, se, 2, 15); + else if ( se->localPart == 35 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CurrentDemandRes ) */ + return _exiEncodeStartElement(stream, 7, 18, state, se, 2, 197); } - else if ( se->localPart == 39 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes) */ - return _exiEncodeStartElement(stream, 5, 12, state, se, 2, 16); + else if ( se->localPart == 25 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 7, 19, state, se, 2, 165); + } + else if ( se->localPart == 27 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 7, 20, state, se, 2, 64); + } + else if ( se->localPart == 30 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVChargeParameter ) */ + return _exiEncodeStartElement(stream, 7, 21, state, se, 2, 109); + } + else if ( se->localPart == 32 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVPowerDeliveryParameter ) */ + return _exiEncodeStartElement(stream, 7, 22, state, se, 2, 211); + } + else if ( se->localPart == 35 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 7, 23, state, se, 2, 51); + } + else if ( se->localPart == 3 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DSAKeyValue ) */ + return _exiEncodeStartElement(stream, 7, 24, state, se, 2, 217); + } + else if ( se->localPart == 5 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestMethod ) */ + return _exiEncodeStartElement(stream, 7, 25, state, se, 2, 226); + } + else if ( se->localPart == 7 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestValue ) */ + return _exiEncodeStartElement(stream, 7, 26, state, se, 2, 230); + } + else if ( se->localPart == 44 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 7, 27, state, se, 2, 176); + } + else if ( se->localPart == 61 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus ) */ + return _exiEncodeStartElement(stream, 7, 28, state, se, 2, 231); + } + else if ( se->localPart == 14 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyInfo ) */ + return _exiEncodeStartElement(stream, 7, 29, state, se, 2, 232); + } + else if ( se->localPart == 16 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyName ) */ + return _exiEncodeStartElement(stream, 7, 30, state, se, 2, 235); + } + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyValue ) */ + return _exiEncodeStartElement(stream, 7, 31, state, se, 2, 236); + } + else if ( se->localPart == 52 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}LineLockReq ) */ + return _exiEncodeStartElement(stream, 7, 32, state, se, 2, 277); + } + else if ( se->localPart == 54 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}LineLockRes ) */ + return _exiEncodeStartElement(stream, 7, 33, state, se, 2, 280); + } + else if ( se->localPart == 19 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Manifest ) */ + return _exiEncodeStartElement(stream, 7, 34, state, se, 2, 283); + } + else if ( se->localPart == 57 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq ) */ + return _exiEncodeStartElement(stream, 7, 35, state, se, 2, 293); + } + else if ( se->localPart == 59 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes ) */ + return _exiEncodeStartElement(stream, 7, 36, state, se, 2, 318); + } + else if ( se->localPart == 61 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringStatusReq ) */ + return _exiEncodeStartElement(stream, 7, 37, state, se, 2, 321); + } + else if ( se->localPart == 63 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringStatusRes ) */ + return _exiEncodeStartElement(stream, 7, 38, state, se, 2, 323); + } + else if ( se->localPart == 21 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}MgmtData ) */ + return _exiEncodeStartElement(stream, 7, 39, state, se, 2, 275); + } + else if ( se->localPart == 23 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Object ) */ + return _exiEncodeStartElement(stream, 7, 40, state, se, 2, 331); + } + else if ( se->localPart == 79 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVChargeParameter ) */ + return _exiEncodeStartElement(stream, 7, 41, state, se, 2, 120); + } + else if ( se->localPart == 92 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVPowerDeliveryParameter ) */ + return _exiEncodeStartElement(stream, 7, 42, state, se, 2, 337); + } + else if ( se->localPart == 99 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVStatus ) */ + return _exiEncodeStartElement(stream, 7, 43, state, se, 2, 317); + } + else if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPData ) */ + return _exiEncodeStartElement(stream, 7, 44, state, se, 2, 264); + } + else if ( se->localPart == 75 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq ) */ + return _exiEncodeStartElement(stream, 7, 45, state, se, 2, 338); + } + else if ( se->localPart == 77 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes ) */ + return _exiEncodeStartElement(stream, 7, 46, state, se, 2, 341); + } + else if ( se->localPart == 80 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq ) */ + return _exiEncodeStartElement(stream, 7, 47, state, se, 2, 345); + } + else if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes ) */ + return _exiEncodeStartElement(stream, 7, 48, state, se, 2, 482); + } + else if ( se->localPart == 84 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PreChargeReq ) */ + return _exiEncodeStartElement(stream, 7, 49, state, se, 2, 485); + } + else if ( se->localPart == 86 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PreChargeRes ) */ + return _exiEncodeStartElement(stream, 7, 50, state, se, 2, 491); + } + else if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RSAKeyValue ) */ + return _exiEncodeStartElement(stream, 7, 51, state, se, 2, 238); + } + else if ( se->localPart == 34 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Reference ) */ + return _exiEncodeStartElement(stream, 7, 52, state, se, 2, 286); + } + else if ( se->localPart == 36 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RetrievalMethod ) */ + return _exiEncodeStartElement(stream, 7, 53, state, se, 2, 242); + } + else if ( se->localPart == 38 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKIData ) */ + return _exiEncodeStartElement(stream, 7, 54, state, se, 2, 271); + } + else if ( se->localPart == 112 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceCertificate ) */ + return _exiEncodeStartElement(stream, 7, 55, state, se, 2, 495); + } + else if ( se->localPart == 114 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge ) */ + return _exiEncodeStartElement(stream, 7, 56, state, se, 2, 512); + } + else if ( se->localPart == 116 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceCustom ) */ + return _exiEncodeStartElement(stream, 7, 57, state, se, 2, 517); + } + else if ( se->localPart == 96 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDetailReq ) */ + return _exiEncodeStartElement(stream, 7, 58, state, se, 2, 523); + } + else if ( se->localPart == 98 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDetailRes ) */ + return _exiEncodeStartElement(stream, 7, 59, state, se, 2, 525); + } + else if ( se->localPart == 100 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq ) */ + return _exiEncodeStartElement(stream, 7, 60, state, se, 2, 545); + } + else if ( se->localPart == 102 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes ) */ + return _exiEncodeStartElement(stream, 7, 61, state, se, 2, 548); + } + else if ( se->localPart == 121 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceInternet ) */ + return _exiEncodeStartElement(stream, 7, 62, state, se, 2, 534); + } + else if ( se->localPart == 106 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq ) */ + return _exiEncodeStartElement(stream, 7, 63, state, se, 2, 586); + } + else if ( se->localPart == 108 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes ) */ + return _exiEncodeStartElement(stream, 7, 64, state, se, 2, 589); + } + else if ( se->localPart == 124 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceRCS ) */ + return _exiEncodeStartElement(stream, 7, 65, state, se, 2, 538); + } + else if ( se->localPart == 114 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionSetupReq ) */ + return _exiEncodeStartElement(stream, 7, 66, state, se, 2, 591); + } + else if ( se->localPart == 116 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionSetupRes ) */ + return _exiEncodeStartElement(stream, 7, 67, state, se, 2, 593); + } + else if ( se->localPart == 42 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Signature ) */ + return _exiEncodeStartElement(stream, 7, 68, state, se, 2, 597); + } + else if ( se->localPart == 43 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignatureMethod ) */ + return _exiEncodeStartElement(stream, 7, 69, state, se, 2, 604); + } + else if ( se->localPart == 45 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignatureProperties ) */ + return _exiEncodeStartElement(stream, 7, 70, state, se, 2, 614); + } + else if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignatureProperty ) */ + return _exiEncodeStartElement(stream, 7, 71, state, se, 2, 617); + } + else if ( se->localPart == 50 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignatureValue ) */ + return _exiEncodeStartElement(stream, 7, 72, state, se, 2, 611); } else if ( se->localPart == 52 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq) */ - return _exiEncodeStartElement(stream, 5, 13, state, se, 2, 17); + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignedInfo ) */ + return _exiEncodeStartElement(stream, 7, 73, state, se, 2, 600); + } + else if ( se->localPart == 121 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}TerminateChargingReq ) */ + return _exiEncodeStartElement(stream, 7, 74, state, se, 2, 622); + } + else if ( se->localPart == 123 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}TerminateChargingRes ) */ + return _exiEncodeStartElement(stream, 7, 75, state, se, 2, 624); } else if ( se->localPart == 54 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes) */ - return _exiEncodeStartElement(stream, 5, 14, state, se, 2, 18); + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transform ) */ + return _exiEncodeStartElement(stream, 7, 76, state, se, 2, 248); } else if ( se->localPart == 56 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq) */ - return _exiEncodeStartElement(stream, 5, 15, state, se, 2, 19); + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transforms ) */ + return _exiEncodeStartElement(stream, 7, 77, state, se, 2, 246); } - else if ( se->localPart == 58 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes) */ - return _exiEncodeStartElement(stream, 5, 16, state, se, 2, 20); + else if ( se->localPart == 5 && se->namespaceURI == 7 ) { + /* SE( {urn:iso:15118:2:2010:MsgDef}V2G_Message ) */ + return _exiEncodeStartElement(stream, 7, 78, state, se, 2, 627); + } + else if ( se->localPart == 126 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq ) */ + return _exiEncodeStartElement(stream, 7, 79, state, se, 2, 648); + } + else if ( se->localPart == 128 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes ) */ + return _exiEncodeStartElement(stream, 7, 80, state, se, 2, 650); } else if ( se->localPart == 60 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq) */ - return _exiEncodeStartElement(stream, 5, 17, state, se, 2, 21); + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Data ) */ + return _exiEncodeStartElement(stream, 7, 81, state, se, 2, 253); } - else if ( se->localPart == 62 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes) */ - return _exiEncodeStartElement(stream, 5, 18, state, se, 2, 22); + else if ( se->localPart == 130 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}v2g_Service ) */ + return _exiEncodeStartElement(stream, 7, 82, state, se, 2, 542); } - else if ( se->localPart == 67 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq) */ - return _exiEncodeStartElement(stream, 5, 19, state, se, 2, 23); + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 7, 83, state, se, 2, 71); } - else if ( se->localPart == 69 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes) */ - return _exiEncodeStartElement(stream, 5, 20, state, se, 2, 24); + break; + case 3: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + if ( se->localPart == 2 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 4, 5); } - else if ( se->localPart == 72 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq) */ - return _exiEncodeStartElement(stream, 5, 21, state, se, 2, 25); - } - else if ( se->localPart == 74 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes) */ - return _exiEncodeStartElement(stream, 5, 22, state, se, 2, 26); - } - else if ( se->localPart == 78 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq) */ - return _exiEncodeStartElement(stream, 5, 23, state, se, 2, 27); - } - else if ( se->localPart == 80 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes) */ - return _exiEncodeStartElement(stream, 5, 24, state, se, 2, 28); - } - else if ( se->localPart == 85 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq) */ - return _exiEncodeStartElement(stream, 5, 25, state, se, 2, 29); - } - else if ( se->localPart == 87 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes) */ - return _exiEncodeStartElement(stream, 5, 26, state, se, 2, 30); - } - else if ( se->localPart == 5 && se->namespaceURI == 6 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}V2G_Message) */ - return _exiEncodeStartElement(stream, 5, 27, state, se, 2, 31); - } - else if ( se->localPart == 90 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq) */ - return _exiEncodeStartElement(stream, 5, 28, state, se, 2, 32); - } - else if ( se->localPart == 92 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes) */ - return _exiEncodeStartElement(stream, 5, 29, state, se, 2, 33); + break; + case 4: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage)] */ + if ( se->localPart == 50 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 20, 21); } break; case 5: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 34, 35); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby)] */ + if ( se->localPart == 60 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 6, 7); } break; case 6: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 43, 44); - } - break; - case 7: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 62, 35); - } - break; - case 8: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 81, 82); - } - break; - case 9: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 121, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + if ( se->localPart == 21 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 10, 11); } break; case 10: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 126, 127); - } - break; - case 11: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 131, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + if ( se->localPart == 104 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 12, 13); } break; case 12: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 133, 134); - } - break; - case 13: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 43 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 136, 137); - } - else if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 1, 1, state, se, 138, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + if ( se->localPart == 108 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RCD ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 14, 15); } break; case 14: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 149, 150); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + if ( se->localPart == 134 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 16, 17); } break; case 16: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 151, 152); - } - break; - case 17: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ContractID)] */ - if ( se->localPart == 9 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ContractID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 160, 161); - } - break; - case 18: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 162, 163); - } - break; - case 19: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 165, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}StopCharging)] */ + if ( se->localPart == 136 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}StopCharging ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 18, 19); } break; case 20: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 168, 169); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinVoltage)] */ + if ( se->localPart == 55 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMinVoltage ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 28, 21); } break; case 21: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 171, 35); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + if ( se->localPart == 77 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Multiplier ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 22, 23); } break; case 22: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 175, 176); - } - break; - case 23: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - if ( se->localPart == 77 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceType) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 179, 180); - } - else if ( se->localPart == 76 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 181, 182); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit)] */ + if ( se->localPart == 151 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Unit ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 24, 25); } break; case 24: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 183, 184); - } - break; - case 25: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList)] */ - if ( se->localPart == 71 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 202, 186); - } - break; - case 26: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 203, 204); - } - break; - case 27: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 43 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 205, 137); - } - else if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 1, 1, state, se, 206, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + if ( se->localPart == 152 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Value ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 26, 27); } break; case 28: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 207, 208); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent)] */ + if ( se->localPart == 48 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 29, 21); } break; case 29: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 212, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent)] */ + if ( se->localPart == 54 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 30, 21); } break; case 30: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 213, 214); - } - break; - case 31: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Header)] */ - if ( se->localPart == 4 && se->namespaceURI == 6 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Header) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 217, 218); - } - break; - case 32: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 239, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxPhases)] */ + if ( se->localPart == 49 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxPhases ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 31, 32); } break; case 33: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 240, 241); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus)] */ + if ( se->localPart == 8 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 34, 35); + } + break; + case 34: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EoC)] */ + if ( se->localPart == 66 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EoC ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 38, 17); } break; case 35: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked)] */ - if ( se->localPart == 4 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 36, 37); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + if ( se->localPart == 21 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 36, 11); } break; case 36: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby)] */ - if ( se->localPart == 0 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 38, 39); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStandby)] */ + if ( se->localPart == 98 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVStandby ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 37, 7); } break; case 38: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ReadyToCharge)] */ - if ( se->localPart == 27 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ReadyToCharge) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 40, 41); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EAmount)] */ + if ( se->localPart == 39 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EAmount ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 39, 21); + } + break; + case 39: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaxPower)] */ + if ( se->localPart == 85 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVMaxPower ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 40, 21); + } + break; + case 40: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaxPhases)] */ + if ( se->localPart == 84 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVMaxPhases ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 41, 32); + } + break; + case 41: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaxVoltage)] */ + if ( se->localPart == 86 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVMaxVoltage ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 42, 21); + } + break; + case 42: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMinVoltage)] */ + if ( se->localPart == 91 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVMinVoltage ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 43, 21); } break; case 43: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 45, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaxCurrent)] */ + if ( se->localPart == 83 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVMaxCurrent ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 44, 21); + } + break; + case 44: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMinCurrent)] */ + if ( se->localPart == 90 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVMinCurrent ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 45, 21); } break; case 46: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FatalError)] */ - if ( se->localPart == 13 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FatalError) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 47, 48); - } - break; - case 47: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEStandby)] */ - if ( se->localPart == 8 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEStandby) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 49, 39); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus)] */ + if ( se->localPart == 8 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 47, 35); } break; case 49: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked)] */ - if ( se->localPart == 4 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 50, 37); - } - break; - case 50: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}PowerSwitchClosed)] */ - if ( se->localPart == 24 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}PowerSwitchClosed) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 51, 52); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + if ( se->localPart == 39 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 50, 51); } break; case 51: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}RCD)] */ - if ( se->localPart == 26 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}RCD) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 53, 54); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStandby)] */ + if ( se->localPart == 98 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVStandby ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 52, 7); + } + break; + case 52: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + if ( se->localPart == 21 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 53, 11); } break; case 53: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ShutDownTime)] */ - if ( se->localPart == 38 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ShutDownTime) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 55, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVReady)] */ + if ( se->localPart == 96 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVReady ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 54, 55); } break; - case 55: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby)] */ - if ( se->localPart == 0 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 57, 39); + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStatusCode)] */ + if ( se->localPart == 100 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVStatusCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 56, 57); } break; - case 57: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEMalfunction)] */ - if ( se->localPart == 7 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEMalfunction) */ + case 56: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVRESSSOC)] */ + if ( se->localPart == 95 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVRESSSOC ) */ return _exiEncodeStartElement(stream, 0, 0, state, se, 58, 59); } break; - case 58: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}StopCharging)] */ - if ( se->localPart == 39 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}StopCharging) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 60, 61); + case 60: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 61, 62); } break; - case 62: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargingMode)] */ - if ( se->localPart == 8 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargingMode) */ + case 61: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + if ( se->localPart == 38 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus ) */ return _exiEncodeStartElement(stream, 0, 0, state, se, 63, 64); } break; - case 63: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EoC)] */ - if ( se->localPart == 27 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EoC) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 65, 56); + case 64: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby)] */ + if ( se->localPart == 60 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 65, 7); } break; case 65: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EAmount)] */ - if ( se->localPart == 15 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EAmount) */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + if ( se->localPart == 62 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode ) */ return _exiEncodeStartElement(stream, 0, 0, state, se, 66, 67); } break; - case 66: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPower)] */ - if ( se->localPart == 46 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPower) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 68, 67); - } - break; - case 67: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Multiplier)] */ - if ( se->localPart == 21 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Multiplier) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 75, 76); - } - break; - case 68: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPhases)] */ - if ( se->localPart == 45 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPhases) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 69, 70); - } - break; case 69: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxVoltage)] */ - if ( se->localPart == 47 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 71, 67); + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 70, 71); + } + break; + case 70: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 70, 71); } break; case 71: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinVoltage)] */ - if ( se->localPart == 49 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 72, 67); + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 654, 71); } break; case 72: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxCurrent)] */ - if ( se->localPart == 44 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 73, 67); + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 70, 71); } break; case 73: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinCurrent)] */ - if ( se->localPart == 48 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 74, 67); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + if ( se->localPart == 65 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 74, 75); } break; - case 75: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Unit)] */ - if ( se->localPart == 52 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Unit) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 77, 78); + case 76: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 77, 62); } break; case 77: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Value)] */ - if ( se->localPart == 53 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Value) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 79, 80); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( se->localPart == 31 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 78, 79); } break; - case 81: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 83, 46); + case 78: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignaturePrivateKey)] */ + if ( se->localPart == 32 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignaturePrivateKey ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 84, 85); + } + break; + case 79: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + if ( se->localPart == 13 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Certificate ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 80, 75); + } + break; + case 80: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] */ + if ( se->localPart == 137 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SubCertificates ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 81, 82); + } + break; + case 82: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + if ( se->localPart == 13 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Certificate ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 83, 75); } break; case 83: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxVoltage)] */ - if ( se->localPart == 20 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 84, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] */ + if ( se->localPart == 13 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Certificate ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 83, 75); } break; case 84: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinVoltage)] */ - if ( se->localPart == 22 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 85, 67); - } - break; - case 85: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxCurrent)] */ - if ( se->localPart == 17 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 86, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionCertChain)] */ + if ( se->localPart == 28 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractEncryptionCertChain ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 86, 79); } break; case 86: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinCurrent)] */ - if ( se->localPart == 21 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 87, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionPrivateKey)] */ + if ( se->localPart == 29 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractEncryptionPrivateKey ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 87, 88); } break; case 87: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPhases)] */ - if ( se->localPart == 18 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPhases) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 88, 70); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( se->localPart == 30 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractID ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 89, 90); } break; - case 88: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - if ( se->localPart == 26 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EnergyProvider) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 89, 90); - } - else if ( se->localPart == 84 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 91, 92); - } - break; - case 89: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - if ( se->localPart == 84 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 91, 92); + case 91: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( se->localPart == 31 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 92, 79); } break; case 92: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Currency)] */ - if ( se->localPart == 5 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Currency) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 93, 94); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionCert)] */ + if ( se->localPart == 27 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractEncryptionCert ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 93, 75); } break; case 93: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff)] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 95, 96); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( se->localPart == 30 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractID ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 94, 90); } break; case 95: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 97, 96); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 96, 62); } break; case 96: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffID)] */ - if ( se->localPart == 48 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 102, 103); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( se->localPart == 31 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 97, 79); } break; case 97: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 98, 96); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignaturePrivateKey)] */ + if ( se->localPart == 32 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignaturePrivateKey ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 98, 99); } break; case 98: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 99, 96); - } - break; - case 99: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 100, 96); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionCertChain)] */ + if ( se->localPart == 28 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractEncryptionCertChain ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 100, 79); } break; case 100: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 101, 96); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractEncryptionPrivateKey)] */ + if ( se->localPart == 29 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractEncryptionPrivateKey ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 101, 88); + } + break; + case 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( se->localPart == 30 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractID ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 102, 90); } break; case 102: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries)] */ - if ( se->localPart == 43 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffDescription) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 104, 105); - } - else if ( se->localPart == 44 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries) */ - return _exiEncodeStartElement(stream, 1, 1, state, se, 106, 107); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RetryCounter)] */ + if ( se->localPart == 94 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}RetryCounter ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 103, 104); } break; - case 104: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries)] */ - if ( se->localPart == 44 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries) */ + case 105: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVRequestedEnergyTransferType)] */ + if ( se->localPart == 73 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVRequestedEnergyTransferType ) */ return _exiEncodeStartElement(stream, 0, 0, state, se, 106, 107); } break; - case 107: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry)] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 108, 109); + case 106: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVChargeParameter)] */ + if ( se->localPart == 4 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_PEVChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 108, 33); } - break; - case 108: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 110, 109); + else if ( se->localPart == 30 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 108, 109); + } + else if ( se->localPart == 79 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 108, 120); } break; case 109: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffStart)] */ - if ( se->localPart == 50 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffStart) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 117, 118); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus)] */ + if ( se->localPart == 35 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 110, 51); } break; case 110: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 111, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumCurrentLimit)] */ + if ( se->localPart == 87 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 111, 21); } break; case 111: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 112, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumVoltageLimit)] */ + if ( se->localPart == 88 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 112, 21); + } + else if ( se->localPart == 89 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 113, 21); } break; case 112: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 113, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumVoltageLimit)] */ + if ( se->localPart == 89 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVMaximumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 113, 21); } break; case 113: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 114, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + if ( se->localPart == 81 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVEnergyCapacity ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 114, 21); + } + else if ( se->localPart == 82 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVEnergyRequest ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 115, 21); + } + else if ( se->localPart == 71 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FullSOC ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 116, 59); + } + else if ( se->localPart == 12 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}BulkSOC ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 117, 59); + } + else if ( se->localPart == 94 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 118, 119); } break; case 114: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 115, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + if ( se->localPart == 82 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVEnergyRequest ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 115, 21); + } + else if ( se->localPart == 71 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FullSOC ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 116, 59); + } + else if ( se->localPart == 12 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}BulkSOC ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 117, 59); + } + else if ( se->localPart == 94 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion ) */ + return _exiEncodeStartElement(stream, 2, 3, state, se, 118, 119); } break; case 115: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 116, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + if ( se->localPart == 71 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FullSOC ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 116, 59); + } + else if ( se->localPart == 12 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}BulkSOC ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 117, 59); + } + else if ( se->localPart == 94 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 118, 119); + } + break; + case 116: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + if ( se->localPart == 12 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}BulkSOC ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 117, 59); + } + else if ( se->localPart == 94 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 118, 119); } break; case 117: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffPMax)] */ - if ( se->localPart == 49 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffPMax) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 119, 67); - } - break; - case 119: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EPrice), END_ELEMENT] */ - if ( se->localPart == 6 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EPrice) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 120, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion)] */ + if ( se->localPart == 94 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVProtocolVersion ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 118, 119); } break; case 121: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage)] */ - if ( se->localPart == 51 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 122, 67); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 122, 62); } break; case 122: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent)] */ - if ( se->localPart == 42 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 123, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter)] */ + if ( se->localPart == 50 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EnergyProvider ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 123, 124); + } + else if ( se->localPart == 120 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}TariffTable ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 125, 126); + } + else if ( se->localPart == 0 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 164, 3); + } + else if ( se->localPart == 25 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 164, 165); + } + else if ( se->localPart == 44 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 164, 176); } break; case 123: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDifferential)] */ - if ( se->localPart == 14 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDifferential) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 124, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter)] */ + if ( se->localPart == 120 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}TariffTable ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 125, 126); + } + else if ( se->localPart == 0 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 164, 3); + } + else if ( se->localPart == 25 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 164, 165); + } + else if ( se->localPart == 44 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 3, state, se, 164, 176); } break; - case 124: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential)] */ - if ( se->localPart == 89 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 125, 67); + case 125: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter)] */ + if ( se->localPart == 0 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 164, 3); + } + else if ( se->localPart == 25 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 164, 165); + } + else if ( se->localPart == 44 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 164, 176); } break; case 126: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 128, 46); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency)] */ + if ( se->localPart == 22 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Currency ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 127, 128); } break; - case 128: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - if ( se->localPart == 24 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 129, 67); + case 127: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff)] */ + if ( se->localPart == 140 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Tariff ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 129, 130); } break; case 129: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentCurrent)] */ - if ( se->localPart == 23 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 130, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + if ( se->localPart == 140 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Tariff ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 152, 130); + } + else if ( se->localPart == 43 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 163, 25); + } + break; + case 130: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */ + if ( se->localPart == 147 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffID ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 131, 132); } break; case 131: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqLockStatus)] */ - if ( se->localPart == 64 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqLockStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 132, 37); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + if ( se->localPart == 142 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffDescription ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 133, 134); + } + else if ( se->localPart == 143 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffEntries ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 135, 136); } break; case 133: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 135, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + if ( se->localPart == 143 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffEntries ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 135, 136); } break; case 136: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 138, 35); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */ + if ( se->localPart == 145 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffEntry ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 137, 138); + } + break; + case 137: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + if ( se->localPart == 145 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 145, 138); } break; case 138: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff)] */ - if ( se->localPart == 82 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 139, 56); - } - else if ( se->localPart == 83 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff) */ - return _exiEncodeStartElement(stream, 1, 1, state, se, 140, 103); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */ + if ( se->localPart == 149 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffStart ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 139, 140); } break; case 139: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff)] */ - if ( se->localPart == 83 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 140, 103); - } - break; - case 140: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo)] */ - if ( se->localPart == 32 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo) */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffPMax)] */ + if ( se->localPart == 148 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffPMax ) */ return _exiEncodeStartElement(stream, 0, 0, state, se, 141, 142); } break; - case 142: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( se->localPart == 17 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterID) */ - return _exiEncodeStartElement(stream, 3, 0, state, se, 143, 144); - } - else if ( se->localPart == 19 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading) */ - return _exiEncodeStartElement(stream, 3, 1, state, se, 145, 67); - } - else if ( se->localPart == 20 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus) */ - return _exiEncodeStartElement(stream, 3, 2, state, se, 146, 147); - } - else if ( se->localPart == 40 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter) */ - return _exiEncodeStartElement(stream, 3, 3, state, se, 148, 56); - } - break; - case 143: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( se->localPart == 19 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 145, 67); - } - else if ( se->localPart == 20 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 146, 147); - } - else if ( se->localPart == 40 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter) */ - return _exiEncodeStartElement(stream, 2, 2, state, se, 148, 56); + case 141: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ + if ( se->localPart == 40 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPrice ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 143, 144); } break; case 145: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( se->localPart == 20 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 146, 147); - } - else if ( se->localPart == 40 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 148, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + if ( se->localPart == 145 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 146, 138); } break; case 146: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( se->localPart == 40 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 148, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + if ( se->localPart == 145 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 147, 138); } break; - case 151: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID)] */ - if ( se->localPart == 16 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 153, 154); + case 147: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + if ( se->localPart == 145 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 148, 138); + } + break; + case 148: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + if ( se->localPart == 145 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 149, 138); + } + break; + case 149: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + if ( se->localPart == 145 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 150, 138); + } + break; + case 150: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + if ( se->localPart == 145 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TariffEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 151, 138); + } + break; + case 152: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + if ( se->localPart == 140 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Tariff ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 153, 130); + } + else if ( se->localPart == 43 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 162, 25); } break; case 153: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 155, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + if ( se->localPart == 140 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Tariff ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 154, 130); + } + else if ( se->localPart == 43 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 161, 25); + } + break; + case 154: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + if ( se->localPart == 140 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Tariff ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 155, 130); + } + else if ( se->localPart == 43 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 160, 25); } break; case 155: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - if ( se->localPart == 82 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 156, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + if ( se->localPart == 140 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Tariff ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 156, 130); + } + else if ( se->localPart == 43 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 159, 25); } break; case 156: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPower)] */ - if ( se->localPart == 19 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPower) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 157, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit)] */ + if ( se->localPart == 43 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceUnit ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 157, 25); } break; case 157: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - if ( se->localPart == 41 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PCurrent) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 158, 67); - } - else if ( se->localPart == 32 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 159, 142); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + if ( se->localPart == 41 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 158, 23); } break; - case 158: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - if ( se->localPart == 32 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 159, 142); + case 159: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + if ( se->localPart == 41 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 158, 23); + } + break; + case 160: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + if ( se->localPart == 41 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 158, 23); + } + break; + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + if ( se->localPart == 41 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 158, 23); } break; case 162: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - if ( se->localPart == 82 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 164, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + if ( se->localPart == 41 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 158, 23); + } + break; + case 163: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier)] */ + if ( se->localPart == 41 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceMultiplier ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 158, 23); } break; case 165: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqSwitchStatus)] */ - if ( se->localPart == 65 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqSwitchStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 166, 52); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + if ( se->localPart == 27 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 166, 64); } break; case 166: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff), END_ELEMENT] */ - if ( se->localPart == 83 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 167, 103); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit)] */ + if ( se->localPart == 51 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 167, 21); + } + break; + case 167: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + if ( se->localPart == 52 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 168, 21); + } + else if ( se->localPart == 53 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 169, 21); } break; case 168: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 170, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + if ( se->localPart == 53 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 169, 21); + } + break; + case 169: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit)] */ + if ( se->localPart == 56 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 170, 21); + } + break; + case 170: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit)] */ + if ( se->localPart == 57 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 171, 21); } break; case 171: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage)] */ - if ( se->localPart == 51 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 172, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + if ( se->localPart == 46 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 172, 21); + } + else if ( se->localPart == 58 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 173, 21); } break; case 172: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent)] */ - if ( se->localPart == 42 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 173, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + if ( se->localPart == 58 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 173, 21); } break; case 173: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential)] */ - if ( se->localPart == 89 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 174, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEProtocolVersion)] */ + if ( se->localPart == 47 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 174, 21); + } + else if ( se->localPart == 59 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEProtocolVersion ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 175, 119); } break; - case 175: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 177, 46); + case 174: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEProtocolVersion)] */ + if ( se->localPart == 59 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEProtocolVersion ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 175, 119); } break; case 177: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - if ( se->localPart == 24 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 178, 67); + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + if ( se->localPart == 51 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}GenChallenge ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 178, 179); } break; - case 179: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - if ( se->localPart == 76 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 181, 182); + case 180: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 181, 62); + } + break; + case 182: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + if ( se->localPart == 39 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 183, 51); } break; case 183: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList), END_ELEMENT] */ - if ( se->localPart == 71 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 185, 186); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeCurrentRequest)] */ + if ( se->localPart == 15 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeCurrentRequest ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 184, 21); + } + break; + case 184: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( se->localPart == 71 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVMaximumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 185, 21); + } + else if ( se->localPart == 69 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVMaximumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 186, 21); + } + else if ( se->localPart == 70 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 187, 21); + } + else if ( se->localPart == 2 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}BulkChargingComplete ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 188, 189); + } + else if ( se->localPart == 21 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 190, 191); + } + break; + case 185: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( se->localPart == 69 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVMaximumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 186, 21); + } + else if ( se->localPart == 70 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 187, 21); + } + else if ( se->localPart == 2 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}BulkChargingComplete ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 188, 189); + } + else if ( se->localPart == 21 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 2, 3, state, se, 190, 191); } break; case 186: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service)] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 187, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( se->localPart == 70 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 187, 21); + } + else if ( se->localPart == 2 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}BulkChargingComplete ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 188, 189); + } + else if ( se->localPart == 21 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 190, 191); } break; case 187: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 189, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( se->localPart == 2 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}BulkChargingComplete ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 188, 189); + } + else if ( se->localPart == 21 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 190, 191); } break; case 188: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceID)] */ - if ( se->localPart == 30 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 196, 197); - } - break; - case 189: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 190, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( se->localPart == 21 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 190, 191); } break; case 190: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 191, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToFullSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage)] */ + if ( se->localPart == 90 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}RemainingTimeToFullSoC ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 192, 21); } - break; - case 191: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 192, 188); + else if ( se->localPart == 89 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 193, 21); + } + else if ( se->localPart == 74 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 194, 21); } break; case 192: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 193, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage)] */ + if ( se->localPart == 89 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 193, 21); + } + else if ( se->localPart == 74 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 194, 21); } break; case 193: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 194, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage)] */ + if ( se->localPart == 74 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 194, 21); } break; case 194: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 195, 188); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDifferential)] */ + if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CurrentDifferential ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 195, 21); } break; - case 196: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if ( se->localPart == 32 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceName) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 198, 199); + case 195: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}VoltageDifferential)] */ + if ( se->localPart == 125 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}VoltageDifferential ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 196, 21); } - else if ( se->localPart == 35 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 200, 180); - } - else if ( se->localPart == 33 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope) */ - return _exiEncodeStartElement(stream, 2, 2, state, se, 201, 182); + break; + case 197: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 198, 62); } break; case 198: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if ( se->localPart == 35 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 200, 180); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + if ( se->localPart == 38 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 199, 64); } - else if ( se->localPart == 33 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 201, 182); + break; + case 199: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + if ( se->localPart == 48 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 200, 21); } break; case 200: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if ( se->localPart == 33 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 201, 182); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent)] */ + if ( se->localPart == 47 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 201, 21); } break; - case 205: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 206, 35); + case 201: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved)] */ + if ( se->localPart == 40 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 202, 203); } break; - case 207: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID)] */ - if ( se->localPart == 16 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 209, 154); + case 202: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved)] */ + if ( se->localPart == 49 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 204, 205); + } + break; + case 204: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved)] */ + if ( se->localPart == 46 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 206, 207); + } + break; + case 206: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + if ( se->localPart == 45 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaximumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 208, 21); + } + else if ( se->localPart == 43 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 209, 21); + } + else if ( se->localPart == 44 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 210, 21); + } + break; + case 208: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + if ( se->localPart == 43 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 209, 21); + } + else if ( se->localPart == 44 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 210, 21); } break; case 209: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 210, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + if ( se->localPart == 44 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 210, 21); } break; - case 210: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - if ( se->localPart == 82 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 211, 56); + case 211: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus)] */ + if ( se->localPart == 35 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 212, 51); + } + break; + case 212: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + if ( se->localPart == 11 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 213, 214); + } + else if ( se->localPart == 17 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 215, 216); } break; case 213: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 215, 46); - } - break; - case 215: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - if ( se->localPart == 24 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 216, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + if ( se->localPart == 17 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 215, 216); } break; case 217: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Body)] */ - if ( se->localPart == 0 && se->namespaceURI == 6 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Body) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 219, 220); + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}P), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + if ( se->localPart == 25 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}P ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 218, 219); + } + else if ( se->localPart == 10 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}G ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 221, 219); + } + else if ( se->localPart == 69 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Y ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 222, 219); } break; case 218: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}SessionInformation)] */ - if ( se->localPart == 2 && se->namespaceURI == 7 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}SessionInformation) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 221, 222); + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q)] */ + if ( se->localPart == 31 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Q ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 220, 219); } break; case 220: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), END_ELEMENT] */ - if ( se->localPart == 2 && se->namespaceURI == 6 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement) */ - return _exiEncodeStartElement(stream, 5, 0, state, se, 238, 3); - } - else if ( se->localPart == 0 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq) */ - return _exiEncodeStartElement(stream, 5, 1, state, se, 238, 5); - } - else if ( se->localPart == 2 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes) */ - return _exiEncodeStartElement(stream, 5, 2, state, se, 238, 6); - } - else if ( se->localPart == 4 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq) */ - return _exiEncodeStartElement(stream, 5, 3, state, se, 238, 7); - } - else if ( se->localPart == 6 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes) */ - return _exiEncodeStartElement(stream, 5, 4, state, se, 238, 8); - } - else if ( se->localPart == 10 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq) */ - return _exiEncodeStartElement(stream, 5, 5, state, se, 238, 9); - } - else if ( se->localPart == 12 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes) */ - return _exiEncodeStartElement(stream, 5, 6, state, se, 238, 10); - } - else if ( se->localPart == 28 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq) */ - return _exiEncodeStartElement(stream, 5, 7, state, se, 238, 11); - } - else if ( se->localPart == 30 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes) */ - return _exiEncodeStartElement(stream, 5, 8, state, se, 238, 12); - } - else if ( se->localPart == 33 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq) */ - return _exiEncodeStartElement(stream, 5, 9, state, se, 238, 13); - } - else if ( se->localPart == 35 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes) */ - return _exiEncodeStartElement(stream, 5, 10, state, se, 238, 14); - } - else if ( se->localPart == 37 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq) */ - return _exiEncodeStartElement(stream, 5, 11, state, se, 238, 15); - } - else if ( se->localPart == 39 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes) */ - return _exiEncodeStartElement(stream, 5, 12, state, se, 238, 16); - } - else if ( se->localPart == 52 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq) */ - return _exiEncodeStartElement(stream, 5, 13, state, se, 238, 17); - } - else if ( se->localPart == 54 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes) */ - return _exiEncodeStartElement(stream, 5, 14, state, se, 238, 18); - } - else if ( se->localPart == 56 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq) */ - return _exiEncodeStartElement(stream, 5, 15, state, se, 238, 19); - } - else if ( se->localPart == 58 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes) */ - return _exiEncodeStartElement(stream, 5, 16, state, se, 238, 20); - } - else if ( se->localPart == 60 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq) */ - return _exiEncodeStartElement(stream, 5, 17, state, se, 238, 21); - } - else if ( se->localPart == 62 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes) */ - return _exiEncodeStartElement(stream, 5, 18, state, se, 238, 22); - } - else if ( se->localPart == 67 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq) */ - return _exiEncodeStartElement(stream, 5, 19, state, se, 238, 23); + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + if ( se->localPart == 10 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}G ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 221, 219); } else if ( se->localPart == 69 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes) */ - return _exiEncodeStartElement(stream, 5, 20, state, se, 238, 24); - } - else if ( se->localPart == 72 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq) */ - return _exiEncodeStartElement(stream, 5, 21, state, se, 238, 25); - } - else if ( se->localPart == 74 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes) */ - return _exiEncodeStartElement(stream, 5, 22, state, se, 238, 26); - } - else if ( se->localPart == 78 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq) */ - return _exiEncodeStartElement(stream, 5, 23, state, se, 238, 27); - } - else if ( se->localPart == 80 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes) */ - return _exiEncodeStartElement(stream, 5, 24, state, se, 238, 28); - } - else if ( se->localPart == 85 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq) */ - return _exiEncodeStartElement(stream, 5, 25, state, se, 238, 29); - } - else if ( se->localPart == 87 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes) */ - return _exiEncodeStartElement(stream, 5, 26, state, se, 238, 30); - } - else if ( se->localPart == 90 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq) */ - return _exiEncodeStartElement(stream, 5, 27, state, se, 238, 32); - } - else if ( se->localPart == 92 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes) */ - return _exiEncodeStartElement(stream, 5, 28, state, se, 238, 33); + /* SE( {http://www.w3.org/2000/09/xmldsig#}Y ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 222, 219); } break; case 221: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}Notification), END_ELEMENT] */ - if ( se->localPart == 1 && se->namespaceURI == 7 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}Notification) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 223, 224); + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + if ( se->localPart == 69 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Y ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 222, 219); } break; case 222: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}SessionID)] */ - if ( se->localPart == 36 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}SessionID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 225, 226); + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + if ( se->localPart == 13 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}J ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 223, 219); + } + else if ( se->localPart == 41 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Seed ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 224, 219); + } + break; + case 223: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + if ( se->localPart == 41 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Seed ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 224, 219); } break; case 224: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - if ( se->localPart == 14 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultCode) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 230, 231); - } - else if ( se->localPart == 15 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 232, 233); - } - else if ( se->localPart == 11 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList) */ - return _exiEncodeStartElement(stream, 2, 2, state, se, 234, 235); - } - break; - case 225: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - if ( se->localPart == 34 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceSessionID) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 227, 226); - } - else if ( se->localPart == 25 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 228, 229); + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter)] */ + if ( se->localPart == 30 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PgenCounter ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 225, 219); } break; case 227: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - if ( se->localPart == 25 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 228, 229); + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 228, 71); } break; - case 230: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - if ( se->localPart == 15 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 232, 233); + case 228: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 228, 71); } - else if ( se->localPart == 11 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 234, 235); + break; + case 229: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 228, 71); } break; case 232: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - if ( se->localPart == 11 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 234, 235); + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if ( se->localPart == 16 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyName ) */ + return _exiEncodeStartElement(stream, 4, 1, state, se, 234, 235); + } + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyValue ) */ + return _exiEncodeStartElement(stream, 4, 2, state, se, 234, 236); + } + else if ( se->localPart == 36 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RetrievalMethod ) */ + return _exiEncodeStartElement(stream, 4, 3, state, se, 234, 242); + } + else if ( se->localPart == 60 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Data ) */ + return _exiEncodeStartElement(stream, 4, 4, state, se, 234, 253); + } + else if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPData ) */ + return _exiEncodeStartElement(stream, 4, 5, state, se, 234, 264); + } + else if ( se->localPart == 38 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKIData ) */ + return _exiEncodeStartElement(stream, 4, 6, state, se, 234, 271); + } + else if ( se->localPart == 21 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}MgmtData ) */ + return _exiEncodeStartElement(stream, 4, 7, state, se, 234, 275); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 4, 8, state, se, 234, 71); } break; - case 235: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Event)] */ - if ( se->localPart == 10 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Event) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 236, 237); + case 233: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if ( se->localPart == 16 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyName ) */ + return _exiEncodeStartElement(stream, 4, 0, state, se, 234, 235); + } + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyValue ) */ + return _exiEncodeStartElement(stream, 4, 1, state, se, 234, 236); + } + else if ( se->localPart == 36 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RetrievalMethod ) */ + return _exiEncodeStartElement(stream, 4, 2, state, se, 234, 242); + } + else if ( se->localPart == 60 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Data ) */ + return _exiEncodeStartElement(stream, 4, 3, state, se, 234, 253); + } + else if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPData ) */ + return _exiEncodeStartElement(stream, 4, 4, state, se, 234, 264); + } + else if ( se->localPart == 38 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKIData ) */ + return _exiEncodeStartElement(stream, 4, 5, state, se, 234, 271); + } + else if ( se->localPart == 21 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}MgmtData ) */ + return _exiEncodeStartElement(stream, 4, 6, state, se, 234, 275); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 4, 7, state, se, 234, 71); } break; - case 240: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 242, 46); + case 234: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( se->localPart == 16 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyName ) */ + return _exiEncodeStartElement(stream, 4, 0, state, se, 234, 235); + } + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyValue ) */ + return _exiEncodeStartElement(stream, 4, 1, state, se, 234, 236); + } + else if ( se->localPart == 36 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RetrievalMethod ) */ + return _exiEncodeStartElement(stream, 4, 2, state, se, 234, 242); + } + else if ( se->localPart == 60 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Data ) */ + return _exiEncodeStartElement(stream, 4, 3, state, se, 234, 253); + } + else if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPData ) */ + return _exiEncodeStartElement(stream, 4, 4, state, se, 234, 264); + } + else if ( se->localPart == 38 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKIData ) */ + return _exiEncodeStartElement(stream, 4, 5, state, se, 234, 271); + } + else if ( se->localPart == 21 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}MgmtData ) */ + return _exiEncodeStartElement(stream, 4, 6, state, se, 234, 275); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 4, 7, state, se, 234, 71); + } + break; + case 236: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if ( se->localPart == 3 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DSAKeyValue ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 237, 217); + } + else if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RSAKeyValue ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 237, 238); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 237, 71); + } + break; + case 238: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + if ( se->localPart == 22 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Modulus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 239, 219); + } + break; + case 239: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent)] */ + if ( se->localPart == 9 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Exponent ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 240, 219); + } + break; + case 241: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if ( se->localPart == 3 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DSAKeyValue ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 237, 217); + } + else if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RSAKeyValue ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 237, 238); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 237, 71); } break; case 242: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - if ( se->localPart == 24 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 243, 67); + /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + if ( se->localPart == 56 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transforms ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 245, 246); + } + break; + case 243: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + if ( se->localPart == 56 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transforms ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 245, 246); + } + break; + case 244: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + if ( se->localPart == 56 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transforms ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 245, 246); + } + break; + case 246: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + if ( se->localPart == 54 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transform ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 247, 248); + } + break; + case 247: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), END_ELEMENT] */ + if ( se->localPart == 54 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transform ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 247, 248); + } + break; + case 249: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( se->localPart == 68 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}XPath ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 250, 251); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 250, 71); + } + break; + case 250: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( se->localPart == 68 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}XPath ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 250, 251); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 250, 71); + } + break; + case 252: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( se->localPart == 68 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}XPath ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 250, 251); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 250, 71); + } + break; + case 253: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SKI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT_GENERIC] */ + if ( se->localPart == 63 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 254, 255); + } + else if ( se->localPart == 65 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509SKI ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 254, 260); + } + else if ( se->localPart == 67 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509SubjectName ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 254, 261); + } + else if ( se->localPart == 59 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Certificate ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 254, 262); + } + else if ( se->localPart == 58 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509CRL ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 254, 263); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 5, state, se, 254, 71); + } + break; + case 254: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SKI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT_GENERIC, END_ELEMENT] */ + if ( se->localPart == 63 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 254, 255); + } + else if ( se->localPart == 65 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509SKI ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 254, 260); + } + else if ( se->localPart == 67 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509SubjectName ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 254, 261); + } + else if ( se->localPart == 59 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Certificate ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 254, 262); + } + else if ( se->localPart == 58 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509CRL ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 254, 263); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 5, state, se, 254, 71); + } + break; + case 255: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + if ( se->localPart == 62 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509IssuerName ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 256, 257); + } + break; + case 256: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber)] */ + if ( se->localPart == 66 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509SerialNumber ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 258, 259); + } + break; + case 264: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ + if ( se->localPart == 28 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPKeyID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 265, 266); + } + else if ( se->localPart == 29 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 269, 270); + } + break; + case 265: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT_GENERIC, END_ELEMENT] */ + if ( se->localPart == 29 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 267, 268); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 267, 71); + } + break; + case 267: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 267, 71); + } + break; + case 269: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 269, 71); + } + break; + case 271: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + if ( se->localPart == 40 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKISexp ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 272, 273); + } + break; + case 272: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT_GENERIC, END_ELEMENT] */ + if ( se->localPart == 40 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKISexp ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 272, 273); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 274, 71); + } + break; + case 274: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), END_ELEMENT] */ + if ( se->localPart == 40 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKISexp ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 272, 273); + } + break; + case 276: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if ( se->localPart == 16 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyName ) */ + return _exiEncodeStartElement(stream, 4, 0, state, se, 234, 235); + } + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyValue ) */ + return _exiEncodeStartElement(stream, 4, 1, state, se, 234, 236); + } + else if ( se->localPart == 36 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RetrievalMethod ) */ + return _exiEncodeStartElement(stream, 4, 2, state, se, 234, 242); + } + else if ( se->localPart == 60 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Data ) */ + return _exiEncodeStartElement(stream, 4, 3, state, se, 234, 253); + } + else if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPData ) */ + return _exiEncodeStartElement(stream, 4, 4, state, se, 234, 264); + } + else if ( se->localPart == 38 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKIData ) */ + return _exiEncodeStartElement(stream, 4, 5, state, se, 234, 271); + } + else if ( se->localPart == 21 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}MgmtData ) */ + return _exiEncodeStartElement(stream, 4, 6, state, se, 234, 275); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 4, 7, state, se, 234, 71); + } + break; + case 277: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_PEVStatus)] */ + if ( se->localPart == 1 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}AC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 278, 35); + } + break; + case 278: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus)] */ + if ( se->localPart == 91 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ReqLockStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 279, 11); + } + break; + case 280: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 281, 62); + } + break; + case 281: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + if ( se->localPart == 0 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 282, 5); + } + break; + case 283: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + if ( se->localPart == 34 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Reference ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 285, 286); + } + break; + case 284: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + if ( se->localPart == 34 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Reference ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 285, 286); + } + break; + case 285: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + if ( se->localPart == 34 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Reference ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 285, 286); + } + break; + case 286: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( se->localPart == 56 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transforms ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 290, 246); + } + else if ( se->localPart == 5 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestMethod ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 291, 226); + } + break; + case 287: + /* StartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( se->localPart == 56 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transforms ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 290, 246); + } + else if ( se->localPart == 5 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestMethod ) */ + return _exiEncodeStartElement(stream, 2, 3, state, se, 291, 226); + } + break; + case 288: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( se->localPart == 56 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transforms ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 290, 246); + } + else if ( se->localPart == 5 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestMethod ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 291, 226); + } + break; + case 289: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( se->localPart == 56 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transforms ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 290, 246); + } + else if ( se->localPart == 5 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestMethod ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 291, 226); + } + break; + case 290: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( se->localPart == 5 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestMethod ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 291, 226); + } + break; + case 291: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue)] */ + if ( se->localPart == 7 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestValue ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 292, 230); + } + break; + case 293: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + if ( se->localPart == 68 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 294, 295); + } + else if ( se->localPart == 41 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEID ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 296, 297); + } + break; + case 294: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + if ( se->localPart == 41 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEID ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 296, 297); + } + break; + case 296: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + if ( se->localPart == 113 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionID ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 298, 299); + } + break; + case 298: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + if ( se->localPart == 56 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeterInfo ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 300, 301); + } + break; + case 300: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + if ( se->localPart == 118 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}TCurrent ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 312, 17); + } + else if ( se->localPart == 119 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}Tariff ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 313, 132); + } + break; + case 301: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( se->localPart == 72 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterID ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 302, 303); + } + else if ( se->localPart == 74 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 304, 85); + } + else if ( se->localPart == 75 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterReading ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 305, 21); + } + else if ( se->localPart == 135 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 306, 307); + } + else if ( se->localPart == 76 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterStatus ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 309, 310); + } + else if ( se->localPart == 139 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TMeter ) */ + return _exiEncodeStartElement(stream, 3, 5, state, se, 311, 17); + } + break; + case 302: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( se->localPart == 74 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 304, 85); + } + else if ( se->localPart == 75 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterReading ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 305, 21); + } + else if ( se->localPart == 135 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 306, 307); + } + else if ( se->localPart == 76 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterStatus ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 309, 310); + } + else if ( se->localPart == 139 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TMeter ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 311, 17); + } + break; + case 304: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( se->localPart == 75 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterReading ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 305, 21); + } + else if ( se->localPart == 135 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 306, 307); + } + else if ( se->localPart == 76 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterStatus ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 309, 310); + } + else if ( se->localPart == 139 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TMeter ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 311, 17); + } + break; + case 305: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( se->localPart == 135 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 306, 307); + } + else if ( se->localPart == 76 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterStatus ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 309, 310); + } + else if ( se->localPart == 139 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TMeter ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 311, 17); + } + break; + case 306: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( se->localPart == 76 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterStatus ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 309, 310); + } + else if ( se->localPart == 139 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TMeter ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 311, 17); + } + break; + case 307: + /* First(xsi:type)StartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 308, 71); + } + break; + case 308: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 308, 71); + } + break; + case 309: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( se->localPart == 139 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TMeter ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 311, 17); + } + break; + case 312: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + if ( se->localPart == 119 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}Tariff ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 313, 132); + } + break; + case 313: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptSignature)] */ + if ( se->localPart == 88 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ReceiptSignature ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 314, 315); + } + break; + case 314: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStatus)] */ + if ( se->localPart == 8 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 316, 35); + } + else if ( se->localPart == 35 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 316, 51); + } + else if ( se->localPart == 99 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVStatus ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 316, 317); + } + break; + case 318: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 319, 62); + } + break; + case 319: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + if ( se->localPart == 2 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 320, 5); + } + else if ( se->localPart == 27 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 320, 64); + } + else if ( se->localPart == 61 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 320, 231); + } + break; + case 321: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVStatus)] */ + if ( se->localPart == 8 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 322, 35); + } + else if ( se->localPart == 35 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 322, 51); + } + else if ( se->localPart == 99 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVStatus ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 322, 317); + } + break; + case 323: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 324, 62); + } + break; + case 324: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + if ( se->localPart == 41 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEID ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 325, 297); + } + break; + case 325: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + if ( se->localPart == 118 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}TCurrent ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 326, 17); + } + break; + case 326: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower)] */ + if ( se->localPart == 42 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaxPower ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 327, 21); + } + break; + case 327: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + if ( se->localPart == 66 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PCurrent ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 328, 21); + } + else if ( se->localPart == 56 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeterInfo ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 329, 301); + } + else if ( se->localPart == 2 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 330, 5); + } + else if ( se->localPart == 27 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 330, 64); + } + else if ( se->localPart == 61 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 330, 231); + } + break; + case 328: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + if ( se->localPart == 56 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeterInfo ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 329, 301); + } + else if ( se->localPart == 2 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 330, 5); + } + else if ( se->localPart == 27 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 330, 64); + } + else if ( se->localPart == 61 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 3, state, se, 330, 231); + } + break; + case 329: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + if ( se->localPart == 2 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 330, 5); + } + else if ( se->localPart == 27 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 330, 64); + } + else if ( se->localPart == 61 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 330, 231); + } + break; + case 331: + /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 335, 71); + } + break; + case 332: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 335, 71); + } + break; + case 333: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 335, 71); + } + break; + case 334: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 335, 71); + } + break; + case 335: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 335, 71); + } + break; + case 336: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 335, 71); + } + break; + case 338: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( se->localPart == 30 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractID ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 339, 90); + } + break; + case 339: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( se->localPart == 31 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 340, 79); + } + break; + case 341: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 342, 62); + } + break; + case 342: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + if ( se->localPart == 51 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}GenChallenge ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 343, 179); + } + break; + case 343: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + if ( se->localPart == 118 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}TCurrent ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 344, 17); + } + break; + case 345: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + if ( se->localPart == 119 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}Tariff ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 346, 132); + } + else if ( se->localPart == 22 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingProfile ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 347, 348); + } + else if ( se->localPart == 92 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 480, 13); + } + break; + case 346: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + if ( se->localPart == 22 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingProfile ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 347, 348); + } + else if ( se->localPart == 92 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 480, 13); + } + break; + case 347: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + if ( se->localPart == 92 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 480, 13); + } + break; + case 348: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry)] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 349, 350); + } + break; + case 349: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 353, 350); + } + break; + case 350: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + if ( se->localPart == 19 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 351, 17); + } + break; + case 351: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + if ( se->localPart == 18 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 352, 142); + } + break; + case 353: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 354, 350); + } + break; + case 354: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 355, 350); + } + break; + case 355: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 356, 350); + } + break; + case 356: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 357, 350); + } + break; + case 357: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 358, 350); + } + break; + case 358: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 359, 350); + } + break; + case 359: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 360, 350); + } + break; + case 360: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 361, 350); + } + break; + case 361: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 362, 350); + } + break; + case 362: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 363, 350); + } + break; + case 363: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 364, 350); + } + break; + case 364: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 365, 350); + } + break; + case 365: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 366, 350); + } + break; + case 366: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 367, 350); + } + break; + case 367: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 368, 350); + } + break; + case 368: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 369, 350); + } + break; + case 369: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 370, 350); + } + break; + case 370: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 371, 350); + } + break; + case 371: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 372, 350); + } + break; + case 372: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 373, 350); + } + break; + case 373: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 374, 350); + } + break; + case 374: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 375, 350); + } + break; + case 375: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 376, 350); + } + break; + case 376: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 377, 350); + } + break; + case 377: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 378, 350); + } + break; + case 378: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 379, 350); + } + break; + case 379: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 380, 350); + } + break; + case 380: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 381, 350); + } + break; + case 381: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 382, 350); + } + break; + case 382: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 383, 350); + } + break; + case 383: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 384, 350); + } + break; + case 384: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 385, 350); + } + break; + case 385: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 386, 350); + } + break; + case 386: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 387, 350); + } + break; + case 387: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 388, 350); + } + break; + case 388: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 389, 350); + } + break; + case 389: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 390, 350); + } + break; + case 390: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 391, 350); + } + break; + case 391: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 392, 350); + } + break; + case 392: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 393, 350); + } + break; + case 393: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 394, 350); + } + break; + case 394: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 395, 350); + } + break; + case 395: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 396, 350); + } + break; + case 396: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 397, 350); + } + break; + case 397: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 398, 350); + } + break; + case 398: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 399, 350); + } + break; + case 399: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 400, 350); + } + break; + case 400: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 401, 350); + } + break; + case 401: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 402, 350); + } + break; + case 402: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 403, 350); + } + break; + case 403: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 404, 350); + } + break; + case 404: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 405, 350); + } + break; + case 405: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 406, 350); + } + break; + case 406: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 407, 350); + } + break; + case 407: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 408, 350); + } + break; + case 408: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 409, 350); + } + break; + case 409: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 410, 350); + } + break; + case 410: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 411, 350); + } + break; + case 411: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 412, 350); + } + break; + case 412: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 413, 350); + } + break; + case 413: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 414, 350); + } + break; + case 414: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 415, 350); + } + break; + case 415: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 416, 350); + } + break; + case 416: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 417, 350); + } + break; + case 417: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 418, 350); + } + break; + case 418: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 419, 350); + } + break; + case 419: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 420, 350); + } + break; + case 420: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 421, 350); + } + break; + case 421: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 422, 350); + } + break; + case 422: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 423, 350); + } + break; + case 423: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 424, 350); + } + break; + case 424: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 425, 350); + } + break; + case 425: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 426, 350); + } + break; + case 426: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 427, 350); + } + break; + case 427: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 428, 350); + } + break; + case 428: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 429, 350); + } + break; + case 429: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 430, 350); + } + break; + case 430: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 431, 350); + } + break; + case 431: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 432, 350); + } + break; + case 432: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 433, 350); + } + break; + case 433: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 434, 350); + } + break; + case 434: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 435, 350); + } + break; + case 435: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 436, 350); + } + break; + case 436: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 437, 350); + } + break; + case 437: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 438, 350); + } + break; + case 438: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 439, 350); + } + break; + case 439: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 440, 350); + } + break; + case 440: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 441, 350); + } + break; + case 441: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 442, 350); + } + break; + case 442: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 443, 350); + } + break; + case 443: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 444, 350); + } + break; + case 444: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 445, 350); + } + break; + case 445: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 446, 350); + } + break; + case 446: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 447, 350); + } + break; + case 447: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 448, 350); + } + break; + case 448: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 449, 350); + } + break; + case 449: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 450, 350); + } + break; + case 450: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 451, 350); + } + break; + case 451: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 452, 350); + } + break; + case 452: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 453, 350); + } + break; + case 453: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 454, 350); + } + break; + case 454: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 455, 350); + } + break; + case 455: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 456, 350); + } + break; + case 456: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 457, 350); + } + break; + case 457: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 458, 350); + } + break; + case 458: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 459, 350); + } + break; + case 459: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 460, 350); + } + break; + case 460: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 461, 350); + } + break; + case 461: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 462, 350); + } + break; + case 462: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 463, 350); + } + break; + case 463: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 464, 350); + } + break; + case 464: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 465, 350); + } + break; + case 465: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 466, 350); + } + break; + case 466: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 467, 350); + } + break; + case 467: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 468, 350); + } + break; + case 468: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 469, 350); + } + break; + case 469: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 470, 350); + } + break; + case 470: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 471, 350); + } + break; + case 471: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 472, 350); + } + break; + case 472: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 473, 350); + } + break; + case 473: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 474, 350); + } + break; + case 474: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 475, 350); + } + break; + case 475: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 476, 350); + } + break; + case 476: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 477, 350); + } + break; + case 477: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 478, 350); + } + break; + case 478: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 479, 350); + } + break; + case 480: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_PEVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PEVPowerDeliveryParameter)] */ + if ( se->localPart == 6 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_PEVPowerDeliveryParameter ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 481, 46); + } + else if ( se->localPart == 32 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_PEVPowerDeliveryParameter ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 481, 211); + } + else if ( se->localPart == 92 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PEVPowerDeliveryParameter ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 481, 337); + } + break; + case 482: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 483, 62); + } + break; + case 483: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ + if ( se->localPart == 2 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 484, 5); + } + else if ( se->localPart == 27 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 484, 64); + } + else if ( se->localPart == 61 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 484, 231); + } + break; + case 485: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + if ( se->localPart == 39 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 486, 51); + } + break; + case 486: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVRESSVoltage)] */ + if ( se->localPart == 72 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVRESSVoltage ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 487, 21); + } + break; + case 487: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage)] */ + if ( se->localPart == 74 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVTargetVoltage ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 488, 21); + } + break; + case 488: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVDemandCurrent)] */ + if ( se->localPart == 67 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVDemandCurrent ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 489, 21); + } + break; + case 489: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}VoltageDifferential)] */ + if ( se->localPart == 125 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}VoltageDifferential ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 490, 21); + } + break; + case 491: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 492, 62); + } + break; + case 492: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + if ( se->localPart == 38 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 493, 64); + } + break; + case 493: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + if ( se->localPart == 48 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 494, 21); + } + break; + case 495: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( se->localPart == 128 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceTag ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 496, 497); + } + break; + case 496: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + if ( se->localPart == 70 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FreeService ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 506, 507); + } + break; + case 497: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + if ( se->localPart == 120 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceID ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 498, 499); + } + break; + case 498: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + if ( se->localPart == 123 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceName ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 500, 501); + } + else if ( se->localPart == 111 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 502, 503); + } + else if ( se->localPart == 126 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceScope ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 504, 505); + } + break; + case 500: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + if ( se->localPart == 111 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 502, 503); + } + else if ( se->localPart == 126 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceScope ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 504, 505); + } + break; + case 502: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + if ( se->localPart == 126 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceScope ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 504, 505); + } + break; + case 506: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}CertificateInstall)] */ + if ( se->localPart == 15 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}CertificateInstall ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 508, 509); + } + break; + case 508: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}CertificateUpdate)] */ + if ( se->localPart == 16 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}CertificateUpdate ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 510, 511); + } + break; + case 512: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( se->localPart == 128 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceTag ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 513, 497); + } + break; + case 513: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + if ( se->localPart == 70 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FreeService ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 514, 507); + } + break; + case 514: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType)] */ + if ( se->localPart == 65 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 515, 516); + } + break; + case 517: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( se->localPart == 128 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceTag ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 518, 497); + } + break; + case 518: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + if ( se->localPart == 70 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FreeService ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 519, 507); + } + break; + case 519: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails)] */ + if ( se->localPart == 118 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 520, 521); + } + break; + case 521: + /* FirstStartTag[START_ELEMENT_GENERIC] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 522, 71); + } + break; + case 523: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + if ( se->localPart == 104 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceID ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 524, 499); + } + break; + case 525: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 526, 62); + } + break; + case 526: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceTag)] */ + if ( se->localPart == 111 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceTag ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 527, 497); + } + break; + case 527: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + if ( se->localPart == 79 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentOptions ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 528, 529); + } + break; + case 528: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCertificate), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCustom), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceInternet), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceRCS), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}v2g_Service)] */ + if ( se->localPart == 112 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceCertificate ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 533, 495); + } + else if ( se->localPart == 114 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 533, 512); + } + else if ( se->localPart == 116 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceCustom ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 533, 517); + } + else if ( se->localPart == 121 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceInternet ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 533, 534); + } + else if ( se->localPart == 124 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceRCS ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 533, 538); + } + else if ( se->localPart == 130 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}v2g_Service ) */ + return _exiEncodeStartElement(stream, 3, 5, state, se, 533, 542); + } + break; + case 529: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + if ( se->localPart == 103 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PaymentOption ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 530, 531); + } + break; + case 530: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] */ + if ( se->localPart == 103 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PaymentOption ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 532, 531); + } + break; + case 534: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( se->localPart == 128 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceTag ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 535, 497); + } + break; + case 535: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + if ( se->localPart == 70 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FreeService ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 536, 507); + } + break; + case 536: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails)] */ + if ( se->localPart == 118 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 537, 521); + } + break; + case 538: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( se->localPart == 128 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceTag ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 539, 497); + } + break; + case 539: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + if ( se->localPart == 70 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FreeService ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 540, 507); + } + break; + case 540: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails)] */ + if ( se->localPart == 118 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 541, 521); + } + break; + case 542: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( se->localPart == 128 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceTag ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 543, 497); + } + break; + case 543: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + if ( se->localPart == 70 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FreeService ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 544, 507); + } + break; + case 545: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceScope ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 546, 505); + } + else if ( se->localPart == 112 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceType ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 547, 503); + } + break; + case 546: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), END_ELEMENT] */ + if ( se->localPart == 112 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceType ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 547, 503); + } + break; + case 548: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 549, 62); + } + break; + case 549: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + if ( se->localPart == 79 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentOptions ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 550, 529); + } + break; + case 550: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeService)] */ + if ( se->localPart == 20 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeService ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 551, 512); + } + break; + case 551: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + if ( se->localPart == 105 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceList ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 552, 553); + } + break; + case 553: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 554, 497); + } + break; + case 554: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 555, 497); + } + break; + case 555: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 556, 497); + } + break; + case 556: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 557, 497); + } + break; + case 557: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 558, 497); + } + break; + case 558: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 559, 497); + } + break; + case 559: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 560, 497); + } + break; + case 560: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 561, 497); + } + break; + case 561: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 562, 497); + } + break; + case 562: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 563, 497); + } + break; + case 563: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 564, 497); + } + break; + case 564: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 565, 497); + } + break; + case 565: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 566, 497); + } + break; + case 566: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 567, 497); + } + break; + case 567: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 568, 497); + } + break; + case 568: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 569, 497); + } + break; + case 569: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 570, 497); + } + break; + case 570: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 571, 497); + } + break; + case 571: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 572, 497); + } + break; + case 572: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 573, 497); + } + break; + case 573: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 574, 497); + } + break; + case 574: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 575, 497); + } + break; + case 575: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 576, 497); + } + break; + case 576: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 577, 497); + } + break; + case 577: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 578, 497); + } + break; + case 578: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 579, 497); + } + break; + case 579: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 580, 497); + } + break; + case 580: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 581, 497); + } + break; + case 581: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 582, 497); + } + break; + case 582: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 583, 497); + } + break; + case 583: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 584, 497); + } + break; + case 584: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 585, 497); + } + break; + case 586: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + if ( se->localPart == 95 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 587, 531); + } + break; + case 587: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */ + if ( se->localPart == 105 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceList ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 588, 553); + } + break; + case 589: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 590, 62); + } + break; + case 591: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), END_ELEMENT] */ + if ( se->localPart == 68 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PEVID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 592, 295); + } + break; + case 593: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 594, 62); + } + break; + case 594: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + if ( se->localPart == 41 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEID ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 595, 297); + } + break; + case 595: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + if ( se->localPart == 118 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}TCurrent ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 596, 17); + } + break; + case 597: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + if ( se->localPart == 52 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignedInfo ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 599, 600); + } + break; + case 598: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + if ( se->localPart == 52 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignedInfo ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 599, 600); + } + break; + case 599: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue)] */ + if ( se->localPart == 50 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignatureValue ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 610, 611); + } + break; + case 600: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + if ( se->localPart == 0 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 602, 68); + } + break; + case 601: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + if ( se->localPart == 0 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 602, 68); + } + break; + case 602: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod)] */ + if ( se->localPart == 43 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignatureMethod ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 603, 604); + } + break; + case 603: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + if ( se->localPart == 34 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Reference ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 609, 286); + } + break; + case 605: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( se->localPart == 11 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}HMACOutputLength ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 606, 607); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 606, 71); + } + break; + case 606: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 606, 71); + } + break; + case 608: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( se->localPart == 11 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}HMACOutputLength ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 606, 607); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 606, 71); + } + break; + case 609: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + if ( se->localPart == 34 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Reference ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 609, 286); + } + break; + case 610: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + if ( se->localPart == 14 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyInfo ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 613, 232); + } + else if ( se->localPart == 23 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Object ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 613, 331); + } + break; + case 613: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + if ( se->localPart == 23 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Object ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 613, 331); + } + break; + case 614: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignatureProperty ) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 616, 617); + } + break; + case 615: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignatureProperty ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 616, 617); + } + break; + case 616: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), END_ELEMENT] */ + if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignatureProperty ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 616, 617); + } + break; + case 619: + /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 620, 71); + } + break; + case 620: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 620, 71); + } + break; + case 621: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 620, 71); + } + break; + case 622: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + if ( se->localPart == 39 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 623, 51); + } + break; + case 624: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 625, 62); + } + break; + case 625: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + if ( se->localPart == 48 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 626, 21); + } + break; + case 627: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + if ( se->localPart == 4 && se->namespaceURI == 7 ) { + /* SE( {urn:iso:15118:2:2010:MsgDef}Header ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 628, 629); + } + break; + case 628: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + if ( se->localPart == 0 && se->namespaceURI == 7 ) { + /* SE( {urn:iso:15118:2:2010:MsgDef}Body ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 645, 646); + } + break; + case 629: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionInformation)] */ + if ( se->localPart == 3 && se->namespaceURI == 8 ) { + /* SE( {urn:iso:15118:2:2010:MsgHeader}SessionInformation ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 630, 631); + } + break; + case 630: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Security), END_ELEMENT] */ + if ( se->localPart == 1 && se->namespaceURI == 8 ) { + /* SE( {urn:iso:15118:2:2010:MsgHeader}Notification ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 636, 637); + } + else if ( se->localPart == 2 && se->namespaceURI == 8 ) { + /* SE( {urn:iso:15118:2:2010:MsgHeader}Security ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 642, 643); + } + break; + case 631: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */ + if ( se->localPart == 132 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SessionID ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 632, 299); + } + break; + case 632: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + if ( se->localPart == 127 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 633, 299); + } + else if ( se->localPart == 107 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 634, 635); + } + break; + case 633: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + if ( se->localPart == 107 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 634, 635); + } + break; + case 636: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Security), END_ELEMENT] */ + if ( se->localPart == 2 && se->namespaceURI == 8 ) { + /* SE( {urn:iso:15118:2:2010:MsgHeader}Security ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 642, 643); + } + break; + case 637: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + if ( se->localPart == 67 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FaultCode ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 638, 639); + } + else if ( se->localPart == 68 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FaultMsg ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 640, 641); + } + break; + case 638: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + if ( se->localPart == 68 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FaultMsg ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 640, 641); + } + break; + case 643: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + if ( se->localPart == 42 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Signature ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 644, 597); + } + break; + case 646: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] */ + if ( se->localPart == 2 && se->namespaceURI == 7 ) { + /* SE( {urn:iso:15118:2:2010:MsgDef}BodyElement ) */ + return _exiEncodeStartElement(stream, 6, 0, state, se, 647, 48); + } + else if ( se->localPart == 3 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CableCheckReq ) */ + return _exiEncodeStartElement(stream, 6, 1, state, se, 647, 49); + } + else if ( se->localPart == 5 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CableCheckRes ) */ + return _exiEncodeStartElement(stream, 6, 2, state, se, 647, 60); + } + else if ( se->localPart == 7 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq ) */ + return _exiEncodeStartElement(stream, 6, 3, state, se, 647, 73); + } + else if ( se->localPart == 9 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes ) */ + return _exiEncodeStartElement(stream, 6, 4, state, se, 647, 76); + } + else if ( se->localPart == 11 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq ) */ + return _exiEncodeStartElement(stream, 6, 5, state, se, 647, 91); + } + else if ( se->localPart == 13 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes ) */ + return _exiEncodeStartElement(stream, 6, 6, state, se, 647, 95); + } + else if ( se->localPart == 16 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq ) */ + return _exiEncodeStartElement(stream, 6, 7, state, se, 647, 105); + } + else if ( se->localPart == 18 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes ) */ + return _exiEncodeStartElement(stream, 6, 8, state, se, 647, 121); + } + else if ( se->localPart == 23 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq ) */ + return _exiEncodeStartElement(stream, 6, 9, state, se, 647, 177); + } + else if ( se->localPart == 25 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes ) */ + return _exiEncodeStartElement(stream, 6, 10, state, se, 647, 180); + } + else if ( se->localPart == 33 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CurrentDemandReq ) */ + return _exiEncodeStartElement(stream, 6, 11, state, se, 647, 182); + } + else if ( se->localPart == 35 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CurrentDemandRes ) */ + return _exiEncodeStartElement(stream, 6, 12, state, se, 647, 197); + } + else if ( se->localPart == 52 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}LineLockReq ) */ + return _exiEncodeStartElement(stream, 6, 13, state, se, 647, 277); + } + else if ( se->localPart == 54 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}LineLockRes ) */ + return _exiEncodeStartElement(stream, 6, 14, state, se, 647, 280); + } + else if ( se->localPart == 57 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq ) */ + return _exiEncodeStartElement(stream, 6, 15, state, se, 647, 293); + } + else if ( se->localPart == 59 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes ) */ + return _exiEncodeStartElement(stream, 6, 16, state, se, 647, 318); + } + else if ( se->localPart == 61 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringStatusReq ) */ + return _exiEncodeStartElement(stream, 6, 17, state, se, 647, 321); + } + else if ( se->localPart == 63 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringStatusRes ) */ + return _exiEncodeStartElement(stream, 6, 18, state, se, 647, 323); + } + else if ( se->localPart == 75 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq ) */ + return _exiEncodeStartElement(stream, 6, 19, state, se, 647, 338); + } + else if ( se->localPart == 77 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes ) */ + return _exiEncodeStartElement(stream, 6, 20, state, se, 647, 341); + } + else if ( se->localPart == 80 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq ) */ + return _exiEncodeStartElement(stream, 6, 21, state, se, 647, 345); + } + else if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes ) */ + return _exiEncodeStartElement(stream, 6, 22, state, se, 647, 482); + } + else if ( se->localPart == 84 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PreChargeReq ) */ + return _exiEncodeStartElement(stream, 6, 23, state, se, 647, 485); + } + else if ( se->localPart == 86 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PreChargeRes ) */ + return _exiEncodeStartElement(stream, 6, 24, state, se, 647, 491); + } + else if ( se->localPart == 96 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDetailReq ) */ + return _exiEncodeStartElement(stream, 6, 25, state, se, 647, 523); + } + else if ( se->localPart == 98 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDetailRes ) */ + return _exiEncodeStartElement(stream, 6, 26, state, se, 647, 525); + } + else if ( se->localPart == 100 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq ) */ + return _exiEncodeStartElement(stream, 6, 27, state, se, 647, 545); + } + else if ( se->localPart == 102 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes ) */ + return _exiEncodeStartElement(stream, 6, 28, state, se, 647, 548); + } + else if ( se->localPart == 106 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq ) */ + return _exiEncodeStartElement(stream, 6, 29, state, se, 647, 586); + } + else if ( se->localPart == 108 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes ) */ + return _exiEncodeStartElement(stream, 6, 30, state, se, 647, 589); + } + else if ( se->localPart == 114 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionSetupReq ) */ + return _exiEncodeStartElement(stream, 6, 31, state, se, 647, 591); + } + else if ( se->localPart == 116 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionSetupRes ) */ + return _exiEncodeStartElement(stream, 6, 32, state, se, 647, 593); + } + else if ( se->localPart == 121 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}TerminateChargingReq ) */ + return _exiEncodeStartElement(stream, 6, 33, state, se, 647, 622); + } + else if ( se->localPart == 123 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}TerminateChargingRes ) */ + return _exiEncodeStartElement(stream, 6, 34, state, se, 647, 624); + } + else if ( se->localPart == 126 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq ) */ + return _exiEncodeStartElement(stream, 6, 35, state, se, 647, 648); + } + else if ( se->localPart == 128 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes ) */ + return _exiEncodeStartElement(stream, 6, 36, state, se, 647, 650); + } + break; + case 648: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_PEVStatus)] */ + if ( se->localPart == 39 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_PEVStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 649, 51); + } + break; + case 650: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 93 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 651, 62); + } + break; + case 651: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + if ( se->localPart == 38 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 652, 64); + } + break; + case 652: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + if ( se->localPart == 48 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 653, 21); + } + break; + case 654: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 654, 71); + } + break; + case 689: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( se->localPart == 128 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceTag ) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 543, 497); + } + break; + case 702: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 308, 71); } break; default: - return -1; + return EXI_ERROR_UNEXPECTED_START_ELEMENT; } - return -1; + return EXI_ERROR_UNEXPECTED_START_ELEMENT; } -int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state, - eqname_t* ee) { +/* Qualified Name unknown!! */ +int exiEncodeStartElementGenericUnknown(bitstream_t* stream, exi_state_t* state, + char** uri, char** localName) { + uint16_t grammarID; + uint16_t eventCodeLength; + + int errn = _exiGet1stLevelEventCode(state, START_ELEMENT_GENERIC, &grammarID); + if (errn < 0) { + return errn; + } else if (errn == 1) { + /* not found --> try undeclared SE */ + errn = _exiGet1stLevelEventCode(state, START_ELEMENT_GENERIC_UNDECLARED, &grammarID); + if (errn < 0) { + return errn; + } else if (errn == 1) { + /* Should never happen except in STRICT mode */ + return EXI_ERROR_UNEXPECTED_EVENT_LEVEL1; + } else { + /* found START_ELEMENT_GENERIC_UNDECLARED */ + errn = _exiGetEventCodeLength(state, &eventCodeLength); + if (errn < 0) { + return errn; + } else { + /* encode event code*/ + errn = encodeNBitUnsignedInteger(stream, eventCodeLength, grammarID); + if (errn) { + return errn; + } + } + } + } else { + /* found START_ELEMENT_GENERIC */ + errn = _exiGetEventCodeLength(state, &eventCodeLength); + if (errn < 0) { + return errn; + } else { + /* encode event code*/ + errn = encodeNBitUnsignedInteger(stream, eventCodeLength, grammarID); + if (errn) { + return errn; + } + } + } + + /* encode qualified name */ + errn = _exiEncodeQName(stream, &(state->nameTablePrepopulated), &(state->nameTableRuntime), uri, localName); + if (errn) { + return errn; + } + + /* learn event, not in UCD Profile */ + + /* move on */ + /* push element on stack */ + switch (state->grammarStack[state->stackIndex]) { - case 220: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 5, 29); + /* $EXI_ENCODE_START_ELEMENT_GENERIC$ */ + case DOC_CONTENT: + /* move on to DocEnd */ + state->grammarStack[state->stackIndex] = DOC_END; + /* push new ur-type grammar on stack */ + return exiPushStack(state, UR_TYPE_GRAMMAR_0, NULL); break; - case 142: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 3, 4); + case UR_TYPE_GRAMMAR_0: + /* move on to UR_TYPE_GRAMMAR_1 */ + state->grammarStack[state->stackIndex] = UR_TYPE_GRAMMAR_1; + /* push new ur-type grammar on stack */ + return exiPushStack(state, UR_TYPE_GRAMMAR_0, NULL); break; - case 3: - /* First(xsi:type)StartTag[END_ELEMENT] */ - case 34: + case UR_TYPE_GRAMMAR_1: + /* remain in UR_TYPE_GRAMMAR_1 */ + /* push new ur-type grammar on stack */ + return exiPushStack(state, UR_TYPE_GRAMMAR_0, NULL); + break; + default: + return EXI_ERROR_UNEXPECTED_START_ELEMENT_GENERIC; + } + + + + return 0; +} + + + +/* Look first for qualified name */ +int exiEncodeStartElementGeneric(bitstream_t* stream, exi_state_t* state, + string_ascii_t* namespaceURI , string_ascii_t* localName) { + eqname_t se; + /* uri */ + int errn = exiGetUriID(&(state->nameTablePrepopulated), &(state->nameTableRuntime), namespaceURI->chars, &se.namespaceURI); + if (errn == -1) { + return errn; + } else if (errn == 1) { + /* No URI (and localNameID) found */ + exiEncodeStartElementGenericUnknown(stream, state, &(namespaceURI->chars), &(localName->chars)); + } else { + /* localName */ + errn = exiGetLocalNameID(&(state->nameTablePrepopulated), &(state->nameTableRuntime), se.namespaceURI, localName->chars, &se.localPart); + if (errn == -1) { + return errn; + } else if (errn == 1) { + /* No localName found, use generic StartElement(*) method */ + exiEncodeStartElementGenericUnknown(stream, state, &(namespaceURI->chars), &(localName->chars)); + } else { + /* Uri&LocalName found, use "efficient" StartElement method */ + return exiEncodeStartElement(stream, state, &se); + } + } + return 0; +} + +int _exiEncodeEndElementUndeclared(bitstream_t* stream, exi_state_t* state) { + int16_t currentID = state->grammarStack[state->stackIndex]; + switch (currentID) { + + } + return EXI_ERROR_UNEXPECTED_END_ELEMENT; +} + +int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state) { + int errn = 0; + int16_t currentID = state->grammarStack[state->stackIndex]; + switch (currentID) { + case 254: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SKI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT_GENERIC, END_ELEMENT] */ + case 301: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + errn = encodeNBitUnsignedInteger(stream, 3, 6); + break; + case 307: + /* First(xsi:type)StartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 3, 2); + break; + case 70: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 69: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 72: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 228: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 227: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 229: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 308: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 335: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 334: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 336: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 606: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 620: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 654: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 2, 1); + break; + case 646: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] */ + errn = encodeNBitUnsignedInteger(stream, 6, 37); + break; + case 83: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] */ + case 80: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] */ + case 141: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ + case 150: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 149: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 148: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 147: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 146: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 145: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 137: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 209: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 223: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + case 247: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), END_ELEMENT] */ + case 244: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 267: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + case 269: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + case 274: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), END_ELEMENT] */ + case 285: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + case 309: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 478: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 477: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 476: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 475: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 474: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 473: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 472: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 471: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 470: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 469: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 468: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 467: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 466: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 465: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 464: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 463: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 462: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 461: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 460: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 459: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 458: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 457: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 456: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 455: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 454: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 453: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 452: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 451: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 450: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 449: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 448: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 447: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 446: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 445: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 444: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 443: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 442: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 441: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 440: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 439: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 438: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 437: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 436: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 435: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 434: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 433: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 432: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 431: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 430: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 429: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 428: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 427: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 426: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 425: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 424: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 423: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 422: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 421: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 420: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 419: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 418: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 417: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 416: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 415: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 414: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 413: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 412: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 411: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 410: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 409: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 408: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 407: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 406: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 405: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 404: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 403: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 402: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 401: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 400: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 399: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 398: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 397: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 396: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 395: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 394: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 393: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 392: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 391: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 390: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 389: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 388: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 387: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 386: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 385: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 384: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 383: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 382: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 381: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 380: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 379: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 378: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 377: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 376: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 375: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 374: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 373: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 372: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 371: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 370: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 369: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 368: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 367: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 366: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 365: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 364: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 363: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 362: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 361: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 360: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 359: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 358: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 357: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 356: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 355: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 354: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 353: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 349: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 502: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 530: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] */ + case 546: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), END_ELEMENT] */ + case 584: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 583: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 582: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 581: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 580: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 579: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 578: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 577: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 576: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 575: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 574: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 573: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 572: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 571: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 570: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 569: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 568: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 567: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 566: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 565: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 564: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 563: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 562: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 561: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 560: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 559: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 558: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 557: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 556: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 555: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 554: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 551: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + case 591: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), END_ELEMENT] */ + case 609: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + case 613: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + case 616: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), END_ELEMENT] */ + case 633: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + case 638: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + case 643: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + case 636: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Security), END_ELEMENT] */ + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 8: /* Element[END_ELEMENT] */ - case 40: + case 18: /* Element[END_ELEMENT] */ - case 42: + case 26: + /* Element[END_ELEMENT] */ + case 31: + /* Element[END_ELEMENT] */ + case 37: /* Element[END_ELEMENT] */ case 45: /* Element[END_ELEMENT] */ - case 60: + case 47: + /* Element[END_ELEMENT] */ + case 58: + /* Element[END_ELEMENT] */ + case 50: + /* Element[END_ELEMENT] */ + case 66: + /* Element[END_ELEMENT] */ + case 63: /* Element[END_ELEMENT] */ case 74: /* Element[END_ELEMENT] */ - case 79: + case 81: /* Element[END_ELEMENT] */ - case 91: + case 89: /* Element[END_ELEMENT] */ - case 101: + case 94: /* Element[END_ELEMENT] */ - case 106: + case 103: /* Element[END_ELEMENT] */ - case 116: + case 108: /* Element[END_ELEMENT] */ - case 120: + case 118: /* Element[END_ELEMENT] */ - case 125: + case 143: /* Element[END_ELEMENT] */ - case 130: - /* Element[END_ELEMENT] */ - case 132: + case 151: /* Element[END_ELEMENT] */ case 135: /* Element[END_ELEMENT] */ - case 141: - /* Element[END_ELEMENT] */ - case 148: - /* Element[END_ELEMENT] */ - case 149: - /* Element[END_ELEMENT] */ - case 15: - /* FirstStartTag[END_ELEMENT] */ - case 159: - /* Element[END_ELEMENT] */ - case 160: + case 158: /* Element[END_ELEMENT] */ case 164: /* Element[END_ELEMENT] */ - case 167: - /* Element[END_ELEMENT] */ - case 170: - /* Element[END_ELEMENT] */ - case 174: + case 175: /* Element[END_ELEMENT] */ case 178: /* Element[END_ELEMENT] */ case 181: /* Element[END_ELEMENT] */ - case 185: - /* Element[END_ELEMENT] */ - case 195: - /* Element[END_ELEMENT] */ - case 201: - /* Element[END_ELEMENT] */ - case 202: - /* Element[END_ELEMENT] */ - case 203: - /* Element[END_ELEMENT] */ - case 206: - /* Element[END_ELEMENT] */ - case 211: - /* Element[END_ELEMENT] */ - case 212: - /* Element[END_ELEMENT] */ - case 216: - /* Element[END_ELEMENT] */ - case 219: - /* Element[END_ELEMENT] */ - case 223: - /* Element[END_ELEMENT] */ - case 228: - /* Element[END_ELEMENT] */ - case 234: - /* Element[END_ELEMENT] */ - case 236: - /* Element[END_ELEMENT] */ - case 238: - /* Element[END_ELEMENT] */ - case 239: - /* Element[END_ELEMENT] */ - case 243: - /* Element[END_ELEMENT] */ - break; - case 143: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ case 196: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 224: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 2, 3); - break; - case 89: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - case 100: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 99: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 98: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 97: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 95: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 115: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 114: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 113: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 112: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 111: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 110: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 108: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 119: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EPrice), END_ELEMENT] */ - case 146: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - case 158: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - case 166: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff), END_ELEMENT] */ - case 179: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - case 183: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList), END_ELEMENT] */ - case 194: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 193: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 192: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 191: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 190: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 189: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 187: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 200: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 221: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}Notification), END_ELEMENT] */ - case 227: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - case 232: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; - case 88: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - case 145: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - case 157: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - case 23: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - case 198: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ + /* Element[END_ELEMENT] */ + case 210: + /* Element[END_ELEMENT] */ + case 215: + /* Element[END_ELEMENT] */ case 225: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - case 230: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 2, 2); + /* Element[END_ELEMENT] */ + case 240: + /* Element[END_ELEMENT] */ + case 245: + /* Element[END_ELEMENT] */ + case 258: + /* Element[END_ELEMENT] */ + case 279: + /* Element[END_ELEMENT] */ + case 282: + /* Element[END_ELEMENT] */ + case 292: + /* Element[END_ELEMENT] */ + case 311: + /* Element[END_ELEMENT] */ + case 316: + /* Element[END_ELEMENT] */ + case 320: + /* Element[END_ELEMENT] */ + case 322: + /* Element[END_ELEMENT] */ + case 330: + /* Element[END_ELEMENT] */ + case 340: + /* Element[END_ELEMENT] */ + case 344: + /* Element[END_ELEMENT] */ + case 352: + /* Element[END_ELEMENT] */ + case 479: + /* Element[END_ELEMENT] */ + case 481: + /* Element[END_ELEMENT] */ + case 484: + /* Element[END_ELEMENT] */ + case 490: + /* Element[END_ELEMENT] */ + case 494: + /* Element[END_ELEMENT] */ + case 504: + /* Element[END_ELEMENT] */ + case 510: + /* Element[END_ELEMENT] */ + case 515: + /* Element[END_ELEMENT] */ + case 522: + /* Element[END_ELEMENT] */ + case 520: + /* Element[END_ELEMENT] */ + case 524: + /* Element[END_ELEMENT] */ + case 532: + /* Element[END_ELEMENT] */ + case 533: + /* Element[END_ELEMENT] */ + case 537: + /* Element[END_ELEMENT] */ + case 541: + /* Element[END_ELEMENT] */ + case 544: + /* Element[END_ELEMENT] */ + case 547: + /* Element[END_ELEMENT] */ + case 585: + /* Element[END_ELEMENT] */ + case 552: + /* Element[END_ELEMENT] */ + case 588: + /* Element[END_ELEMENT] */ + case 590: + /* Element[END_ELEMENT] */ + case 592: + /* Element[END_ELEMENT] */ + case 596: + /* Element[END_ELEMENT] */ + case 623: + /* Element[END_ELEMENT] */ + case 626: + /* Element[END_ELEMENT] */ + case 634: + /* Element[END_ELEMENT] */ + case 640: + /* Element[END_ELEMENT] */ + case 644: + /* Element[END_ELEMENT] */ + case 642: + /* Element[END_ELEMENT] */ + case 647: + /* Element[END_ELEMENT] */ + case 649: + /* Element[END_ELEMENT] */ + case 653: + /* Element[END_ELEMENT] */ + case 645: + /* Element[END_ELEMENT] */ + case 655: + /* FirstStartTag[END_ELEMENT] */ + case 656: + /* FirstStartTag[END_ELEMENT] */ + case 663: + /* FirstStartTag[END_ELEMENT] */ + case 679: + /* FirstStartTag[END_ELEMENT] */ + case 691: + /* FirstStartTag[END_ELEMENT] */ + case 701: + /* FirstStartTag[END_ELEMENT] */ + break; + case 234: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 4, 8); + break; + case 48: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 120: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 176: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 231: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 237: + /* Element[END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 317: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 337: + /* First(xsi:type)StartTag[END_ELEMENT] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + break; + case 302: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + errn = encodeNBitUnsignedInteger(stream, 3, 5); + break; + case 332: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 3, 3); + break; + case 208: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 222: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + case 250: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 249: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 252: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 243: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 265: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT_GENERIC, END_ELEMENT] */ + case 272: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT_GENERIC, END_ELEMENT] */ + case 306: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 333: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 500: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 545: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), END_ELEMENT] */ + case 605: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 608: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 610: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + case 632: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + case 637: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + case 630: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Security), END_ELEMENT] */ + case 71: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 702: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 2, 2); + break; + case 304: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 331: + /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 3, 4); + break; + case 206: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 242: + /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 305: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 498: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + errn = encodeNBitUnsignedInteger(stream, 2, 3); break; default: - return -1; + if (currentID < 0) { + /* runtime grammars */ + return -1; + } else { + errn = _exiEncodeEndElementUndeclared(stream, state); + if (errn < 0) { + return errn; + } + } + /* return EXI_ERROR_UNEXPECTED_END_ELEMENT; */ + } + + if (errn < 0) { + return errn; } /* pop item */ return exiPopStack(state); } +static int _exiValueToString(exi_value_t* val) { + if (val->type == STRING) { + return 0; + } else { + /* TODO convert typed value to string */ + return EXI_ERROR_CONVERSION_TYPE_TO_STRING; + } +} + int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, exi_value_t* val) { - uint32_t bits; - switch (state->grammarStack[state->stackIndex]) { - case 154: - case 197: - case 226: - /* CHARACTERS[BINARY_HEX] */ - if (val->type == BINARY_HEX) { - encodeBinary(stream, &val->binary); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - } - break; - case 41: - case 59: - case 61: - /* CHARACTERS[BOOLEAN] */ - /* xsi:type OR xsi:nil */ - encodeNBitUnsignedInteger(stream, 1, 0); - if (val->type == BOOLEAN) { - encodeBoolean(stream, val->boolean); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - } - break; - case 44: - case 64: - case 127: - case 150: - case 152: - case 176: - case 214: - case 241: - /* CHARACTERS[ENUMERATION] */ - if (val->type == ENUMERATION) { - encodeNBitUnsignedInteger(stream, 1, val->enumeration); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - } - break; - case 233: - /* CHARACTERS[STRING] */ - /* xsi:type OR xsi:nil */ - encodeNBitUnsignedInteger(stream, 1, 0); + int errn; + int16_t currentID = state->grammarStack[state->stackIndex]; + switch (currentID) { + case 619: + /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ if (val->type == STRING) { - encodeStringValue(stream, &val->string); + encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 621; + return 0; + } + break; + case 128: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + if (val->type == ENUMERATION) { + errn = encodeNBitUnsignedInteger(stream, 8, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 59: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == NBIT_UNSIGNED_INTEGER) { + errn = _encodeNBitIntegerValue(stream, &val->integer, 7, 0); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 236: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 241; return 0; } break; - case 103: - case 169: - case 184: - case 208: case 237: - /* CHARACTERS[ENUMERATION] */ + /* Element[END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 237; + return 0; + } + break; + case 336: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 336; + return 0; + } + break; + case 234: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 4, 9); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 234; + return 0; + } + break; + case 702: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 308; + return 0; + } + break; + case 228: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 228; + return 0; + } + break; + case 621: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 621; + return 0; + } + break; + case 75: + case 85: + case 88: + case 99: + case 219: + case 230: + case 315: + case 671: + case 677: + case 680: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + if (val->type == BINARY_BASE64) { + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 334: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 336; + return 0; + } + break; + case 605: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 608; + return 0; + } + break; + case 654: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 654; + return 0; + } + break; + case 333: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 336; + return 0; + } + break; + case 62: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ if (val->type == ENUMERATION) { - encodeNBitUnsignedInteger(stream, 3, val->enumeration); + errn = encodeNBitUnsignedInteger(stream, 6, val->enumeration); + if (errn) { + return errn; + } /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 8; return 0; } break; - case 56: - /* CHARACTERS[INTEGER_32] */ - if (val->type == INTEGER_32) { - encodeInteger32(stream, val->int32); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - } - break; - case 118: - /* CHARACTERS[UNSIGNED_INTEGER_32] */ - if (val->type == UNSIGNED_INTEGER_32) { - encodeUnsignedInteger32(stream, val->uint32); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - } - break; - case 78: - /* CHARACTERS[ENUMERATION] */ + case 639: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ if (val->type == ENUMERATION) { - encodeNBitUnsignedInteger(stream, 5, val->enumeration); + errn = encodeNBitUnsignedInteger(stream, 2, val->enumeration); + if (errn) { + return errn; + } /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 8; return 0; } break; - case 80: - /* CHARACTERS[INTEGER_32] */ - /* xsi:type OR xsi:nil */ - encodeNBitUnsignedInteger(stream, 1, 0); - if (val->type == INTEGER_32) { - encodeInteger32(stream, val->int32); + case 241: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 241; return 0; } break; - case 37: - case 39: - case 48: - case 52: - case 54: - /* CHARACTERS[BOOLEAN] */ - if (val->type == BOOLEAN) { - encodeBoolean(stream, val->boolean); + case 249: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - } - break; - case 76: - case 70: - case 147: - /* CHARACTERS[INTEGER_16] */ - if (val->type == INTEGER_16) { - encodeInteger32(stream, val->int32); - /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 252; return 0; } break; case 90: - case 94: - case 105: - case 137: + case 124: case 144: - case 161: - case 182: - case 199: - case 229: - /* CHARACTERS[STRING] */ + case 179: + case 295: + case 303: + case 501: + case 505: + case 635: + case 641: + case 661: + case 664: + case 666: + case 667: + case 668: + case 673: + case 674: + case 675: + case 687: + case 693: + case 694: + case 697: + case 700: + case 705: + case 707: + case 709: + /* FirstStartTag[CHARACTERS[STRING]] */ if (val->type == STRING) { - encodeStringValue(stream, &val->string); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 8; return 0; } break; - case 82: - case 134: - case 163: - case 180: - case 204: - case 231: - /* CHARACTERS[ENUMERATION] */ - if (val->type == ENUMERATION) { - encodeNBitUnsignedInteger(stream, 2, val->enumeration); + case 307: + /* First(xsi:type)StartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 308; + return 0; + } + break; + case 229: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 229; + return 0; + } + break; + case 232: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 4, 9); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 276; + return 0; + } + break; + case 71: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 654; + return 0; + } + break; + case 332: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 3, 4); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 336; + return 0; + } + break; + case 233: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 4, 8); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 276; + return 0; + } + break; + case 331: + /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 3, 5); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 336; + return 0; + } + break; + case 531: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + if (val->type == ENUMERATION) { + errn = encodeNBitUnsignedInteger(stream, 1, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 252: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 252; + return 0; + } + break; + case 72: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 72; + return 0; + } + break; + case 606: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 606; + return 0; + } + break; + case 134: + case 503: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + if (val->type == ENUMERATION) { + errn = encodeNBitUnsignedInteger(stream, 3, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 27: + case 259: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + if (val->type == INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 104: + case 676: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == NBIT_UNSIGNED_INTEGER) { + errn = _encodeNBitIntegerValue(stream, &val->integer, 8, -128); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 276: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 4, 8); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 276; + return 0; + } + break; + case 670: + /* FirstStartTag[CHARACTERS[DECIMAL]] */ + if (val->type == DECIMAL) { + errn = encodeDecimal(stream, &val->decimal); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 32: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == NBIT_UNSIGNED_INTEGER) { + errn = _encodeNBitIntegerValue(stream, &val->integer, 3, 1); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 235: + case 251: + case 257: + case 261: + case 275: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 250: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 250; + return 0; + } + break; + case 308: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 308; + return 0; + } + break; + case 672: + case 678: + case 684: + case 686: + case 692: + case 699: + case 703: + case 710: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + if (val->type == DATETIME) { + errn = encodeDateTime(stream, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 140: + case 665: + case 681: + case 688: + case 696: + case 698: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + if (val->type == UNSIGNED_INTEGER) { + errn = encodeUnsignedInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 657: + case 659: + case 685: + /* FirstStartTag[CHARACTERS[LIST]] */ + if (val->type == LIST) { + /* List not supported properly yet, produce valid stream */ + errn = encodeUnsignedInteger32(stream, 0); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 227: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 229; + return 0; + } + break; + case 69: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 72; + return 0; + } + break; + case 658: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == NBIT_UNSIGNED_INTEGER) { + errn = _encodeNBitIntegerValue(stream, &val->integer, 8, 0); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 611: + /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] */ + if (val->type == BINARY_BASE64) { + encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 690: + case 706: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + if (val->type == FLOAT) { + errn = encodeFloat(stream, &val->float_me); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 25: + case 57: + case 67: + case 107: + case 516: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + if (val->type == ENUMERATION) { + errn = encodeNBitUnsignedInteger(stream, 4, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 119: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == NBIT_UNSIGNED_INTEGER) { + errn = _encodeNBitIntegerValue(stream, &val->integer, 4, 0); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 23: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == NBIT_UNSIGNED_INTEGER) { + errn = _encodeNBitIntegerValue(stream, &val->integer, 3, -3); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 335: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 335; + return 0; + } + break; + case 612: + /* StartTag[CHARACTERS[BINARY_BASE64]] */ + if (val->type == BINARY_BASE64) { + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 19: + case 189: + case 191: + case 203: + case 205: + case 207: + case 507: + case 509: + case 511: + /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ + if (val->type == BOOLEAN) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBoolean(stream, val->boolean); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 297: + case 299: + case 499: + case 682: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + if (val->type == BINARY_HEX) { + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 608: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 608; + return 0; + } + break; + case 17: + case 132: + case 142: + case 310: + case 607: + case 660: + case 662: + case 669: + case 683: + case 695: + case 708: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + if (val->type == INTEGER) { + errn = encodeInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 70: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 70; + return 0; + } + break; + case 620: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 620; + return 0; + } + break; + case 260: + case 262: + case 263: + case 266: + case 268: + case 270: + case 273: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + if (val->type == BINARY_BASE64) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } + break; + case 7: + case 11: + case 13: + case 15: + case 55: + case 214: + case 216: + case 704: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + if (val->type == BOOLEAN) { + errn = encodeBoolean(stream, val->boolean); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; return 0; } break; default: - return -1; + return EXI_ERROR_UNEXPECTED_CHARACTERS; } - return -1; + if (currentID < 0) { + /* runtime rules */ + return -1; + } else { + /* convert typed value to string for EXI encoding */ + errn = _exiValueToString(val); + if (errn) { + return errn; + } + /* undeclared CH event code already written */ + /* encode deviant value */ + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + + /* move to element content rule if not already */ + errn = exiMoveToElementContentRule( state); + } + + return errn; } -int exiEncodeAttribute(bitstream_t* stream, exi_state_t* state, - eqname_t* at, exi_value_t* val) { + +int exiEncodeAttribute(bitstream_t* stream, exi_state_t* state, eqname_t* at, + exi_value_t* val) { + int16_t currentID = state->grammarStack[state->stackIndex]; + switch (currentID) { + case 68: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + if ( at->localPart == 0 && at->namespaceURI == 0 ) { + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 69; + return 0; + } + } + break; + case 226: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + if ( at->localPart == 0 && at->namespaceURI == 0 ) { + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 227; + return 0; + } + } + break; + case 232: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 4, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 233; + return 0; + } + } + break; + case 242: + /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + if ( at->localPart == 5 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 243; + return 0; + } + } + else if ( at->localPart == 6 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 1); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 244; + return 0; + } + } + break; + case 243: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + if ( at->localPart == 6 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 244; + return 0; + } + } + break; + case 248: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + if ( at->localPart == 0 && at->namespaceURI == 0 ) { + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 249; + return 0; + } + } + break; + case 283: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 284; + return 0; + } + } + break; + case 286: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 287; + return 0; + } + } + else if ( at->localPart == 5 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 1); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 288; + return 0; + } + } + else if ( at->localPart == 6 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 2); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 289; + return 0; + } + } + break; + case 287: + /* StartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( at->localPart == 5 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 288; + return 0; + } + } + else if ( at->localPart == 6 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 1); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 289; + return 0; + } + } + break; + case 288: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( at->localPart == 6 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 289; + return 0; + } + } + break; + case 331: + /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( at->localPart == 1 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 332; + return 0; + } + } + else if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 1); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 333; + return 0; + } + } + else if ( at->localPart == 3 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 2); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 334; + return 0; + } + } + break; + case 332: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 333; + return 0; + } + } + else if ( at->localPart == 3 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 1); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 334; + return 0; + } + } + break; + case 333: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( at->localPart == 3 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 334; + return 0; + } + } + break; + case 597: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 598; + return 0; + } + } + break; + case 600: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 601; + return 0; + } + } + break; + case 604: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + if ( at->localPart == 0 && at->namespaceURI == 0 ) { + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 605; + return 0; + } + } + break; + case 611: + /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 612; + return 0; + } + } + break; + case 614: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 615; + return 0; + } + } + break; + case 617: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Target)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 618; + return 0; + } + } + else if ( at->localPart == 4 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 1); + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 619; + return 0; + } + } + break; + case 618: + /* StartTag[ATTRIBUTE[STRING](Target)] */ + if ( at->localPart == 4 && at->namespaceURI == 0 ) { + if (val->type == STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 619; + return 0; + } + } + break; + + } + + /* no expected attribute */ + if (currentID < 0) { + /* runtime element */ + return -1; + } else { + return +1; + } + + /* return EXI_ERROR_UNEXPECTED_ATTRIBUTE; */ +} + +int exiEncodeAttribute2(bitstream_t* stream, exi_state_t* state, qname_t* at, + exi_value_t* val) { + int errn; + eqname_t eat; + + /* attribute generic undeclared */ + uint16_t codeLength1, codeLength2; + uint32_t ec1, ec2; + + errn = exiGetUriID(&state->nameTablePrepopulated, &state->nameTableRuntime, at->namespaceURI.chars, &eat.namespaceURI); + if (errn < 0) { + return errn; + } else if (errn > 0) { + /* uri not found*/ + } else { + /* uri found, try to find localname id */ + errn = exiGetLocalNameID(&state->nameTablePrepopulated, &state->nameTableRuntime, eat.namespaceURI, + at->localName.chars, &eat.localPart); + if (errn < 0) { + return errn; + } else if (errn > 0) { + /* local-name not found*/ + } else { + /* found uri and local-name */ + errn = exiEncodeAttribute(stream, state, &eat, val); + if (errn < 0) { + return errn; + } + if (errn == 0) { + return errn; + } + + } + } + + + /* event codes */ + encodeNBitUnsignedInteger(stream, codeLength1, ec1); + encodeNBitUnsignedInteger(stream, codeLength2, ec2); + + /* qname */ + /* + errn = _exiEncodeQName(stream, state->nameTablePrepopulated, state->nameTableRuntime, + char** uri, char** localName); + QName qname = qnameDatatype.encodeQName(uri, localName, null, channel); + */ + /* content as string */ + /* + typeEncoder.isValid(BuiltIn.DEFAULT_DATATYPE, value); + typeEncoder.writeValue(qname, channel); + */ + return -1; + +} + + +int exiEncodeAttributeXsiNil(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + switch (state->grammarStack[state->stackIndex]) { - default: - return -1; } - return -1; + if (errn < 0) { + return errn; + } + + errn = encodeBoolean(stream, val->boolean); + if (errn >= 0 && val->boolean) { + /* handle xsi:nil == true */ + errn = exiHandleXsiNilTrue(state); + } + return errn; } +int exiEncodeAttributeXsiType(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + /* encode xsi:type event code */ + switch (state->grammarStack[state->stackIndex]) { + case 19: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 27: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 48: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 120: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 176: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 189: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 191: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 203: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 205: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 207: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 231: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 235: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 251: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 257: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 259: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 260: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 261: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 262: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 263: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 266: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 268: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 270: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 273: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 275: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 307: + errn = encodeNBitUnsignedInteger(stream, 3, 4); + break; + case 317: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 337: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 507: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 509: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 511: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 542: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + break; + + default: + return EXI_ERROR_UNEXPECTED_ATTRIBUTE_XSI_TYPE; + } + if (errn < 0) { + return errn; + } + + /* encode qname */ + errn = _exiEncodeNamespaceUriID(stream, &state->nameTablePrepopulated, &state->nameTableRuntime, val->eqname.namespaceURI); + if (errn < 0) { + return errn; + } + errn = _exiEncodeLocalNameID(stream, &state->nameTablePrepopulated, &state->nameTableRuntime, val->eqname.namespaceURI, val->eqname.localPart); + if (errn < 0) { + return errn; + } + + /* handle xsi type cast */ + errn = exiHandleXsiType(state, &val->eqname); + + return errn; +} #endif diff --git a/src/codec/EXIEncoder.h b/src/codec/EXIEncoder.h index 08ea7cb..294b823 100644 --- a/src/codec/EXIEncoder.h +++ b/src/codec/EXIEncoder.h @@ -10,6 +10,7 @@ * 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 . @@ -18,11 +19,14 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ + + #ifdef __cplusplus extern "C" { #endif @@ -30,22 +34,22 @@ extern "C" { #ifndef EXI_ENCODER_H #define EXI_ENCODER_H -#include -#include -#include - #include "EXITypes.h" -int exiInitEncoder(bitstream_t* stream, exi_state_t* state); +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, +int + exiEncodeStartElement(bitstream_t* stream, exi_state_t* state, eqname_t* se); -int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state, eqname_t* ee); +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); @@ -53,6 +57,12 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, 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 diff --git a/src/codec/EXIHeaderDecoder.c b/src/codec/EXIHeaderDecoder.c index d3edaa2..1e05bd0 100644 --- a/src/codec/EXIHeaderDecoder.c +++ b/src/codec/EXIHeaderDecoder.c @@ -1,34 +1,35 @@ -/* - * 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 . - */ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + -/******************************************************************* - * - * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 - * @contact Joerg.Heuer@siemens.com - * - ********************************************************************/ - -#include -#include #include "EXIHeaderDecoder.h" #include "BitInputStream.h" -#include "BitDecoderChannel.h" +#include "DecoderChannel.h" #ifndef EXI_HEADER_DECODER_C #define EXI_HEADER_DECODER_C @@ -41,10 +42,10 @@ int readEXIHeader(bitstream_t* stream) { } if(header == '$') { /* we do not support "EXI Cookie" */ - errn = -1; + errn = EXI_UNSUPPORTED_HEADER_COOKIE; } else if ( header & 0x20 ) { /* we do not support "Presence Bit for EXI Options" */ - errn = -2; + errn = EXI_UNSUPPORTED_HEADER_OPTIONS; } else { /* Yes, a *simple* header */ errn = 0; diff --git a/src/codec/EXIHeaderDecoder.h b/src/codec/EXIHeaderDecoder.h index 3533b0b..4be8d20 100644 --- a/src/codec/EXIHeaderDecoder.h +++ b/src/codec/EXIHeaderDecoder.h @@ -1,34 +1,36 @@ -/* - * 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 . - */ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + -/******************************************************************* - * - * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 - * @contact Joerg.Heuer@siemens.com - * - ********************************************************************/ #ifdef __cplusplus extern "C" { #endif -#include - #include "EXITypes.h" #ifndef EXI_HEADER_DECODER_H diff --git a/src/codec/EXIHeaderEncoder.c b/src/codec/EXIHeaderEncoder.c index 02d38d8..d9ab684 100644 --- a/src/codec/EXIHeaderEncoder.c +++ b/src/codec/EXIHeaderEncoder.c @@ -1,40 +1,41 @@ -/* - * 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 . - */ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + -/******************************************************************* - * - * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 - * @contact Joerg.Heuer@siemens.com - * - ********************************************************************/ - -#include -#include #include "EXIHeaderEncoder.h" #include "BitOutputStream.h" -#include "BitEncoderChannel.h" +#include "EncoderChannel.h" #ifndef EXI_HEADER_ENCODER_C #define EXI_HEADER_ENCODER_C int writeEXIHeader(bitstream_t* stream) { - return writeBits(stream, 8, 144); + return writeBits(stream, 8, 128); } diff --git a/src/codec/EXIHeaderEncoder.h b/src/codec/EXIHeaderEncoder.h index daf7862..f929787 100644 --- a/src/codec/EXIHeaderEncoder.h +++ b/src/codec/EXIHeaderEncoder.h @@ -1,34 +1,36 @@ -/* - * 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 . - */ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + -/******************************************************************* - * - * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 - * @contact Joerg.Heuer@siemens.com - * - ********************************************************************/ #ifdef __cplusplus extern "C" { #endif -#include - #include "EXITypes.h" #ifndef EXI_HEADER_ENCODER_H diff --git a/src/codec/EXITypes.h b/src/codec/EXITypes.h index cfd3568..4b7d92c 100644 --- a/src/codec/EXITypes.h +++ b/src/codec/EXITypes.h @@ -10,6 +10,7 @@ * 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 . @@ -18,31 +19,44 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ + + #ifdef __cplusplus extern "C" { #endif -#include + #include +#include + #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 -#define EXI_ELEMENT_STACK_SIZE 16 +/* EXI stream */ +#define BYTE_ARRAY 1 +#define FILE_STREAM 2 +#define EXI_STREAM BYTE_ARRAY +/*#define EXI_STREAM FILE_STREAM*/ -/* EXI automaton methods prefixes such as "inline" etc. */ -#ifndef EXI_MPFX -#define EXI_MPFX -#endif +#define EXI_ELEMENT_STACK_SIZE 16 #define FLOAT_EXPONENT_SPECIAL_VALUES -16384 #define FLOAT_MANTISSA_INFINITY 1 @@ -50,15 +64,94 @@ extern "C" { #define FLOAT_MANTISSA_NOT_A_NUMBER 0 typedef struct { - /* Integer Array */ - uint16_t size; /* array size */ +#if EXI_STREAM == BYTE_ARRAY + /* Byte Array */ + uint32_t size; /* array size */ uint8_t* data; /* int data array */ - uint16_t* pos; /* next position in 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; - uint16_t capacity; + 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 { + gYear, gYearMonth, date, dateTime, gMonth, gMonthDay, gDay, time +} datetime_type_t; + + typedef struct { /* Bytes Size and array container */ uint16_t size; @@ -76,6 +169,40 @@ typedef struct { 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; @@ -83,102 +210,211 @@ typedef struct { int32_t exponent; /* base-10 */ } float_me_t; - -typedef enum -{ - /* Binary */ - BINARY_BASE64, BINARY_HEX, - /* Boolean */ - BOOLEAN, - /* Decimal */ - DECIMAL, - /* Float */ - FLOAT, DOUBLE, - /* N-Bit Integer */ - NBIT_INTEGER_32, NBIT_INTEGER_64, NBIT_INTEGER_BIG, - /* Unsigned Integer */ - UNSIGNED_INTEGER_16, UNSIGNED_INTEGER_32, UNSIGNED_INTEGER_64, UNSIGNED_INTEGER_BIG, - /* (Signed) Integer */ - INTEGER_16, INTEGER_32, INTEGER_64, INTEGER_BIG, - /* Datetime */ - DATETIME, - /* String */ - STRING, - /* Enumeration */ - ENUMERATION, - /* List */ - LIST -} exi_datatype_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 */ + 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; -typedef enum -{ - START_DOCUMENT, - END_DOCUMENT, - START_ELEMENT, - START_ELEMENT_GENERIC, /* not supported yet */ - END_ELEMENT, - CHARACTERS, - CHARACTERS_GENERIC, /* not supported yet */ - ATTRIBUTE, - ATTRIBUTE_GENERIC, /* not supported yet */ - /* error state */ - ERROR -} exi_event_t; /* TODO list support */ typedef struct { - /* List container with memory size */ - uint16_t size; - uint8_t* data; /* 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; -typedef struct { - /* stack of grammar states and elements */ - uint16_t grammarStack [EXI_ELEMENT_STACK_SIZE]; - eqname_t elementStack [EXI_ELEMENT_STACK_SIZE]; +/* 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 { +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; + 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_OUT_OF_BOUNDS -100 +#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_UNKOWN_EVENT_CODE -110 +#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 diff --git a/src/codec/EncoderChannel.h b/src/codec/EncoderChannel.h new file mode 100644 index 0000000..1aecff0 --- /dev/null +++ b/src/codec/EncoderChannel.h @@ -0,0 +1,180 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + + + +#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 + + + + + + + + diff --git a/src/codec/MethodsBag.c b/src/codec/MethodsBag.c new file mode 100644 index 0000000..150ff55 --- /dev/null +++ b/src/codec/MethodsBag.c @@ -0,0 +1,106 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + + + +#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 + diff --git a/src/codec/MethodsBag.h b/src/codec/MethodsBag.h new file mode 100644 index 0000000..f6adb5a --- /dev/null +++ b/src/codec/MethodsBag.h @@ -0,0 +1,59 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + + + +#ifndef METHODS_BAG_H +#define METHODS_BAG_H + +#include +#include +#include +#include + +/** + * 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 n. Returns 1 if n is 0. + * + * @param n + * integer value + * + */ +uint8_t numberOf7BitBlocksToRepresent(uint32_t n); + + +#endif + diff --git a/src/codec/NameTableEntries.c b/src/codec/NameTableEntries.c new file mode 100644 index 0000000..bde769e --- /dev/null +++ b/src/codec/NameTableEntries.c @@ -0,0 +1,185 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + + + +#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 + diff --git a/src/codec/StringTableEntries.h b/src/codec/NameTableEntries.h similarity index 63% rename from src/codec/StringTableEntries.h rename to src/codec/NameTableEntries.h index d3cd6c2..099af2e 100644 --- a/src/codec/StringTableEntries.h +++ b/src/codec/NameTableEntries.h @@ -10,6 +10,7 @@ * 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 . @@ -18,43 +19,23 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ -#ifndef STRING_TABLE_ENTRIES_H -#define STRING_TABLE_ENTRIES_H -#include -#include -#include -#include -/* ==================================== */ -/* String Table Structures */ - -struct exiPartition { - /* length of array */ - uint16_t len; - /* array of string entries */ - const char** entries; -}; - -struct exiStringTable { - /* length of both arrays (uris & localNames) */ - uint16_t len; - /* URI entries*/ - const char** uris; - /* localName entries divided by URI */ - struct exiPartition * localNames; -}; +#ifndef NAME_TABLE_ENTRIES_H +#define NAME_TABLE_ENTRIES_H +#include "EXITypes.h" /* ==================================== */ /* String Table Population */ -extern struct exiStringTable stringTable; +extern exi_name_table_prepopulated_t nameTablePrepopulated; #endif diff --git a/src/codec/StringTable.c b/src/codec/StringTable.c index 8bec0df..308848b 100644 --- a/src/codec/StringTable.c +++ b/src/codec/StringTable.c @@ -10,6 +10,7 @@ * 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 . @@ -18,91 +19,219 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ + + #ifndef STRING_TABLE_C #define STRING_TABLE_C -#include -#include #include -#include #include "StringTable.h" +#include "NameTableEntries.h" -#include "StringTableEntries.h" - -#include "assert.h" - -int exiGetUri(uint16_t uriID, const char** uri) { - if ( uriID < stringTable.len ) { - *uri = stringTable.uris[uriID]; +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 exiGetUriLength(uint16_t* uriLength) { - *uriLength = stringTable.len; +int exiGetUriSize(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t* uriLength) { + *uriLength = prepopulatedTable->len; return 0; } - -int exiGetUriID(const char* uri, uint16_t* uriID) { +/* 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; ilen; i++) { + if (strcmp(uri, prepopulatedTable->uris[i]) == 0) { *uriID = i; return 0; } } - return -1; + 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(uint16_t uriID, uint16_t localNameID, const char** localName) { - if ( uriID < stringTable.len ) { - if ( localNameID < stringTable.localNames[uriID].len ) { - *localName = stringTable.localNames[uriID].entries[localNameID]; +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; } - } else { - return EXI_ERROR_OUT_OF_BOUNDS; } - return 0; -} - -int exiGetLocalNameLength(uint16_t uriID, uint16_t* localNameLength) { - if ( uriID < stringTable.len ) { - *localNameLength = stringTable.localNames[uriID].len; - } else { - 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; } -int exiGetLocalNameID(uint16_t uriID, const char* localName, uint16_t* localNameID) { +/* 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 < stringTable.len ) { + if (uriID < prepopulatedTable->len) { + /* pre-populated names */ /* TODO binary search */ - for(i=0; ilocalNames[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; } +} - return -1; +/* 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 diff --git a/src/codec/StringTable.h b/src/codec/StringTable.h index be22fa8..55046da 100644 --- a/src/codec/StringTable.h +++ b/src/codec/StringTable.h @@ -10,6 +10,7 @@ * 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 . @@ -18,11 +19,14 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXIdizer

********************************************************************/ + + #ifdef __cplusplus extern "C" { #endif @@ -32,21 +36,31 @@ extern "C" { #include "EXITypes.h" -int exiGetUri(uint16_t uriID, const char** uri); +int exiGetUri(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID, const char** uri); -int exiGetUriLength(uint16_t* uriLength); +int exiGetUriSize(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t* uriLength); -int exiGetUriID(const char* uri, uint16_t* uriID); +/* 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(uint16_t uriID, uint16_t localNameID, const char** localName); +int exiGetLocalName(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID, uint16_t localNameID, const char** localName); -int exiGetLocalNameLength(uint16_t uriID, uint16_t* localNameLength); +int exiGetLocalNameSize(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID, uint16_t* localNameLength); -int exiGetLocalNameID(uint16_t uriID, const char* localName, uint16_t* localNameID); +/* 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 diff --git a/src/codec/StringTableEntries.c b/src/codec/StringTableEntries.c deleted file mode 100644 index 83158c8..0000000 --- a/src/codec/StringTableEntries.c +++ /dev/null @@ -1,134 +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 . - */ - -/******************************************************************* - * - * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 - * @contact Joerg.Heuer@siemens.com - * - ********************************************************************/ - -#ifndef STRING_TABLE_ENTRIES_C -#define STRING_TABLE_ENTRIES_C - -#include "StringTableEntries.h" - - -/* ==================================== */ -/* String Table Population */ - -/* localName entries for URI id = 0 */ -const char * localNames0[] = { - NULL -}; -/* localName entries for URI id = 1 */ -const char * localNames1[] = { - "base", "id", "lang", "space" -}; -/* localName entries for URI id = 2 */ -const char * localNames2[] = { - "nil", "type" -}; -/* localName entries for URI id = 3 */ -const 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 */ -const char * localNames4[] = { - "CableCheckReq", "CableCheckReqType", "CableCheckRes", "CableCheckResType", "ChargeParameterDiscoveryReq", - "ChargeParameterDiscoveryReqType", "ChargeParameterDiscoveryRes", "ChargeParameterDiscoveryResType", "ChargingMode", "ContractID", - "CurrentDemandReq", "CurrentDemandReqType", "CurrentDemandRes", "CurrentDemandResType", "CurrentDifferential", - "EAmount", "EVSEID", "EVSEMaxCurrent", "EVSEMaxPhases", "EVSEMaxPower", - "EVSEMaxVoltage", "EVSEMinCurrent", "EVSEMinVoltage", "EVSEPresentCurrent", "EVSEPresentVoltage", - "EVSEStatus", "EnergyProvider", "EoC", "LineLockReq", "LineLockReqType", - "LineLockRes", "LineLockResType", "MeterInfo", "MeteringReceiptReq", "MeteringReceiptReqType", - "MeteringReceiptRes", "MeteringReceiptResType", "MeteringStatusReq", "MeteringStatusReqType", "MeteringStatusRes", - "MeteringStatusResType", "PCurrent", "PEVDemandCurrent", "PEVID", "PEVMaxCurrent", - "PEVMaxPhases", "PEVMaxPower", "PEVMaxVoltage", "PEVMinCurrent", "PEVMinVoltage", - "PEVStatus", "PEVTargetVoltage", "PaymentDetailsReq", "PaymentDetailsReqType", "PaymentDetailsRes", - "PaymentDetailsResType", "PowerDeliveryReq", "PowerDeliveryReqType", "PowerDeliveryRes", "PowerDeliveryResType", - "PreChargeReq", "PreChargeReqType", "PreChargeRes", "PreChargeResType", "ReqLockStatus", - "ReqSwitchStatus", "ResponseCode", "ServiceDiscoveryReq", "ServiceDiscoveryReqType", "ServiceDiscoveryRes", - "ServiceDiscoveryResType", "ServiceList", "ServicePaymentSelectionReq", "ServicePaymentSelectionReqType", "ServicePaymentSelectionRes", - "ServicePaymentSelectionResType", "ServiceScope", "ServiceType", "SessionSetupReq", "SessionSetupReqType", - "SessionSetupRes", "SessionSetupResType", "TCurrent", "Tariff", "TariffTable", - "TerminateChargingReq", "TerminateChargingReqType", "TerminateChargingRes", "TerminateChargingResType", "VoltageDifferential", - "WeldingDetectionReq", "WeldingDetectionReqType", "WeldingDetectionRes", "WeldingDetectionResType" -}; -/* localName entries for URI id = 5 */ -const char * localNames5[] = { - "ChargerStandby", "ChargingProfileEntryMaxPower", "ChargingProfileEntryStart", "ChargingProfileType", "ConnectorLocked", - "Currency", "EPrice", "EVSEMalfunction", "EVSEStandby", "EVSEStatusType", - "Event", "EventList", "EventListType", "FatalError", "FaultCode", - "FaultMsg", "FloatingValueType", "MeterID", "MeterInfoType", "MeterReading", - "MeterStatus", "Multiplier", "NotificationType", "PEVStatusType", "PowerSwitchClosed", - "ProtocolVersion", "RCD", "ReadyToCharge", "Service", "ServiceDescriptionType", - "ServiceID", "ServiceListType", "ServiceName", "ServiceScope", "ServiceSessionID", - "ServiceType", "SessionID", "SessionInformationType", "ShutDownTime", "StopCharging", - "TMeter", "Tariff", "TariffDescrType", "TariffDescription", "TariffEntries", - "TariffEntriesType", "TariffEntry", "TariffEntryType", "TariffID", "TariffPMax", - "TariffStart", "TariffTableType", "Unit", "Value", "chargingModeType", - "contractIDType", "currencyType", "energyProviderType", "eventEntryType", "evseIDType", - "fatalErrorType", "faultCodeType", "lockStatusType", "maxPhasesType", "meterIDType", - "meterStatusType", "paymentOptionListType", "paymentOptionType", "pevIDType", "protocolVersionType", - "pubKeyType", "rcdType", "responseCode_CableCheckType", "responseCode_ChargeParameterDiscoveryType", "responseCode_CurrentDemandType", - "responseCode_LineLockType", "responseCode_MeteringReceiptType", "responseCode_MeteringStatusType", "responseCode_PaymentDetailsType", "responseCode_PowerDeliveryType", - "responseCode_PreChargeType", "responseCode_ServiceDiscoveryType", "responseCode_ServicePaymentSelectionType", "responseCode_SessionSetupType", "responseCode_TerminateChargingType", - "responseCode_WeldingDetectionType", "serviceDetailsType", "serviceIDType", "serviceNameType", "serviceScopeType", - "serviceTypeType", "sessionIDType", "standbyType", "switchStatusType", "tariffDescriptionType", - "tariffIDType", "tariffStartType", "timeType", "unitMultiplierType", "unitSymbolType" - -}; -/* localName entries for URI id = 6 */ -const char * localNames6[] = { - "Body", "BodyBaseType", "BodyElement", "BodyType", "Header", - "V2G_Message" -}; -/* localName entries for URI id = 7 */ -const char * localNames7[] = { - "HeaderType", "Notification", "SessionInformation" -}; -struct exiPartition localNamePartitions[8] = { - { 0, localNames0 }, - { 4, localNames1 }, - { 2, localNames2 }, - { 46, localNames3 }, - { 94, localNames4 }, - { 100, localNames5 }, - { 6, localNames6 }, - { 3, localNames7 } -}; -const char * uris[] = { - "", "http://www.w3.org/XML/1998/namespace", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/2001/XMLSchema", "urn:iso:15118:2:2010:eval1.0:MsgBody", "urn:iso:15118:2:2010:eval1.0:MsgDataTypes", "urn:iso:15118:2:2010:eval1.0:MsgDef", "urn:iso:15118:2:2010:eval1.0:MsgHeader" -}; -struct exiStringTable stringTable = { 8, uris, localNamePartitions }; - - - - -#endif - diff --git a/src/codec/UCSString.c b/src/codec/UCSString.c index 60530a6..46a10ee 100644 --- a/src/codec/UCSString.c +++ b/src/codec/UCSString.c @@ -1,34 +1,35 @@ -/* - * 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 . - */ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + -/******************************************************************* - * - * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 - * @contact Joerg.Heuer@siemens.com - * - ********************************************************************/ -#include -#include #include -#include -#include "BitDecoderChannel.h" +#include "DecoderChannel.h" #include "BitInputStream.h" #include "EXITypes.h" @@ -45,11 +46,12 @@ int toUCSString(char* chars, string_ucs_t* s) { } return 0; } else { - return -1; + return EXI_ERROR_OUT_OF_STRING_BUFFER; } } -/* Note: fails if string contains non ASCII characters */ +/* 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; ilen; i++) { diff --git a/src/codec/UCSString.h b/src/codec/UCSString.h index 9eacf50..6adcdaa 100644 --- a/src/codec/UCSString.h +++ b/src/codec/UCSString.h @@ -1,27 +1,31 @@ -/* - * 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 . - */ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Code generated by EXIdizer

+ ********************************************************************/ + -/******************************************************************* - * - * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 - * @contact Joerg.Heuer@siemens.com - * - ********************************************************************/ #ifdef __cplusplus extern "C" { diff --git a/src/service/v2g_service.h b/src/service/v2g_service.h index 2c8c366..eb16673 100644 --- a/src/service/v2g_service.h +++ b/src/service/v2g_service.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * 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 @@ -18,7 +18,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -62,10 +62,15 @@ struct EXIService /* error code */ uint8_t errorCode; - /* offset for transport header data */ + /* 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 diff --git a/src/service/v2g_serviceClientDataTransmitter.h b/src/service/v2g_serviceClientDataTransmitter.h index 7e3225f..5ded49a 100644 --- a/src/service/v2g_serviceClientDataTransmitter.h +++ b/src/service/v2g_serviceClientDataTransmitter.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * 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 @@ -19,7 +19,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/service/v2g_serviceClientStubs.c b/src/service/v2g_serviceClientStubs.c index 1a629c9..f611d42 100644 --- a/src/service/v2g_serviceClientStubs.c +++ b/src/service/v2g_serviceClientStubs.c @@ -20,9 +20,11 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXISeGen

+ * ********************************************************************/ @@ -34,242 +36,498 @@ #include "EXITypes.h" #include "EXIDecoder.h" #include "EXIEncoder.h" + #include "StringTable.h" + #include 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 + * \param result struct SessionSetupResType* Contains the response data from the server * \return 0 = 0K; -1 = ERROR */ -int call_sessionSetup(struct EXIService* service, struct HeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result) +int call_sessionSetup(struct EXIService* service, struct MessageHeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result) { - uint16_t posEncode, posDecode; - + 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) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + 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) + if(service->errorCode) { return -1; } - - + + service->exiMsg.V2G_Message.Body.SessionSetupRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) { - + return -1; } - - - return 0; -} -/** + + 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 + * \param result struct ServiceDiscoveryResType* Contains the response data from the server * \return 0 = 0K; -1 = ERROR */ -int call_serviceDiscovery(struct EXIService* service, struct HeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result) +int call_serviceDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result) { - uint16_t posEncode, posDecode; - + 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) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + 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) + if(service->errorCode) { return -1; } - - + + + init_ServiceDiscoveryResType(result); service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) { - + return -1; } - - - return 0; -} -/** + + 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 + * \param result struct ServicePaymentSelectionResType* Contains the response data from the server * \return 0 = 0K; -1 = ERROR */ -int call_selectedServicePayment(struct EXIService* service, struct HeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result) +int call_selectedServicePayment(struct EXIService* service, struct MessageHeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result) { - uint16_t posEncode, posDecode; - + 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) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + 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) + if(service->errorCode) { return -1; } - - + + service->exiMsg.V2G_Message.Body.ServicePaymentSelectionRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) { - + return -1; } - - - return 0; -} -/** + + 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 + * \param result struct PaymentDetailsResType* Contains the response data from the server * \return 0 = 0K; -1 = ERROR */ -int call_paymentDetails(struct EXIService* service, struct HeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result) +int call_paymentDetails(struct EXIService* service, struct MessageHeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result) { - uint16_t posEncode, posDecode; + 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; @@ -281,7 +539,8 @@ int call_paymentDetails(struct EXIService* service, struct HeaderType* header, s service->outStream.capacity = 8; /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); /* init inStream data structure */ posDecode = service->transportHeaderOffset; @@ -298,8 +557,8 @@ int call_paymentDetails(struct EXIService* service, struct HeaderType* header, s /* 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; + service->exiMsg.V2G_Message.Body.ContractAuthenticationReq = params; + service->exiMsg.V2G_Message.Body.isused.ContractAuthenticationReq=1; /* encode data to exi stream*/ if(serialize_message(service)) @@ -317,10 +576,12 @@ int call_paymentDetails(struct EXIService* service, struct HeaderType* header, s - service->exiMsg.V2G_Message.Body.PaymentDetailsRes = result; + service->exiMsg.V2G_Message.Body.ContractAuthenticationRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) @@ -341,9 +602,11 @@ int call_paymentDetails(struct EXIService* service, struct HeaderType* header, s * \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 HeaderType* header, struct ChargeParameterDiscoveryReqType* params, struct ChargeParameterDiscoveryResType* result) +int call_chargeParameterDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* params, struct ChargeParameterDiscoveryResType* result) { - uint16_t posEncode, posDecode; + uint32_t posEncode, posDecode; + exi_name_table_runtime_t runtimeTableDecode; + exi_name_table_runtime_t runtimeTableEncode; /* init uniqueID stack */ service->idPath.pos=0; @@ -355,7 +618,8 @@ int call_chargeParameterDiscovery(struct EXIService* service, struct HeaderType* service->outStream.capacity = 8; /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); /* init inStream data structure */ posDecode = service->transportHeaderOffset; @@ -394,7 +658,9 @@ int call_chargeParameterDiscovery(struct EXIService* service, struct HeaderType* service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) @@ -415,9 +681,11 @@ int call_chargeParameterDiscovery(struct EXIService* service, struct HeaderType* * \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 HeaderType* header, struct LineLockReqType* params, struct LineLockResType* result) +int call_lineLock(struct EXIService* service, struct MessageHeaderType* header, struct LineLockReqType* params, struct LineLockResType* result) { - uint16_t posEncode, posDecode; + uint32_t posEncode, posDecode; + exi_name_table_runtime_t runtimeTableDecode; + exi_name_table_runtime_t runtimeTableEncode; /* init uniqueID stack */ service->idPath.pos=0; @@ -429,7 +697,8 @@ int call_lineLock(struct EXIService* service, struct HeaderType* header, struct service->outStream.capacity = 8; /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); /* init inStream data structure */ posDecode = service->transportHeaderOffset; @@ -468,7 +737,9 @@ int call_lineLock(struct EXIService* service, struct HeaderType* header, struct service->exiMsg.V2G_Message.Body.LineLockRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) @@ -489,9 +760,11 @@ int call_lineLock(struct EXIService* service, struct HeaderType* header, struct * \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 HeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result) +int call_powerDelivery(struct EXIService* service, struct MessageHeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result) { - uint16_t posEncode, posDecode; + uint32_t posEncode, posDecode; + exi_name_table_runtime_t runtimeTableDecode; + exi_name_table_runtime_t runtimeTableEncode; /* init uniqueID stack */ service->idPath.pos=0; @@ -503,7 +776,8 @@ int call_powerDelivery(struct EXIService* service, struct HeaderType* header, st service->outStream.capacity = 8; /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); /* init inStream data structure */ posDecode = service->transportHeaderOffset; @@ -542,7 +816,9 @@ int call_powerDelivery(struct EXIService* service, struct HeaderType* header, st service->exiMsg.V2G_Message.Body.PowerDeliveryRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) @@ -560,11 +836,14 @@ int call_powerDelivery(struct EXIService* service, struct HeaderType* header, st * \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 result struct MeteringStatusResType* Contains the response data from the server + * \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 HeaderType* header, struct MeteringStatusResType* result) +int call_meteringStatus(struct EXIService* service, struct MessageHeaderType* header, struct MeteringStatusReqType* params, struct MeteringStatusResType* result) { - uint16_t posEncode, posDecode; + uint32_t posEncode, posDecode; + exi_name_table_runtime_t runtimeTableDecode; + exi_name_table_runtime_t runtimeTableEncode; /* init uniqueID stack */ service->idPath.pos=0; @@ -576,7 +855,8 @@ int call_meteringStatus(struct EXIService* service, struct HeaderType* header, s service->outStream.capacity = 8; /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); /* init inStream data structure */ posDecode = service->transportHeaderOffset; @@ -593,6 +873,7 @@ int call_meteringStatus(struct EXIService* service, struct HeaderType* header, s /* 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*/ @@ -614,7 +895,9 @@ int call_meteringStatus(struct EXIService* service, struct HeaderType* header, s service->exiMsg.V2G_Message.Body.MeteringStatusRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) @@ -635,9 +918,11 @@ int call_meteringStatus(struct EXIService* service, struct HeaderType* header, s * \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 HeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result) +int call_meteringReceipt(struct EXIService* service, struct MessageHeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result) { - uint16_t posEncode, posDecode; + uint32_t posEncode, posDecode; + exi_name_table_runtime_t runtimeTableDecode; + exi_name_table_runtime_t runtimeTableEncode; /* init uniqueID stack */ service->idPath.pos=0; @@ -649,7 +934,8 @@ int call_meteringReceipt(struct EXIService* service, struct HeaderType* header, service->outStream.capacity = 8; /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); /* init inStream data structure */ posDecode = service->transportHeaderOffset; @@ -688,7 +974,168 @@ int call_meteringReceipt(struct EXIService* service, struct HeaderType* header, service->exiMsg.V2G_Message.Body.MeteringReceiptRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* 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) @@ -709,9 +1156,11 @@ int call_meteringReceipt(struct EXIService* service, struct HeaderType* header, * \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 HeaderType* header, struct CableCheckReqType* params, struct CableCheckResType* result) +int call_cableCheck(struct EXIService* service, struct MessageHeaderType* header, struct CableCheckReqType* params, struct CableCheckResType* result) { - uint16_t posEncode, posDecode; + uint32_t posEncode, posDecode; + exi_name_table_runtime_t runtimeTableDecode; + exi_name_table_runtime_t runtimeTableEncode; /* init uniqueID stack */ service->idPath.pos=0; @@ -723,7 +1172,8 @@ int call_cableCheck(struct EXIService* service, struct HeaderType* header, struc service->outStream.capacity = 8; /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); /* init inStream data structure */ posDecode = service->transportHeaderOffset; @@ -762,7 +1212,9 @@ int call_cableCheck(struct EXIService* service, struct HeaderType* header, struc service->exiMsg.V2G_Message.Body.CableCheckRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) @@ -783,9 +1235,11 @@ int call_cableCheck(struct EXIService* service, struct HeaderType* header, struc * \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 HeaderType* header, struct PreChargeReqType* params, struct PreChargeResType* result) +int call_preCharge(struct EXIService* service, struct MessageHeaderType* header, struct PreChargeReqType* params, struct PreChargeResType* result) { - uint16_t posEncode, posDecode; + uint32_t posEncode, posDecode; + exi_name_table_runtime_t runtimeTableDecode; + exi_name_table_runtime_t runtimeTableEncode; /* init uniqueID stack */ service->idPath.pos=0; @@ -797,7 +1251,8 @@ int call_preCharge(struct EXIService* service, struct HeaderType* header, struct service->outStream.capacity = 8; /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); /* init inStream data structure */ posDecode = service->transportHeaderOffset; @@ -836,7 +1291,9 @@ int call_preCharge(struct EXIService* service, struct HeaderType* header, struct service->exiMsg.V2G_Message.Body.PreChargeRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) @@ -857,9 +1314,11 @@ int call_preCharge(struct EXIService* service, struct HeaderType* header, struct * \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 HeaderType* header, struct CurrentDemandReqType* params, struct CurrentDemandResType* result) +int call_currentDemand(struct EXIService* service, struct MessageHeaderType* header, struct CurrentDemandReqType* params, struct CurrentDemandResType* result) { - uint16_t posEncode, posDecode; + uint32_t posEncode, posDecode; + exi_name_table_runtime_t runtimeTableDecode; + exi_name_table_runtime_t runtimeTableEncode; /* init uniqueID stack */ service->idPath.pos=0; @@ -871,7 +1330,8 @@ int call_currentDemand(struct EXIService* service, struct HeaderType* header, st service->outStream.capacity = 8; /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); /* init inStream data structure */ posDecode = service->transportHeaderOffset; @@ -910,7 +1370,9 @@ int call_currentDemand(struct EXIService* service, struct HeaderType* header, st service->exiMsg.V2G_Message.Body.CurrentDemandRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) @@ -931,9 +1393,11 @@ int call_currentDemand(struct EXIService* service, struct HeaderType* header, st * \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 HeaderType* header, struct WeldingDetectionReqType* params, struct WeldingDetectionResType* result) +int call_weldingDetection(struct EXIService* service, struct MessageHeaderType* header, struct WeldingDetectionReqType* params, struct WeldingDetectionResType* result) { - uint16_t posEncode, posDecode; + uint32_t posEncode, posDecode; + exi_name_table_runtime_t runtimeTableDecode; + exi_name_table_runtime_t runtimeTableEncode; /* init uniqueID stack */ service->idPath.pos=0; @@ -945,7 +1409,8 @@ int call_weldingDetection(struct EXIService* service, struct HeaderType* header, service->outStream.capacity = 8; /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); /* init inStream data structure */ posDecode = service->transportHeaderOffset; @@ -984,7 +1449,9 @@ int call_weldingDetection(struct EXIService* service, struct HeaderType* header, service->exiMsg.V2G_Message.Body.WeldingDetectionRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) @@ -1005,9 +1472,11 @@ int call_weldingDetection(struct EXIService* service, struct HeaderType* header, * \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 HeaderType* header, struct TerminateChargingReqType* params, struct TerminateChargingResType* result) +int call_terminateCharging(struct EXIService* service, struct MessageHeaderType* header, struct TerminateChargingReqType* params, struct TerminateChargingResType* result) { - uint16_t posEncode, posDecode; + uint32_t posEncode, posDecode; + exi_name_table_runtime_t runtimeTableDecode; + exi_name_table_runtime_t runtimeTableEncode; /* init uniqueID stack */ service->idPath.pos=0; @@ -1019,7 +1488,8 @@ int call_terminateCharging(struct EXIService* service, struct HeaderType* header service->outStream.capacity = 8; /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); /* init inStream data structure */ posDecode = service->transportHeaderOffset; @@ -1058,7 +1528,9 @@ int call_terminateCharging(struct EXIService* service, struct HeaderType* header service->exiMsg.V2G_Message.Body.TerminateChargingRes = result; /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); /* deserilize the response message */ if(deserializeMessage(service)<0) @@ -1082,65 +1554,298 @@ 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 66: /*ResponseCode*/ + 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] == 80) + if( service->idPath.id[2] == 116) { service->exiMsg.V2G_Message.Body.SessionSetupRes->ResponseCode = service->val.enumeration; - } else if(service->idPath.id[2] == 69) + } else if(service->idPath.id[2] == 102) { service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ResponseCode = service->val.enumeration; - } else if(service->idPath.id[2] == 74) + } 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] == 54) + } else if(service->idPath.id[2] == 77) { service->exiMsg.V2G_Message.Body.PaymentDetailsRes->ResponseCode = service->val.enumeration; - } else if(service->idPath.id[2] == 6) + } 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] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 58) + } else if(service->idPath.id[2] == 82) { service->exiMsg.V2G_Message.Body.PowerDeliveryRes->ResponseCode = service->val.enumeration; - } else if(service->idPath.id[2] == 39) + } else if(service->idPath.id[2] == 63) { service->exiMsg.V2G_Message.Body.MeteringStatusRes->ResponseCode = service->val.enumeration; - } else if(service->idPath.id[2] == 35) + } else if(service->idPath.id[2] == 59) { service->exiMsg.V2G_Message.Body.MeteringReceiptRes->ResponseCode = service->val.enumeration; - } else if(service->idPath.id[2] == 2) + } 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] == 62) + } else if(service->idPath.id[2] == 86) { service->exiMsg.V2G_Message.Body.PreChargeRes->ResponseCode = service->val.enumeration; - } else if(service->idPath.id[2] == 12) + } else if(service->idPath.id[2] == 35) { service->exiMsg.V2G_Message.Body.CurrentDemandRes->ResponseCode = service->val.enumeration; - } else if(service->idPath.id[2] == 92) + } else if(service->idPath.id[2] == 128) { service->exiMsg.V2G_Message.Body.WeldingDetectionRes->ResponseCode = service->val.enumeration; - } else if(service->idPath.id[2] == 87) + } else if(service->idPath.id[2] == 123) { service->exiMsg.V2G_Message.Body.TerminateChargingRes->ResponseCode = service->val.enumeration; } @@ -1153,16 +1858,16 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 16: /*EVSEID*/ + case 41: /*EVSEID*/ if(service->val.type == BINARY_HEX) { - if( service->idPath.id[2] == 80) + 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] == 39) + } 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; @@ -1176,21 +1881,21 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 82: /*TCurrent*/ + case 118: /*TCurrent*/ - if(service->val.type == INTEGER_32) + if(service->val.type == INTEGER) { - if( service->idPath.id[2] == 80) + if( service->idPath.id[2] == 116) { - service->exiMsg.V2G_Message.Body.SessionSetupRes->TCurrent = service->val.int32; + _setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.SessionSetupRes->TCurrent)); - } else if(service->idPath.id[2] == 54) + } else if(service->idPath.id[2] == 77) { - service->exiMsg.V2G_Message.Body.PaymentDetailsRes->TCurrent = service->val.int32; + _setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.PaymentDetailsRes->TCurrent)); - } else if(service->idPath.id[2] == 39) + } else if(service->idPath.id[2] == 63) { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->TCurrent = service->val.int32; + _setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.MeteringStatusRes->TCurrent)); } } @@ -1201,11 +1906,12 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 18: /*EVSEMaxPhases*/ + case 51: /*GenChallenge*/ - if(service->val.type == INTEGER_16) + if(service->val.type == STRING) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxPhases = service->val.int32; + 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 @@ -1215,7 +1921,7 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 26: /*EnergyProvider*/ + case 50: /*EnergyProvider*/ if(service->val.type == STRING) { @@ -1230,12 +1936,141 @@ static int deserializeElementCharacter(struct EXIService* service) } + 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 5: + case 6: switch(service->eqn.localPart) { - case 36: /*SessionID*/ + case 132: /*SessionID*/ if(service->val.type == BINARY_HEX) { @@ -1250,7 +2085,7 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 34: /*ServiceSessionID*/ + case 127: /*ServiceSessionID*/ if(service->val.type == BINARY_HEX) { @@ -1266,7 +2101,7 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 25: /*ProtocolVersion*/ + case 107: /*ProtocolVersion*/ if(service->val.type == STRING) { @@ -1282,21 +2117,7 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 10: /*Event*/ - - if(service->val.type == ENUMERATION) - { - service->exiMsg.V2G_Message.Header->Notification.EventList.Event = service->val.enumeration; - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 14: /*FaultCode*/ + case 67: /*FaultCode*/ if(service->val.type == ENUMERATION) { @@ -1311,7 +2132,7 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 15: /*FaultMsg*/ + case 68: /*FaultMsg*/ if(service->val.type == STRING) { @@ -1327,49 +2148,17 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 13: /*FatalError*/ + case 103: /*PaymentOption*/ - if(service->val.type == BOOLEAN) + if(service->val.type == ENUMERATION) { - if( service->idPath.id[2] == 80) + if( service->idPath.id[2] == 102) { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.FatalError = service->val.boolean; + 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] == 6) + } else if(service->idPath.id[2] == 98) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.FatalError = service->val.boolean; + service->exiMsg.V2G_Message.Body.ServiceDetailRes->PaymentOptions.PaymentOption[service->exiMsg.V2G_Message.Body.ServiceDetailRes->PaymentOptions.arraylen.PaymentOption++] = service->val.enumeration; } } @@ -1380,551 +2169,49 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 8: /*EVSEStandby*/ - - if(service->val.type == BOOLEAN) - { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.EVSEStandby = service->val.boolean; - } - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 4: /*ConnectorLocked*/ - - if(service->val.type == BOOLEAN) - { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.ConnectorLocked = service->val.boolean; - } - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 24: /*PowerSwitchClosed*/ - - if(service->val.type == BOOLEAN) - { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - } - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 26: /*RCD*/ - - if(service->val.type == BOOLEAN) - { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.RCD = service->val.boolean; - } - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 38: /*ShutDownTime*/ - - if(service->val.type == INTEGER_32) - { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.ShutDownTime = service->val.int32; - } - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 0: /*ChargerStandby*/ - - if(service->val.type == BOOLEAN) - { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.ChargerStandby = service->val.boolean; - } - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 7: /*EVSEMalfunction*/ - - if(service->val.type == BOOLEAN) - { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - } - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 39: /*StopCharging*/ - - if(service->val.type == BOOLEAN) - { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.StopCharging = service->val.boolean; - } - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 30: /*ServiceID*/ + case 120: /*ServiceID*/ if(service->val.type == BINARY_HEX) { - 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); + 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 - { - return -1; /* wrong data type */ - } - - - break; - case 32: /*ServiceName*/ - - if(service->val.type == STRING) - { - 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 - { - return -1; /* wrong data type */ - } - - - break; - case 35: /*ServiceType*/ - - if(service->val.type == ENUMERATION) - { - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceType = service->val.enumeration; - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].isused.ServiceType=1; - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 33: /*ServiceScope*/ - - if(service->val.type == STRING) - { - 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 - { - return -1; /* wrong data type */ - } - - - break; - case 21: /*Multiplier*/ - - if(service->val.type == INTEGER_16) - { - if( service->idPath.id[3] == 20) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxVoltage.Multiplier = service->val.int32; - } else if(service->idPath.id[3] == 22) + } else if(service->idPath.id[3] == 114) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMinVoltage.Multiplier = service->val.int32; + 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] == 17) + } else if(service->idPath.id[3] == 112) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxCurrent.Multiplier = service->val.int32; + 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] == 21) + } else if(service->idPath.id[3] == 116) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMinCurrent.Multiplier = service->val.int32; + 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] == 19) + } else if(service->idPath.id[3] == 124) { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEMaxPower.Multiplier = service->val.int32; + 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] == 41) + } else if(service->idPath.id[3] == 121) { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->PCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 23) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEPresentVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[4] == 19) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterReading.Multiplier = service->val.int32; - - } else if(service->idPath.id[7] == 49) - { - 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.Multiplier = service->val.int32; - - } else if(service->idPath.id[7] == 6) - { - 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.Multiplier = service->val.int32; + 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; } } @@ -1935,65 +2222,499 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 52: /*Unit*/ + 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] == 20) + if( service->idPath.id[3] == 111) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxVoltage.Unit = service->val.enumeration; + 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] == 22) + } else if(service->idPath.id[3] == 20) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMinVoltage.Unit = service->val.enumeration; + 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] == 17) + } else if(service->idPath.id[3] == 105) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxCurrent.Unit = service->val.enumeration; + 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] == 21) + } else if(service->idPath.id[3] == 114) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMinCurrent.Unit = service->val.enumeration; + 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] == 19) + } 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] == 41) + } else if(service->idPath.id[3] == 66) { service->exiMsg.V2G_Message.Body.MeteringStatusRes->PCurrent.Unit = service->val.enumeration; - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 62) + } 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] == 24 && service->idPath.id[2] == 12) + } 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] == 23) + } else if(service->idPath.id[3] == 47) { service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Unit = service->val.enumeration; - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 92) + } 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] == 24 && service->idPath.id[2] == 87) + } 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] == 19) + } 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 if(service->idPath.id[7] == 49) - { - 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.Unit = service->val.enumeration; - - } else if(service->idPath.id[7] == 6) - { - 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.Unit = service->val.enumeration; } } @@ -2004,65 +2725,103 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 53: /*Value*/ + case 152: /*Value*/ - if(service->val.type == INTEGER_32) + if(service->val.type == INTEGER) { - if( service->idPath.id[3] == 20) + _setInt16Value( &(service->val.integer),&(service->val.integer.val.int16)); + + if( service->idPath.id[3] == 42) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxVoltage.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEMaxPower.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 22) + } else if(service->idPath.id[3] == 66) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMinVoltage.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.MeteringStatusRes->PCurrent.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 17) + } else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 86) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxCurrent.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 21) + } else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 35) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMinCurrent.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 19) + } else if(service->idPath.id[3] == 47) { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEMaxPower.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 41) + } else if(service->idPath.id[3] == 45) { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->PCurrent.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumVoltageLimit.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 62) + } else if(service->idPath.id[3] == 43) { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumCurrentLimit.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 12) + } else if(service->idPath.id[3] == 44) { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumPowerLimit.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 23) + } else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 128) { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 92) + } else if(service->idPath.id[3] == 48 && service->idPath.id[2] == 123) { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEPresentVoltage.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 87) + } else if(service->idPath.id[4] == 50) { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEPresentVoltage.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxVoltage.Value = service->val.integer.val.int16; - } else if(service->idPath.id[4] == 19) + } else if(service->idPath.id[4] == 55) { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterReading.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMinVoltage.Value = service->val.integer.val.int16; - } else if(service->idPath.id[7] == 49) + } else if(service->idPath.id[4] == 48) { - 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.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxCurrent.Value = service->val.integer.val.int16; - } else if(service->idPath.id[7] == 6) + } else if(service->idPath.id[4] == 54) { - 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.Value = service->val.int32; + 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; } } @@ -2073,11 +2832,11 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 50: /*TariffStart*/ + case 148: /*TariffPMax*/ - if(service->val.type == UNSIGNED_INTEGER_32) + 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].TariffStart = service->val.uint32; + 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 @@ -2087,26 +2846,41 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 48: /*TariffID*/ - - if(service->val.type == ENUMERATION) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffID = service->val.enumeration; - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 43: /*TariffDescription*/ + 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].TariffDescription.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].TariffDescription.arraylen.data = service->val.string.len; + 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; } @@ -2117,12 +2891,11 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 5: /*Currency*/ + case 22: /*Currency*/ - if(service->val.type == STRING) + if(service->val.type == ENUMERATION) { - memcpy(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Currency.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Currency.arraylen.data = service->val.string.len; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Currency = service->val.enumeration; } else @@ -2132,7 +2905,338 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 17: /*MeterID*/ + 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) { @@ -2148,11 +3252,27 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 20: /*MeterStatus*/ + case 74: /*MeterPubKey*/ - if(service->val.type == INTEGER_16) + if(service->val.type == BINARY_BASE64) { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterStatus = service->val.int32; + 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; } @@ -2163,11 +3283,11 @@ static int deserializeElementCharacter(struct EXIService* service) break; - case 40: /*TMeter*/ + case 139: /*TMeter*/ - if(service->val.type == INTEGER_32) + if(service->val.type == INTEGER) { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.TMeter = service->val.int32; + _setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.TMeter)); service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.isused.TMeter=1; } @@ -2192,26 +3312,22 @@ static int deserializeElementCharacter(struct EXIService* service) static int deserializeElement(struct EXIService* service) { switch(service->eqn.namespaceURI) { + case 0: + switch(service->eqn.localPart) { + + } + break; case 4: switch(service->eqn.localPart) { - case 71:/* ServiceList */ - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->isused.ServiceList=1; + case 14:/* KeyInfo */ + + service->exiMsg.V2G_Message.Header->Security.Signature->isused.KeyInfo=1; break; - case 84:/* TariffTable */ + case 42:/* Signature */ - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->isused.TariffTable=1; - - break; - case 41:/* PCurrent */ - - service->exiMsg.V2G_Message.Body.MeteringStatusRes->isused.PCurrent=1; - - break; - case 32:/* MeterInfo */ - - service->exiMsg.V2G_Message.Body.MeteringStatusRes->isused.MeterInfo=1; + service->exiMsg.V2G_Message.Header->Security.isused.Signature=1; break; @@ -2219,46 +3335,188 @@ static int deserializeElement(struct EXIService* service) break; case 5: switch(service->eqn.localPart) { - case 11:/* EventList */ + case 105:/* ServiceList */ - service->exiMsg.V2G_Message.Header->Notification.isused.EventList=1; + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->isused.ServiceList=1; break; - case 28:/* Service */ + case 120:/* TariffTable */ - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service++; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->isused.TariffTable=1; break; - case 6:/* EPrice */ + case 66:/* PCurrent */ - 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; + service->exiMsg.V2G_Message.Body.MeteringStatusRes->isused.PCurrent=1; break; - case 46:/* TariffEntry */ + case 56:/* MeterInfo */ - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry++; + service->exiMsg.V2G_Message.Body.MeteringStatusRes->isused.MeterInfo=1; break; - case 41:/* Tariff */ + case 45:/* EVSEMaximumVoltageLimit */ - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff++; + service->exiMsg.V2G_Message.Body.CurrentDemandRes->isused.EVSEMaximumVoltageLimit=1; break; - case 19:/* MeterReading */ + case 43:/* EVSEMaximumCurrentLimit */ - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.isused.MeterReading=1; + 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 7: + 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; @@ -2269,6 +3527,68 @@ static int deserializeElement(struct EXIService* service) } +/** + * 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; +} + /** @@ -2320,7 +3640,8 @@ static int deserializeMessage(struct EXIService* service) break; case ATTRIBUTE: /* decode */ - /* returnCode = exiDecodeAttribute(&isStream, &stateDecode, &eqn, &val); */ + returnCode = exiDecodeAttribute(&(service->inStream), &(service->stateDecode), &(service->eqn), &(service->val)); + returnCode = deserializeAttributeCharacter(service); break; default: /* ERROR */ @@ -2331,7 +3652,9 @@ static int deserializeMessage(struct EXIService* service) return 0; } - + + + /* Initialize the v2g client */ diff --git a/src/service/v2g_serviceClientStubs.h b/src/service/v2g_serviceClientStubs.h index e6b102e..6644ea3 100644 --- a/src/service/v2g_serviceClientStubs.h +++ b/src/service/v2g_serviceClientStubs.h @@ -22,9 +22,11 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXISeGen

+ * ********************************************************************/ @@ -47,7 +49,7 @@ extern "C" { * \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 HeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result); + int call_sessionSetup(struct EXIService* service, struct MessageHeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result); @@ -59,7 +61,19 @@ extern "C" { * \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 HeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result); + 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); @@ -71,7 +85,7 @@ extern "C" { * \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 HeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result); + int call_selectedServicePayment(struct EXIService* service, struct MessageHeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result); @@ -83,7 +97,19 @@ extern "C" { * \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 HeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result); + 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); @@ -95,7 +121,7 @@ extern "C" { * \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 HeaderType* header, struct ChargeParameterDiscoveryReqType* params, struct ChargeParameterDiscoveryResType* result); + int call_chargeParameterDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* params, struct ChargeParameterDiscoveryResType* result); @@ -107,7 +133,7 @@ extern "C" { * \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 HeaderType* header, struct LineLockReqType* params, struct LineLockResType* result); + int call_lineLock(struct EXIService* service, struct MessageHeaderType* header, struct LineLockReqType* params, struct LineLockResType* result); @@ -119,7 +145,7 @@ extern "C" { * \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 HeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result); + int call_powerDelivery(struct EXIService* service, struct MessageHeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result); @@ -128,9 +154,10 @@ extern "C" { * \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 result struct MeteringStatusResType* Contains the response data from the server + * \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 HeaderType* header, struct MeteringStatusResType* result); + int call_meteringStatus(struct EXIService* service, struct MessageHeaderType* header, struct MeteringStatusReqType* params, struct MeteringStatusResType* result); @@ -142,7 +169,31 @@ extern "C" { * \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 HeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result); + 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); @@ -154,7 +205,7 @@ extern "C" { * \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 HeaderType* header, struct CableCheckReqType* params, struct CableCheckResType* result); + int call_cableCheck(struct EXIService* service, struct MessageHeaderType* header, struct CableCheckReqType* params, struct CableCheckResType* result); @@ -166,7 +217,7 @@ extern "C" { * \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 HeaderType* header, struct PreChargeReqType* params, struct PreChargeResType* result); + int call_preCharge(struct EXIService* service, struct MessageHeaderType* header, struct PreChargeReqType* params, struct PreChargeResType* result); @@ -178,7 +229,7 @@ extern "C" { * \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 HeaderType* header, struct CurrentDemandReqType* params, struct CurrentDemandResType* result); + int call_currentDemand(struct EXIService* service, struct MessageHeaderType* header, struct CurrentDemandReqType* params, struct CurrentDemandResType* result); @@ -190,7 +241,7 @@ extern "C" { * \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 HeaderType* header, struct WeldingDetectionReqType* params, struct WeldingDetectionResType* result); + int call_weldingDetection(struct EXIService* service, struct MessageHeaderType* header, struct WeldingDetectionReqType* params, struct WeldingDetectionResType* result); @@ -202,7 +253,7 @@ extern "C" { * \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 HeaderType* header, struct TerminateChargingReqType* params, struct TerminateChargingResType* result); + int call_terminateCharging(struct EXIService* service, struct MessageHeaderType* header, struct TerminateChargingReqType* params, struct TerminateChargingResType* result); diff --git a/src/service/v2g_serviceDataSerialization.c b/src/service/v2g_serviceDataSerialization.c index 71c7786..1692f18 100644 --- a/src/service/v2g_serviceDataSerialization.c +++ b/src/service/v2g_serviceDataSerialization.c @@ -19,143 +19,113 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXISeGen

+ * ********************************************************************/ #include "v2g_service.h" #include "v2g_serviceDataTypes.h" -/* #include "v2g_serviceDataSerializiation.h" */ #include "EXITypes.h" #include "EXIEncoder.h" - - - +#include + + + static int serialize_SessionInformationType(struct SessionInformationType* type, struct EXIService* service) { - + /* element ID assignment of SessionID*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=36; - /* encode start element SessionID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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; - service->val.binary.data= type->SessionID.data; - - /* encode character SessionID */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + 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), &(service->eqn)); - + + /* encode end element of SessionID */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + if(type->isused.ServiceSessionID) - { - + { + /* element ID assignment of ServiceSessionID*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=34; - /* encode start element ServiceSessionID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ServiceSessionID */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of ServiceSessionID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.ProtocolVersion) - { - + { + /* element ID assignment of ProtocolVersion*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=25; - /* encode start element ProtocolVersion */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ProtocolVersion */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of ProtocolVersion */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - - return 0; -} -static int serialize_EventListType(struct EventListType* type, struct EXIService* service) -{ - - /* element ID assignment of Event*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=10; - /* encode start element Event */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = ENUMERATION; - service->val.enumeration=type->Event; - - /* encode character Event */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of Event */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; + return 0; } @@ -163,223 +133,768 @@ static int serialize_NotificationType(struct NotificationType* type, struct EXIS { if(type->isused.FaultCode) - { - + { + /* element ID assignment of FaultCode*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=14; - /* encode start element FaultCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character FaultCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of FaultCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.FaultMsg) - { - + { + /* element ID assignment of FaultMsg*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=15; - /* encode start element FaultMsg */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character FaultMsg */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of FaultMsg */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - if(type->isused.EventList) - { - - /* element ID assignment of EventList*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=11; - /* encode start element EventList */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + + 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; } - - /* encode children of EventList */ - if(serialize_EventListType( &(type->EventList),service)) + + + + + 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 EventList */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - - - return 0; -} -static int serialize_HeaderType(struct HeaderType* type, struct EXIService* service) -{ - - /* element ID assignment of SessionInformation*/ - service->eqn.namespaceURI=7; - service->eqn.localPart=2; - /* encode start element SessionInformation */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + /* 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), &(service->eqn)); - + + /* encode end element of SessionInformation */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + if(type->isused.Notification) - { - + { + /* element ID assignment of Notification*/ - service->eqn.namespaceURI=7; - service->eqn.localPart=1; - /* encode start element Notification */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; -} + if(type->isused.Security) + { - -static int serialize_PEVStatusType(struct PEVStatusType* type, struct EXIService* service) -{ - - /* element ID assignment of ConnectorLocked*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=4; - /* encode start element ConnectorLocked */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + /* 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; } - - service->val.type = BOOLEAN; - service->val.boolean=type->ConnectorLocked; - - /* encode character ConnectorLocked */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + /* encode children of Security */ + if(serialize_SecurityType( &(type->Security),service)) { - return -1; } - - - /* encode end element of ConnectorLocked */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of ChargerStandby*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=0; - /* encode start element ChargerStandby */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = BOOLEAN; - service->val.boolean=type->ChargerStandby; - - /* encode character ChargerStandby */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of ChargerStandby */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of ReadyToCharge*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=27; - /* encode start element ReadyToCharge */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = BOOLEAN; - service->val.boolean=type->ReadyToCharge; - - /* encode character ReadyToCharge */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of ReadyToCharge */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + /* encode end element of Security */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - return 0; + } + + + return 0; } @@ -387,1193 +902,2366 @@ static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struc { if(type->isused.PEVID) - { - + { + /* element ID assignment of PEVID*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=43; - /* encode start element PEVID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character PEVID */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of PEVID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - /* element ID assignment of PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) - { - return -1; - } - - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} -static int serialize_EVSEStatusType(struct EVSEStatusType* type, struct EXIService* service) -{ - - /* element ID assignment of FatalError*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=13; - /* encode start element FatalError */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = BOOLEAN; - service->val.boolean=type->FatalError; - - /* encode character FatalError */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of FatalError */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEStandby*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=8; - /* 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), &(service->eqn)); - - - /* element ID assignment of ConnectorLocked*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=4; - /* 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), &(service->eqn)); - - - /* element ID assignment of PowerSwitchClosed*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=24; - /* 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), &(service->eqn)); - - - /* element ID assignment of RCD*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=26; - /* 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), &(service->eqn)); - - - /* element ID assignment of ShutDownTime*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=38; - /* encode start element ShutDownTime */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = INTEGER_32; - service->val.int32=type->ShutDownTime; - - /* encode character ShutDownTime */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of ShutDownTime */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of ChargerStandby*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=0; - /* encode start element ChargerStandby */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = BOOLEAN; - service->val.boolean=type->ChargerStandby; - - /* encode character ChargerStandby */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of ChargerStandby */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEMalfunction*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=7; - /* encode start element EVSEMalfunction */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = BOOLEAN; - service->val.boolean=type->EVSEMalfunction; - - /* encode character EVSEMalfunction */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of EVSEMalfunction */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of StopCharging*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=39; - /* 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), &(service->eqn)); - - - - return 0; + return 0; } static int serialize_SessionSetupResType(struct SessionSetupResType* type, struct EXIService* service) { - + /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ResponseCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + + /* encode end element of ResponseCode */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EVSEID*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=16; - /* encode start element EVSEID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character EVSEID */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of EVSEID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) - { - return -1; - } - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of TCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=82; - /* encode start element TCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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_32; - service->val.int32=type->TCurrent; - - /* encode character TCurrent */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + return 0; } static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type, struct EXIService* service) { - if(type->isused.ServiceType) - { - - /* element ID assignment of ServiceType*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=77; - /* 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), &(service->eqn)); - - } - if(type->isused.ServiceScope) - { - + { + /* element ID assignment of ServiceScope*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=76; - /* encode start element ServiceScope */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ServiceScope */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of ServiceScope */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; + 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_ServiceDescriptionType(struct ServiceDescriptionType* type, struct EXIService* service) +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=5; - service->eqn.localPart=30; - /* encode start element ServiceID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ServiceID */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - - /* encode end element of ServiceID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + + /* encode end element of ServiceID */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + if(type->isused.ServiceName) - { - + { + /* element ID assignment of ServiceName*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=32; - /* encode start element ServiceName */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ServiceName */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of ServiceName */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - if(type->isused.ServiceType) - { - - /* element ID assignment of ServiceType*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=35; - /* encode start element ServiceType */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + 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->ServiceType; - - /* encode character ServiceType */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + service->val.enumeration=type->ServiceCategory; + + /* encode character ServiceCategory */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - - /* encode end element of ServiceType */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + /* encode end element of ServiceCategory */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.ServiceScope) - { - + { + /* element ID assignment of ServiceScope*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=33; - /* encode start element ServiceScope */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ServiceScope */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of ServiceScope */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; + + return 0; } -static int serialize_ServiceListType(struct ServiceListType* type, struct EXIService* service) +static int serialize_ServiceChargeType(struct ServiceChargeType* 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=5; - service->eqn.localPart=28; - /* encode start element Service */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + /* 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 Service */ - if(serialize_ServiceDescriptionType(&(type->Service[i_loop]),service)) + + /* 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; + + return 0; } static int serialize_ServiceDiscoveryResType(struct ServiceDiscoveryResType* type, struct EXIService* service) { - + /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ResponseCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - if(type->isused.ServiceList) - { - - /* element ID assignment of ServiceList*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=71; - /* encode start element ServiceList */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 ServiceList */ - if(serialize_ServiceListType( &(type->ServiceList),service)) + + /* 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; + + 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 ServiceList*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=71; - /* encode start element ServiceList */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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_ServiceListType( &(type->ServiceList),service)) + if(serialize_ServiceTagListType( &(type->ServiceList),service)) { return -1; } - - + + /* encode end element of ServiceList */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + return 0; } static int serialize_ServicePaymentSelectionResType(struct ServicePaymentSelectionResType* type, struct EXIService* service) { - + /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ResponseCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + 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=4; - service->eqn.localPart=9; - /* encode start element ContractID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ContractID */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of ContractID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + /* 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=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ResponseCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of TCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=82; - /* encode start element TCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 = INTEGER_32; - service->val.int32=type->TCurrent; - - /* encode character TCurrent */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + 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=5; - service->eqn.localPart=21; - /* encode start element Multiplier */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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 = INTEGER_16; - service->val.int32=type->Multiplier; - - /* encode character Multiplier */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); - + + /* encode end element of Multiplier */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of Unit*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=52; - /* encode start element Unit */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character Unit */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - - /* encode end element of Unit */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + + /* encode end element of Unit */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of Value*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=53; - /* encode start element Value */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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_32; - service->val.int32=type->Value; - - /* encode character Value */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + return 0; } -static int serialize_ChargeParameterDiscoveryReqType(struct ChargeParameterDiscoveryReqType* type, struct EXIService* service) +static int serialize_AC_PEVChargeParameterType(struct AC_PEVChargeParameterType* type, struct EXIService* service) { - - /* element ID assignment of PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) + + /* encode children of AC_PEVStatus */ + if(serialize_AC_PEVStatusType( &(type->AC_PEVStatus),service)) { return -1; } - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of ChargingMode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=8; - /* encode start element ChargingMode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = ENUMERATION; - service->val.enumeration=type->ChargingMode; - - /* encode character ChargingMode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of ChargingMode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + /* encode end element of AC_PEVStatus */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EoC*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=27; - /* encode start element EoC */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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_32; - service->val.int32=type->EoC; - - /* encode character EoC */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); - + + /* encode end element of EoC */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EAmount*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=15; - /* encode start element EAmount */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of EAmount */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of PEVMaxPower*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=46; - /* encode start element PEVMaxPower */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of PEVMaxPower */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of PEVMaxPhases*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=45; - /* encode start element PEVMaxPhases */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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 = INTEGER_16; - service->val.int32=type->PEVMaxPhases; - - /* encode character PEVMaxPhases */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); - + + /* encode end element of PEVMaxPhases */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of PEVMaxVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=47; - /* encode start element PEVMaxVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of PEVMaxVoltage */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of PEVMinVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=49; - /* encode start element PEVMinVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of PEVMinVoltage */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of PEVMaxCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=44; - /* encode start element PEVMaxCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of PEVMaxCurrent */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of PEVMinCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=48; - /* encode start element PEVMinCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + 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=5; - service->eqn.localPart=50; - /* encode start element TariffStart */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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_32; - service->val.uint32=type->TariffStart; - - /* encode character TariffStart */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + - /* element ID assignment of TariffPMax*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=49; - /* encode start element TariffPMax */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + service->eqn.namespaceURI=6; + service->eqn.localPart=148; + /* encode start element TariffPMax */ + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } - - /* encode children of TariffPMax */ - if(serialize_FloatingValueType( &(type->TariffPMax),service)) + + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + - if(type->isused.EPrice) - { - + { + /* element ID assignment of EPrice*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=6; - /* encode start element EPrice */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + service->eqn.namespaceURI=6; + service->eqn.localPart=40; + /* encode start element EPrice */ + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } - - /* encode children of EPrice */ - if(serialize_FloatingValueType( &(type->EPrice),service)) + + 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; + + return -1; } - - + /* encode end element of EPrice */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; + + return 0; } @@ -1581,115 +3269,115 @@ static int serialize_TariffEntriesType(struct TariffEntriesType* type, struct EX { size_t i_loop; - + for(i_loop=0;i_loop < type->arraylen.TariffEntry;i_loop++) { - + /* element ID assignment of TariffEntry*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=46; - /* encode start element TariffEntry */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; + + return 0; } static int serialize_TariffDescrType(struct TariffDescrType* type, struct EXIService* service) { - + /* element ID assignment of TariffID*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=48; - /* encode start element TariffID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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 = ENUMERATION; - service->val.enumeration=type->TariffID; - - /* encode character TariffID */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); - + + /* encode end element of TariffID */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + if(type->isused.TariffDescription) - { - + { + /* element ID assignment of TariffDescription*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=43; - /* encode start element TariffDescription */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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 = STRING; - service->val.string.len = type->TariffDescription.arraylen.data; - service->val.string.codepoints = type->TariffDescription.data; - - /* encode character TariffDescription */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + service->val.type = ENUMERATION; + service->val.enumeration=type->TariffDescription; + + /* encode character TariffDescription */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - - return -1; + + return -1; } - - + + /* encode end element of TariffDescription */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + /* element ID assignment of TariffEntries*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=44; - /* encode start element TariffEntries */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + return 0; } @@ -1697,521 +3385,1309 @@ static int serialize_TariffTableType(struct TariffTableType* type, struct EXISer { size_t i_loop; - - /* element ID assignment of Currency*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=5; - /* encode start element Currency */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = STRING; - service->val.string.len = type->Currency.arraylen.data; - service->val.string.codepoints = type->Currency.data; - - /* encode character Currency */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of Currency */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + /* 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=5; - service->eqn.localPart=41; - /* encode start element Tariff */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; + /* 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_ChargeParameterDiscoveryResType(struct ChargeParameterDiscoveryResType* type, struct EXIService* service) +static int serialize_AC_EVSEStatusType(struct AC_EVSEStatusType* type, struct EXIService* service) { - - /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 = ENUMERATION; - service->val.enumeration=type->ResponseCode; - - /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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 ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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; } - - /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) + + 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 EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + + /* encode end element of AC_EVSEStatus */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EVSEMaxVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=20; - /* encode start element EVSEMaxVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of EVSEMaxVoltage */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EVSEMinVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=22; - /* encode start element EVSEMinVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of EVSEMinVoltage */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EVSEMaxCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=17; - /* encode start element EVSEMaxCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of EVSEMaxCurrent */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EVSEMinCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=21; - /* encode start element EVSEMinCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of EVSEMinCurrent */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EVSEMaxPhases*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=18; - /* encode start element EVSEMaxPhases */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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 = INTEGER_16; - service->val.int32=type->EVSEMaxPhases; - - /* encode character EVSEMaxPhases */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); - - if(type->isused.EnergyProvider) - { - - /* element ID assignment of EnergyProvider*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=26; - /* encode start element EnergyProvider */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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))) + + /* encode character EnergyProvider */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of EnergyProvider */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.TariffTable) - { - + { + /* element ID assignment of TariffTable*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=84; - /* encode start element TariffTable */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; -} + if(type->isused.AC_EVSEChargeParameter) + { - -static int serialize_LineLockReqType(struct LineLockReqType* type, struct EXIService* service) -{ - - /* element ID assignment of PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + /* 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 PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) + + /* encode children of AC_EVSEChargeParameter */ + if(serialize_AC_EVSEChargeParameterType( (type->AC_EVSEChargeParameter),service)) { return -1; } - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of ReqLockStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=64; - /* encode start element ReqLockStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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->ReqLockStatus; - - /* encode character ReqLockStatus */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + service->val.boolean=type->BulkChargingComplete; + + /* encode character BulkChargingComplete */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - - /* encode end element of ReqLockStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} -static int serialize_LineLockResType(struct LineLockResType* type, struct EXIService* service) -{ - - /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + /* 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 = 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), &(service->eqn)); - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) + 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 EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + /* encode end element of ChargingComplete */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - return 0; + + + return 0; } static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, struct EXIService* service) { - - /* element ID assignment of PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) - { - return -1; - } - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of ReqSwitchStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=65; - /* 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), &(service->eqn)); - - if(type->isused.Tariff) - { - + { + /* element ID assignment of Tariff*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=83; - /* encode start element Tariff */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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 = ENUMERATION; - service->val.enumeration=type->Tariff; - - /* encode character Tariff */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; + 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=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ResponseCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) + + /* encode children of AC_EVSEStatus */ + if(serialize_AC_EVSEStatusType( (type->AC_EVSEStatus),service)) { return -1; } - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - return 0; + /* 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) + { - return 0; + /* 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; } @@ -2219,290 +4695,376 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct EXIService { if(type->isused.MeterID) - { - + { + /* element ID assignment of MeterID*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=17; - /* encode start element MeterID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character MeterID */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of MeterID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - if(type->isused.MeterReading) - { - - /* element ID assignment of MeterReading*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=19; - /* encode start element MeterReading */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + 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), &(service->eqn)); + 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=5; - service->eqn.localPart=20; - /* encode start element MeterStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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_16; - service->val.int32=type->MeterStatus; - - /* encode character MeterStatus */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.TMeter) - { - + { + /* element ID assignment of TMeter*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=40; - /* encode start element TMeter */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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_32; - service->val.int32=type->TMeter; - - /* encode character TMeter */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; + + return 0; } static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, struct EXIService* service) { - + /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ResponseCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + + /* encode end element of ResponseCode */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EVSEID*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=16; - /* encode start element EVSEID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character EVSEID */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of EVSEID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) - { - return -1; - } - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of TCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=82; - /* encode start element TCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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_32; - service->val.int32=type->TCurrent; - - /* encode character TCurrent */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + + 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), &(service->eqn)); - + + /* encode end element of TCurrent */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EVSEMaxPower*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=19; - /* encode start element EVSEMaxPower */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of EVSEMaxPower */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + if(type->isused.PCurrent) - { - + { + /* element ID assignment of PCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=41; - /* encode start element PCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.MeterInfo) - { - + { + /* element ID assignment of MeterInfo*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=32; - /* encode start element MeterInfo */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; + 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; } @@ -2510,824 +5072,1845 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, { if(type->isused.PEVID) - { - + { + /* element ID assignment of PEVID*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=43; - /* encode start element PEVID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character PEVID */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of PEVID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - /* element ID assignment of PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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; } - - /* encode children of PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) - { + 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 PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - if(type->isused.TCurrent) - { - - /* element ID assignment of TCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=82; - /* encode start element TCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = INTEGER_32; - service->val.int32=type->TCurrent; - - /* encode character TCurrent */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of TCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - } - - /* element ID assignment of Tariff*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=83; - /* encode start element Tariff */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + + + /* 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 = ENUMERATION; - service->val.enumeration=type->Tariff; - - /* encode character Tariff */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of Tariff */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + 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=4; - service->eqn.localPart=32; - /* encode start element MeterInfo */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + 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=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ResponseCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + 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 PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) + + /* encode children of DC_PEVStatus */ + if(serialize_DC_PEVStatusType( &(type->DC_PEVStatus),service)) { return -1; } - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - return 0; + /* 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=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ResponseCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) + + /* encode children of DC_EVSEStatus */ + if(serialize_DC_EVSEStatusType( &(type->DC_EVSEStatus),service)) { return -1; } - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - return 0; + /* 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 PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) + + /* encode children of DC_PEVStatus */ + if(serialize_DC_PEVStatusType( &(type->DC_PEVStatus),service)) { return -1; } - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of PEVTargetVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=51; - /* encode start element PEVTargetVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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), &(service->eqn)); - + + /* encode end element of PEVTargetVoltage */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of PEVDemandCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=42; - /* encode start element PEVDemandCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of PEVDemandCurrent */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of VoltageDifferential*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=89; - /* encode start element VoltageDifferential */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + return 0; } static int serialize_PreChargeResType(struct PreChargeResType* type, struct EXIService* service) { - + /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ResponseCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) + + /* encode children of DC_EVSEStatus */ + if(serialize_DC_EVSEStatusType( &(type->DC_EVSEStatus),service)) { return -1; } - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + + /* encode end element of DC_EVSEStatus */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EVSEPresentVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=24; - /* encode start element EVSEPresentVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + return 0; } static int serialize_CurrentDemandReqType(struct CurrentDemandReqType* type, struct EXIService* service) { - - /* element ID assignment of PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) + + /* encode children of DC_PEVStatus */ + if(serialize_DC_PEVStatusType( &(type->DC_PEVStatus),service)) { return -1; } - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of PEVTargetVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=51; - /* encode start element PEVTargetVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - /* element ID assignment of PEVDemandCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=42; - /* 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), &(service->eqn)); - - /* element ID assignment of CurrentDifferential*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=14; - /* encode start element CurrentDifferential */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of CurrentDifferential */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of VoltageDifferential*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=89; - /* encode start element VoltageDifferential */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + return 0; } static int serialize_CurrentDemandResType(struct CurrentDemandResType* type, struct EXIService* service) { - + /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ResponseCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) + + /* encode children of DC_EVSEStatus */ + if(serialize_DC_EVSEStatusType( &(type->DC_EVSEStatus),service)) { return -1; } - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + + /* encode end element of DC_EVSEStatus */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EVSEPresentVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=24; - /* encode start element EVSEPresentVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); - + + /* encode end element of EVSEPresentVoltage */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EVSEPresentCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=23; - /* encode start element EVSEPresentCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + /* 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 PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) + + /* encode children of DC_PEVStatus */ + if(serialize_DC_PEVStatusType( &(type->DC_PEVStatus),service)) { return -1; } - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - return 0; + /* 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=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ResponseCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) + + /* encode children of DC_EVSEStatus */ + if(serialize_DC_EVSEStatusType( &(type->DC_EVSEStatus),service)) { return -1; } - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + + /* encode end element of DC_EVSEStatus */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of EVSEPresentVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=24; - /* encode start element EVSEPresentVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + return 0; } static int serialize_TerminateChargingReqType(struct TerminateChargingReqType* type, struct EXIService* service) { - - /* element ID assignment of PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + /* 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 PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) + + /* encode children of DC_PEVStatus */ + if(serialize_DC_PEVStatusType( &(type->DC_PEVStatus),service)) { return -1; } - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - return 0; + /* 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=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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))) + + /* encode character ResponseCode */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { - + return -1; } - - + + /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) - { - return -1; - } - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of EVSEPresentVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=24; - /* encode start element EVSEPresentVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + return 0; } @@ -3335,823 +6918,1030 @@ static int serialize_BodyType(struct BodyType* type, struct EXIService* service) { if(type->isused.SessionSetupReq) - { - + { + /* element ID assignment of SessionSetupReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=78; - /* encode start element SessionSetupReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.SessionSetupRes) - { - + { + /* element ID assignment of SessionSetupRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=80; - /* encode start element SessionSetupRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.ServiceDiscoveryReq) - { - + { + /* element ID assignment of ServiceDiscoveryReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=67; - /* encode start element ServiceDiscoveryReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.ServiceDiscoveryRes) - { - + { + /* element ID assignment of ServiceDiscoveryRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=69; - /* encode start element ServiceDiscoveryRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - if(type->isused.ServicePaymentSelectionReq) - { - - /* element ID assignment of ServicePaymentSelectionReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=72; - /* encode start element ServicePaymentSelectionReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.ServicePaymentSelectionRes) - { - + { + /* element ID assignment of ServicePaymentSelectionRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=74; - /* encode start element ServicePaymentSelectionRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.PaymentDetailsReq) - { - + { + /* element ID assignment of PaymentDetailsReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=52; - /* encode start element PaymentDetailsReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.PaymentDetailsRes) - { - + { + /* element ID assignment of PaymentDetailsRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=54; - /* encode start element PaymentDetailsRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - if(type->isused.ChargeParameterDiscoveryReq) - { - - /* element ID assignment of ChargeParameterDiscoveryReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=4; - /* encode start element ChargeParameterDiscoveryReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.ChargeParameterDiscoveryRes) - { - + { + /* element ID assignment of ChargeParameterDiscoveryRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=6; - /* encode start element ChargeParameterDiscoveryRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - if(type->isused.LineLockReq) - { - - /* element ID assignment of LineLockReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=28; - /* 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), &(service->eqn)); - - } - - if(type->isused.LineLockRes) - { - - /* element ID assignment of LineLockRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=30; - /* 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), &(service->eqn)); - - } - if(type->isused.PowerDeliveryReq) - { - + { + /* element ID assignment of PowerDeliveryReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=56; - /* encode start element PowerDeliveryReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.PowerDeliveryRes) - { - + { + /* element ID assignment of PowerDeliveryRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=58; - /* encode start element PowerDeliveryRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.MeteringStatusReq) - { - + { + /* element ID assignment of MeteringStatusReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=37; - /* encode start element MeteringStatusReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.MeteringStatusRes) - { - + { + /* element ID assignment of MeteringStatusRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=39; - /* encode start element MeteringStatusRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.MeteringReceiptReq) - { - + { + /* element ID assignment of MeteringReceiptReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=33; - /* encode start element MeteringReceiptReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.MeteringReceiptRes) - { - + { + /* element ID assignment of MeteringReceiptRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=35; - /* encode start element MeteringReceiptRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - if(type->isused.CableCheckReq) - { - - /* element ID assignment of CableCheckReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=0; - /* encode start element CableCheckReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.CableCheckRes) - { - + { + /* element ID assignment of CableCheckRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=2; - /* encode start element CableCheckRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.PreChargeReq) - { - + { + /* element ID assignment of PreChargeReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=60; - /* encode start element PreChargeReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.PreChargeRes) - { - + { + /* element ID assignment of PreChargeRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=62; - /* encode start element PreChargeRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.CurrentDemandReq) - { - + { + /* element ID assignment of CurrentDemandReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=10; - /* encode start element CurrentDemandReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.CurrentDemandRes) - { - + { + /* element ID assignment of CurrentDemandRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=12; - /* encode start element CurrentDemandRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.WeldingDetectionReq) - { - + { + /* element ID assignment of WeldingDetectionReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=90; - /* encode start element WeldingDetectionReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.WeldingDetectionRes) - { - + { + /* element ID assignment of WeldingDetectionRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=92; - /* encode start element WeldingDetectionRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.TerminateChargingReq) - { - + { + /* element ID assignment of TerminateChargingReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=85; - /* encode start element TerminateChargingReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - + if(type->isused.TerminateChargingRes) - { - + { + /* element ID assignment of TerminateChargingRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=87; - /* encode start element TerminateChargingRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); } - - return 0; + + return 0; } static int serialize_AnonType_V2G_Message(struct AnonType_V2G_Message* type, struct EXIService* service) { - + /* element ID assignment of Header*/ - service->eqn.namespaceURI=6; - service->eqn.localPart=4; - /* encode start element Header */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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_HeaderType( (type->Header),service)) + if(serialize_MessageHeaderType( (type->Header),service)) { return -1; } - - - /* encode end element of Header */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + + /* encode end element of Header */ + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); + + /* element ID assignment of Body*/ - service->eqn.namespaceURI=6; - service->eqn.localPart=0; - /* encode start element Body */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + return 0; } static int serialize_EXIDocumentType(struct EXIDocumentType* type, struct EXIService* service) { - + /* element ID assignment of V2G_Message*/ - service->eqn.namespaceURI=6; - service->eqn.localPart=5; - /* encode start element V2G_Message */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + 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), &(service->eqn)); + exiEncodeEndElement(&(service->outStream), &(service->stateEncode)); - - return 0; + + return 0; } - - - - - + + + + + /* marshal data to EXI stream */ static int serialize_message(struct EXIService* service) { - - /* encode start document */ - if (exiEncodeStartDocument(&(service->outStream), &(service->stateEncode)) ) + + /* encode start document */ + if (exiEncodeStartDocument(&(service->outStream), &(service->stateEncode)) ) { - + return -1; } /* encode root element of V2G_Message */ - if (serialize_EXIDocumentType(&(service->exiMsg), service)) + if (serialize_EXIDocumentType(&(service->exiMsg), service)) { - + return -1; } /* encode end document */ if (exiEncodeEndDocument(&(service->outStream), &(service->stateEncode))) { - - return -1; - } - - return 0; - - } - - - + return -1; + } + + return 0; + + } + + + + + + + + + + + diff --git a/src/service/v2g_serviceDataTypes.c b/src/service/v2g_serviceDataTypes.c index 657fdc9..6b7b1f8 100644 --- a/src/service/v2g_serviceDataTypes.c +++ b/src/service/v2g_serviceDataTypes.c @@ -19,9 +19,11 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXISeGen

+ * ********************************************************************/ @@ -51,7 +53,7 @@ static void init_SessionInformationType(struct SessionInformationType* type) } -static void init_service_string(struct service_string* type) +static void init_faultMsgType(struct faultMsgType* type) { type->arraylen.data=0; @@ -60,17 +62,121 @@ static void init_service_string(struct service_string* type) static void init_NotificationType(struct NotificationType* type) { type->isused.FaultCode=0; - init_service_string(&(type->FaultMsg)); - type->isused.FaultMsg=0; - type->isused.EventList=0; + init_faultMsgType(&(type->FaultMsg)); + type->isused.FaultMsg=0; } -static void init_HeaderType(struct HeaderType* type) +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; + type->isused.Notification=0; + init_SecurityType(&(type->Security)); + type->isused.Security=0; } @@ -83,7 +189,7 @@ static void init_pevIDType(struct pevIDType* type) static void init_SessionSetupReqType(struct SessionSetupReqType* type) { init_pevIDType(&(type->PEVID)); - type->isused.PEVID=0; + type->isused.PEVID=0; } @@ -95,7 +201,7 @@ static void init_evseIDType(struct evseIDType* type) static void init_SessionSetupResType(struct SessionSetupResType* type) { - init_evseIDType(&(type->EVSEID)); + init_evseIDType(&(type->EVSEID)); } @@ -106,10 +212,17 @@ static void init_serviceScopeType(struct serviceScopeType* type) } static void init_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type) -{ - type->isused.ServiceType=0; +{ init_serviceScopeType(&(type->ServiceScope)); - type->isused.ServiceScope=0; + type->isused.ServiceScope=0; + type->isused.ServiceType=0; + +} + +static void init_PaymentOptionsType(struct PaymentOptionsType* type) +{ + + type->arraylen.PaymentOption=0; } @@ -125,24 +238,30 @@ static void init_serviceNameType(struct serviceNameType* type) } -static void init_ServiceDescriptionType(struct ServiceDescriptionType* type) +static void init_ServiceTagType(struct ServiceTagType* type) { init_serviceIDType(&(type->ServiceID)); init_serviceNameType(&(type->ServiceName)); type->isused.ServiceName=0; - type->isused.ServiceType=0; + type->isused.ServiceCategory=0; init_serviceScopeType(&(type->ServiceScope)); type->isused.ServiceScope=0; } -static void init_ServiceListType(struct ServiceListType* type) +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<8;i_loop++) + for(i_loop=0; i_loop<32;i_loop++) { - init_ServiceDescriptionType(&(type->Service[i_loop])); + init_ServiceTagType(&(type->Service[i_loop])); } type->arraylen.Service=0; @@ -151,14 +270,58 @@ static void init_ServiceListType(struct ServiceListType* type) static void init_ServiceDiscoveryResType(struct ServiceDiscoveryResType* type) { - init_ServiceListType(&(type->ServiceList)); + init_PaymentOptionsType(&(type->PaymentOptions)); + init_ServiceChargeType(&(type->ChargeService)); + init_ServiceTagListType(&(type->ServiceList)); type->isused.ServiceList=0; } -static void init_ServicePaymentSelectionReqType(struct ServicePaymentSelectionReqType* type) +static void init_ServiceDetailReqType(struct ServiceDetailReqType* type) { - init_ServiceListType(&(type->ServiceList)); + 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)); } @@ -168,14 +331,77 @@ static void init_contractIDType(struct contractIDType* type) } +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_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; } @@ -185,20 +411,15 @@ static void init_energyProviderType(struct energyProviderType* type) } -static void init_currencyType(struct currencyType* type) -{ - type->arraylen.data=0; - -} - -static void init_tariffDescriptionType(struct tariffDescriptionType* type) +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; } @@ -217,8 +438,7 @@ static void init_TariffEntriesType(struct TariffEntriesType* type) } static void init_TariffDescrType(struct TariffDescrType* type) -{ - init_tariffDescriptionType(&(type->TariffDescription)); +{ type->isused.TariffDescription=0; init_TariffEntriesType(&(type->TariffEntries)); @@ -227,23 +447,188 @@ static void init_TariffDescrType(struct TariffDescrType* type) static void init_TariffTableType(struct TariffTableType* type) { int i_loop; - - init_currencyType(&(type->Currency)); + for(i_loop=0; i_loop<6;i_loop++) { init_TariffDescrType(&(type->Tariff[i_loop])); } - type->arraylen.Tariff=0; + 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.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)); } @@ -257,51 +642,6 @@ static void init_LineLockResType(struct LineLockResType* type) } -static void init_PowerDeliveryReqType(struct PowerDeliveryReqType* type) -{ - type->isused.Tariff=0; - -} - -static void init_PowerDeliveryResType(struct PowerDeliveryResType* type) -{ - -} - -static void init_meterIDType(struct meterIDType* type) -{ - type->arraylen.data=0; - -} - -static void init_MeterInfoType(struct MeterInfoType* type) -{ - init_meterIDType(&(type->MeterID)); - type->isused.MeterID=0; - type->isused.MeterReading=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; - -} - -static void init_MeteringReceiptReqType(struct MeteringReceiptReqType* type) -{ - init_pevIDType(&(type->PEVID)); - type->isused.PEVID=0; - type->isused.TCurrent=0; - init_MeterInfoType(&(type->MeterInfo)); - -} - static void init_CableCheckReqType(struct CableCheckReqType* type) { @@ -313,7 +653,7 @@ static void init_CableCheckResType(struct CableCheckResType* type) } static void init_PreChargeReqType(struct PreChargeReqType* type) -{ +{ } @@ -323,12 +663,21 @@ 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; } @@ -348,7 +697,7 @@ static void init_TerminateChargingReqType(struct TerminateChargingReqType* type } static void init_TerminateChargingResType(struct TerminateChargingResType* type) -{ +{ } @@ -358,20 +707,28 @@ static void init_BodyType(struct BodyType* type) 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.LineLockReq=0; - type->isused.LineLockRes=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; diff --git a/src/service/v2g_serviceDataTypes.h b/src/service/v2g_serviceDataTypes.h index d6e4c4d..299ccad 100644 --- a/src/service/v2g_serviceDataTypes.h +++ b/src/service/v2g_serviceDataTypes.h @@ -19,9 +19,11 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXISeGen

+ * ********************************************************************/ @@ -42,182 +44,340 @@ enum faultCodeType { ParsingError_faultCodeType, V2GProtocolVersionNotSupported_faultCodeType, + NoTLSRootCertificatAvailable_faultCodeType, UnknownError_faultCodeType }; -enum eventEntryType +enum responseCodeType { - InitiateSessionSetup_eventEntryType, - InitiateServiceDiscovery_eventEntryType, - InitiatePowerDiscovery_eventEntryType, - InitiateLineLock_eventEntryType, - InitiatePowerDelivery_eventEntryType, - InitiateInitiateMeteringStatus_eventEntryType + 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 responseCode_SessionSetupType +enum serviceCategoryType { - OK_SessionSetup_responseCode_SessionSetupType, - OK_NewSessionEstablished_responseCode_SessionSetupType, - OK_OldSessionJoined_responseCode_SessionSetupType, - FAILED_UnknownSession_responseCode_SessionSetupType, - FAILED_SessionEstablishmentError_responseCode_SessionSetupType, - FAILED_UnknownError_InSessionSetup_responseCode_SessionSetupType + PEVRechargeCharge_serviceCategoryType, + RemoteCustomerSupportRCS_serviceCategoryType, + Internet_serviceCategoryType, + ContractCertificateUpdate_serviceCategoryType, + ContractCertificateInstalation_serviceCategoryType, + OtherCustom_serviceCategoryType }; -enum serviceTypeType +enum paymentOptionType { - PEV_Recharge_serviceTypeType, - Remote_Customer_Support_serviceTypeType, - Internet_serviceTypeType, - Other_serviceTypeType + Contract_paymentOptionType, + ExternalPayment_paymentOptionType }; -enum responseCode_ServiceDiscoveryType +enum EVSESupportedEnergyTransferType { - OK_ServiceDiscovery_responseCode_ServiceDiscoveryType, - FAILED_NoServicesOfThisType_responseCode_ServiceDiscoveryType, - FAILED_NoServicesInThisScope_responseCode_ServiceDiscoveryType, - FAILED_NoServicesOfThisTypeScope_responseCode_ServiceDiscoveryType, - FAILED_NoServicesFound_responseCode_ServiceDiscoveryType, - FAILED_UnknownError_InServiceDiscovery_responseCode_ServiceDiscoveryType + 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 responseCode_ServicePaymentSelectionType +enum PEVRequestedEnergyTransferType { - OK_ServicePaymentSelection_responseCode_ServicePaymentSelectionType, - FAILED_ServiceSelectionInvalid_responseCode_ServicePaymentSelectionType, - FAILED_PaymentSelectionInvalid_responseCode_ServicePaymentSelectionType, - FAILED_UnknownError_InServicePaymentSelection_responseCode_ServicePaymentSelectionType - -}; - -enum responseCode_PaymentDetailsType -{ - OK_PaymentDetails_responseCode_PaymentDetailsType, - FAILED_PaymentDetailsInvalid_responseCode_PaymentDetailsType, - FAILED_UnknownError_responseCode_PaymentDetailsType - -}; - -enum chargingModeType -{ - AC_charging_chargingModeType, - DC_charging_chargingModeType + 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 { - A_unitSymbolType, - deg_unitSymbolType, - F_unitSymbolType, h_unitSymbolType, - min_unitSymbolType, + m_unitSymbolType, s_unitSymbolType, - s_1_unitSymbolType, + A_unitSymbolType, + Ah_unitSymbolType, V_unitSymbolType, - V_VAr_unitSymbolType, VA_unitSymbolType, - VAh_unitSymbolType, - VAr_unitSymbolType, - VArh_unitSymbolType, W_unitSymbolType, - W_Hz_unitSymbolType, W_s_unitSymbolType, - Wh_unitSymbolType, - Ah_unitSymbolType, - J_unitSymbolType -}; - -enum responseCode_ChargeParameterDiscoveryType -{ - OK_responseCode_ChargeParameterDiscoveryType, - FAILED_BatteryNotCompatible_responseCode_ChargeParameterDiscoveryType, - FAILED_UnknownError_responseCode_ChargeParameterDiscoveryType + Wh_unitSymbolType }; -enum tariffIDType +enum DC_PEVStatusCodeType { - Standard_charge_tariffIDType, - Fast_charge_tariffIDType, - Green_charge_tariffIDType, - Grid_friendly_charge_tariffIDType, - Freely_parameterisable_charge_tariffIDType, - Charge_under_reserve_tariffIDType + 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 responseCode_LineLockType +enum currencyType { - OK_LineLock_responseCode_LineLockType, - FAILED_LineLockNotApplied_responseCode_LineLockType, - FAILED_UnknownError_InLineLock_responseCode_LineLockType + 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 responseCode_PowerDeliveryType +enum tariffDescriptionType { - OK_PowerDelivery_responseCode_PowerDeliveryType, - FAILED_PowerDeliveryNotApplied_responseCode_PowerDeliveryType, - FAILED_TariffSelectionInvalid_responseCode_PowerDeliveryType, - FAILED_ChargingProfileInvalid_responseCode_PowerDeliveryType, - FAILED_UnknownError_InPowerDelivery_responseCode_PowerDeliveryType + Standard_charge_tariffDescriptionType, + Fast_charge_tariffDescriptionType, + Green_charge_tariffDescriptionType, + Grid_friendly_charge_tariffDescriptionType, + Freely_parameterisable_charge_tariffDescriptionType, + Charge_under_reserve_tariffDescriptionType }; -enum responseCode_MeteringStatusType +enum DC_EVSEStatusCodeType { - OK_MeteringStatus_responseCode_MeteringStatusType, - FAILED_UnknownError_InMeteringStatus_responseCode_MeteringStatusType - -}; - -enum responseCode_MeteringReceiptType -{ - OK_MeteringReceipt_responseCode_MeteringReceiptType, - FAILED_UnknownError_MeteringReceipt_responseCode_MeteringReceiptType - -}; - -enum responseCode_CableCheckType -{ - OK_responseCode_CableCheckType, - FAILED_UnknownError_responseCode_CableCheckType - -}; - -enum responseCode_PreChargeType -{ - OK_responseCode_PreChargeType, - FAILED_UnknownError_responseCode_PreChargeType - -}; - -enum responseCode_CurrentDemandType -{ - OK_responseCode_CurrentDemandType, - FAILED_UnknownError_responseCode_CurrentDemandType - -}; - -enum responseCode_WeldingDetectionType -{ - OK_responseCode_WeldingDetectionType, - FAILED_UnknownError_responseCode_WeldingDetectionType - -}; - -enum responseCode_TerminateChargingType -{ - OK_responseCode_TerminateChargingType, - FAILED_UnknownError_responseCode_TerminateChargingType + 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 }; @@ -273,7 +433,36 @@ struct selection_NotificationType { unsigned int FaultCode:1; unsigned int FaultMsg:1; - unsigned int EventList: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; }; @@ -287,39 +476,159 @@ struct arraylen_service_string struct service_string { - uint32_t data[256]; + uint32_t data[128]; struct arraylen_service_string arraylen; }; -struct EventListType +struct CanonicalizationMethodType { - enum eventEntryType Event; + struct service_string attr_Algorithm; }; -struct NotificationType +struct SignatureMethodType { - enum faultCodeType FaultCode; - struct service_string FaultMsg; - struct EventListType EventList; - struct selection_NotificationType isused; - -}; - -struct selection_HeaderType -{ - unsigned int Notification:1; + struct service_string attr_Algorithm; }; -struct HeaderType +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 selection_HeaderType isused; + struct SecurityType Security; + struct selection_MessageHeaderType isused; }; @@ -342,21 +651,11 @@ struct selection_SessionSetupReqType unsigned int PEVID:1; -}; - -struct PEVStatusType -{ - int ConnectorLocked; - int ChargerStandby; - int ReadyToCharge; - - }; struct SessionSetupReqType { struct pevIDType PEVID; - struct PEVStatusType PEVStatus; struct selection_SessionSetupReqType isused; }; @@ -367,20 +666,28 @@ struct selection_BodyType 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 LineLockReq:1; - unsigned int LineLockRes: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; @@ -409,37 +716,13 @@ struct evseIDType }; -struct EVSEStatusType -{ - int FatalError; - int EVSEStandby; - int ConnectorLocked; - int PowerSwitchClosed; - int RCD; - int32_t ShutDownTime; - int ChargerStandby; - int EVSEMalfunction; - int StopCharging; - - -}; - struct SessionSetupResType { - enum responseCode_SessionSetupType ResponseCode; + enum responseCodeType ResponseCode; struct evseIDType EVSEID; - struct EVSEStatusType EVSEStatus; int32_t TCurrent; -}; - -struct selection_ServiceDiscoveryReqType -{ - unsigned int ServiceType:1; - unsigned int ServiceScope:1; - - }; struct arraylen_serviceScopeType @@ -451,19 +734,41 @@ struct arraylen_serviceScopeType struct serviceScopeType { - uint32_t data[20]; + uint32_t data[64]; struct arraylen_serviceScopeType arraylen; }; +struct selection_ServiceDiscoveryReqType +{ + unsigned int ServiceScope:1; + unsigned int ServiceType:1; + + +}; + struct ServiceDiscoveryReqType { - enum serviceTypeType ServiceType; 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; @@ -487,41 +792,50 @@ struct arraylen_serviceNameType struct serviceNameType { - uint32_t data[20]; + uint32_t data[32]; struct arraylen_serviceNameType arraylen; }; -struct selection_ServiceDescriptionType +struct selection_ServiceTagType { unsigned int ServiceName:1; - unsigned int ServiceType:1; + unsigned int ServiceCategory:1; unsigned int ServiceScope:1; }; -struct ServiceDescriptionType +struct ServiceTagType { struct serviceIDType ServiceID; struct serviceNameType ServiceName; - enum serviceTypeType ServiceType; + enum serviceCategoryType ServiceCategory; struct serviceScopeType ServiceScope; - struct selection_ServiceDescriptionType isused; + struct selection_ServiceTagType isused; }; -struct arraylen_ServiceListType +struct ServiceChargeType +{ + struct ServiceTagType ServiceTag; + int FreeService; + enum EVSESupportedEnergyTransferType EnergyTransferType; + + +}; + +struct arraylen_ServiceTagListType { size_t Service; }; -struct ServiceListType +struct ServiceTagListType { - struct ServiceDescriptionType Service[8]; - struct arraylen_ServiceListType arraylen; + struct ServiceTagType Service[32]; + struct arraylen_ServiceTagListType arraylen; }; @@ -534,22 +848,102 @@ struct selection_ServiceDiscoveryResType struct ServiceDiscoveryResType { - enum responseCode_ServiceDiscoveryType ResponseCode; - struct ServiceListType ServiceList; + 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 { - struct ServiceListType ServiceList; + enum paymentOptionType SelectedPaymentOption; + struct ServiceTagListType ServiceList; }; struct ServicePaymentSelectionResType { - enum responseCode_ServicePaymentSelectionType ResponseCode; + enum responseCodeType ResponseCode; }; @@ -563,43 +957,123 @@ struct arraylen_contractIDType struct contractIDType { - uint32_t data[128]; + 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 responseCode_PaymentDetailsType ResponseCode; + 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 { - int16_t Multiplier; + int8_t Multiplier; enum unitSymbolType Unit; - int32_t Value; + int16_t Value; }; -struct ChargeParameterDiscoveryReqType +struct AC_PEVChargeParameterType { - struct PEVStatusType PEVStatus; - enum chargingModeType ChargingMode; + struct AC_PEVStatusType AC_PEVStatus; int32_t EoC; struct FloatingValueType EAmount; struct FloatingValueType PEVMaxPower; - int16_t PEVMaxPhases; + int8_t PEVMaxPhases; struct FloatingValueType PEVMaxVoltage; struct FloatingValueType PEVMinVoltage; struct FloatingValueType PEVMaxCurrent; @@ -608,6 +1082,60 @@ struct ChargeParameterDiscoveryReqType }; +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; @@ -617,7 +1145,7 @@ struct arraylen_energyProviderType struct energyProviderType { - uint32_t data[20]; + uint32_t data[64]; struct arraylen_energyProviderType arraylen; }; @@ -626,38 +1154,12 @@ struct selection_ChargeParameterDiscoveryResType { unsigned int EnergyProvider:1; unsigned int TariffTable:1; + unsigned int AC_EVSEChargeParameter:1; + unsigned int DC_EVSEChargeParameter:1; }; -struct arraylen_currencyType -{ - size_t data; - - -}; - -struct currencyType -{ - uint32_t data[3]; - struct arraylen_currencyType arraylen; - -}; - -struct arraylen_tariffDescriptionType -{ - size_t data; - - -}; - -struct tariffDescriptionType -{ - uint32_t data[32]; - struct arraylen_tariffDescriptionType arraylen; - -}; - struct selection_TariffDescrType { unsigned int TariffDescription:1; @@ -665,6 +1167,20 @@ struct selection_TariffDescrType }; +struct arraylen_ePriceType +{ + size_t data; + + +}; + +struct ePriceType +{ + uint32_t data[128]; + struct arraylen_ePriceType arraylen; + +}; + struct selection_TariffEntryType { unsigned int EPrice:1; @@ -675,8 +1191,8 @@ struct selection_TariffEntryType struct TariffEntryType { uint32_t TariffStart; - struct FloatingValueType TariffPMax; - struct FloatingValueType EPrice; + int16_t TariffPMax; + struct ePriceType EPrice; struct selection_TariffEntryType isused; }; @@ -697,8 +1213,8 @@ struct TariffEntriesType struct TariffDescrType { - enum tariffIDType TariffID; - struct tariffDescriptionType TariffDescription; + int16_t TariffID; + enum tariffDescriptionType TariffDescription; struct TariffEntriesType TariffEntries; struct selection_TariffDescrType isused; @@ -713,79 +1229,187 @@ struct arraylen_TariffTableType struct TariffTableType { - struct currencyType Currency; + 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 responseCode_ChargeParameterDiscoveryType ResponseCode; - struct EVSEStatusType EVSEStatus; - struct FloatingValueType EVSEMaxVoltage; - struct FloatingValueType EVSEMinVoltage; - struct FloatingValueType EVSEMaxCurrent; - struct FloatingValueType EVSEMinCurrent; - int16_t EVSEMaxPhases; + enum responseCodeType ResponseCode; struct energyProviderType EnergyProvider; struct TariffTableType TariffTable; + struct AC_EVSEChargeParameterType* AC_EVSEChargeParameter; + struct DC_EVSEChargeParameterType* DC_EVSEChargeParameter; struct selection_ChargeParameterDiscoveryResType isused; }; -struct LineLockReqType -{ - struct PEVStatusType PEVStatus; - int ReqLockStatus; - - -}; - -struct LineLockResType -{ - enum responseCode_LineLockType ResponseCode; - struct EVSEStatusType EVSEStatus; - - -}; - 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 { - struct PEVStatusType PEVStatus; + int16_t Tariff; + struct ChargingProfileType ChargingProfile; int ReqSwitchStatus; - enum tariffIDType Tariff; + 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 responseCode_PowerDeliveryType ResponseCode; - struct EVSEStatusType EVSEStatus; + 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; - - int NO_MEMBER:1; - }; struct selection_MeteringStatusResType { unsigned int PCurrent:1; unsigned int MeterInfo:1; + unsigned int AC_EVSEStatus:1; + unsigned int DC_EVSEStatus:1; }; @@ -807,17 +1431,43 @@ struct meterIDType 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; @@ -826,13 +1476,14 @@ struct MeterInfoType struct MeteringStatusResType { - enum responseCode_MeteringStatusType ResponseCode; + enum responseCodeType ResponseCode; struct evseIDType EVSEID; - struct EVSEStatusType EVSEStatus; 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; }; @@ -841,46 +1492,162 @@ 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 PEVStatusType PEVStatus; - int32_t TCurrent; - enum tariffIDType Tariff; + 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 responseCode_MeteringReceiptType ResponseCode; + 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 PEVStatusType PEVStatus; + struct DC_PEVStatusType DC_PEVStatus; }; struct CableCheckResType { - enum responseCode_CableCheckType ResponseCode; - struct EVSEStatusType EVSEStatus; + enum responseCodeType ResponseCode; + struct DC_EVSEStatusType DC_EVSEStatus; }; struct PreChargeReqType { - struct PEVStatusType PEVStatus; + struct DC_PEVStatusType DC_PEVStatus; + struct FloatingValueType PEVRESSVoltage; struct FloatingValueType PEVTargetVoltage; struct FloatingValueType PEVDemandCurrent; struct FloatingValueType VoltageDifferential; @@ -890,45 +1657,79 @@ struct PreChargeReqType struct PreChargeResType { - enum responseCode_PreChargeType ResponseCode; - struct EVSEStatusType EVSEStatus; + 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 PEVStatusType PEVStatus; + 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 PEVDemandCurrent; 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 responseCode_CurrentDemandType ResponseCode; - struct EVSEStatusType EVSEStatus; + 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 PEVStatusType PEVStatus; + struct DC_PEVStatusType DC_PEVStatus; }; struct WeldingDetectionResType { - enum responseCode_WeldingDetectionType ResponseCode; - struct EVSEStatusType EVSEStatus; + enum responseCodeType ResponseCode; + struct DC_EVSEStatusType DC_EVSEStatus; struct FloatingValueType EVSEPresentVoltage; @@ -936,15 +1737,14 @@ struct WeldingDetectionResType struct TerminateChargingReqType { - struct PEVStatusType PEVStatus; + struct DC_PEVStatusType DC_PEVStatus; }; struct TerminateChargingResType { - enum responseCode_TerminateChargingType ResponseCode; - struct EVSEStatusType EVSEStatus; + enum responseCodeType ResponseCode; struct FloatingValueType EVSEPresentVoltage; @@ -956,20 +1756,28 @@ struct BodyType 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 LineLockReqType* LineLockReq; - struct LineLockResType* LineLockRes; 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; @@ -986,7 +1794,7 @@ struct BodyType struct AnonType_V2G_Message { - struct HeaderType* Header; + struct MessageHeaderType* Header; struct BodyType Body; diff --git a/src/service/v2g_serviceDispatcher.c b/src/service/v2g_serviceDispatcher.c index 905269f..7cca29f 100644 --- a/src/service/v2g_serviceDispatcher.c +++ b/src/service/v2g_serviceDispatcher.c @@ -21,9 +21,11 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXISeGen

+ * ********************************************************************/ @@ -36,10 +38,85 @@ #include "EXITypes.h" #include "EXIDecoder.h" #include "EXIEncoder.h" +#include "StringTable.h" +#include 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 @@ -48,18 +125,231 @@ static int deserializeElementCharacter(struct EXIService* service) { switch(service->eqn.namespaceURI) { - case 4: + case 0: switch(service->eqn.localPart) { - case 43: /*PEVID*/ + case 0: /*attr_Algorithm*/ if(service->val.type == STRING) { - if( service->idPath.id[2] == 78) + 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] == 33) + } 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; @@ -74,21 +364,7 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 77: /*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 76: /*ServiceScope*/ + 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)); @@ -103,24 +379,11 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 9: /*ContractID*/ - if(service->val.type == STRING) - { - 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 - { - return -1; /* wrong data type */ - } - - break; - case 8: /*ChargingMode*/ + case 112: /*ServiceType*/ if(service->val.type == ENUMERATION) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->ChargingMode = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq->ServiceType = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq->isused.ServiceType=1; } @@ -130,10 +393,11 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 27: /*EoC*/ - if(service->val.type == INTEGER_32) + case 104: /*ServiceID*/ + if(service->val.type == BINARY_HEX) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->EoC = service->val.int32; + 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; } @@ -143,10 +407,10 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 45: /*PEVMaxPhases*/ - if(service->val.type == INTEGER_16) + case 95: /*SelectedPaymentOption*/ + if(service->val.type == ENUMERATION) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxPhases = service->val.int32; + service->exiMsg.V2G_Message.Body.ServicePaymentSelectionReq->SelectedPaymentOption = service->val.enumeration; } @@ -156,10 +420,19 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 64: /*ReqLockStatus*/ - if(service->val.type == BOOLEAN) + case 30: /*ContractID*/ + if(service->val.type == STRING) { - service->exiMsg.V2G_Message.Body.LineLockReq->ReqLockStatus = service->val.boolean; + 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; + } } @@ -169,7 +442,56 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 65: /*ReqSwitchStatus*/ + 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; @@ -182,17 +504,32 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 83: /*Tariff*/ - if(service->val.type == ENUMERATION) + case 41: /*EVSEID*/ + if(service->val.type == BINARY_HEX) { - if( service->idPath.id[2] == 56) + 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) { - service->exiMsg.V2G_Message.Body.PowerDeliveryReq->Tariff = service->val.enumeration; - service->exiMsg.V2G_Message.Body.PowerDeliveryReq->isused.Tariff=1; + 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[2] == 33) + } else if(service->idPath.id[1] == 0) { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->Tariff = service->val.enumeration; + 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; } @@ -203,10 +540,10 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 82: /*TCurrent*/ - if(service->val.type == INTEGER_32) + case 118: /*TCurrent*/ + if(service->val.type == INTEGER) { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->TCurrent = service->val.int32; + _setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->TCurrent)); service->exiMsg.V2G_Message.Body.MeteringReceiptReq->isused.TCurrent=1; @@ -216,16 +553,121 @@ static int deserializeElementCharacter(struct EXIService* service) 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 5: + case 6: switch(service->eqn.localPart) { - case 36: /*SessionID*/ + 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); + 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; + } } @@ -235,7 +677,7 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 34: /*ServiceSessionID*/ + 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); @@ -250,7 +692,7 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 25: /*ProtocolVersion*/ + 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)); @@ -265,20 +707,7 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 10: /*Event*/ - if(service->val.type == ENUMERATION) - { - service->exiMsg.V2G_Message.Header->Notification.EventList.Event = service->val.enumeration; - - - } - else - { - return -1; /* wrong data type */ - } - - break; - case 14: /*FaultCode*/ + case 67: /*FaultCode*/ if(service->val.type == ENUMERATION) { service->exiMsg.V2G_Message.Header->Notification.FaultCode = service->val.enumeration; @@ -292,7 +721,7 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 15: /*FaultMsg*/ + 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)); @@ -307,48 +736,91 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 4: /*ConnectorLocked*/ + 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[2] == 78) + if( service->idPath.id[3] == 8 && service->idPath.id[2] == 61) { - service->exiMsg.V2G_Message.Body.SessionSetupReq->PEVStatus.ConnectorLocked = service->val.boolean; + service->exiMsg.V2G_Message.Body.MeteringStatusReq->AC_PEVStatus->ConnectorLocked = service->val.boolean; - } else if(service->idPath.id[2] == 4) + } else if(service->idPath.id[3] == 8 && service->idPath.id[2] == 57) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVStatus.ConnectorLocked = service->val.boolean; + service->exiMsg.V2G_Message.Body.MeteringReceiptReq->AC_PEVStatus->ConnectorLocked = service->val.boolean; - } else if(service->idPath.id[2] == 28) + } else if(service->idPath.id[3] == 1) { - service->exiMsg.V2G_Message.Body.LineLockReq->PEVStatus.ConnectorLocked = service->val.boolean; + service->exiMsg.V2G_Message.Body.LineLockReq->AC_PEVStatus.ConnectorLocked = service->val.boolean; - } else if(service->idPath.id[2] == 56) + } else if(service->idPath.id[3] == 35 && service->idPath.id[2] == 61) { - service->exiMsg.V2G_Message.Body.PowerDeliveryReq->PEVStatus.ConnectorLocked = service->val.boolean; + service->exiMsg.V2G_Message.Body.MeteringStatusReq->DC_PEVStatus->ConnectorLocked = service->val.boolean; - } else if(service->idPath.id[2] == 33) + } else if(service->idPath.id[3] == 35 && service->idPath.id[2] == 57) { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->PEVStatus.ConnectorLocked = service->val.boolean; + service->exiMsg.V2G_Message.Body.MeteringReceiptReq->DC_PEVStatus->ConnectorLocked = service->val.boolean; - } else if(service->idPath.id[2] == 0) + } else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 3) { - service->exiMsg.V2G_Message.Body.CableCheckReq->PEVStatus.ConnectorLocked = service->val.boolean; + service->exiMsg.V2G_Message.Body.CableCheckReq->DC_PEVStatus.ConnectorLocked = service->val.boolean; - } else if(service->idPath.id[2] == 60) + } else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 84) { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVStatus.ConnectorLocked = service->val.boolean; + service->exiMsg.V2G_Message.Body.PreChargeReq->DC_PEVStatus.ConnectorLocked = service->val.boolean; - } else if(service->idPath.id[2] == 10) + } else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 33) { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVStatus.ConnectorLocked = service->val.boolean; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->DC_PEVStatus.ConnectorLocked = service->val.boolean; - } else if(service->idPath.id[2] == 90) + } else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 126) { - service->exiMsg.V2G_Message.Body.WeldingDetectionReq->PEVStatus.ConnectorLocked = service->val.boolean; + service->exiMsg.V2G_Message.Body.WeldingDetectionReq->DC_PEVStatus.ConnectorLocked = service->val.boolean; - } else if(service->idPath.id[2] == 85) + } else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 121) { - service->exiMsg.V2G_Message.Body.TerminateChargingReq->PEVStatus.ConnectorLocked = service->val.boolean; + 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; } @@ -359,48 +831,64 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 0: /*ChargerStandby*/ + case 98: /*PEVStandby*/ if(service->val.type == BOOLEAN) { - if( service->idPath.id[2] == 78) + if( service->idPath.id[3] == 8 && service->idPath.id[2] == 61) { - service->exiMsg.V2G_Message.Body.SessionSetupReq->PEVStatus.ChargerStandby = service->val.boolean; + service->exiMsg.V2G_Message.Body.MeteringStatusReq->AC_PEVStatus->PEVStandby = service->val.boolean; - } else if(service->idPath.id[2] == 4) + } else if(service->idPath.id[3] == 8 && service->idPath.id[2] == 57) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVStatus.ChargerStandby = service->val.boolean; + service->exiMsg.V2G_Message.Body.MeteringReceiptReq->AC_PEVStatus->PEVStandby = service->val.boolean; - } else if(service->idPath.id[2] == 28) + } else if(service->idPath.id[3] == 1) { - service->exiMsg.V2G_Message.Body.LineLockReq->PEVStatus.ChargerStandby = service->val.boolean; + service->exiMsg.V2G_Message.Body.LineLockReq->AC_PEVStatus.PEVStandby = service->val.boolean; - } else if(service->idPath.id[2] == 56) + } else if(service->idPath.id[3] == 35 && service->idPath.id[2] == 61) { - service->exiMsg.V2G_Message.Body.PowerDeliveryReq->PEVStatus.ChargerStandby = service->val.boolean; + service->exiMsg.V2G_Message.Body.MeteringStatusReq->DC_PEVStatus->PEVStandby = service->val.boolean; - } else if(service->idPath.id[2] == 33) + } else if(service->idPath.id[3] == 35 && service->idPath.id[2] == 57) { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->PEVStatus.ChargerStandby = service->val.boolean; + service->exiMsg.V2G_Message.Body.MeteringReceiptReq->DC_PEVStatus->PEVStandby = service->val.boolean; - } else if(service->idPath.id[2] == 0) + } else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 3) { - service->exiMsg.V2G_Message.Body.CableCheckReq->PEVStatus.ChargerStandby = service->val.boolean; + service->exiMsg.V2G_Message.Body.CableCheckReq->DC_PEVStatus.PEVStandby = service->val.boolean; - } else if(service->idPath.id[2] == 60) + } else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 84) { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVStatus.ChargerStandby = service->val.boolean; + service->exiMsg.V2G_Message.Body.PreChargeReq->DC_PEVStatus.PEVStandby = service->val.boolean; - } else if(service->idPath.id[2] == 10) + } else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 33) { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVStatus.ChargerStandby = service->val.boolean; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->DC_PEVStatus.PEVStandby = service->val.boolean; - } else if(service->idPath.id[2] == 90) + } else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 126) { - service->exiMsg.V2G_Message.Body.WeldingDetectionReq->PEVStatus.ChargerStandby = service->val.boolean; + service->exiMsg.V2G_Message.Body.WeldingDetectionReq->DC_PEVStatus.PEVStandby = service->val.boolean; - } else if(service->idPath.id[2] == 85) + } else if(service->idPath.id[3] == 39 && service->idPath.id[2] == 121) { - service->exiMsg.V2G_Message.Body.TerminateChargingReq->PEVStatus.ChargerStandby = service->val.boolean; + 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; } @@ -411,48 +899,108 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 27: /*ReadyToCharge*/ - if(service->val.type == BOOLEAN) + case 77: /*Multiplier*/ + if(service->val.type == NBIT_UNSIGNED_INTEGER) { - if( service->idPath.id[2] == 78) + if( service->idPath.id[3] == 72) { - service->exiMsg.V2G_Message.Body.SessionSetupReq->PEVStatus.ReadyToCharge = service->val.boolean; + service->exiMsg.V2G_Message.Body.PreChargeReq->PEVRESSVoltage.Multiplier = service->val.integer.val.int8; - } else if(service->idPath.id[2] == 4) + } else if(service->idPath.id[3] == 74 && service->idPath.id[2] == 84) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVStatus.ReadyToCharge = service->val.boolean; + service->exiMsg.V2G_Message.Body.PreChargeReq->PEVTargetVoltage.Multiplier = service->val.integer.val.int8; - } else if(service->idPath.id[2] == 28) + } else if(service->idPath.id[3] == 67) { - service->exiMsg.V2G_Message.Body.LineLockReq->PEVStatus.ReadyToCharge = service->val.boolean; + service->exiMsg.V2G_Message.Body.PreChargeReq->PEVDemandCurrent.Multiplier = service->val.integer.val.int8; - } else if(service->idPath.id[2] == 56) + } else if(service->idPath.id[3] == 125 && service->idPath.id[2] == 84) { - service->exiMsg.V2G_Message.Body.PowerDeliveryReq->PEVStatus.ReadyToCharge = service->val.boolean; + service->exiMsg.V2G_Message.Body.PreChargeReq->VoltageDifferential.Multiplier = service->val.integer.val.int8; - } else if(service->idPath.id[2] == 33) + } else if(service->idPath.id[3] == 15) { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->PEVStatus.ReadyToCharge = service->val.boolean; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->ChargeCurrentRequest.Multiplier = service->val.integer.val.int8; - } else if(service->idPath.id[2] == 0) + } else if(service->idPath.id[3] == 71) { - service->exiMsg.V2G_Message.Body.CableCheckReq->PEVStatus.ReadyToCharge = service->val.boolean; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumVoltageLimit.Multiplier = service->val.integer.val.int8; - } else if(service->idPath.id[2] == 60) + } else if(service->idPath.id[3] == 69) { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVStatus.ReadyToCharge = service->val.boolean; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumCurrentLimit.Multiplier = service->val.integer.val.int8; - } else if(service->idPath.id[2] == 10) + } else if(service->idPath.id[3] == 70) { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVStatus.ReadyToCharge = service->val.boolean; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumPowerLimit.Multiplier = service->val.integer.val.int8; - } else if(service->idPath.id[2] == 90) + } else if(service->idPath.id[3] == 90) { - service->exiMsg.V2G_Message.Body.WeldingDetectionReq->PEVStatus.ReadyToCharge = service->val.boolean; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->RemainingTimeToFullSoC.Multiplier = service->val.integer.val.int8; - } else if(service->idPath.id[2] == 85) + } else if(service->idPath.id[3] == 89) { - service->exiMsg.V2G_Message.Body.TerminateChargingReq->PEVStatus.ReadyToCharge = service->val.boolean; + 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; } @@ -463,130 +1011,106 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 21: /*Multiplier*/ - if(service->val.type == INTEGER_16) - { - if( service->idPath.id[3] == 15) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->EAmount.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 46) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxPower.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 47) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 49) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMinVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 44) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 48) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMinCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 51 && service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVTargetVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 42 && service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVDemandCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 89 && service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->VoltageDifferential.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 51 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVTargetVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 42 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVDemandCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 14) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->CurrentDifferential.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 89 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->VoltageDifferential.Multiplier = service->val.int32; - - } else if(service->idPath.id[4] == 19) - { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterReading.Multiplier = service->val.int32; - } - - - } - else - { - return -1; /* wrong data type */ - } - - break; - case 52: /*Unit*/ + case 151: /*Unit*/ if(service->val.type == ENUMERATION) { - if( service->idPath.id[3] == 15) + if( service->idPath.id[3] == 72) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->EAmount.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.PreChargeReq->PEVRESSVoltage.Unit = service->val.enumeration; - } else if(service->idPath.id[3] == 46) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxPower.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 47) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxVoltage.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 49) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMinVoltage.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 44) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxCurrent.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 48) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMinCurrent.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 51 && service->idPath.id[2] == 60) + } 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] == 42 && service->idPath.id[2] == 60) + } else if(service->idPath.id[3] == 67) { service->exiMsg.V2G_Message.Body.PreChargeReq->PEVDemandCurrent.Unit = service->val.enumeration; - } else if(service->idPath.id[3] == 89 && service->idPath.id[2] == 60) + } 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] == 51 && service->idPath.id[2] == 10) + } 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] == 42 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVDemandCurrent.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 14) + } else if(service->idPath.id[3] == 37) { service->exiMsg.V2G_Message.Body.CurrentDemandReq->CurrentDifferential.Unit = service->val.enumeration; - } else if(service->idPath.id[3] == 89 && service->idPath.id[2] == 10) + } 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] == 19) + } 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; } @@ -599,64 +1123,111 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 53: /*Value*/ - if(service->val.type == INTEGER_32) + case 152: /*Value*/ + if(service->val.type == INTEGER) { - if( service->idPath.id[3] == 15) + + _setInt16Value( &(service->val.integer),&(service->val.integer.val.int16)); + + if( service->idPath.id[3] == 72) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->EAmount.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.PreChargeReq->PEVRESSVoltage.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 46) + } else if(service->idPath.id[3] == 74 && service->idPath.id[2] == 84) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxPower.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.PreChargeReq->PEVTargetVoltage.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 47) + } else if(service->idPath.id[3] == 67) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxVoltage.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.PreChargeReq->PEVDemandCurrent.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 49) + } else if(service->idPath.id[3] == 125 && service->idPath.id[2] == 84) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMinVoltage.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.PreChargeReq->VoltageDifferential.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 44) + } else if(service->idPath.id[3] == 15) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxCurrent.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->ChargeCurrentRequest.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 48) + } else if(service->idPath.id[3] == 71) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMinCurrent.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumVoltageLimit.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 51 && service->idPath.id[2] == 60) + } else if(service->idPath.id[3] == 69) { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVTargetVoltage.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumCurrentLimit.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 42 && service->idPath.id[2] == 60) + } else if(service->idPath.id[3] == 70) { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVDemandCurrent.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVMaximumPowerLimit.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 89 && service->idPath.id[2] == 60) + } else if(service->idPath.id[3] == 90) { - service->exiMsg.V2G_Message.Body.PreChargeReq->VoltageDifferential.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->RemainingTimeToFullSoC.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 51 && service->idPath.id[2] == 10) + } else if(service->idPath.id[3] == 89) { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVTargetVoltage.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->RemainingTimeToBulkSoC.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 42 && service->idPath.id[2] == 10) + } else if(service->idPath.id[3] == 74 && service->idPath.id[2] == 33) { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVDemandCurrent.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVTargetVoltage.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 14) + } else if(service->idPath.id[3] == 37) { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->CurrentDifferential.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->CurrentDifferential.Value = service->val.integer.val.int16; - } else if(service->idPath.id[3] == 89 && service->idPath.id[2] == 10) + } else if(service->idPath.id[3] == 125 && service->idPath.id[2] == 33) { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->VoltageDifferential.Value = service->val.int32; + service->exiMsg.V2G_Message.Body.CurrentDemandReq->VoltageDifferential.Value = service->val.integer.val.int16; - } else if(service->idPath.id[4] == 19) + } else if(service->idPath.id[4] == 39) { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterReading.Value = service->val.int32; + 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; } @@ -667,7 +1238,286 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 17: /*MeterID*/ + 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)); @@ -682,10 +1532,26 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 20: /*MeterStatus*/ - if(service->val.type == INTEGER_16) + case 74: /*MeterPubKey*/ + if(service->val.type == BINARY_BASE64) { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterStatus = service->val.int32; + 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; @@ -696,10 +1562,10 @@ static int deserializeElementCharacter(struct EXIService* service) } break; - case 40: /*TMeter*/ - if(service->val.type == INTEGER_32) + case 139: /*TMeter*/ + if(service->val.type == INTEGER) { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.TMeter = service->val.int32; + _setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.TMeter)); service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.isused.TMeter=1; @@ -717,6 +1583,69 @@ static int deserializeElementCharacter(struct EXIService* service) 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 @@ -725,22 +1654,71 @@ static int deserializeElementOrServiceCall(struct EXIService* service) { switch(service->eqn.namespaceURI) { + case 0: + switch(service->eqn.localPart) { + } + break; case 4: switch(service->eqn.localPart) { - case 78:/* SessionSetupReq */ + + 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)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - sessionSetup((service->exiMsg.V2G_Message.Body.SessionSetupReq), (service->exiMsg.V2G_Message.Body.SessionSetupRes)); + 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; @@ -756,20 +1734,20 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; - case 67:/* ServiceDiscoveryReq */ + case 100:/* ServiceDiscoveryReq */ /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - serviceDiscovery((service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq), (service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes)); + 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; @@ -785,20 +1763,49 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; - case 72:/* ServicePaymentSelectionReq */ + case 96:/* ServiceDetailReq */ /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - selectedServicePayment((service->exiMsg.V2G_Message.Body.ServicePaymentSelectionReq), (service->exiMsg.V2G_Message.Body.ServicePaymentSelectionRes)); + 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; @@ -814,20 +1821,20 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; - case 52:/* PaymentDetailsReq */ + case 75:/* PaymentDetailsReq */ /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - paymentDetails((service->exiMsg.V2G_Message.Body.PaymentDetailsReq), (service->exiMsg.V2G_Message.Body.PaymentDetailsRes)); + 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; @@ -843,20 +1850,49 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; - case 4:/* ChargeParameterDiscoveryReq */ + case 23:/* ContractAuthenticationReq */ /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - chargeParameterDiscovery((service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq), (service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes)); + 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; @@ -872,49 +1908,20 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; - case 28:/* LineLockReq */ + case 80:/* PowerDeliveryReq */ /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - lineLock((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 56:/* 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.Body.PowerDeliveryReq), (service->exiMsg.V2G_Message.Body.PowerDeliveryRes)); + 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; @@ -930,20 +1937,20 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; - case 37:/* MeteringStatusReq */ + case 61:/* MeteringStatusReq */ /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - meteringStatus((service->exiMsg.V2G_Message.Body.MeteringStatusReq), (service->exiMsg.V2G_Message.Body.MeteringStatusRes)); + 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; @@ -959,20 +1966,20 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; - case 33:/* MeteringReceiptReq */ + case 57:/* MeteringReceiptReq */ /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - meteringReceipt((service->exiMsg.V2G_Message.Body.MeteringReceiptReq), (service->exiMsg.V2G_Message.Body.MeteringReceiptRes)); + 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; @@ -988,20 +1995,107 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; - case 0:/* CableCheckReq */ + case 11:/* CertificateUpdateReq */ /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - cableCheck((service->exiMsg.V2G_Message.Body.CableCheckReq), (service->exiMsg.V2G_Message.Body.CableCheckRes)); + 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; @@ -1017,20 +2111,20 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; - case 60:/* PreChargeReq */ + case 84:/* PreChargeReq */ /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - preCharge((service->exiMsg.V2G_Message.Body.PreChargeReq), (service->exiMsg.V2G_Message.Body.PreChargeRes)); + 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; @@ -1046,20 +2140,20 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; - case 10:/* CurrentDemandReq */ + case 33:/* CurrentDemandReq */ /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - currentDemand((service->exiMsg.V2G_Message.Body.CurrentDemandReq), (service->exiMsg.V2G_Message.Body.CurrentDemandRes)); + 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; @@ -1075,20 +2169,20 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; - case 90:/* WeldingDetectionReq */ + case 126:/* WeldingDetectionReq */ /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - weldingDetection((service->exiMsg.V2G_Message.Body.WeldingDetectionReq), (service->exiMsg.V2G_Message.Body.WeldingDetectionRes)); + 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; @@ -1104,20 +2198,20 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; - case 85:/* TerminateChargingReq */ + case 121:/* TerminateChargingReq */ /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) + /*if((service->inStream.size)!= *(service->inStream.pos)) { service->errorCode = EXI_NON_VALID_MESSAGE; return -1; - } + } */ /* service call */ - terminateCharging((service->exiMsg.V2G_Message.Body.TerminateChargingReq), (service->exiMsg.V2G_Message.Body.TerminateChargingRes)); + 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; @@ -1135,32 +2229,113 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; } break; - case 5: + case 6: switch(service->eqn.localPart) { - case 11:/* EventList */ - - service->exiMsg.V2G_Message.Header->Notification.isused.EventList=1; - - break; - case 28:/* Service */ + case 110:/* Service */ service->exiMsg.V2G_Message.Body.ServicePaymentSelectionReq->ServiceList.arraylen.Service++; break; - case 19:/* MeterReading */ + 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 7: + 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; @@ -1168,13 +2343,10 @@ static int deserializeElementOrServiceCall(struct EXIService* service) } return 0; } - static int deserializeSessionSetupReqMsg(struct EXIService* service) { struct SessionSetupReqType reqMsg; struct SessionSetupResType resMsg; - init_SessionSetupReqType(&reqMsg); - service->exiMsg.V2G_Message.Body.SessionSetupReq = &reqMsg; service->exiMsg.V2G_Message.Body.SessionSetupRes = &resMsg; @@ -1193,6 +2365,16 @@ static int deserializeServiceDiscoveryReqMsg(struct EXIService* service) 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; @@ -1207,18 +2389,44 @@ 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; @@ -1241,8 +2449,20 @@ 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; @@ -1253,6 +2473,18 @@ 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; @@ -1263,6 +2495,16 @@ 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; @@ -1271,6 +2513,28 @@ static int deserializeMeteringReceiptReqMsg(struct EXIService* service) 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; @@ -1324,7 +2588,6 @@ static int deserializeTerminateChargingReqMsg(struct EXIService* service) return deserializeMessage(service); } - /** * Deserialize the EXI stream * @return 0 = 0K; -1 = ERROR @@ -1364,46 +2627,58 @@ static int deserializeMessage(struct EXIService* service) service->idPath.id[service->idPath.pos++]=service->eqn.localPart; /* setup the request context*/ - if(service->eqn.localPart==78 && service->eqn.namespaceURI==4) + if(service->eqn.localPart==114 && service->eqn.namespaceURI==5) { return deserializeSessionSetupReqMsg(service); - } else if(service->eqn.localPart==67 && service->eqn.namespaceURI==4) + } else if(service->eqn.localPart==100 && service->eqn.namespaceURI==5) { return deserializeServiceDiscoveryReqMsg(service); - } else if(service->eqn.localPart==72 && service->eqn.namespaceURI==4) + } 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==52 && service->eqn.namespaceURI==4) + } else if(service->eqn.localPart==75 && service->eqn.namespaceURI==5) { return deserializePaymentDetailsReqMsg(service); - } else if(service->eqn.localPart==4 && service->eqn.namespaceURI==4) + } 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==28 && service->eqn.namespaceURI==4) - { - return deserializeLineLockReqMsg(service); - } else if(service->eqn.localPart==56 && service->eqn.namespaceURI==4) + } else if(service->eqn.localPart==80 && service->eqn.namespaceURI==5) { return deserializePowerDeliveryReqMsg(service); - } else if(service->eqn.localPart==37 && service->eqn.namespaceURI==4) + } else if(service->eqn.localPart==61 && service->eqn.namespaceURI==5) { return deserializeMeteringStatusReqMsg(service); - } else if(service->eqn.localPart==33 && service->eqn.namespaceURI==4) + } else if(service->eqn.localPart==57 && service->eqn.namespaceURI==5) { return deserializeMeteringReceiptReqMsg(service); - } else if(service->eqn.localPart==0 && service->eqn.namespaceURI==4) + } 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==60 && service->eqn.namespaceURI==4) + } else if(service->eqn.localPart==84 && service->eqn.namespaceURI==5) { return deserializePreChargeReqMsg(service); - } else if(service->eqn.localPart==10 && service->eqn.namespaceURI==4) + } else if(service->eqn.localPart==33 && service->eqn.namespaceURI==5) { return deserializeCurrentDemandReqMsg(service); - } else if(service->eqn.localPart==90 && service->eqn.namespaceURI==4) + } else if(service->eqn.localPart==126 && service->eqn.namespaceURI==5) { return deserializeWeldingDetectionReqMsg(service); - } else if(service->eqn.localPart==85 && service->eqn.namespaceURI==4) + } else if(service->eqn.localPart==121 && service->eqn.namespaceURI==5) { return deserializeTerminateChargingReqMsg(service); } @@ -1426,7 +2701,8 @@ static int deserializeMessage(struct EXIService* service) break; case ATTRIBUTE: /* decode */ - /* returnCode = exiDecodeAttribute(&isStream, &stateDecode, &eqn, &val); */ + returnCode = exiDecodeAttribute(&(service->inStream), &(service->stateDecode), &(service->eqn), &(service->val)); + returnCode = deserializeAttributeCharacter(service); break; default: /* ERROR */ @@ -1451,10 +2727,13 @@ static int deserializeMessage(struct EXIService* service) */ int messageDispatcher(struct EXIService* service, uint8_t* inStream, uint16_t sizeInStream, uint8_t* outStream, uint16_t sizeOutStream, uint16_t* outStreamLength) { - struct HeaderType header; + struct MessageHeaderType header; + struct SignatureType signature; + uint32_t inPos, outPos; - uint16_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; @@ -1476,17 +2755,21 @@ int messageDispatcher(struct EXIService* service, uint8_t* inStream, uint16_t si /* clear error code */ service->errorCode = 0; - /* init EXI decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); + /* init decoder (read header, set initial state) */ + /* init runtime table */ + exiInitNameTableRuntime(&runtimeTableDecode); + exiInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode); - /* init EXI encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); /* init uniqueID stack */ service->idPath.pos=0; - init_HeaderType(&header); - service->exiMsg.V2G_Message.Header = &header; + init_MessageHeaderType(&header); + service->exiMsg.V2G_Message.Header = &header; + service->exiMsg.V2G_Message.Header->Security.Signature=&signature; /* init EXI message */ init_EXIDocumentType(&(service->exiMsg)); diff --git a/src/service/v2g_serviceDispatcher.h b/src/service/v2g_serviceDispatcher.h index 9f65eff..14c5d0d 100644 --- a/src/service/v2g_serviceDispatcher.h +++ b/src/service/v2g_serviceDispatcher.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * 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 @@ -18,7 +18,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/service/v2g_serviceMethods.h b/src/service/v2g_serviceMethods.h index bf49988..e41db25 100644 --- a/src/service/v2g_serviceMethods.h +++ b/src/service/v2g_serviceMethods.h @@ -22,9 +22,11 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.5 * @contact Joerg.Heuer@siemens.com * + *

Code generated by EXISeGen

+ * ********************************************************************/ @@ -39,33 +41,41 @@ extern "C" { #include "EXITypes.h" /* This service methods has to be implemented by the EVSE server */ -int sessionSetup(struct SessionSetupReqType* param, struct SessionSetupResType* result); +int sessionSetup(struct MessageHeaderType* header, struct SessionSetupReqType* param, struct SessionSetupResType* result); -int serviceDiscovery(struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result); +int serviceDiscovery(struct MessageHeaderType* header, struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result); -int selectedServicePayment(struct ServicePaymentSelectionReqType* param, struct ServicePaymentSelectionResType* result); +int serviceDetail(struct MessageHeaderType* header, struct ServiceDetailReqType* param, struct ServiceDetailResType* result); -int paymentDetails(struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result); +int selectedServicePayment(struct MessageHeaderType* header, struct ServicePaymentSelectionReqType* param, struct ServicePaymentSelectionResType* result); -int chargeParameterDiscovery(struct ChargeParameterDiscoveryReqType* param, struct ChargeParameterDiscoveryResType* result); +int paymentDetails(struct MessageHeaderType* header, struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result); -int lineLock(struct LineLockReqType* param, struct LineLockResType* result); +int contractAuthentication(struct MessageHeaderType* header, struct ContractAuthenticationReqType* param, struct ContractAuthenticationResType* result); -int powerDelivery(struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result); +int chargeParameterDiscovery(struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* param, struct ChargeParameterDiscoveryResType* result); -int meteringStatus(struct MeteringStatusReqType* param, struct MeteringStatusResType* result); +int powerDelivery(struct MessageHeaderType* header, struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result); -int meteringReceipt(struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result); +int meteringStatus(struct MessageHeaderType* header, struct MeteringStatusReqType* param, struct MeteringStatusResType* result); -int cableCheck(struct CableCheckReqType* param, struct CableCheckResType* result); +int meteringReceipt(struct MessageHeaderType* header, struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result); -int preCharge(struct PreChargeReqType* param, struct PreChargeResType* result); +int certificateUpdate(struct MessageHeaderType* header, struct CertificateUpdateReqType* param, struct CertificateUpdateResType* result); -int currentDemand(struct CurrentDemandReqType* param, struct CurrentDemandResType* result); +int certificateInstallation(struct MessageHeaderType* header, struct CertificateInstallationReqType* param, struct CertificateInstallationResType* result); -int weldingDetection(struct WeldingDetectionReqType* param, struct WeldingDetectionResType* result); +int lineLock(struct MessageHeaderType* header, struct LineLockReqType* param, struct LineLockResType* result); -int terminateCharging(struct TerminateChargingReqType* param, struct TerminateChargingResType* 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); diff --git a/src/test/evse_server.c b/src/test/evse_server.c new file mode 100644 index 0000000..0d37e32 --- /dev/null +++ b/src/test/evse_server.c @@ -0,0 +1,87 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @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; + +} diff --git a/src/test/evse_server.h b/src/test/evse_server.h new file mode 100644 index 0000000..81516c8 --- /dev/null +++ b/src/test/evse_server.h @@ -0,0 +1,33 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @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_ */ diff --git a/src/test/evse_serviceMethods.c b/src/test/evse_serviceMethods.c new file mode 100644 index 0000000..7e29b45 --- /dev/null +++ b/src/test/evse_serviceMethods.c @@ -0,0 +1,569 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Sebastian.Kaebisch.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + ********************************************************************/ + +#include "v2g_serviceMethods.h" +#include "v2g_serviceDataTypes.h" +#include + +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; +} + + + + diff --git a/src/test/main.c b/src/test/main.c new file mode 100644 index 0000000..36f8b15 --- /dev/null +++ b/src/test/main.c @@ -0,0 +1,43 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @author Sebastian.Kaebisch.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Switch for sample programs: EXI codec only or for entire V2G service

+ * + ********************************************************************/ + +#include +#include + +#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); + +} + diff --git a/src/test/main.h b/src/test/main.h new file mode 100644 index 0000000..6071311 --- /dev/null +++ b/src/test/main.h @@ -0,0 +1,34 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @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 diff --git a/src/test/main_codec.old b/src/test/main_codec.old new file mode 100644 index 0000000..8e4158b --- /dev/null +++ b/src/test/main_codec.old @@ -0,0 +1,259 @@ +/* + * 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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + *

Sample program to illustrate how to read an EXI stream and + * directly write it again to an output

+ * + *

e.g., data/test/sessionSetupReq.xml.exi out/test/sessionSetupReq.xml.exi

+ ********************************************************************/ + +#include +#include + +#include "EXIDecoder.h" +#include "StringTable.h" +#include "EXIEncoder.h" +#include "EXITypes.h" +#include "ByteStream.h" + +#define BUFFER_SIZE 1000 + +#define ARRAY_SIZE_BYTES 100 +#define ARRAY_SIZE_STRINGS 100 + +/* avoids warning: initializer element is not computable at load time */ +uint8_t bufferIn[BUFFER_SIZE]; +uint8_t bufferOut[BUFFER_SIZE]; +uint8_t data[ARRAY_SIZE_BYTES]; +uint32_t codepoints[ARRAY_SIZE_STRINGS]; + +int main_codec(int argc, char *argv[]) { + + int errn = 0; + unsigned int i; + + bitstream_t iStream, oStream; + uint16_t posDecode; + uint16_t posEncode; + + /* EXI set-up */ + exi_state_t stateDecode; + exi_state_t stateEncode; + exi_event_t event; + eqname_t eqn; + exi_value_t val; + + /* BINARY memory setup */ + bytes_t bytes = { ARRAY_SIZE_BYTES, data, 0 }; + + /* STRING memory setup */ + string_ucs_t string = { ARRAY_SIZE_STRINGS, codepoints, 0 }; + + const char * localName; + const char * namespaceURI; + + int noEndOfDocument = 1; /* true */ + + if (argc != 3) { + printf("Usage: %s exiInput exiOutput\n", argv[0]); + return -1; + } + + /* input pos */ + posDecode = 0; + + /* parse EXI stream to internal byte structures */ + readBytesFromFile(argv[1], bufferIn, BUFFER_SIZE, posDecode); + + /* setup input stream */ + iStream.size = BUFFER_SIZE; + iStream.data = bufferIn; + iStream.pos = &posDecode; + iStream.buffer = 0; + iStream.capacity = 0; + + /* setup output stream */ + posEncode = 0; + oStream.size = BUFFER_SIZE; + oStream.data = bufferOut; + oStream.pos = &posEncode; + oStream.buffer = 0; + oStream.capacity = 8; + + val.binary = bytes; + val.string = string; + + /* init decoder (read header, set initial state) */ + exiInitDecoder(&iStream, &stateDecode); + + /* init encoder (write header, set initial state) */ + exiInitEncoder(&oStream, &stateEncode); + + printf("[DECODE] >>> EXI >>> [ENCODE] \n"); + + do { + if (errn < 0) { + printf("[Encode-ERROR] %d \n", errn); + return errn; + } + + errn = exiDecodeNextEvent(&iStream, &stateDecode, &event); + if (errn < 0) { + printf("[Decode-ERROR] %d \n", errn); + return errn; + } + + switch (event) { + case START_DOCUMENT: + /* decode */ + errn = exiDecodeStartDocument(&iStream, &stateDecode); + if (errn < 0) { + printf("[Decode-ERROR] %d \n", errn); + return errn; + } + printf(">> START_DOCUMENT \n"); + /* encode */ + errn = exiEncodeStartDocument(&oStream, &stateEncode); + break; + case END_DOCUMENT: + /* decode */ + errn = exiDecodeEndDocument(&iStream, &stateDecode); + if (errn < 0) { + printf("[Decode-ERROR] %d \n", errn); + return errn; + } + 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) { + printf("[Decode-ERROR] %d \n", errn); + return errn; + } + + /* EVSEStatus + * if(eqn.localPart=1 && eqn.namespaceURI=3) { + + send CAN message... + + /* ResponseCode + } else if(eqn.localPart=2 && eqn.namespaceURI=3) { + + send CAN message... + + } else { + + + } */ + + exiGetLocalName(eqn.namespaceURI, eqn.localPart, &localName); + exiGetUri(eqn.namespaceURI, &namespaceURI); + printf(">> SE {%s}%s \n", namespaceURI, localName); + /*fflush(stdout); */ + + + /* encode */ + errn = exiEncodeStartElement(&oStream, &stateEncode, &eqn); + break; + + case START_ELEMENT_GENERIC: + /* unknown element */ + + /* read the element content as usual (element name, value, type, etc.) */ + + break; + + case END_ELEMENT: + /* decode */ + errn = exiDecodeEndElement(&iStream, &stateDecode, &eqn); + if (errn < 0) { + printf("[Decode-ERROR] %d \n", errn); + return errn; + } + exiGetLocalName(eqn.namespaceURI, eqn.localPart, &localName); + exiGetUri(eqn.namespaceURI, &namespaceURI); + printf("<< EE {%s}%s \n", namespaceURI, localName); + /* encode */ + errn = exiEncodeEndElement(&oStream, &stateEncode, &eqn); + break; + + case CHARACTERS: + /* decode */ + errn = exiDecodeCharacters(&iStream, &stateDecode, &val); + if (errn < 0) { + printf("[Decode-ERROR] %d \n", errn); + return errn; + } + if (val.type == INTEGER_BIG) { + printf(" CH int64 : %ld \n", (long int)val.int64); + } else if (val.type == BINARY_BASE64 || val.type == BINARY_HEX) { + printf(" CH Binary (len == %d) : ", val.binary.len); + for(i=0; i. + */ + +/******************************************************************* + * + * @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 + +#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,¤tDemand,&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. + */ + +/******************************************************************* + * + * @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); +} diff --git a/src/transport/v2gtp.c b/src/transport/v2gtp.c new file mode 100644 index 0000000..827dd14 --- /dev/null +++ b/src/transport/v2gtp.c @@ -0,0 +1,98 @@ + +/* + * 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 . + */ + +/******************************************************************* + * + * @author Sebastian.Kaebisch.EXT@siemens.com + * @version 0.5 + * @contact Joerg.Heuer@siemens.com + * + ********************************************************************/ + +/* + * This file implements the v2gtp header writer and reader. + * + */ + +#include +#include +#include +#include +#include +#include + +#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; +} + diff --git a/src/transport/v2gtp.h b/src/transport/v2gtp.h new file mode 100644 index 0000000..f152dd0 --- /dev/null +++ b/src/transport/v2gtp.h @@ -0,0 +1,54 @@ + +/* + * 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 . + */ + +/******************************************************************* + * + * @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