Code generated by EXISeGen
+ * + ********************************************************************/ + + + #include "appHand_service.h" + #include "appHand_dataTypes.h" + #include "EXITypes.h" + #include "appHand_EXIDecoder.h" + #include "StringTable.h" + #includeCode generated by EXISeGen
+ * + ********************************************************************/ + + +#include "appHand_service.h" +#include "appHand_dataTypes.h" + + +#include "appHand_dataTypes.h" +#include "StringTable.h" +#include "EXITypes.h" +#include "appHand_EXIEncoder.h" +#includeCode generated by EXISeGen
+ * + ********************************************************************/ + + +#include "EXITypes.h" +#include "appHand_dataTypes.h" + + +static void init_protocolNamespaceType(struct protocolNamespaceType* type) +{ + type->arraylen.data=0; + +} + +static void init_AppProtocolType(struct AppProtocolType* type) +{ + init_protocolNamespaceType(&(type->ProtocolNamespace)); + +} + +void init_AnonType_supportedAppProtocolReq(struct AnonType_supportedAppProtocolReq* type) +{ + int i_loop; + + for(i_loop=0; i_loop<20;i_loop++) + { + init_AppProtocolType(&(type->AppProtocol[i_loop])); + } + + type->arraylen.AppProtocol=0; + +} + + void init_AnonType_supportedAppProtocolRes(struct AnonType_supportedAppProtocolRes* type) +{ + type->isused.SchemaID=0; + +} + +void init_EXIDocumentType_appHand(struct EXIDocumentType_appHand* type) +{ + type->isused.supportedAppProtocolReq=0; + type->isused.supportedAppProtocolRes=0; + +} diff --git a/src/appHandshake/appHand_dataTypes.h b/src/appHandshake/appHand_dataTypes.h new file mode 100644 index 0000000..fd6814b --- /dev/null +++ b/src/appHandshake/appHand_dataTypes.h @@ -0,0 +1,130 @@ + +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXISeGen
+ * + ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef APPHANDDATATYPES_H +#define APPHANDDATATYPES_H + +#include "EXITypes.h" + + + + +enum responseCodeType_appHand +{ + OK_SuccessfulNegotiation_responseCodeType, + OK_SuccessfulNegotiationWithMinorDeviation_responseCodeType, + Failed_NoNegotiation_responseCodeType + +}; + + + + +struct arraylen_protocolNamespaceType +{ + size_t data; + + +}; + +struct protocolNamespaceType +{ + uint32_t data[100]; + struct arraylen_protocolNamespaceType arraylen; + +}; + +struct AppProtocolType +{ + struct protocolNamespaceType ProtocolNamespace; + uint32_t VersionNumberMajor; + uint32_t VersionNumberMinor; + uint8_t SchemaID; + uint8_t Priority; + + +}; + +struct arraylen_AnonType_supportedAppProtocolReq +{ + size_t AppProtocol; + + +}; + +struct AnonType_supportedAppProtocolReq +{ + struct AppProtocolType AppProtocol[20]; + struct arraylen_AnonType_supportedAppProtocolReq arraylen; + +}; + +struct selection_EXIDocumentType +{ + unsigned int supportedAppProtocolReq:1; + unsigned int supportedAppProtocolRes:1; + + +}; + +struct selection_AnonType_supportedAppProtocolRes +{ + unsigned int SchemaID:1; + + +}; + +struct AnonType_supportedAppProtocolRes +{ + enum responseCodeType_appHand ResponseCode; + uint8_t SchemaID; + struct selection_AnonType_supportedAppProtocolRes isused; + +}; + +struct EXIDocumentType_appHand +{ + struct AnonType_supportedAppProtocolReq* supportedAppProtocolReq; + struct AnonType_supportedAppProtocolRes* supportedAppProtocolRes; + struct selection_EXIDocumentType isused; + +}; + +void init_EXIDocumentType_appHand(struct EXIDocumentType_appHand* type); + +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/appHandshake/appHand_service.h b/src/appHandshake/appHand_service.h new file mode 100644 index 0000000..f5439bd --- /dev/null +++ b/src/appHandshake/appHand_service.h @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2007-2010 Siemens AG + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, seeCode 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 = EXI_INTEGER_8; + } else { + iv->val.uint8 = b; + iv->type = EXI_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 = EXI_INTEGER_16; + } else { + iv->type = EXI_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 = EXI_INTEGER_16; + } else { + iv->type = EXI_INTEGER_32; + } + } else { + if (iv->val.uint32 <= UINT16_MAX) { + iv->type = EXI_UNSIGNED_INTEGER_16; + } else { + iv->type = EXI_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 = EXI_INTEGER_32; + } else { + iv->type = EXI_INTEGER_64; + } + } else { + if (iv->val.uint64 <= UINT32_MAX) { + iv->type = EXI_UNSIGNED_INTEGER_32; + /* iv->val.uint32 = iv->val.uint64;*/ + } else { + iv->type = EXI_UNSIGNED_INTEGER_64; + } + } + return 0; + default: + return EXI_UNSUPPORTED_INTEGER_VALUE; + } + } else { + /* the 7 least significant bits hold the actual value */ + maskedOctets[i] = (b & 127); + } + } + + + return EXI_UNSUPPORTED_INTEGER_VALUE; +} + +int decodeUnsignedInteger(bitstream_t* stream, integer_t* iv) { + return _decodeUnsignedInteger(stream, iv, 0); +} + +int decodeUnsignedInteger16(bitstream_t* stream, uint16_t* uint16) { + unsigned int mShift = 0; + int errn = 0; + uint8_t b; + *uint16 = 0; + + do { + /* 1. Read the next octet */ + errn = decode(stream, &b); + /* 2. Multiply the value of the unsigned number represented by the 7 + * least significant + * bits of the octet by the current multiplier and add the result to + * the current value */ + *uint16 += (b & 127) << mShift; + /* 3. Multiply the multiplier by 128 */ + mShift += 7; + /* 4. If the most significant bit of the octet was 1, go back to step 1 */ + } while (errn >= 0 && (b >> 7) == 1); + + return errn; +} + +int decodeUnsignedInteger32(bitstream_t* stream, uint32_t* uint32) { + /* 0XXXXXXX ... 1XXXXXXX 1XXXXXXX */ + unsigned int mShift = 0; + int errn = 0; + uint8_t b; + *uint32 = 0; + + do { + /* 1. Read the next octet */ + errn = decode(stream, &b); + /* 2. Multiply the value of the unsigned number represented by the 7 + * least significant + * bits of the octet by the current multiplier and add the result to + * the current value */ + *uint32 += (b & 127) << mShift; + /* 3. Multiply the multiplier by 128 */ + mShift += 7; + /* 4. If the most significant bit of the octet was 1, go back to step 1 */ + } while (errn >= 0 && (b >> 7) == 1); + + return errn; +} + +/** + * Decode an arbitrary precision non negative integer using a sequence of + * octets. The most significant bit of the last octet is set to zero to + * indicate sequence termination. Only seven bits per octet are used to + * store the integer's value. + */ +int decodeUnsignedInteger64(bitstream_t* stream, uint64_t* uint64) { + unsigned int mShift = 0; + int errn = 0; + uint8_t b; + *uint64 = 0L; + + do { + errn = decode(stream, &b); + *uint64 += ((uint64_t) (b & 127)) << mShift; + mShift += 7; + } while (errn >= 0 && (b >> 7) == 1); + + return errn; +} + + +int decodeInteger(bitstream_t* stream, integer_t* iv) { + int b; + int errn = decodeBoolean(stream, &b); + if (errn < 0) { + return errn; + } + + return _decodeUnsignedInteger(stream, iv, b); +} + +/** + * Decode an arbitrary precision integer using a sign bit followed by a + * sequence of octets. The most significant bit of the last octet is set to + * zero to indicate sequence termination. Only seven bits per octet are used + * to store the integer's value. + */ +int decodeInteger32(bitstream_t* stream, int32_t* int32) { + int b; + uint32_t uint32; + int errn = decodeBoolean(stream, &b); + + if (errn < 0) { + return errn; + } + + if (b) { + /* For negative values, the Unsigned Integer holds the + * magnitude of the value minus 1 */ + errn = decodeUnsignedInteger32(stream, &uint32); + *int32 = -(uint32 + 1); + } else { + /* positive */ + errn = decodeUnsignedInteger32(stream, &uint32); + *int32 = (int32_t)(uint32); + } + + return errn; +} + +/** + * Decode an arbitrary precision integer using a sign bit followed by a + * sequence of octets. The most significant bit of the last octet is set to + * zero to indicate sequence termination. Only seven bits per octet are used + * to store the integer's value. + */ +int decodeInteger64(bitstream_t* stream, int64_t* int64) { + int b; + uint64_t uint64; + int errn = decodeBoolean(stream, &b); + + if (errn < 0) { + return errn; + } + + if (b) { + /* For negative values, the Unsigned Integer holds the + * magnitude of the value minus 1 */ + errn = decodeUnsignedInteger64(stream, &uint64); + *int64 = -(uint64 + 1); + } else { + /* positive */ + errn = decodeUnsignedInteger64(stream, &uint64); + *int64 = (int64_t)(uint64); + } + + return errn; +} + +/** + * Decode a Float datatype as two consecutive Integers. + * The first Integer represents the mantissa of the floating point + * number and the second Integer represents the base-10 exponent + * of the floating point number. + */ +int decodeFloat(bitstream_t* stream, float_me_t* f) { + int errn = decodeInteger64(stream, &f->mantissa); + if (errn < 0) { + return errn; + } + return decodeInteger32(stream, &f->exponent); +} + +/** + * Decode a decimal represented as a Boolean sign followed by two Unsigned + * Integers. A sign value of zero (0) is used to represent positive Decimal + * values and a sign value of one (1) is used to represent negative Decimal + * values The first Integer represents the integral portion of the Decimal + * value. The second positive integer represents the fractional portion of + * the decimal with the digits in reverse order to preserve leading zeros. + */ +int decodeDecimal(bitstream_t* stream, decimal_t* d) { + int errn = decodeBoolean(stream, &d->negative); + if (errn < 0) { + return errn; + } + errn = decodeUnsignedInteger(stream, &d->integral); + if (errn < 0) { + return errn; + } + errn = decodeUnsignedInteger(stream, &d->reverseFraction); + + return errn; +} + +/** + * Decode a sequence of characters for a given length. + */ +int decodeStringOnly(bitstream_t* stream, uint16_t len, string_ucs_t* s) { + if (len > s->size) { + /* not enough space */ + return EXI_ERROR_OUT_OF_STRING_BUFFER; + } + decodeCharacters(stream, len, s->codepoints); + s->len = len; + return 0; +} + +/** + * Decode a length prefixed sequence of characters. + */ +int decodeString(bitstream_t* stream, string_ucs_t* s) { + int errn = decodeUnsignedInteger16(stream, &s->len); + if (errn < 0) { + return errn; + } + return decodeStringOnly(stream, s->len, s); +} + +int decodeStringASCII(bitstream_t* stream, string_ascii_t* s) { + uint16_t slen; + int errn = decodeUnsignedInteger16(stream, &slen); + if (errn < 0) { + return errn; + } + if (s->size < slen) { + return EXI_ERROR_OUT_OF_ASCII_BUFFER; + } + + return decodeCharactersASCII(stream, slen, s->chars); + +} + +int decodeStringValue(bitstream_t* stream, string_ucs_t* s) { + int errn = decodeUnsignedInteger16(stream, &s->len); + if (errn < 0) { + return errn; + } + + switch (s->len) { + case 0: + /* local value partition */ + return EXI_UNSUPPORTED_STRING_TABLE_LOCAL_HIT; + case 1: + /* found in global value partition */ + return EXI_UNSUPPORTED_STRING_TABLE_GLOBAL_HIT; + default: + /* not found in global value (and local value) partition + * ==> string literal is encoded as a String with the length + * incremented by two */ + return decodeStringOnly(stream, ((s->len) - 2), s); + /* After encoding the string value, it is added to both the + * associated "local" value string table partition and the global + * value string table partition */ + /* addValue(context, value); */ + } +} + +int decodeRCSStringValue(bitstream_t* stream, rcs_t* rcs, string_ucs_t* s) { + unsigned int i; + uint32_t cp; + int errn = decodeUnsignedInteger16(stream, &s->len); + if (errn < 0) { + return errn; + } + + switch (s->len) { + case 0: + /* local value partition */ + return EXI_UNSUPPORTED_STRING_TABLE_LOCAL_HIT; + case 1: + /* found in global value partition */ + return EXI_UNSUPPORTED_STRING_TABLE_GLOBAL_HIT; + default: + /* not found in global value (and local value) partition + * ==> string literal is encoded as a String with the length + * incremented by two */ + s->len = s->len - 2; + + if (s->len > s->size) { + /* not enough space */ + return EXI_ERROR_OUT_OF_STRING_BUFFER; + } + + for (i = 0; i < s->len && errn >= 0; i++) { + errn = decodeNBitUnsignedInteger(stream, rcs->codingLength, &cp); + if (errn < 0) { + return errn; + } + s->codepoints[i] = rcs->codepoints[cp]; + } + /* After encoding the string value, it is added to both the + * associated "local" value string table partition and the global + * value string table partition */ + /* addValue(context, value); */ + return 0; + } +} + +/** + * Decode a sequence of characters according to a given length. + * Each character is represented by its UCS [ISO/IEC 10646] + * code point encoded as an Unsigned Integer + */ +int decodeCharacters(bitstream_t* stream, uint16_t len, uint32_t* chars) { + unsigned int i; + int errn = 0; + for (i = 0; i < len && errn >= 0; i++) { + errn = decodeUnsignedInteger32(stream, &chars[i]); + if (errn < 0) { + return errn; + } + } + + return errn; +} +int decodeCharactersASCII(bitstream_t* stream, uint16_t len, char* chars) { + unsigned int i; + uint32_t c; + int errn = 0; + for (i = 0; i < len && errn >= 0; i++) { + errn = decodeUnsignedInteger32(stream, &c); + if (errn < 0) { + return errn; + } + if (c > 127) { + return EXI_ERROR_CONVERSION_NO_ASCII_CHARACTERS; + } + chars[i] = c; + } + chars[i] = '\0'; + + return errn; +} + + +/** + * Decode a binary value as a length-prefixed sequence of octets. + */ +int decodeBinary(bitstream_t* stream, bytes_t* bytes) { + unsigned int i; + uint8_t b; + int errn = decodeUnsignedInteger16(stream, &bytes->len); + if (errn < 0) { + return errn; + } + if (bytes->len > bytes->size) { + /* not enough space */ + return EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + + for (i = 0; i < bytes->len && errn >= 0; i++) { + errn = decode(stream, &b); + if (errn < 0) { + return errn; + } + bytes->data[i] = (uint8_t)b; + } + + return errn; +} + +/** + * Decode Date-Time as sequence of values representing the individual + * components of the Date-Time. + */ +int decodeDateTime(bitstream_t* stream, exi_datetime_type_t type, datetime_t* datetime){ + int errn; + + datetime->type = type; + + datetime->year = 0; + datetime->monthDay = 0; + datetime->time = 0; + datetime->presenceFractionalSecs = 0; + datetime->fractionalSecs = 0; + datetime->presenceTimezone = 0; + datetime->timezone = 0; + + switch (type) { + case EXI_DATETIME_GYEAR: /* Year, [Time-Zone] */ + errn = decodeInteger32(stream, &datetime->year); + if (errn < 0) { + return errn; + } + datetime->year += DATETIME_YEAR_OFFSET; + break; + case EXI_DATETIME_GYEARMONTH: /* Year, MonthDay, [TimeZone] */ + case EXI_DATETIME_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 EXI_DATETIME_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 EXI_DATETIME_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 EXI_DATETIME_GMONTH: /* MonthDay, [TimeZone] */ + /* e.g. "--12" */ + case EXI_DATETIME_GMONTHDAY: /* MonthDay, [TimeZone] */ + /* e.g. "--01-28" */ + case EXI_DATETIME_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..b791b27 --- /dev/null +++ b/src/codec/AbstractEncoderChannel.c @@ -0,0 +1,436 @@ +/* + * Copyright (C) 2007-2012 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, seeCode 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 EXI_UNSIGNED_INTEGER_8: + errn = encodeUnsignedInteger32(stream, iv->val.uint8); + break; + case EXI_UNSIGNED_INTEGER_16: + errn = encodeUnsignedInteger32(stream, iv->val.uint16); + break; + case EXI_UNSIGNED_INTEGER_32: + errn = encodeUnsignedInteger32(stream, iv->val.uint32); + break; + case EXI_UNSIGNED_INTEGER_64: + errn = encodeUnsignedInteger64(stream, iv->val.uint64); + break; + /* (Signed) Integer */ + case EXI_INTEGER_8: + if (iv->val.int8 < 0) { + return EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE; + } + errn = encodeUnsignedInteger32(stream, iv->val.int8); + break; + case EXI_INTEGER_16: + if (iv->val.int16 < 0) { + return EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE; + } + errn = encodeUnsignedInteger32(stream, iv->val.int16); + break; + case EXI_INTEGER_32: + if (iv->val.int32 < 0) { + return EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE; + } + errn = encodeUnsignedInteger32(stream, iv->val.int32); + break; + case EXI_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 EXI_UNSIGNED_INTEGER_8: + errn = encodeInteger32(stream, iv->val.uint8); + break; + case EXI_UNSIGNED_INTEGER_16: + errn = encodeInteger32(stream, iv->val.uint16); + break; + case EXI_UNSIGNED_INTEGER_32: + errn = encodeInteger64(stream, iv->val.uint32); + break; + case EXI_UNSIGNED_INTEGER_64: + errn = encodeInteger64(stream, iv->val.uint64); + break; + /* (Signed) Integer */ + case EXI_INTEGER_8: + errn = encodeInteger32(stream, iv->val.int8); + break; + case EXI_INTEGER_16: + errn = encodeInteger32(stream, iv->val.int16); + break; + case EXI_INTEGER_32: + errn = encodeInteger32(stream, iv->val.int32); + break; + case EXI_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 EXI_DATETIME_GYEAR: /* Year, [Time-Zone] */ + errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET); + break; + case EXI_DATETIME_GYEARMONTH: /* Year, MonthDay, [TimeZone] */ + case EXI_DATETIME_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 EXI_DATETIME_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 EXI_DATETIME_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 EXI_DATETIME_GMONTH: /* MonthDay, [TimeZone] */ + case EXI_DATETIME_GMONTHDAY: /* MonthDay, [TimeZone] */ + case EXI_DATETIME_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 new file mode 100644 index 0000000..5dfb706 --- /dev/null +++ b/src/codec/BitDecoderChannel.c @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#include "DecoderChannel.h" +#include "BitInputStream.h" +#include "EXITypes.h" + +#ifndef BIT_DECODER_CHANNEL_C +#define BIT_DECODER_CHANNEL_C + + +#if EXI_ALIGNMENT == BIT_PACKED + +int decode(bitstream_t* stream, uint8_t* b) { + uint32_t bb; + int errn = readBits(stream, 8, &bb); + if (errn < 0) { + return errn; + } + if (bb > 256) { + return EXI_ERROR_UNEXPECTED_BYTE_VALUE; + } else { + *b = (uint8_t)bb; + } + return errn; +} + +int decodeBoolean(bitstream_t* stream, int* b) { + uint32_t ub; + int errn = readBits(stream, 1, &ub); + *b = (ub == 0) ? 0 : 1; + return errn; +} + +int decodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t* uint32) { + if (nbits == 0) { + *uint32 = 0; + return 0; + } else { + return readBits(stream, nbits, uint32); + } +} + +#endif + +#endif + diff --git a/src/codec/BitEncoderChannel.c b/src/codec/BitEncoderChannel.c new file mode 100644 index 0000000..55349b5 --- /dev/null +++ b/src/codec/BitEncoderChannel.c @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#include "EncoderChannel.h" +#include "CoderChannel.h" +#include "BitOutputStream.h" +#include "EXITypes.h" + +#ifndef BIT_ENCODER_CHANNEL_C +#define BIT_ENCODER_CHANNEL_C + +#if EXI_ALIGNMENT == BIT_PACKED + + +int encode(bitstream_t* stream, uint8_t b) { + return writeBits(stream, 8, b); +} + +/** + * Encode a single boolean value. A false value is encoded as bit 0 and true + * value is encode as bit 1. + */ +int encodeBoolean(bitstream_t* stream, int b) { + uint8_t val = b ? 1 : 0; + return writeBits(stream, 1, val); +} + + +/** + * Encode n-bit unsigned integer. The n least significant bits of parameter + * b starting with the most significant, i.e. from left to right. + */ +int encodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t val) { + if (nbits > 0) { + return writeBits(stream, nbits, val); + } + return 0; +} + +/** + * Flush underlying bit output stream. + */ +int encodeFinish(bitstream_t* stream) { + return flush(stream); +} + + +#endif /* alignment */ + +#endif + + + + + + + + + + + + diff --git a/src/codec/BitInputStream.c b/src/codec/BitInputStream.c new file mode 100644 index 0000000..76d6f92 --- /dev/null +++ b/src/codec/BitInputStream.c @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#include "EXITypes.h" +#include "BitInputStream.h" + +#ifndef BIT_INPUT_STREAM_C +#define BIT_INPUT_STREAM_C + +/* internal method to (re)fill buffer */ +int readBuffer(bitstream_t* stream) +{ + int errn = 0; + if(stream->capacity==0) + { +#if EXI_STREAM == BYTE_ARRAY + if ( (*stream->pos) < stream->size ) { + stream->buffer = stream->data[(*stream->pos)++]; + stream->capacity = BITS_IN_BYTE; + } else { + errn = EXI_ERROR_INPUT_STREAM_EOF; + } +#endif +#if EXI_STREAM == FILE_STREAM + stream->buffer = getc(stream->file); + /* EOF cannot be used, 0xFF valid value */ + if ( feof(stream->file) || ferror(stream->file) ) { + return EXI_ERROR_INPUT_STREAM_EOF; + } + stream->capacity = BITS_IN_BYTE; +#endif + } + return errn; +} + +int readBits(bitstream_t* stream, uint16_t num_bits, uint32_t* b) +{ + int errn = readBuffer(stream); + if (errn < 0) { + return errn; + } + + /* read the bits in one step */ + if(num_bits <= stream->capacity) + { + stream->capacity -= num_bits; + *b = (stream->buffer >> stream->capacity) & (0xff >> (BITS_IN_BYTE - num_bits)); + } + else + { + /* read bits as much as possible */ + *b = stream->buffer & (0xff >> (BITS_IN_BYTE - stream->capacity)); + num_bits -= stream->capacity; + stream->capacity = 0; + + /* read whole bytes */ + while(num_bits >= 8) + { + errn = readBuffer(stream); + if (errn < 0) { + return errn; + } + *b = ((*b) << BITS_IN_BYTE) | stream->buffer; + num_bits -= BITS_IN_BYTE; + stream->capacity = 0; + } + + /* read the spare bits in the buffer */ + if(num_bits>0) + { + errn = readBuffer(stream); + if (errn < 0) { + return errn; + } + *b = ((*b) << num_bits) | (stream->buffer >> (BITS_IN_BYTE - num_bits)); + stream->capacity = BITS_IN_BYTE - num_bits; + } + + } + + return errn; +} + +#endif diff --git a/src/codec/BitInputStream.h b/src/codec/BitInputStream.h new file mode 100644 index 0000000..133fb67 --- /dev/null +++ b/src/codec/BitInputStream.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#include "EXITypes.h" + +#ifndef BIT_INPUT_STREAM_H +#define BIT_INPUT_STREAM_H + +int readBits(bitstream_t* stream, uint16_t num_bits, uint32_t* b); + +int flush(); + +#endif + + +#ifdef __cplusplus +} +#endif diff --git a/src/codec/BitOutputStream.c b/src/codec/BitOutputStream.c new file mode 100644 index 0000000..ac149f0 --- /dev/null +++ b/src/codec/BitOutputStream.c @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#include "EXITypes.h" +#include "BitOutputStream.h" + +#ifndef BIT_OUTPUT_STREAM_C +#define BIT_OUTPUT_STREAM_C + +/* NOTE: nbits <= 8 */ +int writeBits(bitstream_t* stream, uint16_t nbits, uint32_t val) { + /* is there enough space in the buffer */ + if (nbits <= stream->capacity) { + /* all bits fit into the current buffer */ + stream->buffer = (stream->buffer << (nbits)) | (val & (0xff + >> (BITS_IN_BYTE - nbits))); + stream->capacity -= nbits; + /* if the buffer is full write byte */ + if (stream->capacity == 0) { +#if EXI_STREAM == BYTE_ARRAY + if ((*stream->pos) >= stream->size) { + return EXI_ERROR_OUTPUT_STREAM_EOF; + } + stream->data[(*stream->pos)++] = stream->buffer; +#endif +#if EXI_STREAM == FILE_STREAM + if ( putc(stream->buffer, stream->file) == EOF ) { + return EXI_ERROR_OUTPUT_STREAM_EOF; + } +#endif + stream->capacity = BITS_IN_BYTE; + stream->buffer = 0; + } + } else { + /* the buffer is not enough + * fill the buffer */ + stream->buffer = (stream->buffer << stream->capacity) | ((val >> (nbits + - stream->capacity)) & (0xff >> (BITS_IN_BYTE + - stream->capacity))); + + nbits -= stream->capacity; +#if EXI_STREAM == BYTE_ARRAY + if ((*stream->pos) >= stream->size) { + return EXI_ERROR_OUTPUT_STREAM_EOF; + } + stream->data[(*stream->pos)++] = stream->buffer; +#endif +#if EXI_STREAM == FILE_STREAM + if ( putc(stream->buffer, stream->file) == EOF ) { + return EXI_ERROR_OUTPUT_STREAM_EOF; + } +#endif + stream->buffer = 0; + + /* write whole bytes */ + while (nbits >= BITS_IN_BYTE) { + nbits -= BITS_IN_BYTE; +#if EXI_STREAM == BYTE_ARRAY + if ((*stream->pos) >= stream->size) { + return EXI_ERROR_OUTPUT_STREAM_EOF; + } + stream->data[(*stream->pos)++] = (val >> (nbits)); +#endif +#if EXI_STREAM == FILE_STREAM + if ( putc((val >> (nbits)), stream->file) == EOF ) { + return EXI_ERROR_OUTPUT_STREAM_EOF; + } +#endif + } + + /* spared bits are kept in the buffer */ + stream->buffer = val; /* Note: the high bits will be shifted out during further filling */ + stream->capacity = BITS_IN_BYTE - (nbits); + } + + return 0; +} + +/** + * Flush output + */ +int flush(bitstream_t* stream) { + if (stream->capacity == BITS_IN_BYTE) { + /* nothing to do, no bits in buffer */ + return 0; + } else { + return writeBits(stream, stream->capacity, 0); + } +} + +#endif + diff --git a/src/codec/BitOutputStream.h b/src/codec/BitOutputStream.h new file mode 100644 index 0000000..31d5d06 --- /dev/null +++ b/src/codec/BitOutputStream.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#includeCode 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..febc096 --- /dev/null +++ b/src/codec/ByteEncoderChannel.c @@ -0,0 +1,125 @@ +/* + * Copyright (C) 2007-2012 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, seeCode 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 new file mode 100644 index 0000000..3c0f8f6 --- /dev/null +++ b/src/codec/ByteStream.c @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#define _CRT_SECURE_NO_DEPRECATE 1 + +#include "EXITypes.h" + +#ifndef BYTE_STREAM_C +#define BYTE_STREAM_C + +int readBytesFromFile(const char * filename, uint8_t* data, uint32_t size, uint32_t pos) { + FILE* f; + int character; + + f = fopen(filename, "rb"); + + if (f == NULL) { + return EXI_ERROR_INPUT_FILE_HANDLE; + } else { + /* read bytes */ + while ((character = getc(f)) != EOF) { + if (pos >= size) { + return EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + data[pos++] = (uint8_t) character; + } + fclose(f); + } + + return pos; +} + +int writeBytesToFile(uint8_t* data, uint32_t len, const char * filename) { + uint16_t rlen; + FILE* f = fopen(filename, "wb+"); + + if (f == NULL) { + return -1; + } else { + rlen = fwrite(data, sizeof(uint8_t), len, f); + fflush(f); + fclose(f); + if(rlen == len) { + return 0; + } else { + return EXI_ERROR_OUTPUT_FILE; + } + } +} + + +#endif + diff --git a/src/codec/ByteStream.h b/src/codec/ByteStream.h new file mode 100644 index 0000000..1750768 --- /dev/null +++ b/src/codec/ByteStream.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#include "EXITypes.h" + +#ifndef BYTE_STREAM_H +#define BYTE_STREAM_H + +int writeBytesToFile(uint8_t* data, uint32_t len, const char * filename); + +int readBytesFromFile(const char * filename, uint8_t* data, uint32_t size, uint32_t pos); + +#endif + + +#ifdef __cplusplus +} +#endif diff --git a/src/codec/CoderChannel.h b/src/codec/CoderChannel.h new file mode 100644 index 0000000..69a6ec1 --- /dev/null +++ b/src/codec/CoderChannel.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2007-2012 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, seeCode 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..bf42a5e --- /dev/null +++ b/src/codec/DecoderChannel.h @@ -0,0 +1,178 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#include "EXITypes.h" +#include "CoderChannel.h" + +#ifndef DECODER_CHANNEL_H +#define DECODER_CHANNEL_H + +/** + * Decode a byte value. + */ +int decode(bitstream_t* stream, uint8_t* b); + +/** + * Decode a single boolean value. The value false is represented by the bit + * 0, and the value true is represented by the bit 1. + */ +int decodeBoolean(bitstream_t* stream, int* b); + +/** + * Decodes and returns an n-bit unsigned integer. + */ +int decodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t* uint32); + +/** + * Decode an arbitrary precision non negative integer using a sequence of + * octets. The most significant bit of the last octet is set to zero to + * indicate sequence termination. Only seven bits per octet are used to + * store the integer's value. + */ +int decodeUnsignedInteger(bitstream_t* stream, integer_t* iv); + +/** + * Decode an arbitrary precision non negative integer using a sequence of + * octets. The most significant bit of the last octet is set to zero to + * indicate sequence termination. Only seven bits per octet are used to + * store the integer's value. + */ +int decodeUnsignedInteger16(bitstream_t* stream, uint16_t* uint16); + +/** + * Decode an arbitrary precision non negative integer using a sequence of + * octets. The most significant bit of the last octet is set to zero to + * indicate sequence termination. Only seven bits per octet are used to + * store the integer's value. + */ +int decodeUnsignedInteger32(bitstream_t* stream, uint32_t* uint32); + +/** + * Decode an arbitrary precision non negative integer using a sequence of + * octets. The most significant bit of the last octet is set to zero to + * indicate sequence termination. Only seven bits per octet are used to + * store the integer's value. + */ +int decodeUnsignedInteger64(bitstream_t* stream, uint64_t* uint64); + +/** + * Decode an arbitrary precision integer using a sign bit followed by a + * sequence of octets. The most significant bit of the last octet is set to + * zero to indicate sequence termination. Only seven bits per octet are used + * to store the integer's value. + */ +int decodeInteger(bitstream_t* stream, integer_t* iv); + +/** + * Decode an arbitrary precision integer using a sign bit followed by a + * sequence of octets. The most significant bit of the last octet is set to + * zero to indicate sequence termination. Only seven bits per octet are used + * to store the integer's value. + */ +int decodeInteger32(bitstream_t* stream, int32_t* int32); + +/** + * Decode an arbitrary precision integer using a sign bit followed by a + * sequence of octets. The most significant bit of the last octet is set to + * zero to indicate sequence termination. Only seven bits per octet are used + * to store the integer's value. + */ +int decodeInteger64(bitstream_t* stream, int64_t* int64); + +/** + * Decode a Float datatype as two consecutive Integers. + * The first Integer represents the mantissa of the floating point + * number and the second Integer represents the base-10 exponent + * of the floating point number. + */ +int decodeFloat(bitstream_t* stream, float_me_t* f); + +/** + * Decode a decimal represented as a Boolean sign followed by two Unsigned + * Integers. A sign value of zero (0) is used to represent positive Decimal + * values and a sign value of one (1) is used to represent negative Decimal + * values The first Integer represents the integral portion of the Decimal + * value. The second positive integer represents the fractional portion of + * the decimal with the digits in reverse order to preserve leading zeros. + */ +int decodeDecimal(bitstream_t* stream, decimal_t* d); + +/** + * Decode a sequence of characters for a given length. + */ +int decodeStringOnly(bitstream_t* stream, uint16_t len, string_ucs_t* s); + +/** + * Decode a length prefixed sequence of characters. + */ +int decodeString(bitstream_t* stream, string_ucs_t* s); + +int decodeStringASCII(bitstream_t* stream, string_ascii_t* s); + +/** + * Decode a length prefixed sequence of characters in the sense of string tables. + * length == 0, local value partition hit + * length == 1, global value partition hit + * --> string literal is encoded as a String with the length incremented by two + */ +int decodeStringValue(bitstream_t* stream, string_ucs_t* s); + +/** + * Restricted character set + */ +int decodeRCSStringValue(bitstream_t* stream, rcs_t* rcs, string_ucs_t* s); + +/** + * Decode a sequence of characters according to a given length. + */ +int decodeCharacters(bitstream_t* stream, uint16_t len, uint32_t* chars); +int decodeCharactersASCII(bitstream_t* stream, uint16_t len, char* chars); + +/** + * Decode a binary value as a length-prefixed sequence of octets. + */ +int decodeBinary(bitstream_t* stream, bytes_t* bytes); + +/** + * Decode Date-Time as sequence of values representing the individual + * components of the Date-Time. + */ +int decodeDateTime(bitstream_t* stream, exi_datetime_type_t type, datetime_t* datetime); + +#endif + + +#ifdef __cplusplus +} +#endif + diff --git a/src/codec/EXICoder.c b/src/codec/EXICoder.c new file mode 100644 index 0000000..8d94429 --- /dev/null +++ b/src/codec/EXICoder.c @@ -0,0 +1,2650 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifndef EXI_CODER_C +#define EXI_CODER_C + +#include "EXITypes.h" +#include "BitInputStream.h" +#include "DecoderChannel.h" + +#include "EXICoder.h" + + +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; + /* 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_GRAMMAR_STACK; + } +} + +int exiPopStack(exi_state_t* state) { + if (state->stackIndex >= 1) { + state->stackIndex--; + return 0; + } else { + return EXI_ERROR_OUT_OF_BOUNDS; + } +} + +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: + /* {3}0,ENTITIES */ + state->grammarStack[state->stackIndex] = 603; + break; + case 1: + /* {3}1,ENTITY */ + state->grammarStack[state->stackIndex] = 605; + break; + case 2: + /* {3}2,ID */ + state->grammarStack[state->stackIndex] = 607; + break; + case 3: + /* {3}3,IDREF */ + state->grammarStack[state->stackIndex] = 609; + break; + case 4: + /* {3}4,IDREFS */ + state->grammarStack[state->stackIndex] = 611; + break; + case 5: + /* {3}5,NCName */ + state->grammarStack[state->stackIndex] = 613; + break; + case 6: + /* {3}6,NMTOKEN */ + state->grammarStack[state->stackIndex] = 615; + break; + case 7: + /* {3}7,NMTOKENS */ + state->grammarStack[state->stackIndex] = 617; + break; + case 8: + /* {3}8,NOTATION */ + state->grammarStack[state->stackIndex] = 619; + break; + case 9: + /* {3}9,Name */ + state->grammarStack[state->stackIndex] = 621; + break; + case 10: + /* {3}10,QName */ + state->grammarStack[state->stackIndex] = 623; + break; + case 11: + /* {3}11,anySimpleType */ + state->grammarStack[state->stackIndex] = 625; + break; + case 12: + /* {3}12,anyType */ + state->grammarStack[state->stackIndex] = 627; + break; + case 13: + /* {3}13,anyURI */ + state->grammarStack[state->stackIndex] = 629; + break; + case 14: + /* {3}14,base64Binary */ + state->grammarStack[state->stackIndex] = 631; + break; + case 15: + /* {3}15,boolean */ + state->grammarStack[state->stackIndex] = 29; + break; + case 16: + /* {3}16,byte */ + state->grammarStack[state->stackIndex] = 632; + break; + case 17: + /* {3}17,date */ + state->grammarStack[state->stackIndex] = 633; + break; + case 18: + /* {3}18,dateTime */ + state->grammarStack[state->stackIndex] = 635; + break; + case 19: + /* {3}19,decimal */ + state->grammarStack[state->stackIndex] = 637; + break; + case 20: + /* {3}20,double */ + state->grammarStack[state->stackIndex] = 639; + break; + case 21: + /* {3}21,duration */ + state->grammarStack[state->stackIndex] = 641; + break; + case 22: + /* {3}22,float */ + state->grammarStack[state->stackIndex] = 643; + break; + case 23: + /* {3}23,gDay */ + state->grammarStack[state->stackIndex] = 645; + break; + case 24: + /* {3}24,gMonth */ + state->grammarStack[state->stackIndex] = 647; + break; + case 25: + /* {3}25,gMonthDay */ + state->grammarStack[state->stackIndex] = 649; + break; + case 26: + /* {3}26,gYear */ + state->grammarStack[state->stackIndex] = 651; + break; + case 27: + /* {3}27,gYearMonth */ + state->grammarStack[state->stackIndex] = 653; + break; + case 28: + /* {3}28,hexBinary */ + state->grammarStack[state->stackIndex] = 655; + break; + case 29: + /* {3}29,int */ + state->grammarStack[state->stackIndex] = 657; + break; + case 30: + /* {3}30,integer */ + state->grammarStack[state->stackIndex] = 658; + break; + case 31: + /* {3}31,language */ + state->grammarStack[state->stackIndex] = 659; + break; + case 32: + /* {3}32,long */ + state->grammarStack[state->stackIndex] = 661; + break; + case 33: + /* {3}33,negativeInteger */ + state->grammarStack[state->stackIndex] = 662; + break; + case 34: + /* {3}34,nonNegativeInteger */ + state->grammarStack[state->stackIndex] = 664; + break; + case 35: + /* {3}35,nonPositiveInteger */ + state->grammarStack[state->stackIndex] = 666; + break; + case 36: + /* {3}36,normalizedString */ + state->grammarStack[state->stackIndex] = 668; + break; + case 37: + /* {3}37,positiveInteger */ + state->grammarStack[state->stackIndex] = 670; + break; + case 38: + /* {3}38,short */ + state->grammarStack[state->stackIndex] = 672; + break; + case 39: + /* {3}39,string */ + state->grammarStack[state->stackIndex] = 673; + break; + case 40: + /* {3}40,time */ + state->grammarStack[state->stackIndex] = 674; + break; + case 41: + /* {3}41,token */ + state->grammarStack[state->stackIndex] = 676; + break; + case 42: + /* {3}42,unsignedByte */ + state->grammarStack[state->stackIndex] = 181; + break; + case 43: + /* {3}43,unsignedInt */ + state->grammarStack[state->stackIndex] = 678; + break; + case 44: + /* {3}44,unsignedLong */ + state->grammarStack[state->stackIndex] = 679; + break; + case 45: + /* {3}45,unsignedShort */ + state->grammarStack[state->stackIndex] = 681; + break; + } + break; + case 4: + switch(xsiType->localPart) { + case 1: + /* {4}1,CanonicalizationMethodType */ + state->grammarStack[state->stackIndex] = 70; + break; + case 2: + /* {4}2,CryptoBinary */ + state->grammarStack[state->stackIndex] = 288; + break; + case 4: + /* {4}4,DSAKeyValueType */ + state->grammarStack[state->stackIndex] = 286; + break; + case 6: + /* {4}6,DigestMethodType */ + state->grammarStack[state->stackIndex] = 297; + break; + case 8: + /* {4}8,DigestValueType */ + state->grammarStack[state->stackIndex] = 302; + break; + case 12: + /* {4}12,HMACOutputLengthType */ + state->grammarStack[state->stackIndex] = 551; + break; + case 15: + /* {4}15,KeyInfoType */ + state->grammarStack[state->stackIndex] = 313; + break; + case 18: + /* {4}18,KeyValueType */ + state->grammarStack[state->stackIndex] = 318; + break; + case 20: + /* {4}20,ManifestType */ + state->grammarStack[state->stackIndex] = 371; + break; + case 24: + /* {4}24,ObjectType */ + state->grammarStack[state->stackIndex] = 395; + break; + case 27: + /* {4}27,PGPDataType */ + state->grammarStack[state->stackIndex] = 355; + break; + case 33: + /* {4}33,RSAKeyValueType */ + state->grammarStack[state->stackIndex] = 320; + break; + case 35: + /* {4}35,ReferenceType */ + state->grammarStack[state->stackIndex] = 374; + break; + case 37: + /* {4}37,RetrievalMethodType */ + state->grammarStack[state->stackIndex] = 326; + break; + case 39: + /* {4}39,SPKIDataType */ + state->grammarStack[state->stackIndex] = 363; + break; + case 44: + /* {4}44,SignatureMethodType */ + state->grammarStack[state->stackIndex] = 548; + break; + case 46: + /* {4}46,SignaturePropertiesType */ + state->grammarStack[state->stackIndex] = 564; + break; + case 48: + /* {4}48,SignaturePropertyType */ + state->grammarStack[state->stackIndex] = 567; + break; + case 49: + /* {4}49,SignatureType */ + state->grammarStack[state->stackIndex] = 541; + break; + case 51: + /* {4}51,SignatureValueType */ + state->grammarStack[state->stackIndex] = 558; + break; + case 53: + /* {4}53,SignedInfoType */ + state->grammarStack[state->stackIndex] = 544; + break; + case 55: + /* {4}55,TransformType */ + state->grammarStack[state->stackIndex] = 332; + break; + case 57: + /* {4}57,TransformsType */ + state->grammarStack[state->stackIndex] = 330; + break; + case 61: + /* {4}61,X509DataType */ + state->grammarStack[state->stackIndex] = 340; + break; + case 64: + /* {4}64,X509IssuerSerialType */ + state->grammarStack[state->stackIndex] = 342; + break; + } + break; + case 5: + switch(xsiType->localPart) { + case 3: + /* {5}3,CableCheckReqType */ + state->grammarStack[state->stackIndex] = 42; + break; + case 5: + /* {5}5,CableCheckResType */ + state->grammarStack[state->stackIndex] = 56; + break; + case 7: + /* {5}7,CertificateInstallationReqType */ + state->grammarStack[state->stackIndex] = 76; + break; + case 9: + /* {5}9,CertificateInstallationResType */ + state->grammarStack[state->stackIndex] = 91; + break; + case 11: + /* {5}11,CertificateUpdateReqType */ + state->grammarStack[state->stackIndex] = 110; + break; + case 13: + /* {5}13,CertificateUpdateResType */ + state->grammarStack[state->stackIndex] = 117; + break; + case 15: + /* {5}15,ChargeParameterDiscoveryReqType */ + state->grammarStack[state->stackIndex] = 127; + break; + case 17: + /* {5}17,ChargeParameterDiscoveryResType */ + state->grammarStack[state->stackIndex] = 145; + break; + case 22: + /* {5}22,ChargingStatusReqType */ + state->grammarStack[state->stackIndex] = 220; + break; + case 24: + /* {5}24,ChargingStatusResType */ + state->grammarStack[state->stackIndex] = 222; + break; + case 26: + /* {5}26,ContractAuthenticationReqType */ + state->grammarStack[state->stackIndex] = 248; + break; + case 28: + /* {5}28,ContractAuthenticationResType */ + state->grammarStack[state->stackIndex] = 254; + break; + case 33: + /* {5}33,CurrentDemandReqType */ + state->grammarStack[state->stackIndex] = 257; + break; + case 35: + /* {5}35,CurrentDemandResType */ + state->grammarStack[state->stackIndex] = 269; + break; + case 61: + /* {5}61,MeteringReceiptReqType */ + state->grammarStack[state->stackIndex] = 383; + break; + case 63: + /* {5}63,MeteringReceiptResType */ + state->grammarStack[state->stackIndex] = 391; + break; + case 66: + /* {5}66,PaymentDetailsReqType */ + state->grammarStack[state->stackIndex] = 402; + break; + case 68: + /* {5}68,PaymentDetailsResType */ + state->grammarStack[state->stackIndex] = 406; + break; + case 71: + /* {5}71,PowerDeliveryReqType */ + state->grammarStack[state->stackIndex] = 412; + break; + case 73: + /* {5}73,PowerDeliveryResType */ + state->grammarStack[state->stackIndex] = 426; + break; + case 75: + /* {5}75,PreChargeReqType */ + state->grammarStack[state->stackIndex] = 430; + break; + case 77: + /* {5}77,PreChargeResType */ + state->grammarStack[state->stackIndex] = 435; + break; + case 89: + /* {5}89,ServiceDetailReqType */ + state->grammarStack[state->stackIndex] = 461; + break; + case 91: + /* {5}91,ServiceDetailResType */ + state->grammarStack[state->stackIndex] = 464; + break; + case 93: + /* {5}93,ServiceDiscoveryReqType */ + state->grammarStack[state->stackIndex] = 488; + break; + case 95: + /* {5}95,ServiceDiscoveryResType */ + state->grammarStack[state->stackIndex] = 492; + break; + case 100: + /* {5}100,ServicePaymentSelectionReqType */ + state->grammarStack[state->stackIndex] = 510; + break; + case 102: + /* {5}102,ServicePaymentSelectionResType */ + state->grammarStack[state->stackIndex] = 522; + break; + case 106: + /* {5}106,SessionSetupReqType */ + state->grammarStack[state->stackIndex] = 525; + break; + case 108: + /* {5}108,SessionSetupResType */ + state->grammarStack[state->stackIndex] = 530; + break; + case 111: + /* {5}111,SessionStopResType */ + state->grammarStack[state->stackIndex] = 538; + break; + case 112: + /* {5}112,SessionStopType */ + state->grammarStack[state->stackIndex] = 536; + break; + case 114: + /* {5}114,WeldingDetectionReqType */ + state->grammarStack[state->stackIndex] = 592; + break; + case 116: + /* {5}116,WeldingDetectionResType */ + state->grammarStack[state->stackIndex] = 595; + break; + } + break; + case 6: + switch(xsiType->localPart) { + case 1: + /* {6}1,AC_EVChargeParameterType */ + state->grammarStack[state->stackIndex] = 3; + break; + case 3: + /* {6}3,AC_EVSEChargeParameterType */ + state->grammarStack[state->stackIndex] = 25; + break; + case 5: + /* {6}5,AC_EVSEStatusType */ + state->grammarStack[state->stackIndex] = 27; + break; + case 9: + /* {6}9,CertificateChainType */ + state->grammarStack[state->stackIndex] = 95; + break; + case 13: + /* {6}13,ChargingProfileType */ + state->grammarStack[state->stackIndex] = 415; + break; + case 15: + /* {6}15,ConsumptionCostType */ + state->grammarStack[state->stackIndex] = 187; + break; + case 17: + /* {6}17,CostType */ + state->grammarStack[state->stackIndex] = 190; + break; + case 19: + /* {6}19,DC_EVChargeParameterType */ + state->grammarStack[state->stackIndex] = 132; + break; + case 20: + /* {6}20,DC_EVErrorCodeType */ + state->grammarStack[state->stackIndex] = 49; + break; + case 22: + /* {6}22,DC_EVPowerDeliveryParameterType */ + state->grammarStack[state->stackIndex] = 281; + break; + case 24: + /* {6}24,DC_EVSEChargeParameterType */ + state->grammarStack[state->stackIndex] = 204; + break; + case 26: + /* {6}26,DC_EVSEStatusCodeType */ + state->grammarStack[state->stackIndex] = 66; + break; + case 27: + /* {6}27,DC_EVSEStatusType */ + state->grammarStack[state->stackIndex] = 61; + break; + case 29: + /* {6}29,DC_EVStatusType */ + state->grammarStack[state->stackIndex] = 44; + break; + case 35: + /* {6}35,EVChargeParameterType */ + state->grammarStack[state->stackIndex] = 683; + break; + case 46: + /* {6}46,EVPowerDeliveryParameterType */ + state->grammarStack[state->stackIndex] = 684; + break; + case 50: + /* {6}50,EVRequestedEnergyTransferType */ + state->grammarStack[state->stackIndex] = 129; + break; + case 52: + /* {6}52,EVSEChargeParameterType */ + state->grammarStack[state->stackIndex] = 685; + break; + case 67: + /* {6}67,EVSEStatusType */ + state->grammarStack[state->stackIndex] = 686; + break; + case 68: + /* {6}68,EVSESupportedEnergyTransferType */ + state->grammarStack[state->stackIndex] = 458; + break; + case 70: + /* {6}70,EVStatusType */ + state->grammarStack[state->stackIndex] = 687; + break; + case 73: + /* {6}73,EntryType */ + state->grammarStack[state->stackIndex] = 688; + break; + case 78: + /* {6}78,IntervalType */ + state->grammarStack[state->stackIndex] = 689; + break; + case 79: + /* {6}79,ListOfRootCertificateIDsType */ + state->grammarStack[state->stackIndex] = 82; + break; + case 81: + /* {6}81,MeterInfoType */ + state->grammarStack[state->stackIndex] = 230; + break; + case 85: + /* {6}85,NotificationType */ + state->grammarStack[state->stackIndex] = 579; + break; + case 90: + /* {6}90,PMaxScheduleEntryType */ + state->grammarStack[state->stackIndex] = 158; + break; + case 92: + /* {6}92,PMaxScheduleType */ + state->grammarStack[state->stackIndex] = 155; + break; + case 93: + /* {6}93,PMaxType */ + state->grammarStack[state->stackIndex] = 167; + break; + case 97: + /* {6}97,ParameterSetType */ + state->grammarStack[state->stackIndex] = 470; + break; + case 98: + /* {6}98,ParameterType */ + state->grammarStack[state->stackIndex] = 474; + break; + case 100: + /* {6}100,PaymentOptionsType */ + state->grammarStack[state->stackIndex] = 495; + break; + case 101: + /* {6}101,PhysicalValueType */ + state->grammarStack[state->stackIndex] = 10; + break; + case 104: + /* {6}104,ProfileEntryType */ + state->grammarStack[state->stackIndex] = 418; + break; + case 107: + /* {6}107,RelativeTimeIntervalType */ + state->grammarStack[state->stackIndex] = 160; + break; + case 109: + /* {6}109,SAIDType */ + state->grammarStack[state->stackIndex] = 152; + break; + case 111: + /* {6}111,SAScheduleListType */ + state->grammarStack[state->stackIndex] = 148; + break; + case 114: + /* {6}114,SAScheduleTupleType */ + state->grammarStack[state->stackIndex] = 150; + break; + case 116: + /* {6}116,SASchedulesType */ + state->grammarStack[state->stackIndex] = 690; + break; + case 120: + /* {6}120,SalesTariffEntryType */ + state->grammarStack[state->stackIndex] = 184; + break; + case 122: + /* {6}122,SalesTariffType */ + state->grammarStack[state->stackIndex] = 174; + break; + case 124: + /* {6}124,SelectedServiceListType */ + state->grammarStack[state->stackIndex] = 513; + break; + case 125: + /* {6}125,SelectedServiceType */ + state->grammarStack[state->stackIndex] = 515; + break; + case 129: + /* {6}129,ServiceChargeType */ + state->grammarStack[state->stackIndex] = 440; + break; + case 132: + /* {6}132,ServiceParameterListType */ + state->grammarStack[state->stackIndex] = 468; + break; + case 135: + /* {6}135,ServiceTagListType */ + state->grammarStack[state->stackIndex] = 502; + break; + case 136: + /* {6}136,ServiceTagType */ + state->grammarStack[state->stackIndex] = 442; + break; + case 137: + /* {6}137,ServiceType */ + state->grammarStack[state->stackIndex] = 691; + break; + case 142: + /* {6}142,SubCertificatesType */ + state->grammarStack[state->stackIndex] = 98; + break; + case 151: + /* {6}151,certificateType */ + state->grammarStack[state->stackIndex] = 79; + break; + case 152: + /* {6}152,contractIDType */ + state->grammarStack[state->stackIndex] = 107; + break; + case 154: + /* {6}154,costKindType */ + state->grammarStack[state->stackIndex] = 192; + break; + case 155: + /* {6}155,dHParamsType */ + state->grammarStack[state->stackIndex] = 88; + break; + case 157: + /* {6}157,evccIDType */ + state->grammarStack[state->stackIndex] = 527; + break; + case 158: + /* {6}158,evseIDType */ + state->grammarStack[state->stackIndex] = 225; + break; + case 159: + /* {6}159,faultCodeType */ + state->grammarStack[state->stackIndex] = 581; + break; + case 160: + /* {6}160,faultMsgType */ + state->grammarStack[state->stackIndex] = 584; + break; + case 161: + /* {6}161,genChallengeType */ + state->grammarStack[state->stackIndex] = 251; + break; + case 163: + /* {6}163,isolationLevelType */ + state->grammarStack[state->stackIndex] = 63; + break; + case 164: + /* {6}164,meterIDType */ + state->grammarStack[state->stackIndex] = 232; + break; + case 165: + /* {6}165,meterStatusType */ + state->grammarStack[state->stackIndex] = 239; + break; + case 166: + /* {6}166,paymentOptionType */ + state->grammarStack[state->stackIndex] = 497; + break; + case 167: + /* {6}167,percentValueType */ + state->grammarStack[state->stackIndex] = 52; + break; + case 169: + /* {6}169,privateKeyType */ + state->grammarStack[state->stackIndex] = 103; + break; + case 170: + /* {6}170,responseCodeType */ + state->grammarStack[state->stackIndex] = 58; + break; + case 171: + /* {6}171,rootCertificateIDType */ + state->grammarStack[state->stackIndex] = 84; + break; + case 172: + /* {6}172,serviceCategoryType */ + state->grammarStack[state->stackIndex] = 450; + break; + case 173: + /* {6}173,serviceIDType */ + state->grammarStack[state->stackIndex] = 444; + break; + case 174: + /* {6}174,serviceNameType */ + state->grammarStack[state->stackIndex] = 447; + break; + case 175: + /* {6}175,serviceScopeType */ + state->grammarStack[state->stackIndex] = 453; + break; + case 176: + /* {6}176,sessionIDType */ + state->grammarStack[state->stackIndex] = 386; + break; + case 178: + /* {6}178,sigMeterReadingType */ + state->grammarStack[state->stackIndex] = 236; + break; + case 182: + /* {6}182,tariffDescriptionType */ + state->grammarStack[state->stackIndex] = 178; + break; + case 183: + /* {6}183,unitMultiplierType */ + state->grammarStack[state->stackIndex] = 12; + break; + case 184: + /* {6}184,unitSymbolType */ + state->grammarStack[state->stackIndex] = 15; + break; + case 185: + /* {6}185,valueType */ + state->grammarStack[state->stackIndex] = 692; + break; + } + break; + case 7: + switch(xsiType->localPart) { + case 1: + /* {7}1,BodyBaseType */ + state->grammarStack[state->stackIndex] = 694; + break; + case 3: + /* {7}3,BodyType */ + state->grammarStack[state->stackIndex] = 590; + break; + } + break; + case 8: + switch(xsiType->localPart) { + case 0: + /* {8}0,MessageHeaderType */ + state->grammarStack[state->stackIndex] = 576; + 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) { + case 181: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + state->grammarStack[state->stackIndex] = 182; + return 0; + case 402: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + state->grammarStack[state->stackIndex] = 405; + return 0; + case 61: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + state->grammarStack[state->stackIndex] = 68; + return 0; + case 613: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 614; + return 0; + case 127: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + state->grammarStack[state->stackIndex] = 144; + return 0; + case 330: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + state->grammarStack[state->stackIndex] = 338; + return 0; + case 525: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ + state->grammarStack[state->stackIndex] = 529; + return 0; + case 412: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + state->grammarStack[state->stackIndex] = 425; + return 0; + case 375: + /* 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)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 377: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 374: + /* 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)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 376: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + state->grammarStack[state->stackIndex] = 381; + return 0; + case 564: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 565: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + state->grammarStack[state->stackIndex] = 573; + return 0; + case 150: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + state->grammarStack[state->stackIndex] = 201; + return 0; + case 302: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + state->grammarStack[state->stackIndex] = 303; + return 0; + case 415: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + state->grammarStack[state->stackIndex] = 423; + return 0; + case 79: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + state->grammarStack[state->stackIndex] = 80; + return 0; + case 633: + /* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + state->grammarStack[state->stackIndex] = 634; + return 0; + case 576: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + state->grammarStack[state->stackIndex] = 588; + return 0; + case 236: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + state->grammarStack[state->stackIndex] = 237; + return 0; + case 132: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + state->grammarStack[state->stackIndex] = 141; + return 0; + case 372: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 371: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + state->grammarStack[state->stackIndex] = 382; + return 0; + case 461: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + state->grammarStack[state->stackIndex] = 463; + return 0; + case 29: + /* FirstStartTag[CHARACTERS[BOOLEAN]] --> Element[CHARACTERS[BOOLEAN]] */ + state->grammarStack[state->stackIndex] = 30; + return 0; + case 222: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 247; + return 0; + case 492: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 509; + return 0; + case 66: + /* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + state->grammarStack[state->stackIndex] = 67; + return 0; + case 391: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 394; + return 0; + case 242: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 534: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 410: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 661: + /* FirstStartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + state->grammarStack[state->stackIndex] = 243; + return 0; + case 82: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ + state->grammarStack[state->stackIndex] = 86; + return 0; + case 560: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + state->grammarStack[state->stackIndex] = 561; + return 0; + case 95: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + state->grammarStack[state->stackIndex] = 101; + return 0; + case 190: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + state->grammarStack[state->stackIndex] = 197; + return 0; + case 502: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + state->grammarStack[state->stackIndex] = 508; + return 0; + case 12: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + state->grammarStack[state->stackIndex] = 13; + return 0; + case 269: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 280; + return 0; + case 605: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 606; + return 0; + case 522: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 524; + return 0; + case 615: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 616; + return 0; + case 248: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 249: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + state->grammarStack[state->stackIndex] = 253; + return 0; + case 536: + /* FirstStartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 537; + return 0; + case 574: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + state->grammarStack[state->stackIndex] = 601; + return 0; + case 167: + /* FirstStartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + state->grammarStack[state->stackIndex] = 168; + return 0; + case 527: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] --> Element[CHARACTERS[BINARY_HEX]] */ + state->grammarStack[state->stackIndex] = 528; + return 0; + case 430: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + state->grammarStack[state->stackIndex] = 434; + return 0; + case 155: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + state->grammarStack[state->stackIndex] = 172; + return 0; + case 107: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 108; + return 0; + case 129: + /* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + state->grammarStack[state->stackIndex] = 130; + return 0; + case 658: + /* FirstStartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 346: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + state->grammarStack[state->stackIndex] = 347; + return 0; + case 313: + /* 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]] --> 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]] */ + case 314: + /* 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]] --> 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]] */ + state->grammarStack[state->stackIndex] = 370; + return 0; + case 406: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 411; + return 0; + case 340: + /* 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] --> 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] */ + state->grammarStack[state->stackIndex] = 354; + return 0; + case 683: + /* FirstStartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + case 142: + /* First(xsi:type)StartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 143; + return 0; + case 308: + /* First(xsi:type)StartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + case 687: + /* FirstStartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 309; + return 0; + case 71: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 70: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + state->grammarStack[state->stackIndex] = 75; + return 0; + case 326: + /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 327: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 328: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 339; + return 0; + case 653: + /* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + state->grammarStack[state->stackIndex] = 654; + return 0; + case 442: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + state->grammarStack[state->stackIndex] = 455; + return 0; + case 623: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 624; + return 0; + case 25: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + state->grammarStack[state->stackIndex] = 39; + return 0; + case 52: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + state->grammarStack[state->stackIndex] = 53; + return 0; + case 603: + /* FirstStartTag[CHARACTERS[LIST]] --> Element[CHARACTERS[LIST]] */ + state->grammarStack[state->stackIndex] = 604; + return 0; + case 639: + /* FirstStartTag[CHARACTERS[FLOAT]] --> Element[CHARACTERS[FLOAT]] */ + state->grammarStack[state->stackIndex] = 640; + return 0; + case 504: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 691: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + state->grammarStack[state->stackIndex] = 507; + return 0; + case 320: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + state->grammarStack[state->stackIndex] = 323; + return 0; + case 318: + /* 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]] --> 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]] */ + state->grammarStack[state->stackIndex] = 325; + return 0; + case 440: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + state->grammarStack[state->stackIndex] = 460; + return 0; + case 288: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + state->grammarStack[state->stackIndex] = 289; + return 0; + case 10: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + state->grammarStack[state->stackIndex] = 20; + return 0; + case 670: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + state->grammarStack[state->stackIndex] = 671; + return 0; + case 257: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + state->grammarStack[state->stackIndex] = 268; + return 0; + case 637: + /* FirstStartTag[CHARACTERS[DECIMAL]] --> Element[CHARACTERS[DECIMAL]] */ + state->grammarStack[state->stackIndex] = 638; + return 0; + case 530: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 535; + return 0; + case 56: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 69; + return 0; + case 281: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + state->grammarStack[state->stackIndex] = 285; + return 0; + case 688: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 310: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + state->grammarStack[state->stackIndex] = 312; + return 0; + case 635: + /* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + state->grammarStack[state->stackIndex] = 636; + return 0; + case 145: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 219; + return 0; + case 152: + /* FirstStartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + state->grammarStack[state->stackIndex] = 153; + return 0; + case 306: + /* First(xsi:type)StartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + case 686: + /* FirstStartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 307; + return 0; + case 510: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + state->grammarStack[state->stackIndex] = 521; + return 0; + case 551: + /* FirstStartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + state->grammarStack[state->stackIndex] = 552; + return 0; + case 450: + /* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + state->grammarStack[state->stackIndex] = 451; + return 0; + case 332: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 333: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + state->grammarStack[state->stackIndex] = 337; + return 0; + case 544: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 545: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + state->grammarStack[state->stackIndex] = 556; + return 0; + case 217: + /* First(xsi:type)StartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + case 690: + /* FirstStartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 218; + return 0; + case 103: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + state->grammarStack[state->stackIndex] = 104; + return 0; + case 659: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 660; + return 0; + case 15: + /* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + state->grammarStack[state->stackIndex] = 16; + return 0; + case 164: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 189: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 195: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 678: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 33: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 420: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 162: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 5: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 617: + /* FirstStartTag[CHARACTERS[LIST]] --> Element[CHARACTERS[LIST]] */ + state->grammarStack[state->stackIndex] = 618; + return 0; + case 464: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 487; + return 0; + case 355: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ + state->grammarStack[state->stackIndex] = 362; + return 0; + case 148: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + state->grammarStack[state->stackIndex] = 202; + return 0; + case 488: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 491; + return 0; + case 42: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + state->grammarStack[state->stackIndex] = 55; + return 0; + case 187: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + state->grammarStack[state->stackIndex] = 198; + return 0; + case 230: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + state->grammarStack[state->stackIndex] = 244; + return 0; + case 657: + /* FirstStartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 481: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + state->grammarStack[state->stackIndex] = 482; + return 0; + case 160: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + state->grammarStack[state->stackIndex] = 165; + return 0; + case 607: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 608; + return 0; + case 679: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + state->grammarStack[state->stackIndex] = 680; + return 0; + case 304: + /* First(xsi:type)StartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + case 684: + /* FirstStartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 305; + return 0; + case 666: + /* FirstStartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + state->grammarStack[state->stackIndex] = 667; + return 0; + case 49: + /* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + state->grammarStack[state->stackIndex] = 50; + return 0; + case 619: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 620; + return 0; + case 584: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 585; + return 0; + case 444: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + state->grammarStack[state->stackIndex] = 445; + return 0; + case 621: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 622; + return 0; + case 220: + /* FirstStartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 221; + return 0; + case 542: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + case 541: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + state->grammarStack[state->stackIndex] = 563; + return 0; + case 110: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 111: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + state->grammarStack[state->stackIndex] = 116; + return 0; + case 63: + /* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + state->grammarStack[state->stackIndex] = 64; + return 0; + case 458: + /* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + state->grammarStack[state->stackIndex] = 459; + return 0; + case 232: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 233; + return 0; + case 418: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + state->grammarStack[state->stackIndex] = 422; + return 0; + case 73: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + state->grammarStack[state->stackIndex] = 602; + return 0; + case 174: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + case 175: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + state->grammarStack[state->stackIndex] = 200; + return 0; + case 159: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMax)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMax)] */ + case 367: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + case 45: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVCabinConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVCabinConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + case 75: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 434: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 482: + /* Element[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 131: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 235: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 614: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 43: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 350: + /* Element[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 640: + /* Element[CHARACTERS[FLOAT]] --> Element[CHARACTERS[FLOAT]] */ + case 9: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxVoltage)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxVoltage)] */ + case 202: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + case 122: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 620: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 183: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), END_ELEMENT] */ + case 149: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple), END_ELEMENT] */ + case 682: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 423: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 531: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 317: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 496: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] */ + case 106: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 408: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow)] */ + case 552: + /* Element[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 520: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + case 526: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 587: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 201: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 427: + /* 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)] --> 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 209: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit)] */ + case 237: + /* Element[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 500: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + case 354: + /* 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] --> 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] */ + case 38: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 28: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + case 275: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved)] */ + case 380: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 265: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + case 51: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 528: + /* Element[CHARACTERS[BINARY_HEX]] --> Element[CHARACTERS[BINARY_HEX]] */ + case 431: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + case 143: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 669: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 675: + /* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + case 636: + /* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + case 274: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved)] */ + case 137: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 104: + /* Element[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 299: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 648: + /* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + case 446: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 126: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 484: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + case 379: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue)] */ + case 494: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeService)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeService)] */ + case 121: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 370: + /* 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]] --> 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]] */ + case 246: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 601: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + case 493: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + case 228: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 283: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + case 81: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 456: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType)] */ + case 105: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 324: + /* 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]] --> 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]] */ + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + case 210: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + case 457: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 469: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet), END_ELEMENT] */ + case 307: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 459: + /* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + case 194: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amountMultiplier), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amountMultiplier), END_ELEMENT] */ + case 188: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Cost), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Cost), END_ELEMENT] */ + case 509: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 516: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID), END_ELEMENT] */ + case 68: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + case 604: + /* Element[CHARACTERS[LIST]] --> Element[CHARACTERS[LIST]] */ + case 241: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 612: + /* Element[CHARACTERS[LIST]] --> Element[CHARACTERS[LIST]] */ + case 259: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 343: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber)] */ + case 660: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 264: + /* 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}EVTargetVoltage)] --> 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}EVTargetVoltage)] */ + case 571: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 360: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] --> Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + case 593: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 425: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + case 626: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 287: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q)] */ + case 578: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + case 555: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + case 97: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 428: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 31: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + case 400: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 207: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + case 173: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 96: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] */ + case 562: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + case 116: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 591: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 519: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 262: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 369: + /* 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]] --> 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]] */ + case 465: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + case 503: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 441: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 124: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 373: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + case 671: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 109: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 219: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 499: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + case 388: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + case 140: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 403: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 74: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 39: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + case 589: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 69: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 667: + /* Element[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 460: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 16: + /* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + case 392: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + case 199: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 608: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 582: + /* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + case 597: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 120: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + case 115: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 151: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxSchedule)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxSchedule)] */ + case 268: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 644: + /* Element[CHARACTERS[FLOAT]] --> Element[CHARACTERS[FLOAT]] */ + case 654: + /* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + case 182: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 213: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 221: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 356: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT_GENERIC, END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT_GENERIC, END_ELEMENT] */ + case 566: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), END_ELEMENT] */ + case 598: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 57: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 583: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 511: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedServiceList)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedServiceList)] */ + case 405: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 41: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 291: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + case 99: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] */ + case 0: + /* Document[START_DOCUMENT] --> Document[START_DOCUMENT] */ + case 282: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + case 24: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + case 59: + /* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + case 539: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 34: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 26: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage)] */ + case 80: + /* Element[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 36: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent)] */ + case 580: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + case 414: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + case 413: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + case 540: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 78: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + case 602: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 180: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry)] */ + case 89: + /* Element[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 535: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 198: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + case 128: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVChargeParameter)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVChargeParameter)] */ + case 206: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + case 466: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceParameterList), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceParameterList), END_ELEMENT] */ + case 529: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ + case 438: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 4: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EAmount)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EAmount)] */ + case 263: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 507: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 523: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 197: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + case 390: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + case 337: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 48: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSSOC)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSSOC)] */ + case 240: + /* Element[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 191: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amount)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amount)] */ + case 305: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 416: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry)] */ + case 113: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + case 301: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 46: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + case 277: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 260: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 94: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + case 93: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 323: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + case 616: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 270: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 422: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + case 87: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 276: + /* 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] --> 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 336: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 665: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 223: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 421: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 463: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + case 543: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue)] */ + case 303: + /* Element[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 634: + /* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + case 208: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit)] */ + case 325: + /* 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]] --> 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]] */ + case 85: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 179: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 30: + /* Element[CHARACTERS[BOOLEAN]] --> Element[CHARACTERS[BOOLEAN]] */ + case 250: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 218: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 550: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 462: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 471: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter)] */ + case 638: + /* Element[CHARACTERS[DECIMAL]] --> Element[CHARACTERS[DECIMAL]] */ + case 594: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 401: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 489: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + case 144: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + case 205: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit)] */ + case 203: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 234: + /* 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] --> 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 563: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + case 20: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + case 284: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 72: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 177: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + case 2: + /* DocEnd[END_DOCUMENT] --> DocEnd[END_DOCUMENT] */ + case 606: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 130: + /* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + case 508: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + case 358: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] --> Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + case 243: + /* Element[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 322: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 570: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 157: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), END_ELEMENT] */ + case 553: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 123: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RetryCounter)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RetryCounter)] */ + case 19: + /* Element[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 490: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 622: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 261: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 382: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 166: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 256: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 86: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ + case 229: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 445: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 517: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 393: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 216: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 258: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + case 226: + /* Element[CHARACTERS[BINARY_HEX]] --> Element[CHARACTERS[BINARY_HEX]] */ + case 339: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 618: + /* Element[CHARACTERS[LIST]] --> Element[CHARACTERS[LIST]] */ + case 315: + /* 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]] --> 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]] */ + case 289: + /* Element[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 646: + /* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + case 448: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 334: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}duration), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}duration), END_ELEMENT] */ + case 294: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter)] */ + case 112: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 255: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 114: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 467: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 347: + /* Element[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 385: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + case 138: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 90: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + case 677: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 381: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 642: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 266: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + case 14: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + case 557: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + case 610: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 364: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT_GENERIC, END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT_GENERIC, END_ELEMENT] */ + case 596: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 407: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 37: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent)] */ + case 585: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 295: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 479: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 141: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 53: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 134: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + case 8: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 62: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + case 394: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 650: + /* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + case 279: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 338: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + case 139: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 214: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + case 231: + /* 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] --> 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 436: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 321: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent)] */ + case 319: + /* Element[END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 171: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 32: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}StopCharging)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}StopCharging)] */ + case 135: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + case 245: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + case 329: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 514: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService), END_ELEMENT] */ + case 449: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 404: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 211: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + case 477: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 186: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConsumptionCost), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConsumptionCost), END_ELEMENT] */ + case 1: + /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter), 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: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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), 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_EVStatus), 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}EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Entry), 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({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({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), 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({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), 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:MsgDataTypes}TimeInterval), 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_GENERIC] --> DocContent[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter), 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: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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), 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_EVStatus), 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}EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Entry), 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({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({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), 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({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), 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:MsgDataTypes}TimeInterval), 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_GENERIC] */ + case 680: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 506: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 156: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry)] */ + case 119: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 296: + /* Element[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)] --> Element[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 233: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 312: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 537: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 452: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 163: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 253: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 532: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow), END_ELEMENT] */ + case 486: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + case 67: + /* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + case 153: + /* Element[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 419: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + case 60: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 437: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 267: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 309: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 7: + /* Element[] --> Element[] */ + case 491: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + case 411: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 271: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 300: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 600: + /* Element[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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] --> Element[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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] */ + case 432: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + case 387: + /* Element[CHARACTERS[BINARY_HEX]] --> Element[CHARACTERS[BINARY_HEX]] */ + case 272: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent)] */ + case 624: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 455: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 656: + /* Element[CHARACTERS[BINARY_HEX]] --> Element[CHARACTERS[BINARY_HEX]] */ + case 546: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod)] */ + case 146: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules), 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)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules), 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 311: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 331: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), END_ELEMENT] */ + case 547: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 512: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 50: + /* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + case 273: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved)] */ + case 443: + /* 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] --> 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 652: + /* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + case 473: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter), END_ELEMENT] */ + case 556: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 599: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 424: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 533: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 64: + /* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + case 212: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered), END_ELEMENT] */ + case 35: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + case 22: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMinCurrent)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMinCurrent)] */ + case 224: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 65: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 572: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 238: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 417: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 501: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 170: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 168: + /* Element[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 252: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 366: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), END_ELEMENT] */ + case 47: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + case 165: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + case 498: + /* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + case 108: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 102: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 586: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + case 23: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 487: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 290: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + case 11: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + case 227: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 278: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 485: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + case 429: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 505: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 172: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + case 577: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + case 136: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 378: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 341: + /* 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] --> 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 133: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumCurrentLimit)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumCurrentLimit)] */ + case 244: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + case 663: + /* Element[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 362: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ + case 524: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 154: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariff), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariff), END_ELEMENT] */ + case 13: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 693: + /* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + case 433: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 147: + /* 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)] --> 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 6: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 399: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 285: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 196: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 630: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 454: + /* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 100: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 21: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxCurrent)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxCurrent)] */ + case 185: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceLevel)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceLevel)] */ + case 193: + /* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + case 280: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 521: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + case 439: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 628: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 409: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 451: + /* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + case 389: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 83: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID), END_ELEMENT] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID), END_ELEMENT] */ + case 575: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + case 554: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 561: + /* Element[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 176: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + case 55: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 573: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 292: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + case 200: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + case 345: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 348: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + case 588: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + case 17: + /* Element[END_ELEMENT] --> Element[END_ELEMENT] */ + case 247: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 293: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + return 0; + case 44: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + state->grammarStack[state->stackIndex] = 54; + return 0; + case 384: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + case 383: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + state->grammarStack[state->stackIndex] = 390; + return 0; + case 651: + /* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + state->grammarStack[state->stackIndex] = 652; + return 0; + case 478: + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 632: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + state->grammarStack[state->stackIndex] = 479; + return 0; + case 655: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] --> Element[CHARACTERS[BINARY_HEX]] */ + state->grammarStack[state->stackIndex] = 656; + return 0; + case 18: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 480: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 672: + /* FirstStartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 125: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 472: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + case 518: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + state->grammarStack[state->stackIndex] = 19; + return 0; + case 58: + /* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + state->grammarStack[state->stackIndex] = 59; + return 0; + case 368: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 673: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 344: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 483: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 351: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 335: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + case 316: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 317; + return 0; + case 579: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + state->grammarStack[state->stackIndex] = 586; + return 0; + case 447: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 448; + return 0; + case 595: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 599; + return 0; + case 568: + /* StartTag[ATTRIBUTE[STRING](Target)] --> Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 569: + /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 567: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Target)] --> Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + state->grammarStack[state->stackIndex] = 572; + return 0; + case 627: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + state->grammarStack[state->stackIndex] = 628; + return 0; + case 549: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 548: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + state->grammarStack[state->stackIndex] = 554; + return 0; + case 215: + /* First(xsi:type)StartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + case 685: + /* FirstStartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 216; + return 0; + case 286: + /* 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)] --> Element[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)] */ + state->grammarStack[state->stackIndex] = 296; + return 0; + case 117: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 118: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 126; + return 0; + case 692: + /* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + state->grammarStack[state->stackIndex] = 693; + return 0; + case 590: + /* 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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] --> Element[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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 600; + return 0; + case 27: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + state->grammarStack[state->stackIndex] = 35; + return 0; + case 674: + /* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + state->grammarStack[state->stackIndex] = 675; + return 0; + case 629: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 630; + return 0; + case 225: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] --> Element[CHARACTERS[BINARY_HEX]] */ + state->grammarStack[state->stackIndex] = 226; + return 0; + case 647: + /* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + state->grammarStack[state->stackIndex] = 648; + return 0; + case 98: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + state->grammarStack[state->stackIndex] = 100; + return 0; + case 470: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + state->grammarStack[state->stackIndex] = 485; + return 0; + case 689: + /* FirstStartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + case 169: + /* First(xsi:type)StartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 170; + return 0; + case 254: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 256; + return 0; + case 395: + /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 397: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 396: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 398: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + state->grammarStack[state->stackIndex] = 401; + return 0; + case 239: + /* FirstStartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + state->grammarStack[state->stackIndex] = 240; + return 0; + case 558: + /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] --> FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 559: + /* StartTag[CHARACTERS[BINARY_BASE64]] --> FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + state->grammarStack[state->stackIndex] = 560; + return 0; + case 664: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + state->grammarStack[state->stackIndex] = 665; + return 0; + case 476: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + case 475: + /* StartTag[ATTRIBUTE[ENUMERATION](ValueType)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + case 474: + /* FirstStartTag[ATTRIBUTE[STRING](Name)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + state->grammarStack[state->stackIndex] = 484; + return 0; + case 515: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + state->grammarStack[state->stackIndex] = 519; + return 0; + case 625: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 626; + return 0; + case 386: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] --> Element[CHARACTERS[BINARY_HEX]] */ + state->grammarStack[state->stackIndex] = 387; + return 0; + case 694: + /* FirstStartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + case 40: + /* First(xsi:type)StartTag[END_ELEMENT] --> Element[END_ELEMENT] */ + state->grammarStack[state->stackIndex] = 41; + return 0; + case 581: + /* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + state->grammarStack[state->stackIndex] = 582; + return 0; + case 88: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + state->grammarStack[state->stackIndex] = 89; + return 0; + case 668: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 669; + return 0; + case 158: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + state->grammarStack[state->stackIndex] = 171; + return 0; + case 91: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 92: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 109; + return 0; + case 435: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 439; + return 0; + case 641: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 642; + return 0; + case 611: + /* FirstStartTag[CHARACTERS[LIST]] --> Element[CHARACTERS[LIST]] */ + state->grammarStack[state->stackIndex] = 612; + return 0; + case 426: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 429; + return 0; + case 353: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 631: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 361: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 357: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 349: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 352: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 365: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + case 359: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */ + state->grammarStack[state->stackIndex] = 350; + return 0; + case 468: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + state->grammarStack[state->stackIndex] = 486; + return 0; + case 297: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 298: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + state->grammarStack[state->stackIndex] = 301; + return 0; + case 592: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + state->grammarStack[state->stackIndex] = 594; + return 0; + case 342: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + state->grammarStack[state->stackIndex] = 348; + return 0; + case 649: + /* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + state->grammarStack[state->stackIndex] = 650; + return 0; + case 495: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + state->grammarStack[state->stackIndex] = 499; + return 0; + case 643: + /* FirstStartTag[CHARACTERS[FLOAT]] --> Element[CHARACTERS[FLOAT]] */ + state->grammarStack[state->stackIndex] = 644; + return 0; + case 662: + /* FirstStartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */ + state->grammarStack[state->stackIndex] = 663; + return 0; + case 3: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + state->grammarStack[state->stackIndex] = 24; + return 0; + case 251: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 252; + return 0; + case 363: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] --> Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + state->grammarStack[state->stackIndex] = 367; + return 0; + case 676: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 677; + return 0; + case 184: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + state->grammarStack[state->stackIndex] = 199; + return 0; + case 178: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 179; + return 0; + case 84: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 85; + return 0; + case 204: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + state->grammarStack[state->stackIndex] = 214; + return 0; + case 609: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 610; + return 0; + case 192: + /* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + state->grammarStack[state->stackIndex] = 193; + return 0; + case 77: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + case 76: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + state->grammarStack[state->stackIndex] = 90; + return 0; + case 681: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */ + state->grammarStack[state->stackIndex] = 682; + return 0; + case 513: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + state->grammarStack[state->stackIndex] = 520; + return 0; + case 645: + /* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */ + state->grammarStack[state->stackIndex] = 646; + return 0; + case 453: + /* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */ + state->grammarStack[state->stackIndex] = 454; + return 0; + case 538: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] --> Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + state->grammarStack[state->stackIndex] = 540; + return 0; + case 497: + /* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */ + state->grammarStack[state->stackIndex] = 498; + return 0; + + } + + 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 new file mode 100644 index 0000000..add71fc --- /dev/null +++ b/src/codec/EXICoder.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef EXI_CODER_H +#define EXI_CODER_H + +#include "EXITypes.h" + +#define IS_STRICT 0 +#define DOCUMENT 0 +#define DOC_CONTENT 1 +#define DOC_END 2 +#define UR_TYPE_GRAMMAR_0 73 +#define UR_TYPE_GRAMMAR_1 602 + + + +int exiPushStack(exi_state_t* state, uint16_t newState, eqname_t* eqn); + +int exiPopStack(exi_state_t* state); + +int exiHandleXsiNilTrue(exi_state_t* state); + +int exiHandleXsiType(exi_state_t* state, eqname_t* xsiType); + +int exiIsStartContent(int16_t ruleID); + +int exiMoveToElementContentRule(exi_state_t* state); + +#endif + +#ifdef __cplusplus +} +#endif + diff --git a/src/codec/EXIDecoder.c b/src/codec/EXIDecoder.c new file mode 100644 index 0000000..5a01452 --- /dev/null +++ b/src/codec/EXIDecoder.c @@ -0,0 +1,8896 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifndef EXI__DECODER_C +#define EXI__DECODER_C + +#include "EXITypes.h" +#include "BitInputStream.h" +#include "DecoderChannel.h" +#include "CoderChannel.h" + +#include "StringTable.h" +#include "NameTableEntries.h" +#include "MethodsBag.h" + +#include "EXICoder.h" +#include "EXIHeaderDecoder.h" + + + +/* local variables */ +static uint32_t xsi; +static uint32_t bits; +static int errn; + + +int exiDecodeListValue(bitstream_t* stream, exi_value_t* val, list_t lt) { + uint32_t uint32; + + val->type = lt.type; + + switch(lt.type) { + case EXI_DATATYPE_BINARY_BASE64: + case EXI_DATATYPE_BINARY_HEX: + errn = decodeBinary(stream, &val->binary); + break; + case EXI_DATATYPE_BOOLEAN: + errn = decodeBoolean(stream, &val->boolean); + break; + case EXI_DATATYPE_BOOLEAN_FACET: + errn = decodeNBitUnsignedInteger(stream, 2, &uint32); + val->boolean = uint32 > 1; + break; + case EXI_DATATYPE_DECIMAL: + errn = decodeDecimal(stream, &val->decimal); + break; + case EXI_DATATYPE_FLOAT: + errn = decodeFloat(stream, &val->float_me); + break; + case EXI_DATATYPE_NBIT_UNSIGNED_INTEGER: + case EXI_DATATYPE_UNSIGNED_INTEGER: + case EXI_DATATYPE_INTEGER: + switch(lt.intType) { + /* (Signed) Integer */ + case EXI_UNSIGNED_INTEGER_8: + case EXI_UNSIGNED_INTEGER_16: + case EXI_UNSIGNED_INTEGER_32: + case EXI_UNSIGNED_INTEGER_64: + errn = decodeUnsignedInteger(stream, &val->integer); + break; + /* (Signed) Integer */ + case EXI_INTEGER_8: + case EXI_INTEGER_16: + case EXI_INTEGER_32: + case EXI_INTEGER_64: + errn = decodeInteger(stream, &val->integer); + break; + } + break; + case EXI_DATATYPE_DATETIME: + errn = decodeDateTime(stream,lt.datetimeType, &val->datetime); + break; + case EXI_DATATYPE_STRING: + errn = decodeStringValue(stream, &val->string); + break; + default: + return EXI_UNSUPPORTED_LIST_VALUE_TYPE; + } + + return errn; +} + + + + +int exiInitDecoder(bitstream_t* stream, exi_state_t* state, exi_name_table_runtime_t runtimeTable) { + /* init grammar state */ + state->stackIndex = 0; + state->grammarStack[0] = DOCUMENT; + /* string table */ + state->nameTablePrepopulated = exiNameTablePrepopulated; + state->nameTableRuntime = runtimeTable; + /* decode header */ + return readEXIHeader(stream); +} + +static int exiDecodeNext2Event(bitstream_t* stream, exi_state_t* state, + exi_event_t* nextEvent) { + uint32_t eventCode2 = 0; + + switch (state->grammarStack[state->stackIndex]) { + case 164: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 49: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 584: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 187: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + case 391: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 662: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 79: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 670: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 651: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 150: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 236: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 645: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 515: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 613: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 18: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 27: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + case 192: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 332: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 603: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 158: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 12: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 617: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 527: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 242: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 480: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 418: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + case 25: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + case 544: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 98: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 61: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + case 88: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 103: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 621: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 534: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 174: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + case 167: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 504: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 653: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 666: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 637: + /* FirstStartTag[CHARACTERS[DECIMAL]] */ + case 576: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + case 155: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + case 148: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + case 353: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 363: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + case 63: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 368: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 530: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 464: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 313: + /* 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]] */ + case 330: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + case 674: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 239: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 29: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 688: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 189: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 672: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 110: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 95: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 3: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + case 558: + /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] */ + case 631: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 641: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 91: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + case 152: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 673: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 281: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 567: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Target)] */ + case 564: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 430: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 361: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 658: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 579: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + case 406: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 619: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 288: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 129: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 371: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 297: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 461: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + case 117: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + case 160: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + case 230: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + case 538: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 478: + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 442: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 609: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 458: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 581: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 412: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + case 607: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 402: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 76: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + case 513: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + case 502: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + case 574: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + case 410: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 615: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 551: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 184: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 560: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 125: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 692: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 655: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 525: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ + case 639: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + case 470: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + case 232: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 522: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 190: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + case 632: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 450: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 195: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 444: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 10: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + case 178: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 386: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 355: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ + case 346: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 659: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 657: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 248: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + case 472: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 679: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 357: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 415: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 340: + /* 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] */ + case 678: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 595: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 661: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 453: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 481: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 84: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 435: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 611: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 676: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 548: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 374: + /* 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)] */ + case 691: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 342: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + case 643: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + case 251: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 344: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 349: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 145: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 541: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + case 15: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 33: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 483: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 352: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 623: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 495: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + case 420: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 649: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 132: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 605: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 320: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + case 592: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 625: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 42: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 518: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 66: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 497: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 447: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 492: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 127: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + case 269: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 629: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 107: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 70: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 56: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 225: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 310: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 181: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 351: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 668: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 664: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 52: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 257: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 254: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 162: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 82: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ + case 468: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + case 633: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 647: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 365: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 426: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 440: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 44: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + case 302: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 359: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 510: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + case 204: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + case 318: + /* 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 222: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 335: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 58: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 316: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 635: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 5: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 474: + /* FirstStartTag[ATTRIBUTE[STRING](Name)] */ + case 286: + /* 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 681: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 383: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + errn = decodeNBitUnsignedInteger(stream, 3, &eventCode2); + switch (eventCode2) { + case 0: + *nextEvent = EXI_EVENT_END_ELEMENT_UNDECLARED; + return errn; + case 1: + *nextEvent = EXI_EVENT_ATTRIBUTE_XSI_TYPE; + return errn; + case 2: + *nextEvent = EXI_EVENT_ATTRIBUTE_XSI_NIL; + return errn; + case 3: + *nextEvent = EXI_EVENT_ATTRIBUTE_GENERIC_UNDECLARED; + return errn; + case 4: + *nextEvent = EXI_EVENT_ATTRIBUTE_INVALID_VALUE; + return errn; + case 5: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED; + return errn; + case 6: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED; + return errn; + } + break; + case 215: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 306: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 326: + /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 395: + /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 590: + /* 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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] */ + case 308: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 687: + /* FirstStartTag[END_ELEMENT] */ + case 627: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 685: + /* FirstStartTag[END_ELEMENT] */ + case 304: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 73: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 683: + /* FirstStartTag[END_ELEMENT] */ + case 536: + /* FirstStartTag[END_ELEMENT] */ + case 694: + /* FirstStartTag[END_ELEMENT] */ + case 689: + /* FirstStartTag[END_ELEMENT] */ + case 142: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 220: + /* FirstStartTag[END_ELEMENT] */ + case 684: + /* FirstStartTag[END_ELEMENT] */ + case 169: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 40: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 488: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + case 686: + /* FirstStartTag[END_ELEMENT] */ + case 217: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 690: + /* FirstStartTag[END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 3, &eventCode2); + switch (eventCode2) { + case 0: + *nextEvent = EXI_EVENT_ATTRIBUTE_XSI_TYPE; + return errn; + case 1: + *nextEvent = EXI_EVENT_ATTRIBUTE_XSI_NIL; + return errn; + case 2: + *nextEvent = EXI_EVENT_ATTRIBUTE_GENERIC_UNDECLARED; + return errn; + case 3: + *nextEvent = EXI_EVENT_ATTRIBUTE_INVALID_VALUE; + return errn; + case 4: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED; + return errn; + case 5: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED; + return errn; + } + break; + case 372: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 568: + /* StartTag[ATTRIBUTE[STRING](Target)] */ + case 77: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + case 545: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 542: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + case 569: + /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 384: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + case 565: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 375: + /* 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)] */ + case 476: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + case 118: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 92: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 377: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 559: + /* StartTag[CHARACTERS[BINARY_BASE64]] */ + case 249: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 175: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + case 376: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 314: + /* 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 475: + /* StartTag[ATTRIBUTE[ENUMERATION](ValueType)] */ + case 111: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + errn = decodeNBitUnsignedInteger(stream, 3, &eventCode2); + switch (eventCode2) { + case 0: + *nextEvent = EXI_EVENT_END_ELEMENT_UNDECLARED; + return errn; + case 1: + *nextEvent = EXI_EVENT_ATTRIBUTE_GENERIC_UNDECLARED; + return errn; + case 2: + *nextEvent = EXI_EVENT_ATTRIBUTE_INVALID_VALUE; + return errn; + case 3: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED; + return errn; + case 4: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED; + return errn; + } + break; + case 159: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMax)] */ + case 367: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + case 45: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVCabinConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + case 434: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 482: + /* Element[CHARACTERS[INTEGER]] */ + case 614: + /* Element[CHARACTERS[STRING]] */ + case 350: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 640: + /* Element[CHARACTERS[FLOAT]] */ + case 9: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxVoltage)] */ + case 202: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + case 122: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 620: + /* Element[CHARACTERS[STRING]] */ + case 682: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 423: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 531: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 317: + /* Element[CHARACTERS[STRING]] */ + case 408: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow)] */ + case 552: + /* Element[CHARACTERS[INTEGER]] */ + case 520: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + case 201: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 427: + /* 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 209: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit)] */ + case 237: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 354: + /* 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] */ + case 28: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + case 275: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved)] */ + case 265: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + case 528: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 431: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + case 669: + /* Element[CHARACTERS[STRING]] */ + case 675: + /* Element[CHARACTERS[DATETIME]] */ + case 636: + /* Element[CHARACTERS[DATETIME]] */ + case 274: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved)] */ + case 104: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 648: + /* Element[CHARACTERS[DATETIME]] */ + case 126: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 484: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + case 379: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue)] */ + case 494: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeService)] */ + case 121: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 370: + /* 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]] */ + case 601: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + case 493: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + case 228: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 283: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + case 81: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 456: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType)] */ + case 105: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 324: + /* 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]] */ + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + case 210: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + case 459: + /* Element[CHARACTERS[ENUMERATION]] */ + case 509: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 68: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + case 604: + /* Element[CHARACTERS[LIST]] */ + case 612: + /* Element[CHARACTERS[LIST]] */ + case 259: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 343: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber)] */ + case 660: + /* Element[CHARACTERS[STRING]] */ + case 264: + /* 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}EVTargetVoltage)] */ + case 571: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 425: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + case 626: + /* Element[CHARACTERS[STRING]] */ + case 287: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q)] */ + case 31: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + case 207: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + case 116: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 519: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 262: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 369: + /* 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]] */ + case 465: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + case 441: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 671: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 109: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 219: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 499: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + case 388: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + case 403: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 39: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + case 69: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 667: + /* Element[CHARACTERS[INTEGER]] */ + case 460: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 16: + /* Element[CHARACTERS[ENUMERATION]] */ + case 392: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + case 199: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 608: + /* Element[CHARACTERS[STRING]] */ + case 582: + /* Element[CHARACTERS[ENUMERATION]] */ + case 597: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 120: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + case 151: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxSchedule)] */ + case 268: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 644: + /* Element[CHARACTERS[FLOAT]] */ + case 654: + /* Element[CHARACTERS[DATETIME]] */ + case 182: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 57: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 511: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedServiceList)] */ + case 405: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 291: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + case 282: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + case 24: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + case 59: + /* Element[CHARACTERS[ENUMERATION]] */ + case 26: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage)] */ + case 80: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 36: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent)] */ + case 540: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 78: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + case 180: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry)] */ + case 89: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 535: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 198: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + case 128: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVChargeParameter)] */ + case 206: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + case 529: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ + case 4: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EAmount)] */ + case 263: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 507: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 197: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + case 390: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + case 48: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSSOC)] */ + case 240: + /* Element[CHARACTERS[INTEGER]] */ + case 191: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amount)] */ + case 416: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry)] */ + case 113: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + case 46: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + case 260: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 94: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + case 93: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 323: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + case 616: + /* Element[CHARACTERS[STRING]] */ + case 270: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 422: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + case 665: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 223: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 463: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + case 543: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue)] */ + case 303: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 634: + /* Element[CHARACTERS[DATETIME]] */ + case 208: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit)] */ + case 325: + /* 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]] */ + case 85: + /* Element[CHARACTERS[STRING]] */ + case 179: + /* Element[CHARACTERS[STRING]] */ + case 30: + /* Element[CHARACTERS[BOOLEAN]] */ + case 471: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter)] */ + case 638: + /* Element[CHARACTERS[DECIMAL]] */ + case 594: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 144: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + case 205: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit)] */ + case 563: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + case 20: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + case 177: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + case 606: + /* Element[CHARACTERS[STRING]] */ + case 130: + /* Element[CHARACTERS[ENUMERATION]] */ + case 508: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + case 243: + /* Element[CHARACTERS[INTEGER]] */ + case 123: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RetryCounter)] */ + case 19: + /* Element[CHARACTERS[INTEGER]] */ + case 622: + /* Element[CHARACTERS[STRING]] */ + case 261: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 382: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 256: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 86: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ + case 229: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 445: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 258: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + case 226: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 618: + /* Element[CHARACTERS[LIST]] */ + case 289: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 646: + /* Element[CHARACTERS[DATETIME]] */ + case 448: + /* Element[CHARACTERS[STRING]] */ + case 294: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter)] */ + case 112: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 114: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 347: + /* Element[CHARACTERS[INTEGER]] */ + case 385: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + case 90: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + case 677: + /* Element[CHARACTERS[STRING]] */ + case 381: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 642: + /* Element[CHARACTERS[STRING]] */ + case 266: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + case 14: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + case 610: + /* Element[CHARACTERS[STRING]] */ + case 596: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 407: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 37: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent)] */ + case 585: + /* Element[CHARACTERS[STRING]] */ + case 479: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 141: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 53: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 134: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + case 8: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 62: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + case 394: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 650: + /* Element[CHARACTERS[DATETIME]] */ + case 338: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + case 214: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + case 436: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 321: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent)] */ + case 171: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 32: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}StopCharging)] */ + case 135: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + case 245: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + case 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 211: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + case 680: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 156: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry)] */ + case 119: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 296: + /* Element[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 233: + /* Element[CHARACTERS[STRING]] */ + case 312: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 253: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 486: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + case 67: + /* Element[CHARACTERS[ENUMERATION]] */ + case 153: + /* Element[CHARACTERS[INTEGER]] */ + case 419: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + case 437: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 411: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 271: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 432: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + case 387: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 272: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent)] */ + case 624: + /* Element[CHARACTERS[STRING]] */ + case 455: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 656: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 546: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod)] */ + case 146: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules), 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 547: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 50: + /* Element[CHARACTERS[ENUMERATION]] */ + case 273: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved)] */ + case 652: + /* Element[CHARACTERS[DATETIME]] */ + case 556: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 599: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 64: + /* Element[CHARACTERS[ENUMERATION]] */ + case 35: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + case 22: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMinCurrent)] */ + case 224: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 572: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 168: + /* Element[CHARACTERS[INTEGER]] */ + case 252: + /* Element[CHARACTERS[STRING]] */ + case 47: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + case 165: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + case 498: + /* Element[CHARACTERS[ENUMERATION]] */ + case 108: + /* Element[CHARACTERS[STRING]] */ + case 102: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 586: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + case 487: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 290: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + case 11: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + case 227: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 485: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + case 429: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 505: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 172: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + case 378: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 133: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumCurrentLimit)] */ + case 244: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + case 663: + /* Element[CHARACTERS[INTEGER]] */ + case 362: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ + case 524: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 13: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 693: + /* Element[CHARACTERS[ENUMERATION]] */ + case 147: + /* 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 285: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 630: + /* Element[CHARACTERS[STRING]] */ + case 454: + /* Element[CHARACTERS[STRING]] */ + case 100: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 21: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxCurrent)] */ + case 185: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceLevel)] */ + case 193: + /* Element[CHARACTERS[ENUMERATION]] */ + case 280: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 521: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + case 439: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 451: + /* Element[CHARACTERS[ENUMERATION]] */ + case 575: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + case 561: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 176: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + case 55: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 573: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 200: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + case 348: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + case 588: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + case 247: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + errn = decodeNBitUnsignedInteger(stream, 2, &eventCode2); + switch (eventCode2) { + case 0: + *nextEvent = EXI_EVENT_END_ELEMENT_UNDECLARED; + return errn; + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED; + return errn; + case 2: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED; + return errn; + } + break; + case 71: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 549: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 333: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 397: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 327: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 396: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 398: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 298: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 328: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 2, &eventCode2); + switch (eventCode2) { + case 0: + *nextEvent = EXI_EVENT_ATTRIBUTE_GENERIC_UNDECLARED; + return errn; + case 1: + *nextEvent = EXI_EVENT_ATTRIBUTE_INVALID_VALUE; + return errn; + case 2: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED; + return errn; + case 3: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED; + return errn; + } + break; + case 75: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 131: + /* Element[END_ELEMENT] */ + case 235: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 43: + /* Element[END_ELEMENT] */ + case 183: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), END_ELEMENT] */ + case 149: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple), END_ELEMENT] */ + case 496: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] */ + case 106: + /* Element[END_ELEMENT] */ + case 526: + /* Element[END_ELEMENT] */ + case 587: + /* Element[END_ELEMENT] */ + case 500: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + case 38: + /* Element[END_ELEMENT] */ + case 380: + /* Element[END_ELEMENT] */ + case 51: + /* Element[END_ELEMENT] */ + case 143: + /* Element[END_ELEMENT] */ + case 137: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 299: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 446: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 246: + /* Element[END_ELEMENT] */ + case 457: + /* Element[END_ELEMENT] */ + case 469: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet), END_ELEMENT] */ + case 307: + /* Element[END_ELEMENT] */ + case 194: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amountMultiplier), END_ELEMENT] */ + case 188: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Cost), END_ELEMENT] */ + case 516: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID), END_ELEMENT] */ + case 241: + /* Element[END_ELEMENT] */ + case 360: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + case 593: + /* Element[END_ELEMENT] */ + case 578: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + case 555: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + case 97: + /* Element[END_ELEMENT] */ + case 428: + /* Element[END_ELEMENT] */ + case 400: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 173: + /* Element[END_ELEMENT] */ + case 96: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] */ + case 562: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + case 591: + /* Element[END_ELEMENT] */ + case 503: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 124: + /* Element[END_ELEMENT] */ + case 373: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + case 140: + /* Element[END_ELEMENT] */ + case 74: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 589: + /* Element[END_ELEMENT] */ + case 115: + /* Element[END_ELEMENT] */ + case 213: + /* Element[END_ELEMENT] */ + case 221: + /* Element[END_ELEMENT] */ + case 356: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT_GENERIC, END_ELEMENT] */ + case 566: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), END_ELEMENT] */ + case 598: + /* Element[END_ELEMENT] */ + case 583: + /* Element[END_ELEMENT] */ + case 41: + /* Element[END_ELEMENT] */ + case 99: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] */ + case 539: + /* Element[END_ELEMENT] */ + case 34: + /* Element[END_ELEMENT] */ + case 580: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + case 414: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + case 413: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + case 602: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 466: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceParameterList), END_ELEMENT] */ + case 438: + /* Element[END_ELEMENT] */ + case 523: + /* Element[END_ELEMENT] */ + case 337: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 305: + /* Element[END_ELEMENT] */ + case 301: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 277: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 87: + /* Element[END_ELEMENT] */ + case 276: + /* 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 336: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 421: + /* Element[END_ELEMENT] */ + case 250: + /* Element[END_ELEMENT] */ + case 218: + /* Element[END_ELEMENT] */ + case 550: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 462: + /* Element[END_ELEMENT] */ + case 401: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 489: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + case 203: + /* Element[END_ELEMENT] */ + case 234: + /* 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 284: + /* Element[END_ELEMENT] */ + case 72: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 358: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + case 322: + /* Element[END_ELEMENT] */ + case 570: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 157: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), END_ELEMENT] */ + case 553: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 490: + /* Element[END_ELEMENT] */ + case 166: + /* Element[END_ELEMENT] */ + case 517: + /* Element[END_ELEMENT] */ + case 393: + /* Element[END_ELEMENT] */ + case 216: + /* Element[END_ELEMENT] */ + case 339: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 315: + /* 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]] */ + case 334: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}duration), END_ELEMENT] */ + case 255: + /* Element[END_ELEMENT] */ + case 467: + /* Element[END_ELEMENT] */ + case 138: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 557: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + case 364: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT_GENERIC, END_ELEMENT] */ + case 295: + /* Element[END_ELEMENT] */ + case 279: + /* Element[END_ELEMENT] */ + case 139: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 231: + /* 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 319: + /* Element[END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 329: + /* Element[END_ELEMENT] */ + case 514: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService), END_ELEMENT] */ + case 449: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 404: + /* Element[END_ELEMENT] */ + case 477: + /* Element[END_ELEMENT] */ + case 186: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConsumptionCost), END_ELEMENT] */ + case 506: + /* Element[END_ELEMENT] */ + case 537: + /* Element[END_ELEMENT] */ + case 452: + /* Element[END_ELEMENT] */ + case 163: + /* Element[END_ELEMENT] */ + case 532: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow), END_ELEMENT] */ + case 60: + /* Element[END_ELEMENT] */ + case 267: + /* Element[END_ELEMENT] */ + case 309: + /* Element[END_ELEMENT] */ + case 491: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + case 300: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 600: + /* Element[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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] */ + case 311: + /* Element[END_ELEMENT] */ + case 331: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), END_ELEMENT] */ + case 512: + /* Element[END_ELEMENT] */ + case 443: + /* 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 473: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter), END_ELEMENT] */ + case 424: + /* Element[END_ELEMENT] */ + case 533: + /* Element[END_ELEMENT] */ + case 212: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered), END_ELEMENT] */ + case 65: + /* Element[END_ELEMENT] */ + case 238: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 417: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 501: + /* Element[END_ELEMENT] */ + case 170: + /* Element[END_ELEMENT] */ + case 366: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), END_ELEMENT] */ + case 23: + /* Element[END_ELEMENT] */ + case 278: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 577: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + case 136: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 341: + /* 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 154: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariff), END_ELEMENT] */ + case 433: + /* Element[END_ELEMENT] */ + case 6: + /* Element[END_ELEMENT] */ + case 399: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 196: + /* Element[END_ELEMENT] */ + case 628: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 409: + /* Element[END_ELEMENT] */ + case 389: + /* Element[END_ELEMENT] */ + case 83: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID), END_ELEMENT] */ + case 554: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 292: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + case 345: + /* Element[END_ELEMENT] */ + case 17: + /* Element[END_ELEMENT] */ + case 293: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode2); + switch (eventCode2) { + case 0: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED; + return errn; + case 1: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED; + return errn; + } + break; + + default: + *nextEvent = EXI_EVENT_ERROR; + return EXI_ERROR_UNEXPECTED_EVENT_LEVEL2; + } + + 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 341: + /* 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 = EXI_EVENT_START_ELEMENT; + return errn; + case 5: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 6: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 7: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 231: + /* 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 136: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 4: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 5: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 375: + /* 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, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = EXI_EVENT_ATTRIBUTE; + return errn; + case 2: + case 3: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 4: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 484: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + case 476: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 6: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 590: + /* 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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] */ + case 600: + /* Element[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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), 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: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 35: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 36: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 356: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT_GENERIC, END_ELEMENT] */ + case 364: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT_GENERIC, END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 2: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 3: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 260: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 224: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 4: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 354: + /* 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] */ + case 340: + /* 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 = EXI_EVENT_START_ELEMENT; + return errn; + case 5: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 6: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 259: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 146: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules), 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)] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 5: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 376: + /* 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 = EXI_EVENT_ATTRIBUTE; + return errn; + case 1: + case 2: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 3: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 1: + /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter), 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: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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), 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_EVStatus), 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}EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Entry), 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({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({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), 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({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), 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:MsgDataTypes}TimeInterval), 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_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: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 81: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + } + break; + case 395: + /* 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 = EXI_EVENT_ATTRIBUTE; + return errn; + case 3: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 4: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 5: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 6: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 360: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + case 358: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 1: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 2: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 2: + /* DocEnd[END_DOCUMENT] */ + *nextEvent = EXI_EVENT_END_DOCUMENT; + return errn; + case 45: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVCabinConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + case 427: + /* 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 264: + /* 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}EVTargetVoltage)] */ + case 128: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVChargeParameter)] */ + case 261: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 296: + /* Element[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 227: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 147: + /* 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 286: + /* 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)] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 3: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 313: + /* 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 = EXI_EVENT_ATTRIBUTE; + return errn; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 8: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 9: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 10: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 568: + /* StartTag[ATTRIBUTE[STRING](Target)] */ + case 332: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 174: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + case 91: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + case 297: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 117: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + case 248: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + case 548: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 70: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 475: + /* StartTag[ATTRIBUTE[ENUMERATION](ValueType)] */ + case 474: + /* FirstStartTag[ATTRIBUTE[STRING](Name)] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_ATTRIBUTE; + return errn; + case 1: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 558: + /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_ATTRIBUTE; + return errn; + case 1: + *nextEvent = EXI_EVENT_CHARACTERS; + return errn; + case 2: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 327: + /* 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 = EXI_EVENT_ATTRIBUTE; + return errn; + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 2: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 3: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 370: + /* 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]] */ + case 369: + /* 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]] */ + case 314: + /* 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]] */ + errn = decodeNBitUnsignedInteger(stream, 4, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 7: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 8: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 9: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 374: + /* 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 = EXI_EVENT_ATTRIBUTE; + return errn; + case 3: + case 4: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 5: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 75: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 71: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 299: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 400: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 74: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 602: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 301: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 550: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 401: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 72: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 570: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 300: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 398: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 298: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 399: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 628: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 1: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 2: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 3: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 549: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 333: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 337: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 336: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 553: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 334: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 554: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 2: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 3: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 4: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 319: + /* Element[END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 1: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 2: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 326: + /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = EXI_EVENT_ATTRIBUTE; + return errn; + case 2: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 3: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 4: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 137: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 413: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + case 276: + /* 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 234: + /* 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 443: + /* 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 = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + case 2: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 3: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 4: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 265: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + case 158: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 228: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 210: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + case 68: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + case 61: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + case 262: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 199: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 688: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 282: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + case 206: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + case 46: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + case 184: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 385: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + case 381: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 355: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ + case 134: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + case 171: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 312: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 377: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 290: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + case 11: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + case 362: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ + case 310: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 176: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 2: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 544: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 110: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 564: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 371: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 76: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + case 541: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + case 383: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_ATTRIBUTE; + return errn; + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 2: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 567: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Target)] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = EXI_EVENT_ATTRIBUTE; + return errn; + case 2: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 0: + /* Document[START_DOCUMENT] */ + *nextEvent = EXI_EVENT_START_DOCUMENT; + return errn; + case 131: + /* Element[END_ELEMENT] */ + case 43: + /* Element[END_ELEMENT] */ + case 215: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 306: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 106: + /* Element[END_ELEMENT] */ + case 526: + /* Element[END_ELEMENT] */ + case 587: + /* Element[END_ELEMENT] */ + case 38: + /* Element[END_ELEMENT] */ + case 380: + /* Element[END_ELEMENT] */ + case 51: + /* Element[END_ELEMENT] */ + case 143: + /* Element[END_ELEMENT] */ + case 246: + /* Element[END_ELEMENT] */ + case 457: + /* Element[END_ELEMENT] */ + case 307: + /* Element[END_ELEMENT] */ + case 241: + /* Element[END_ELEMENT] */ + case 593: + /* Element[END_ELEMENT] */ + case 97: + /* Element[END_ELEMENT] */ + case 428: + /* Element[END_ELEMENT] */ + case 308: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 173: + /* Element[END_ELEMENT] */ + case 591: + /* Element[END_ELEMENT] */ + case 124: + /* Element[END_ELEMENT] */ + case 140: + /* Element[END_ELEMENT] */ + case 589: + /* Element[END_ELEMENT] */ + case 687: + /* FirstStartTag[END_ELEMENT] */ + case 115: + /* Element[END_ELEMENT] */ + case 213: + /* Element[END_ELEMENT] */ + case 221: + /* Element[END_ELEMENT] */ + case 598: + /* Element[END_ELEMENT] */ + case 583: + /* Element[END_ELEMENT] */ + case 41: + /* Element[END_ELEMENT] */ + case 539: + /* Element[END_ELEMENT] */ + case 34: + /* Element[END_ELEMENT] */ + case 685: + /* FirstStartTag[END_ELEMENT] */ + case 304: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 438: + /* Element[END_ELEMENT] */ + case 523: + /* Element[END_ELEMENT] */ + case 305: + /* Element[END_ELEMENT] */ + case 87: + /* Element[END_ELEMENT] */ + case 683: + /* FirstStartTag[END_ELEMENT] */ + case 421: + /* Element[END_ELEMENT] */ + case 250: + /* Element[END_ELEMENT] */ + case 218: + /* Element[END_ELEMENT] */ + case 462: + /* Element[END_ELEMENT] */ + case 203: + /* Element[END_ELEMENT] */ + case 284: + /* Element[END_ELEMENT] */ + case 322: + /* Element[END_ELEMENT] */ + case 536: + /* FirstStartTag[END_ELEMENT] */ + case 490: + /* Element[END_ELEMENT] */ + case 166: + /* Element[END_ELEMENT] */ + case 517: + /* Element[END_ELEMENT] */ + case 393: + /* Element[END_ELEMENT] */ + case 216: + /* Element[END_ELEMENT] */ + case 694: + /* FirstStartTag[END_ELEMENT] */ + case 255: + /* Element[END_ELEMENT] */ + case 467: + /* Element[END_ELEMENT] */ + case 689: + /* FirstStartTag[END_ELEMENT] */ + case 295: + /* Element[END_ELEMENT] */ + case 142: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 279: + /* Element[END_ELEMENT] */ + case 220: + /* FirstStartTag[END_ELEMENT] */ + case 329: + /* Element[END_ELEMENT] */ + case 404: + /* Element[END_ELEMENT] */ + case 477: + /* Element[END_ELEMENT] */ + case 506: + /* Element[END_ELEMENT] */ + case 537: + /* Element[END_ELEMENT] */ + case 452: + /* Element[END_ELEMENT] */ + case 163: + /* Element[END_ELEMENT] */ + case 60: + /* Element[END_ELEMENT] */ + case 267: + /* Element[END_ELEMENT] */ + case 309: + /* Element[END_ELEMENT] */ + case 311: + /* Element[END_ELEMENT] */ + case 512: + /* Element[END_ELEMENT] */ + case 424: + /* Element[END_ELEMENT] */ + case 533: + /* Element[END_ELEMENT] */ + case 65: + /* Element[END_ELEMENT] */ + case 501: + /* Element[END_ELEMENT] */ + case 684: + /* FirstStartTag[END_ELEMENT] */ + case 170: + /* Element[END_ELEMENT] */ + case 23: + /* Element[END_ELEMENT] */ + case 169: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 40: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 686: + /* FirstStartTag[END_ELEMENT] */ + case 433: + /* Element[END_ELEMENT] */ + case 6: + /* Element[END_ELEMENT] */ + case 196: + /* Element[END_ELEMENT] */ + case 217: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 409: + /* Element[END_ELEMENT] */ + case 389: + /* Element[END_ELEMENT] */ + case 690: + /* FirstStartTag[END_ELEMENT] */ + case 345: + /* Element[END_ELEMENT] */ + case 17: + /* Element[END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 1: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 571: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 569: + /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 572: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 1: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 2: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 235: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 446: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 414: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + case 277: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 138: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 557: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + case 491: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + case 488: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + case 577: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + case 292: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 2: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 3: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 159: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMax)] */ + case 367: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + case 434: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 372: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 9: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxVoltage)] */ + case 202: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + case 122: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 187: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + case 423: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 391: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 531: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 408: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow)] */ + case 150: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 520: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + case 201: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 209: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit)] */ + case 515: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 77: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + case 28: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + case 275: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved)] */ + case 27: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + case 431: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + case 274: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved)] */ + case 126: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 379: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue)] */ + case 494: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeService)] */ + case 121: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 601: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + case 493: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + case 283: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + case 81: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 456: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType)] */ + case 105: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + case 509: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 343: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber)] */ + case 418: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + case 25: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + case 425: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + case 98: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 287: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q)] */ + case 31: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + case 207: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + case 116: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 519: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 465: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + case 504: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 441: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 576: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + case 109: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 155: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + case 219: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 499: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + case 148: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + case 388: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + case 363: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + case 403: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 39: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + case 69: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 460: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 392: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + case 530: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 597: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 545: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 120: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + case 464: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 330: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + case 151: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxSchedule)] */ + case 268: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 57: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 511: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedServiceList)] */ + case 542: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + case 405: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 291: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + case 24: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + case 95: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 3: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + case 26: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage)] */ + case 36: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent)] */ + case 540: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 78: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + case 180: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry)] */ + case 281: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 535: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 198: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + case 384: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + case 430: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 529: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ + case 4: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EAmount)] */ + case 263: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 507: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 579: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + case 406: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 197: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + case 390: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + case 48: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSSOC)] */ + case 191: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amount)] */ + case 416: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry)] */ + case 113: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + case 461: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + case 160: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + case 94: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + case 230: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + case 93: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 323: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + case 538: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 270: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 422: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + case 442: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 223: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 412: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + case 463: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + case 543: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue)] */ + case 402: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 513: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + case 208: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit)] */ + case 502: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + case 574: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + case 471: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter)] */ + case 565: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 594: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 144: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + case 205: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit)] */ + case 563: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + case 20: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + case 177: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + case 508: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + case 123: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RetryCounter)] */ + case 382: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 256: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 86: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ + case 229: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 525: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ + case 470: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + case 258: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + case 294: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter)] */ + case 522: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 112: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 114: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 190: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + case 90: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + case 10: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + case 266: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + case 14: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + case 596: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 407: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 37: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent)] */ + case 141: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 62: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + case 394: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 118: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 338: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + case 214: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + case 436: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 321: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent)] */ + case 32: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}StopCharging)] */ + case 135: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + case 245: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + case 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 211: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + case 415: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 156: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry)] */ + case 119: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 92: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 595: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 253: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 486: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + case 435: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 419: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + case 437: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 691: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 342: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + case 249: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 411: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 145: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 271: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 432: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + case 272: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent)] */ + case 455: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 546: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod)] */ + case 495: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + case 547: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 273: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved)] */ + case 556: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 132: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 599: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 35: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + case 22: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMinCurrent)] */ + case 320: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + case 47: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + case 592: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 165: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + case 102: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 175: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + case 586: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + case 42: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 487: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 485: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + case 429: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 505: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 492: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 127: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + case 172: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + case 269: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 378: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 133: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumCurrentLimit)] */ + case 244: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + case 56: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 524: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 257: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 254: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 82: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ + case 285: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 468: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + case 100: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 21: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxCurrent)] */ + case 185: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceLevel)] */ + case 426: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 440: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 44: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + case 280: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 521: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + case 439: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 510: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + case 204: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + case 111: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 575: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + case 222: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 55: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 573: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 200: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + case 348: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + case 588: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + case 247: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 1: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 324: + /* 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]] */ + case 325: + /* 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]] */ + case 318: + /* 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]] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 2: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 3: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 4: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 164: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 482: + /* Element[CHARACTERS[INTEGER]] */ + case 49: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 614: + /* Element[CHARACTERS[STRING]] */ + case 350: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 640: + /* Element[CHARACTERS[FLOAT]] */ + case 584: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 620: + /* Element[CHARACTERS[STRING]] */ + case 682: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 662: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 317: + /* Element[CHARACTERS[STRING]] */ + case 79: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 670: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 651: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 552: + /* Element[CHARACTERS[INTEGER]] */ + case 236: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 645: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 237: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 613: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 18: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 192: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 528: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 669: + /* Element[CHARACTERS[STRING]] */ + case 675: + /* Element[CHARACTERS[DATETIME]] */ + case 603: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 636: + /* Element[CHARACTERS[DATETIME]] */ + case 104: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 648: + /* Element[CHARACTERS[DATETIME]] */ + case 12: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 617: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 527: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 459: + /* Element[CHARACTERS[ENUMERATION]] */ + case 242: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 604: + /* Element[CHARACTERS[LIST]] */ + case 480: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 612: + /* Element[CHARACTERS[LIST]] */ + case 660: + /* Element[CHARACTERS[STRING]] */ + case 626: + /* Element[CHARACTERS[STRING]] */ + case 88: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 103: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 621: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 534: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 167: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 653: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 666: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 671: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 637: + /* FirstStartTag[CHARACTERS[DECIMAL]] */ + case 353: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 63: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 368: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 667: + /* Element[CHARACTERS[INTEGER]] */ + case 16: + /* Element[CHARACTERS[ENUMERATION]] */ + case 608: + /* Element[CHARACTERS[STRING]] */ + case 582: + /* Element[CHARACTERS[ENUMERATION]] */ + case 644: + /* Element[CHARACTERS[FLOAT]] */ + case 674: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 239: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 29: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 654: + /* Element[CHARACTERS[DATETIME]] */ + case 182: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 189: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 672: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 59: + /* Element[CHARACTERS[ENUMERATION]] */ + case 80: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 631: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 641: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 152: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 673: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 89: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 361: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 658: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 240: + /* Element[CHARACTERS[INTEGER]] */ + case 619: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 288: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 129: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 478: + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 616: + /* Element[CHARACTERS[STRING]] */ + case 609: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 458: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 581: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 665: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 607: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 303: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 634: + /* Element[CHARACTERS[DATETIME]] */ + case 85: + /* Element[CHARACTERS[STRING]] */ + case 179: + /* Element[CHARACTERS[STRING]] */ + case 30: + /* Element[CHARACTERS[BOOLEAN]] */ + case 410: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 615: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 638: + /* Element[CHARACTERS[DECIMAL]] */ + case 551: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 606: + /* Element[CHARACTERS[STRING]] */ + case 130: + /* Element[CHARACTERS[ENUMERATION]] */ + case 560: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 125: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 243: + /* Element[CHARACTERS[INTEGER]] */ + case 19: + /* Element[CHARACTERS[INTEGER]] */ + case 692: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 655: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 622: + /* Element[CHARACTERS[STRING]] */ + case 445: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 639: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + case 226: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 618: + /* Element[CHARACTERS[LIST]] */ + case 289: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 646: + /* Element[CHARACTERS[DATETIME]] */ + case 232: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 448: + /* Element[CHARACTERS[STRING]] */ + case 347: + /* Element[CHARACTERS[INTEGER]] */ + case 632: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 450: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 195: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 444: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 677: + /* Element[CHARACTERS[STRING]] */ + case 642: + /* Element[CHARACTERS[STRING]] */ + case 178: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 610: + /* Element[CHARACTERS[STRING]] */ + case 386: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 585: + /* Element[CHARACTERS[STRING]] */ + case 479: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 53: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 346: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 8: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 659: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 657: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 650: + /* Element[CHARACTERS[DATETIME]] */ + case 472: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 679: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 357: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 680: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 678: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 233: + /* Element[CHARACTERS[STRING]] */ + case 661: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 453: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 481: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 84: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 67: + /* Element[CHARACTERS[ENUMERATION]] */ + case 611: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 153: + /* Element[CHARACTERS[INTEGER]] */ + case 676: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 559: + /* StartTag[CHARACTERS[BINARY_BASE64]] */ + case 643: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + case 251: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 344: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 349: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 387: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 624: + /* Element[CHARACTERS[STRING]] */ + case 656: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 15: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 33: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 483: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 352: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 623: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 420: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 50: + /* Element[CHARACTERS[ENUMERATION]] */ + case 649: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 652: + /* Element[CHARACTERS[DATETIME]] */ + case 64: + /* Element[CHARACTERS[ENUMERATION]] */ + case 605: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 168: + /* Element[CHARACTERS[INTEGER]] */ + case 252: + /* Element[CHARACTERS[STRING]] */ + case 498: + /* Element[CHARACTERS[ENUMERATION]] */ + case 108: + /* Element[CHARACTERS[STRING]] */ + case 625: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 518: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 66: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 497: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 447: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 629: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 107: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 663: + /* Element[CHARACTERS[INTEGER]] */ + case 225: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 181: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 13: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 351: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 693: + /* Element[CHARACTERS[ENUMERATION]] */ + case 668: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 664: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 52: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 162: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 630: + /* Element[CHARACTERS[STRING]] */ + case 633: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 647: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 454: + /* Element[CHARACTERS[STRING]] */ + case 365: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 193: + /* Element[CHARACTERS[ENUMERATION]] */ + case 302: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 359: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 451: + /* Element[CHARACTERS[ENUMERATION]] */ + case 335: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 58: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 561: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 316: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 635: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 5: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 681: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_CHARACTERS; + return errn; + case 1: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 315: + /* 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 = EXI_EVENT_START_ELEMENT; + return errn; + case 7: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 8: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 9: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 10: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 396: + /* 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 = EXI_EVENT_ATTRIBUTE; + return errn; + case 2: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 3: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 4: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 5: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 397: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_ATTRIBUTE; + return errn; + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 2: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 3: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 4: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 627: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 73: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_ATTRIBUTE_GENERIC; + return errn; + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 2: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 3: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 4: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 183: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), END_ELEMENT] */ + case 149: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple), END_ELEMENT] */ + case 496: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] */ + case 500: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + case 469: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet), END_ELEMENT] */ + case 194: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amountMultiplier), END_ELEMENT] */ + case 188: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Cost), END_ELEMENT] */ + case 516: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID), END_ELEMENT] */ + case 578: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + case 555: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + case 96: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] */ + case 562: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + case 503: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 373: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + case 566: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), END_ELEMENT] */ + case 99: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] */ + case 580: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + case 466: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceParameterList), END_ELEMENT] */ + case 489: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + case 157: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), END_ELEMENT] */ + case 339: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}duration), END_ELEMENT] */ + case 139: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 514: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService), END_ELEMENT] */ + case 449: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 186: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConsumptionCost), END_ELEMENT] */ + case 532: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow), END_ELEMENT] */ + case 331: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), END_ELEMENT] */ + case 473: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter), END_ELEMENT] */ + case 212: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered), END_ELEMENT] */ + case 238: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 417: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 366: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), END_ELEMENT] */ + case 278: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 154: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariff), END_ELEMENT] */ + case 328: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 83: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID), END_ELEMENT] */ + case 293: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 1: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 2: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + + default: + *nextEvent = EXI_EVENT_ERROR; + return EXI_ERROR_UNEXPECTED_EVENT_LEVEL1; + } + + return EXI_ERROR_UNEXPECTED_EVENT_LEVEL1; +} + +int exiDecodeStartDocument(bitstream_t* stream, exi_state_t* state) { + if ( state->grammarStack[state->stackIndex] == 0 ) { + /* move on */ + state->grammarStack[state->stackIndex] = 1; + return 0; + } + + return EXI_ERROR_UNEXPECTED_START_DOCUMENT; +} + +int exiDecodeEndDocument(bitstream_t* stream, exi_state_t* state) { + if ( state->grammarStack[state->stackIndex] == 2) { + return 0; + } + + return EXI_ERROR_UNEXPECTED_END_DOCUMENT; +} + +static int _exiDecodeStartElement(exi_state_t* state, eqname_t* se, + uint16_t ns, uint16_t ln, uint16_t stackId, uint16_t newState) { + se->namespaceURI = ns; + se->localPart = ln; + /* move on */ + state->grammarStack[state->stackIndex] = stackId; + /* push element on stack */ + return exiPushStack(state, newState, se); +} + + +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:MsgDataTypes}AC_EVChargeParameter), 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: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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), 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_EVStatus), 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}EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Entry), 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({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({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), 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({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), 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:MsgDataTypes}TimeInterval), 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_GENERIC] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 0, 2, 3); + case 1: + return _exiDecodeStartElement(state, se, 6, 2, 2, 25); + case 2: + return _exiDecodeStartElement(state, se, 6, 4, 2, 27); + case 3: + return _exiDecodeStartElement(state, se, 7, 2, 2, 40); + case 4: + return _exiDecodeStartElement(state, se, 5, 2, 2, 42); + case 5: + return _exiDecodeStartElement(state, se, 5, 4, 2, 56); + case 6: + return _exiDecodeStartElement(state, se, 4, 0, 2, 70); + case 7: + return _exiDecodeStartElement(state, se, 5, 6, 2, 76); + case 8: + return _exiDecodeStartElement(state, se, 5, 8, 2, 91); + case 9: + return _exiDecodeStartElement(state, se, 5, 10, 2, 110); + case 10: + return _exiDecodeStartElement(state, se, 5, 12, 2, 117); + case 11: + return _exiDecodeStartElement(state, se, 5, 14, 2, 127); + case 12: + return _exiDecodeStartElement(state, se, 5, 16, 2, 145); + case 13: + return _exiDecodeStartElement(state, se, 5, 21, 2, 220); + case 14: + return _exiDecodeStartElement(state, se, 5, 23, 2, 222); + case 15: + return _exiDecodeStartElement(state, se, 5, 25, 2, 248); + case 16: + return _exiDecodeStartElement(state, se, 5, 27, 2, 254); + case 17: + return _exiDecodeStartElement(state, se, 5, 32, 2, 257); + case 18: + return _exiDecodeStartElement(state, se, 5, 34, 2, 269); + case 19: + return _exiDecodeStartElement(state, se, 6, 18, 2, 132); + case 20: + return _exiDecodeStartElement(state, se, 6, 21, 2, 281); + case 21: + return _exiDecodeStartElement(state, se, 6, 23, 2, 204); + case 22: + return _exiDecodeStartElement(state, se, 6, 25, 2, 61); + case 23: + return _exiDecodeStartElement(state, se, 6, 28, 2, 44); + case 24: + return _exiDecodeStartElement(state, se, 4, 3, 2, 286); + case 25: + return _exiDecodeStartElement(state, se, 4, 5, 2, 297); + case 26: + return _exiDecodeStartElement(state, se, 4, 7, 2, 302); + case 27: + return _exiDecodeStartElement(state, se, 6, 34, 2, 142); + case 28: + return _exiDecodeStartElement(state, se, 6, 45, 2, 304); + case 29: + return _exiDecodeStartElement(state, se, 6, 51, 2, 215); + case 30: + return _exiDecodeStartElement(state, se, 6, 65, 2, 306); + case 31: + return _exiDecodeStartElement(state, se, 6, 69, 2, 308); + case 32: + return _exiDecodeStartElement(state, se, 6, 72, 2, 310); + case 33: + return _exiDecodeStartElement(state, se, 4, 14, 2, 313); + case 34: + return _exiDecodeStartElement(state, se, 4, 16, 2, 316); + case 35: + return _exiDecodeStartElement(state, se, 4, 17, 2, 318); + case 36: + return _exiDecodeStartElement(state, se, 4, 19, 2, 371); + case 37: + return _exiDecodeStartElement(state, se, 5, 60, 2, 383); + case 38: + return _exiDecodeStartElement(state, se, 5, 62, 2, 391); + case 39: + return _exiDecodeStartElement(state, se, 4, 21, 2, 368); + case 40: + return _exiDecodeStartElement(state, se, 4, 23, 2, 395); + case 41: + return _exiDecodeStartElement(state, se, 4, 26, 2, 355); + case 42: + return _exiDecodeStartElement(state, se, 6, 89, 2, 158); + case 43: + return _exiDecodeStartElement(state, se, 5, 65, 2, 402); + case 44: + return _exiDecodeStartElement(state, se, 5, 67, 2, 406); + case 45: + return _exiDecodeStartElement(state, se, 5, 70, 2, 412); + case 46: + return _exiDecodeStartElement(state, se, 5, 72, 2, 426); + case 47: + return _exiDecodeStartElement(state, se, 5, 74, 2, 430); + case 48: + return _exiDecodeStartElement(state, se, 5, 76, 2, 435); + case 49: + return _exiDecodeStartElement(state, se, 4, 32, 2, 320); + case 50: + return _exiDecodeStartElement(state, se, 4, 34, 2, 374); + case 51: + return _exiDecodeStartElement(state, se, 6, 106, 2, 160); + case 52: + return _exiDecodeStartElement(state, se, 4, 36, 2, 326); + case 53: + return _exiDecodeStartElement(state, se, 6, 110, 2, 148); + case 54: + return _exiDecodeStartElement(state, se, 6, 115, 2, 217); + case 55: + return _exiDecodeStartElement(state, se, 4, 38, 2, 363); + case 56: + return _exiDecodeStartElement(state, se, 6, 119, 2, 184); + case 57: + return _exiDecodeStartElement(state, se, 6, 128, 2, 440); + case 58: + return _exiDecodeStartElement(state, se, 5, 88, 2, 461); + case 59: + return _exiDecodeStartElement(state, se, 5, 90, 2, 464); + case 60: + return _exiDecodeStartElement(state, se, 5, 92, 2, 488); + case 61: + return _exiDecodeStartElement(state, se, 5, 94, 2, 492); + case 62: + return _exiDecodeStartElement(state, se, 5, 99, 2, 510); + case 63: + return _exiDecodeStartElement(state, se, 5, 101, 2, 522); + case 64: + return _exiDecodeStartElement(state, se, 5, 105, 2, 525); + case 65: + return _exiDecodeStartElement(state, se, 5, 107, 2, 530); + case 66: + return _exiDecodeStartElement(state, se, 5, 109, 2, 536); + case 67: + return _exiDecodeStartElement(state, se, 5, 110, 2, 538); + case 68: + return _exiDecodeStartElement(state, se, 4, 42, 2, 541); + case 69: + return _exiDecodeStartElement(state, se, 4, 43, 2, 548); + case 70: + return _exiDecodeStartElement(state, se, 4, 45, 2, 564); + case 71: + return _exiDecodeStartElement(state, se, 4, 47, 2, 567); + case 72: + return _exiDecodeStartElement(state, se, 4, 50, 2, 558); + case 73: + return _exiDecodeStartElement(state, se, 4, 52, 2, 544); + case 74: + return _exiDecodeStartElement(state, se, 6, 144, 2, 169); + case 75: + return _exiDecodeStartElement(state, se, 4, 54, 2, 332); + case 76: + return _exiDecodeStartElement(state, se, 4, 56, 2, 330); + case 77: + return _exiDecodeStartElement(state, se, 7, 5, 2, 574); + case 78: + return _exiDecodeStartElement(state, se, 5, 113, 2, 592); + case 79: + return _exiDecodeStartElement(state, se, 5, 115, 2, 595); + case 80: + return _exiDecodeStartElement(state, se, 4, 60, 2, 340); + case 81: + return _exiDecodeStartElement(state, se, 65535, 65535, 2, 73); + } + break; + case 3: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 30, 4, 5); + } + break; + case 4: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EAmount)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 31, 9, 10); + } + break; + case 9: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 40, 21, 10); + } + break; + case 10: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 84, 11, 12); + } + break; + case 11: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 145, 14, 15); + case 1: + return _exiDecodeStartElement(state, se, 6, 146, 17, 18); + } + break; + case 14: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 146, 17, 18); + } + break; + case 20: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 84, 11, 12); + } + break; + case 21: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 39, 22, 10); + } + break; + case 22: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMinCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 44, 23, 10); + } + break; + case 24: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 30, 4, 5); + } + break; + case 25: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 4, 26, 27); + } + break; + case 26: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 57, 36, 10); + } + break; + case 27: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 102, 28, 29); + } + break; + case 28: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 105, 31, 29); + } + break; + case 31: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 138, 32, 33); + } + break; + case 32: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}StopCharging)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 140, 34, 29); + } + break; + case 35: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 102, 28, 29); + } + break; + case 36: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 56, 37, 10); + } + break; + case 37: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 61, 38, 10); + } + break; + case 39: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 4, 26, 27); + } + break; + case 42: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 37, 43, 44); + } + break; + case 44: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 49, 45, 29); + } + break; + case 45: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVCabinConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 33, 46, 29); + case 1: + return _exiDecodeStartElement(state, se, 6, 47, 47, 29); + case 2: + return _exiDecodeStartElement(state, se, 6, 38, 48, 49); + } + break; + case 46: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 47, 47, 29); + case 1: + return _exiDecodeStartElement(state, se, 6, 38, 48, 49); + } + break; + case 47: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 38, 48, 49); + } + break; + case 48: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSSOC)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 48, 51, 52); + } + break; + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 49, 45, 29); + } + break; + case 55: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 37, 43, 44); + } + break; + case 56: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 57, 58); + } + break; + case 57: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 36, 60, 61); + } + break; + case 61: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 55, 62, 63); + case 1: + return _exiDecodeStartElement(state, se, 6, 66, 65, 66); + } + break; + case 62: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 66, 65, 66); + } + break; + case 68: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 55, 62, 63); + case 1: + return _exiDecodeStartElement(state, se, 6, 66, 65, 66); + } + break; + case 69: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 57, 58); + } + break; + case 71: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 72, 73); + } + break; + case 72: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 72, 73); + } + break; + case 73: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 602, 73); + } + break; + case 74: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 72, 73); + } + break; + case 75: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 72, 73); + } + break; + case 76: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 5, 64, 78, 79); + } + break; + case 77: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 64, 78, 79); + } + break; + case 78: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 58, 81, 82); + } + break; + case 81: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 38, 87, 88); + } + break; + case 82: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 108, 83, 84); + } + break; + case 83: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 108, 83, 84); + } + break; + case 86: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 108, 83, 84); + } + break; + case 90: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 64, 78, 79); + } + break; + case 92: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 93, 58); + } + break; + case 93: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 30, 94, 95); + } + break; + case 94: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 31, 102, 103); + } + break; + case 95: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 8, 96, 79); + } + break; + case 96: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 141, 97, 98); + } + break; + case 98: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 8, 99, 79); + } + break; + case 99: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 8, 99, 79); + } + break; + case 100: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 8, 99, 79); + } + break; + case 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 8, 96, 79); + } + break; + case 102: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 38, 105, 88); + } + break; + case 105: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 29, 106, 107); + } + break; + case 109: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 93, 58); + } + break; + case 110: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 5, 30, 112, 95); + } + break; + case 111: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 30, 112, 95); + } + break; + case 112: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 29, 113, 107); + } + break; + case 113: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 58, 114, 82); + } + break; + case 114: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 38, 115, 88); + } + break; + case 116: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 30, 112, 95); + } + break; + case 118: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 119, 58); + } + break; + case 119: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 30, 120, 95); + } + break; + case 120: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 31, 121, 103); + } + break; + case 121: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 38, 122, 88); + } + break; + case 122: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 29, 123, 107); + } + break; + case 123: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RetryCounter)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 83, 124, 125); + } + break; + case 126: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 119, 58); + } + break; + case 127: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 44, 128, 129); + } + break; + case 128: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVChargeParameter)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 0, 131, 3); + case 1: + return _exiDecodeStartElement(state, se, 6, 18, 131, 132); + case 2: + return _exiDecodeStartElement(state, se, 6, 34, 131, 142); + } + break; + case 132: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 28, 133, 44); + } + break; + case 133: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumCurrentLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 41, 134, 10); + } + break; + case 134: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 42, 135, 10); + case 1: + return _exiDecodeStartElement(state, se, 6, 43, 136, 10); + } + break; + case 135: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 43, 136, 10); + } + break; + case 136: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 36, 137, 10); + case 1: + return _exiDecodeStartElement(state, se, 6, 37, 138, 10); + case 2: + return _exiDecodeStartElement(state, se, 6, 77, 139, 52); + case 3: + return _exiDecodeStartElement(state, se, 6, 7, 140, 52); + } + break; + case 137: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 37, 138, 10); + case 1: + return _exiDecodeStartElement(state, se, 6, 77, 139, 52); + case 2: + return _exiDecodeStartElement(state, se, 6, 7, 140, 52); + } + break; + case 138: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 77, 139, 52); + case 1: + return _exiDecodeStartElement(state, se, 6, 7, 140, 52); + } + break; + case 139: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 7, 140, 52); + } + break; + case 141: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 28, 133, 44); + } + break; + case 144: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 44, 128, 129); + } + break; + case 145: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 146, 58); + } + break; + case 146: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules), 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, 110, 147, 148); + case 1: + return _exiDecodeStartElement(state, se, 6, 115, 147, 217); + case 2: + return _exiDecodeStartElement(state, se, 6, 2, 203, 25); + case 3: + return _exiDecodeStartElement(state, se, 6, 23, 203, 204); + case 4: + return _exiDecodeStartElement(state, se, 6, 51, 203, 215); + } + break; + case 147: + /* 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, 2, 203, 25); + case 1: + return _exiDecodeStartElement(state, se, 6, 23, 203, 204); + case 2: + return _exiDecodeStartElement(state, se, 6, 51, 203, 215); + } + break; + case 148: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 112, 149, 150); + } + break; + case 149: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 112, 149, 150); + } + break; + case 150: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 113, 151, 152); + } + break; + case 151: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxSchedule)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 88, 154, 155); + } + break; + case 154: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariff), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 117, 173, 174); + } + break; + case 155: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 91, 156, 152); + } + break; + case 156: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 89, 157, 158); + } + break; + case 157: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 89, 157, 158); + } + break; + case 158: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 106, 159, 160); + case 1: + return _exiDecodeStartElement(state, se, 6, 144, 159, 169); + } + break; + case 159: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMax)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 87, 166, 167); + } + break; + case 160: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 179, 161, 162); + } + break; + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}duration), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 156, 163, 164); + } + break; + case 165: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 179, 161, 162); + } + break; + case 171: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 106, 159, 160); + case 1: + return _exiDecodeStartElement(state, se, 6, 144, 159, 169); + } + break; + case 172: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 91, 156, 152); + } + break; + case 175: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 121, 176, 152); + } + break; + case 176: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 118, 177, 178); + case 1: + return _exiDecodeStartElement(state, se, 6, 86, 180, 181); + } + break; + case 177: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 86, 180, 181); + } + break; + case 180: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 119, 183, 184); + } + break; + case 183: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 119, 183, 184); + } + break; + case 184: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 106, 185, 160); + case 1: + return _exiDecodeStartElement(state, se, 6, 144, 185, 169); + } + break; + case 185: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceLevel)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 32, 186, 181); + } + break; + case 186: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConsumptionCost), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 14, 186, 187); + } + break; + case 187: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 180, 188, 189); + } + break; + case 188: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Cost), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 16, 188, 190); + } + break; + case 190: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 153, 191, 192); + } + break; + case 191: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amount)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 147, 194, 195); + } + break; + case 194: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amountMultiplier), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 148, 196, 12); + } + break; + case 197: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 153, 191, 192); + } + break; + case 198: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 180, 188, 189); + } + break; + case 199: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 106, 185, 160); + case 1: + return _exiDecodeStartElement(state, se, 6, 144, 185, 169); + } + break; + case 200: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 121, 176, 152); + } + break; + case 201: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 113, 151, 152); + } + break; + case 202: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 112, 149, 150); + } + break; + case 204: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 25, 205, 61); + } + break; + case 205: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 58, 206, 10); + } + break; + case 206: + /* 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, 59, 207, 10); + case 1: + return _exiDecodeStartElement(state, se, 6, 60, 208, 10); + } + break; + case 207: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 60, 208, 10); + } + break; + case 208: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 62, 209, 10); + } + break; + case 209: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 63, 210, 10); + } + break; + case 210: + /* 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, 53, 211, 10); + case 1: + return _exiDecodeStartElement(state, se, 6, 64, 212, 10); + } + break; + case 211: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 64, 212, 10); + } + break; + case 212: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 54, 213, 10); + } + break; + case 214: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 25, 205, 61); + } + break; + case 219: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 146, 58); + } + break; + case 222: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 223, 58); + } + break; + case 223: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 46, 224, 225); + } + break; + case 224: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 84, 227, 152); + case 1: + return _exiDecodeStartElement(state, se, 5, 47, 228, 10); + case 2: + return _exiDecodeStartElement(state, se, 5, 59, 229, 230); + case 3: + return _exiDecodeStartElement(state, se, 5, 79, 245, 29); + } + break; + case 227: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 47, 228, 10); + case 1: + return _exiDecodeStartElement(state, se, 5, 59, 229, 230); + case 2: + return _exiDecodeStartElement(state, se, 5, 79, 245, 29); + } + break; + case 228: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 59, 229, 230); + case 1: + return _exiDecodeStartElement(state, se, 5, 79, 245, 29); + } + break; + case 229: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 79, 245, 29); + } + break; + case 230: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 80, 231, 232); + } + break; + case 231: + /* 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, 82, 234, 10); + case 1: + return _exiDecodeStartElement(state, se, 6, 139, 235, 236); + case 2: + return _exiDecodeStartElement(state, se, 6, 83, 238, 239); + case 3: + return _exiDecodeStartElement(state, se, 6, 143, 241, 242); + } + break; + case 234: + /* 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, 139, 235, 236); + case 1: + return _exiDecodeStartElement(state, se, 6, 83, 238, 239); + case 2: + return _exiDecodeStartElement(state, se, 6, 143, 241, 242); + } + break; + case 235: + /* 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, 83, 238, 239); + case 1: + return _exiDecodeStartElement(state, se, 6, 143, 241, 242); + } + break; + case 238: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 143, 241, 242); + } + break; + case 244: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 80, 231, 232); + } + break; + case 245: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 0, 246, 27); + } + break; + case 247: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 223, 58); + } + break; + case 249: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 57, 250, 251); + } + break; + case 253: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 57, 250, 251); + } + break; + case 254: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 255, 58); + } + break; + case 256: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 255, 58); + } + break; + case 257: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 37, 258, 44); + } + break; + case 258: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 55, 259, 10); + } + break; + case 259: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), 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, 43, 260, 10); + case 1: + return _exiDecodeStartElement(state, se, 5, 41, 261, 10); + case 2: + return _exiDecodeStartElement(state, se, 5, 42, 262, 10); + case 3: + return _exiDecodeStartElement(state, se, 5, 1, 263, 29); + case 4: + return _exiDecodeStartElement(state, se, 5, 19, 264, 29); + } + break; + case 260: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), 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, 41, 261, 10); + case 1: + return _exiDecodeStartElement(state, se, 5, 42, 262, 10); + case 2: + return _exiDecodeStartElement(state, se, 5, 1, 263, 29); + case 3: + return _exiDecodeStartElement(state, se, 5, 19, 264, 29); + } + break; + case 261: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), 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, 42, 262, 10); + case 1: + return _exiDecodeStartElement(state, se, 5, 1, 263, 29); + case 2: + return _exiDecodeStartElement(state, se, 5, 19, 264, 29); + } + break; + case 262: + /* 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, 1, 263, 29); + case 1: + return _exiDecodeStartElement(state, se, 5, 19, 264, 29); + } + break; + case 263: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 19, 264, 29); + } + break; + case 264: + /* 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}EVTargetVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 81, 265, 10); + case 1: + return _exiDecodeStartElement(state, se, 5, 80, 266, 10); + case 2: + return _exiDecodeStartElement(state, se, 5, 56, 267, 10); + } + break; + case 265: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 80, 266, 10); + case 1: + return _exiDecodeStartElement(state, se, 5, 56, 267, 10); + } + break; + case 266: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 56, 267, 10); + } + break; + case 268: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 37, 258, 44); + } + break; + case 269: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 270, 58); + } + break; + case 270: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 36, 271, 61); + } + break; + case 271: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 53, 272, 10); + } + break; + case 272: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 52, 273, 10); + } + break; + case 273: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 45, 274, 29); + } + break; + case 274: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 54, 275, 29); + } + break; + case 275: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 51, 276, 29); + } + break; + case 276: + /* 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, 50, 277, 10); + case 1: + return _exiDecodeStartElement(state, se, 5, 48, 278, 10); + case 2: + return _exiDecodeStartElement(state, se, 5, 49, 279, 10); + } + break; + case 277: + /* 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, 48, 278, 10); + case 1: + return _exiDecodeStartElement(state, se, 5, 49, 279, 10); + } + break; + case 278: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 49, 279, 10); + } + break; + case 280: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 270, 58); + } + break; + case 281: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 28, 282, 44); + } + break; + case 282: + /* 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, 6, 283, 29); + case 1: + return _exiDecodeStartElement(state, se, 6, 10, 284, 29); + } + break; + case 283: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 10, 284, 29); + } + break; + case 285: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 28, 282, 44); + } + break; + case 286: + /* 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, 287, 288); + case 1: + return _exiDecodeStartElement(state, se, 4, 10, 291, 288); + case 2: + return _exiDecodeStartElement(state, se, 4, 69, 292, 288); + } + break; + case 287: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 31, 290, 288); + } + break; + case 290: + /* 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, 291, 288); + case 1: + return _exiDecodeStartElement(state, se, 4, 69, 292, 288); + } + break; + case 291: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 69, 292, 288); + } + break; + case 292: + /* 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, 293, 288); + case 1: + return _exiDecodeStartElement(state, se, 4, 41, 294, 288); + } + break; + case 293: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 41, 294, 288); + } + break; + case 294: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 30, 295, 288); + } + break; + case 296: + /* Element[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, 287, 288); + case 1: + return _exiDecodeStartElement(state, se, 4, 10, 291, 288); + case 2: + return _exiDecodeStartElement(state, se, 4, 69, 292, 288); + } + break; + case 298: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 299, 73); + } + break; + case 299: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 299, 73); + } + break; + case 300: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 299, 73); + } + break; + case 301: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 299, 73); + } + break; + case 310: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 106, 311, 160); + case 1: + return _exiDecodeStartElement(state, se, 6, 144, 311, 169); + } + break; + case 312: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 106, 311, 160); + case 1: + return _exiDecodeStartElement(state, se, 6, 144, 311, 169); + } + break; + case 313: + /* 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, 315, 316); + case 2: + return _exiDecodeStartElement(state, se, 4, 17, 315, 318); + case 3: + return _exiDecodeStartElement(state, se, 4, 36, 315, 326); + case 4: + return _exiDecodeStartElement(state, se, 4, 60, 315, 340); + case 5: + return _exiDecodeStartElement(state, se, 4, 26, 315, 355); + case 6: + return _exiDecodeStartElement(state, se, 4, 38, 315, 363); + case 7: + return _exiDecodeStartElement(state, se, 4, 21, 315, 368); + case 8: + return _exiDecodeStartElement(state, se, 65535, 65535, 315, 73); + } + break; + case 314: + /* 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, 315, 316); + case 1: + return _exiDecodeStartElement(state, se, 4, 17, 315, 318); + case 2: + return _exiDecodeStartElement(state, se, 4, 36, 315, 326); + case 3: + return _exiDecodeStartElement(state, se, 4, 60, 315, 340); + case 4: + return _exiDecodeStartElement(state, se, 4, 26, 315, 355); + case 5: + return _exiDecodeStartElement(state, se, 4, 38, 315, 363); + case 6: + return _exiDecodeStartElement(state, se, 4, 21, 315, 368); + case 7: + return _exiDecodeStartElement(state, se, 65535, 65535, 315, 73); + } + break; + case 315: + /* 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, 315, 316); + case 1: + return _exiDecodeStartElement(state, se, 4, 17, 315, 318); + case 2: + return _exiDecodeStartElement(state, se, 4, 36, 315, 326); + case 3: + return _exiDecodeStartElement(state, se, 4, 60, 315, 340); + case 4: + return _exiDecodeStartElement(state, se, 4, 26, 315, 355); + case 5: + return _exiDecodeStartElement(state, se, 4, 38, 315, 363); + case 6: + return _exiDecodeStartElement(state, se, 4, 21, 315, 368); + case 7: + return _exiDecodeStartElement(state, se, 65535, 65535, 315, 73); + } + break; + case 318: + /* 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, 319, 286); + case 1: + return _exiDecodeStartElement(state, se, 4, 32, 319, 320); + case 2: + return _exiDecodeStartElement(state, se, 65535, 65535, 319, 73); + } + break; + case 320: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 22, 321, 288); + } + break; + case 321: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 9, 322, 288); + } + break; + case 323: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 22, 321, 288); + } + break; + case 324: + /* 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, 319, 286); + case 1: + return _exiDecodeStartElement(state, se, 4, 32, 319, 320); + case 2: + return _exiDecodeStartElement(state, se, 65535, 65535, 319, 73); + } + break; + case 325: + /* 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, 319, 286); + case 1: + return _exiDecodeStartElement(state, se, 4, 32, 319, 320); + case 2: + return _exiDecodeStartElement(state, se, 65535, 65535, 319, 73); + } + break; + case 326: + /* 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, 329, 330); + } + break; + case 327: + /* 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, 329, 330); + } + break; + case 328: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 56, 329, 330); + } + break; + case 330: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 54, 331, 332); + } + break; + case 331: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 54, 331, 332); + } + break; + case 333: + /* 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, 334, 335); + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 334, 73); + } + break; + case 334: + /* 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, 334, 335); + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 334, 73); + } + break; + case 336: + /* 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, 334, 335); + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 334, 73); + } + break; + case 337: + /* 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, 334, 335); + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 334, 73); + } + break; + case 338: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 54, 331, 332); + } + break; + case 339: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 56, 329, 330); + } + break; + case 340: + /* 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, 341, 342); + case 1: + return _exiDecodeStartElement(state, se, 4, 65, 341, 349); + case 2: + return _exiDecodeStartElement(state, se, 4, 67, 341, 351); + case 3: + return _exiDecodeStartElement(state, se, 4, 59, 341, 352); + case 4: + return _exiDecodeStartElement(state, se, 4, 58, 341, 353); + case 5: + return _exiDecodeStartElement(state, se, 65535, 65535, 341, 73); + } + break; + case 341: + /* 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, 341, 342); + case 1: + return _exiDecodeStartElement(state, se, 4, 65, 341, 349); + case 2: + return _exiDecodeStartElement(state, se, 4, 67, 341, 351); + case 3: + return _exiDecodeStartElement(state, se, 4, 59, 341, 352); + case 4: + return _exiDecodeStartElement(state, se, 4, 58, 341, 353); + case 5: + return _exiDecodeStartElement(state, se, 65535, 65535, 341, 73); + } + break; + case 342: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 62, 343, 344); + } + break; + case 343: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 66, 345, 346); + } + break; + case 348: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 62, 343, 344); + } + break; + case 354: + /* 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] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 63, 341, 342); + case 1: + return _exiDecodeStartElement(state, se, 4, 65, 341, 349); + case 2: + return _exiDecodeStartElement(state, se, 4, 67, 341, 351); + case 3: + return _exiDecodeStartElement(state, se, 4, 59, 341, 352); + case 4: + return _exiDecodeStartElement(state, se, 4, 58, 341, 353); + case 5: + return _exiDecodeStartElement(state, se, 65535, 65535, 341, 73); + } + break; + case 355: + /* 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, 356, 357); + case 1: + return _exiDecodeStartElement(state, se, 4, 29, 360, 361); + } + break; + case 356: + /* 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, 358, 359); + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 358, 73); + } + break; + case 358: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 358, 73); + } + break; + case 360: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 360, 73); + } + break; + case 362: + /* Element[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, 356, 357); + case 1: + return _exiDecodeStartElement(state, se, 4, 29, 360, 361); + } + break; + case 363: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 40, 364, 365); + } + break; + case 364: + /* 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, 364, 365); + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 366, 73); + } + break; + case 366: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 40, 364, 365); + } + break; + case 367: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 40, 364, 365); + } + break; + case 369: + /* 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, 315, 316); + case 1: + return _exiDecodeStartElement(state, se, 4, 17, 315, 318); + case 2: + return _exiDecodeStartElement(state, se, 4, 36, 315, 326); + case 3: + return _exiDecodeStartElement(state, se, 4, 60, 315, 340); + case 4: + return _exiDecodeStartElement(state, se, 4, 26, 315, 355); + case 5: + return _exiDecodeStartElement(state, se, 4, 38, 315, 363); + case 6: + return _exiDecodeStartElement(state, se, 4, 21, 315, 368); + case 7: + return _exiDecodeStartElement(state, se, 65535, 65535, 315, 73); + } + break; + case 370: + /* 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, 315, 316); + case 1: + return _exiDecodeStartElement(state, se, 4, 17, 315, 318); + case 2: + return _exiDecodeStartElement(state, se, 4, 36, 315, 326); + case 3: + return _exiDecodeStartElement(state, se, 4, 60, 315, 340); + case 4: + return _exiDecodeStartElement(state, se, 4, 26, 315, 355); + case 5: + return _exiDecodeStartElement(state, se, 4, 38, 315, 363); + case 6: + return _exiDecodeStartElement(state, se, 4, 21, 315, 368); + case 7: + return _exiDecodeStartElement(state, se, 65535, 65535, 315, 73); + } + break; + case 371: + /* 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, 373, 374); + } + break; + case 372: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 34, 373, 374); + } + break; + case 373: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 34, 373, 374); + } + break; + case 374: + /* 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, 378, 330); + case 4: + return _exiDecodeStartElement(state, se, 4, 5, 379, 297); + } + break; + case 375: + /* 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, 378, 330); + case 3: + return _exiDecodeStartElement(state, se, 4, 5, 379, 297); + } + break; + case 376: + /* 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, 378, 330); + case 2: + return _exiDecodeStartElement(state, se, 4, 5, 379, 297); + } + break; + case 377: + /* 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, 378, 330); + case 1: + return _exiDecodeStartElement(state, se, 4, 5, 379, 297); + } + break; + case 378: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 5, 379, 297); + } + break; + case 379: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 7, 380, 302); + } + break; + case 381: + /* Element[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, 378, 330); + case 1: + return _exiDecodeStartElement(state, se, 4, 5, 379, 297); + } + break; + case 382: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 34, 373, 374); + } + break; + case 383: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 5, 104, 385, 386); + } + break; + case 384: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 104, 385, 386); + } + break; + case 385: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 84, 388, 152); + case 1: + return _exiDecodeStartElement(state, se, 5, 59, 389, 230); + } + break; + case 388: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 59, 389, 230); + } + break; + case 390: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 104, 385, 386); + } + break; + case 391: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 392, 58); + } + break; + case 392: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 0, 393, 27); + } + break; + case 394: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 392, 58); + } + break; + case 395: + /* 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, 65535, 65535, 399, 73); + } + break; + case 396: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 2: + return _exiDecodeStartElement(state, se, 65535, 65535, 399, 73); + } + break; + case 397: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 399, 73); + } + break; + case 398: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 399, 73); + } + break; + case 399: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 399, 73); + } + break; + case 400: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 399, 73); + } + break; + case 401: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 399, 73); + } + break; + case 402: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 29, 403, 107); + } + break; + case 403: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 30, 404, 95); + } + break; + case 405: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 29, 403, 107); + } + break; + case 406: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 407, 58); + } + break; + case 407: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 57, 408, 251); + } + break; + case 408: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 39, 409, 410); + } + break; + case 411: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 407, 58); + } + break; + case 412: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 78, 413, 29); + } + break; + case 413: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 20, 414, 415); + case 1: + return _exiDecodeStartElement(state, se, 6, 21, 424, 281); + case 2: + return _exiDecodeStartElement(state, se, 6, 45, 424, 304); + } + break; + case 414: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 21, 424, 281); + case 1: + return _exiDecodeStartElement(state, se, 6, 45, 424, 304); + } + break; + case 415: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 113, 416, 152); + } + break; + case 416: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 103, 417, 418); + } + 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, 103, 417, 418); + } + break; + case 418: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 12, 419, 420); + } + break; + case 419: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 11, 421, 167); + } + break; + case 422: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 12, 419, 420); + } + break; + case 423: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 113, 416, 152); + } + break; + case 425: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 78, 413, 29); + } + break; + case 426: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 427, 58); + } + break; + case 427: + /* 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, 4, 428, 27); + case 1: + return _exiDecodeStartElement(state, se, 6, 25, 428, 61); + case 2: + return _exiDecodeStartElement(state, se, 6, 65, 428, 306); + } + break; + case 429: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 427, 58); + } + break; + case 430: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 37, 431, 44); + } + break; + case 431: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 56, 432, 10); + } + break; + case 432: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 55, 433, 10); + } + break; + case 434: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 37, 431, 44); + } + break; + case 435: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 436, 58); + } + break; + case 436: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 36, 437, 61); + } + break; + case 437: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 53, 438, 10); + } + break; + case 439: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 436, 58); + } + break; + case 440: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 134, 441, 442); + } + break; + case 441: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 76, 456, 29); + } + break; + case 442: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 130, 443, 444); + } + break; + case 443: + /* 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, 131, 446, 447); + case 1: + return _exiDecodeStartElement(state, se, 6, 127, 449, 450); + case 2: + return _exiDecodeStartElement(state, se, 6, 133, 452, 453); + } + break; + case 446: + /* 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, 127, 449, 450); + case 1: + return _exiDecodeStartElement(state, se, 6, 133, 452, 453); + } + break; + case 449: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 133, 452, 453); + } + break; + case 455: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 130, 443, 444); + } + break; + case 456: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 71, 457, 458); + } + break; + case 460: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 134, 441, 442); + } + break; + case 461: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 96, 462, 444); + } + break; + case 463: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 96, 462, 444); + } + break; + case 464: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 465, 58); + } + break; + case 465: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 96, 466, 444); + } + break; + case 466: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceParameterList), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 98, 467, 468); + } + break; + case 468: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 95, 469, 470); + } + break; + case 469: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 95, 469, 470); + } + break; + case 470: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 96, 471, 472); + } + break; + case 471: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 94, 473, 474); + } + break; + case 473: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 94, 473, 474); + } + break; + case 476: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 149, 477, 29); + case 1: + return _exiDecodeStartElement(state, se, 6, 150, 477, 478); + case 2: + return _exiDecodeStartElement(state, se, 6, 177, 477, 480); + case 3: + return _exiDecodeStartElement(state, se, 6, 162, 477, 481); + case 4: + return _exiDecodeStartElement(state, se, 6, 168, 477, 10); + case 5: + return _exiDecodeStartElement(state, se, 6, 181, 477, 483); + } + break; + case 484: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 149, 477, 29); + case 1: + return _exiDecodeStartElement(state, se, 6, 150, 477, 478); + case 2: + return _exiDecodeStartElement(state, se, 6, 177, 477, 480); + case 3: + return _exiDecodeStartElement(state, se, 6, 162, 477, 481); + case 4: + return _exiDecodeStartElement(state, se, 6, 168, 477, 10); + case 5: + return _exiDecodeStartElement(state, se, 6, 181, 477, 483); + } + break; + case 485: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 96, 471, 472); + } + break; + case 486: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 95, 469, 470); + } + break; + case 487: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 465, 58); + } + break; + case 488: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 103, 489, 453); + case 1: + return _exiDecodeStartElement(state, se, 5, 87, 490, 450); + } + break; + case 489: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 87, 490, 450); + } + break; + case 491: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 103, 489, 453); + case 1: + return _exiDecodeStartElement(state, se, 5, 87, 490, 450); + } + break; + case 492: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 493, 58); + } + break; + case 493: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 69, 494, 495); + } + break; + case 494: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeService)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 18, 500, 440); + } + break; + case 495: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 99, 496, 497); + } + break; + case 496: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 99, 496, 497); + } + break; + case 499: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 99, 496, 497); + } + break; + case 500: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 97, 501, 502); + } + break; + case 502: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 126, 503, 504); + } + break; + case 503: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 126, 503, 504); + } + break; + case 504: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 134, 505, 442); + } + break; + case 505: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 76, 506, 29); + } + break; + case 507: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 134, 505, 442); + } + break; + case 508: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 126, 503, 504); + } + break; + case 509: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 493, 58); + } + break; + case 510: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 85, 511, 497); + } + break; + case 511: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedServiceList)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 86, 512, 513); + } + break; + case 513: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 123, 514, 515); + } + break; + case 514: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 123, 514, 515); + } + break; + case 515: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 130, 516, 444); + } + break; + case 516: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 96, 517, 518); + } + break; + case 519: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 130, 516, 444); + } + break; + case 520: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 123, 514, 515); + } + break; + case 521: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 85, 511, 497); + } + break; + case 522: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 523, 58); + } + break; + case 524: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 523, 58); + } + break; + case 525: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 40, 526, 527); + } + break; + case 529: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 40, 526, 527); + } + break; + case 530: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 531, 58); + } + break; + case 531: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 46, 532, 225); + } + break; + case 532: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 39, 533, 534); + } + break; + case 535: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 531, 58); + } + break; + case 538: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 539, 58); + } + break; + case 540: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 539, 58); + } + break; + case 541: + /* 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, 543, 544); + } + break; + case 542: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 52, 543, 544); + } + break; + case 543: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 50, 557, 558); + } + break; + case 544: + /* 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, 546, 70); + } + break; + case 545: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 0, 546, 70); + } + break; + case 546: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 43, 547, 548); + } + break; + case 547: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 34, 555, 374); + } + break; + case 549: + /* 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, 550, 551); + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 550, 73); + } + break; + case 550: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 550, 73); + } + break; + case 553: + /* 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, 550, 551); + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 550, 73); + } + break; + case 554: + /* 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, 550, 551); + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 550, 73); + } + break; + case 555: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 34, 555, 374); + } + break; + case 556: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 0, 546, 70); + } + break; + case 557: + /* 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, 562, 313); + case 1: + return _exiDecodeStartElement(state, se, 4, 23, 562, 395); + } + break; + case 562: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 23, 562, 395); + } + break; + case 563: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 52, 543, 544); + } + break; + case 564: + /* 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, 566, 567); + } + break; + case 565: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 47, 566, 567); + } + break; + case 566: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 47, 566, 567); + } + break; + case 569: + /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 570, 73); + } + break; + case 570: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 570, 73); + } + break; + case 571: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 570, 73); + } + break; + case 572: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 570, 73); + } + break; + case 573: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 47, 566, 567); + } + break; + case 574: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 7, 4, 575, 576); + } + break; + case 575: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 7, 0, 589, 590); + } + break; + case 576: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 8, 2, 577, 386); + } + break; + case 577: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 8, 1, 578, 579); + case 1: + return _exiDecodeStartElement(state, se, 4, 42, 587, 541); + } + break; + case 578: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 42, 587, 541); + } + break; + case 579: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 74, 580, 581); + } + break; + case 580: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 75, 583, 584); + } + break; + case 586: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 74, 580, 581); + } + break; + case 588: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 8, 2, 577, 386); + } + break; + case 590: + /* 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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), 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, 591, 40); + case 1: + return _exiDecodeStartElement(state, se, 5, 2, 591, 42); + case 2: + return _exiDecodeStartElement(state, se, 5, 4, 591, 56); + case 3: + return _exiDecodeStartElement(state, se, 5, 6, 591, 76); + case 4: + return _exiDecodeStartElement(state, se, 5, 8, 591, 91); + case 5: + return _exiDecodeStartElement(state, se, 5, 10, 591, 110); + case 6: + return _exiDecodeStartElement(state, se, 5, 12, 591, 117); + case 7: + return _exiDecodeStartElement(state, se, 5, 14, 591, 127); + case 8: + return _exiDecodeStartElement(state, se, 5, 16, 591, 145); + case 9: + return _exiDecodeStartElement(state, se, 5, 21, 591, 220); + case 10: + return _exiDecodeStartElement(state, se, 5, 23, 591, 222); + case 11: + return _exiDecodeStartElement(state, se, 5, 25, 591, 248); + case 12: + return _exiDecodeStartElement(state, se, 5, 27, 591, 254); + case 13: + return _exiDecodeStartElement(state, se, 5, 32, 591, 257); + case 14: + return _exiDecodeStartElement(state, se, 5, 34, 591, 269); + case 15: + return _exiDecodeStartElement(state, se, 5, 60, 591, 383); + case 16: + return _exiDecodeStartElement(state, se, 5, 62, 591, 391); + case 17: + return _exiDecodeStartElement(state, se, 5, 65, 591, 402); + case 18: + return _exiDecodeStartElement(state, se, 5, 67, 591, 406); + case 19: + return _exiDecodeStartElement(state, se, 5, 70, 591, 412); + case 20: + return _exiDecodeStartElement(state, se, 5, 72, 591, 426); + case 21: + return _exiDecodeStartElement(state, se, 5, 74, 591, 430); + case 22: + return _exiDecodeStartElement(state, se, 5, 76, 591, 435); + case 23: + return _exiDecodeStartElement(state, se, 5, 88, 591, 461); + case 24: + return _exiDecodeStartElement(state, se, 5, 90, 591, 464); + case 25: + return _exiDecodeStartElement(state, se, 5, 92, 591, 488); + case 26: + return _exiDecodeStartElement(state, se, 5, 94, 591, 492); + case 27: + return _exiDecodeStartElement(state, se, 5, 99, 591, 510); + case 28: + return _exiDecodeStartElement(state, se, 5, 101, 591, 522); + case 29: + return _exiDecodeStartElement(state, se, 5, 105, 591, 525); + case 30: + return _exiDecodeStartElement(state, se, 5, 107, 591, 530); + case 31: + return _exiDecodeStartElement(state, se, 5, 109, 591, 536); + case 32: + return _exiDecodeStartElement(state, se, 5, 110, 591, 538); + case 33: + return _exiDecodeStartElement(state, se, 5, 113, 591, 592); + case 34: + return _exiDecodeStartElement(state, se, 5, 115, 591, 595); + } + break; + case 592: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 37, 593, 44); + } + break; + case 594: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 37, 593, 44); + } + break; + case 595: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 596, 58); + } + break; + case 596: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 36, 597, 61); + } + break; + case 597: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 53, 598, 10); + } + break; + case 599: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 5, 82, 596, 58); + } + break; + case 600: + /* Element[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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), 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, 591, 40); + case 1: + return _exiDecodeStartElement(state, se, 5, 2, 591, 42); + case 2: + return _exiDecodeStartElement(state, se, 5, 4, 591, 56); + case 3: + return _exiDecodeStartElement(state, se, 5, 6, 591, 76); + case 4: + return _exiDecodeStartElement(state, se, 5, 8, 591, 91); + case 5: + return _exiDecodeStartElement(state, se, 5, 10, 591, 110); + case 6: + return _exiDecodeStartElement(state, se, 5, 12, 591, 117); + case 7: + return _exiDecodeStartElement(state, se, 5, 14, 591, 127); + case 8: + return _exiDecodeStartElement(state, se, 5, 16, 591, 145); + case 9: + return _exiDecodeStartElement(state, se, 5, 21, 591, 220); + case 10: + return _exiDecodeStartElement(state, se, 5, 23, 591, 222); + case 11: + return _exiDecodeStartElement(state, se, 5, 25, 591, 248); + case 12: + return _exiDecodeStartElement(state, se, 5, 27, 591, 254); + case 13: + return _exiDecodeStartElement(state, se, 5, 32, 591, 257); + case 14: + return _exiDecodeStartElement(state, se, 5, 34, 591, 269); + case 15: + return _exiDecodeStartElement(state, se, 5, 60, 591, 383); + case 16: + return _exiDecodeStartElement(state, se, 5, 62, 591, 391); + case 17: + return _exiDecodeStartElement(state, se, 5, 65, 591, 402); + case 18: + return _exiDecodeStartElement(state, se, 5, 67, 591, 406); + case 19: + return _exiDecodeStartElement(state, se, 5, 70, 591, 412); + case 20: + return _exiDecodeStartElement(state, se, 5, 72, 591, 426); + case 21: + return _exiDecodeStartElement(state, se, 5, 74, 591, 430); + case 22: + return _exiDecodeStartElement(state, se, 5, 76, 591, 435); + case 23: + return _exiDecodeStartElement(state, se, 5, 88, 591, 461); + case 24: + return _exiDecodeStartElement(state, se, 5, 90, 591, 464); + case 25: + return _exiDecodeStartElement(state, se, 5, 92, 591, 488); + case 26: + return _exiDecodeStartElement(state, se, 5, 94, 591, 492); + case 27: + return _exiDecodeStartElement(state, se, 5, 99, 591, 510); + case 28: + return _exiDecodeStartElement(state, se, 5, 101, 591, 522); + case 29: + return _exiDecodeStartElement(state, se, 5, 105, 591, 525); + case 30: + return _exiDecodeStartElement(state, se, 5, 107, 591, 530); + case 31: + return _exiDecodeStartElement(state, se, 5, 109, 591, 536); + case 32: + return _exiDecodeStartElement(state, se, 5, 110, 591, 538); + case 33: + return _exiDecodeStartElement(state, se, 5, 113, 591, 592); + case 34: + return _exiDecodeStartElement(state, se, 5, 115, 591, 595); + } + break; + case 601: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 7, 4, 575, 576); + } + break; + case 602: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 602, 73); + } + break; + case 627: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 628, 73); + } + break; + case 628: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 628, 73); + } + break; + case 688: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 106, 311, 160); + case 1: + return _exiDecodeStartElement(state, se, 6, 144, 311, 169); + } + break; + case 691: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 6, 134, 505, 442); + } + break; + + default: + return EXI_ERROR_UNEXPECTED_START_ELEMENT; + } + + return EXI_ERROR_UNEXPECTED_START_ELEMENT; +} + + +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; + } + + errn = decodeNBitUnsignedInteger(stream, uriCodingLength, uriID); + if (errn) { + return errn; + } + + 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 334: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 334; + return 0; + case 570: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 570; + return 0; + case 84: + /* STRING */ + case 85: + /* STRING */ + case 107: + /* STRING */ + case 108: + /* STRING */ + case 178: + /* STRING */ + case 179: + /* STRING */ + case 232: + /* STRING */ + case 233: + /* STRING */ + case 251: + /* STRING */ + case 252: + /* STRING */ + case 316: + /* STRING */ + case 317: + /* STRING */ + case 335: + /* STRING */ + case 344: + /* STRING */ + case 351: + /* STRING */ + case 368: + /* STRING */ + case 447: + /* STRING */ + case 448: + /* STRING */ + case 453: + /* STRING */ + case 454: + /* STRING */ + case 483: + /* STRING */ + case 584: + /* STRING */ + case 585: + /* STRING */ + case 605: + /* STRING */ + case 606: + /* STRING */ + case 607: + /* STRING */ + case 608: + /* STRING */ + case 609: + /* STRING */ + case 610: + /* STRING */ + case 613: + /* STRING */ + case 614: + /* STRING */ + case 615: + /* STRING */ + case 616: + /* STRING */ + case 619: + /* STRING */ + case 620: + /* STRING */ + case 621: + /* STRING */ + case 622: + /* STRING */ + case 623: + /* STRING */ + case 624: + /* STRING */ + case 625: + /* STRING */ + case 626: + /* STRING */ + case 629: + /* STRING */ + case 630: + /* STRING */ + case 641: + /* STRING */ + case 642: + /* STRING */ + case 659: + /* STRING */ + case 660: + /* STRING */ + case 668: + /* STRING */ + case 669: + /* STRING */ + case 673: + /* STRING */ + case 676: + /* STRING */ + case 677: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 12: + /* NBIT_UNSIGNED_INTEGER */ + case 13: + /* NBIT_UNSIGNED_INTEGER */ + val->type = EXI_DATATYPE_NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 3, &bits); + val->integer.val.int8 = bits -3; + val->integer.type = EXI_INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 628: + /* STRING */ + case 627: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 628; + return 0; + case 129: + /* ENUMERATION */ + case 130: + /* ENUMERATION */ + case 692: + /* ENUMERATION */ + case 693: + /* ENUMERATION */ + val->type = EXI_DATATYPE_ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 3, &val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 603: + /* LIST */ + case 604: + /* LIST */ + case 611: + /* LIST */ + case 612: + /* LIST */ + case 617: + /* LIST */ + case 618: + /* LIST */ + val->type = EXI_DATATYPE_LIST; + /* List not supported properly yet */ + val->list.type = EXI_DATATYPE_STRING; + errn = decodeUnsignedInteger16(stream, &val->list.len); + if (errn) { + return errn; + } + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 674: + /* DATETIME */ + case 675: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_TIME, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 639: + /* FLOAT */ + case 640: + /* FLOAT */ + case 643: + /* FLOAT */ + case 644: + /* FLOAT */ + val->type = EXI_DATATYPE_FLOAT; + errn = decodeFloat(stream, &val->float_me); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 651: + /* DATETIME */ + case 652: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_GYEAR, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 15: + /* ENUMERATION */ + case 16: + /* ENUMERATION */ + case 49: + /* ENUMERATION */ + case 50: + /* ENUMERATION */ + case 66: + /* ENUMERATION */ + case 67: + /* ENUMERATION */ + case 458: + /* ENUMERATION */ + case 459: + /* ENUMERATION */ + val->type = EXI_DATATYPE_ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 4, &val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 399: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 399; + return 0; + case 637: + /* DECIMAL */ + case 638: + /* DECIMAL */ + val->type = EXI_DATATYPE_DECIMAL; + errn = decodeDecimal(stream, &val->decimal); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 549: + /* STRING */ + case 553: + /* STRING */ + case 554: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 553; + return 0; + case 398: + /* STRING */ + case 400: + /* STRING */ + case 401: + /* STRING */ + case 397: + /* STRING */ + case 396: + /* STRING */ + case 395: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 400; + return 0; + case 71: + /* STRING */ + case 74: + /* STRING */ + case 75: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 74; + return 0; + case 635: + /* DATETIME */ + case 636: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_DATETIME, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 318: + /* STRING */ + case 324: + /* STRING */ + case 325: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 324; + return 0; + case 633: + /* DATETIME */ + case 634: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_DATE, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 299: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 299; + return 0; + case 602: + /* STRING */ + case 73: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 602; + return 0; + case 52: + /* NBIT_UNSIGNED_INTEGER */ + case 53: + /* NBIT_UNSIGNED_INTEGER */ + val->type = EXI_DATATYPE_NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 7, &bits); + val->integer.val.int8 = bits + 0; + val->integer.type = EXI_INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 569: + /* STRING */ + case 571: + /* STRING */ + case 572: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 571; + return 0; + case 298: + /* STRING */ + case 300: + /* STRING */ + case 301: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 300; + return 0; + case 5: + /* UNSIGNED_INTEGER */ + case 8: + /* UNSIGNED_INTEGER */ + case 33: + /* UNSIGNED_INTEGER */ + case 162: + /* UNSIGNED_INTEGER */ + case 164: + /* UNSIGNED_INTEGER */ + case 189: + /* UNSIGNED_INTEGER */ + case 195: + /* UNSIGNED_INTEGER */ + case 420: + /* UNSIGNED_INTEGER */ + case 444: + /* UNSIGNED_INTEGER */ + case 445: + /* UNSIGNED_INTEGER */ + case 664: + /* UNSIGNED_INTEGER */ + case 665: + /* UNSIGNED_INTEGER */ + case 670: + /* UNSIGNED_INTEGER */ + case 671: + /* UNSIGNED_INTEGER */ + case 678: + /* UNSIGNED_INTEGER */ + case 679: + /* UNSIGNED_INTEGER */ + case 680: + /* UNSIGNED_INTEGER */ + case 681: + /* UNSIGNED_INTEGER */ + case 682: + /* UNSIGNED_INTEGER */ + val->type = EXI_DATATYPE_UNSIGNED_INTEGER; + errn = decodeUnsignedInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 647: + /* DATETIME */ + case 648: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_GMONTH, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 478: + /* NBIT_UNSIGNED_INTEGER */ + case 479: + /* NBIT_UNSIGNED_INTEGER */ + case 632: + /* NBIT_UNSIGNED_INTEGER */ + val->type = EXI_DATATYPE_NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 8, &bits); + val->integer.val.int8 = bits -128; + val->integer.type = EXI_INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 319: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 319; + return 0; + case 333: + /* STRING */ + case 336: + /* STRING */ + case 337: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 336; + return 0; + case 649: + /* DATETIME */ + case 650: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_GMONTHDAY, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 58: + /* ENUMERATION */ + case 59: + /* ENUMERATION */ + val->type = EXI_DATATYPE_ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 5, &val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 63: + /* ENUMERATION */ + case 64: + /* ENUMERATION */ + case 192: + /* ENUMERATION */ + case 193: + /* ENUMERATION */ + case 450: + /* ENUMERATION */ + case 451: + /* ENUMERATION */ + case 581: + /* ENUMERATION */ + case 582: + /* ENUMERATION */ + val->type = EXI_DATATYPE_ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 2, &val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 29: + /* BOOLEAN */ + case 30: + /* BOOLEAN */ + val->type = EXI_DATATYPE_BOOLEAN; + errn = decodeBoolean(stream, &val->boolean); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 314: + /* STRING */ + case 369: + /* STRING */ + case 370: + /* STRING */ + case 313: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 369; + return 0; + case 550: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 550; + return 0; + case 72: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 72; + return 0; + case 18: + /* INTEGER */ + case 19: + /* INTEGER */ + case 125: + /* INTEGER */ + case 152: + /* INTEGER */ + case 153: + /* INTEGER */ + case 167: + /* INTEGER */ + case 168: + /* INTEGER */ + case 239: + /* INTEGER */ + case 240: + /* INTEGER */ + case 242: + /* INTEGER */ + case 243: + /* INTEGER */ + case 346: + /* INTEGER */ + case 347: + /* INTEGER */ + case 410: + /* INTEGER */ + case 472: + /* INTEGER */ + case 480: + /* INTEGER */ + case 481: + /* INTEGER */ + case 482: + /* INTEGER */ + case 518: + /* INTEGER */ + case 534: + /* INTEGER */ + case 551: + /* INTEGER */ + case 552: + /* INTEGER */ + case 657: + /* INTEGER */ + case 658: + /* INTEGER */ + case 661: + /* INTEGER */ + case 662: + /* INTEGER */ + case 663: + /* INTEGER */ + case 666: + /* INTEGER */ + case 667: + /* INTEGER */ + case 672: + /* INTEGER */ + val->type = EXI_DATATYPE_INTEGER; + errn = decodeInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 315: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 315; + return 0; + case 79: + /* BINARY_BASE64 */ + case 80: + /* BINARY_BASE64 */ + case 88: + /* BINARY_BASE64 */ + case 89: + /* BINARY_BASE64 */ + case 103: + /* BINARY_BASE64 */ + case 104: + /* BINARY_BASE64 */ + case 236: + /* BINARY_BASE64 */ + case 237: + /* BINARY_BASE64 */ + case 288: + /* BINARY_BASE64 */ + case 289: + /* BINARY_BASE64 */ + case 302: + /* BINARY_BASE64 */ + case 303: + /* BINARY_BASE64 */ + case 349: + /* BINARY_BASE64 */ + case 350: + /* BINARY_BASE64 */ + case 352: + /* BINARY_BASE64 */ + case 353: + /* BINARY_BASE64 */ + case 357: + /* BINARY_BASE64 */ + case 359: + /* BINARY_BASE64 */ + case 361: + /* BINARY_BASE64 */ + case 365: + /* BINARY_BASE64 */ + case 559: + /* BINARY_BASE64 */ + case 560: + /* BINARY_BASE64 */ + case 561: + /* BINARY_BASE64 */ + case 558: + /* BINARY_BASE64 */ + case 631: + /* BINARY_BASE64 */ + val->type = EXI_DATATYPE_BINARY_BASE64; + errn = decodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 645: + /* DATETIME */ + case 646: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_GDAY, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 181: + /* NBIT_UNSIGNED_INTEGER */ + case 182: + /* NBIT_UNSIGNED_INTEGER */ + val->type = EXI_DATATYPE_NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 8, &bits); + val->integer.val.uint8 = bits + 0; + val->integer.type = EXI_UNSIGNED_INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 225: + /* BINARY_HEX */ + case 226: + /* BINARY_HEX */ + case 386: + /* BINARY_HEX */ + case 387: + /* BINARY_HEX */ + case 527: + /* BINARY_HEX */ + case 528: + /* BINARY_HEX */ + case 655: + /* BINARY_HEX */ + case 656: + /* BINARY_HEX */ + val->type = EXI_DATATYPE_BINARY_HEX; + errn = decodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 497: + /* ENUMERATION */ + case 498: + /* ENUMERATION */ + val->type = EXI_DATATYPE_ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 1, &val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + case 653: + /* DATETIME */ + case 654: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_GYEARMONTH, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + 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 = EXI_DATATYPE_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 70: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 0; + /* move on */ + state->grammarStack[state->stackIndex] = 71; + return 0; + break; + } + break; + case 76: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 77; + return 0; + break; + } + break; + case 91: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 92; + return 0; + break; + } + break; + case 110: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 111; + return 0; + break; + } + break; + case 117: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 118; + return 0; + break; + } + break; + case 174: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 175; + return 0; + break; + } + break; + case 248: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 249; + return 0; + break; + } + break; + case 297: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 0; + /* move on */ + state->grammarStack[state->stackIndex] = 298; + return 0; + break; + } + break; + case 313: + /* 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 = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 314; + return 0; + break; + } + break; + case 326: + /* 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 = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 6; + /* move on */ + state->grammarStack[state->stackIndex] = 327; + return 0; + break; + case 1: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 7; + /* move on */ + state->grammarStack[state->stackIndex] = 328; + return 0; + break; + } + break; + case 327: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 7; + /* move on */ + state->grammarStack[state->stackIndex] = 328; + return 0; + break; + } + break; + case 332: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 0; + /* move on */ + state->grammarStack[state->stackIndex] = 333; + return 0; + break; + } + break; + case 371: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 372; + return 0; + break; + } + break; + case 374: + /* 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 = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 375; + return 0; + break; + case 1: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 6; + /* move on */ + state->grammarStack[state->stackIndex] = 376; + return 0; + break; + case 2: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 7; + /* move on */ + state->grammarStack[state->stackIndex] = 377; + return 0; + break; + } + break; + case 375: + /* 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 = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 6; + /* move on */ + state->grammarStack[state->stackIndex] = 376; + return 0; + break; + case 1: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 7; + /* move on */ + state->grammarStack[state->stackIndex] = 377; + return 0; + break; + } + break; + case 376: + /* 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 = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 7; + /* move on */ + state->grammarStack[state->stackIndex] = 377; + return 0; + break; + } + break; + case 383: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 384; + return 0; + break; + } + break; + case 395: + /* 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 = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 1; + /* move on */ + state->grammarStack[state->stackIndex] = 396; + return 0; + break; + case 1: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 397; + return 0; + break; + case 2: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 3; + /* move on */ + state->grammarStack[state->stackIndex] = 398; + return 0; + break; + } + break; + case 396: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 397; + return 0; + break; + case 1: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 3; + /* move on */ + state->grammarStack[state->stackIndex] = 398; + return 0; + break; + } + break; + case 397: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 3; + /* move on */ + state->grammarStack[state->stackIndex] = 398; + return 0; + break; + } + break; + case 474: + /* FirstStartTag[ATTRIBUTE[STRING](Name)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 4; + /* move on */ + state->grammarStack[state->stackIndex] = 475; + return 0; + break; + } + break; + case 475: + /* StartTag[ATTRIBUTE[ENUMERATION](ValueType)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 3, &val->enumeration); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 8; + /* move on */ + state->grammarStack[state->stackIndex] = 476; + return 0; + break; + } + break; + case 541: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 542; + return 0; + break; + } + break; + case 544: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 545; + return 0; + break; + } + break; + case 548: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 0; + /* move on */ + state->grammarStack[state->stackIndex] = 549; + return 0; + break; + } + break; + case 558: + /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 559; + return 0; + break; + } + break; + case 564: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 565; + return 0; + break; + } + break; + case 567: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Target)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 2; + /* move on */ + state->grammarStack[state->stackIndex] = 568; + return 0; + break; + case 1: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 5; + /* move on */ + state->grammarStack[state->stackIndex] = 569; + return 0; + break; + } + break; + case 568: + /* StartTag[ATTRIBUTE[STRING](Target)] */ + switch(state->eventCode) { + case 0: + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + at->namespaceURI = 0; + at->localPart = 5; + /* move on */ + state->grammarStack[state->stackIndex] = 569; + 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; + } + + /* decode attribute value */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + + /* we do not move forward in grammars */ + + return errn; +} + + + +#endif + diff --git a/src/codec/EXIDecoder.h b/src/codec/EXIDecoder.h new file mode 100644 index 0000000..bba98f8 --- /dev/null +++ b/src/codec/EXIDecoder.h @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef EXI__DECODER_H +#define EXI__DECODER_H + +#include "EXITypes.h" + +int exiInitDecoder(bitstream_t* stream, exi_state_t* state, + exi_name_table_runtime_t runtimeTable); + +int exiDecodeNextEvent(bitstream_t* stream, + exi_state_t* state, exi_event_t* nextEvent); + +int exiDecodeStartDocument(bitstream_t* stream, + exi_state_t* state); + +int exiDecodeEndDocument(bitstream_t* stream, + exi_state_t* state); + +int +exiDecodeStartElement(bitstream_t* stream, + exi_state_t* state, eqname_t* se); + +int exiDecodeStartElementGeneric(bitstream_t* stream, + exi_state_t* state, qname_t* qname); + +int exiDecodeEndElement(bitstream_t* stream, + exi_state_t* state, eqname_t* ee); + +int exiDecodeEndElementUndeclared(bitstream_t* stream, + exi_state_t* state, eqname_t* ee); + +int exiDecodeCharacters(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiDecodeCharactersGeneric(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiDecodeCharactersGenericUndeclared(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiDecodeAttribute(bitstream_t* stream, + exi_state_t* state, eqname_t* at, exi_value_t* val); + +int exiDecodeAttributeXsiNil(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiDecodeAttributeXsiType(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiDecodeAttributeGenericUndeclared(bitstream_t* stream, + exi_state_t* state, qname_t* at, exi_value_t* val); + +int exiDecodeListValue(bitstream_t* stream, exi_value_t* val, + list_t lt); + +#endif + +#ifdef __cplusplus +} +#endif + diff --git a/src/codec/EXIEncoder.c b/src/codec/EXIEncoder.c new file mode 100644 index 0000000..f6c95b5 --- /dev/null +++ b/src/codec/EXIEncoder.c @@ -0,0 +1,8428 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifndef EXI__ENCODER_C +#define EXI__ENCODER_C + +#include "EXITypes.h" +#include "BitOutputStream.h" +#include "EncoderChannel.h" + +#include "StringTable.h" +#include "NameTableEntries.h" +#include "MethodsBag.h" + +#include "EXICoder.h" +#include "EXIHeaderEncoder.h" + + + + +/* local variables */ +static uint32_t bits; +static int errn; + +/* ==================================== */ + + +int exiEncodeListValue(bitstream_t* stream, exi_value_t* val, list_t lt) { + + switch(lt.type) { + case EXI_DATATYPE_BINARY_BASE64: + case EXI_DATATYPE_BINARY_HEX: + errn = encodeBinary(stream, &val->binary); + break; + case EXI_DATATYPE_BOOLEAN: + errn = encodeBoolean(stream, val->boolean); + break; + case EXI_DATATYPE_BOOLEAN_FACET: + errn = encodeNBitUnsignedInteger(stream, 2, val->boolean ? 2 : 0); + break; + case EXI_DATATYPE_DECIMAL: + errn = encodeDecimal(stream, &val->decimal); + break; + case EXI_DATATYPE_FLOAT: + errn = encodeFloat(stream, &val->float_me); + break; + case EXI_DATATYPE_NBIT_UNSIGNED_INTEGER: + case EXI_DATATYPE_UNSIGNED_INTEGER: + case EXI_DATATYPE_INTEGER: + switch(lt.intType) { + /* (Signed) Integer */ + case EXI_UNSIGNED_INTEGER_8: + case EXI_UNSIGNED_INTEGER_16: + case EXI_UNSIGNED_INTEGER_32: + case EXI_UNSIGNED_INTEGER_64: + errn = encodeUnsignedInteger(stream, &val->integer); + break; + /* (Signed) Integer */ + case EXI_INTEGER_8: + case EXI_INTEGER_16: + case EXI_INTEGER_32: + case EXI_INTEGER_64: + errn = encodeInteger(stream, &val->integer); + break; + } + break; + case EXI_DATATYPE_DATETIME: + errn = encodeDateTime(stream, &val->datetime); + break; + case EXI_DATATYPE_STRING: + errn = encodeStringValue(stream, &val->string); + break; + default: + return EXI_UNSUPPORTED_LIST_VALUE_TYPE; + } + + return errn; +} + + + +/* <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 EXI_EVENT_START_DOCUMENT: + *resGrammarID = 0; + return 0; + default: + return 1; /* not found */ + } + break; + case DOC_CONTENT: + switch(eventType) { + /* TODO other IDs */ + case EXI_EVENT_START_ELEMENT_GENERIC: + *resGrammarID = 0; + return 0; + default: + return 1; /* not found */ + } + break; + case DOC_END: + switch(eventType) { + case EXI_EVENT_END_DOCUMENT: + *resGrammarID = 0; + return 0; + default: + return 1; /* not found */ + } + break; + case UR_TYPE_GRAMMAR_0: + switch(eventType) { + case EXI_EVENT_ATTRIBUTE_GENERIC: + *resGrammarID = 0; + return 0; + case EXI_EVENT_START_ELEMENT_GENERIC: + *resGrammarID = 1; + return 0; + case EXI_EVENT_END_ELEMENT: + *resGrammarID = 2; + return 0; + case EXI_EVENT_CHARACTERS_GENERIC: + *resGrammarID = 3; + return 0; + default: + return 1; /* not found */ + } + break; + case UR_TYPE_GRAMMAR_1: + switch(eventType) { + case EXI_EVENT_START_ELEMENT_GENERIC: + *resGrammarID = 0; + return 0; + case EXI_EVENT_END_ELEMENT: + *resGrammarID = 1; + return 0; + case EXI_EVENT_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 EXI_UNSIGNED_INTEGER_8: + val = iv->val.int8 - lowerBound; + break; + case EXI_UNSIGNED_INTEGER_16: + val = iv->val.int16 - lowerBound; + break; + case EXI_UNSIGNED_INTEGER_32: + val = iv->val.int32 - lowerBound; + break; + case EXI_UNSIGNED_INTEGER_64: + val = iv->val.int64 - lowerBound; + break; + /* (Signed) Integer */ + case EXI_INTEGER_8: + val = iv->val.uint8 - lowerBound; + break; + case EXI_INTEGER_16: + val = iv->val.uint16 - lowerBound; + break; + case EXI_INTEGER_32: + val = iv->val.uint32 - lowerBound; + break; + case EXI_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] = DOCUMENT; + /* string tables */ + state->nameTablePrepopulated = exiNameTablePrepopulated; + state->nameTableRuntime = runtimeTable; + /* encode header */ + return writeEXIHeader(stream); +} + +int exiEncodeStartDocument(bitstream_t* stream, exi_state_t* state) { + if ( state->grammarStack[state->stackIndex] == 0 ) { + /* move on */ + state->grammarStack[state->stackIndex] = 1; + return 0; + } + + return EXI_ERROR_UNEXPECTED_START_DOCUMENT; +} + +int exiEncodeEndDocument(bitstream_t* stream, exi_state_t* state) { + if ( state->grammarStack[state->stackIndex] == 2) { + encodeFinish(stream); + return 0; + } + + return EXI_ERROR_UNEXPECTED_END_DOCUMENT; +} + +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; +} + + +#if EXI_DEBUG == EXI_DEBUG_ON +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; +} +#endif /*EXI_DEBUG*/ + + +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; + +} + + +#if EXI_DEBUG == EXI_DEBUG_ON +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; +} +#endif /*EXI_DEBUG*/ + + +#if EXI_DEBUG == EXI_DEBUG_ON +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 ; +} +#endif /*EXI_DEBUG*/ + + +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; + } + /* move on */ + state->grammarStack[state->stackIndex] = stackId; + /* push element on stack */ + return exiPushStack(state, newState, se); +} + +#if EXI_DEBUG == EXI_DEBUG_ON + +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); +} +#endif /*EXI_DEBUG*/ + +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:MsgDataTypes}AC_EVChargeParameter), 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: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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), 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_EVStatus), 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}EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Entry), 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({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({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), 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({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), 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:MsgDataTypes}TimeInterval), 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_GENERIC] */ + if ( se->localPart == 0 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter ) */ + 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_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 7, 1, state, se, 2, 25); + } + else if ( se->localPart == 4 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 7, 2, state, se, 2, 27); + } + else if ( se->localPart == 2 && se->namespaceURI == 7 ) { + /* SE( {urn:iso:15118:2:2010:MsgDef}BodyElement ) */ + return _exiEncodeStartElement(stream, 7, 3, state, se, 2, 40); + } + else if ( se->localPart == 2 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CableCheckReq ) */ + return _exiEncodeStartElement(stream, 7, 4, state, se, 2, 42); + } + else if ( se->localPart == 4 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CableCheckRes ) */ + return _exiEncodeStartElement(stream, 7, 5, state, se, 2, 56); + } + else if ( se->localPart == 0 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod ) */ + return _exiEncodeStartElement(stream, 7, 6, state, se, 2, 70); + } + else if ( se->localPart == 6 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq ) */ + return _exiEncodeStartElement(stream, 7, 7, state, se, 2, 76); + } + else if ( se->localPart == 8 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes ) */ + return _exiEncodeStartElement(stream, 7, 8, state, se, 2, 91); + } + else if ( se->localPart == 10 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq ) */ + return _exiEncodeStartElement(stream, 7, 9, state, se, 2, 110); + } + else if ( se->localPart == 12 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes ) */ + return _exiEncodeStartElement(stream, 7, 10, state, se, 2, 117); + } + else if ( se->localPart == 14 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq ) */ + return _exiEncodeStartElement(stream, 7, 11, state, se, 2, 127); + } + else if ( se->localPart == 16 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes ) */ + return _exiEncodeStartElement(stream, 7, 12, state, se, 2, 145); + } + else if ( se->localPart == 21 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingStatusReq ) */ + return _exiEncodeStartElement(stream, 7, 13, state, se, 2, 220); + } + else if ( se->localPart == 23 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingStatusRes ) */ + return _exiEncodeStartElement(stream, 7, 14, state, se, 2, 222); + } + else if ( se->localPart == 25 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq ) */ + return _exiEncodeStartElement(stream, 7, 15, state, se, 2, 248); + } + else if ( se->localPart == 27 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes ) */ + return _exiEncodeStartElement(stream, 7, 16, state, se, 2, 254); + } + else if ( se->localPart == 32 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CurrentDemandReq ) */ + return _exiEncodeStartElement(stream, 7, 17, state, se, 2, 257); + } + else if ( se->localPart == 34 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CurrentDemandRes ) */ + return _exiEncodeStartElement(stream, 7, 18, state, se, 2, 269); + } + else if ( se->localPart == 18 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVChargeParameter ) */ + return _exiEncodeStartElement(stream, 7, 19, state, se, 2, 132); + } + else if ( se->localPart == 21 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter ) */ + return _exiEncodeStartElement(stream, 7, 20, state, se, 2, 281); + } + else if ( se->localPart == 23 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 7, 21, state, se, 2, 204); + } + else if ( se->localPart == 25 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 7, 22, state, se, 2, 61); + } + else if ( se->localPart == 28 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 7, 23, state, se, 2, 44); + } + 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, 286); + } + 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, 297); + } + 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, 302); + } + else if ( se->localPart == 34 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVChargeParameter ) */ + return _exiEncodeStartElement(stream, 7, 27, state, se, 2, 142); + } + else if ( se->localPart == 45 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter ) */ + return _exiEncodeStartElement(stream, 7, 28, state, se, 2, 304); + } + else if ( se->localPart == 51 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 7, 29, state, se, 2, 215); + } + else if ( se->localPart == 65 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus ) */ + return _exiEncodeStartElement(stream, 7, 30, state, se, 2, 306); + } + else if ( se->localPart == 69 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVStatus ) */ + return _exiEncodeStartElement(stream, 7, 31, state, se, 2, 308); + } + else if ( se->localPart == 72 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Entry ) */ + return _exiEncodeStartElement(stream, 7, 32, state, se, 2, 310); + } + else if ( se->localPart == 14 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyInfo ) */ + return _exiEncodeStartElement(stream, 7, 33, state, se, 2, 313); + } + else if ( se->localPart == 16 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyName ) */ + return _exiEncodeStartElement(stream, 7, 34, state, se, 2, 316); + } + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyValue ) */ + return _exiEncodeStartElement(stream, 7, 35, state, se, 2, 318); + } + else if ( se->localPart == 19 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Manifest ) */ + return _exiEncodeStartElement(stream, 7, 36, state, se, 2, 371); + } + else if ( se->localPart == 60 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq ) */ + return _exiEncodeStartElement(stream, 7, 37, state, se, 2, 383); + } + else if ( se->localPart == 62 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes ) */ + return _exiEncodeStartElement(stream, 7, 38, state, se, 2, 391); + } + 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, 368); + } + 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, 395); + } + else if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPData ) */ + return _exiEncodeStartElement(stream, 7, 41, state, se, 2, 355); + } + else if ( se->localPart == 89 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry ) */ + return _exiEncodeStartElement(stream, 7, 42, state, se, 2, 158); + } + else if ( se->localPart == 65 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq ) */ + return _exiEncodeStartElement(stream, 7, 43, state, se, 2, 402); + } + else if ( se->localPart == 67 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes ) */ + return _exiEncodeStartElement(stream, 7, 44, state, se, 2, 406); + } + else if ( se->localPart == 70 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq ) */ + return _exiEncodeStartElement(stream, 7, 45, state, se, 2, 412); + } + else if ( se->localPart == 72 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes ) */ + return _exiEncodeStartElement(stream, 7, 46, state, se, 2, 426); + } + else if ( se->localPart == 74 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PreChargeReq ) */ + return _exiEncodeStartElement(stream, 7, 47, state, se, 2, 430); + } + else if ( se->localPart == 76 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PreChargeRes ) */ + return _exiEncodeStartElement(stream, 7, 48, state, se, 2, 435); + } + else if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RSAKeyValue ) */ + return _exiEncodeStartElement(stream, 7, 49, state, se, 2, 320); + } + else if ( se->localPart == 34 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Reference ) */ + return _exiEncodeStartElement(stream, 7, 50, state, se, 2, 374); + } + else if ( se->localPart == 106 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval ) */ + return _exiEncodeStartElement(stream, 7, 51, state, se, 2, 160); + } + else if ( se->localPart == 36 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RetrievalMethod ) */ + return _exiEncodeStartElement(stream, 7, 52, state, se, 2, 326); + } + else if ( se->localPart == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList ) */ + return _exiEncodeStartElement(stream, 7, 53, state, se, 2, 148); + } + else if ( se->localPart == 115 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SASchedules ) */ + return _exiEncodeStartElement(stream, 7, 54, state, se, 2, 217); + } + else if ( se->localPart == 38 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKIData ) */ + return _exiEncodeStartElement(stream, 7, 55, state, se, 2, 363); + } + else if ( se->localPart == 119 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry ) */ + return _exiEncodeStartElement(stream, 7, 56, state, se, 2, 184); + } + else if ( se->localPart == 128 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge ) */ + return _exiEncodeStartElement(stream, 7, 57, state, se, 2, 440); + } + else if ( se->localPart == 88 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDetailReq ) */ + return _exiEncodeStartElement(stream, 7, 58, state, se, 2, 461); + } + else if ( se->localPart == 90 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDetailRes ) */ + return _exiEncodeStartElement(stream, 7, 59, state, se, 2, 464); + } + else if ( se->localPart == 92 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq ) */ + return _exiEncodeStartElement(stream, 7, 60, state, se, 2, 488); + } + else if ( se->localPart == 94 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes ) */ + return _exiEncodeStartElement(stream, 7, 61, state, se, 2, 492); + } + else if ( se->localPart == 99 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq ) */ + return _exiEncodeStartElement(stream, 7, 62, state, se, 2, 510); + } + else if ( se->localPart == 101 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes ) */ + return _exiEncodeStartElement(stream, 7, 63, state, se, 2, 522); + } + else if ( se->localPart == 105 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionSetupReq ) */ + return _exiEncodeStartElement(stream, 7, 64, state, se, 2, 525); + } + else if ( se->localPart == 107 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionSetupRes ) */ + return _exiEncodeStartElement(stream, 7, 65, state, se, 2, 530); + } + else if ( se->localPart == 109 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionStopReq ) */ + return _exiEncodeStartElement(stream, 7, 66, state, se, 2, 536); + } + else if ( se->localPart == 110 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionStopRes ) */ + return _exiEncodeStartElement(stream, 7, 67, state, se, 2, 538); + } + 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, 541); + } + 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, 548); + } + 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, 564); + } + 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, 567); + } + 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, 558); + } + else if ( se->localPart == 52 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SignedInfo ) */ + return _exiEncodeStartElement(stream, 7, 73, state, se, 2, 544); + } + else if ( se->localPart == 144 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TimeInterval ) */ + return _exiEncodeStartElement(stream, 7, 74, state, se, 2, 169); + } + else if ( se->localPart == 54 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transform ) */ + return _exiEncodeStartElement(stream, 7, 75, state, se, 2, 332); + } + else if ( se->localPart == 56 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Transforms ) */ + return _exiEncodeStartElement(stream, 7, 76, state, se, 2, 330); + } + else if ( se->localPart == 5 && se->namespaceURI == 7 ) { + /* SE( {urn:iso:15118:2:2010:MsgDef}V2G_Message ) */ + return _exiEncodeStartElement(stream, 7, 77, state, se, 2, 574); + } + else if ( se->localPart == 113 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq ) */ + return _exiEncodeStartElement(stream, 7, 78, state, se, 2, 592); + } + else if ( se->localPart == 115 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes ) */ + return _exiEncodeStartElement(stream, 7, 79, state, se, 2, 595); + } + else if ( se->localPart == 60 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Data ) */ + return _exiEncodeStartElement(stream, 7, 80, state, se, 2, 340); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 7, 81, state, se, 2, 73); + } + break; + case 3: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + if ( se->localPart == 30 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DepartureTime ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 4, 5); + } + break; + case 4: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EAmount)] */ + if ( se->localPart == 31 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EAmount ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 9, 10); + } + break; + case 9: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxVoltage)] */ + if ( se->localPart == 40 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVMaxVoltage ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 21, 10); + } + break; + case 10: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + if ( se->localPart == 84 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Multiplier ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 11, 12); + } + break; + case 11: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + if ( se->localPart == 145 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Unit ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 14, 15); + } + else if ( se->localPart == 146 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Value ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 17, 18); + } + break; + case 14: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + if ( se->localPart == 146 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Value ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 17, 18); + } + break; + case 20: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + if ( se->localPart == 84 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Multiplier ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 11, 12); + } + break; + case 21: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxCurrent)] */ + if ( se->localPart == 39 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVMaxCurrent ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 22, 10); + } + break; + case 22: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMinCurrent)] */ + if ( se->localPart == 44 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVMinCurrent ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 23, 10); + } + break; + case 24: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + if ( se->localPart == 30 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DepartureTime ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 4, 5); + } + break; + case 25: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + if ( se->localPart == 4 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 26, 27); + } + break; + case 26: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage)] */ + if ( se->localPart == 57 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 36, 10); + } + break; + case 27: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + if ( se->localPart == 102 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 28, 29); + } + break; + case 28: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + if ( se->localPart == 105 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RCD ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 31, 29); + } + break; + case 31: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + if ( se->localPart == 138 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 32, 33); + } + break; + case 32: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}StopCharging)] */ + if ( se->localPart == 140 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}StopCharging ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 34, 29); + } + break; + case 35: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + if ( se->localPart == 102 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 28, 29); + } + break; + case 36: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent)] */ + if ( se->localPart == 56 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 37, 10); + } + break; + case 37: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent)] */ + if ( se->localPart == 61 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 38, 10); + } + break; + case 39: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + if ( se->localPart == 4 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 26, 27); + } + break; + case 42: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 43, 44); + } + break; + case 44: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + if ( se->localPart == 49 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVReady ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 45, 29); + } + break; + case 45: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVCabinConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + if ( se->localPart == 33 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVCabinConditioning ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 46, 29); + } + else if ( se->localPart == 47 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 47, 29); + } + else if ( se->localPart == 38 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 48, 49); + } + break; + case 46: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + if ( se->localPart == 47 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 47, 29); + } + else if ( se->localPart == 38 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 48, 49); + } + break; + case 47: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + if ( se->localPart == 38 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 48, 49); + } + break; + case 48: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSSOC)] */ + if ( se->localPart == 48 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVRESSSOC ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 51, 52); + } + break; + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + if ( se->localPart == 49 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVReady ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 45, 29); + } + break; + case 55: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 43, 44); + } + break; + case 56: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 57, 58); + } + break; + case 57: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + if ( se->localPart == 36 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 60, 61); + } + break; + case 61: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + if ( se->localPart == 55 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 62, 63); + } + else if ( se->localPart == 66 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 65, 66); + } + break; + case 62: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + if ( se->localPart == 66 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 65, 66); + } + break; + case 68: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + if ( se->localPart == 55 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 62, 63); + } + else if ( se->localPart == 66 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 65, 66); + } + break; + case 69: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 57, 58); + } + break; + case 71: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 72, 73); + } + break; + case 72: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 72, 73); + } + break; + case 73: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 602, 73); + } + break; + case 74: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 72, 73); + } + break; + case 75: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 72, 73); + } + break; + case 76: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + if ( se->localPart == 64 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 78, 79); + } + break; + case 77: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + if ( se->localPart == 64 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 78, 79); + } + break; + case 78: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + if ( se->localPart == 58 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 81, 82); + } + break; + case 81: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + if ( se->localPart == 38 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DHParams ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 87, 88); + } + break; + case 82: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ + if ( se->localPart == 108 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 83, 84); + } + break; + case 83: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID), END_ELEMENT] */ + if ( se->localPart == 108 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 83, 84); + } + break; + case 86: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ + if ( se->localPart == 108 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 83, 84); + } + break; + case 90: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + if ( se->localPart == 64 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 78, 79); + } + break; + case 92: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 93, 58); + } + break; + case 93: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( se->localPart == 30 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 94, 95); + } + break; + case 94: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + if ( se->localPart == 31 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 102, 103); + } + break; + case 95: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + if ( se->localPart == 8 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Certificate ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 96, 79); + } + break; + case 96: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] */ + if ( se->localPart == 141 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SubCertificates ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 97, 98); + } + break; + case 98: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + if ( se->localPart == 8 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Certificate ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 99, 79); + } + break; + case 99: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] */ + if ( se->localPart == 8 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Certificate ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 99, 79); + } + break; + case 100: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + if ( se->localPart == 8 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Certificate ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 99, 79); + } + break; + case 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + if ( se->localPart == 8 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Certificate ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 96, 79); + } + break; + case 102: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + if ( se->localPart == 38 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DHParams ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 105, 88); + } + break; + case 105: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( se->localPart == 29 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 106, 107); + } + break; + case 109: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 93, 58); + } + break; + case 110: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( se->localPart == 30 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 112, 95); + } + break; + case 111: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( se->localPart == 30 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 112, 95); + } + break; + case 112: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( se->localPart == 29 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 113, 107); + } + break; + case 113: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + if ( se->localPart == 58 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 114, 82); + } + break; + case 114: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + if ( se->localPart == 38 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DHParams ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 115, 88); + } + break; + case 116: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( se->localPart == 30 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 112, 95); + } + break; + case 118: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 119, 58); + } + break; + case 119: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( se->localPart == 30 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 120, 95); + } + break; + case 120: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + if ( se->localPart == 31 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 121, 103); + } + break; + case 121: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + if ( se->localPart == 38 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DHParams ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 122, 88); + } + break; + case 122: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( se->localPart == 29 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 123, 107); + } + break; + case 123: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RetryCounter)] */ + if ( se->localPart == 83 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}RetryCounter ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 124, 125); + } + break; + case 126: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 119, 58); + } + break; + case 127: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + if ( se->localPart == 44 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 128, 129); + } + break; + case 128: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVChargeParameter)] */ + if ( se->localPart == 0 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 131, 3); + } + else if ( se->localPart == 18 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 131, 132); + } + else if ( se->localPart == 34 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 131, 142); + } + break; + case 132: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + if ( se->localPart == 28 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 133, 44); + } + break; + case 133: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumCurrentLimit)] */ + if ( se->localPart == 41 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVMaximumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 134, 10); + } + break; + case 134: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + if ( se->localPart == 42 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 135, 10); + } + else if ( se->localPart == 43 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 136, 10); + } + break; + case 135: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + if ( se->localPart == 43 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 136, 10); + } + break; + case 136: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + if ( se->localPart == 36 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVEnergyCapacity ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 137, 10); + } + else if ( se->localPart == 37 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 138, 10); + } + else if ( se->localPart == 77 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FullSOC ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 139, 52); + } + else if ( se->localPart == 7 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}BulkSOC ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 140, 52); + } + break; + case 137: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + if ( se->localPart == 37 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 138, 10); + } + else if ( se->localPart == 77 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FullSOC ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 139, 52); + } + else if ( se->localPart == 7 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}BulkSOC ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 140, 52); + } + break; + case 138: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + if ( se->localPart == 77 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FullSOC ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 139, 52); + } + else if ( se->localPart == 7 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}BulkSOC ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 140, 52); + } + break; + case 139: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + if ( se->localPart == 7 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}BulkSOC ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 140, 52); + } + break; + case 141: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + if ( se->localPart == 28 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 133, 44); + } + break; + case 144: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + if ( se->localPart == 44 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 128, 129); + } + break; + case 145: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 146, 58); + } + break; + case 146: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules), 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 == 110 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 147, 148); + } + else if ( se->localPart == 115 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SASchedules ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 147, 217); + } + else if ( se->localPart == 2 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 203, 25); + } + else if ( se->localPart == 23 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 203, 204); + } + else if ( se->localPart == 51 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 203, 215); + } + break; + case 147: + /* 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 == 2 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 203, 25); + } + else if ( se->localPart == 23 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 203, 204); + } + else if ( se->localPart == 51 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 203, 215); + } + break; + case 148: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + if ( se->localPart == 112 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 149, 150); + } + break; + case 149: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple), END_ELEMENT] */ + if ( se->localPart == 112 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 149, 150); + } + break; + case 150: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + if ( se->localPart == 113 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 151, 152); + } + break; + case 151: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxSchedule)] */ + if ( se->localPart == 88 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PMaxSchedule ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 154, 155); + } + break; + case 154: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariff), END_ELEMENT] */ + if ( se->localPart == 117 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SalesTariff ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 173, 174); + } + break; + case 155: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + if ( se->localPart == 91 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 156, 152); + } + break; + case 156: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry)] */ + if ( se->localPart == 89 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 157, 158); + } + break; + case 157: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), END_ELEMENT] */ + if ( se->localPart == 89 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 157, 158); + } + break; + case 158: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + if ( se->localPart == 106 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 159, 160); + } + else if ( se->localPart == 144 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 159, 169); + } + break; + case 159: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMax)] */ + if ( se->localPart == 87 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PMax ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 166, 167); + } + break; + case 160: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + if ( se->localPart == 179 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}start ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 161, 162); + } + break; + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}duration), END_ELEMENT] */ + if ( se->localPart == 156 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}duration ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 163, 164); + } + break; + case 165: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + if ( se->localPart == 179 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}start ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 161, 162); + } + break; + case 171: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + if ( se->localPart == 106 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 159, 160); + } + else if ( se->localPart == 144 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 159, 169); + } + break; + case 172: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + if ( se->localPart == 91 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 156, 152); + } + break; + case 175: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + if ( se->localPart == 121 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 176, 152); + } + break; + case 176: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + if ( se->localPart == 118 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SalesTariffDescription ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 177, 178); + } + else if ( se->localPart == 86 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 180, 181); + } + break; + case 177: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + if ( se->localPart == 86 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 180, 181); + } + break; + case 180: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry)] */ + if ( se->localPart == 119 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 183, 184); + } + break; + case 183: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), END_ELEMENT] */ + if ( se->localPart == 119 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 183, 184); + } + break; + case 184: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + if ( se->localPart == 106 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 185, 160); + } + else if ( se->localPart == 144 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 185, 169); + } + break; + case 185: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceLevel)] */ + if ( se->localPart == 32 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EPriceLevel ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 186, 181); + } + break; + case 186: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConsumptionCost), END_ELEMENT] */ + if ( se->localPart == 14 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ConsumptionCost ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 186, 187); + } + break; + case 187: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + if ( se->localPart == 180 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}startValue ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 188, 189); + } + break; + case 188: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Cost), END_ELEMENT] */ + if ( se->localPart == 16 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Cost ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 188, 190); + } + break; + case 190: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + if ( se->localPart == 153 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}costKind ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 191, 192); + } + break; + case 191: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amount)] */ + if ( se->localPart == 147 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}amount ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 194, 195); + } + break; + case 194: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amountMultiplier), END_ELEMENT] */ + if ( se->localPart == 148 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}amountMultiplier ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 196, 12); + } + break; + case 197: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + if ( se->localPart == 153 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}costKind ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 191, 192); + } + break; + case 198: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + if ( se->localPart == 180 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}startValue ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 188, 189); + } + break; + case 199: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + if ( se->localPart == 106 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 185, 160); + } + else if ( se->localPart == 144 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 185, 169); + } + break; + case 200: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + if ( se->localPart == 121 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 176, 152); + } + break; + case 201: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + if ( se->localPart == 113 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 151, 152); + } + break; + case 202: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + if ( se->localPart == 112 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 149, 150); + } + break; + case 204: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + if ( se->localPart == 25 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 205, 61); + } + break; + case 205: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit)] */ + if ( se->localPart == 58 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 206, 10); + } + break; + case 206: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + if ( se->localPart == 59 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 207, 10); + } + else if ( se->localPart == 60 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 208, 10); + } + break; + case 207: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + if ( se->localPart == 60 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 208, 10); + } + break; + case 208: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit)] */ + if ( se->localPart == 62 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 209, 10); + } + break; + case 209: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit)] */ + if ( se->localPart == 63 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 210, 10); + } + break; + case 210: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + if ( se->localPart == 53 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 211, 10); + } + else if ( se->localPart == 64 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 212, 10); + } + break; + case 211: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + if ( se->localPart == 64 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 212, 10); + } + break; + case 212: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered), END_ELEMENT] */ + if ( se->localPart == 54 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 213, 10); + } + break; + case 214: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + if ( se->localPart == 25 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 205, 61); + } + break; + case 219: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 146, 58); + } + break; + case 222: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 223, 58); + } + break; + case 223: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + if ( se->localPart == 46 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 224, 225); + } + break; + case 224: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + if ( se->localPart == 84 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 227, 152); + } + else if ( se->localPart == 47 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 228, 10); + } + else if ( se->localPart == 59 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeterInfo ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 229, 230); + } + else if ( se->localPart == 79 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ReceiptRequired ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 245, 29); + } + break; + case 227: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + if ( se->localPart == 47 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 228, 10); + } + else if ( se->localPart == 59 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeterInfo ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 229, 230); + } + else if ( se->localPart == 79 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ReceiptRequired ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 245, 29); + } + break; + case 228: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + if ( se->localPart == 59 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeterInfo ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 229, 230); + } + else if ( se->localPart == 79 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ReceiptRequired ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 245, 29); + } + break; + case 229: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + if ( se->localPart == 79 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ReceiptRequired ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 245, 29); + } + break; + case 230: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + if ( se->localPart == 80 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 231, 232); + } + break; + case 231: + /* 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 == 82 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterReading ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 234, 10); + } + else if ( se->localPart == 139 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 235, 236); + } + else if ( se->localPart == 83 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterStatus ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 238, 239); + } + else if ( se->localPart == 143 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TMeter ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 241, 242); + } + break; + case 234: + /* 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 == 139 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 235, 236); + } + else if ( se->localPart == 83 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterStatus ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 238, 239); + } + else if ( se->localPart == 143 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TMeter ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 241, 242); + } + break; + case 235: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( se->localPart == 83 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterStatus ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 238, 239); + } + else if ( se->localPart == 143 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TMeter ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 241, 242); + } + break; + case 238: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( se->localPart == 143 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TMeter ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 241, 242); + } + break; + case 244: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + if ( se->localPart == 80 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}MeterID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 231, 232); + } + break; + case 245: + /* 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, 1, 0, state, se, 246, 27); + } + break; + case 247: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 223, 58); + } + break; + case 249: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + if ( se->localPart == 57 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}GenChallenge ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 250, 251); + } + break; + case 253: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + if ( se->localPart == 57 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}GenChallenge ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 250, 251); + } + break; + case 254: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 255, 58); + } + break; + case 256: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 255, 58); + } + break; + case 257: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 258, 44); + } + break; + case 258: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + if ( se->localPart == 55 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVTargetCurrent ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 259, 10); + } + break; + case 259: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( se->localPart == 43 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVMaximumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 260, 10); + } + else if ( se->localPart == 41 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 261, 10); + } + else if ( se->localPart == 42 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 262, 10); + } + else if ( se->localPart == 1 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}BulkChargingComplete ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 263, 29); + } + else if ( se->localPart == 19 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 264, 29); + } + break; + case 260: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( se->localPart == 41 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 261, 10); + } + else if ( se->localPart == 42 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 262, 10); + } + else if ( se->localPart == 1 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}BulkChargingComplete ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 263, 29); + } + else if ( se->localPart == 19 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 264, 29); + } + break; + case 261: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( se->localPart == 42 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 262, 10); + } + else if ( se->localPart == 1 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}BulkChargingComplete ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 263, 29); + } + else if ( se->localPart == 19 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 264, 29); + } + break; + case 262: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( se->localPart == 1 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}BulkChargingComplete ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 263, 29); + } + else if ( se->localPart == 19 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 264, 29); + } + break; + case 263: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( se->localPart == 19 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 264, 29); + } + break; + case 264: + /* 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}EVTargetVoltage)] */ + if ( se->localPart == 81 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}RemainingTimeToFullSoC ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 265, 10); + } + else if ( se->localPart == 80 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 266, 10); + } + else if ( se->localPart == 56 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVTargetVoltage ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 267, 10); + } + break; + case 265: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + if ( se->localPart == 80 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 266, 10); + } + else if ( se->localPart == 56 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVTargetVoltage ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 267, 10); + } + break; + case 266: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + if ( se->localPart == 56 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVTargetVoltage ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 267, 10); + } + break; + case 268: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 258, 44); + } + break; + case 269: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 270, 58); + } + break; + case 270: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + if ( se->localPart == 36 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 271, 61); + } + break; + case 271: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + if ( se->localPart == 53 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 272, 10); + } + break; + case 272: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent)] */ + if ( se->localPart == 52 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 273, 10); + } + break; + case 273: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved)] */ + if ( se->localPart == 45 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 274, 29); + } + break; + case 274: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved)] */ + if ( se->localPart == 54 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 275, 29); + } + break; + case 275: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved)] */ + if ( se->localPart == 51 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 276, 29); + } + break; + case 276: + /* 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 == 50 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaximumVoltageLimit ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 277, 10); + } + else if ( se->localPart == 48 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 278, 10); + } + else if ( se->localPart == 49 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 279, 10); + } + break; + case 277: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + if ( se->localPart == 48 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 278, 10); + } + else if ( se->localPart == 49 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 279, 10); + } + break; + case 278: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + if ( se->localPart == 49 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 279, 10); + } + break; + case 280: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 270, 58); + } + break; + case 281: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + if ( se->localPart == 28 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 282, 44); + } + break; + case 282: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + if ( se->localPart == 6 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 283, 29); + } + else if ( se->localPart == 10 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 284, 29); + } + break; + case 283: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + if ( se->localPart == 10 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 284, 29); + } + break; + case 285: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + if ( se->localPart == 28 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 282, 44); + } + break; + case 286: + /* 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, 287, 288); + } + else if ( se->localPart == 10 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}G ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 291, 288); + } + else if ( se->localPart == 69 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Y ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 292, 288); + } + break; + case 287: + /* 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, 1, 0, state, se, 290, 288); + } + break; + case 290: + /* 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, 2, 0, state, se, 291, 288); + } + else if ( se->localPart == 69 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Y ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 292, 288); + } + break; + case 291: + /* 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, 1, 0, state, se, 292, 288); + } + break; + case 292: + /* 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, 293, 288); + } + else if ( se->localPart == 41 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Seed ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 294, 288); + } + break; + case 293: + /* 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, 2, 0, state, se, 294, 288); + } + break; + case 294: + /* 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, 1, 0, state, se, 295, 288); + } + break; + case 296: + /* Element[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, 287, 288); + } + else if ( se->localPart == 10 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}G ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 291, 288); + } + else if ( se->localPart == 69 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Y ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 292, 288); + } + break; + case 298: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 299, 73); + } + break; + case 299: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 299, 73); + } + break; + case 300: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 299, 73); + } + break; + case 301: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 299, 73); + } + break; + case 310: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + if ( se->localPart == 106 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 311, 160); + } + else if ( se->localPart == 144 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 311, 169); + } + break; + case 312: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + if ( se->localPart == 106 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 311, 160); + } + else if ( se->localPart == 144 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 311, 169); + } + break; + case 313: + /* 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, 315, 316); + } + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyValue ) */ + return _exiEncodeStartElement(stream, 4, 2, state, se, 315, 318); + } + else if ( se->localPart == 36 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RetrievalMethod ) */ + return _exiEncodeStartElement(stream, 4, 3, state, se, 315, 326); + } + else if ( se->localPart == 60 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Data ) */ + return _exiEncodeStartElement(stream, 4, 4, state, se, 315, 340); + } + else if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPData ) */ + return _exiEncodeStartElement(stream, 4, 5, state, se, 315, 355); + } + else if ( se->localPart == 38 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKIData ) */ + return _exiEncodeStartElement(stream, 4, 6, state, se, 315, 363); + } + else if ( se->localPart == 21 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}MgmtData ) */ + return _exiEncodeStartElement(stream, 4, 7, state, se, 315, 368); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 4, 8, state, se, 315, 73); + } + break; + case 314: + /* 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, 315, 316); + } + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyValue ) */ + return _exiEncodeStartElement(stream, 4, 1, state, se, 315, 318); + } + else if ( se->localPart == 36 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RetrievalMethod ) */ + return _exiEncodeStartElement(stream, 4, 2, state, se, 315, 326); + } + else if ( se->localPart == 60 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Data ) */ + return _exiEncodeStartElement(stream, 4, 3, state, se, 315, 340); + } + else if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPData ) */ + return _exiEncodeStartElement(stream, 4, 4, state, se, 315, 355); + } + else if ( se->localPart == 38 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKIData ) */ + return _exiEncodeStartElement(stream, 4, 5, state, se, 315, 363); + } + else if ( se->localPart == 21 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}MgmtData ) */ + return _exiEncodeStartElement(stream, 4, 6, state, se, 315, 368); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 4, 7, state, se, 315, 73); + } + break; + case 315: + /* 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, 315, 316); + } + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyValue ) */ + return _exiEncodeStartElement(stream, 4, 1, state, se, 315, 318); + } + else if ( se->localPart == 36 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RetrievalMethod ) */ + return _exiEncodeStartElement(stream, 4, 2, state, se, 315, 326); + } + else if ( se->localPart == 60 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Data ) */ + return _exiEncodeStartElement(stream, 4, 3, state, se, 315, 340); + } + else if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPData ) */ + return _exiEncodeStartElement(stream, 4, 4, state, se, 315, 355); + } + else if ( se->localPart == 38 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKIData ) */ + return _exiEncodeStartElement(stream, 4, 5, state, se, 315, 363); + } + else if ( se->localPart == 21 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}MgmtData ) */ + return _exiEncodeStartElement(stream, 4, 6, state, se, 315, 368); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 4, 7, state, se, 315, 73); + } + break; + case 318: + /* 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, 3, 0, state, se, 319, 286); + } + else if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RSAKeyValue ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 319, 320); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 319, 73); + } + break; + case 320: + /* 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, 1, 0, state, se, 321, 288); + } + break; + case 321: + /* 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, 1, 0, state, se, 322, 288); + } + break; + case 323: + /* Element[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, 1, 0, state, se, 321, 288); + } + break; + case 324: + /* 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, 3, 0, state, se, 319, 286); + } + else if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RSAKeyValue ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 319, 320); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 319, 73); + } + break; + case 325: + /* 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, 3, 0, state, se, 319, 286); + } + else if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RSAKeyValue ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 319, 320); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 319, 73); + } + break; + case 326: + /* 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, 3, 2, state, se, 329, 330); + } + break; + case 327: + /* 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, 329, 330); + } + break; + case 328: + /* 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, 2, 0, state, se, 329, 330); + } + break; + case 330: + /* 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, 1, 0, state, se, 331, 332); + } + break; + case 331: + /* 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, 2, 0, state, se, 331, 332); + } + break; + case 333: + /* 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, 3, 0, state, se, 334, 335); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 334, 73); + } + break; + case 334: + /* 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, 3, 0, state, se, 334, 335); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 334, 73); + } + break; + case 336: + /* 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, 3, 0, state, se, 334, 335); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 334, 73); + } + break; + case 337: + /* 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, 3, 0, state, se, 334, 335); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 334, 73); + } + break; + case 338: + /* Element[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, 1, 0, state, se, 331, 332); + } + break; + case 339: + /* Element[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, 0, state, se, 329, 330); + } + break; + case 340: + /* 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, 341, 342); + } + else if ( se->localPart == 65 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509SKI ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 341, 349); + } + else if ( se->localPart == 67 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509SubjectName ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 341, 351); + } + else if ( se->localPart == 59 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Certificate ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 341, 352); + } + else if ( se->localPart == 58 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509CRL ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 341, 353); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 5, state, se, 341, 73); + } + break; + case 341: + /* 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, 341, 342); + } + else if ( se->localPart == 65 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509SKI ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 341, 349); + } + else if ( se->localPart == 67 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509SubjectName ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 341, 351); + } + else if ( se->localPart == 59 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Certificate ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 341, 352); + } + else if ( se->localPart == 58 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509CRL ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 341, 353); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 5, state, se, 341, 73); + } + break; + case 342: + /* 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, 1, 0, state, se, 343, 344); + } + break; + case 343: + /* 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, 1, 0, state, se, 345, 346); + } + break; + case 348: + /* Element[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, 1, 0, state, se, 343, 344); + } + break; + case 354: + /* 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] */ + if ( se->localPart == 63 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 341, 342); + } + else if ( se->localPart == 65 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509SKI ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 341, 349); + } + else if ( se->localPart == 67 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509SubjectName ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 341, 351); + } + else if ( se->localPart == 59 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Certificate ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 341, 352); + } + else if ( se->localPart == 58 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509CRL ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 341, 353); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 5, state, se, 341, 73); + } + break; + case 355: + /* 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, 2, 0, state, se, 356, 357); + } + else if ( se->localPart == 29 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 360, 361); + } + break; + case 356: + /* 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, 358, 359); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 358, 73); + } + break; + case 358: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 358, 73); + } + break; + case 360: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 360, 73); + } + break; + case 362: + /* Element[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, 2, 0, state, se, 356, 357); + } + else if ( se->localPart == 29 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 360, 361); + } + break; + case 363: + /* 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, 1, 0, state, se, 364, 365); + } + break; + case 364: + /* 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, 364, 365); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 366, 73); + } + break; + case 366: + /* 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, 2, 0, state, se, 364, 365); + } + break; + case 367: + /* Element[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, 1, 0, state, se, 364, 365); + } + break; + case 369: + /* 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, 315, 316); + } + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyValue ) */ + return _exiEncodeStartElement(stream, 4, 1, state, se, 315, 318); + } + else if ( se->localPart == 36 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RetrievalMethod ) */ + return _exiEncodeStartElement(stream, 4, 2, state, se, 315, 326); + } + else if ( se->localPart == 60 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Data ) */ + return _exiEncodeStartElement(stream, 4, 3, state, se, 315, 340); + } + else if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPData ) */ + return _exiEncodeStartElement(stream, 4, 4, state, se, 315, 355); + } + else if ( se->localPart == 38 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKIData ) */ + return _exiEncodeStartElement(stream, 4, 5, state, se, 315, 363); + } + else if ( se->localPart == 21 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}MgmtData ) */ + return _exiEncodeStartElement(stream, 4, 6, state, se, 315, 368); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 4, 7, state, se, 315, 73); + } + break; + case 370: + /* 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, 315, 316); + } + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}KeyValue ) */ + return _exiEncodeStartElement(stream, 4, 1, state, se, 315, 318); + } + else if ( se->localPart == 36 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}RetrievalMethod ) */ + return _exiEncodeStartElement(stream, 4, 2, state, se, 315, 326); + } + else if ( se->localPart == 60 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}X509Data ) */ + return _exiEncodeStartElement(stream, 4, 3, state, se, 315, 340); + } + else if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}PGPData ) */ + return _exiEncodeStartElement(stream, 4, 4, state, se, 315, 355); + } + else if ( se->localPart == 38 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}SPKIData ) */ + return _exiEncodeStartElement(stream, 4, 5, state, se, 315, 363); + } + else if ( se->localPart == 21 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}MgmtData ) */ + return _exiEncodeStartElement(stream, 4, 6, state, se, 315, 368); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 4, 7, state, se, 315, 73); + } + break; + case 371: + /* 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, 2, 1, state, se, 373, 374); + } + break; + case 372: + /* 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, 1, 0, state, se, 373, 374); + } + break; + case 373: + /* 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, 2, 0, state, se, 373, 374); + } + break; + case 374: + /* 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, 378, 330); + } + else if ( se->localPart == 5 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestMethod ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 379, 297); + } + break; + case 375: + /* 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, 3, 2, state, se, 378, 330); + } + else if ( se->localPart == 5 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestMethod ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 379, 297); + } + break; + case 376: + /* 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, 378, 330); + } + else if ( se->localPart == 5 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestMethod ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 379, 297); + } + break; + case 377: + /* 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, 2, 0, state, se, 378, 330); + } + else if ( se->localPart == 5 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestMethod ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 379, 297); + } + break; + case 378: + /* 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, 1, 0, state, se, 379, 297); + } + break; + case 379: + /* 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, 1, 0, state, se, 380, 302); + } + break; + case 381: + /* Element[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, 0, state, se, 378, 330); + } + else if ( se->localPart == 5 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}DigestMethod ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 379, 297); + } + break; + case 382: + /* 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, 1, 0, state, se, 373, 374); + } + break; + case 383: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + if ( se->localPart == 104 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionID ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 385, 386); + } + break; + case 384: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + if ( se->localPart == 104 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 385, 386); + } + break; + case 385: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + if ( se->localPart == 84 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 388, 152); + } + else if ( se->localPart == 59 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeterInfo ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 389, 230); + } + break; + case 388: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + if ( se->localPart == 59 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeterInfo ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 389, 230); + } + break; + case 390: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + if ( se->localPart == 104 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 385, 386); + } + break; + case 391: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 392, 58); + } + break; + case 392: + /* 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, 1, 0, state, se, 393, 27); + } + break; + case 394: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 392, 58); + } + break; + case 395: + /* 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, 399, 73); + } + break; + case 396: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 399, 73); + } + break; + case 397: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 399, 73); + } + break; + case 398: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 399, 73); + } + break; + case 399: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 399, 73); + } + break; + case 400: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 399, 73); + } + break; + case 401: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 399, 73); + } + break; + case 402: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( se->localPart == 29 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 403, 107); + } + break; + case 403: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( se->localPart == 30 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 404, 95); + } + break; + case 405: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( se->localPart == 29 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 403, 107); + } + break; + case 406: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 407, 58); + } + break; + case 407: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + if ( se->localPart == 57 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}GenChallenge ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 408, 251); + } + break; + case 408: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow)] */ + if ( se->localPart == 39 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DateTimeNow ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 409, 410); + } + break; + case 411: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 407, 58); + } + break; + case 412: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + if ( se->localPart == 78 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ReadyToChargeState ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 413, 29); + } + break; + case 413: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + if ( se->localPart == 20 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingProfile ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 414, 415); + } + else if ( se->localPart == 21 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 424, 281); + } + else if ( se->localPart == 45 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 424, 304); + } + break; + case 414: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + if ( se->localPart == 21 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 424, 281); + } + else if ( se->localPart == 45 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 424, 304); + } + break; + case 415: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + if ( se->localPart == 113 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 416, 152); + } + break; + case 416: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry)] */ + if ( se->localPart == 103 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 417, 418); + } + break; + case 417: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if ( se->localPart == 103 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 417, 418); + } + break; + case 418: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + if ( se->localPart == 12 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 419, 420); + } + break; + case 419: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + if ( se->localPart == 11 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 421, 167); + } + break; + case 422: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + if ( se->localPart == 12 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 419, 420); + } + break; + case 423: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + if ( se->localPart == 113 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 416, 152); + } + break; + case 425: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + if ( se->localPart == 78 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ReadyToChargeState ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 413, 29); + } + break; + case 426: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 427, 58); + } + break; + case 427: + /* 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 == 4 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 428, 27); + } + else if ( se->localPart == 25 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 428, 61); + } + else if ( se->localPart == 65 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 428, 306); + } + break; + case 429: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 427, 58); + } + break; + case 430: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 431, 44); + } + break; + case 431: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + if ( se->localPart == 56 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVTargetVoltage ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 432, 10); + } + break; + case 432: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + if ( se->localPart == 55 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVTargetCurrent ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 433, 10); + } + break; + case 434: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 431, 44); + } + break; + case 435: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 436, 58); + } + break; + case 436: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + if ( se->localPart == 36 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 437, 61); + } + break; + case 437: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + if ( se->localPart == 53 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 438, 10); + } + break; + case 439: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 436, 58); + } + break; + case 440: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( se->localPart == 134 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceTag ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 441, 442); + } + break; + case 441: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + if ( se->localPart == 76 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FreeService ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 456, 29); + } + break; + case 442: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + if ( se->localPart == 130 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 443, 444); + } + break; + case 443: + /* 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 == 131 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceName ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 446, 447); + } + else if ( se->localPart == 127 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 449, 450); + } + else if ( se->localPart == 133 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceScope ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 452, 453); + } + break; + case 446: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + if ( se->localPart == 127 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 449, 450); + } + else if ( se->localPart == 133 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceScope ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 452, 453); + } + break; + case 449: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + if ( se->localPart == 133 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceScope ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 452, 453); + } + break; + case 455: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + if ( se->localPart == 130 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 443, 444); + } + break; + case 456: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType)] */ + if ( se->localPart == 71 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 457, 458); + } + break; + case 460: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( se->localPart == 134 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceTag ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 441, 442); + } + break; + case 461: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + if ( se->localPart == 96 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 462, 444); + } + break; + case 463: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + if ( se->localPart == 96 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 462, 444); + } + break; + case 464: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 465, 58); + } + break; + case 465: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + if ( se->localPart == 96 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 466, 444); + } + break; + case 466: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceParameterList), END_ELEMENT] */ + if ( se->localPart == 98 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceParameterList ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 467, 468); + } + break; + case 468: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + if ( se->localPart == 95 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ParameterSet ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 469, 470); + } + break; + case 469: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet), END_ELEMENT] */ + if ( se->localPart == 95 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ParameterSet ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 469, 470); + } + break; + case 470: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + if ( se->localPart == 96 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 471, 472); + } + break; + case 471: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter)] */ + if ( se->localPart == 94 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Parameter ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 473, 474); + } + break; + case 473: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter), END_ELEMENT] */ + if ( se->localPart == 94 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Parameter ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 473, 474); + } + break; + case 476: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + if ( se->localPart == 149 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}boolValue ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 477, 29); + } + else if ( se->localPart == 150 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}byteValue ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 477, 478); + } + else if ( se->localPart == 177 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}shortValue ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 477, 480); + } + else if ( se->localPart == 162 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}intValue ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 477, 481); + } + else if ( se->localPart == 168 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}physicalValue ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 477, 10); + } + else if ( se->localPart == 181 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}stringValue ) */ + return _exiEncodeStartElement(stream, 3, 5, state, se, 477, 483); + } + break; + case 484: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + if ( se->localPart == 149 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}boolValue ) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 477, 29); + } + else if ( se->localPart == 150 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}byteValue ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 477, 478); + } + else if ( se->localPart == 177 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}shortValue ) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 477, 480); + } + else if ( se->localPart == 162 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}intValue ) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 477, 481); + } + else if ( se->localPart == 168 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}physicalValue ) */ + return _exiEncodeStartElement(stream, 3, 4, state, se, 477, 10); + } + else if ( se->localPart == 181 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}stringValue ) */ + return _exiEncodeStartElement(stream, 3, 5, state, se, 477, 483); + } + break; + case 485: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + if ( se->localPart == 96 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 471, 472); + } + break; + case 486: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + if ( se->localPart == 95 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ParameterSet ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 469, 470); + } + break; + case 487: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 465, 58); + } + break; + case 488: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + if ( se->localPart == 103 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceScope ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 489, 453); + } + else if ( se->localPart == 87 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceCategory ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 490, 450); + } + break; + case 489: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + if ( se->localPart == 87 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceCategory ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 490, 450); + } + break; + case 491: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + if ( se->localPart == 103 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceScope ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 489, 453); + } + else if ( se->localPart == 87 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceCategory ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 490, 450); + } + break; + case 492: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 493, 58); + } + break; + case 493: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + if ( se->localPart == 69 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentOptions ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 494, 495); + } + break; + case 494: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeService)] */ + if ( se->localPart == 18 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeService ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 500, 440); + } + break; + case 495: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + if ( se->localPart == 99 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PaymentOption ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 496, 497); + } + break; + case 496: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] */ + if ( se->localPart == 99 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PaymentOption ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 496, 497); + } + break; + case 499: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + if ( se->localPart == 99 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}PaymentOption ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 496, 497); + } + break; + case 500: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + if ( se->localPart == 97 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceList ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 501, 502); + } + break; + case 502: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + if ( se->localPart == 126 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 503, 504); + } + break; + case 503: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 126 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 503, 504); + } + break; + case 504: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( se->localPart == 134 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceTag ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 505, 442); + } + break; + case 505: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + if ( se->localPart == 76 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FreeService ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 506, 29); + } + break; + case 507: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( se->localPart == 134 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceTag ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 505, 442); + } + break; + case 508: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + if ( se->localPart == 126 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}Service ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 503, 504); + } + break; + case 509: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 493, 58); + } + break; + case 510: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + if ( se->localPart == 85 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 511, 497); + } + break; + case 511: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedServiceList)] */ + if ( se->localPart == 86 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SelectedServiceList ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 512, 513); + } + break; + case 513: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + if ( se->localPart == 123 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SelectedService ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 514, 515); + } + break; + case 514: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService), END_ELEMENT] */ + if ( se->localPart == 123 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SelectedService ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 514, 515); + } + break; + case 515: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + if ( se->localPart == 130 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 516, 444); + } + break; + case 516: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID), END_ELEMENT] */ + if ( se->localPart == 96 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 517, 518); + } + break; + case 519: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + if ( se->localPart == 130 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 516, 444); + } + break; + case 520: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + if ( se->localPart == 123 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}SelectedService ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 514, 515); + } + break; + case 521: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + if ( se->localPart == 85 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 511, 497); + } + break; + case 522: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 523, 58); + } + break; + case 524: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 523, 58); + } + break; + case 525: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ + if ( se->localPart == 40 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVCCID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 526, 527); + } + break; + case 529: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ + if ( se->localPart == 40 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVCCID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 526, 527); + } + break; + case 530: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 531, 58); + } + break; + case 531: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + if ( se->localPart == 46 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 532, 225); + } + break; + case 532: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow), END_ELEMENT] */ + if ( se->localPart == 39 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DateTimeNow ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 533, 534); + } + break; + case 535: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 531, 58); + } + break; + case 538: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 539, 58); + } + break; + case 540: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 539, 58); + } + break; + case 541: + /* 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, 2, 1, state, se, 543, 544); + } + break; + case 542: + /* 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, 1, 0, state, se, 543, 544); + } + break; + case 543: + /* 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, 1, 0, state, se, 557, 558); + } + break; + case 544: + /* 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, 2, 1, state, se, 546, 70); + } + break; + case 545: + /* 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, 1, 0, state, se, 546, 70); + } + break; + case 546: + /* 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, 1, 0, state, se, 547, 548); + } + break; + case 547: + /* 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, 1, 0, state, se, 555, 374); + } + break; + case 549: + /* 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, 3, 0, state, se, 550, 551); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 550, 73); + } + break; + case 550: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 550, 73); + } + break; + case 553: + /* 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, 3, 0, state, se, 550, 551); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 550, 73); + } + break; + case 554: + /* 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, 3, 0, state, se, 550, 551); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 550, 73); + } + break; + case 555: + /* 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, 2, 0, state, se, 555, 374); + } + break; + case 556: + /* Element[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, 0, state, se, 546, 70); + } + break; + case 557: + /* 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, 562, 313); + } + else if ( se->localPart == 23 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Object ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 562, 395); + } + break; + case 562: + /* 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, 2, 0, state, se, 562, 395); + } + break; + case 563: + /* Element[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, 0, state, se, 543, 544); + } + break; + case 564: + /* 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, 2, 1, state, se, 566, 567); + } + break; + case 565: + /* 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, 1, 0, state, se, 566, 567); + } + break; + case 566: + /* 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, 2, 0, state, se, 566, 567); + } + break; + case 569: + /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 570, 73); + } + break; + case 570: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 570, 73); + } + break; + case 571: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 570, 73); + } + break; + case 572: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 570, 73); + } + break; + case 573: + /* Element[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, 0, state, se, 566, 567); + } + break; + case 574: + /* 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, 1, 0, state, se, 575, 576); + } + break; + case 575: + /* 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, 1, 0, state, se, 589, 590); + } + break; + case 576: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + if ( se->localPart == 2 && se->namespaceURI == 8 ) { + /* SE( {urn:iso:15118:2:2010:MsgHeader}SessionID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 577, 386); + } + break; + case 577: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + if ( se->localPart == 1 && se->namespaceURI == 8 ) { + /* SE( {urn:iso:15118:2:2010:MsgHeader}Notification ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 578, 579); + } + else if ( se->localPart == 42 && se->namespaceURI == 4 ) { + /* SE( {http://www.w3.org/2000/09/xmldsig#}Signature ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 587, 541); + } + break; + case 578: + /* Element[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, 2, 0, state, se, 587, 541); + } + break; + case 579: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + if ( se->localPart == 74 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FaultCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 580, 581); + } + break; + case 580: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + if ( se->localPart == 75 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FaultMsg ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 583, 584); + } + break; + case 586: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + if ( se->localPart == 74 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}FaultCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 580, 581); + } + break; + case 588: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + if ( se->localPart == 2 && se->namespaceURI == 8 ) { + /* SE( {urn:iso:15118:2:2010:MsgHeader}SessionID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 577, 386); + } + break; + case 590: + /* 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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), 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, 591, 40); + } + else if ( se->localPart == 2 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CableCheckReq ) */ + return _exiEncodeStartElement(stream, 6, 1, state, se, 591, 42); + } + else if ( se->localPart == 4 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CableCheckRes ) */ + return _exiEncodeStartElement(stream, 6, 2, state, se, 591, 56); + } + else if ( se->localPart == 6 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq ) */ + return _exiEncodeStartElement(stream, 6, 3, state, se, 591, 76); + } + else if ( se->localPart == 8 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes ) */ + return _exiEncodeStartElement(stream, 6, 4, state, se, 591, 91); + } + else if ( se->localPart == 10 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq ) */ + return _exiEncodeStartElement(stream, 6, 5, state, se, 591, 110); + } + else if ( se->localPart == 12 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes ) */ + return _exiEncodeStartElement(stream, 6, 6, state, se, 591, 117); + } + else if ( se->localPart == 14 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq ) */ + return _exiEncodeStartElement(stream, 6, 7, state, se, 591, 127); + } + else if ( se->localPart == 16 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes ) */ + return _exiEncodeStartElement(stream, 6, 8, state, se, 591, 145); + } + else if ( se->localPart == 21 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingStatusReq ) */ + return _exiEncodeStartElement(stream, 6, 9, state, se, 591, 220); + } + else if ( se->localPart == 23 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingStatusRes ) */ + return _exiEncodeStartElement(stream, 6, 10, state, se, 591, 222); + } + else if ( se->localPart == 25 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq ) */ + return _exiEncodeStartElement(stream, 6, 11, state, se, 591, 248); + } + else if ( se->localPart == 27 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes ) */ + return _exiEncodeStartElement(stream, 6, 12, state, se, 591, 254); + } + else if ( se->localPart == 32 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CurrentDemandReq ) */ + return _exiEncodeStartElement(stream, 6, 13, state, se, 591, 257); + } + else if ( se->localPart == 34 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CurrentDemandRes ) */ + return _exiEncodeStartElement(stream, 6, 14, state, se, 591, 269); + } + else if ( se->localPart == 60 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq ) */ + return _exiEncodeStartElement(stream, 6, 15, state, se, 591, 383); + } + else if ( se->localPart == 62 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes ) */ + return _exiEncodeStartElement(stream, 6, 16, state, se, 591, 391); + } + else if ( se->localPart == 65 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq ) */ + return _exiEncodeStartElement(stream, 6, 17, state, se, 591, 402); + } + else if ( se->localPart == 67 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes ) */ + return _exiEncodeStartElement(stream, 6, 18, state, se, 591, 406); + } + else if ( se->localPart == 70 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq ) */ + return _exiEncodeStartElement(stream, 6, 19, state, se, 591, 412); + } + else if ( se->localPart == 72 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes ) */ + return _exiEncodeStartElement(stream, 6, 20, state, se, 591, 426); + } + else if ( se->localPart == 74 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PreChargeReq ) */ + return _exiEncodeStartElement(stream, 6, 21, state, se, 591, 430); + } + else if ( se->localPart == 76 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PreChargeRes ) */ + return _exiEncodeStartElement(stream, 6, 22, state, se, 591, 435); + } + else if ( se->localPart == 88 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDetailReq ) */ + return _exiEncodeStartElement(stream, 6, 23, state, se, 591, 461); + } + else if ( se->localPart == 90 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDetailRes ) */ + return _exiEncodeStartElement(stream, 6, 24, state, se, 591, 464); + } + else if ( se->localPart == 92 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq ) */ + return _exiEncodeStartElement(stream, 6, 25, state, se, 591, 488); + } + else if ( se->localPart == 94 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes ) */ + return _exiEncodeStartElement(stream, 6, 26, state, se, 591, 492); + } + else if ( se->localPart == 99 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq ) */ + return _exiEncodeStartElement(stream, 6, 27, state, se, 591, 510); + } + else if ( se->localPart == 101 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes ) */ + return _exiEncodeStartElement(stream, 6, 28, state, se, 591, 522); + } + else if ( se->localPart == 105 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionSetupReq ) */ + return _exiEncodeStartElement(stream, 6, 29, state, se, 591, 525); + } + else if ( se->localPart == 107 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionSetupRes ) */ + return _exiEncodeStartElement(stream, 6, 30, state, se, 591, 530); + } + else if ( se->localPart == 109 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionStopReq ) */ + return _exiEncodeStartElement(stream, 6, 31, state, se, 591, 536); + } + else if ( se->localPart == 110 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionStopRes ) */ + return _exiEncodeStartElement(stream, 6, 32, state, se, 591, 538); + } + else if ( se->localPart == 113 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq ) */ + return _exiEncodeStartElement(stream, 6, 33, state, se, 591, 592); + } + else if ( se->localPart == 115 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes ) */ + return _exiEncodeStartElement(stream, 6, 34, state, se, 591, 595); + } + break; + case 592: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 593, 44); + } + break; + case 594: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 593, 44); + } + break; + case 595: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 596, 58); + } + break; + case 596: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + if ( se->localPart == 36 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 597, 61); + } + break; + case 597: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + if ( se->localPart == 53 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 598, 10); + } + break; + case 599: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 82 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 596, 58); + } + break; + case 600: + /* Element[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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), 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, 591, 40); + } + else if ( se->localPart == 2 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CableCheckReq ) */ + return _exiEncodeStartElement(stream, 6, 1, state, se, 591, 42); + } + else if ( se->localPart == 4 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CableCheckRes ) */ + return _exiEncodeStartElement(stream, 6, 2, state, se, 591, 56); + } + else if ( se->localPart == 6 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq ) */ + return _exiEncodeStartElement(stream, 6, 3, state, se, 591, 76); + } + else if ( se->localPart == 8 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes ) */ + return _exiEncodeStartElement(stream, 6, 4, state, se, 591, 91); + } + else if ( se->localPart == 10 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq ) */ + return _exiEncodeStartElement(stream, 6, 5, state, se, 591, 110); + } + else if ( se->localPart == 12 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes ) */ + return _exiEncodeStartElement(stream, 6, 6, state, se, 591, 117); + } + else if ( se->localPart == 14 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq ) */ + return _exiEncodeStartElement(stream, 6, 7, state, se, 591, 127); + } + else if ( se->localPart == 16 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes ) */ + return _exiEncodeStartElement(stream, 6, 8, state, se, 591, 145); + } + else if ( se->localPart == 21 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingStatusReq ) */ + return _exiEncodeStartElement(stream, 6, 9, state, se, 591, 220); + } + else if ( se->localPart == 23 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ChargingStatusRes ) */ + return _exiEncodeStartElement(stream, 6, 10, state, se, 591, 222); + } + else if ( se->localPart == 25 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq ) */ + return _exiEncodeStartElement(stream, 6, 11, state, se, 591, 248); + } + else if ( se->localPart == 27 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes ) */ + return _exiEncodeStartElement(stream, 6, 12, state, se, 591, 254); + } + else if ( se->localPart == 32 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CurrentDemandReq ) */ + return _exiEncodeStartElement(stream, 6, 13, state, se, 591, 257); + } + else if ( se->localPart == 34 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}CurrentDemandRes ) */ + return _exiEncodeStartElement(stream, 6, 14, state, se, 591, 269); + } + else if ( se->localPart == 60 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq ) */ + return _exiEncodeStartElement(stream, 6, 15, state, se, 591, 383); + } + else if ( se->localPart == 62 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes ) */ + return _exiEncodeStartElement(stream, 6, 16, state, se, 591, 391); + } + else if ( se->localPart == 65 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq ) */ + return _exiEncodeStartElement(stream, 6, 17, state, se, 591, 402); + } + else if ( se->localPart == 67 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes ) */ + return _exiEncodeStartElement(stream, 6, 18, state, se, 591, 406); + } + else if ( se->localPart == 70 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq ) */ + return _exiEncodeStartElement(stream, 6, 19, state, se, 591, 412); + } + else if ( se->localPart == 72 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes ) */ + return _exiEncodeStartElement(stream, 6, 20, state, se, 591, 426); + } + else if ( se->localPart == 74 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PreChargeReq ) */ + return _exiEncodeStartElement(stream, 6, 21, state, se, 591, 430); + } + else if ( se->localPart == 76 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}PreChargeRes ) */ + return _exiEncodeStartElement(stream, 6, 22, state, se, 591, 435); + } + else if ( se->localPart == 88 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDetailReq ) */ + return _exiEncodeStartElement(stream, 6, 23, state, se, 591, 461); + } + else if ( se->localPart == 90 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDetailRes ) */ + return _exiEncodeStartElement(stream, 6, 24, state, se, 591, 464); + } + else if ( se->localPart == 92 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq ) */ + return _exiEncodeStartElement(stream, 6, 25, state, se, 591, 488); + } + else if ( se->localPart == 94 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes ) */ + return _exiEncodeStartElement(stream, 6, 26, state, se, 591, 492); + } + else if ( se->localPart == 99 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq ) */ + return _exiEncodeStartElement(stream, 6, 27, state, se, 591, 510); + } + else if ( se->localPart == 101 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes ) */ + return _exiEncodeStartElement(stream, 6, 28, state, se, 591, 522); + } + else if ( se->localPart == 105 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionSetupReq ) */ + return _exiEncodeStartElement(stream, 6, 29, state, se, 591, 525); + } + else if ( se->localPart == 107 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionSetupRes ) */ + return _exiEncodeStartElement(stream, 6, 30, state, se, 591, 530); + } + else if ( se->localPart == 109 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionStopReq ) */ + return _exiEncodeStartElement(stream, 6, 31, state, se, 591, 536); + } + else if ( se->localPart == 110 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}SessionStopRes ) */ + return _exiEncodeStartElement(stream, 6, 32, state, se, 591, 538); + } + else if ( se->localPart == 113 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq ) */ + return _exiEncodeStartElement(stream, 6, 33, state, se, 591, 592); + } + else if ( se->localPart == 115 && se->namespaceURI == 5 ) { + /* SE( {urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes ) */ + return _exiEncodeStartElement(stream, 6, 34, state, se, 591, 595); + } + break; + case 601: + /* Element[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, 1, 0, state, se, 575, 576); + } + break; + case 602: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 602, 73); + } + break; + case 627: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 628, 73); + } + break; + case 628: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 628, 73); + } + break; + case 688: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + if ( se->localPart == 106 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 311, 160); + } + else if ( se->localPart == 144 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}TimeInterval ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 311, 169); + } + break; + case 691: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( se->localPart == 134 && se->namespaceURI == 6 ) { + /* SE( {urn:iso:15118:2:2010:MsgDataTypes}ServiceTag ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 505, 442); + } + break; + + default: + return EXI_ERROR_UNEXPECTED_START_ELEMENT; + } + + return EXI_ERROR_UNEXPECTED_START_ELEMENT; +} + +/* Qualified Name unknown!! */ +#if EXI_DEBUG == EXI_DEBUG_ON +static int exiEncodeStartElementGenericUnknown(bitstream_t* stream, exi_state_t* state, + char** uri, char** localName) { + uint16_t grammarID; + uint16_t eventCodeLength; + + int errn = _exiGet1stLevelEventCode(state, EXI_EVENT_START_ELEMENT_GENERIC, &grammarID); + if (errn < 0) { + return errn; + } else if (errn == 1) { + /* not found --> try undeclared SE */ + errn = _exiGet1stLevelEventCode(state, EXI_EVENT_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]) { + /* $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 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 0; +} +#endif /*EXI_DEBUG*/ + + +/* Look first for qualified name */ +int exiEncodeStartElementGeneric(bitstream_t* stream, exi_state_t* state, + string_ascii_t* namespaceURI , string_ascii_t* localName) { + int errn = -1; + +#if EXI_DEBUG == EXI_DEBUG_ON + eqname_t se; + /* uri */ + 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); + } + } +#endif /*EXI_DEBUG*/ + + return errn; +} + +static int _exiEncodeEndElementUndeclared(bitstream_t* stream, exi_state_t* state) { + int16_t currentID = state->grammarStack[state->stackIndex]; + switch (currentID) { + case 7: + /* Element[] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 0, 0); + encodeNBitUnsignedInteger(stream, 2, 0); + return 0; + case 376: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 286: + /* 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)] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 3, 0); + return 0; + case 265: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + case 228: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 210: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + case 68: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + case 571: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 262: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 199: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 282: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + case 206: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + case 46: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + case 385: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + case 381: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 134: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + case 171: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 312: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 572: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 290: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + case 11: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + case 362: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ + case 176: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 2, 2); + encodeNBitUnsignedInteger(stream, 2, 0); + return 0; + case 476: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + case 340: + /* 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] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 3, 6); + encodeNBitUnsignedInteger(stream, 3, 0); + return 0; + case 158: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 544: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 61: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + case 688: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 569: + /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + case 110: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 558: + /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] */ + case 567: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Target)] */ + case 564: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 371: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 76: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + case 184: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 355: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ + case 377: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 541: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + case 310: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + case 383: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 2, 2); + encodeNBitUnsignedInteger(stream, 3, 0); + return 0; + case 164: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 49: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 372: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 584: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 187: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + case 568: + /* StartTag[ATTRIBUTE[STRING](Target)] */ + case 391: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 662: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 79: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 670: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 651: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 150: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 236: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 645: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 515: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 77: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + case 613: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 18: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 27: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + case 192: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 332: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 603: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 12: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 617: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 527: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 242: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 480: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 418: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + case 25: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + case 98: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 88: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 103: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 621: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 534: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 174: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + case 167: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 504: + /* First(xsi:type)StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 653: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 666: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 637: + /* FirstStartTag[CHARACTERS[DECIMAL]] */ + case 576: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + case 155: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + case 148: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + case 353: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 363: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + case 63: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 368: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 530: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 545: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 464: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 330: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + case 674: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 239: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 29: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 542: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + case 189: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 672: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 95: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 3: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + case 631: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 641: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 91: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + case 152: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 673: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 281: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 384: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + case 430: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 361: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 658: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 579: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + case 406: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 619: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 288: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 129: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 297: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 461: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + case 117: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + case 160: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + case 230: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + case 538: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 478: + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 442: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 609: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 458: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 581: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 412: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + case 607: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 402: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 513: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + case 502: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + case 574: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + case 410: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 615: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 565: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 551: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 560: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 125: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 692: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 655: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 525: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ + case 639: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + case 470: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + case 232: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 522: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 190: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + case 632: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 450: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 195: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 444: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 10: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + case 178: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 386: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 346: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 659: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 657: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 248: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + case 472: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 118: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 679: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 357: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 415: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 678: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 92: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 595: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 661: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 453: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 481: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 84: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 435: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 611: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 676: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 548: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 559: + /* StartTag[CHARACTERS[BINARY_BASE64]] */ + case 691: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 342: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + case 249: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 643: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + case 251: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 344: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 349: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 145: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 15: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 33: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 483: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 352: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 623: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 495: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + case 420: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 649: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 132: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 605: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 320: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + case 592: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 175: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + case 625: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 42: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 518: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + case 66: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 497: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 447: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 492: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 127: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + case 269: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 629: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 107: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 70: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + case 56: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 225: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 181: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 351: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 668: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 664: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 52: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 257: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 254: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 162: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 82: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ + case 475: + /* StartTag[ATTRIBUTE[ENUMERATION](ValueType)] */ + case 468: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + case 633: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 647: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 365: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 426: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 440: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 44: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + case 302: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 359: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + case 510: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + case 204: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + case 111: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 222: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 335: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 58: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 316: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 635: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 5: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 474: + /* FirstStartTag[ATTRIBUTE[STRING](Name)] */ + case 681: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 0); + return 0; + case 370: + /* 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]] */ + case 369: + /* 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]] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 4, 9); + encodeNBitUnsignedInteger(stream, 2, 0); + return 0; + case 314: + /* 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]] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 4, 9); + encodeNBitUnsignedInteger(stream, 3, 0); + return 0; + case 354: + /* 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] */ + case 484: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 3, 6); + encodeNBitUnsignedInteger(stream, 2, 0); + return 0; + case 324: + /* 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]] */ + case 260: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 325: + /* 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]] */ + case 224: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 2, 0); + return 0; + case 374: + /* 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)] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 3, 5); + encodeNBitUnsignedInteger(stream, 3, 0); + return 0; + case 313: + /* 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]] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 4, 10); + encodeNBitUnsignedInteger(stream, 3, 0); + return 0; + case 375: + /* 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)] */ + case 318: + /* 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]] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 3, 0); + return 0; + case 159: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMax)] */ + case 367: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + case 434: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 482: + /* Element[CHARACTERS[INTEGER]] */ + case 614: + /* Element[CHARACTERS[STRING]] */ + case 350: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 640: + /* Element[CHARACTERS[FLOAT]] */ + case 9: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxVoltage)] */ + case 202: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + case 122: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 620: + /* Element[CHARACTERS[STRING]] */ + case 682: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 423: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 531: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 317: + /* Element[CHARACTERS[STRING]] */ + case 408: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow)] */ + case 552: + /* Element[CHARACTERS[INTEGER]] */ + case 520: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + case 201: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + case 209: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit)] */ + case 237: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 28: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + case 275: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved)] */ + case 528: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 431: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + case 669: + /* Element[CHARACTERS[STRING]] */ + case 675: + /* Element[CHARACTERS[DATETIME]] */ + case 636: + /* Element[CHARACTERS[DATETIME]] */ + case 274: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved)] */ + case 104: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 648: + /* Element[CHARACTERS[DATETIME]] */ + case 126: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 379: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue)] */ + case 494: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeService)] */ + case 121: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 601: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + case 493: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + case 283: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + case 81: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 456: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType)] */ + case 105: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + case 459: + /* Element[CHARACTERS[ENUMERATION]] */ + case 509: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 604: + /* Element[CHARACTERS[LIST]] */ + case 612: + /* Element[CHARACTERS[LIST]] */ + case 343: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber)] */ + case 660: + /* Element[CHARACTERS[STRING]] */ + case 425: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + case 626: + /* Element[CHARACTERS[STRING]] */ + case 287: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q)] */ + case 31: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + case 207: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + case 116: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 519: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 465: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + case 441: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 671: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 109: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 219: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 499: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + case 388: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + case 403: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 39: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + case 69: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 667: + /* Element[CHARACTERS[INTEGER]] */ + case 460: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 16: + /* Element[CHARACTERS[ENUMERATION]] */ + case 392: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + case 608: + /* Element[CHARACTERS[STRING]] */ + case 582: + /* Element[CHARACTERS[ENUMERATION]] */ + case 597: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 120: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + case 151: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxSchedule)] */ + case 268: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 644: + /* Element[CHARACTERS[FLOAT]] */ + case 654: + /* Element[CHARACTERS[DATETIME]] */ + case 182: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 57: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 511: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedServiceList)] */ + case 405: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 291: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + case 24: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + case 59: + /* Element[CHARACTERS[ENUMERATION]] */ + case 26: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage)] */ + case 80: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 36: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent)] */ + case 540: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 78: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + case 180: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry)] */ + case 89: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 535: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 198: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + case 529: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ + case 4: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EAmount)] */ + case 263: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 507: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + case 197: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + case 390: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + case 48: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSSOC)] */ + case 240: + /* Element[CHARACTERS[INTEGER]] */ + case 191: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amount)] */ + case 416: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry)] */ + case 113: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + case 94: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + case 93: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 323: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + case 616: + /* Element[CHARACTERS[STRING]] */ + case 270: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 422: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + case 665: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 223: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 463: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + case 543: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue)] */ + case 303: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 634: + /* Element[CHARACTERS[DATETIME]] */ + case 208: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit)] */ + case 85: + /* Element[CHARACTERS[STRING]] */ + case 179: + /* Element[CHARACTERS[STRING]] */ + case 30: + /* Element[CHARACTERS[BOOLEAN]] */ + case 471: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter)] */ + case 638: + /* Element[CHARACTERS[DECIMAL]] */ + case 594: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 144: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + case 205: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit)] */ + case 563: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + case 20: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + case 177: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + case 606: + /* Element[CHARACTERS[STRING]] */ + case 130: + /* Element[CHARACTERS[ENUMERATION]] */ + case 508: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + case 243: + /* Element[CHARACTERS[INTEGER]] */ + case 123: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RetryCounter)] */ + case 19: + /* Element[CHARACTERS[INTEGER]] */ + case 622: + /* Element[CHARACTERS[STRING]] */ + case 382: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 256: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 86: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ + case 229: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 445: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 258: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + case 226: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 618: + /* Element[CHARACTERS[LIST]] */ + case 289: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 646: + /* Element[CHARACTERS[DATETIME]] */ + case 448: + /* Element[CHARACTERS[STRING]] */ + case 294: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter)] */ + case 112: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 114: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 347: + /* Element[CHARACTERS[INTEGER]] */ + case 90: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + case 677: + /* Element[CHARACTERS[STRING]] */ + case 642: + /* Element[CHARACTERS[STRING]] */ + case 266: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + case 14: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + case 610: + /* Element[CHARACTERS[STRING]] */ + case 596: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 407: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 37: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent)] */ + case 585: + /* Element[CHARACTERS[STRING]] */ + case 479: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 141: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 53: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 8: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 62: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + case 394: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 650: + /* Element[CHARACTERS[DATETIME]] */ + case 338: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + case 214: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + case 436: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + case 321: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent)] */ + case 32: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}StopCharging)] */ + case 135: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + case 245: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + case 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 211: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + case 680: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 156: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry)] */ + case 119: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + case 233: + /* Element[CHARACTERS[STRING]] */ + case 253: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + case 486: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + case 67: + /* Element[CHARACTERS[ENUMERATION]] */ + case 153: + /* Element[CHARACTERS[INTEGER]] */ + case 419: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + case 437: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 411: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 271: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + case 432: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + case 387: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 272: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent)] */ + case 624: + /* Element[CHARACTERS[STRING]] */ + case 455: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 656: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 546: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod)] */ + case 547: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + case 50: + /* Element[CHARACTERS[ENUMERATION]] */ + case 273: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved)] */ + case 652: + /* Element[CHARACTERS[DATETIME]] */ + case 556: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + case 599: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 64: + /* Element[CHARACTERS[ENUMERATION]] */ + case 35: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + case 22: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMinCurrent)] */ + case 168: + /* Element[CHARACTERS[INTEGER]] */ + case 252: + /* Element[CHARACTERS[STRING]] */ + case 47: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + case 165: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + case 498: + /* Element[CHARACTERS[ENUMERATION]] */ + case 108: + /* Element[CHARACTERS[STRING]] */ + case 102: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + case 586: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + case 487: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 485: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + case 429: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 505: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + case 172: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + case 378: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + case 133: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumCurrentLimit)] */ + case 244: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + case 663: + /* Element[CHARACTERS[INTEGER]] */ + case 524: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 13: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 693: + /* Element[CHARACTERS[ENUMERATION]] */ + case 285: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + case 630: + /* Element[CHARACTERS[STRING]] */ + case 454: + /* Element[CHARACTERS[STRING]] */ + case 100: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + case 21: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxCurrent)] */ + case 185: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceLevel)] */ + case 193: + /* Element[CHARACTERS[ENUMERATION]] */ + case 280: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 521: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + case 439: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 451: + /* Element[CHARACTERS[ENUMERATION]] */ + case 575: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + case 561: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 55: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + case 573: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + case 200: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + case 348: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + case 588: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + case 247: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 0); + return 0; + case 259: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 146: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules), 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)] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 3, 5); + encodeNBitUnsignedInteger(stream, 2, 0); + return 0; + case 45: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVCabinConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + case 427: + /* 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 264: + /* 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}EVTargetVoltage)] */ + case 128: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVChargeParameter)] */ + case 261: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + case 296: + /* Element[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 227: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + case 147: + /* 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)] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 2, 0); + return 0; + + } + 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 315: + /* 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 341: + /* 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 = encodeNBitUnsignedInteger(stream, 3, 6); + break; + case 334: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 333: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 336: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 337: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 397: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 549: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 553: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 554: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 73: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 627: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 3, 2); + break; + case 72: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 71: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 74: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 75: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 83: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID), END_ELEMENT] */ + case 99: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] */ + case 96: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] */ + case 139: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}duration), END_ELEMENT] */ + case 157: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), END_ELEMENT] */ + case 194: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amountMultiplier), END_ELEMENT] */ + case 188: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Cost), END_ELEMENT] */ + case 186: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConsumptionCost), END_ELEMENT] */ + case 183: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), END_ELEMENT] */ + case 154: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariff), END_ELEMENT] */ + case 149: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple), END_ELEMENT] */ + case 212: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered), END_ELEMENT] */ + case 238: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 278: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 293: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + case 299: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 298: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 300: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 301: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 331: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), END_ELEMENT] */ + case 328: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 339: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 358: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + case 360: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + case 366: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), END_ELEMENT] */ + case 373: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + case 399: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 398: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 400: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 401: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 417: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + case 449: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 473: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter), END_ELEMENT] */ + case 469: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet), END_ELEMENT] */ + case 466: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceParameterList), END_ELEMENT] */ + case 489: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + case 496: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] */ + case 503: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 500: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + case 516: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID), END_ELEMENT] */ + case 514: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService), END_ELEMENT] */ + case 532: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow), END_ELEMENT] */ + case 550: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 555: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + case 562: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + case 570: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 566: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), END_ELEMENT] */ + case 580: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + case 578: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + case 602: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 628: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 2, 1); + break; + case 6: + /* Element[END_ELEMENT] */ + case 17: + /* Element[END_ELEMENT] */ + case 23: + /* Element[END_ELEMENT] */ + case 34: + /* Element[END_ELEMENT] */ + case 38: + /* Element[END_ELEMENT] */ + case 40: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 41: + /* Element[END_ELEMENT] */ + case 51: + /* Element[END_ELEMENT] */ + case 43: + /* Element[END_ELEMENT] */ + case 65: + /* Element[END_ELEMENT] */ + case 60: + /* Element[END_ELEMENT] */ + case 87: + /* Element[END_ELEMENT] */ + case 97: + /* Element[END_ELEMENT] */ + case 106: + /* Element[END_ELEMENT] */ + case 115: + /* Element[END_ELEMENT] */ + case 124: + /* Element[END_ELEMENT] */ + case 131: + /* Element[END_ELEMENT] */ + case 140: + /* Element[END_ELEMENT] */ + case 142: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 143: + /* Element[END_ELEMENT] */ + case 163: + /* Element[END_ELEMENT] */ + case 166: + /* Element[END_ELEMENT] */ + case 169: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 170: + /* Element[END_ELEMENT] */ + case 196: + /* Element[END_ELEMENT] */ + case 173: + /* Element[END_ELEMENT] */ + case 203: + /* Element[END_ELEMENT] */ + case 213: + /* Element[END_ELEMENT] */ + case 215: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 216: + /* Element[END_ELEMENT] */ + case 217: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 218: + /* Element[END_ELEMENT] */ + case 220: + /* FirstStartTag[END_ELEMENT] */ + case 221: + /* Element[END_ELEMENT] */ + case 241: + /* Element[END_ELEMENT] */ + case 246: + /* Element[END_ELEMENT] */ + case 250: + /* Element[END_ELEMENT] */ + case 255: + /* Element[END_ELEMENT] */ + case 267: + /* Element[END_ELEMENT] */ + case 279: + /* Element[END_ELEMENT] */ + case 284: + /* Element[END_ELEMENT] */ + case 295: + /* Element[END_ELEMENT] */ + case 304: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 305: + /* Element[END_ELEMENT] */ + case 306: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 307: + /* Element[END_ELEMENT] */ + case 308: + /* First(xsi:type)StartTag[END_ELEMENT] */ + case 309: + /* Element[END_ELEMENT] */ + case 311: + /* Element[END_ELEMENT] */ + case 322: + /* Element[END_ELEMENT] */ + case 329: + /* Element[END_ELEMENT] */ + case 345: + /* Element[END_ELEMENT] */ + case 380: + /* Element[END_ELEMENT] */ + case 389: + /* Element[END_ELEMENT] */ + case 393: + /* Element[END_ELEMENT] */ + case 404: + /* Element[END_ELEMENT] */ + case 409: + /* Element[END_ELEMENT] */ + case 421: + /* Element[END_ELEMENT] */ + case 424: + /* Element[END_ELEMENT] */ + case 428: + /* Element[END_ELEMENT] */ + case 433: + /* Element[END_ELEMENT] */ + case 438: + /* Element[END_ELEMENT] */ + case 452: + /* Element[END_ELEMENT] */ + case 457: + /* Element[END_ELEMENT] */ + case 462: + /* Element[END_ELEMENT] */ + case 477: + /* Element[END_ELEMENT] */ + case 467: + /* Element[END_ELEMENT] */ + case 490: + /* Element[END_ELEMENT] */ + case 506: + /* Element[END_ELEMENT] */ + case 501: + /* Element[END_ELEMENT] */ + case 517: + /* Element[END_ELEMENT] */ + case 512: + /* Element[END_ELEMENT] */ + case 523: + /* Element[END_ELEMENT] */ + case 526: + /* Element[END_ELEMENT] */ + case 533: + /* Element[END_ELEMENT] */ + case 536: + /* FirstStartTag[END_ELEMENT] */ + case 537: + /* Element[END_ELEMENT] */ + case 539: + /* Element[END_ELEMENT] */ + case 583: + /* Element[END_ELEMENT] */ + case 587: + /* Element[END_ELEMENT] */ + case 591: + /* Element[END_ELEMENT] */ + case 593: + /* Element[END_ELEMENT] */ + case 598: + /* Element[END_ELEMENT] */ + case 589: + /* Element[END_ELEMENT] */ + case 683: + /* FirstStartTag[END_ELEMENT] */ + case 684: + /* FirstStartTag[END_ELEMENT] */ + case 685: + /* FirstStartTag[END_ELEMENT] */ + case 686: + /* FirstStartTag[END_ELEMENT] */ + case 687: + /* FirstStartTag[END_ELEMENT] */ + case 689: + /* FirstStartTag[END_ELEMENT] */ + case 690: + /* FirstStartTag[END_ELEMENT] */ + case 694: + /* FirstStartTag[END_ELEMENT] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + break; + case 590: + /* 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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] */ + case 600: + /* Element[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}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), 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}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), 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}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] */ + errn = encodeNBitUnsignedInteger(stream, 6, 35); + break; + case 137: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 234: + /* 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 276: + /* 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 326: + /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 396: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 413: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + case 443: + /* 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, 3, 3); + break; + case 319: + /* Element[END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 2, 0); + break; + case 138: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 235: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 277: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + case 292: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + case 327: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + case 356: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT_GENERIC, END_ELEMENT] */ + case 364: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT_GENERIC, END_ELEMENT] */ + case 414: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + case 446: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 488: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + case 491: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + case 557: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + case 577: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + errn = encodeNBitUnsignedInteger(stream, 2, 2); + break; + case 136: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + case 231: + /* 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 395: + /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 3, 4); + break; + + default: + 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 == EXI_DATATYPE_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) { + int errn; + int16_t currentID = state->grammarStack[state->stackIndex]; + switch (currentID) { + case 627: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 628; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 3, 5); + } + break; + case 333: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 336; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 2, 3); + } + break; + case 634: + case 636: + case 646: + case 648: + case 650: + case 652: + case 654: + case 675: + /* Element[CHARACTERS[DATETIME]] */ + if (val->type == EXI_DATATYPE_DATETIME) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeDateTime(stream, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 399: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 399; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 318: + /* 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 == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 324; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 71: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 74; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 2, 3); + } + break; + case 571: + case 572: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 1); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 571; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 2); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 74: + case 75: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 74; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 400: + case 401: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 400; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 569: + /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 1); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 571; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 2); + encodeNBitUnsignedInteger(stream, 3, 4); + } + break; + case 334: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 334; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 64: + case 193: + case 451: + case 582: + /* Element[CHARACTERS[ENUMERATION]] */ + if (val->type == EXI_DATATYPE_ENUMERATION) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeNBitUnsignedInteger(stream, 2, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 444: + case 664: + case 670: + case 678: + case 679: + case 681: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeUnsignedInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 72: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 72; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 628: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 628; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 638: + /* Element[CHARACTERS[DECIMAL]] */ + if (val->type == EXI_DATATYPE_DECIMAL) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeDecimal(stream, &val->decimal); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 395: + /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 5); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 400; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 6); + encodeNBitUnsignedInteger(stream, 3, 5); + } + break; + case 13: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 3, -3); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 316: + case 335: + case 344: + case 351: + case 368: + case 483: + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 15: + case 49: + case 66: + case 458: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + if (val->type == EXI_DATATYPE_ENUMERATION) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeNBitUnsignedInteger(stream, 4, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 640: + case 644: + /* Element[CHARACTERS[FLOAT]] */ + if (val->type == EXI_DATATYPE_FLOAT) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeFloat(stream, &val->float_me); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 396: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 4); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 400; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 5); + encodeNBitUnsignedInteger(stream, 2, 3); + } + break; + case 73: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 602; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 3, 5); + } + break; + case 549: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 553; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 2, 3); + } + break; + case 298: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 300; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 2, 3); + } + break; + case 349: + case 352: + case 353: + case 357: + case 359: + case 361: + case 365: + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + if (val->type == EXI_DATATYPE_BINARY_BASE64) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 53: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 7, 0); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 570: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 570; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 12: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 3, -3); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 558: + /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] */ + if (val->type == EXI_DATATYPE_BINARY_BASE64) { + encodeNBitUnsignedInteger(stream, 2, 1); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 2); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 553: + case 554: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 553; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 19: + case 153: + case 168: + case 240: + case 243: + case 347: + case 482: + case 552: + case 663: + case 667: + /* Element[CHARACTERS[INTEGER]] */ + if (val->type == EXI_DATATYPE_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 300: + case 301: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 300; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 79: + case 88: + case 103: + case 236: + case 288: + case 302: + case 560: + case 631: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + if (val->type == EXI_DATATYPE_BINARY_BASE64) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 152: + case 167: + case 239: + case 551: + case 657: + case 658: + case 661: + case 662: + case 666: + case 672: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + if (val->type == EXI_DATATYPE_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 398: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 400; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 2, 3); + } + break; + case 85: + case 108: + case 179: + case 233: + case 252: + case 317: + case 448: + case 454: + case 585: + case 606: + case 608: + case 610: + case 614: + case 616: + case 620: + case 622: + case 624: + case 626: + case 630: + case 642: + case 660: + case 669: + case 677: + /* Element[CHARACTERS[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 129: + case 692: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + if (val->type == EXI_DATATYPE_ENUMERATION) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeNBitUnsignedInteger(stream, 3, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 637: + /* FirstStartTag[CHARACTERS[DECIMAL]] */ + if (val->type == EXI_DATATYPE_DECIMAL) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeDecimal(stream, &val->decimal); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 8: + case 445: + case 665: + case 671: + case 680: + case 682: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeUnsignedInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 479: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 8, -128); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 63: + case 192: + case 450: + case 581: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + if (val->type == EXI_DATATYPE_ENUMERATION) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeNBitUnsignedInteger(stream, 2, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 80: + case 89: + case 104: + case 237: + case 289: + case 303: + case 350: + case 561: + /* Element[CHARACTERS[BINARY_BASE64]] */ + if (val->type == EXI_DATATYPE_BINARY_BASE64) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 84: + case 107: + case 178: + case 232: + case 251: + case 447: + case 453: + case 584: + case 605: + case 607: + case 609: + case 613: + case 615: + case 619: + case 621: + case 623: + case 625: + case 629: + case 641: + case 659: + case 668: + case 673: + case 676: + /* FirstStartTag[CHARACTERS[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 314: + /* 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 == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 4, 8); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 369; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 4, 9); + encodeNBitUnsignedInteger(stream, 3, 4); + } + break; + case 18: + case 125: + case 242: + case 346: + case 410: + case 472: + case 480: + case 481: + case 518: + case 534: + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + if (val->type == EXI_DATATYPE_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 58: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + if (val->type == EXI_DATATYPE_ENUMERATION) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeNBitUnsignedInteger(stream, 5, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 226: + case 387: + case 528: + case 656: + /* Element[CHARACTERS[BINARY_HEX]] */ + if (val->type == EXI_DATATYPE_BINARY_HEX) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 369: + case 370: + /* 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 == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 4, 8); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 369; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 4, 9); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 319: + /* Element[END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 1); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 319; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 2); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 498: + /* Element[CHARACTERS[ENUMERATION]] */ + if (val->type == EXI_DATATYPE_ENUMERATION) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeNBitUnsignedInteger(stream, 1, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 315: + /* 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 == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 4, 9); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 315; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 4, 10); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 52: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 7, 0); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 602: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 602; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 29: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + if (val->type == EXI_DATATYPE_BOOLEAN) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBoolean(stream, val->boolean); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 478: + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 8, -128); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 16: + case 50: + case 67: + case 459: + /* Element[CHARACTERS[ENUMERATION]] */ + if (val->type == EXI_DATATYPE_ENUMERATION) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeNBitUnsignedInteger(stream, 4, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 633: + case 635: + case 645: + case 647: + case 649: + case 651: + case 653: + case 674: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + if (val->type == EXI_DATATYPE_DATETIME) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeDateTime(stream, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 604: + case 612: + case 618: + /* Element[CHARACTERS[LIST]] */ + if (val->type == EXI_DATATYPE_LIST) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeUnsignedInteger32(stream, val->list.len); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 336: + case 337: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 336; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 313: + /* 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 == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 4, 9); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 369; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 4, 10); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 639: + case 643: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + if (val->type == EXI_DATATYPE_FLOAT) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeFloat(stream, &val->float_me); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 603: + case 611: + case 617: + /* FirstStartTag[CHARACTERS[LIST]] */ + if (val->type == EXI_DATATYPE_LIST) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeUnsignedInteger32(stream, val->list.len); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 550: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 550; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 497: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + if (val->type == EXI_DATATYPE_ENUMERATION) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeNBitUnsignedInteger(stream, 1, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 559: + /* StartTag[CHARACTERS[BINARY_BASE64]] */ + if (val->type == EXI_DATATYPE_BINARY_BASE64) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 4); + } + break; + case 182: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 8, 0); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 181: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 8, 0); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 59: + /* Element[CHARACTERS[ENUMERATION]] */ + if (val->type == EXI_DATATYPE_ENUMERATION) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeNBitUnsignedInteger(stream, 5, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 225: + case 386: + case 527: + case 655: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + if (val->type == EXI_DATATYPE_BINARY_HEX) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 299: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 299; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 5: + case 33: + case 162: + case 164: + case 189: + case 195: + case 420: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeUnsignedInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 397: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 400; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 2, 3); + } + break; + case 632: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 8, -128); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 30: + /* Element[CHARACTERS[BOOLEAN]] */ + if (val->type == EXI_DATATYPE_BOOLEAN) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBoolean(stream, val->boolean); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 324: + case 325: + /* 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 == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 324; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 130: + case 693: + /* Element[CHARACTERS[ENUMERATION]] */ + if (val->type == EXI_DATATYPE_ENUMERATION) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeNBitUnsignedInteger(stream, 3, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 6; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + + default: + return EXI_ERROR_UNEXPECTED_CHARACTERS; + } + + 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) { + int16_t currentID = state->grammarStack[state->stackIndex]; + switch (currentID) { + case 70: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + if ( at->localPart == 0 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 71; + return 0; + } + } + break; + case 76: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 77; + return 0; + } + } + break; + case 91: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 92; + return 0; + } + } + break; + case 110: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 111; + return 0; + } + } + break; + case 117: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 118; + return 0; + } + } + break; + case 174: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 175; + return 0; + } + } + break; + case 248: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 249; + return 0; + } + } + break; + case 297: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + if ( at->localPart == 0 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 298; + return 0; + } + } + break; + case 313: + /* 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 == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 314; + return 0; + } + } + break; + case 326: + /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + if ( at->localPart == 6 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 327; + return 0; + } + } + else if ( at->localPart == 7 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 1); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 328; + return 0; + } + } + break; + case 327: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + if ( at->localPart == 7 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 328; + return 0; + } + } + break; + case 332: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + if ( at->localPart == 0 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 333; + return 0; + } + } + break; + case 371: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 372; + return 0; + } + } + break; + case 374: + /* 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 == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 375; + return 0; + } + } + else if ( at->localPart == 6 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 1); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 376; + return 0; + } + } + else if ( at->localPart == 7 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 2); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 377; + return 0; + } + } + break; + case 375: + /* 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 == 6 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 376; + return 0; + } + } + else if ( at->localPart == 7 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 1); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 377; + return 0; + } + } + break; + case 376: + /* 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 == 7 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 377; + return 0; + } + } + break; + case 383: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 384; + return 0; + } + } + break; + case 395: + /* 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 == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 396; + return 0; + } + } + else if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 1); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 397; + return 0; + } + } + else if ( at->localPart == 3 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 2); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 398; + return 0; + } + } + break; + case 396: + /* 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 == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 397; + return 0; + } + } + else if ( at->localPart == 3 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 1); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 398; + return 0; + } + } + break; + case 397: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( at->localPart == 3 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 3, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 398; + return 0; + } + } + break; + case 474: + /* FirstStartTag[ATTRIBUTE[STRING](Name)] */ + if ( at->localPart == 4 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 475; + return 0; + } + } + break; + case 475: + /* StartTag[ATTRIBUTE[ENUMERATION](ValueType)] */ + if ( at->localPart == 8 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == EXI_DATATYPE_ENUMERATION) { + errn = encodeNBitUnsignedInteger(stream, 3, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 476; + return 0; + } + } + break; + case 541: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 542; + return 0; + } + } + break; + case 544: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 545; + return 0; + } + } + break; + case 548: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + if ( at->localPart == 0 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 549; + return 0; + } + } + break; + case 558: + /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 559; + return 0; + } + } + break; + case 564: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 565; + return 0; + } + } + break; + case 567: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Target)] */ + if ( at->localPart == 2 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 568; + return 0; + } + } + else if ( at->localPart == 5 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 2, 1); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 569; + return 0; + } + } + break; + case 568: + /* StartTag[ATTRIBUTE[STRING](Target)] */ + if ( at->localPart == 5 && at->namespaceURI == 0 ) { + encodeNBitUnsignedInteger(stream, 1, 0); + if (val->type == EXI_DATATYPE_STRING) { + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 569; + return 0; + } + } + break; + + } + + /* no expected attribute */ + if (currentID < 0) { + /* runtime element */ + return -1; + } else { + return +1; + } + + /* return EXI_ERROR_UNEXPECTED_ATTRIBUTE; */ +} + +#if EXI_DEBUG == EXI_DEBUG_ON +static 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; + +} +#endif /*EXI_DEBUG*/ + +int exiEncodeAttributeXsiNil(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + + switch (state->grammarStack[state->stackIndex]) { + + } + + 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 5: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 18: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 33: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 40: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 0); + break; + case 125: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 142: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 0); + break; + case 162: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 164: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 169: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 0); + break; + case 189: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 195: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 215: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 0); + break; + case 217: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 0); + break; + case 242: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 304: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 0); + break; + case 306: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 0); + break; + case 308: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 0); + break; + case 310: + errn = encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 316: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 335: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 344: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 346: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 349: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 351: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 352: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 353: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 357: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 359: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 361: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 365: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 368: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 410: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 420: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 472: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 478: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 480: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 481: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 483: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 504: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 518: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 534: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 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 new file mode 100644 index 0000000..3db596d --- /dev/null +++ b/src/codec/EXIEncoder.h @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef EXI__ENCODER_H +#define EXI__ENCODER_H + +#include "EXITypes.h" + +int exiInitEncoder(bitstream_t* stream, exi_state_t* state, + exi_name_table_runtime_t runtimeTable); + +int exiEncodeStartDocument(bitstream_t* stream, + exi_state_t* state); + +int exiEncodeEndDocument(bitstream_t* stream, + exi_state_t* state); + +int +exiEncodeStartElement(bitstream_t* stream, + exi_state_t* state, eqname_t* se); + +int exiEncodeStartElementGeneric(bitstream_t* stream, + exi_state_t* state, string_ascii_t* namespaceURI, + string_ascii_t* localName); + +int exiEncodeEndElement(bitstream_t* stream, + exi_state_t* state); + +int exiEncodeCharacters(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiEncodeAttribute(bitstream_t* stream, + exi_state_t* state, eqname_t* at, exi_value_t* val); + +int exiEncodeAttributeXsiNil(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiEncodeAttributeXsiType(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiEncodeListValue(bitstream_t* stream, exi_value_t* val, + list_t lt); + +#endif + +#ifdef __cplusplus +} +#endif + diff --git a/src/codec/EXIHeaderDecoder.c b/src/codec/EXIHeaderDecoder.c new file mode 100644 index 0000000..12d9f2f --- /dev/null +++ b/src/codec/EXIHeaderDecoder.c @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#include "EXIHeaderDecoder.h" +#include "BitInputStream.h" +#include "DecoderChannel.h" + +#ifndef EXI_HEADER_DECODER_C +#define EXI_HEADER_DECODER_C + +int readEXIHeader(bitstream_t* stream) { + uint32_t header = 0; + int errn = readBits(stream, 8, &header); + if (errn < 0) { + return errn; + } + if(header == '$') { + /* we do not support "EXI Cookie" */ + errn = EXI_UNSUPPORTED_HEADER_COOKIE; + } else if ( header & 0x20 ) { + /* we do not support "Presence Bit for EXI Options" */ + errn = EXI_UNSUPPORTED_HEADER_OPTIONS; + } else { + /* Yes, a *simple* header */ + errn = 0; + } + return errn; +} + + +#endif + + diff --git a/src/codec/EXIHeaderDecoder.h b/src/codec/EXIHeaderDecoder.h new file mode 100644 index 0000000..de36ab8 --- /dev/null +++ b/src/codec/EXIHeaderDecoder.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#include "EXITypes.h" + +#ifndef EXI_HEADER_DECODER_H +#define EXI_HEADER_DECODER_H + +int readEXIHeader(bitstream_t* stream); + +#endif + + +#ifdef __cplusplus +} +#endif diff --git a/src/codec/EXIHeaderEncoder.c b/src/codec/EXIHeaderEncoder.c new file mode 100644 index 0000000..efeb4a0 --- /dev/null +++ b/src/codec/EXIHeaderEncoder.c @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#include "EXIHeaderEncoder.h" +#include "BitOutputStream.h" +#include "EncoderChannel.h" + +#ifndef EXI_HEADER_ENCODER_C +#define EXI_HEADER_ENCODER_C + +int writeEXIHeader(bitstream_t* stream) { + return writeBits(stream, 8, 128); +} + + +#endif + + diff --git a/src/codec/EXIHeaderEncoder.h b/src/codec/EXIHeaderEncoder.h new file mode 100644 index 0000000..b2359b6 --- /dev/null +++ b/src/codec/EXIHeaderEncoder.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#include "EXITypes.h" + +#ifndef EXI_HEADER_ENCODER_H +#define EXI_HEADER_ENCODER_H + +int writeEXIHeader(bitstream_t* stream); + +#endif + + +#ifdef __cplusplus +} +#endif diff --git a/src/codec/EXITypes.h b/src/codec/EXITypes.h new file mode 100644 index 0000000..5279119 --- /dev/null +++ b/src/codec/EXITypes.h @@ -0,0 +1,447 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + + +#includeCode 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..e261bdc --- /dev/null +++ b/src/codec/MethodsBag.c @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2007-2012 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, seeCode 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..8be3fc6 --- /dev/null +++ b/src/codec/MethodsBag.h @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifndef METHODS_BAG_H +#define METHODS_BAG_H + +#includeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifndef EXI__NAME_TABLE_ENTRIES_C +#define EXI__NAME_TABLE_ENTRIES_C + +#include "NameTableEntries.h" + + + +/* ==================================== */ +/* String Table Population */ + + +#if EXI_DEBUG == EXI_DEBUG_OFF +static struct exiNamePartition localNamePartitions[9] = { + { 9 }, + { 4 }, + { 2 }, + { 46 }, + { 70 }, + { 117 }, + { 186 }, + { 6 }, + { 3 } +}; +#endif /*EXI_DEBUG*/ + + +#if EXI_DEBUG == EXI_DEBUG_OFF +exi_name_table_prepopulated_t exiNameTablePrepopulated = { 9, localNamePartitions }; +#endif /*EXI_DEBUG*/ + + + + +#endif + diff --git a/src/codec/NameTableEntries.h b/src/codec/NameTableEntries.h new file mode 100644 index 0000000..5819a5e --- /dev/null +++ b/src/codec/NameTableEntries.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifndef EXI__NAME_TABLE_ENTRIES_H +#define EXI__NAME_TABLE_ENTRIES_H + +#include "EXITypes.h" + +/* ==================================== */ +/* String Table Population */ + +extern exi_name_table_prepopulated_t exiNameTablePrepopulated; + +#endif + diff --git a/src/codec/StringTable.c b/src/codec/StringTable.c new file mode 100644 index 0000000..2d249a7 --- /dev/null +++ b/src/codec/StringTable.c @@ -0,0 +1,249 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifndef STRING_TABLE_C +#define STRING_TABLE_C + +#includeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef STRING_TABLE_H +#define STRING_TABLE_H + +#include "EXITypes.h" + +#if EXI_DEBUG == EXI_DEBUG_ON +int exiGetUri(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID, const char** uri); +/* 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); +#endif /*EXI_DEBUG*/ + +int exiGetUriSize(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t* uriLength); + +#if EXI_DEBUG == EXI_DEBUG_ON +int exiGetLocalName(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID, uint16_t localNameID, const char** localName); +/* 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); +#endif /*EXI_DEBUG*/ + +int exiGetLocalNameSize(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID, uint16_t* localNameLength); + +/* 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/UCSString.c b/src/codec/UCSString.c new file mode 100644 index 0000000..6f1f03e --- /dev/null +++ b/src/codec/UCSString.c @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#includeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#include "EXITypes.h" + +/* TODO utf8/cstring//wchar_t/char16_t/char32_t methods */ + + +#ifndef UCS_STRING_H +#define UCS_STRING_H + +int toUCSString(char* chars, string_ucs_t* s); + +/* Note: fails if string contains non ASCII characters */ +int toASCIIString(string_ucs_t* string, char* outASCII); + +#endif + + +#ifdef __cplusplus +} +#endif diff --git a/src/codec/appHandCodec/appHand_EXIDecoder.c b/src/codec/appHandCodec/appHand_EXIDecoder.c new file mode 100644 index 0000000..9418567 --- /dev/null +++ b/src/codec/appHandCodec/appHand_EXIDecoder.c @@ -0,0 +1,1882 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifndef EXI_appHand_DECODER_C +#define EXI_appHand_DECODER_C + +#include "EXITypes.h" +#include "BitInputStream.h" +#include "DecoderChannel.h" +#include "CoderChannel.h" + +#include "StringTable.h" +#include "appHand_NameTableEntries.h" +#include "MethodsBag.h" + +#include "EXICoder.h" +#include "EXIHeaderDecoder.h" + + + +/* local variables */ +static uint32_t xsi; +static uint32_t bits; +static int errn; + + +int exiappHandDecodeListValue(bitstream_t* stream, exi_value_t* val, list_t lt) { + uint32_t uint32; + + val->type = lt.type; + + switch(lt.type) { + case EXI_DATATYPE_BINARY_BASE64: + case EXI_DATATYPE_BINARY_HEX: + errn = decodeBinary(stream, &val->binary); + break; + case EXI_DATATYPE_BOOLEAN: + errn = decodeBoolean(stream, &val->boolean); + break; + case EXI_DATATYPE_BOOLEAN_FACET: + errn = decodeNBitUnsignedInteger(stream, 2, &uint32); + val->boolean = uint32 > 1; + break; + case EXI_DATATYPE_DECIMAL: + errn = decodeDecimal(stream, &val->decimal); + break; + case EXI_DATATYPE_FLOAT: + errn = decodeFloat(stream, &val->float_me); + break; + case EXI_DATATYPE_NBIT_UNSIGNED_INTEGER: + case EXI_DATATYPE_UNSIGNED_INTEGER: + case EXI_DATATYPE_INTEGER: + switch(lt.intType) { + /* (Signed) Integer */ + case EXI_UNSIGNED_INTEGER_8: + case EXI_UNSIGNED_INTEGER_16: + case EXI_UNSIGNED_INTEGER_32: + case EXI_UNSIGNED_INTEGER_64: + errn = decodeUnsignedInteger(stream, &val->integer); + break; + /* (Signed) Integer */ + case EXI_INTEGER_8: + case EXI_INTEGER_16: + case EXI_INTEGER_32: + case EXI_INTEGER_64: + errn = decodeInteger(stream, &val->integer); + break; + } + break; + case EXI_DATATYPE_DATETIME: + errn = decodeDateTime(stream,lt.datetimeType, &val->datetime); + break; + case EXI_DATATYPE_STRING: + errn = decodeStringValue(stream, &val->string); + break; + default: + return EXI_UNSUPPORTED_LIST_VALUE_TYPE; + } + + return errn; +} + + + + +int exiappHandInitDecoder(bitstream_t* stream, exi_state_t* state, exi_name_table_runtime_t runtimeTable) { + /* init grammar state */ + state->stackIndex = 0; + state->grammarStack[0] = DOCUMENT; + /* string table */ + state->nameTablePrepopulated = exiappHandNameTablePrepopulated; + state->nameTableRuntime = runtimeTable; + /* decode header */ + return readEXIHeader(stream); +} + +static int exiDecodeNext2Event(bitstream_t* stream, exi_state_t* state, + exi_event_t* nextEvent) { + uint32_t eventCode2 = 0; + + switch (state->grammarStack[state->stackIndex]) { + case 109: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 113: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 12: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 140: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 57: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 97: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 135: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 5: + /* FirstStartTag[START_ELEMENT(ProtocolNamespace)] */ + case 91: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + case 111: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 103: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 7: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 133: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 123: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 61: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 99: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 107: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 73: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 59: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 63: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 115: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 101: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 71: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 77: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 142: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 121: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 17: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 83: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 117: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 3: + /* FirstStartTag[START_ELEMENT(AppProtocol)] */ + case 87: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 67: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 93: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 53: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 137: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 81: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 79: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 119: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 51: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 105: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 69: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 45: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 65: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 129: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 55: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 43: + /* FirstStartTag[START_ELEMENT(ResponseCode)] */ + case 20: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 85: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 125: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 138: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 15: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 131: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 89: + /* FirstStartTag[CHARACTERS[DECIMAL]] */ + case 127: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 95: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + errn = decodeNBitUnsignedInteger(stream, 3, &eventCode2); + switch (eventCode2) { + case 0: + *nextEvent = EXI_EVENT_END_ELEMENT_UNDECLARED; + return errn; + case 1: + *nextEvent = EXI_EVENT_ATTRIBUTE_XSI_TYPE; + return errn; + case 2: + *nextEvent = EXI_EVENT_ATTRIBUTE_XSI_NIL; + return errn; + case 3: + *nextEvent = EXI_EVENT_ATTRIBUTE_GENERIC_UNDECLARED; + return errn; + case 4: + *nextEvent = EXI_EVENT_ATTRIBUTE_INVALID_VALUE; + return errn; + case 5: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED; + return errn; + case 6: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED; + return errn; + } + break; + case 49: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 75: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 3, &eventCode2); + switch (eventCode2) { + case 0: + *nextEvent = EXI_EVENT_ATTRIBUTE_XSI_TYPE; + return errn; + case 1: + *nextEvent = EXI_EVENT_ATTRIBUTE_XSI_NIL; + return errn; + case 2: + *nextEvent = EXI_EVENT_ATTRIBUTE_GENERIC_UNDECLARED; + return errn; + case 3: + *nextEvent = EXI_EVENT_ATTRIBUTE_INVALID_VALUE; + return errn; + case 4: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED; + return errn; + case 5: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED; + return errn; + } + break; + case 70: + /* Element[CHARACTERS[STRING]] */ + case 124: + /* Element[CHARACTERS[STRING]] */ + case 139: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 46: + /* Element[CHARACTERS[ENUMERATION]] */ + case 22: + /* Element[START_ELEMENT(ProtocolNamespace)] */ + case 86: + /* Element[CHARACTERS[DATETIME]] */ + case 120: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 100: + /* Element[CHARACTERS[DATETIME]] */ + case 54: + /* Element[CHARACTERS[STRING]] */ + case 68: + /* Element[CHARACTERS[STRING]] */ + case 72: + /* Element[CHARACTERS[STRING]] */ + case 94: + /* Element[CHARACTERS[STRING]] */ + case 21: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 78: + /* Element[CHARACTERS[STRING]] */ + case 134: + /* Element[CHARACTERS[STRING]] */ + case 141: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 52: + /* Element[CHARACTERS[LIST]] */ + case 102: + /* Element[CHARACTERS[DATETIME]] */ + case 96: + /* Element[CHARACTERS[FLOAT]] */ + case 60: + /* Element[CHARACTERS[LIST]] */ + case 82: + /* Element[CHARACTERS[BOOLEAN]] */ + case 88: + /* Element[CHARACTERS[DATETIME]] */ + case 116: + /* Element[CHARACTERS[INTEGER]] */ + case 98: + /* Element[CHARACTERS[DATETIME]] */ + case 128: + /* Element[CHARACTERS[INTEGER]] */ + case 13: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 90: + /* Element[CHARACTERS[DECIMAL]] */ + case 92: + /* Element[CHARACTERS[FLOAT]] */ + case 42: + /* Element[START_ELEMENT(AppProtocol)] */ + case 143: + /* Element[CHARACTERS[STRING]] */ + case 110: + /* Element[CHARACTERS[INTEGER]] */ + case 66: + /* Element[CHARACTERS[LIST]] */ + case 112: + /* Element[CHARACTERS[INTEGER]] */ + case 58: + /* Element[CHARACTERS[STRING]] */ + case 14: + /* Element[START_ELEMENT(SchemaID)] */ + case 122: + /* Element[CHARACTERS[INTEGER]] */ + case 16: + /* Element[START_ELEMENT(Priority)] */ + case 104: + /* Element[CHARACTERS[DATETIME]] */ + case 132: + /* Element[CHARACTERS[DATETIME]] */ + case 114: + /* Element[CHARACTERS[STRING]] */ + case 108: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 84: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 106: + /* Element[CHARACTERS[DATETIME]] */ + case 11: + /* Element[START_ELEMENT(VersionNumberMinor)] */ + case 74: + /* Element[CHARACTERS[STRING]] */ + case 6: + /* Element[START_ELEMENT(VersionNumberMajor)] */ + case 64: + /* Element[CHARACTERS[STRING]] */ + case 62: + /* Element[CHARACTERS[STRING]] */ + case 136: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 130: + /* Element[CHARACTERS[STRING]] */ + case 126: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 118: + /* Element[CHARACTERS[INTEGER]] */ + case 48: + /* Element[START_ELEMENT(ResponseCode)] */ + case 10: + /* Element[CHARACTERS[STRING]] */ + case 80: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 56: + /* Element[CHARACTERS[STRING]] */ + case 18: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 2, &eventCode2); + switch (eventCode2) { + case 0: + *nextEvent = EXI_EVENT_END_ELEMENT_UNDECLARED; + return errn; + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED; + return errn; + case 2: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED; + return errn; + } + break; + case 8: + /* Element[END_ELEMENT] */ + case 34: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 40: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 44: + /* Element[START_ELEMENT(SchemaID), END_ELEMENT] */ + case 25: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 31: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 39: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 33: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 50: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 26: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 32: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 47: + /* Element[END_ELEMENT] */ + case 38: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 35: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 24: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 30: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 4: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 19: + /* Element[END_ELEMENT] */ + case 37: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 29: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 23: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 27: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 76: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 41: + /* Element[END_ELEMENT] */ + case 36: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 28: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode2); + switch (eventCode2) { + case 0: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED; + return errn; + case 1: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED; + return errn; + } + break; + + default: + *nextEvent = EXI_EVENT_ERROR; + return EXI_ERROR_UNEXPECTED_EVENT_LEVEL2; + } + + return EXI_ERROR_UNEXPECTED_EVENT_LEVEL2; +} + + +int exiappHandDecodeNextEvent(bitstream_t* stream, exi_state_t* state, + exi_event_t* nextEvent) { + state->eventCode = 0; + + switch (state->grammarStack[state->stackIndex]) { + case 5: + /* FirstStartTag[START_ELEMENT(ProtocolNamespace)] */ + case 22: + /* Element[START_ELEMENT(ProtocolNamespace)] */ + case 3: + /* FirstStartTag[START_ELEMENT(AppProtocol)] */ + case 42: + /* Element[START_ELEMENT(AppProtocol)] */ + case 14: + /* Element[START_ELEMENT(SchemaID)] */ + case 16: + /* Element[START_ELEMENT(Priority)] */ + case 11: + /* Element[START_ELEMENT(VersionNumberMinor)] */ + case 43: + /* FirstStartTag[START_ELEMENT(ResponseCode)] */ + case 6: + /* Element[START_ELEMENT(VersionNumberMajor)] */ + case 48: + /* Element[START_ELEMENT(ResponseCode)] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 1: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 109: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 113: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 12: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 140: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 70: + /* Element[CHARACTERS[STRING]] */ + case 124: + /* Element[CHARACTERS[STRING]] */ + case 57: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 97: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 135: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 91: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + case 111: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 139: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 103: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 46: + /* Element[CHARACTERS[ENUMERATION]] */ + case 86: + /* Element[CHARACTERS[DATETIME]] */ + case 7: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 133: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 123: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 61: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 99: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 120: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 107: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 73: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 100: + /* Element[CHARACTERS[DATETIME]] */ + case 54: + /* Element[CHARACTERS[STRING]] */ + case 59: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 68: + /* Element[CHARACTERS[STRING]] */ + case 72: + /* Element[CHARACTERS[STRING]] */ + case 63: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 94: + /* Element[CHARACTERS[STRING]] */ + case 115: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 101: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 21: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 71: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 77: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 142: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 78: + /* Element[CHARACTERS[STRING]] */ + case 121: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 134: + /* Element[CHARACTERS[STRING]] */ + case 141: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 52: + /* Element[CHARACTERS[LIST]] */ + case 102: + /* Element[CHARACTERS[DATETIME]] */ + case 96: + /* Element[CHARACTERS[FLOAT]] */ + case 17: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 83: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 117: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 87: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 60: + /* Element[CHARACTERS[LIST]] */ + case 82: + /* Element[CHARACTERS[BOOLEAN]] */ + case 88: + /* Element[CHARACTERS[DATETIME]] */ + case 116: + /* Element[CHARACTERS[INTEGER]] */ + case 98: + /* Element[CHARACTERS[DATETIME]] */ + case 128: + /* Element[CHARACTERS[INTEGER]] */ + case 67: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 93: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 13: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 90: + /* Element[CHARACTERS[DECIMAL]] */ + case 92: + /* Element[CHARACTERS[FLOAT]] */ + case 53: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 137: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 81: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 79: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 119: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 143: + /* Element[CHARACTERS[STRING]] */ + case 110: + /* Element[CHARACTERS[INTEGER]] */ + case 66: + /* Element[CHARACTERS[LIST]] */ + case 51: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 112: + /* Element[CHARACTERS[INTEGER]] */ + case 58: + /* Element[CHARACTERS[STRING]] */ + case 105: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 122: + /* Element[CHARACTERS[INTEGER]] */ + case 69: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 104: + /* Element[CHARACTERS[DATETIME]] */ + case 132: + /* Element[CHARACTERS[DATETIME]] */ + case 114: + /* Element[CHARACTERS[STRING]] */ + case 45: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 65: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 108: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 84: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 129: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 106: + /* Element[CHARACTERS[DATETIME]] */ + case 55: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 74: + /* Element[CHARACTERS[STRING]] */ + case 20: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 85: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 125: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 64: + /* Element[CHARACTERS[STRING]] */ + case 62: + /* Element[CHARACTERS[STRING]] */ + case 136: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 138: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 130: + /* Element[CHARACTERS[STRING]] */ + case 126: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 15: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 118: + /* Element[CHARACTERS[INTEGER]] */ + case 131: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 10: + /* Element[CHARACTERS[STRING]] */ + case 80: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 89: + /* FirstStartTag[CHARACTERS[DECIMAL]] */ + case 56: + /* Element[CHARACTERS[STRING]] */ + case 127: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 95: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + case 18: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_CHARACTERS; + return errn; + case 1: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 2: + /* DocEnd[END_DOCUMENT] */ + *nextEvent = EXI_EVENT_END_DOCUMENT; + return errn; + case 1: + /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes), START_ELEMENT_GENERIC] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 2: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + } + break; + case 49: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 75: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_ATTRIBUTE_GENERIC; + return errn; + case 1: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 2: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 3: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 4: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 50: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 76: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_START_ELEMENT_GENERIC; + return errn; + case 1: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 2: + *nextEvent = EXI_EVENT_CHARACTERS_GENERIC; + return errn; + case 3: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 34: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 40: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 44: + /* Element[START_ELEMENT(SchemaID), END_ELEMENT] */ + case 25: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 31: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 39: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 33: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 26: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 32: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 38: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 35: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 24: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 30: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 4: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 37: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 29: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 23: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 27: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 36: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 28: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 2, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_START_ELEMENT; + return errn; + case 1: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 2: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + case 0: + /* Document[START_DOCUMENT] */ + *nextEvent = EXI_EVENT_START_DOCUMENT; + return errn; + case 8: + /* Element[END_ELEMENT] */ + case 47: + /* Element[END_ELEMENT] */ + case 19: + /* Element[END_ELEMENT] */ + case 41: + /* Element[END_ELEMENT] */ + errn = decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + switch (state->eventCode) { + case 0: + *nextEvent = EXI_EVENT_END_ELEMENT; + return errn; + case 1: + /* 2nd level events */ + errn = exiDecodeNext2Event(stream, state, nextEvent); + return errn; + } + break; + + default: + *nextEvent = EXI_EVENT_ERROR; + return EXI_ERROR_UNEXPECTED_EVENT_LEVEL1; + } + + return EXI_ERROR_UNEXPECTED_EVENT_LEVEL1; +} + +int exiappHandDecodeStartDocument(bitstream_t* stream, exi_state_t* state) { + if ( state->grammarStack[state->stackIndex] == 0 ) { + /* move on */ + state->grammarStack[state->stackIndex] = 1; + return 0; + } + + return EXI_ERROR_UNEXPECTED_START_DOCUMENT; +} + +int exiappHandDecodeEndDocument(bitstream_t* stream, exi_state_t* state) { + if ( state->grammarStack[state->stackIndex] == 2) { + return 0; + } + + return EXI_ERROR_UNEXPECTED_END_DOCUMENT; +} + +static int _exiDecodeStartElement(exi_state_t* state, eqname_t* se, + uint16_t ns, uint16_t ln, uint16_t stackId, uint16_t newState) { + se->namespaceURI = ns; + se->localPart = ln; + /* move on */ + state->grammarStack[state->stackIndex] = stackId; + /* push element on stack */ + return exiPushStack(state, newState, se); +} + + +int exiappHandDecodeStartElement(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:AppProtocol}supportedAppProtocolReq), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes), START_ELEMENT_GENERIC] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 4, 6, 2, 3); + case 1: + return _exiDecodeStartElement(state, se, 4, 7, 2, 43); + case 2: + return _exiDecodeStartElement(state, se, 65535, 65535, 2, 49); + } + break; + case 3: + /* FirstStartTag[START_ELEMENT(AppProtocol)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 4, 5); + } + break; + case 4: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 23, 5); + } + break; + case 5: + /* FirstStartTag[START_ELEMENT(ProtocolNamespace)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 2, 6, 7); + } + break; + case 6: + /* Element[START_ELEMENT(VersionNumberMajor)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 5, 11, 12); + } + break; + case 11: + /* Element[START_ELEMENT(VersionNumberMinor)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 6, 14, 15); + } + break; + case 14: + /* Element[START_ELEMENT(SchemaID)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 4, 16, 17); + } + break; + case 16: + /* Element[START_ELEMENT(Priority)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 1, 19, 20); + } + break; + case 22: + /* Element[START_ELEMENT(ProtocolNamespace)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 2, 6, 7); + } + break; + case 23: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 24, 5); + } + break; + case 24: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 25, 5); + } + break; + case 25: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 26, 5); + } + break; + case 26: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 27, 5); + } + break; + case 27: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 28, 5); + } + break; + case 28: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 29, 5); + } + break; + case 29: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 30, 5); + } + break; + case 30: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 31, 5); + } + break; + case 31: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 32, 5); + } + break; + case 32: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 33, 5); + } + break; + case 33: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 34, 5); + } + break; + case 34: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 35, 5); + } + break; + case 35: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 36, 5); + } + break; + case 36: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 37, 5); + } + break; + case 37: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 38, 5); + } + break; + case 38: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 39, 5); + } + break; + case 39: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 40, 5); + } + break; + case 40: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 41, 5); + } + break; + case 42: + /* Element[START_ELEMENT(AppProtocol)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 0, 4, 5); + } + break; + case 43: + /* FirstStartTag[START_ELEMENT(ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 3, 44, 45); + } + break; + case 44: + /* Element[START_ELEMENT(SchemaID), END_ELEMENT] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 4, 47, 17); + } + break; + case 48: + /* Element[START_ELEMENT(ResponseCode)] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 0, 3, 44, 45); + } + break; + case 49: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 50, 49); + } + break; + case 50: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 50, 49); + } + break; + case 75: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 1: + return _exiDecodeStartElement(state, se, 65535, 65535, 76, 49); + } + break; + case 76: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + switch(state->eventCode) { + case 0: + return _exiDecodeStartElement(state, se, 65535, 65535, 76, 49); + } + break; + + default: + return EXI_ERROR_UNEXPECTED_START_ELEMENT; + } + + return EXI_ERROR_UNEXPECTED_START_ELEMENT; +} + + +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; + } + + errn = decodeNBitUnsignedInteger(stream, uriCodingLength, uriID); + if (errn) { + return errn; + } + + 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 exiappHandDecodeStartElementGeneric(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 exiappHandDecodeEndElement(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 exiappHandDecodeEndElementUndeclared(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 exiappHandDecodeEndElement(stream, state, ee); +} + +int exiappHandDecodeCharacters(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + switch (state->grammarStack[state->stackIndex]) { + case 12: + /* UNSIGNED_INTEGER */ + case 13: + /* UNSIGNED_INTEGER */ + case 15: + /* UNSIGNED_INTEGER */ + case 119: + /* UNSIGNED_INTEGER */ + case 120: + /* UNSIGNED_INTEGER */ + case 125: + /* UNSIGNED_INTEGER */ + case 126: + /* UNSIGNED_INTEGER */ + case 137: + /* UNSIGNED_INTEGER */ + case 138: + /* UNSIGNED_INTEGER */ + case 139: + /* UNSIGNED_INTEGER */ + case 140: + /* UNSIGNED_INTEGER */ + case 141: + /* UNSIGNED_INTEGER */ + val->type = EXI_DATATYPE_UNSIGNED_INTEGER; + errn = decodeUnsignedInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 17: + /* NBIT_UNSIGNED_INTEGER */ + case 18: + /* NBIT_UNSIGNED_INTEGER */ + case 135: + /* NBIT_UNSIGNED_INTEGER */ + case 136: + /* NBIT_UNSIGNED_INTEGER */ + val->type = EXI_DATATYPE_NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 8, &bits); + val->integer.val.uint8 = bits + 0; + val->integer.type = EXI_UNSIGNED_INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 50: + /* STRING */ + case 49: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 50; + return 0; + case 101: + /* DATETIME */ + case 102: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_GMONTHDAY, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 20: + /* NBIT_UNSIGNED_INTEGER */ + case 21: + /* NBIT_UNSIGNED_INTEGER */ + val->type = EXI_DATATYPE_NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 5, &bits); + val->integer.val.uint8 = bits + 1; + val->integer.type = EXI_UNSIGNED_INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 97: + /* DATETIME */ + case 98: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_GDAY, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 51: + /* LIST */ + case 52: + /* LIST */ + case 59: + /* LIST */ + case 60: + /* LIST */ + case 65: + /* LIST */ + case 66: + /* LIST */ + val->type = EXI_DATATYPE_LIST; + /* List not supported properly yet */ + val->list.type = EXI_DATATYPE_STRING; + errn = decodeUnsignedInteger16(stream, &val->list.len); + if (errn) { + return errn; + } + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 79: + /* BINARY_BASE64 */ + case 80: + /* BINARY_BASE64 */ + val->type = EXI_DATATYPE_BINARY_BASE64; + errn = decodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 89: + /* DECIMAL */ + case 90: + /* DECIMAL */ + val->type = EXI_DATATYPE_DECIMAL; + errn = decodeDecimal(stream, &val->decimal); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 99: + /* DATETIME */ + case 100: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_GMONTH, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 91: + /* FLOAT */ + case 92: + /* FLOAT */ + case 95: + /* FLOAT */ + case 96: + /* FLOAT */ + val->type = EXI_DATATYPE_FLOAT; + errn = decodeFloat(stream, &val->float_me); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 107: + /* BINARY_HEX */ + case 108: + /* BINARY_HEX */ + val->type = EXI_DATATYPE_BINARY_HEX; + errn = decodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 83: + /* NBIT_UNSIGNED_INTEGER */ + case 84: + /* NBIT_UNSIGNED_INTEGER */ + val->type = EXI_DATATYPE_NBIT_UNSIGNED_INTEGER; + errn = decodeNBitUnsignedInteger(stream, 8, &bits); + val->integer.val.int8 = bits -128; + val->integer.type = EXI_INTEGER_8; + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 85: + /* DATETIME */ + case 86: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_DATE, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 103: + /* DATETIME */ + case 104: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_GYEAR, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 131: + /* DATETIME */ + case 132: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_TIME, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 105: + /* DATETIME */ + case 106: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_GYEARMONTH, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 109: + /* INTEGER */ + case 110: + /* INTEGER */ + case 111: + /* INTEGER */ + case 112: + /* INTEGER */ + case 115: + /* INTEGER */ + case 116: + /* INTEGER */ + case 117: + /* INTEGER */ + case 118: + /* INTEGER */ + case 121: + /* INTEGER */ + case 122: + /* INTEGER */ + case 127: + /* INTEGER */ + case 128: + /* INTEGER */ + val->type = EXI_DATATYPE_INTEGER; + errn = decodeInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 7: + /* STRING */ + case 10: + /* STRING */ + case 53: + /* STRING */ + case 54: + /* STRING */ + case 55: + /* STRING */ + case 56: + /* STRING */ + case 57: + /* STRING */ + case 58: + /* STRING */ + case 61: + /* STRING */ + case 62: + /* STRING */ + case 63: + /* STRING */ + case 64: + /* STRING */ + case 67: + /* STRING */ + case 68: + /* STRING */ + case 69: + /* STRING */ + case 70: + /* STRING */ + case 71: + /* STRING */ + case 72: + /* STRING */ + case 73: + /* STRING */ + case 74: + /* STRING */ + case 77: + /* STRING */ + case 78: + /* STRING */ + case 93: + /* STRING */ + case 94: + /* STRING */ + case 113: + /* STRING */ + case 114: + /* STRING */ + case 123: + /* STRING */ + case 124: + /* STRING */ + case 129: + /* STRING */ + case 130: + /* STRING */ + case 133: + /* STRING */ + case 134: + /* STRING */ + case 142: + /* STRING */ + case 143: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 45: + /* ENUMERATION */ + case 46: + /* ENUMERATION */ + val->type = EXI_DATATYPE_ENUMERATION; + errn = decodeNBitUnsignedInteger(stream, 2, &val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 76: + /* STRING */ + case 75: + /* STRING */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 76; + return 0; + case 87: + /* DATETIME */ + case 88: + /* DATETIME */ + val->type = EXI_DATATYPE_DATETIME; + errn = decodeDateTime(stream, EXI_DATETIME_DATETIME, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + case 81: + /* BOOLEAN */ + case 82: + /* BOOLEAN */ + val->type = EXI_DATATYPE_BOOLEAN; + errn = decodeBoolean(stream, &val->boolean); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + + default: + return EXI_ERROR_UNEXPECTED_CHARACTERS; + } + + return 0; +} + +int exiappHandDecodeCharactersGeneric(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + return exiappHandDecodeCharacters(stream, state, val); +} + +int exiappHandDecodeCharactersGenericUndeclared(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 = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + return errn; +} + + +int exiappHandDecodeAttribute(bitstream_t* stream, exi_state_t* state, + eqname_t* at, exi_value_t* val) { + switch (state->grammarStack[state->stackIndex]) { + + default: + return EXI_ERROR_UNEXPECTED_ATTRIBUTE; + } + return EXI_ERROR_UNEXPECTED_ATTRIBUTE; +} + + + +int exiappHandDecodeAttributeXsiNil(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 exiappHandDecodeAttributeXsiType(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 exiappHandDecodeAttributeGenericUndeclared(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; + } + + /* decode attribute value */ + val->type = EXI_DATATYPE_STRING; + errn = decodeStringValue(stream, &val->string); + + /* we do not move forward in grammars */ + + return errn; +} + + + +#endif + diff --git a/src/codec/appHandCodec/appHand_EXIDecoder.h b/src/codec/appHandCodec/appHand_EXIDecoder.h new file mode 100644 index 0000000..e328e45 --- /dev/null +++ b/src/codec/appHandCodec/appHand_EXIDecoder.h @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef EXI_appHand_DECODER_H +#define EXI_appHand_DECODER_H + +#include "EXITypes.h" + +int exiappHandInitDecoder(bitstream_t* stream, exi_state_t* state, + exi_name_table_runtime_t runtimeTable); + +int exiappHandDecodeNextEvent(bitstream_t* stream, + exi_state_t* state, exi_event_t* nextEvent); + +int exiappHandDecodeStartDocument(bitstream_t* stream, + exi_state_t* state); + +int exiappHandDecodeEndDocument(bitstream_t* stream, + exi_state_t* state); + +int +exiappHandDecodeStartElement(bitstream_t* stream, + exi_state_t* state, eqname_t* se); + +int exiappHandDecodeStartElementGeneric(bitstream_t* stream, + exi_state_t* state, qname_t* qname); + +int exiappHandDecodeEndElement(bitstream_t* stream, + exi_state_t* state, eqname_t* ee); + +int exiappHandDecodeEndElementUndeclared(bitstream_t* stream, + exi_state_t* state, eqname_t* ee); + +int exiappHandDecodeCharacters(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiappHandDecodeCharactersGeneric(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiappHandDecodeCharactersGenericUndeclared(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiappHandDecodeAttribute(bitstream_t* stream, + exi_state_t* state, eqname_t* at, exi_value_t* val); + +int exiappHandDecodeAttributeXsiNil(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiappHandDecodeAttributeXsiType(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiappHandDecodeAttributeGenericUndeclared(bitstream_t* stream, + exi_state_t* state, qname_t* at, exi_value_t* val); + +int exiappHandDecodeListValue(bitstream_t* stream, exi_value_t* val, + list_t lt); + +#endif + +#ifdef __cplusplus +} +#endif + diff --git a/src/codec/appHandCodec/appHand_EXIEncoder.c b/src/codec/appHandCodec/appHand_EXIEncoder.c new file mode 100644 index 0000000..37a3504 --- /dev/null +++ b/src/codec/appHandCodec/appHand_EXIEncoder.c @@ -0,0 +1,2021 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifndef EXI_appHand_ENCODER_C +#define EXI_appHand_ENCODER_C + +#include "EXITypes.h" +#include "BitOutputStream.h" +#include "EncoderChannel.h" + +#include "StringTable.h" +#include "appHand_NameTableEntries.h" +#include "MethodsBag.h" + +#include "EXICoder.h" +#include "EXIHeaderEncoder.h" + + + + +/* local variables */ +static uint32_t bits; +static int errn; + +/* ==================================== */ + + +int exiappHandEncodeListValue(bitstream_t* stream, exi_value_t* val, list_t lt) { + + switch(lt.type) { + case EXI_DATATYPE_BINARY_BASE64: + case EXI_DATATYPE_BINARY_HEX: + errn = encodeBinary(stream, &val->binary); + break; + case EXI_DATATYPE_BOOLEAN: + errn = encodeBoolean(stream, val->boolean); + break; + case EXI_DATATYPE_BOOLEAN_FACET: + errn = encodeNBitUnsignedInteger(stream, 2, val->boolean ? 2 : 0); + break; + case EXI_DATATYPE_DECIMAL: + errn = encodeDecimal(stream, &val->decimal); + break; + case EXI_DATATYPE_FLOAT: + errn = encodeFloat(stream, &val->float_me); + break; + case EXI_DATATYPE_NBIT_UNSIGNED_INTEGER: + case EXI_DATATYPE_UNSIGNED_INTEGER: + case EXI_DATATYPE_INTEGER: + switch(lt.intType) { + /* (Signed) Integer */ + case EXI_UNSIGNED_INTEGER_8: + case EXI_UNSIGNED_INTEGER_16: + case EXI_UNSIGNED_INTEGER_32: + case EXI_UNSIGNED_INTEGER_64: + errn = encodeUnsignedInteger(stream, &val->integer); + break; + /* (Signed) Integer */ + case EXI_INTEGER_8: + case EXI_INTEGER_16: + case EXI_INTEGER_32: + case EXI_INTEGER_64: + errn = encodeInteger(stream, &val->integer); + break; + } + break; + case EXI_DATATYPE_DATETIME: + errn = encodeDateTime(stream, &val->datetime); + break; + case EXI_DATATYPE_STRING: + errn = encodeStringValue(stream, &val->string); + break; + default: + return EXI_UNSUPPORTED_LIST_VALUE_TYPE; + } + + return errn; +} + + + +/* <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 EXI_EVENT_START_DOCUMENT: + *resGrammarID = 0; + return 0; + default: + return 1; /* not found */ + } + break; + case DOC_CONTENT: + switch(eventType) { + /* TODO other IDs */ + case EXI_EVENT_START_ELEMENT_GENERIC: + *resGrammarID = 0; + return 0; + default: + return 1; /* not found */ + } + break; + case DOC_END: + switch(eventType) { + case EXI_EVENT_END_DOCUMENT: + *resGrammarID = 0; + return 0; + default: + return 1; /* not found */ + } + break; + case UR_TYPE_GRAMMAR_0: + switch(eventType) { + case EXI_EVENT_ATTRIBUTE_GENERIC: + *resGrammarID = 0; + return 0; + case EXI_EVENT_START_ELEMENT_GENERIC: + *resGrammarID = 1; + return 0; + case EXI_EVENT_END_ELEMENT: + *resGrammarID = 2; + return 0; + case EXI_EVENT_CHARACTERS_GENERIC: + *resGrammarID = 3; + return 0; + default: + return 1; /* not found */ + } + break; + case UR_TYPE_GRAMMAR_1: + switch(eventType) { + case EXI_EVENT_START_ELEMENT_GENERIC: + *resGrammarID = 0; + return 0; + case EXI_EVENT_END_ELEMENT: + *resGrammarID = 1; + return 0; + case EXI_EVENT_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 EXI_UNSIGNED_INTEGER_8: + val = iv->val.int8 - lowerBound; + break; + case EXI_UNSIGNED_INTEGER_16: + val = iv->val.int16 - lowerBound; + break; + case EXI_UNSIGNED_INTEGER_32: + val = iv->val.int32 - lowerBound; + break; + case EXI_UNSIGNED_INTEGER_64: + val = iv->val.int64 - lowerBound; + break; + /* (Signed) Integer */ + case EXI_INTEGER_8: + val = iv->val.uint8 - lowerBound; + break; + case EXI_INTEGER_16: + val = iv->val.uint16 - lowerBound; + break; + case EXI_INTEGER_32: + val = iv->val.uint32 - lowerBound; + break; + case EXI_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 exiappHandInitEncoder(bitstream_t* stream, exi_state_t* state, exi_name_table_runtime_t runtimeTable) { + /* init grammar state */ + state->stackIndex = 0; + state->grammarStack[0] = DOCUMENT; + /* string tables */ + state->nameTablePrepopulated = exiappHandNameTablePrepopulated; + state->nameTableRuntime = runtimeTable; + /* encode header */ + return writeEXIHeader(stream); +} + +int exiappHandEncodeStartDocument(bitstream_t* stream, exi_state_t* state) { + if ( state->grammarStack[state->stackIndex] == 0 ) { + /* move on */ + state->grammarStack[state->stackIndex] = 1; + return 0; + } + + return EXI_ERROR_UNEXPECTED_START_DOCUMENT; +} + +int exiappHandEncodeEndDocument(bitstream_t* stream, exi_state_t* state) { + if ( state->grammarStack[state->stackIndex] == 2) { + encodeFinish(stream); + return 0; + } + + return EXI_ERROR_UNEXPECTED_END_DOCUMENT; +} + +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; +} + + +#if EXI_DEBUG == EXI_DEBUG_ON +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; +} +#endif /*EXI_DEBUG*/ + + +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; + +} + + +#if EXI_DEBUG == EXI_DEBUG_ON +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; +} +#endif /*EXI_DEBUG*/ + + +#if EXI_DEBUG == EXI_DEBUG_ON +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 ; +} +#endif /*EXI_DEBUG*/ + + +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; + } + /* move on */ + state->grammarStack[state->stackIndex] = stackId; + /* push element on stack */ + return exiPushStack(state, newState, se); +} + +#if EXI_DEBUG == EXI_DEBUG_ON + +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); +} +#endif /*EXI_DEBUG*/ + +int exiappHandEncodeStartElement(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:AppProtocol}supportedAppProtocolReq), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes), START_ELEMENT_GENERIC] */ + if ( se->localPart == 6 && se->namespaceURI == 4 ) { + /* SE( {urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 2, 3); + } + else if ( se->localPart == 7 && se->namespaceURI == 4 ) { + /* SE( {urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes ) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 2, 43); + } + else { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 2, 49); + } + break; + case 3: + /* FirstStartTag[START_ELEMENT(AppProtocol)] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 4, 5); + } + break; + case 4: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 23, 5); + } + break; + case 5: + /* FirstStartTag[START_ELEMENT(ProtocolNamespace)] */ + if ( se->localPart == 2 && se->namespaceURI == 0 ) { + /* SE( ProtocolNamespace ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 6, 7); + } + break; + case 6: + /* Element[START_ELEMENT(VersionNumberMajor)] */ + if ( se->localPart == 5 && se->namespaceURI == 0 ) { + /* SE( VersionNumberMajor ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 11, 12); + } + break; + case 11: + /* Element[START_ELEMENT(VersionNumberMinor)] */ + if ( se->localPart == 6 && se->namespaceURI == 0 ) { + /* SE( VersionNumberMinor ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 14, 15); + } + break; + case 14: + /* Element[START_ELEMENT(SchemaID)] */ + if ( se->localPart == 4 && se->namespaceURI == 0 ) { + /* SE( SchemaID ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 16, 17); + } + break; + case 16: + /* Element[START_ELEMENT(Priority)] */ + if ( se->localPart == 1 && se->namespaceURI == 0 ) { + /* SE( Priority ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 19, 20); + } + break; + case 22: + /* Element[START_ELEMENT(ProtocolNamespace)] */ + if ( se->localPart == 2 && se->namespaceURI == 0 ) { + /* SE( ProtocolNamespace ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 6, 7); + } + break; + case 23: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 24, 5); + } + break; + case 24: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 25, 5); + } + break; + case 25: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 26, 5); + } + break; + case 26: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 27, 5); + } + break; + case 27: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 28, 5); + } + break; + case 28: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 29, 5); + } + break; + case 29: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 30, 5); + } + break; + case 30: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 31, 5); + } + break; + case 31: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 32, 5); + } + break; + case 32: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 33, 5); + } + break; + case 33: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 34, 5); + } + break; + case 34: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 35, 5); + } + break; + case 35: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 36, 5); + } + break; + case 36: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 37, 5); + } + break; + case 37: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 38, 5); + } + break; + case 38: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 39, 5); + } + break; + case 39: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 40, 5); + } + break; + case 40: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 41, 5); + } + break; + case 42: + /* Element[START_ELEMENT(AppProtocol)] */ + if ( se->localPart == 0 && se->namespaceURI == 0 ) { + /* SE( AppProtocol ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 4, 5); + } + break; + case 43: + /* FirstStartTag[START_ELEMENT(ResponseCode)] */ + if ( se->localPart == 3 && se->namespaceURI == 0 ) { + /* SE( ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 44, 45); + } + break; + case 44: + /* Element[START_ELEMENT(SchemaID), END_ELEMENT] */ + if ( se->localPart == 4 && se->namespaceURI == 0 ) { + /* SE( SchemaID ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 47, 17); + } + break; + case 48: + /* Element[START_ELEMENT(ResponseCode)] */ + if ( se->localPart == 3 && se->namespaceURI == 0 ) { + /* SE( ResponseCode ) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 44, 45); + } + break; + case 49: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 50, 49); + } + break; + case 50: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 50, 49); + } + break; + case 75: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 76, 49); + } + break; + case 76: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + { + /* SE( null ) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 76, 49); + } + break; + + default: + return EXI_ERROR_UNEXPECTED_START_ELEMENT; + } + + return EXI_ERROR_UNEXPECTED_START_ELEMENT; +} + +/* Qualified Name unknown!! */ +#if EXI_DEBUG == EXI_DEBUG_ON +static int exiEncodeStartElementGenericUnknown(bitstream_t* stream, exi_state_t* state, + char** uri, char** localName) { + uint16_t grammarID; + uint16_t eventCodeLength; + + int errn = _exiGet1stLevelEventCode(state, EXI_EVENT_START_ELEMENT_GENERIC, &grammarID); + if (errn < 0) { + return errn; + } else if (errn == 1) { + /* not found --> try undeclared SE */ + errn = _exiGet1stLevelEventCode(state, EXI_EVENT_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]) { + /* $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 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 0; +} +#endif /*EXI_DEBUG*/ + + +/* Look first for qualified name */ +int exiappHandEncodeStartElementGeneric(bitstream_t* stream, exi_state_t* state, + string_ascii_t* namespaceURI , string_ascii_t* localName) { + int errn = -1; + +#if EXI_DEBUG == EXI_DEBUG_ON + eqname_t se; + /* uri */ + 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 exiappHandEncodeStartElement(stream, state, &se); + } + } +#endif /*EXI_DEBUG*/ + + return errn; +} + +static int _exiEncodeEndElementUndeclared(bitstream_t* stream, exi_state_t* state) { + int16_t currentID = state->grammarStack[state->stackIndex]; + switch (currentID) { + case 9: + /* Element[] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 0, 0); + encodeNBitUnsignedInteger(stream, 2, 0); + return 0; + case 70: + /* Element[CHARACTERS[STRING]] */ + case 124: + /* Element[CHARACTERS[STRING]] */ + case 139: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 46: + /* Element[CHARACTERS[ENUMERATION]] */ + case 22: + /* Element[START_ELEMENT(ProtocolNamespace)] */ + case 86: + /* Element[CHARACTERS[DATETIME]] */ + case 120: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 100: + /* Element[CHARACTERS[DATETIME]] */ + case 54: + /* Element[CHARACTERS[STRING]] */ + case 68: + /* Element[CHARACTERS[STRING]] */ + case 72: + /* Element[CHARACTERS[STRING]] */ + case 94: + /* Element[CHARACTERS[STRING]] */ + case 21: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 78: + /* Element[CHARACTERS[STRING]] */ + case 134: + /* Element[CHARACTERS[STRING]] */ + case 141: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 52: + /* Element[CHARACTERS[LIST]] */ + case 102: + /* Element[CHARACTERS[DATETIME]] */ + case 96: + /* Element[CHARACTERS[FLOAT]] */ + case 60: + /* Element[CHARACTERS[LIST]] */ + case 82: + /* Element[CHARACTERS[BOOLEAN]] */ + case 88: + /* Element[CHARACTERS[DATETIME]] */ + case 116: + /* Element[CHARACTERS[INTEGER]] */ + case 98: + /* Element[CHARACTERS[DATETIME]] */ + case 128: + /* Element[CHARACTERS[INTEGER]] */ + case 13: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 90: + /* Element[CHARACTERS[DECIMAL]] */ + case 92: + /* Element[CHARACTERS[FLOAT]] */ + case 42: + /* Element[START_ELEMENT(AppProtocol)] */ + case 143: + /* Element[CHARACTERS[STRING]] */ + case 110: + /* Element[CHARACTERS[INTEGER]] */ + case 66: + /* Element[CHARACTERS[LIST]] */ + case 112: + /* Element[CHARACTERS[INTEGER]] */ + case 58: + /* Element[CHARACTERS[STRING]] */ + case 14: + /* Element[START_ELEMENT(SchemaID)] */ + case 122: + /* Element[CHARACTERS[INTEGER]] */ + case 16: + /* Element[START_ELEMENT(Priority)] */ + case 104: + /* Element[CHARACTERS[DATETIME]] */ + case 132: + /* Element[CHARACTERS[DATETIME]] */ + case 114: + /* Element[CHARACTERS[STRING]] */ + case 108: + /* Element[CHARACTERS[BINARY_HEX]] */ + case 84: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 106: + /* Element[CHARACTERS[DATETIME]] */ + case 11: + /* Element[START_ELEMENT(VersionNumberMinor)] */ + case 74: + /* Element[CHARACTERS[STRING]] */ + case 6: + /* Element[START_ELEMENT(VersionNumberMajor)] */ + case 64: + /* Element[CHARACTERS[STRING]] */ + case 62: + /* Element[CHARACTERS[STRING]] */ + case 136: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 130: + /* Element[CHARACTERS[STRING]] */ + case 126: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + case 118: + /* Element[CHARACTERS[INTEGER]] */ + case 48: + /* Element[START_ELEMENT(ResponseCode)] */ + case 10: + /* Element[CHARACTERS[STRING]] */ + case 80: + /* Element[CHARACTERS[BINARY_BASE64]] */ + case 56: + /* Element[CHARACTERS[STRING]] */ + case 18: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 0); + return 0; + case 109: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 113: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 12: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 140: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 57: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 97: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 135: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 5: + /* FirstStartTag[START_ELEMENT(ProtocolNamespace)] */ + case 91: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + case 111: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 103: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 7: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 133: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 123: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 61: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 99: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 107: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + case 73: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 59: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 63: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 115: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 101: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 71: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 77: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 142: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 121: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 17: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 83: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 117: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 3: + /* FirstStartTag[START_ELEMENT(AppProtocol)] */ + case 87: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 67: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 93: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 53: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 137: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 81: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + case 79: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + case 119: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 51: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 105: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 69: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 45: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + case 65: + /* FirstStartTag[CHARACTERS[LIST]] */ + case 129: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 55: + /* FirstStartTag[CHARACTERS[STRING]] */ + case 43: + /* FirstStartTag[START_ELEMENT(ResponseCode)] */ + case 20: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + case 85: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 125: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 138: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 15: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + case 131: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + case 89: + /* FirstStartTag[CHARACTERS[DECIMAL]] */ + case 127: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + case 95: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + /* 1st level and 2nd level event code */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 0); + return 0; + + } + return EXI_ERROR_UNEXPECTED_END_ELEMENT; +} + +int exiappHandEncodeEndElement(bitstream_t* stream, exi_state_t* state) { + int errn = 0; + int16_t currentID = state->grammarStack[state->stackIndex]; + switch (currentID) { + case 49: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 75: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 3, 2); + break; + case 40: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 39: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 38: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 37: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 36: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 35: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 34: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 33: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 32: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 31: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 30: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 29: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 28: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 27: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 26: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 25: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 24: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 23: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 4: + /* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */ + case 44: + /* Element[START_ELEMENT(SchemaID), END_ELEMENT] */ + case 50: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + case 76: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 2, 1); + break; + case 8: + /* Element[END_ELEMENT] */ + case 19: + /* Element[END_ELEMENT] */ + case 41: + /* Element[END_ELEMENT] */ + case 47: + /* Element[END_ELEMENT] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + break; + + default: + 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 == EXI_DATATYPE_STRING) { + return 0; + } else { + /* TODO convert typed value to string */ + return EXI_ERROR_CONVERSION_TYPE_TO_STRING; + } +} + +int exiappHandEncodeCharacters(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + int errn; + int16_t currentID = state->grammarStack[state->stackIndex]; + switch (currentID) { + case 91: + case 95: + /* FirstStartTag[CHARACTERS[FLOAT]] */ + if (val->type == EXI_DATATYPE_FLOAT) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeFloat(stream, &val->float_me); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 49: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 50; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 3, 5); + } + break; + case 109: + case 111: + case 115: + case 117: + case 121: + case 127: + /* FirstStartTag[CHARACTERS[INTEGER]] */ + if (val->type == EXI_DATATYPE_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 89: + /* FirstStartTag[CHARACTERS[DECIMAL]] */ + if (val->type == EXI_DATATYPE_DECIMAL) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeDecimal(stream, &val->decimal); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 107: + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + if (val->type == EXI_DATATYPE_BINARY_HEX) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 82: + /* Element[CHARACTERS[BOOLEAN]] */ + if (val->type == EXI_DATATYPE_BOOLEAN) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBoolean(stream, val->boolean); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 13: + case 120: + case 126: + case 139: + case 141: + /* Element[CHARACTERS[UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeUnsignedInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 12: + case 15: + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeUnsignedInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 10: + case 54: + case 56: + case 58: + case 62: + case 64: + case 68: + case 70: + case 72: + case 74: + case 78: + case 94: + case 114: + case 124: + case 130: + case 134: + case 143: + /* Element[CHARACTERS[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 110: + case 112: + case 116: + case 118: + case 122: + case 128: + /* Element[CHARACTERS[INTEGER]] */ + if (val->type == EXI_DATATYPE_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 45: + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + if (val->type == EXI_DATATYPE_ENUMERATION) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeNBitUnsignedInteger(stream, 2, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 108: + /* Element[CHARACTERS[BINARY_HEX]] */ + if (val->type == EXI_DATATYPE_BINARY_HEX) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 86: + case 88: + case 98: + case 100: + case 102: + case 104: + case 106: + case 132: + /* Element[CHARACTERS[DATETIME]] */ + if (val->type == EXI_DATATYPE_DATETIME) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeDateTime(stream, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 92: + case 96: + /* Element[CHARACTERS[FLOAT]] */ + if (val->type == EXI_DATATYPE_FLOAT) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeFloat(stream, &val->float_me); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 90: + /* Element[CHARACTERS[DECIMAL]] */ + if (val->type == EXI_DATATYPE_DECIMAL) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeDecimal(stream, &val->decimal); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 20: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 5, 1); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 85: + case 87: + case 97: + case 99: + case 101: + case 103: + case 105: + case 131: + /* FirstStartTag[CHARACTERS[DATETIME]] */ + if (val->type == EXI_DATATYPE_DATETIME) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeDateTime(stream, &val->datetime); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 75: + /* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 3, 3); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 76; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 3, 4); + encodeNBitUnsignedInteger(stream, 3, 5); + } + break; + case 21: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 5, 1); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 76: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 76; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 46: + /* Element[CHARACTERS[ENUMERATION]] */ + if (val->type == EXI_DATATYPE_ENUMERATION) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeNBitUnsignedInteger(stream, 2, val->enumeration); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 81: + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + if (val->type == EXI_DATATYPE_BOOLEAN) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBoolean(stream, val->boolean); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 79: + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + if (val->type == EXI_DATATYPE_BINARY_BASE64) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 18: + case 136: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 8, 0); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 7: + case 53: + case 55: + case 57: + case 61: + case 63: + case 67: + case 69: + case 71: + case 73: + case 77: + case 93: + case 113: + case 123: + case 129: + case 133: + case 142: + /* FirstStartTag[CHARACTERS[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 80: + /* Element[CHARACTERS[BINARY_BASE64]] */ + if (val->type == EXI_DATATYPE_BINARY_BASE64) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeBinary(stream, &val->binary); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 84: + /* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 8, -128); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 50: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (val->type == EXI_DATATYPE_STRING) { + encodeNBitUnsignedInteger(stream, 2, 2); + errn = encodeStringValue(stream, &val->string); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 50; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 2, 3); + encodeNBitUnsignedInteger(stream, 1, 1); + } + break; + case 17: + case 135: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 8, 0); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 119: + case 125: + case 137: + case 138: + case 140: + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeUnsignedInteger(stream, &val->integer); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 52: + case 60: + case 66: + /* Element[CHARACTERS[LIST]] */ + if (val->type == EXI_DATATYPE_LIST) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeUnsignedInteger32(stream, val->list.len); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 2, 2); + } + break; + case 51: + case 59: + case 65: + /* FirstStartTag[CHARACTERS[LIST]] */ + if (val->type == EXI_DATATYPE_LIST) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = encodeUnsignedInteger32(stream, val->list.len); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + case 83: + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + if (val->type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) { + encodeNBitUnsignedInteger(stream, 1, 0); + errn = _encodeNBitIntegerValue(stream, &val->integer, 8, -128); + if (errn) { + return errn; + } + /* move on */ + state->grammarStack[state->stackIndex] = 8; + return 0; + } else { + /* deviant characters */ + encodeNBitUnsignedInteger(stream, 1, 1); + encodeNBitUnsignedInteger(stream, 3, 6); + } + break; + + default: + return EXI_ERROR_UNEXPECTED_CHARACTERS; + } + + 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 exiappHandEncodeAttribute(bitstream_t* stream, exi_state_t* state, eqname_t* at, + exi_value_t* val) { + int16_t currentID = state->grammarStack[state->stackIndex]; + switch (currentID) { + + } + + /* no expected attribute */ + if (currentID < 0) { + /* runtime element */ + return -1; + } else { + return +1; + } + + /* return EXI_ERROR_UNEXPECTED_ATTRIBUTE; */ +} + +#if EXI_DEBUG == EXI_DEBUG_ON +static 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 = exiappHandEncodeAttribute(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; + +} +#endif /*EXI_DEBUG*/ + +int exiappHandEncodeAttributeXsiNil(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + + switch (state->grammarStack[state->stackIndex]) { + + } + + 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 exiappHandEncodeAttributeXsiType(bitstream_t* stream, exi_state_t* state, + exi_value_t* val) { + /* encode xsi:type event code */ + switch (state->grammarStack[state->stackIndex]) { + case 12: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 1); + break; + case 15: + errn = encodeNBitUnsignedInteger(stream, 1, 1); + errn = encodeNBitUnsignedInteger(stream, 3, 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/appHandCodec/appHand_EXIEncoder.h b/src/codec/appHandCodec/appHand_EXIEncoder.h new file mode 100644 index 0000000..7f2e0a0 --- /dev/null +++ b/src/codec/appHandCodec/appHand_EXIEncoder.h @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef EXI_appHand_ENCODER_H +#define EXI_appHand_ENCODER_H + +#include "EXITypes.h" + +int exiappHandInitEncoder(bitstream_t* stream, exi_state_t* state, + exi_name_table_runtime_t runtimeTable); + +int exiappHandEncodeStartDocument(bitstream_t* stream, + exi_state_t* state); + +int exiappHandEncodeEndDocument(bitstream_t* stream, + exi_state_t* state); + +int +exiappHandEncodeStartElement(bitstream_t* stream, + exi_state_t* state, eqname_t* se); + +int exiappHandEncodeStartElementGeneric(bitstream_t* stream, + exi_state_t* state, string_ascii_t* namespaceURI, + string_ascii_t* localName); + +int exiappHandEncodeEndElement(bitstream_t* stream, + exi_state_t* state); + +int exiappHandEncodeCharacters(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiappHandEncodeAttribute(bitstream_t* stream, + exi_state_t* state, eqname_t* at, exi_value_t* val); + +int exiappHandEncodeAttributeXsiNil(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiappHandEncodeAttributeXsiType(bitstream_t* stream, + exi_state_t* state, exi_value_t* val); + +int exiappHandEncodeListValue(bitstream_t* stream, exi_value_t* val, + list_t lt); + +#endif + +#ifdef __cplusplus +} +#endif + diff --git a/src/codec/appHandCodec/appHand_NameTableEntries.c b/src/codec/appHandCodec/appHand_NameTableEntries.c new file mode 100644 index 0000000..28cb282 --- /dev/null +++ b/src/codec/appHandCodec/appHand_NameTableEntries.c @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifndef EXI_appHand_NAME_TABLE_ENTRIES_C +#define EXI_appHand_NAME_TABLE_ENTRIES_C + +#include "appHand_NameTableEntries.h" + + + +/* ==================================== */ +/* String Table Population */ + + +#if EXI_DEBUG == EXI_DEBUG_OFF +static struct exiNamePartition localNamePartitions[5] = { + { 7 }, + { 4 }, + { 2 }, + { 46 }, + { 8 } +}; +#endif /*EXI_DEBUG*/ + + +#if EXI_DEBUG == EXI_DEBUG_OFF +exi_name_table_prepopulated_t exiappHandNameTablePrepopulated = { 5, localNamePartitions }; +#endif /*EXI_DEBUG*/ + + + + +#endif + diff --git a/src/codec/appHandCodec/appHand_NameTableEntries.h b/src/codec/appHandCodec/appHand_NameTableEntries.h new file mode 100644 index 0000000..5fcabee --- /dev/null +++ b/src/codec/appHandCodec/appHand_NameTableEntries.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +#ifndef EXI_appHand_NAME_TABLE_ENTRIES_H +#define EXI_appHand_NAME_TABLE_ENTRIES_H + +#include "EXITypes.h" + +/* ==================================== */ +/* String Table Population */ + +extern exi_name_table_prepopulated_t exiappHandNameTablePrepopulated; + +#endif + diff --git a/src/service/v2g_service.h b/src/service/v2g_service.h new file mode 100644 index 0000000..3d9c033 --- /dev/null +++ b/src/service/v2g_service.h @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2007-2010 Siemens AG + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, seeCode generated by EXISeGen
+ * + ********************************************************************/ + + + #include "v2g_serviceDataTypes.h" + #include "v2g_serviceDataTypes.c" + #include "v2g_serviceClientStubs.h" + #include "v2g_serviceDataSerialization.c" + #include "v2g_serviceClientDataTransmitter.h" + #include "EXITypes.h" + #include "EXIDecoder.h" + #include "EXIEncoder.h" + #include "StringTable.h" + + + + + + +static int deserializeMessage(struct EXIService* service); + +static int _setInt32Value(integer_t* iv, int32_t* int32) { + int errn = 0; + switch(iv->type) { + /* Unsigned Integer */ + case EXI_UNSIGNED_INTEGER_8: + *int32 = iv->val.uint8; + break; + case EXI_UNSIGNED_INTEGER_16: + *int32 = iv->val.uint16; + break; + case EXI_UNSIGNED_INTEGER_32: + if (iv->val.uint32 <= 2147483647) { + *int32 = iv->val.uint32; + } else { + errn = -1; + } + break; + case EXI_UNSIGNED_INTEGER_64: + errn = -1; + break; + /* (Signed) Integer */ + case EXI_INTEGER_8: + *int32 = iv->val.int8; + break; + case EXI_INTEGER_16: + *int32 = iv->val.int16; + break; + case EXI_INTEGER_32: + *int32 = iv->val.int32; + break; + case EXI_INTEGER_64: + errn =-1; + } + return errn; +} + +static int _setUInt32Value(integer_t* iv, uint32_t* uint32) { + int errn = 0; + switch(iv->type) { + /* Unsigned Integer */ + case EXI_UNSIGNED_INTEGER_8: + *uint32 = iv->val.uint8; + break; + case EXI_UNSIGNED_INTEGER_16: + *uint32 = iv->val.uint16; + break; + case EXI_UNSIGNED_INTEGER_32: + if (iv->val.uint32 <= 2147483647) { + *uint32 = iv->val.uint32; + } else { + errn = -1; + } + break; + case EXI_UNSIGNED_INTEGER_64: + errn = -1; + break; + /* (Signed) Integer */ + case EXI_INTEGER_8: + *uint32 = iv->val.int8; + break; + case EXI_INTEGER_16: + *uint32 = iv->val.int16; + break; + case EXI_INTEGER_32: + *uint32 = iv->val.int32; + break; + case EXI_INTEGER_64: + errn = -1; + } + return errn; +} + +static int _setInt16Value(integer_t* iv, int16_t* int16) { + int errn = 0; + switch(iv->type) { + /* Unsigned Integer */ + case EXI_UNSIGNED_INTEGER_8: + *int16 = iv->val.uint8; + break; + case EXI_UNSIGNED_INTEGER_16: + errn = -1; + break; + case EXI_UNSIGNED_INTEGER_32: + errn = -1; + break; + case EXI_UNSIGNED_INTEGER_64: + errn = -1; + break; + /* (Signed) Integer */ + case EXI_INTEGER_8: + *int16 = iv->val.int8; + break; + case EXI_INTEGER_16: + *int16 = iv->val.int16; + break; + case EXI_INTEGER_32: + errn = -1;; + break; + case EXI_INTEGER_64: + errn = -1; + } + return errn; +} + +static int _setUInt16Value(integer_t* iv, uint16_t* uint16) { + int errn = 0; + switch(iv->type) { + /* Unsigned Integer */ + case EXI_UNSIGNED_INTEGER_8: + *uint16 = iv->val.uint8; + break; + case EXI_UNSIGNED_INTEGER_16: + *uint16 = iv->val.uint16; + break; + case EXI_UNSIGNED_INTEGER_32: + if (iv->val.uint32 <= 2147483647) { + errn = -1; + } else { + errn = -1; + } + break; + case EXI_UNSIGNED_INTEGER_64: + errn = -1; + break; + /* (Signed) Integer */ + case EXI_INTEGER_8: + *uint16 = iv->val.int8; + break; + case EXI_INTEGER_16: + *uint16 = iv->val.int16; + break; + case EXI_INTEGER_32: + errn = -1; + break; + case EXI_INTEGER_64: + errn = -1; + } + return errn; +} + + + + +/** + * \brief Prepares the remote sessionSetup method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct SessionSetupReqType* Request data for the server (has to be set up before) + * \param result struct SessionSetupResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_sessionSetup(struct EXIService* service, struct MessageHeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* 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; + + + service->exiMsg.V2G_Message.Body.SessionSetupRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + + *(service->outStream.pos) -= service->transportHeaderOffset; + + + return 0; + } +/** + * \brief Prepares the remote serviceDiscovery method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct ServiceDiscoveryReqType* Request data for the server (has to be set up before) + * \param result struct ServiceDiscoveryResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_serviceDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* init EXI message */ + init_EXIDocumentType(&(service->exiMsg)); + init_ServiceDiscoveryResType(result); + + + /* 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; + + + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + + *(service->outStream.pos) -= service->transportHeaderOffset; + + return 0; + } +/** + * \brief Prepares the remote serviceDetail method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* 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; 0 != ERROR */ + int prepare_serviceDetail(struct EXIService* service, struct MessageHeaderType* header, struct ServiceDetailReqType* params, struct ServiceDetailResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* 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; + + + service->exiMsg.V2G_Message.Body.ServiceDetailRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote servicePaymentSelection method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct ServicePaymentSelectionReqType* Request data for the server (has to be set up before) + * \param result struct ServicePaymentSelectionResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_servicePaymentSelection(struct EXIService* service, struct MessageHeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* 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; + + + service->exiMsg.V2G_Message.Body.ServicePaymentSelectionRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote paymentDetails method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct PaymentDetailsReqType* Request data for the server (has to be set up before) + * \param result struct PaymentDetailsResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_paymentDetails(struct EXIService* service, struct MessageHeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* 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; + + + service->exiMsg.V2G_Message.Body.PaymentDetailsRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote contractAuthentication method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* 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; 0 != ERROR */ + int prepare_contractAuthentication(struct EXIService* service, struct MessageHeaderType* header, struct ContractAuthenticationReqType* params, struct ContractAuthenticationResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* init EXI message */ + init_EXIDocumentType(&(service->exiMsg)); + + + + /* assign data to service data structure */ + service->exiMsg.V2G_Message.Header = header; + service->exiMsg.V2G_Message.Body.ContractAuthenticationReq = params; + service->exiMsg.V2G_Message.Body.isused.ContractAuthenticationReq=1; + + + service->exiMsg.V2G_Message.Body.ContractAuthenticationRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote chargeParameterDiscovery method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct ChargeParameterDiscoveryReqType* Request data for the server (has to be set up before) + * \param result struct ChargeParameterDiscoveryResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_chargeParameterDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* params, struct ChargeParameterDiscoveryResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* init EXI message */ + init_EXIDocumentType(&(service->exiMsg)); + + init_ChargeParameterDiscoveryResType(result); + init_SAScheduleListType(result->SAScheduleList); + + /* assign data to service data structure */ + service->exiMsg.V2G_Message.Header = header; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq = params; + service->exiMsg.V2G_Message.Body.isused.ChargeParameterDiscoveryReq=1; + + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote powerDelivery method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct PowerDeliveryReqType* Request data for the server (has to be set up before) + * \param result struct PowerDeliveryResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_powerDelivery(struct EXIService* service, struct MessageHeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* init EXI message */ + init_EXIDocumentType(&(service->exiMsg)); + init_PowerDeliveryResType(result); + + + + + /* assign data to service data structure */ + service->exiMsg.V2G_Message.Header = header; + service->exiMsg.V2G_Message.Body.PowerDeliveryReq = params; + service->exiMsg.V2G_Message.Body.isused.PowerDeliveryReq=1; + + + service->exiMsg.V2G_Message.Body.PowerDeliveryRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote chargingStatus method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param result struct ChargingStatusResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_chargingStatus(struct EXIService* service, struct MessageHeaderType* header, struct ChargingStatusResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* init EXI message */ + init_EXIDocumentType(&(service->exiMsg)); + + + + /* assign data to service data structure */ + service->exiMsg.V2G_Message.Header = header; + service->exiMsg.V2G_Message.Body.isused.ChargingStatusReq=1; + + + service->exiMsg.V2G_Message.Body.ChargingStatusRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote meteringReceipt method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct MeteringReceiptReqType* Request data for the server (has to be set up before) + * \param result struct MeteringReceiptResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_meteringReceipt(struct EXIService* service, struct MessageHeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* init EXI message */ + init_EXIDocumentType(&(service->exiMsg)); + + + + /* assign data to service data structure */ + service->exiMsg.V2G_Message.Header = header; + service->exiMsg.V2G_Message.Body.MeteringReceiptReq = params; + service->exiMsg.V2G_Message.Body.isused.MeteringReceiptReq=1; + + + service->exiMsg.V2G_Message.Body.MeteringReceiptRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote certificateUpdate method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* 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; 0 != ERROR */ + int prepare_certificateUpdate(struct EXIService* service, struct MessageHeaderType* header, struct CertificateUpdateReqType* params, struct CertificateUpdateResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* 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; + + + service->exiMsg.V2G_Message.Body.CertificateUpdateRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote certificateInstallation method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* 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; 0 != ERROR */ + int prepare_certificateInstallation(struct EXIService* service, struct MessageHeaderType* header, struct CertificateInstallationReqType* params, struct CertificateInstallationResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* init EXI message */ + init_EXIDocumentType(&(service->exiMsg)); + init_CertificateInstallationResType(result); + + + /* 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; + + + service->exiMsg.V2G_Message.Body.CertificateInstallationRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote cableCheck method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct CableCheckReqType* Request data for the server (has to be set up before) + * \param result struct CableCheckResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_cableCheck(struct EXIService* service, struct MessageHeaderType* header, struct CableCheckReqType* params, struct CableCheckResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* init EXI message */ + init_EXIDocumentType(&(service->exiMsg)); + + + + /* assign data to service data structure */ + service->exiMsg.V2G_Message.Header = header; + service->exiMsg.V2G_Message.Body.CableCheckReq = params; + service->exiMsg.V2G_Message.Body.isused.CableCheckReq=1; + + + service->exiMsg.V2G_Message.Body.CableCheckRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote preCharge method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct PreChargeReqType* Request data for the server (has to be set up before) + * \param result struct PreChargeResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_preCharge(struct EXIService* service, struct MessageHeaderType* header, struct PreChargeReqType* params, struct PreChargeResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* init EXI message */ + init_EXIDocumentType(&(service->exiMsg)); + + + + /* assign data to service data structure */ + service->exiMsg.V2G_Message.Header = header; + service->exiMsg.V2G_Message.Body.PreChargeReq = params; + service->exiMsg.V2G_Message.Body.isused.PreChargeReq=1; + + + service->exiMsg.V2G_Message.Body.PreChargeRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote currentDemand method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct CurrentDemandReqType* Request data for the server (has to be set up before) + * \param result struct CurrentDemandResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_currentDemand(struct EXIService* service, struct MessageHeaderType* header, struct CurrentDemandReqType* params, struct CurrentDemandResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* init EXI message */ + init_EXIDocumentType(&(service->exiMsg)); + + + + /* assign data to service data structure */ + service->exiMsg.V2G_Message.Header = header; + service->exiMsg.V2G_Message.Body.CurrentDemandReq = params; + service->exiMsg.V2G_Message.Body.isused.CurrentDemandReq=1; + + + service->exiMsg.V2G_Message.Body.CurrentDemandRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote weldingDetection method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct WeldingDetectionReqType* Request data for the server (has to be set up before) + * \param result struct WeldingDetectionResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_weldingDetection(struct EXIService* service, struct MessageHeaderType* header, struct WeldingDetectionReqType* params, struct WeldingDetectionResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* init EXI message */ + init_EXIDocumentType(&(service->exiMsg)); + + + + /* assign data to service data structure */ + service->exiMsg.V2G_Message.Header = header; + service->exiMsg.V2G_Message.Body.WeldingDetectionReq = params; + service->exiMsg.V2G_Message.Body.isused.WeldingDetectionReq=1; + + + service->exiMsg.V2G_Message.Body.WeldingDetectionRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } +/** + * \brief Prepares the remote sessionStop method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param result struct SessionStopResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ + int prepare_sessionStop(struct EXIService* service, struct MessageHeaderType* header, struct SessionStopResType* result) +{ + /* uint32_t posEncode; */ + exi_name_table_runtime_t runtimeTableEncode; + + /* init uniqueID stack */ + service->idPath.pos=0; + + /* init outStream data structure */ + *(service->outStream.pos) = service->transportHeaderOffset; + service->outStream.buffer = 0; + service->outStream.capacity = 8; + + /* init encoder (write header, set initial state) */ + exiInitNameTableRuntime(&runtimeTableEncode); + exiInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode); + + + + + + /* init EXI message */ + init_EXIDocumentType(&(service->exiMsg)); + + + + /* assign data to service data structure */ + service->exiMsg.V2G_Message.Header = header; + service->exiMsg.V2G_Message.Body.isused.SessionStopReq=1; + + + service->exiMsg.V2G_Message.Body.SessionStopRes = result; + + + + /* encode data to exi stream*/ + if(serialize_message(service)) + { + + service->errorCode = EXI_SERIALIZATION_FAILED; + return EXI_SERIALIZATION_FAILED; + } + *(service->outStream.pos) -= service->transportHeaderOffset; + return 0; + } + + + + /** + * \brief Determines which response message was received + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param respMsg enum responseMessages* contains the name of the response message + * \param result struct SessionStopResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ +int determineResponseMesssage(struct EXIService* service, enum responseMessages* respMsg) +{ + + uint32_t posDecode; + exi_name_table_runtime_t runtimeTableDecode; + + /* init inStream data structure */ + posDecode = service->transportHeaderOffset; + service->inStream.pos = &posDecode; + service->inStream.buffer=0; + service->inStream.capacity=0; + + /* 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) + { + + service->errorCode = EXI_DESERIALIZATION_FAILED; + return EXI_DESERIALIZATION_FAILED; + } + + + if(service->exiMsg.V2G_Message.Body.isused.SessionSetupRes) + *respMsg = SESSIONSETUPRES; + else if(service->exiMsg.V2G_Message.Body.isused.ServiceDiscoveryRes) + *respMsg = SERVICEDISCOVERYRES; + else if(service->exiMsg.V2G_Message.Body.isused.ServiceDetailRes) + *respMsg = SERVICEDETAILRES; + else if(service->exiMsg.V2G_Message.Body.isused.ServicePaymentSelectionRes) + *respMsg = SERVICEPAYMENTSELECTIONRES; + else if(service->exiMsg.V2G_Message.Body.isused.PaymentDetailsRes) + *respMsg = PAYMENTDETAILSRES; + else if(service->exiMsg.V2G_Message.Body.isused.ContractAuthenticationRes) + *respMsg = CONTRACTAUTHENTICATIONRES; + else if(service->exiMsg.V2G_Message.Body.isused.ChargeParameterDiscoveryRes) + *respMsg = CHARGEPARAMETERDISCOVERYRES; + else if(service->exiMsg.V2G_Message.Body.isused.PowerDeliveryRes) + *respMsg = POWERDELIVERYRES; + else if(service->exiMsg.V2G_Message.Body.isused.ChargingStatusRes) + *respMsg = CHARGINGSTATUSRES; + else if(service->exiMsg.V2G_Message.Body.isused.MeteringReceiptRes) + *respMsg = METERINGRECEIPTRES; + else if(service->exiMsg.V2G_Message.Body.isused.SessionStopRes) + *respMsg = SESSIONSTOPRES; + else if(service->exiMsg.V2G_Message.Body.isused.CertificateUpdateRes) + *respMsg = CERTIFICATEUPDATERES; + else if(service->exiMsg.V2G_Message.Body.isused.CertificateInstallationRes) + *respMsg = CERTIFICATEINSTALLATIONRES; + else if(service->exiMsg.V2G_Message.Body.isused.CableCheckRes) + *respMsg = CABLECHECKRES; + else if(service->exiMsg.V2G_Message.Body.isused.PreChargeRes) + *respMsg = PRECHARGERES; + else if(service->exiMsg.V2G_Message.Body.isused.CurrentDemandRes) + *respMsg = CURRENTDEMANDRES; + else if(service->exiMsg.V2G_Message.Body.isused.WeldingDetectionRes) + *respMsg = WELDINGDETECTIONRES; + + return 0; +} + + + /** + * Deserialize an element value of the EXI stream and assign it to the + * service data structure + */ +static int deserializeElementAttributeCharacter(struct EXIService* service) +{ + + switch(service->eqn.namespaceURI) { + case 0: + switch(service->eqn.localPart) { + case 0: /*attr_Algorithm*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + if( service->idPath.id[4] == 0) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->SignedInfo.CanonicalizationMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.CanonicalizationMethod.attr_Algorithm.arraylen.data = service->val.string.len; + + } else if(service->idPath.id[4] == 43) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->SignedInfo.SignatureMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.SignatureMethod.attr_Algorithm.arraylen.data = service->val.string.len; + + } else if(service->idPath.id[5] == 5) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].DigestMethod.attr_Algorithm.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].DigestMethod.attr_Algorithm.arraylen.data = service->val.string.len; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 2: /*attr_Id*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + if( service->idPath.id[2] == 42) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Header->Signature->attr_Id.arraylen.data = service->val.string.len; + service->exiMsg.V2G_Message.Header->Signature->isused.attr_Id=1; + + } else if(service->idPath.id[2] == 12) + { + memcpy(service->exiMsg.V2G_Message.Body.CertificateUpdateRes->attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Body.CertificateUpdateRes->attr_Id.arraylen.data = service->val.string.len; + + } else if(service->idPath.id[2] == 8) + { + memcpy(service->exiMsg.V2G_Message.Body.CertificateInstallationRes->attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Body.CertificateInstallationRes->attr_Id.arraylen.data = service->val.string.len; + + } else if(service->idPath.id[3] == 52) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->SignedInfo.attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.attr_Id.arraylen.data = service->val.string.len; + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.isused.attr_Id=1; + + } else if(service->idPath.id[3] == 50) + { + + } else if(service->idPath.id[3] == 14) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->KeyInfo.attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Header->Signature->KeyInfo.attr_Id.arraylen.data = service->val.string.len; + service->exiMsg.V2G_Message.Header->Signature->KeyInfo.isused.attr_Id=1; + + } else if(service->idPath.id[4] == 34) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].attr_Id.arraylen.data = service->val.string.len; + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].isused.attr_Id=1; + + } else if(service->idPath.id[5] == 117) + { + memcpy(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->attr_Id.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->attr_Id.arraylen.data = service->val.string.len; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 7: /*attr_URI*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].attr_URI.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].attr_URI.arraylen.data = service->val.string.len; + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].isused.attr_URI=1; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 6: /*attr_Type*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].attr_Type.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].attr_Type.arraylen.data = service->val.string.len; + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].isused.attr_Type=1; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 4: /*attr_Name*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].attr_Name.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].attr_Name.arraylen.data = service->val.string.len; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 8: /*attr_ValueType*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].attr_ValueType.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].attr_ValueType.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 == EXI_DATATYPE_BINARY_BASE64) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].DigestValue.data, service->val.binary.data,service->val.binary.len); + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.Reference[0].DigestValue.arraylen.data = service->val.binary.len; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 50: /*SignatureValue*/ + + if(service->val.type == EXI_DATATYPE_BINARY_BASE64) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->SignatureValue.data, service->val.binary.data,service->val.binary.len); + service->exiMsg.V2G_Message.Header->Signature->SignatureValue.arraylen.data = service->val.binary.len; + + + } + else + { + return -1; /* wrong data type */ + } + + + break; + + + + case 62: /*X509IssuerName*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->KeyInfo.X509Data.X509IssuerSerial.X509IssuerName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Header->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 == EXI_DATATYPE_INTEGER) + { + service->exiMsg.V2G_Message.Header->Signature->KeyInfo.X509Data.X509IssuerSerial.X509SerialNumber = service->val.integer.val.int64; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 65: /*X509SKI*/ + + if(service->val.type == EXI_DATATYPE_BINARY_BASE64) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->KeyInfo.X509Data.X509SKI.data, service->val.binary.data,service->val.binary.len); + service->exiMsg.V2G_Message.Header->Signature->KeyInfo.X509Data.X509SKI.arraylen.data = service->val.binary.len; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 67: /*X509SubjectName*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->KeyInfo.X509Data.X509SubjectName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Header->Signature->KeyInfo.X509Data.X509SubjectName.arraylen.data = service->val.string.len; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 59: /*X509Certificate*/ + + if(service->val.type == EXI_DATATYPE_BINARY_BASE64) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->KeyInfo.X509Data.X509Certificate.data, service->val.binary.data,service->val.binary.len); + service->exiMsg.V2G_Message.Header->Signature->KeyInfo.X509Data.X509Certificate.arraylen.data = service->val.binary.len; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 58: /*X509CRL*/ + + if(service->val.type == EXI_DATATYPE_BINARY_BASE64) + { + memcpy(service->exiMsg.V2G_Message.Header->Signature->KeyInfo.X509Data.X509CRL.data, service->val.binary.data,service->val.binary.len); + service->exiMsg.V2G_Message.Header->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 82: /*ResponseCode*/ + + if(service->val.type == EXI_DATATYPE_ENUMERATION) + { + if( service->idPath.id[2] == 107) + { + if(service->exiMsg.V2G_Message.Body.isused.SessionSetupReq) + { + service->exiMsg.V2G_Message.Body.isused.SessionSetupRes=1; + } + else + { + return -1; + } + + service->exiMsg.V2G_Message.Body.SessionSetupRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 94) + { + + if(service->exiMsg.V2G_Message.Body.isused.ServiceDiscoveryReq) + { + service->exiMsg.V2G_Message.Body.isused.ServiceDiscoveryRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 90) + { + + + if(service->exiMsg.V2G_Message.Body.isused.ServiceDetailReq) + { + service->exiMsg.V2G_Message.Body.isused.ServiceDetailRes=1; + } + else + { + return -1; + } + + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 101) + { + + if(service->exiMsg.V2G_Message.Body.isused.ServicePaymentSelectionReq) + { + service->exiMsg.V2G_Message.Body.isused.ServicePaymentSelectionRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.ServicePaymentSelectionRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 67) + { + + + if(service->exiMsg.V2G_Message.Body.isused.PaymentDetailsReq) + { + service->exiMsg.V2G_Message.Body.isused.PaymentDetailsRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.PaymentDetailsRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 27) + { + + if(service->exiMsg.V2G_Message.Body.isused.ContractAuthenticationReq) + { + service->exiMsg.V2G_Message.Body.isused.ContractAuthenticationRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.ContractAuthenticationRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 16) + { + + if(service->exiMsg.V2G_Message.Body.isused.ChargeParameterDiscoveryReq) + { + service->exiMsg.V2G_Message.Body.isused.ChargeParameterDiscoveryRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 72) + { + + if(service->exiMsg.V2G_Message.Body.isused.PowerDeliveryReq) + { + service->exiMsg.V2G_Message.Body.isused.PowerDeliveryRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.PowerDeliveryRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 23) + { + + if(service->exiMsg.V2G_Message.Body.isused.ChargingStatusReq) + { + service->exiMsg.V2G_Message.Body.isused.ChargingStatusRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.ChargingStatusRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 62) + { + + if(service->exiMsg.V2G_Message.Body.isused.MeteringReceiptReq) + { + service->exiMsg.V2G_Message.Body.isused.MeteringReceiptRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.MeteringReceiptRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 110) + { + + if(service->exiMsg.V2G_Message.Body.isused.SessionStopReq) + { + service->exiMsg.V2G_Message.Body.isused.SessionStopRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.SessionStopRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 12) + { + + if(service->exiMsg.V2G_Message.Body.isused.CertificateUpdateReq) + { + service->exiMsg.V2G_Message.Body.isused.CertificateUpdateRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 8) + { + + + if(service->exiMsg.V2G_Message.Body.isused.CertificateInstallationReq) + { + service->exiMsg.V2G_Message.Body.isused.CertificateInstallationRes=1; + } + else + { + return -1; + } + + service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 4) + { + + if(service->exiMsg.V2G_Message.Body.isused.CableCheckReq) + { + service->exiMsg.V2G_Message.Body.isused.CableCheckRes=1; + } + else + { + return -1; + } + + + + service->exiMsg.V2G_Message.Body.CableCheckRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 76) + { + + + if(service->exiMsg.V2G_Message.Body.isused.PreChargeReq) + { + service->exiMsg.V2G_Message.Body.isused.PreChargeRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.PreChargeRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 34) + { + + + if(service->exiMsg.V2G_Message.Body.isused.CurrentDemandReq) + { + service->exiMsg.V2G_Message.Body.isused.CurrentDemandRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.CurrentDemandRes->ResponseCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 115) + { + + if(service->exiMsg.V2G_Message.Body.isused.WeldingDetectionReq) + { + service->exiMsg.V2G_Message.Body.isused.WeldingDetectionRes=1; + } + else + { + return -1; + } + + + service->exiMsg.V2G_Message.Body.WeldingDetectionRes->ResponseCode = service->val.enumeration; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 46: /*EVSEID*/ + + if(service->val.type == EXI_DATATYPE_BINARY_HEX) + { + if( service->idPath.id[2] == 107) + { + 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] == 23) + { + memcpy(service->exiMsg.V2G_Message.Body.ChargingStatusRes->EVSEID.data, service->val.binary.data,service->val.binary.len); + service->exiMsg.V2G_Message.Body.ChargingStatusRes->EVSEID.arraylen.data = service->val.binary.len; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 39: /*DateTimeNow*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + if( service->idPath.id[2] == 107) + { + service->exiMsg.V2G_Message.Body.SessionSetupRes->DateTimeNow = service->val.integer.val.int64; + service->exiMsg.V2G_Message.Body.SessionSetupRes->isused.DateTimeNow=1; + + } else if(service->idPath.id[2] == 67) + { + service->exiMsg.V2G_Message.Body.PaymentDetailsRes->DateTimeNow = service->val.integer.val.int64; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 96: /*ServiceID*/ + + if(service->val.type == EXI_DATATYPE_UNSIGNED_INTEGER) + { + if( service->idPath.id[2] == 90) + { + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceID = service->val.integer.val.uint16; + + } else if(service->idPath.id[4] == 134) + { + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.ServiceTag.ServiceID = service->val.integer.val.uint16; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 57: /*GenChallenge*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + memcpy(service->exiMsg.V2G_Message.Body.PaymentDetailsRes->GenChallenge.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Body.PaymentDetailsRes->GenChallenge.arraylen.data = service->val.string.len; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 84: /*SAScheduleTupleID*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + + _setInt16Value( &(service->val.integer),&(service->val.integer.val.int16)); + + if( service->idPath.id[2] == 23) + { + + service->exiMsg.V2G_Message.Body.ChargingStatusRes->SAScheduleTupleID = service->val.integer.val.int16; + service->exiMsg.V2G_Message.Body.ChargingStatusRes->isused.SAScheduleTupleID=1; + + } else if(service->idPath.id[4] == 112) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SAScheduleTupleID = service->val.integer.val.int16; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 79: /*ReceiptRequired*/ + + if(service->val.type == EXI_DATATYPE_BOOLEAN) + { + service->exiMsg.V2G_Message.Body.ChargingStatusRes->ReceiptRequired = service->val.boolean; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 31: /*ContractSignatureEncryptedPrivateKey*/ + + if(service->val.type == EXI_DATATYPE_BINARY_BASE64) + { + if( service->idPath.id[2] == 12) + { + memcpy(service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractSignatureEncryptedPrivateKey.data, service->val.binary.data,service->val.binary.len); + service->exiMsg.V2G_Message.Body.CertificateUpdateRes->ContractSignatureEncryptedPrivateKey.arraylen.data = service->val.binary.len; + + } else if(service->idPath.id[2] == 8) + { + memcpy(service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractSignatureEncryptedPrivateKey.data, service->val.binary.data,service->val.binary.len); + service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractSignatureEncryptedPrivateKey.arraylen.data = service->val.binary.len; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 38: /*DHParams*/ + + if(service->val.type == EXI_DATATYPE_BINARY_BASE64) + { + if( service->idPath.id[2] == 12) + { + memcpy(service->exiMsg.V2G_Message.Body.CertificateUpdateRes->DHParams.data, service->val.binary.data,service->val.binary.len); + service->exiMsg.V2G_Message.Body.CertificateUpdateRes->DHParams.arraylen.data = service->val.binary.len; + + } else if(service->idPath.id[2] == 8) + { + memcpy(service->exiMsg.V2G_Message.Body.CertificateInstallationRes->DHParams.data, service->val.binary.data,service->val.binary.len); + service->exiMsg.V2G_Message.Body.CertificateInstallationRes->DHParams.arraylen.data = service->val.binary.len; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 29: /*ContractID*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + if( service->idPath.id[2] == 12) + { + 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] == 8) + { + 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 83: /*RetryCounter*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + service->exiMsg.V2G_Message.Body.CertificateUpdateRes->RetryCounter = service->val.integer.val.int16; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 45: /*EVSECurrentLimitAchieved*/ + + if(service->val.type == EXI_DATATYPE_BOOLEAN) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSECurrentLimitAchieved = service->val.boolean; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 54: /*EVSEVoltageLimitAchieved*/ + + if(service->val.type == EXI_DATATYPE_BOOLEAN) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEVoltageLimitAchieved = service->val.boolean; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 51: /*EVSEPowerLimitAchieved*/ + + if(service->val.type == EXI_DATATYPE_BOOLEAN) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPowerLimitAchieved = service->val.boolean; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + } /* close switch(service->eqn.localPart) */ + break; + case 6: + switch(service->eqn.localPart) { + case 74: /*FaultCode*/ + + if(service->val.type == EXI_DATATYPE_ENUMERATION) + { + service->exiMsg.V2G_Message.Header->Notification.FaultCode = service->val.enumeration; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 75: /*FaultMsg*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + memcpy(service->exiMsg.V2G_Message.Header->Notification.FaultMsg.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Header->Notification.FaultMsg.arraylen.data = service->val.string.len; + service->exiMsg.V2G_Message.Header->Notification.isused.FaultMsg=1; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 99: /*PaymentOption*/ + + if(service->val.type == EXI_DATATYPE_ENUMERATION) + { + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->PaymentOptions.PaymentOption[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->PaymentOptions.arraylen.PaymentOption++] = service->val.enumeration; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 130: /*ServiceID*/ + + if(service->val.type == EXI_DATATYPE_UNSIGNED_INTEGER) + { + + _setUInt16Value( &(service->val.integer),&(service->val.integer.val.uint16)); + + if( service->idPath.id[4] == 134) + { + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.ServiceTag.ServiceID = service->val.integer.val.uint16; + + } else if(service->idPath.id[5] == 134) + { + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceTag.ServiceID = service->val.integer.val.uint16; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 131: /*ServiceName*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + if( service->idPath.id[4] == 134) + { + 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[5] == 134) + { + memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceTag.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].ServiceTag.ServiceName.arraylen.data = service->val.string.len; + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceTag.isused.ServiceName=1; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 127: /*ServiceCategory*/ + + if(service->val.type == EXI_DATATYPE_ENUMERATION) + { + if( service->idPath.id[4] == 134) + { + 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[5] == 134) + { + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceTag.ServiceCategory = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceTag.isused.ServiceCategory=1; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 133: /*ServiceScope*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + if( service->idPath.id[4] == 134) + { + 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[5] == 134) + { + memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceTag.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].ServiceTag.ServiceScope.arraylen.data = service->val.string.len; + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceTag.isused.ServiceScope=1; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 76: /*FreeService*/ + + if(service->val.type == EXI_DATATYPE_BOOLEAN) + { + if( service->idPath.id[3] == 18) + { + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.FreeService = service->val.boolean; + + } else if(service->idPath.id[4] == 126) + { + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].FreeService = service->val.boolean; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 71: /*EnergyTransferType*/ + + if(service->val.type == EXI_DATATYPE_ENUMERATION) + { + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ChargeService.EnergyTransferType = service->val.enumeration; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 84: /*Multiplier*/ + + if(service->val.type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) + { + if( service->idPath.id[3] == 47) + { + service->exiMsg.V2G_Message.Body.ChargingStatusRes->EVSEMaxCurrent.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[3] == 53 && service->idPath.id[2] == 76) + { + service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[3] == 53 && service->idPath.id[2] == 34) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[3] == 52) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[3] == 50) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumVoltageLimit.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[3] == 48) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumCurrentLimit.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[3] == 49) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumPowerLimit.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[3] == 53 && service->idPath.id[2] == 115) + { + service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[4] == 57) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxVoltage.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[4] == 56) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxCurrent.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[4] == 61) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMinCurrent.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[4] == 58) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumCurrentLimit.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[4] == 59) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumPowerLimit.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[4] == 60) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumVoltageLimit.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[4] == 62) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumCurrentLimit.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[4] == 63) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumVoltageLimit.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[4] == 53) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSECurrentRegulationTolerance.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[4] == 64) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEPeakCurrentRipple.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[4] == 54) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEEnergyToBeDelivered.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[4] == 82) + { + service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.MeterReading.Multiplier = service->val.integer.val.int8; + + } else if(service->idPath.id[6] == 168) + { + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].physicalValue.Multiplier = service->val.integer.val.int8; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 145: /*Unit*/ + + if(service->val.type == EXI_DATATYPE_ENUMERATION) + { + if( service->idPath.id[3] == 47) + { + service->exiMsg.V2G_Message.Body.ChargingStatusRes->EVSEMaxCurrent.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargingStatusRes->EVSEMaxCurrent.isused.Unit=1; + + } else if(service->idPath.id[3] == 53 && service->idPath.id[2] == 76) + { + service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.isused.Unit=1; + + } else if(service->idPath.id[3] == 53 && service->idPath.id[2] == 34) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.isused.Unit=1; + + } else if(service->idPath.id[3] == 52) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.isused.Unit=1; + + } else if(service->idPath.id[3] == 50) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumVoltageLimit.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumVoltageLimit.isused.Unit=1; + + } else if(service->idPath.id[3] == 48) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumCurrentLimit.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumCurrentLimit.isused.Unit=1; + + } else if(service->idPath.id[3] == 49) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumPowerLimit.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumPowerLimit.isused.Unit=1; + + } else if(service->idPath.id[3] == 53 && service->idPath.id[2] == 115) + { + service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.isused.Unit=1; + + } else if(service->idPath.id[4] == 57) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxVoltage.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxVoltage.isused.Unit=1; + + } else if(service->idPath.id[4] == 56) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxCurrent.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxCurrent.isused.Unit=1; + + } else if(service->idPath.id[4] == 61) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMinCurrent.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMinCurrent.isused.Unit=1; + + } else if(service->idPath.id[4] == 58) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumCurrentLimit.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumCurrentLimit.isused.Unit=1; + + } else if(service->idPath.id[4] == 59) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumPowerLimit.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumPowerLimit.isused.Unit=1; + + } else if(service->idPath.id[4] == 60) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumVoltageLimit.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumVoltageLimit.isused.Unit=1; + + } else if(service->idPath.id[4] == 62) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumCurrentLimit.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumCurrentLimit.isused.Unit=1; + + } else if(service->idPath.id[4] == 63) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumVoltageLimit.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumVoltageLimit.isused.Unit=1; + + } else if(service->idPath.id[4] == 53) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSECurrentRegulationTolerance.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSECurrentRegulationTolerance.isused.Unit=1; + + } else if(service->idPath.id[4] == 64) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEPeakCurrentRipple.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEPeakCurrentRipple.isused.Unit=1; + + } else if(service->idPath.id[4] == 54) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEEnergyToBeDelivered.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEEnergyToBeDelivered.isused.Unit=1; + + } else if(service->idPath.id[4] == 82) + { + service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.MeterReading.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.MeterReading.isused.Unit=1; + + } else if(service->idPath.id[6] == 168) + { + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].physicalValue.Unit = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].physicalValue.isused.Unit=1; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 146: /*Value*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + + _setInt16Value( &(service->val.integer),&(service->val.integer.val.int16)); + + if( service->idPath.id[3] == 47) + { + service->exiMsg.V2G_Message.Body.ChargingStatusRes->EVSEMaxCurrent.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[3] == 53 && service->idPath.id[2] == 76) + { + service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[3] == 53 && service->idPath.id[2] == 34) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[3] == 52) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[3] == 50) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumVoltageLimit.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[3] == 48) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumCurrentLimit.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[3] == 49) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEMaximumPowerLimit.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[3] == 53 && service->idPath.id[2] == 115) + { + service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[4] == 57) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxVoltage.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[4] == 56) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMaxCurrent.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[4] == 61) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->EVSEMinCurrent.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[4] == 58) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumCurrentLimit.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[4] == 59) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumPowerLimit.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[4] == 60) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMaximumVoltageLimit.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[4] == 62) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumCurrentLimit.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[4] == 63) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEMinimumVoltageLimit.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[4] == 53) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSECurrentRegulationTolerance.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[4] == 64) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEPeakCurrentRipple.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[4] == 54) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->EVSEEnergyToBeDelivered.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[4] == 82) + { + service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.MeterReading.Value = service->val.integer.val.int16; + + } else if(service->idPath.id[6] == 168) + { + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].physicalValue.Value = service->val.integer.val.int16; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 149: /*boolValue*/ + + if(service->val.type == EXI_DATATYPE_BOOLEAN) + { + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].boolValue = service->val.boolean; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 150: /*byteValue*/ + + if(service->val.type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) + { + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].byteValue = service->val.integer.val.int8; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 177: /*shortValue*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + + _setInt16Value( &(service->val.integer),&(service->val.integer.val.int16)); + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].shortValue = service->val.integer.val.int16; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 162: /*intValue*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + _setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].intValue)); + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 181: /*stringValue*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + memcpy(service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].stringValue.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].Parameter[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter].stringValue.arraylen.data = service->val.string.len; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 96: /*ParameterSetID*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + + _setInt16Value( &(service->val.integer),&(service->val.integer.val.int16)); + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].ParameterSetID = service->val.integer.val.int16; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 8: /*Certificate*/ + + if(service->val.type == EXI_DATATYPE_BINARY_BASE64) + { + if( service->idPath.id[2] == 12) + { + 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[5] == 8 && service->idPath.id[4] == 141) + { + 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; + service->exiMsg.V2G_Message.Body.CertificateInstallationRes->ContractSignatureCertChain.isused.SubCertificates=1; + + } else if(service->idPath.id[2] == 8) + { + 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 + { + return -1; /* wrong data type */ + } + + + break; + case 179: /*start*/ + + if(service->val.type == EXI_DATATYPE_UNSIGNED_INTEGER) + { + if( service->idPath.id[5] == 88) + { + _setUInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].PMaxSchedule.PMaxScheduleEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].PMaxSchedule.arraylen.PMaxScheduleEntry].RelativeTimeInterval.start)); + + } else if(service->idPath.id[5] == 117) + { + _setUInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].RelativeTimeInterval.start)); + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 156: /*duration*/ + + if(service->val.type == EXI_DATATYPE_UNSIGNED_INTEGER) + { + if( service->idPath.id[5] == 88) + { + _setUInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].PMaxSchedule.PMaxScheduleEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].PMaxSchedule.arraylen.PMaxScheduleEntry].RelativeTimeInterval.duration)); + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].PMaxSchedule.PMaxScheduleEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].PMaxSchedule.arraylen.PMaxScheduleEntry].RelativeTimeInterval.isused.duration=1; + + } else if(service->idPath.id[5] == 117) + { + _setUInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].RelativeTimeInterval.duration)); + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].RelativeTimeInterval.isused.duration=1; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 87: /*PMax*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + _setInt16Value( &(service->val.integer),&(service->val.integer.val.int16)); + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].PMaxSchedule.PMaxScheduleEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].PMaxSchedule.arraylen.PMaxScheduleEntry].PMax = service->val.integer.val.int16; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 91: /*PMaxScheduleID*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + + _setInt16Value( &(service->val.integer),&(service->val.integer.val.int16)); + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].PMaxSchedule.PMaxScheduleID = service->val.integer.val.int16; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 153: /*costKind*/ + + if(service->val.type == EXI_DATATYPE_ENUMERATION) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].ConsumptionCost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].arraylen.ConsumptionCost].Cost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].ConsumptionCost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].arraylen.ConsumptionCost].arraylen.Cost].costKind = service->val.enumeration; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 147: /*amount*/ + + if(service->val.type == EXI_DATATYPE_UNSIGNED_INTEGER) + { + _setUInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].ConsumptionCost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].arraylen.ConsumptionCost].Cost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].ConsumptionCost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].arraylen.ConsumptionCost].arraylen.Cost].amount)); + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 148: /*amountMultiplier*/ + + if(service->val.type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].ConsumptionCost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].arraylen.ConsumptionCost].Cost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].ConsumptionCost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].arraylen.ConsumptionCost].arraylen.Cost].amountMultiplier = service->val.integer.val.int8; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].ConsumptionCost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].arraylen.ConsumptionCost].Cost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].ConsumptionCost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].arraylen.ConsumptionCost].arraylen.Cost].isused.amountMultiplier=1; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 180: /*startValue*/ + + if(service->val.type == EXI_DATATYPE_UNSIGNED_INTEGER) + { + _setUInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].ConsumptionCost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].arraylen.ConsumptionCost].startValue)); + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 32: /*EPriceLevel*/ + + if(service->val.type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].EPriceLevel = service->val.integer.val.uint8; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 121: /*SalesTariffID*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + _setInt16Value( &(service->val.integer),&(service->val.integer.val.int16)); + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffID = service->val.integer.val.int16; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 118: /*SalesTariffDescription*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + memcpy(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffDescription.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffDescription.arraylen.data = service->val.string.len; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->isused.SalesTariffDescription=1; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 86: /*NumEPriceLevels*/ + + if(service->val.type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->NumEPriceLevels = service->val.integer.val.uint8; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 113: /*SAScheduleTupleID*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + _setInt16Value( &(service->val.integer),&(service->val.integer.val.int16)); + + if( service->idPath.id[2] == 23) + { + service->exiMsg.V2G_Message.Body.ChargingStatusRes->SAScheduleTupleID = service->val.integer.val.int16; + service->exiMsg.V2G_Message.Body.ChargingStatusRes->isused.SAScheduleTupleID=1; + + } else if(service->idPath.id[4] == 112) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SAScheduleTupleID = service->val.integer.val.int16; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 102: /*PowerSwitchClosed*/ + + if(service->val.type == EXI_DATATYPE_BOOLEAN) + { + if( service->idPath.id[2] == 72) + { + service->exiMsg.V2G_Message.Body.PowerDeliveryRes->AC_EVSEStatus->PowerSwitchClosed = service->val.boolean; + + } else if(service->idPath.id[2] == 23) + { + service->exiMsg.V2G_Message.Body.ChargingStatusRes->AC_EVSEStatus.PowerSwitchClosed = service->val.boolean; + + } else if(service->idPath.id[2] == 62) + { + service->exiMsg.V2G_Message.Body.MeteringReceiptRes->AC_EVSEStatus.PowerSwitchClosed = service->val.boolean; + + } else if(service->idPath.id[4] == 4) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->AC_EVSEStatus.PowerSwitchClosed = service->val.boolean; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 105: /*RCD*/ + + if(service->val.type == EXI_DATATYPE_BOOLEAN) + { + if( service->idPath.id[2] == 72) + { + service->exiMsg.V2G_Message.Body.PowerDeliveryRes->AC_EVSEStatus->RCD = service->val.boolean; + + } else if(service->idPath.id[2] == 23) + { + service->exiMsg.V2G_Message.Body.ChargingStatusRes->AC_EVSEStatus.RCD = service->val.boolean; + + } else if(service->idPath.id[2] == 62) + { + service->exiMsg.V2G_Message.Body.MeteringReceiptRes->AC_EVSEStatus.RCD = service->val.boolean; + + } else if(service->idPath.id[4] == 4) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->AC_EVSEStatus.RCD = service->val.boolean; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 138: /*ShutDownTime*/ + + if(service->val.type == EXI_DATATYPE_UNSIGNED_INTEGER) + { + if( service->idPath.id[2] == 72) + { + _setUInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.PowerDeliveryRes->AC_EVSEStatus->ShutDownTime)); + + } else if(service->idPath.id[2] == 23) + { + _setUInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ChargingStatusRes->AC_EVSEStatus.ShutDownTime)); + + } else if(service->idPath.id[2] == 62) + { + _setUInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.MeteringReceiptRes->AC_EVSEStatus.ShutDownTime)); + + } else if(service->idPath.id[4] == 4) + { + _setUInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->AC_EVSEStatus.ShutDownTime)); + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 140: /*StopCharging*/ + + if(service->val.type == EXI_DATATYPE_BOOLEAN) + { + if( service->idPath.id[2] == 72) + { + service->exiMsg.V2G_Message.Body.PowerDeliveryRes->AC_EVSEStatus->StopCharging = service->val.boolean; + + } else if(service->idPath.id[2] == 23) + { + service->exiMsg.V2G_Message.Body.ChargingStatusRes->AC_EVSEStatus.StopCharging = service->val.boolean; + + } else if(service->idPath.id[2] == 62) + { + service->exiMsg.V2G_Message.Body.MeteringReceiptRes->AC_EVSEStatus.StopCharging = service->val.boolean; + + } else if(service->idPath.id[4] == 4) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->AC_EVSEChargeParameter->AC_EVSEStatus.StopCharging = service->val.boolean; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 55: /*EVSEIsolationStatus*/ + + if(service->val.type == EXI_DATATYPE_ENUMERATION) + { + if( service->idPath.id[2] == 72) + { + service->exiMsg.V2G_Message.Body.PowerDeliveryRes->DC_EVSEStatus->EVSEIsolationStatus = service->val.enumeration; + service->exiMsg.V2G_Message.Body.PowerDeliveryRes->DC_EVSEStatus->isused.EVSEIsolationStatus=1; + + } else if(service->idPath.id[2] == 4) + { + service->exiMsg.V2G_Message.Body.CableCheckRes->DC_EVSEStatus.EVSEIsolationStatus = service->val.enumeration; + service->exiMsg.V2G_Message.Body.CableCheckRes->DC_EVSEStatus.isused.EVSEIsolationStatus=1; + + } else if(service->idPath.id[2] == 76) + { + service->exiMsg.V2G_Message.Body.PreChargeRes->DC_EVSEStatus.EVSEIsolationStatus = service->val.enumeration; + service->exiMsg.V2G_Message.Body.PreChargeRes->DC_EVSEStatus.isused.EVSEIsolationStatus=1; + + } else if(service->idPath.id[2] == 34) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->DC_EVSEStatus.EVSEIsolationStatus = service->val.enumeration; + service->exiMsg.V2G_Message.Body.CurrentDemandRes->DC_EVSEStatus.isused.EVSEIsolationStatus=1; + + } else if(service->idPath.id[2] == 115) + { + service->exiMsg.V2G_Message.Body.WeldingDetectionRes->DC_EVSEStatus.EVSEIsolationStatus = service->val.enumeration; + service->exiMsg.V2G_Message.Body.WeldingDetectionRes->DC_EVSEStatus.isused.EVSEIsolationStatus=1; + + } else if(service->idPath.id[4] == 25) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->DC_EVSEStatus.EVSEIsolationStatus = service->val.enumeration; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->DC_EVSEStatus.isused.EVSEIsolationStatus=1; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 66: /*EVSEStatusCode*/ + + if(service->val.type == EXI_DATATYPE_ENUMERATION) + { + if( service->idPath.id[2] == 72) + { + service->exiMsg.V2G_Message.Body.PowerDeliveryRes->DC_EVSEStatus->EVSEStatusCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 4) + { + service->exiMsg.V2G_Message.Body.CableCheckRes->DC_EVSEStatus.EVSEStatusCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 76) + { + service->exiMsg.V2G_Message.Body.PreChargeRes->DC_EVSEStatus.EVSEStatusCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 34) + { + service->exiMsg.V2G_Message.Body.CurrentDemandRes->DC_EVSEStatus.EVSEStatusCode = service->val.enumeration; + + } else if(service->idPath.id[2] == 115) + { + service->exiMsg.V2G_Message.Body.WeldingDetectionRes->DC_EVSEStatus.EVSEStatusCode = service->val.enumeration; + + } else if(service->idPath.id[4] == 25) + { + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->DC_EVSEStatus.EVSEStatusCode = service->val.enumeration; + } + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 80: /*MeterID*/ + + if(service->val.type == EXI_DATATYPE_STRING) + { + memcpy(service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.MeterID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); + service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.MeterID.arraylen.data = service->val.string.len; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 139: /*SigMeterReading*/ + + if(service->val.type == EXI_DATATYPE_BINARY_BASE64) + { + memcpy(service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.SigMeterReading.data, service->val.binary.data,service->val.binary.len); + service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.SigMeterReading.arraylen.data = service->val.binary.len; + service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.isused.SigMeterReading=1; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 83: /*MeterStatus*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + _setInt16Value( &(service->val.integer),&(service->val.integer.val.int16)); + service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.MeterStatus = service->val.integer.val.int16; + service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.isused.MeterStatus=1; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + case 143: /*TMeter*/ + + if(service->val.type == EXI_DATATYPE_INTEGER) + { + service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.TMeter = service->val.integer.val.int64; + service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.isused.TMeter=1; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + } /* close switch(service->eqn.localPart) */ + break; + case 8: + switch(service->eqn.localPart) { + case 2: /*SessionID*/ + + if(service->val.type == EXI_DATATYPE_BINARY_HEX) + { + memcpy(service->exiMsg.V2G_Message.Header->SessionID.data, service->val.binary.data,service->val.binary.len); + service->exiMsg.V2G_Message.Header->SessionID.arraylen.data = service->val.binary.len; + + } + else + { + return -1; /* wrong data type */ + } + + + break; + } /* close switch(service->eqn.localPart) */ + break; + + } /* close switch(service->eqn.namespaceURI) */ + return 0; +} + +/** + * Deserialize an element of the EXI stream + * @return 0 = 0K; -1 = ERROR + */ +static int deserializeElement(struct EXIService* service) +{ + switch(service->eqn.namespaceURI) { + case 0: + switch(service->eqn.localPart) { + + } + break; + case 4: + switch(service->eqn.localPart) { + case 34:/* Reference */ + + service->exiMsg.V2G_Message.Header->Signature->SignedInfo.arraylen.Reference++; + + break; + case 14:/* KeyInfo */ + + service->exiMsg.V2G_Message.Header->Signature->isused.KeyInfo=1; + + break; + case 42:/* Signature */ + + service->exiMsg.V2G_Message.Header->isused.Signature=1; + + break; + + } + break; + case 5: + switch(service->eqn.localPart) { + case 97:/* ServiceList */ + + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->isused.ServiceList=1; + + break; + case 98:/* ServiceParameterList */ + + service->exiMsg.V2G_Message.Body.ServiceDetailRes->isused.ServiceParameterList=1; + + break; + case 47:/* EVSEMaxCurrent */ + + service->exiMsg.V2G_Message.Body.ChargingStatusRes->isused.EVSEMaxCurrent=1; + + break; + case 59:/* MeterInfo */ + + service->exiMsg.V2G_Message.Body.ChargingStatusRes->isused.MeterInfo=1; + + break; + case 50:/* EVSEMaximumVoltageLimit */ + + service->exiMsg.V2G_Message.Body.CurrentDemandRes->isused.EVSEMaximumVoltageLimit=1; + + break; + case 48:/* EVSEMaximumCurrentLimit */ + + service->exiMsg.V2G_Message.Body.CurrentDemandRes->isused.EVSEMaximumCurrentLimit=1; + + break; + case 49:/* EVSEMaximumPowerLimit */ + + service->exiMsg.V2G_Message.Body.CurrentDemandRes->isused.EVSEMaximumPowerLimit=1; + + break; + + } + break; + case 6: + switch(service->eqn.localPart) { + case 126:/* Service */ + + service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service++; + + break; + case 94:/* Parameter */ + + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.ParameterSet[service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet].arraylen.Parameter++; + + break; + case 95:/* ParameterSet */ + + service->exiMsg.V2G_Message.Body.ServiceDetailRes->ServiceParameterList.arraylen.ParameterSet++; + + break; + case 89:/* PMaxScheduleEntry */ + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].PMaxSchedule.arraylen.PMaxScheduleEntry++; + + break; + case 16:/* Cost */ + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].ConsumptionCost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].arraylen.ConsumptionCost].isused.Cost=1; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].ConsumptionCost[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].arraylen.ConsumptionCost].arraylen.Cost++; + + break; + case 14:/* ConsumptionCost */ + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].isused.ConsumptionCost=1; + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->SalesTariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry].arraylen.ConsumptionCost++; + + break; + case 119:/* SalesTariffEntry */ + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].SalesTariff->arraylen.SalesTariffEntry++; + + break; + case 117:/* SalesTariff */ + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->SAScheduleTuple[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple].isused.SalesTariff=1; + + break; + case 112:/* SAScheduleTuple */ + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->SAScheduleList->arraylen.SAScheduleTuple++; + + break; + case 59:/* EVSEMaximumPowerLimit */ + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->isused.EVSEMaximumPowerLimit=1; + + break; + case 53:/* EVSECurrentRegulationTolerance */ + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->isused.EVSECurrentRegulationTolerance=1; + + break; + case 54:/* EVSEEnergyToBeDelivered */ + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->DC_EVSEChargeParameter->isused.EVSEEnergyToBeDelivered=1; + + break; + case 110:/* SAScheduleList */ + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->isused.SAScheduleList=1; + + break; + case 2:/* AC_EVSEChargeParameter */ + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->isused.AC_EVSEChargeParameter=1; + + break; + case 23:/* DC_EVSEChargeParameter */ + + service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->isused.DC_EVSEChargeParameter=1; + + break; + case 4:/* AC_EVSEStatus */ + + if( service->idPath.id[3] != 2) + { + service->exiMsg.V2G_Message.Body.PowerDeliveryRes->isused.AC_EVSEStatus=1; + } + + break; + case 25:/* DC_EVSEStatus */ + + if( service->idPath.id[3] != 23) + { + service->exiMsg.V2G_Message.Body.PowerDeliveryRes->isused.DC_EVSEStatus=1; + } + + + break; + case 82:/* MeterReading */ + + service->exiMsg.V2G_Message.Body.ChargingStatusRes->MeterInfo.isused.MeterReading=1; + + break; + + } + break; + case 8: + switch(service->eqn.localPart) { + case 1:/* Notification */ + + service->exiMsg.V2G_Message.Header->isused.Notification=1; + + break; + + } + break; + + + } + return 0; +} + + + + + /** + * Deserialize the EXI stream + * @return 0 = 0K; -1 = ERROR + */ +static int deserializeMessage(struct EXIService* service) +{ + int noEndOfDocument = 1; /* true */ + int returnCode=0; + + + do { + exiDecodeNextEvent(&(service->inStream), &(service->stateDecode), &(service->event)); + if (returnCode < 0) { + printf("[ERROR] %d \n", returnCode); + return returnCode; + } + + switch (service->event) { + case EXI_EVENT_START_DOCUMENT: + + returnCode = exiDecodeStartDocument(&(service->inStream), &(service->stateDecode)); + + break; + case EXI_EVENT_END_DOCUMENT: + + returnCode = exiDecodeEndDocument(&(service->inStream), &(service->stateDecode)); + noEndOfDocument = 0; /* false */ + break; + case EXI_EVENT_START_ELEMENT: + returnCode = exiDecodeStartElement(&(service->inStream), &(service->stateDecode), &(service->eqn)); + service->idPath.id[service->idPath.pos++]=service->eqn.localPart; + + break; + case EXI_EVENT_END_ELEMENT: + + returnCode = exiDecodeEndElement(&(service->inStream), &(service->stateDecode), &(service->eqn)); + service->idPath.pos--; + + returnCode = deserializeElement(service); + break; + case EXI_EVENT_CHARACTERS: + /* decode */ + returnCode = exiDecodeCharacters(&(service->inStream), &(service->stateDecode), &(service->val)); + + /* assign character data to the v2g message structure */ + returnCode = deserializeElementAttributeCharacter(service); + break; + case EXI_EVENT_ATTRIBUTE: + /* decode */ + returnCode = exiDecodeAttribute(&(service->inStream), &(service->stateDecode), &(service->eqn), &(service->val)); + returnCode = deserializeElementAttributeCharacter(service); + break; + case EXI_EVENT_START_ELEMENT_GENERIC: + break; + case EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED: + break; + case EXI_EVENT_END_ELEMENT_UNDECLARED: + break; + case EXI_EVENT_CHARACTERS_GENERIC: + break; + case EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED: + break; + case EXI_EVENT_ATTRIBUTE_GENERIC: + break; + case EXI_EVENT_ATTRIBUTE_INVALID_VALUE: + break; + case EXI_EVENT_ATTRIBUTE_ANY_INVALID_VALUE: + break; + case EXI_EVENT_ATTRIBUTE_GENERIC_UNDECLARED: + break; + default: + /* ERROR */ + return -1; + } + + } while (noEndOfDocument); + + return 0; +} + + + + /* Initialize the v2g client */ +int init_v2gServiceClient(struct EXIService* service, bytes_t bytes, string_ucs_t string, uint8_t* inStream, size_t max_inStream_size, uint8_t* outStream, size_t max_outStream_size, uint32_t* outPayloadLength, uint16_t transportHeaderOffset) + +{ + /* init byte array */ + service->val.binary = bytes; + + /* init string array */ + service->val.string = string; + + /* init input / output stream */ + service->inStream.data=inStream; + service->inStream.size=max_inStream_size; + + service->outStream.data=outStream; + service->outStream.size=max_outStream_size; + service->outStream.pos=outPayloadLength; + + + /* init offset for transport protocol */ + service->transportHeaderOffset=transportHeaderOffset; + + return 0; + +} diff --git a/src/service/v2g_serviceClientStubs.h b/src/service/v2g_serviceClientStubs.h new file mode 100644 index 0000000..5ea479e --- /dev/null +++ b/src/service/v2g_serviceClientStubs.h @@ -0,0 +1,268 @@ + + + + +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXISeGen
+ * + ********************************************************************/ + + + + #ifdef __cplusplus +extern "C" { +#endif + +#ifndef SERVICECLIENTSTUBS_H +#define SERVICECLIENTSTUBS_H + + #include "v2g_service.h" + #include "v2g_serviceDataTypes.h" + #include "v2g_serviceClientStubs.h" + +/** + * \brief Prepares the remote sessionSetup method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct SessionSetupReqType* Request data for the server (has to be set up before) + * \param result struct SessionSetupResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_sessionSetup(struct EXIService* service, struct MessageHeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result); + + + + +/** + * \brief Prepares the remote serviceDiscovery method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct ServiceDiscoveryReqType* Request data for the server (has to be set up before) + * \param result struct ServiceDiscoveryResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_serviceDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result); + + + + +/** + * \brief Prepares the remote serviceDetail method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* 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 prepare_serviceDetail(struct EXIService* service, struct MessageHeaderType* header, struct ServiceDetailReqType* params, struct ServiceDetailResType* result); + + + + +/** + * \brief Prepares the remote servicePaymentSelection method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct ServicePaymentSelectionReqType* Request data for the server (has to be set up before) + * \param result struct ServicePaymentSelectionResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_servicePaymentSelection(struct EXIService* service, struct MessageHeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result); + + + + +/** + * \brief Prepares the remote paymentDetails method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct PaymentDetailsReqType* Request data for the server (has to be set up before) + * \param result struct PaymentDetailsResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_paymentDetails(struct EXIService* service, struct MessageHeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result); + + + + +/** + * \brief Prepares the remote contractAuthentication method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* 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 prepare_contractAuthentication(struct EXIService* service, struct MessageHeaderType* header, struct ContractAuthenticationReqType* params, struct ContractAuthenticationResType* result); + + + + +/** + * \brief Prepares the remote chargeParameterDiscovery method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct ChargeParameterDiscoveryReqType* Request data for the server (has to be set up before) + * \param result struct ChargeParameterDiscoveryResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_chargeParameterDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* params, struct ChargeParameterDiscoveryResType* result); + + + + +/** + * \brief Prepares the remote powerDelivery method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct PowerDeliveryReqType* Request data for the server (has to be set up before) + * \param result struct PowerDeliveryResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_powerDelivery(struct EXIService* service, struct MessageHeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result); + + + + +/** + * \brief Prepares the remote chargingStatus method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param result struct ChargingStatusResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_chargingStatus(struct EXIService* service, struct MessageHeaderType* header, struct ChargingStatusResType* result); + + + + +/** + * \brief Prepares the remote meteringReceipt method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct MeteringReceiptReqType* Request data for the server (has to be set up before) + * \param result struct MeteringReceiptResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_meteringReceipt(struct EXIService* service, struct MessageHeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result); + + + + +/** + * \brief Prepares the remote certificateUpdate method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* 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 prepare_certificateUpdate(struct EXIService* service, struct MessageHeaderType* header, struct CertificateUpdateReqType* params, struct CertificateUpdateResType* result); + + + + +/** + * \brief Prepares the remote certificateInstallation method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* 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 prepare_certificateInstallation(struct EXIService* service, struct MessageHeaderType* header, struct CertificateInstallationReqType* params, struct CertificateInstallationResType* result); + + + + +/** + * \brief Prepares the remote cableCheck method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct CableCheckReqType* Request data for the server (has to be set up before) + * \param result struct CableCheckResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_cableCheck(struct EXIService* service, struct MessageHeaderType* header, struct CableCheckReqType* params, struct CableCheckResType* result); + + + + +/** + * \brief Prepares the remote preCharge method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct PreChargeReqType* Request data for the server (has to be set up before) + * \param result struct PreChargeResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_preCharge(struct EXIService* service, struct MessageHeaderType* header, struct PreChargeReqType* params, struct PreChargeResType* result); + + + + +/** + * \brief Prepares the remote currentDemand method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct CurrentDemandReqType* Request data for the server (has to be set up before) + * \param result struct CurrentDemandResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_currentDemand(struct EXIService* service, struct MessageHeaderType* header, struct CurrentDemandReqType* params, struct CurrentDemandResType* result); + + + + +/** + * \brief Prepares the remote weldingDetection method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param params struct WeldingDetectionReqType* Request data for the server (has to be set up before) + * \param result struct WeldingDetectionResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_weldingDetection(struct EXIService* service, struct MessageHeaderType* header, struct WeldingDetectionReqType* params, struct WeldingDetectionResType* result); + + + + +/** + * \brief Prepares the remote sessionStop method + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param header struct MessageHeaderType* Header data structure + * \param result struct SessionStopResType* Contains the response data from the server + * \return 0 = 0K; -1 = ERROR */ + int prepare_sessionStop(struct EXIService* service, struct MessageHeaderType* header, struct SessionStopResType* result); + + + + + + + /** + * \brief Determines which response message was received + * \param service struct EXIService* Service data structure (has to be initialized before) + * \param respMsg enum responseMessages* contains the name of the response message + * \param result struct SessionStopResType* Contains the response data from the server + * \return 0 = 0K; 0 != ERROR */ +int determineResponseMesssage(struct EXIService* service, enum responseMessages* respMsg); + + + + + /* Initialize the v2g client */ +int init_v2gServiceClient(struct EXIService* service, bytes_t bytes, string_ucs_t string, uint8_t* inStream, size_t max_inStream_size, uint8_t* outStream, size_t max_outStream_size, uint32_t* outPayloadLength, uint16_t transportHeaderOffset); + + +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/service/v2g_serviceDataSerialization.c b/src/service/v2g_serviceDataSerialization.c new file mode 100644 index 0000000..6fcce74 --- /dev/null +++ b/src/service/v2g_serviceDataSerialization.c @@ -0,0 +1,7882 @@ + +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXISeGen
+ * + ********************************************************************/ + + +#include "v2g_service.h" +#include "v2g_serviceDataTypes.h" + +#include "EXITypes.h" +#include "EXIEncoder.h" + +#includeCode generated by EXISeGen
+ * + ********************************************************************/ + + +#include "EXITypes.h" +#include "v2g_serviceDataTypes.h" + + +static void init_sessionIDType(struct sessionIDType* type) +{ + type->arraylen.data=0; + +} + +static void init_faultMsgType(struct faultMsgType* type) +{ + type->arraylen.data=0; + +} + +static void init_NotificationType(struct NotificationType* type) +{ + init_faultMsgType(&(type->FaultMsg)); + type->isused.FaultMsg=0; + +} + +static void init_service_string(struct service_string* type) +{ + type->arraylen.data=0; + +} + +static void init_CanonicalizationMethodType(struct CanonicalizationMethodType* type) +{ + init_service_string(&(type->attr_Algorithm)); + +} + +static void init_SignatureMethodType(struct SignatureMethodType* type) +{ + init_service_string(&(type->attr_Algorithm)); + +} + +static void init_DigestMethodType(struct DigestMethodType* type) +{ + init_service_string(&(type->attr_Algorithm)); + +} + +static void init_DigestValueType(struct DigestValueType* type) +{ + type->arraylen.data=0; + +} + +static void init_ReferenceType(struct ReferenceType* type) +{ + init_service_string(&(type->attr_Id)); + type->isused.attr_Id=0; + init_service_string(&(type->attr_URI)); + type->isused.attr_URI=0; + init_service_string(&(type->attr_Type)); + type->isused.attr_Type=0; + init_DigestMethodType(&(type->DigestMethod)); + init_DigestValueType(&(type->DigestValue)); + +} + +static void init_SignedInfoType(struct SignedInfoType* type) +{ + int i_loop; + + init_service_string(&(type->attr_Id)); + type->isused.attr_Id=0; + init_CanonicalizationMethodType(&(type->CanonicalizationMethod)); + init_SignatureMethodType(&(type->SignatureMethod)); + for(i_loop=0; i_loop<1;i_loop++) + { + init_ReferenceType(&(type->Reference[i_loop])); + } + + type->arraylen.Reference=0; + +} + +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_service_string(&(type->attr_Id)); + type->isused.attr_Id=0; + init_X509DataType(&(type->X509Data)); + +} + +static void init_SignatureType(struct SignatureType* type) +{ + init_service_string(&(type->attr_Id)); + type->isused.attr_Id=0; + init_SignedInfoType(&(type->SignedInfo)); + init_SignatureValueType(&(type->SignatureValue)); + init_KeyInfoType(&(type->KeyInfo)); + type->isused.KeyInfo=0; + +} + +static void init_MessageHeaderType(struct MessageHeaderType* type) +{ + init_sessionIDType(&(type->SessionID)); + init_NotificationType(&(type->Notification)); + type->isused.Notification=0; + type->isused.Signature=0; + +} + +static void init_evccIDType(struct evccIDType* type) +{ + type->arraylen.data=0; + +} + +static void init_SessionSetupReqType(struct SessionSetupReqType* type) +{ + init_evccIDType(&(type->EVCCID)); + +} + +static void init_evseIDType(struct evseIDType* type) +{ + type->arraylen.data=0; + +} + +static void init_SessionSetupResType(struct SessionSetupResType* type) +{ + init_evseIDType(&(type->EVSEID)); + type->isused.DateTimeNow=0; + +} + +static void init_serviceScopeType(struct serviceScopeType* type) +{ + type->arraylen.data=0; + +} + +static void init_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type) +{ + init_serviceScopeType(&(type->ServiceScope)); + type->isused.ServiceScope=0; + type->isused.ServiceCategory=0; + +} + +static void init_PaymentOptionsType(struct PaymentOptionsType* type) +{ + + + type->arraylen.PaymentOption=0; + +} + +static void init_serviceNameType(struct serviceNameType* type) +{ + type->arraylen.data=0; + +} + +static void init_ServiceTagType(struct ServiceTagType* type) +{ + init_serviceNameType(&(type->ServiceName)); + type->isused.ServiceName=0; + type->isused.ServiceCategory=0; + init_serviceScopeType(&(type->ServiceScope)); + type->isused.ServiceScope=0; + +} + +static void init_ServiceChargeType(struct ServiceChargeType* type) +{ + init_ServiceTagType(&(type->ServiceTag)); + +} + +static void init_ServiceType(struct ServiceType* type) +{ + init_ServiceTagType(&(type->ServiceTag)); + +} + +static void init_ServiceTagListType(struct ServiceTagListType* type) +{ + int i_loop; + + for(i_loop=0; i_loop<2;i_loop++) + { + init_ServiceType(&(type->Service[i_loop])); + } + + type->arraylen.Service=0; + +} + +static void init_ServiceDiscoveryResType(struct ServiceDiscoveryResType* type) +{ + init_PaymentOptionsType(&(type->PaymentOptions)); + init_ServiceChargeType(&(type->ChargeService)); + init_ServiceTagListType(&(type->ServiceList)); + type->isused.ServiceList=0; + +} + +static void init_PhysicalValueType(struct PhysicalValueType* type) +{ + type->isused.Unit=0; + +} + +static void init_ParameterType(struct ParameterType* type) +{ + init_service_string(&(type->attr_Name)); + init_service_string(&(type->attr_ValueType)); + init_PhysicalValueType(&(type->physicalValue)); + init_service_string(&(type->stringValue)); + +} + +static void init_ParameterSetType(struct ParameterSetType* type) +{ + int i_loop; + + for(i_loop=0; i_loop<2;i_loop++) + { + init_ParameterType(&(type->Parameter[i_loop])); + } + + type->arraylen.Parameter=0; + +} + +static void init_ServiceParameterListType(struct ServiceParameterListType* type) +{ + int i_loop; + + for(i_loop=0; i_loop<2;i_loop++) + { + init_ParameterSetType(&(type->ParameterSet[i_loop])); + } + + type->arraylen.ParameterSet=0; + +} + +static void init_ServiceDetailResType(struct ServiceDetailResType* type) +{ + init_ServiceParameterListType(&(type->ServiceParameterList)); + type->isused.ServiceParameterList=0; + +} + +static void init_SelectedServiceType(struct SelectedServiceType* type) +{ + type->isused.ParameterSetID=0; + +} + +static void init_SelectedServiceListType(struct SelectedServiceListType* type) +{ + int i_loop; + + for(i_loop=0; i_loop<2;i_loop++) + { + init_SelectedServiceType(&(type->SelectedService[i_loop])); + } + + type->arraylen.SelectedService=0; + +} + +static void init_ServicePaymentSelectionReqType(struct ServicePaymentSelectionReqType* type) +{ + init_SelectedServiceListType(&(type->SelectedServiceList)); + +} + +static void init_contractIDType(struct contractIDType* type) +{ + type->arraylen.data=0; + +} + +static void init_certificateType(struct certificateType* type) +{ + type->arraylen.data=0; + +} + +static void init_SubCertificatesType(struct SubCertificatesType* type) +{ + int i_loop; + + for(i_loop=0; i_loop<2;i_loop++) + { + init_certificateType(&(type->Certificate[i_loop])); + } + + type->arraylen.Certificate=0; + +} + +static void init_CertificateChainType(struct CertificateChainType* type) +{ + init_certificateType(&(type->Certificate)); + init_SubCertificatesType(&(type->SubCertificates)); + type->isused.SubCertificates=0; + +} + +static void init_PaymentDetailsReqType(struct PaymentDetailsReqType* type) +{ + init_contractIDType(&(type->ContractID)); + init_CertificateChainType(&(type->ContractSignatureCertChain)); + +} + +static void init_genChallengeType(struct genChallengeType* type) +{ + type->arraylen.data=0; + +} + +static void init_PaymentDetailsResType(struct PaymentDetailsResType* type) +{ + init_genChallengeType(&(type->GenChallenge)); + +} + +static void init_ContractAuthenticationReqType(struct ContractAuthenticationReqType* type) +{ + init_service_string(&(type->attr_Id)); + init_genChallengeType(&(type->GenChallenge)); + +} + +static void init_AC_EVChargeParameterType(struct AC_EVChargeParameterType* type) +{ + init_PhysicalValueType(&(type->EAmount)); + init_PhysicalValueType(&(type->EVMaxVoltage)); + init_PhysicalValueType(&(type->EVMaxCurrent)); + init_PhysicalValueType(&(type->EVMinCurrent)); + +} + +static void init_DC_EVStatusType(struct DC_EVStatusType* type) +{ + type->isused.EVCabinConditioning=0; + type->isused.EVRESSConditioning=0; + +} + +static void init_DC_EVChargeParameterType(struct DC_EVChargeParameterType* type) +{ + init_DC_EVStatusType(&(type->DC_EVStatus)); + init_PhysicalValueType(&(type->EVMaximumCurrentLimit)); + init_PhysicalValueType(&(type->EVMaximumPowerLimit)); + type->isused.EVMaximumPowerLimit=0; + init_PhysicalValueType(&(type->EVMaximumVoltageLimit)); + init_PhysicalValueType(&(type->EVEnergyCapacity)); + type->isused.EVEnergyCapacity=0; + init_PhysicalValueType(&(type->EVEnergyRequest)); + type->isused.EVEnergyRequest=0; + type->isused.FullSOC=0; + type->isused.BulkSOC=0; + +} + +static void init_ChargeParameterDiscoveryReqType(struct ChargeParameterDiscoveryReqType* type) +{ + type->isused.AC_EVChargeParameter=0; + type->isused.DC_EVChargeParameter=0; + +} + +static void init_RelativeTimeIntervalType(struct RelativeTimeIntervalType* type) +{ + type->isused.duration=0; + +} + +static void init_PMaxScheduleEntryType(struct PMaxScheduleEntryType* type) +{ + init_RelativeTimeIntervalType(&(type->RelativeTimeInterval)); + +} + +static void init_PMaxScheduleType(struct PMaxScheduleType* type) +{ + int i_loop; + + for(i_loop=0; i_loop<12;i_loop++) + { + init_PMaxScheduleEntryType(&(type->PMaxScheduleEntry[i_loop])); + } + + type->arraylen.PMaxScheduleEntry=0; + +} + +static void init_tariffDescriptionType(struct tariffDescriptionType* type) +{ + type->arraylen.data=0; + +} + +static void init_CostType(struct CostType* type) +{ + type->isused.amountMultiplier=0; + +} + +static void init_ConsumptionCostType(struct ConsumptionCostType* type) +{ + int i_loop; + + for(i_loop=0; i_loop<2;i_loop++) + { + init_CostType(&(type->Cost[i_loop])); + } + + type->arraylen.Cost=0; + type->isused.Cost=0; + +} + +static void init_SalesTariffEntryType(struct SalesTariffEntryType* type) +{ + int i_loop; + + init_RelativeTimeIntervalType(&(type->RelativeTimeInterval)); + for(i_loop=0; i_loop<2;i_loop++) + { + init_ConsumptionCostType(&(type->ConsumptionCost[i_loop])); + } + + type->arraylen.ConsumptionCost=0; + type->isused.ConsumptionCost=0; + +} + +static void init_SalesTariffType(struct SalesTariffType* type) +{ + int i_loop; + + init_service_string(&(type->attr_Id)); + init_tariffDescriptionType(&(type->SalesTariffDescription)); + type->isused.SalesTariffDescription=0; + for(i_loop=0; i_loop<2;i_loop++) + { + init_SalesTariffEntryType(&(type->SalesTariffEntry[i_loop])); + } + + type->arraylen.SalesTariffEntry=0; + +} + +static void init_SAScheduleTupleType(struct SAScheduleTupleType* type) +{ + init_PMaxScheduleType(&(type->PMaxSchedule)); + type->isused.SalesTariff=0; + +} + +static void init_SAScheduleListType(struct SAScheduleListType* type) +{ + int i_loop; + + for(i_loop=0; i_loop<3;i_loop++) + { + init_SAScheduleTupleType(&(type->SAScheduleTuple[i_loop])); + } + + type->arraylen.SAScheduleTuple=0; + +} + +static void init_AC_EVSEChargeParameterType(struct AC_EVSEChargeParameterType* type) +{ + init_PhysicalValueType(&(type->EVSEMaxVoltage)); + init_PhysicalValueType(&(type->EVSEMaxCurrent)); + init_PhysicalValueType(&(type->EVSEMinCurrent)); + +} + +static void init_DC_EVSEStatusType(struct DC_EVSEStatusType* type) +{ + type->isused.EVSEIsolationStatus=0; + +} + +static void init_DC_EVSEChargeParameterType(struct DC_EVSEChargeParameterType* type) +{ + init_DC_EVSEStatusType(&(type->DC_EVSEStatus)); + init_PhysicalValueType(&(type->EVSEMaximumCurrentLimit)); + init_PhysicalValueType(&(type->EVSEMaximumPowerLimit)); + type->isused.EVSEMaximumPowerLimit=0; + init_PhysicalValueType(&(type->EVSEMaximumVoltageLimit)); + init_PhysicalValueType(&(type->EVSEMinimumCurrentLimit)); + init_PhysicalValueType(&(type->EVSEMinimumVoltageLimit)); + init_PhysicalValueType(&(type->EVSECurrentRegulationTolerance)); + type->isused.EVSECurrentRegulationTolerance=0; + init_PhysicalValueType(&(type->EVSEPeakCurrentRipple)); + init_PhysicalValueType(&(type->EVSEEnergyToBeDelivered)); + type->isused.EVSEEnergyToBeDelivered=0; + +} + +static void init_ChargeParameterDiscoveryResType(struct ChargeParameterDiscoveryResType* type) +{ + type->isused.SAScheduleList=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_DC_EVPowerDeliveryParameterType(struct DC_EVPowerDeliveryParameterType* type) +{ + init_DC_EVStatusType(&(type->DC_EVStatus)); + type->isused.BulkChargingComplete=0; + +} + +static void init_PowerDeliveryReqType(struct PowerDeliveryReqType* type) +{ + init_ChargingProfileType(&(type->ChargingProfile)); + type->isused.ChargingProfile=0; + type->isused.DC_EVPowerDeliveryParameter=0; + +} + +static void init_PowerDeliveryResType(struct PowerDeliveryResType* type) +{ + type->isused.AC_EVSEStatus=0; + type->isused.DC_EVSEStatus=0; + +} + +static void init_meterIDType(struct meterIDType* type) +{ + type->arraylen.data=0; + +} + +static void init_sigMeterReadingType(struct sigMeterReadingType* type) +{ + type->arraylen.data=0; + +} + +static void init_MeterInfoType(struct MeterInfoType* type) +{ + init_meterIDType(&(type->MeterID)); + init_PhysicalValueType(&(type->MeterReading)); + type->isused.MeterReading=0; + init_sigMeterReadingType(&(type->SigMeterReading)); + type->isused.SigMeterReading=0; + type->isused.MeterStatus=0; + type->isused.TMeter=0; + +} + +static void init_ChargingStatusResType(struct ChargingStatusResType* type) +{ + init_evseIDType(&(type->EVSEID)); + type->isused.SAScheduleTupleID=0; + init_PhysicalValueType(&(type->EVSEMaxCurrent)); + type->isused.EVSEMaxCurrent=0; + init_MeterInfoType(&(type->MeterInfo)); + type->isused.MeterInfo=0; + +} + +static void init_MeteringReceiptReqType(struct MeteringReceiptReqType* type) +{ + init_service_string(&(type->attr_Id)); + type->isused.attr_Id=0; + init_sessionIDType(&(type->SessionID)); + type->isused.SAScheduleTupleID=0; + init_MeterInfoType(&(type->MeterInfo)); + +} + +static void init_MeteringReceiptResType(struct MeteringReceiptResType* type) +{ + +} + +static void init_rootCertificateIDType(struct rootCertificateIDType* type) +{ + type->arraylen.data=0; + +} + +static void init_ListOfRootCertificateIDsType(struct ListOfRootCertificateIDsType* type) +{ + int i_loop; + + for(i_loop=0; i_loop<2;i_loop++) + { + init_rootCertificateIDType(&(type->RootCertificateID[i_loop])); + } + + type->arraylen.RootCertificateID=0; + +} + +static void init_dHParamsType(struct dHParamsType* type) +{ + type->arraylen.data=0; + +} + +static void init_CertificateUpdateReqType(struct CertificateUpdateReqType* type) +{ + init_service_string(&(type->attr_Id)); + type->isused.attr_Id=0; + init_CertificateChainType(&(type->ContractSignatureCertChain)); + init_contractIDType(&(type->ContractID)); + init_ListOfRootCertificateIDsType(&(type->ListOfRootCertificateIDs)); + init_dHParamsType(&(type->DHParams)); + +} + +static void init_privateKeyType(struct privateKeyType* type) +{ + type->arraylen.data=0; + +} + +static void init_CertificateUpdateResType(struct CertificateUpdateResType* type) +{ + init_service_string(&(type->attr_Id)); + init_CertificateChainType(&(type->ContractSignatureCertChain)); + init_privateKeyType(&(type->ContractSignatureEncryptedPrivateKey)); + init_dHParamsType(&(type->DHParams)); + init_contractIDType(&(type->ContractID)); + +} + +static void init_CertificateInstallationReqType(struct CertificateInstallationReqType* type) +{ + init_service_string(&(type->attr_Id)); + type->isused.attr_Id=0; + init_certificateType(&(type->OEMProvisioningCert)); + init_ListOfRootCertificateIDsType(&(type->ListOfRootCertificateIDs)); + init_dHParamsType(&(type->DHParams)); + +} + +static void init_CertificateInstallationResType(struct CertificateInstallationResType* type) +{ + init_service_string(&(type->attr_Id)); + init_CertificateChainType(&(type->ContractSignatureCertChain)); + init_privateKeyType(&(type->ContractSignatureEncryptedPrivateKey)); + init_dHParamsType(&(type->DHParams)); + init_contractIDType(&(type->ContractID)); + +} + +static void init_CableCheckReqType(struct CableCheckReqType* type) +{ + init_DC_EVStatusType(&(type->DC_EVStatus)); + +} + +static void init_CableCheckResType(struct CableCheckResType* type) +{ + init_DC_EVSEStatusType(&(type->DC_EVSEStatus)); + +} + +static void init_PreChargeReqType(struct PreChargeReqType* type) +{ + init_DC_EVStatusType(&(type->DC_EVStatus)); + init_PhysicalValueType(&(type->EVTargetVoltage)); + init_PhysicalValueType(&(type->EVTargetCurrent)); + +} + +static void init_PreChargeResType(struct PreChargeResType* type) +{ + init_DC_EVSEStatusType(&(type->DC_EVSEStatus)); + init_PhysicalValueType(&(type->EVSEPresentVoltage)); + +} + +static void init_CurrentDemandReqType(struct CurrentDemandReqType* type) +{ + init_DC_EVStatusType(&(type->DC_EVStatus)); + init_PhysicalValueType(&(type->EVTargetCurrent)); + init_PhysicalValueType(&(type->EVMaximumVoltageLimit)); + type->isused.EVMaximumVoltageLimit=0; + init_PhysicalValueType(&(type->EVMaximumCurrentLimit)); + type->isused.EVMaximumCurrentLimit=0; + init_PhysicalValueType(&(type->EVMaximumPowerLimit)); + type->isused.EVMaximumPowerLimit=0; + type->isused.BulkChargingComplete=0; + init_PhysicalValueType(&(type->RemainingTimeToFullSoC)); + type->isused.RemainingTimeToFullSoC=0; + init_PhysicalValueType(&(type->RemainingTimeToBulkSoC)); + type->isused.RemainingTimeToBulkSoC=0; + init_PhysicalValueType(&(type->EVTargetVoltage)); + +} + +static void init_CurrentDemandResType(struct CurrentDemandResType* type) +{ + init_DC_EVSEStatusType(&(type->DC_EVSEStatus)); + init_PhysicalValueType(&(type->EVSEPresentVoltage)); + init_PhysicalValueType(&(type->EVSEPresentCurrent)); + init_PhysicalValueType(&(type->EVSEMaximumVoltageLimit)); + type->isused.EVSEMaximumVoltageLimit=0; + init_PhysicalValueType(&(type->EVSEMaximumCurrentLimit)); + type->isused.EVSEMaximumCurrentLimit=0; + init_PhysicalValueType(&(type->EVSEMaximumPowerLimit)); + type->isused.EVSEMaximumPowerLimit=0; + +} + +static void init_WeldingDetectionReqType(struct WeldingDetectionReqType* type) +{ + init_DC_EVStatusType(&(type->DC_EVStatus)); + +} + +static void init_WeldingDetectionResType(struct WeldingDetectionResType* type) +{ + init_DC_EVSEStatusType(&(type->DC_EVSEStatus)); + init_PhysicalValueType(&(type->EVSEPresentVoltage)); + +} + +static void init_BodyType(struct BodyType* type) +{ + type->isused.SessionSetupReq=0; + type->isused.SessionSetupRes=0; + type->isused.ServiceDiscoveryReq=0; + type->isused.ServiceDiscoveryRes=0; + type->isused.ServiceDetailReq=0; + type->isused.ServiceDetailRes=0; + type->isused.ServicePaymentSelectionReq=0; + type->isused.ServicePaymentSelectionRes=0; + type->isused.PaymentDetailsReq=0; + type->isused.PaymentDetailsRes=0; + type->isused.ContractAuthenticationReq=0; + type->isused.ContractAuthenticationRes=0; + type->isused.ChargeParameterDiscoveryReq=0; + type->isused.ChargeParameterDiscoveryRes=0; + type->isused.PowerDeliveryReq=0; + type->isused.PowerDeliveryRes=0; + type->isused.ChargingStatusReq=0; + type->isused.ChargingStatusRes=0; + type->isused.MeteringReceiptReq=0; + type->isused.MeteringReceiptRes=0; + type->isused.SessionStopReq=0; + type->isused.SessionStopRes=0; + type->isused.CertificateUpdateReq=0; + type->isused.CertificateUpdateRes=0; + type->isused.CertificateInstallationReq=0; + type->isused.CertificateInstallationRes=0; + type->isused.CableCheckReq=0; + type->isused.CableCheckRes=0; + type->isused.PreChargeReq=0; + type->isused.PreChargeRes=0; + type->isused.CurrentDemandReq=0; + type->isused.CurrentDemandRes=0; + type->isused.WeldingDetectionReq=0; + type->isused.WeldingDetectionRes=0; + +} + +static void init_AnonType_V2G_Message(struct AnonType_V2G_Message* type) +{ + init_BodyType(&(type->Body)); + +} + +static void init_EXIDocumentType(struct EXIDocumentType* type) +{ + init_AnonType_V2G_Message(&(type->V2G_Message)); + +} diff --git a/src/service/v2g_serviceDataTypes.h b/src/service/v2g_serviceDataTypes.h new file mode 100644 index 0000000..616978a --- /dev/null +++ b/src/service/v2g_serviceDataTypes.h @@ -0,0 +1,1681 @@ + +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXISeGen
+ * + ********************************************************************/ + + + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef SERVICEDATATYPES_H +#define SERVICEDATATYPES_H + +#include "EXITypes.h" + + + + +enum faultCodeType +{ + ParsingError_faultCodeType, + NoTLSRootCertificatAvailable_faultCodeType, + UnknownError_faultCodeType + +}; + +enum responseCodeType +{ + OK_responseCodeType, + OK_NewSessionEstablished_responseCodeType, + OK_OldSessionJoined_responseCodeType, + OK_CertificateExpiresSoon_responseCodeType, + FAILED_responseCodeType, + FAILED_SequenceError_responseCodeType, + FAILED_ServiceIDInvalid_responseCodeType, + FAILED_UnknownSession_responseCodeType, + FAILED_ServiceSelectionInvalid_responseCodeType, + FAILED_PaymentSelectionInvalid_responseCodeType, + FAILED_CertificateExpired_responseCodeType, + FAILED_SignatureError_responseCodeType, + FAILED_NoCertificateAvailable_responseCodeType, + FAILED_CertChainError_responseCodeType, + FAILED_ChallengeInvalid_responseCodeType, + FAILED_ContractCanceled_responseCodeType, + FAILED_WrongChargeParameter_responseCodeType, + FAILED_PowerDeliveryNotApplied_responseCodeType, + FAILED_TariffSelectionInvalid_responseCodeType, + FAILED_ChargingProfileInvalid_responseCodeType, + FAILED_EVSEPresentVoltageToLow_responseCodeType, + FAILED_MeteringSignatureNotValid_responseCodeType, + FAILED_WrongEnergyTransferType_responseCodeType + +}; + +enum serviceCategoryType +{ + EVCharging_serviceCategoryType, + Internet_serviceCategoryType, + ContractCertificate_serviceCategoryType, + OtherCustom_serviceCategoryType + +}; + +enum paymentOptionType +{ + Contract_paymentOptionType, + ExternalPayment_paymentOptionType + +}; + +enum EVSESupportedEnergyTransferType +{ + AC_single_phase_core_EVSESupportedEnergyTransferType, + AC_three_phase_core_EVSESupportedEnergyTransferType, + DC_core_EVSESupportedEnergyTransferType, + DC_extended_EVSESupportedEnergyTransferType, + DC_combo_core_EVSESupportedEnergyTransferType, + DC_dual_EVSESupportedEnergyTransferType, + AC_core1p_DC_extended_EVSESupportedEnergyTransferType, + AC_single_DC_core_EVSESupportedEnergyTransferType, + AC_single_phase_three_phase_core_DC_extended_EVSESupportedEnergyTransferType, + AC_core3p_DC_extended_EVSESupportedEnergyTransferType + +}; + +enum unitSymbolType +{ + h_unitSymbolType, + m_unitSymbolType, + s_unitSymbolType, + A_unitSymbolType, + Ah_unitSymbolType, + V_unitSymbolType, + VA_unitSymbolType, + W_unitSymbolType, + W_s_unitSymbolType, + Wh_unitSymbolType + +}; + +enum EVRequestedEnergyTransferType +{ + AC_single_phase_core_EVRequestedEnergyTransferType, + AC_three_phase_core_EVRequestedEnergyTransferType, + DC_core_EVRequestedEnergyTransferType, + DC_extended_EVRequestedEnergyTransferType, + DC_combo_core_EVRequestedEnergyTransferType, + DC_unique_EVRequestedEnergyTransferType + +}; + +enum DC_EVErrorCodeType +{ + NO_ERROR_DC_EVErrorCodeType, + FAILED_RESSTemperatureInhibit_DC_EVErrorCodeType, + FAILED_EVShiftPosition_DC_EVErrorCodeType, + FAILED_ChargerConnectorLockFault_DC_EVErrorCodeType, + FAILED_EVRESSMalfunction_DC_EVErrorCodeType, + FAILED_ChargingCurrentdifferential_DC_EVErrorCodeType, + FAILED_ChargingVoltageOutOfRange_DC_EVErrorCodeType, + Reserved_A_DC_EVErrorCodeType, + Reserved_B_DC_EVErrorCodeType, + Reserved_C_DC_EVErrorCodeType, + FAILED_ChargingSystemIncompatibility_DC_EVErrorCodeType, + NoData_DC_EVErrorCodeType + +}; + +enum costKindType +{ + relativePricePercentage_costKindType, + RenewableGenerationPercentage_costKindType, + CarbonDioxideEmission_costKindType + +}; + +enum isolationLevelType +{ + Invalid_isolationLevelType, + Safe_isolationLevelType, + Warning_isolationLevelType, + Fault_isolationLevelType + +}; + +enum DC_EVSEStatusCodeType +{ + EVSE_NotReady_DC_EVSEStatusCodeType, + EVSE_Ready_DC_EVSEStatusCodeType, + EVSE_Shutdown_DC_EVSEStatusCodeType, + EVSE_UtilityInterruptEvent_DC_EVSEStatusCodeType, + EVSE_Precharge_DC_EVSEStatusCodeType, + EVSE_IsolationMonitoringActive_DC_EVSEStatusCodeType, + EVSE_EmergencyShutdown_DC_EVSEStatusCodeType, + EVSE_Malfunction_DC_EVSEStatusCodeType, + Reserved_8_DC_EVSEStatusCodeType, + Reserved_9_DC_EVSEStatusCodeType, + Reserved_A_DC_EVSEStatusCodeType, + Reserved_B_DC_EVSEStatusCodeType, + Reserved_C_DC_EVSEStatusCodeType + +}; + + + + +struct arraylen_sessionIDType +{ + size_t data; + + +}; + +struct sessionIDType +{ + uint8_t data[8]; + struct arraylen_sessionIDType arraylen; + +}; + +struct arraylen_faultMsgType +{ + size_t data; + + +}; + +struct faultMsgType +{ + uint32_t data[64]; + struct arraylen_faultMsgType arraylen; + +}; + +struct selection_NotificationType +{ + unsigned int FaultMsg:1; + + +}; + +struct NotificationType +{ + enum faultCodeType FaultCode; + struct faultMsgType FaultMsg; + struct selection_NotificationType isused; + +}; + +struct selection_MessageHeaderType +{ + unsigned int Notification:1; + unsigned int Signature:1; + + +}; + +struct arraylen_service_string +{ + size_t data; + + +}; + +struct service_string +{ + uint32_t data[256]; + struct arraylen_service_string arraylen; + +}; + +struct selection_SignatureType +{ + unsigned int attr_Id:1; + unsigned int KeyInfo:1; + + +}; + +struct selection_SignedInfoType +{ + unsigned int attr_Id:1; + + +}; + +struct CanonicalizationMethodType +{ + struct service_string attr_Algorithm; + + +}; + +struct SignatureMethodType +{ + struct service_string attr_Algorithm; + + +}; + +struct selection_ReferenceType +{ + unsigned int attr_Id:1; + unsigned int attr_URI:1; + unsigned int attr_Type:1; + + +}; + +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 service_string attr_Id; + struct service_string attr_URI; + struct service_string attr_Type; + struct DigestMethodType DigestMethod; + struct DigestValueType DigestValue; + struct selection_ReferenceType isused; + +}; + +struct arraylen_SignedInfoType +{ + size_t Reference; + + +}; + +struct SignedInfoType +{ + struct service_string attr_Id; + struct CanonicalizationMethodType CanonicalizationMethod; + struct SignatureMethodType SignatureMethod; + struct ReferenceType Reference[1]; + struct selection_SignedInfoType isused; struct arraylen_SignedInfoType arraylen; + +}; + +struct arraylen_SignatureValueType +{ + size_t data; + + +}; + +struct SignatureValueType +{ + + + uint8_t data[128]; + struct arraylen_SignatureValueType arraylen; + +}; + +struct selection_KeyInfoType +{ + unsigned int attr_Id:1; + + +}; + +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 service_string attr_Id; + struct X509DataType X509Data; + struct selection_KeyInfoType isused; + +}; + +struct SignatureType +{ + struct service_string attr_Id; + struct SignedInfoType SignedInfo; + struct SignatureValueType SignatureValue; + struct KeyInfoType KeyInfo; + struct selection_SignatureType isused; + +}; + +struct MessageHeaderType +{ + struct sessionIDType SessionID; + struct NotificationType Notification; + struct SignatureType* Signature; + struct selection_MessageHeaderType isused; + +}; + +struct arraylen_evccIDType +{ + size_t data; + + +}; + +struct evccIDType +{ + uint8_t data[8]; + struct arraylen_evccIDType arraylen; + +}; + +struct SessionSetupReqType +{ + struct evccIDType EVCCID; + + +}; + +struct selection_BodyType +{ + unsigned int SessionSetupReq:1; + unsigned int SessionSetupRes:1; + unsigned int ServiceDiscoveryReq:1; + unsigned int ServiceDiscoveryRes:1; + unsigned int ServiceDetailReq:1; + unsigned int ServiceDetailRes:1; + unsigned int ServicePaymentSelectionReq:1; + unsigned int ServicePaymentSelectionRes:1; + unsigned int PaymentDetailsReq:1; + unsigned int PaymentDetailsRes:1; + unsigned int ContractAuthenticationReq:1; + unsigned int ContractAuthenticationRes:1; + unsigned int ChargeParameterDiscoveryReq:1; + unsigned int ChargeParameterDiscoveryRes:1; + unsigned int PowerDeliveryReq:1; + unsigned int PowerDeliveryRes:1; + unsigned int ChargingStatusReq:1; + unsigned int ChargingStatusRes:1; + unsigned int MeteringReceiptReq:1; + unsigned int MeteringReceiptRes:1; + unsigned int SessionStopReq:1; + unsigned int SessionStopRes:1; + unsigned int CertificateUpdateReq:1; + unsigned int CertificateUpdateRes:1; + unsigned int CertificateInstallationReq:1; + unsigned int CertificateInstallationRes:1; + unsigned int CableCheckReq:1; + unsigned int CableCheckRes:1; + unsigned int PreChargeReq:1; + unsigned int PreChargeRes:1; + unsigned int CurrentDemandReq:1; + unsigned int CurrentDemandRes:1; + unsigned int WeldingDetectionReq:1; + unsigned int WeldingDetectionRes:1; + + +}; + +struct arraylen_evseIDType +{ + size_t data; + + +}; + +struct evseIDType +{ + uint8_t data[32]; + struct arraylen_evseIDType arraylen; + +}; + +struct selection_SessionSetupResType +{ + unsigned int DateTimeNow:1; + + +}; + +struct SessionSetupResType +{ + enum responseCodeType ResponseCode; + struct evseIDType EVSEID; + int64_t DateTimeNow; + struct selection_SessionSetupResType isused; + +}; + +struct arraylen_serviceScopeType +{ + size_t data; + + +}; + +struct serviceScopeType +{ + uint32_t data[32]; + struct arraylen_serviceScopeType arraylen; + +}; + +struct selection_ServiceDiscoveryReqType +{ + unsigned int ServiceScope:1; + unsigned int ServiceCategory:1; + + +}; + +struct ServiceDiscoveryReqType +{ + struct serviceScopeType ServiceScope; + enum serviceCategoryType ServiceCategory; + struct selection_ServiceDiscoveryReqType isused; + +}; + +struct arraylen_PaymentOptionsType +{ + size_t PaymentOption; + + +}; + +struct PaymentOptionsType +{ + enum paymentOptionType PaymentOption[2]; + struct arraylen_PaymentOptionsType arraylen; + +}; + +struct arraylen_serviceNameType +{ + size_t data; + + +}; + +struct serviceNameType +{ + uint32_t data[32]; + struct arraylen_serviceNameType arraylen; + +}; + +struct selection_ServiceTagType +{ + unsigned int ServiceName:1; + unsigned int ServiceCategory:1; + unsigned int ServiceScope:1; + + +}; + +struct ServiceTagType +{ + uint16_t ServiceID; + struct serviceNameType ServiceName; + enum serviceCategoryType ServiceCategory; + struct serviceScopeType ServiceScope; + struct selection_ServiceTagType isused; + +}; + +struct ServiceChargeType +{ + struct ServiceTagType ServiceTag; + int FreeService; + enum EVSESupportedEnergyTransferType EnergyTransferType; + + +}; + +struct ServiceType +{ + struct ServiceTagType ServiceTag; + int FreeService; + + +}; + +struct arraylen_ServiceTagListType +{ + size_t Service; + + +}; + +struct ServiceTagListType +{ + struct ServiceType Service[2]; + struct arraylen_ServiceTagListType arraylen; + +}; + +struct selection_ServiceDiscoveryResType +{ + unsigned int ServiceList:1; + + +}; + +struct ServiceDiscoveryResType +{ + enum responseCodeType ResponseCode; + struct PaymentOptionsType PaymentOptions; + struct ServiceChargeType ChargeService; + struct ServiceTagListType ServiceList; + struct selection_ServiceDiscoveryResType isused; + +}; + +struct ServiceDetailReqType +{ + uint16_t ServiceID; + + +}; + +struct selection_PhysicalValueType +{ + unsigned int Unit:1; + + +}; + +struct PhysicalValueType +{ + int8_t Multiplier; + enum unitSymbolType Unit; + int16_t Value; + struct selection_PhysicalValueType isused; + +}; + +struct ParameterType +{ + struct service_string attr_Name; + struct service_string attr_ValueType; + int boolValue; + int8_t byteValue; + int16_t shortValue; + int32_t intValue; + struct PhysicalValueType physicalValue; + struct service_string stringValue; + + +}; + +struct arraylen_ParameterSetType +{ + size_t Parameter; + + +}; + +struct ParameterSetType +{ + int16_t ParameterSetID; + struct ParameterType Parameter[2]; + struct arraylen_ParameterSetType arraylen; + +}; + +struct arraylen_ServiceParameterListType +{ + size_t ParameterSet; + + +}; + +struct ServiceParameterListType +{ + struct ParameterSetType ParameterSet[2]; + struct arraylen_ServiceParameterListType arraylen; + +}; + +struct selection_ServiceDetailResType +{ + unsigned int ServiceParameterList:1; + + +}; + +struct ServiceDetailResType +{ + enum responseCodeType ResponseCode; + uint16_t ServiceID; + struct ServiceParameterListType ServiceParameterList; + struct selection_ServiceDetailResType isused; + +}; + +struct selection_SelectedServiceType +{ + unsigned int ParameterSetID:1; + + +}; + +struct SelectedServiceType +{ + uint16_t ServiceID; + int16_t ParameterSetID; + struct selection_SelectedServiceType isused; + +}; + +struct arraylen_SelectedServiceListType +{ + size_t SelectedService; + + +}; + +struct SelectedServiceListType +{ + struct SelectedServiceType SelectedService[2]; + struct arraylen_SelectedServiceListType arraylen; + +}; + +struct ServicePaymentSelectionReqType +{ + enum paymentOptionType SelectedPaymentOption; + struct SelectedServiceListType SelectedServiceList; + + +}; + +struct ServicePaymentSelectionResType +{ + enum responseCodeType ResponseCode; + + +}; + +struct arraylen_contractIDType +{ + size_t data; + + +}; + +struct contractIDType +{ + uint32_t data[24]; + struct arraylen_contractIDType arraylen; + +}; + +struct arraylen_certificateType +{ + size_t data; + + +}; + +struct certificateType +{ + uint8_t data[1200]; + struct arraylen_certificateType arraylen; + +}; + +struct arraylen_SubCertificatesType +{ + size_t Certificate; + + +}; + +struct SubCertificatesType +{ + struct certificateType Certificate[4]; + 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[256]; + struct arraylen_genChallengeType arraylen; + +}; + +struct PaymentDetailsResType +{ + enum responseCodeType ResponseCode; + struct genChallengeType GenChallenge; + int64_t DateTimeNow; + + +}; + +struct ContractAuthenticationReqType +{ + struct service_string attr_Id; + struct genChallengeType GenChallenge; + + +}; + +struct ContractAuthenticationResType +{ + enum responseCodeType ResponseCode; + + +}; + +struct AC_EVChargeParameterType +{ + uint32_t DepartureTime; + struct PhysicalValueType EAmount; + struct PhysicalValueType EVMaxVoltage; + struct PhysicalValueType EVMaxCurrent; + struct PhysicalValueType EVMinCurrent; + + +}; + +struct selection_ChargeParameterDiscoveryReqType +{ + unsigned int AC_EVChargeParameter:1; + unsigned int DC_EVChargeParameter:1; + + +}; + +struct selection_DC_EVStatusType +{ + unsigned int EVCabinConditioning:1; + unsigned int EVRESSConditioning:1; + + +}; + +struct DC_EVStatusType +{ + int EVReady; + int EVCabinConditioning; + int EVRESSConditioning; + enum DC_EVErrorCodeType EVErrorCode; + int8_t EVRESSSOC; + struct selection_DC_EVStatusType isused; + +}; + +struct selection_DC_EVChargeParameterType +{ + unsigned int EVMaximumPowerLimit:1; + unsigned int EVEnergyCapacity:1; + unsigned int EVEnergyRequest:1; + unsigned int FullSOC:1; + unsigned int BulkSOC:1; + + +}; + +struct DC_EVChargeParameterType +{ + struct DC_EVStatusType DC_EVStatus; + struct PhysicalValueType EVMaximumCurrentLimit; + struct PhysicalValueType EVMaximumPowerLimit; + struct PhysicalValueType EVMaximumVoltageLimit; + struct PhysicalValueType EVEnergyCapacity; + struct PhysicalValueType EVEnergyRequest; + int8_t FullSOC; + int8_t BulkSOC; + struct selection_DC_EVChargeParameterType isused; + +}; + +struct ChargeParameterDiscoveryReqType +{ + enum EVRequestedEnergyTransferType EVRequestedEnergyTransferType; + struct AC_EVChargeParameterType* AC_EVChargeParameter; + struct DC_EVChargeParameterType* DC_EVChargeParameter; + struct selection_ChargeParameterDiscoveryReqType isused; + +}; + +struct selection_RelativeTimeIntervalType +{ + unsigned int duration:1; + + +}; + +struct RelativeTimeIntervalType +{ + uint32_t start; + uint32_t duration; + struct selection_RelativeTimeIntervalType isused; + +}; + +struct PMaxScheduleEntryType +{ + struct RelativeTimeIntervalType RelativeTimeInterval; + int16_t PMax; + + +}; + +struct arraylen_PMaxScheduleType +{ + size_t PMaxScheduleEntry; + + +}; + +struct PMaxScheduleType +{ + int16_t PMaxScheduleID; + struct PMaxScheduleEntryType PMaxScheduleEntry[12]; + struct arraylen_PMaxScheduleType arraylen; + +}; + +struct arraylen_tariffDescriptionType +{ + size_t data; + + +}; + +struct tariffDescriptionType +{ + uint32_t data[32]; + struct arraylen_tariffDescriptionType arraylen; + +}; + +struct selection_SalesTariffType +{ + unsigned int SalesTariffDescription:1; + + +}; + +struct selection_CostType +{ + unsigned int amountMultiplier:1; + + +}; + +struct CostType +{ + enum costKindType costKind; + uint32_t amount; + int8_t amountMultiplier; + struct selection_CostType isused; + +}; + +struct selection_ConsumptionCostType +{ + unsigned int Cost:1; + + +}; + +struct arraylen_ConsumptionCostType +{ + size_t Cost; + + +}; + +struct ConsumptionCostType +{ + uint32_t startValue; + struct CostType Cost[2]; + struct selection_ConsumptionCostType isused; struct arraylen_ConsumptionCostType arraylen; + +}; + +struct selection_SalesTariffEntryType +{ + unsigned int ConsumptionCost:1; + + +}; + +struct arraylen_SalesTariffEntryType +{ + size_t ConsumptionCost; + + +}; + +struct SalesTariffEntryType +{ + struct RelativeTimeIntervalType RelativeTimeInterval; + uint8_t EPriceLevel; + struct ConsumptionCostType ConsumptionCost[3]; + struct selection_SalesTariffEntryType isused; struct arraylen_SalesTariffEntryType arraylen; + +}; + +struct arraylen_SalesTariffType +{ + size_t SalesTariffEntry; + + +}; + +struct SalesTariffType +{ + struct service_string attr_Id; + int16_t SalesTariffID; + struct tariffDescriptionType SalesTariffDescription; + uint8_t NumEPriceLevels; + struct SalesTariffEntryType SalesTariffEntry[12]; + struct selection_SalesTariffType isused; struct arraylen_SalesTariffType arraylen; + +}; + +struct selection_SAScheduleTupleType +{ + unsigned int SalesTariff:1; + + +}; + +struct SAScheduleTupleType +{ + int16_t SAScheduleTupleID; + struct PMaxScheduleType PMaxSchedule; + struct SalesTariffType* SalesTariff; + struct selection_SAScheduleTupleType isused; + +}; + +struct arraylen_SAScheduleListType +{ + size_t SAScheduleTuple; + + +}; + +struct SAScheduleListType +{ + struct SAScheduleTupleType SAScheduleTuple[3]; + struct arraylen_SAScheduleListType arraylen; + +}; + +struct selection_ChargeParameterDiscoveryResType +{ + unsigned int SAScheduleList:1; + unsigned int AC_EVSEChargeParameter:1; + unsigned int DC_EVSEChargeParameter:1; + + +}; + +struct AC_EVSEStatusType +{ + int PowerSwitchClosed; + int RCD; + uint32_t ShutDownTime; + int StopCharging; + + +}; + +struct AC_EVSEChargeParameterType +{ + struct AC_EVSEStatusType AC_EVSEStatus; + struct PhysicalValueType EVSEMaxVoltage; + struct PhysicalValueType EVSEMaxCurrent; + struct PhysicalValueType EVSEMinCurrent; + + +}; + +struct selection_DC_EVSEStatusType +{ + unsigned int EVSEIsolationStatus:1; + + +}; + +struct DC_EVSEStatusType +{ + enum isolationLevelType EVSEIsolationStatus; + enum DC_EVSEStatusCodeType EVSEStatusCode; + struct selection_DC_EVSEStatusType isused; + +}; + +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 PhysicalValueType EVSEMaximumCurrentLimit; + struct PhysicalValueType EVSEMaximumPowerLimit; + struct PhysicalValueType EVSEMaximumVoltageLimit; + struct PhysicalValueType EVSEMinimumCurrentLimit; + struct PhysicalValueType EVSEMinimumVoltageLimit; + struct PhysicalValueType EVSECurrentRegulationTolerance; + struct PhysicalValueType EVSEPeakCurrentRipple; + struct PhysicalValueType EVSEEnergyToBeDelivered; + struct selection_DC_EVSEChargeParameterType isused; + +}; + +struct ChargeParameterDiscoveryResType +{ + enum responseCodeType ResponseCode; + struct SAScheduleListType* SAScheduleList; + struct AC_EVSEChargeParameterType* AC_EVSEChargeParameter; + struct DC_EVSEChargeParameterType* DC_EVSEChargeParameter; + struct selection_ChargeParameterDiscoveryResType isused; + +}; + +struct ProfileEntryType +{ + uint32_t ChargingProfileEntryStart; + int16_t ChargingProfileEntryMaxPower; + + +}; + +struct arraylen_ChargingProfileType +{ + size_t ProfileEntry; + + +}; + +struct ChargingProfileType +{ + int16_t SAScheduleTupleID; + struct ProfileEntryType ProfileEntry[24]; + struct arraylen_ChargingProfileType arraylen; + +}; + +struct selection_PowerDeliveryReqType +{ + unsigned int ChargingProfile:1; + unsigned int DC_EVPowerDeliveryParameter:1; + + +}; + +struct selection_DC_EVPowerDeliveryParameterType +{ + unsigned int BulkChargingComplete:1; + + +}; + +struct DC_EVPowerDeliveryParameterType +{ + struct DC_EVStatusType DC_EVStatus; + int BulkChargingComplete; + int ChargingComplete; + struct selection_DC_EVPowerDeliveryParameterType isused; + +}; + +struct PowerDeliveryReqType +{ + int ReadyToChargeState; + struct ChargingProfileType ChargingProfile; + struct DC_EVPowerDeliveryParameterType* DC_EVPowerDeliveryParameter; + struct selection_PowerDeliveryReqType isused; + +}; + +struct selection_PowerDeliveryResType +{ + unsigned int AC_EVSEStatus:1; + unsigned int DC_EVSEStatus:1; + + +}; + +struct PowerDeliveryResType +{ + enum responseCodeType ResponseCode; + struct AC_EVSEStatusType* AC_EVSEStatus; + struct DC_EVSEStatusType* DC_EVSEStatus; + struct selection_PowerDeliveryResType isused; + +}; + +struct ChargingStatusReqType +{ + + + int NO_MEMBER:1; + +}; + +struct selection_ChargingStatusResType +{ + unsigned int SAScheduleTupleID:1; + unsigned int EVSEMaxCurrent:1; + unsigned int MeterInfo:1; + + +}; + +struct arraylen_meterIDType +{ + size_t data; + + +}; + +struct meterIDType +{ + uint32_t data[32]; + struct arraylen_meterIDType arraylen; + +}; + +struct selection_MeterInfoType +{ + unsigned int MeterReading:1; + unsigned int SigMeterReading:1; + unsigned int MeterStatus:1; + unsigned int TMeter:1; + + +}; + +struct arraylen_sigMeterReadingType +{ + size_t data; + + +}; + +struct sigMeterReadingType +{ + uint8_t data[32]; + struct arraylen_sigMeterReadingType arraylen; + +}; + +struct MeterInfoType +{ + struct meterIDType MeterID; + struct PhysicalValueType MeterReading; + struct sigMeterReadingType SigMeterReading; + int16_t MeterStatus; + int64_t TMeter; + struct selection_MeterInfoType isused; + +}; + +struct ChargingStatusResType +{ + enum responseCodeType ResponseCode; + struct evseIDType EVSEID; + int16_t SAScheduleTupleID; + struct PhysicalValueType EVSEMaxCurrent; + struct MeterInfoType MeterInfo; + int ReceiptRequired; + struct AC_EVSEStatusType AC_EVSEStatus; + struct selection_ChargingStatusResType isused; + +}; + +struct selection_MeteringReceiptReqType +{ + unsigned int attr_Id:1; + unsigned int SAScheduleTupleID:1; + + +}; + +struct MeteringReceiptReqType +{ + struct service_string attr_Id; + struct sessionIDType SessionID; + int16_t SAScheduleTupleID; + struct MeterInfoType MeterInfo; + struct selection_MeteringReceiptReqType isused; + +}; + +struct MeteringReceiptResType +{ + enum responseCodeType ResponseCode; + struct AC_EVSEStatusType AC_EVSEStatus; + + +}; + +struct SessionStopType +{ + + + int NO_MEMBER:1; + +}; + +struct SessionStopResType +{ + enum responseCodeType ResponseCode; + + +}; + +struct selection_CertificateUpdateReqType +{ + unsigned int attr_Id:1; + + +}; + +struct arraylen_rootCertificateIDType +{ + size_t data; + + +}; + +struct rootCertificateIDType +{ + uint32_t data[40]; + struct arraylen_rootCertificateIDType arraylen; + +}; + +struct arraylen_ListOfRootCertificateIDsType +{ + size_t RootCertificateID; + + +}; + +struct ListOfRootCertificateIDsType +{ + struct rootCertificateIDType RootCertificateID[20]; + struct arraylen_ListOfRootCertificateIDsType arraylen; + +}; + +struct arraylen_dHParamsType +{ + size_t data; + + +}; + +struct dHParamsType +{ + uint8_t data[256]; + struct arraylen_dHParamsType arraylen; + +}; + +struct CertificateUpdateReqType +{ + struct service_string attr_Id; + struct CertificateChainType ContractSignatureCertChain; + struct contractIDType ContractID; + struct ListOfRootCertificateIDsType ListOfRootCertificateIDs; + struct dHParamsType DHParams; + struct selection_CertificateUpdateReqType isused; + +}; + +struct arraylen_privateKeyType +{ + size_t data; + + +}; + +struct privateKeyType +{ + uint8_t data[128]; + struct arraylen_privateKeyType arraylen; + +}; + +struct CertificateUpdateResType +{ + struct service_string attr_Id; + enum responseCodeType ResponseCode; + struct CertificateChainType ContractSignatureCertChain; + struct privateKeyType ContractSignatureEncryptedPrivateKey; + struct dHParamsType DHParams; + struct contractIDType ContractID; + int16_t RetryCounter; + + +}; + +struct selection_CertificateInstallationReqType +{ + unsigned int attr_Id:1; + + +}; + +struct CertificateInstallationReqType +{ + struct service_string attr_Id; + struct certificateType OEMProvisioningCert; + struct ListOfRootCertificateIDsType ListOfRootCertificateIDs; + struct dHParamsType DHParams; + struct selection_CertificateInstallationReqType isused; + +}; + +struct CertificateInstallationResType +{ + struct service_string attr_Id; + enum responseCodeType ResponseCode; + struct CertificateChainType ContractSignatureCertChain; + struct privateKeyType ContractSignatureEncryptedPrivateKey; + struct dHParamsType DHParams; + struct contractIDType ContractID; + + +}; + +struct CableCheckReqType +{ + struct DC_EVStatusType DC_EVStatus; + + +}; + +struct CableCheckResType +{ + enum responseCodeType ResponseCode; + struct DC_EVSEStatusType DC_EVSEStatus; + + +}; + +struct PreChargeReqType +{ + struct DC_EVStatusType DC_EVStatus; + struct PhysicalValueType EVTargetVoltage; + struct PhysicalValueType EVTargetCurrent; + + +}; + +struct PreChargeResType +{ + enum responseCodeType ResponseCode; + struct DC_EVSEStatusType DC_EVSEStatus; + struct PhysicalValueType EVSEPresentVoltage; + + +}; + +struct selection_CurrentDemandReqType +{ + unsigned int EVMaximumVoltageLimit:1; + unsigned int EVMaximumCurrentLimit:1; + unsigned int EVMaximumPowerLimit:1; + unsigned int BulkChargingComplete:1; + unsigned int RemainingTimeToFullSoC:1; + unsigned int RemainingTimeToBulkSoC:1; + + +}; + +struct CurrentDemandReqType +{ + struct DC_EVStatusType DC_EVStatus; + struct PhysicalValueType EVTargetCurrent; + struct PhysicalValueType EVMaximumVoltageLimit; + struct PhysicalValueType EVMaximumCurrentLimit; + struct PhysicalValueType EVMaximumPowerLimit; + int BulkChargingComplete; + int ChargingComplete; + struct PhysicalValueType RemainingTimeToFullSoC; + struct PhysicalValueType RemainingTimeToBulkSoC; + struct PhysicalValueType EVTargetVoltage; + struct selection_CurrentDemandReqType isused; + +}; + +struct selection_CurrentDemandResType +{ + unsigned int EVSEMaximumVoltageLimit:1; + unsigned int EVSEMaximumCurrentLimit:1; + unsigned int EVSEMaximumPowerLimit:1; + + +}; + +struct CurrentDemandResType +{ + enum responseCodeType ResponseCode; + struct DC_EVSEStatusType DC_EVSEStatus; + struct PhysicalValueType EVSEPresentVoltage; + struct PhysicalValueType EVSEPresentCurrent; + int EVSECurrentLimitAchieved; + int EVSEVoltageLimitAchieved; + int EVSEPowerLimitAchieved; + struct PhysicalValueType EVSEMaximumVoltageLimit; + struct PhysicalValueType EVSEMaximumCurrentLimit; + struct PhysicalValueType EVSEMaximumPowerLimit; + struct selection_CurrentDemandResType isused; + +}; + +struct WeldingDetectionReqType +{ + struct DC_EVStatusType DC_EVStatus; + + +}; + +struct WeldingDetectionResType +{ + enum responseCodeType ResponseCode; + struct DC_EVSEStatusType DC_EVSEStatus; + struct PhysicalValueType EVSEPresentVoltage; + + +}; + +struct BodyType +{ + struct SessionSetupReqType* SessionSetupReq; + struct SessionSetupResType* SessionSetupRes; + struct ServiceDiscoveryReqType* ServiceDiscoveryReq; + struct ServiceDiscoveryResType* ServiceDiscoveryRes; + struct ServiceDetailReqType* ServiceDetailReq; + struct ServiceDetailResType* ServiceDetailRes; + struct ServicePaymentSelectionReqType* ServicePaymentSelectionReq; + struct ServicePaymentSelectionResType* ServicePaymentSelectionRes; + struct PaymentDetailsReqType* PaymentDetailsReq; + struct PaymentDetailsResType* PaymentDetailsRes; + struct ContractAuthenticationReqType* ContractAuthenticationReq; + struct ContractAuthenticationResType* ContractAuthenticationRes; + struct ChargeParameterDiscoveryReqType* ChargeParameterDiscoveryReq; + struct ChargeParameterDiscoveryResType* ChargeParameterDiscoveryRes; + struct PowerDeliveryReqType* PowerDeliveryReq; + struct PowerDeliveryResType* PowerDeliveryRes; + struct ChargingStatusReqType* ChargingStatusReq; + struct ChargingStatusResType* ChargingStatusRes; + struct MeteringReceiptReqType* MeteringReceiptReq; + struct MeteringReceiptResType* MeteringReceiptRes; + struct SessionStopType* SessionStopReq; + struct SessionStopResType* SessionStopRes; + struct CertificateUpdateReqType* CertificateUpdateReq; + struct CertificateUpdateResType* CertificateUpdateRes; + struct CertificateInstallationReqType* CertificateInstallationReq; + struct CertificateInstallationResType* CertificateInstallationRes; + struct CableCheckReqType* CableCheckReq; + struct CableCheckResType* CableCheckRes; + struct PreChargeReqType* PreChargeReq; + struct PreChargeResType* PreChargeRes; + struct CurrentDemandReqType* CurrentDemandReq; + struct CurrentDemandResType* CurrentDemandRes; + struct WeldingDetectionReqType* WeldingDetectionReq; + struct WeldingDetectionResType* WeldingDetectionRes; + struct selection_BodyType isused; + +}; + +struct AnonType_V2G_Message +{ + struct MessageHeaderType* Header; + struct BodyType Body; + + +}; + +struct EXIDocumentType +{ + struct AnonType_V2G_Message V2G_Message; + + +}; + +enum responseMessages +{ + SESSIONSETUPRES, + SERVICEDISCOVERYRES, + SERVICEDETAILRES, + SERVICEPAYMENTSELECTIONRES, + PAYMENTDETAILSRES, + CONTRACTAUTHENTICATIONRES, + CHARGEPARAMETERDISCOVERYRES, + POWERDELIVERYRES, + CHARGINGSTATUSRES, + METERINGRECEIPTRES, + SESSIONSTOPRES, + CERTIFICATEUPDATERES, + CERTIFICATEINSTALLATIONRES, + CABLECHECKRES, + PRECHARGERES, + CURRENTDEMANDRES, + WELDINGDETECTIONRES +}; + + +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/service/v2g_serviceDispatcher.c b/src/service/v2g_serviceDispatcher.c new file mode 100644 index 0000000..0f06ab5 --- /dev/null +++ b/src/service/v2g_serviceDispatcher.c @@ -0,0 +1,2551 @@ + + + +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXISeGen
+ * + ********************************************************************/ + + +#include "v2g_service.h" +#include "v2g_serviceDispatcher.h" +#include "v2g_serviceDataTypes.h" +#include "v2g_serviceDataTypes.c" +#include "v2g_serviceMethods.h" +#include "v2g_serviceDataSerialization.c" +#include "EXITypes.h" +#include "EXIDecoder.h" +#include "EXIEncoder.h" +#include "StringTable.h" +#includeCode generated by EXISeGen
+ * + ********************************************************************/ + + + #ifdef __cplusplus +extern "C" { +#endif + +#ifndef SERVICEMETHODS_H +#define SERVICEMETHODS_H + +#include "v2g_serviceDataTypes.h" +#include "EXITypes.h" + +/* This service methods has to be implemented by the EVSE server */ +int sessionSetup(struct MessageHeaderType* header, struct SessionSetupReqType* param, struct SessionSetupResType* result); + +int serviceDiscovery(struct MessageHeaderType* header, struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result); + +int serviceDetail(struct MessageHeaderType* header, struct ServiceDetailReqType* param, struct ServiceDetailResType* result); + +int servicePaymentSelection(struct MessageHeaderType* header, struct ServicePaymentSelectionReqType* param, struct ServicePaymentSelectionResType* result); + +int paymentDetails(struct MessageHeaderType* header, struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result); + +int contractAuthentication(struct MessageHeaderType* header, struct ContractAuthenticationReqType* param, struct ContractAuthenticationResType* result); + +int chargeParameterDiscovery(struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* param, struct ChargeParameterDiscoveryResType* result); + +int powerDelivery(struct MessageHeaderType* header, struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result); + +int chargingStatus(struct MessageHeaderType* header, struct ChargingStatusReqType* param, struct ChargingStatusResType* result); + +int meteringReceipt(struct MessageHeaderType* header, struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result); + +int sessionStop(struct MessageHeaderType* header, struct SessionStopType* param, struct SessionStopResType* result); + +int certificateUpdate(struct MessageHeaderType* header, struct CertificateUpdateReqType* param, struct CertificateUpdateResType* result); + +int certificateInstallation(struct MessageHeaderType* header, struct CertificateInstallationReqType* param, struct CertificateInstallationResType* 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); + + + + + + +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/test/evse_server.c b/src/test/evse_server.c new file mode 100644 index 0000000..1e843f2 --- /dev/null +++ b/src/test/evse_server.c @@ -0,0 +1,185 @@ +/* + * Copyright (C) 2007-2012 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, seeCode generated by EXIdizer
+ ********************************************************************/ + + + +/******************************************************************* + * + *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