From 326e0b8b1d1cd4ce2c5e8dc69064389ad2d952e9 Mon Sep 17 00:00:00 2001 From: sebastiankb Date: Fri, 15 Apr 2011 12:13:20 +0000 Subject: [PATCH] --- .cproject | 4 +- .project | 14 +- README.txt | 23 +- data/test/sessionSetupReq.xml | 21 +- data/test/sessionSetupReq.xml.exi | Bin 15 -> 14 bytes data/test/sessionSetupRes.xml | 58 +- data/test/sessionSetupRes.xml.exi | 2 +- src/codec/BitDecoderChannel.c | 65 +- src/codec/BitDecoderChannel.h | 22 +- src/codec/BitEncoderChannel.c | 8 +- src/codec/BitEncoderChannel.h | 8 +- src/codec/BitInputStream.c | 6 +- src/codec/BitInputStream.h | 6 +- src/codec/BitOutputStream.c | 6 +- src/codec/BitOutputStream.h | 6 +- src/codec/ByteStream.c | 10 +- src/codec/ByteStream.h | 8 +- src/codec/EXICoder.c | 8 +- src/codec/EXICoder.h | 8 +- src/codec/EXIDecoder.c | 2214 ++++------ src/codec/EXIDecoder.h | 7 +- src/codec/EXIEncoder.c | 2168 ++++------ src/codec/EXIEncoder.h | 4 +- src/codec/EXIHeaderDecoder.c | 6 +- src/codec/EXIHeaderDecoder.h | 4 +- src/codec/EXIHeaderEncoder.c | 4 +- src/codec/EXIHeaderEncoder.h | 4 +- src/codec/EXITypes.h | 40 +- src/codec/StringTable.c | 19 +- src/codec/StringTable.h | 16 +- src/codec/StringTableEntries.c | 94 +- src/codec/StringTableEntries.h | 8 +- src/codec/UCSString.c | 4 +- src/codec/UCSString.h | 4 +- src/service/v2g_service.h | 158 +- .../v2g_serviceClientDataTransmitter.h | 88 +- src/service/v2g_serviceClientStubs.c | 2132 ++++------ src/service/v2g_serviceClientStubs.h | 157 +- src/service/v2g_serviceDataSerialization.c | 3560 ++++++++--------- src/service/v2g_serviceDataSerializiation.h | 42 + src/service/v2g_serviceDataTypes.c | 252 +- src/service/v2g_serviceDataTypes.h | 615 ++- src/service/v2g_serviceDispatcher.c | 1450 +++---- src/service/v2g_serviceDispatcher.h | 86 +- src/service/v2g_serviceMethods.h | 16 +- src/test/main.c | 7 +- src/test/main.h | 4 +- src/test/main_codec.c | 20 +- src/test/main_service.c | 612 +-- src/test/v2g_server.c | 10 +- src/test/v2g_server.h | 6 +- src/test/v2g_serviceClientDataTransmitter.c | 10 +- src/test/v2g_serviceMethods.c | 304 +- src/transport/doIP.c | 10 +- src/transport/doIP.h | 10 +- 55 files changed, 5439 insertions(+), 8989 deletions(-) create mode 100644 src/service/v2g_serviceDataSerializiation.h diff --git a/.cproject b/.cproject index f6fc63e..c1f0526 100644 --- a/.cproject +++ b/.cproject @@ -555,7 +555,6 @@ - @@ -572,7 +571,7 @@ - + - diff --git a/.project b/.project index 1349b8a..b94afb7 100644 --- a/.project +++ b/.project @@ -17,10 +17,6 @@ org.eclipse.cdt.make.core.append_environment true - - org.eclipse.cdt.make.core.autoBuildTarget - all - org.eclipse.cdt.make.core.buildArguments @@ -31,11 +27,7 @@ org.eclipse.cdt.make.core.buildLocation - ${workspace_loc:/OpenV2G/Release} - - - org.eclipse.cdt.make.core.cleanBuildTarget - clean + ${workspace_loc:/OpenV2G/Debug} org.eclipse.cdt.make.core.contents @@ -53,10 +45,6 @@ org.eclipse.cdt.make.core.enableFullBuild true - - org.eclipse.cdt.make.core.fullBuildTarget - all - org.eclipse.cdt.make.core.stopOnError true diff --git a/README.txt b/README.txt index e99b87e..acbd463 100644 --- a/README.txt +++ b/README.txt @@ -1,13 +1,13 @@ ------------------------------------------------------------------------- OpenV2G - an open source project implementing the basic functionality of the ISO IEC 15118 vehicle to grid (V2G) communication interface -Version 0.4, released April 14, 2011 +Version 0.3, released October 27, 2010 http://openv2g.sourceforge.net/ Please report bugs via the SourceForge bug tracking system at http://sourceforge.net/tracker/?group_id=350113. Thank you. -Copyright (C) 2007-2011 Siemens AG +Copyright (C) 2007-2010 Siemens AG This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -22,25 +22,6 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . -------------------------------------------------------------------------- -CHANGES from version 0.3.1: -------------------------------------------------------------------------- -* adaption of V2G schema changes -* supporting of DC messages -* example program showing the message sequence of AC charging and -DC charging -* bug-fixes - -------------------------------------------------------------------------- -CHANGES from version 0.3: -------------------------------------------------------------------------- -* Bug-fixes -* reduced memory usage -* some type changes in the EXI codec and V2G service: -** struct v2gService->struct EXIService in v2g_service.h -** size_t->uint16_t in v2g_serviceClientDataTransmitter.h and doIP.h -* renaming of some enumeration values in v2g_serviceDataTypes.h - ------------------------------------------------------------------------- CHANGES from version 0.2.2: ------------------------------------------------------------------------- diff --git a/data/test/sessionSetupReq.xml b/data/test/sessionSetupReq.xml index 188abd9..18e0a5f 100644 --- a/data/test/sessionSetupReq.xml +++ b/data/test/sessionSetupReq.xml @@ -1,22 +1,21 @@ - - + xsi:schemaLocation="urn:iso:15118:2:2010:MsgDef V2G_CI_MsgDef.xsd"> + 3031323334353637 1 - - - + + + 0 1 - false - - + + diff --git a/data/test/sessionSetupReq.xml.exi b/data/test/sessionSetupReq.xml.exi index 26b5bb283a23298fab9c0df34d9d79dd86e74e39..33ef49b42116d4037cd9bd75ae99d4f9b27879e4 100644 GIT binary patch literal 14 WcmbO*!?Ce*;>?9BH|}Cf?gaohmj_7z literal 15 XcmbPm!?Ce*;>?9BH|}Cf-pc?0Lcj;P diff --git a/data/test/sessionSetupRes.xml b/data/test/sessionSetupRes.xml index 5db1bf9..6de368f 100644 --- a/data/test/sessionSetupRes.xml +++ b/data/test/sessionSetupRes.xml @@ -1,32 +1,28 @@ - - - - 0Fb80Fb80Fb80Fb8 - 1 - - - - - OK_SessionSetup - 54 - - 0 - 1 - 1 - 0 - 1 - 123456789 - 1 - false - true - - 123456789 - - - + + + + 0Fb80Fb80Fb80Fb8 + 1 + + + + + OK_SessionSetup + 54 + + 0 + 1 + 1 + 0 + 1 + 123456789 + + 123456789 + + + diff --git a/data/test/sessionSetupRes.xml.exi b/data/test/sessionSetupRes.xml.exi index 2dd611f..65496ce 100644 --- a/data/test/sessionSetupRes.xml.exi +++ b/data/test/sessionSetupRes.xml.exi @@ -1 +1 @@ -@}}}}cTjVk)Y \ No newline at end of file +@}}}}cTjVk+5t \ No newline at end of file diff --git a/src/codec/BitDecoderChannel.c b/src/codec/BitDecoderChannel.c index 000d155..c82b25c 100644 --- a/src/codec/BitDecoderChannel.c +++ b/src/codec/BitDecoderChannel.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * * Bit decoding functionalities @@ -38,59 +38,36 @@ #ifndef BIT_DECODER_CHANNEL_C #define BIT_DECODER_CHANNEL_C -/* only the least significant 8 bits are filled properly */ -int _decode(bitstream_t* stream, uint32_t* b) { +int decode(bitstream_t* stream, uint8_t* b) { return readBits(stream, 8, b); } int decodeBoolean(bitstream_t* stream, int* b) { - uint32_t ub; + uint8_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) { +int decodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint8_t* uint8) { if (nbits == 0) { - *uint32 = 0; + *uint8 = 0; return 0; } else { - return readBits(stream, nbits, uint32); + return readBits(stream, nbits, uint8); } } -int decodeUnsignedInteger16(bitstream_t* stream, uint16_t* uint16) { - unsigned int mShift = 0; - int errn = 0; - uint32_t b; - *uint16 = 0; - - do { - /* 1. Read the next octet */ - errn = _decode(stream, &b); - /* 2. Multiply the value of the unsigned number represented by the 7 - * least significant - * bits of the octet by the current multiplier and add the result to - * the current value */ - *uint16 += (b & 127) << mShift; - /* 3. Multiply the multiplier by 128 */ - mShift += 7; - /* 4. If the most significant bit of the octet was 1, go back to step 1 */ - } while (errn >= 0 && (b >> 7) == 1); - - return errn; -} - int decodeUnsignedInteger32(bitstream_t* stream, uint32_t* uint32) { /* 0XXXXXXX ... 1XXXXXXX 1XXXXXXX */ unsigned int mShift = 0; int errn = 0; - uint32_t b; + uint8_t b; *uint32 = 0; do { /* 1. Read the next octet */ - errn = _decode(stream, &b); + 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 @@ -113,11 +90,11 @@ int decodeUnsignedInteger32(bitstream_t* stream, uint32_t* uint32) { int decodeUnsignedInteger64(bitstream_t* stream, uint64_t* uint64) { unsigned int mShift = 0; int errn = 0; - uint32_t b; + uint8_t b; *uint64 = 0L; do { - errn = _decode(stream, &b); + errn = decode(stream, &b); *uint64 += ((uint64_t) (b & 127)) << mShift; mShift += 7; } while (errn >= 0 && (b >> 7) == 1); @@ -200,7 +177,7 @@ int decodeFloat(bitstream_t* stream, float_me_t* f) { /** * Decode a sequence of characters for a given length. */ -int decodeStringOnly(bitstream_t* stream, uint16_t len, string_ucs_t* s) { +int decodeStringOnly(bitstream_t* stream, size_t len, string_ucs_t* s) { decodeCharacters(stream, len, s->codepoints); s->len = len; return 0; @@ -210,7 +187,7 @@ 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 errn = decodeUnsignedInteger16(stream, &s->len); + int errn = decodeUnsignedInteger32(stream, &s->len); if (errn < 0) { return errn; } @@ -218,7 +195,7 @@ int decodeString(bitstream_t* stream, string_ucs_t* s) { } int decodeStringValue(bitstream_t* stream, string_ucs_t* s) { - int errn = decodeUnsignedInteger16(stream, &s->len); + int errn = decodeUnsignedInteger32(stream, &s->len); if (errn < 0) { return errn; } @@ -249,14 +226,11 @@ int decodeStringValue(bitstream_t* stream, string_ucs_t* s) { * 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) { +int decodeCharacters(bitstream_t* stream, size_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; @@ -267,18 +241,13 @@ int decodeCharacters(bitstream_t* stream, uint16_t len, uint32_t* chars) { */ int decodeBinary(bitstream_t* stream, bytes_t* bytes) { unsigned int i; - uint32_t b; - int errn = decodeUnsignedInteger16(stream, &bytes->len); + int errn = decodeUnsignedInteger32(stream, &bytes->len); if (errn < 0) { return errn; } for (i = 0; i < bytes->len && errn >= 0; i++) { - errn = _decode(stream, &b); - if (errn < 0) { - return errn; - } - bytes->data[i] = (uint8_t)b; + errn = decode(stream, &bytes->data[i]); } return errn; diff --git a/src/codec/BitDecoderChannel.h b/src/codec/BitDecoderChannel.h index e89d05b..7623304 100644 --- a/src/codec/BitDecoderChannel.h +++ b/src/codec/BitDecoderChannel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -41,15 +41,7 @@ int decodeBoolean(bitstream_t* stream, int* b); /** * Decodes and returns an n-bit unsigned integer. */ -int decodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t* uint32); - -/** - * Decode an arbitrary precision non negative integer using a sequence of - * octets. The most significant bit of the last octet is set to zero to - * indicate sequence termination. Only seven bits per octet are used to - * store the integer's value. - */ -int decodeUnsignedInteger16(bitstream_t* stream, uint16_t* uint16); +int decodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint8_t* uint8); /** * Decode an arbitrary precision non negative integer using a sequence of @@ -91,12 +83,6 @@ int decodeInteger64(bitstream_t* stream, int64_t* int64); */ int decodeFloat(bitstream_t* stream, float_me_t* f); - -/** - * Decode a sequence of characters for a given length. - */ -int decodeStringOnly(bitstream_t* stream, uint16_t len, string_ucs_t* s); - /** * Decode a length prefixed sequence of characters. */ @@ -114,7 +100,7 @@ int decodeStringValue(bitstream_t* stream, string_ucs_t* s); /** * Decode a sequence of characters according to a given length. */ -int decodeCharacters(bitstream_t* stream, uint16_t len, uint32_t* chars); +int decodeCharacters(bitstream_t* stream, size_t len, uint32_t* chars); /** * Decode a binary value as a length-prefixed sequence of octets. diff --git a/src/codec/BitEncoderChannel.c b/src/codec/BitEncoderChannel.c index 0c64109..ac295c8 100644 --- a/src/codec/BitEncoderChannel.c +++ b/src/codec/BitEncoderChannel.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -86,7 +86,7 @@ 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) { +int encodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint8_t val) { return writeBits(stream, nbits, val); } @@ -252,7 +252,7 @@ int encodeStringValue(bitstream_t* stream, string_ucs_t* string) { * Each character is represented by its UCS [ISO/IEC 10646] * code point encoded as an Unsigned Integer */ -int encodeCharacters(bitstream_t* stream, uint32_t* chars, uint16_t len) { +int encodeCharacters(bitstream_t* stream, uint32_t* chars, size_t len) { unsigned int i; int errn = 0; for(i=0; i=0; i++) { diff --git a/src/codec/BitEncoderChannel.h b/src/codec/BitEncoderChannel.h index c4fc7c8..0d54c73 100644 --- a/src/codec/BitEncoderChannel.h +++ b/src/codec/BitEncoderChannel.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -45,7 +45,7 @@ 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); +int encodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint8_t val); /** @@ -104,7 +104,7 @@ int encodeStringValue(bitstream_t* stream, string_ucs_t* string); * Each character is represented by its UCS [ISO/IEC 10646] * code point encoded as an Unsigned Integer */ -int encodeCharacters(bitstream_t* stream, uint32_t* chars, uint16_t len); +int encodeCharacters(bitstream_t* stream, uint32_t* chars, size_t len); /** * Encode a binary value as a length-prefixed sequence of octets. diff --git a/src/codec/BitInputStream.c b/src/codec/BitInputStream.c index 08fe353..77a3e50 100644 --- a/src/codec/BitInputStream.c +++ b/src/codec/BitInputStream.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -49,7 +49,7 @@ int readBuffer(bitstream_t* stream) return errn; } -int readBits(bitstream_t* stream, uint16_t num_bits, uint32_t* b) +int readBits(bitstream_t* stream, size_t num_bits, uint8_t* b) { int errn = readBuffer(stream); if (errn < 0) { diff --git a/src/codec/BitInputStream.h b/src/codec/BitInputStream.h index d8db9ce..4076da5 100644 --- a/src/codec/BitInputStream.h +++ b/src/codec/BitInputStream.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -32,7 +32,7 @@ extern "C" { #ifndef BIT_INPUT_STREAM_H #define BIT_INPUT_STREAM_H -int readBits(bitstream_t* stream, uint16_t num_bits, uint32_t* b); +int readBits(bitstream_t* stream, size_t num_bits, uint8_t* b); int flush(); diff --git a/src/codec/BitOutputStream.c b/src/codec/BitOutputStream.c index 71e9f84..a4d43e2 100644 --- a/src/codec/BitOutputStream.c +++ b/src/codec/BitOutputStream.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -32,7 +32,7 @@ #define BIT_OUTPUT_STREAM_C /* NOTE: nbits <= 8 */ -int writeBits(bitstream_t* stream, uint16_t nbits, uint32_t val) { +int writeBits(bitstream_t* stream, size_t nbits, uint8_t val) { /* is there enough space in the buffer */ if (nbits <= stream->capacity) { /* all bits fit into the current buffer */ diff --git a/src/codec/BitOutputStream.h b/src/codec/BitOutputStream.h index 942d5c5..7aadd58 100644 --- a/src/codec/BitOutputStream.h +++ b/src/codec/BitOutputStream.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -34,7 +34,7 @@ extern "C" { #ifndef BIT_OUTPUT_STREAM_H #define BIT_OUTPUT_STREAM_H -int writeBits(bitstream_t* stream, uint16_t nbits, uint32_t bits); +int writeBits(bitstream_t* stream, size_t nbits, uint8_t bits); /* flush output */ int flush(bitstream_t* stream); diff --git a/src/codec/ByteStream.c b/src/codec/ByteStream.c index 87e611a..a2f7b79 100644 --- a/src/codec/ByteStream.c +++ b/src/codec/ByteStream.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -36,7 +36,7 @@ #ifndef BYTE_STREAM_C #define BYTE_STREAM_C -int readBytesFromFile(const char * filename, uint8_t* data, uint16_t size, uint16_t pos) { +int readBytesFromFile(const char * filename, uint8_t* data, size_t size, size_t pos) { FILE* f; int character; @@ -60,8 +60,8 @@ int readBytesFromFile(const char * filename, uint8_t* data, uint16_t size, uint1 return pos; } -int writeBytesToFile(uint8_t* data, uint16_t len, const char * filename) { - uint16_t rlen; +int writeBytesToFile(uint8_t* data, size_t len, const char * filename) { + size_t rlen; FILE* f = fopen(filename, "wb+"); if (f == NULL) { diff --git a/src/codec/ByteStream.h b/src/codec/ByteStream.h index 859dca3..90ee84e 100644 --- a/src/codec/ByteStream.h +++ b/src/codec/ByteStream.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -34,9 +34,9 @@ extern "C" { #ifndef BYTE_STREAM_H #define BYTE_STREAM_H -int writeBytesToFile(uint8_t* data, uint16_t len, const char * filename); +int writeBytesToFile(uint8_t* data, size_t len, const char * filename); -int readBytesFromFile(const char * filename, uint8_t* data, uint16_t size, uint16_t pos); +int readBytesFromFile(const char * filename, uint8_t* data, size_t size, size_t pos); #endif diff --git a/src/codec/EXICoder.c b/src/codec/EXICoder.c index 20d4672..8544771 100644 --- a/src/codec/EXICoder.c +++ b/src/codec/EXICoder.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -39,13 +39,13 @@ #include "EXICoder.h" /* - uint16_t exiGetCurrentState(struct exiState* state) { + size_t exiGetCurrentState(struct exiState* state) { return state->grammarStates[state->currentStack]; // return 0; } */ -int exiPushStack(exi_state_t* state, uint16_t newState, eqname_t* eqn) { +int exiPushStack(exi_state_t* state, size_t newState, eqname_t* eqn) { if ((state->stackIndex + 1) < EXI_ELEMENT_STACK_SIZE) { state->grammarStack[++state->stackIndex] = newState; /* copy qname */ diff --git a/src/codec/EXICoder.h b/src/codec/EXICoder.h index 3b0b731..4069e2b 100644 --- a/src/codec/EXICoder.h +++ b/src/codec/EXICoder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -37,9 +37,9 @@ extern "C" { #include "EXITypes.h" -/* uint16_t exiGetCurrentState(struct exiState* state); */ +/* size_t exiGetCurrentState(struct exiState* state); */ -int exiPushStack(exi_state_t* state, uint16_t newState, eqname_t* eqn); +int exiPushStack(exi_state_t* state, size_t newState, eqname_t* eqn); int exiPopStack(exi_state_t* state); diff --git a/src/codec/EXIDecoder.c b/src/codec/EXIDecoder.c index f72065d..3215dba 100644 --- a/src/codec/EXIDecoder.c +++ b/src/codec/EXIDecoder.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * *

NOTE: Code generated by EXIdizer v0.1

@@ -56,20 +56,22 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, /* DocEnd[END_DOCUMENT] */ *nextEvent = END_DOCUMENT; return 0; - case 88: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - case 145: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - case 157: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - case 23: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - case 198: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 225: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - case 230: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ + case 56: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 75: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ + case 83: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + case 104: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ + case 17: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ + case 136: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + case 166: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ decodeNBitUnsignedInteger(stream, 2, &state->eventCode); if (state->eventCode == 0) { *nextEvent = START_ELEMENT; @@ -83,8 +85,8 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, *nextEvent = END_ELEMENT; return 0; } - case 220: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), END_ELEMENT] */ + case 156: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), 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), END_ELEMENT] */ decodeNBitUnsignedInteger(stream, 5, &state->eventCode); if (state->eventCode == 0) { *nextEvent = START_ELEMENT; @@ -163,55 +165,15 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, return 0; } else if (state->eventCode == 19) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 20) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 21) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 22) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 23) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 24) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 25) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 26) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 27) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 28) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 29) { *nextEvent = END_ELEMENT; return 0; } - case 143: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - case 196: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 224: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 134: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 160: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ decodeNBitUnsignedInteger(stream, 2, &state->eventCode); if (state->eventCode == 0) { *nextEvent = START_ELEMENT; @@ -229,14 +191,14 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, *nextEvent = END_ELEMENT; return 0; } - case 102: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries)] */ - case 13: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 138: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff)] */ - case 27: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ + case 7: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + case 48: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + case 113: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + case 21: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ decodeNBitUnsignedInteger(stream, 1, &state->eventCode); if (state->eventCode == 0) { *nextEvent = START_ELEMENT; @@ -247,401 +209,291 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, return 0; } case 5: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 35: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked)] */ - case 36: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby)] */ - case 38: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ReadyToCharge)] */ - case 6: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 43: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 46: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FatalError)] */ - case 47: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEStandby)] */ - case 49: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked)] */ - case 50: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}PowerSwitchClosed)] */ - case 51: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}RCD)] */ - case 53: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ShutDownTime)] */ - case 55: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby)] */ - case 57: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEMalfunction)] */ - case 58: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}StopCharging)] */ - case 7: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 62: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargingMode)] */ - case 63: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EoC)] */ - case 65: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EAmount)] */ - case 66: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPower)] */ - case 68: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPhases)] */ - case 69: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxVoltage)] */ - case 71: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinVoltage)] */ - case 72: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxCurrent)] */ - case 73: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinCurrent)] */ - case 67: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Multiplier)] */ - case 75: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Unit)] */ - case 77: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Value)] */ - case 8: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 81: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 83: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxVoltage)] */ - case 84: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinVoltage)] */ - case 85: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxCurrent)] */ - case 86: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinCurrent)] */ - case 87: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPhases)] */ - case 92: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Currency)] */ - case 93: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff)] */ - case 96: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffID)] */ - case 104: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries)] */ - case 107: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry)] */ - case 109: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffStart)] */ - case 117: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffPMax)] */ - case 9: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 121: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage)] */ - case 122: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent)] */ - case 123: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDifferential)] */ - case 124: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential)] */ - case 10: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 126: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 128: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - case 129: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentCurrent)] */ - case 11: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 131: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqLockStatus)] */ - case 12: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 133: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 136: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 139: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff)] */ - case 140: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo)] */ - case 14: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 16: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 151: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID)] */ - case 153: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 155: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - case 156: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPower)] */ - case 17: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ContractID)] */ - case 18: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 162: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - case 19: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 165: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqSwitchStatus)] */ - case 20: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 168: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 21: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 171: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage)] */ - case 172: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent)] */ - case 173: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential)] */ - case 22: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 175: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 177: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ case 24: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 186: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service)] */ - case 188: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceID)] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus)] */ case 25: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList)] */ - case 26: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 205: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ case 28: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 207: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID)] */ - case 209: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 210: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - case 29: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 30: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 213: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 215: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - case 31: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Header)] */ - case 217: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Body)] */ - case 218: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}SessionInformation)] */ - case 222: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}SessionID)] */ - case 235: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Event)] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargerStandby)] */ + case 6: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ case 32: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - case 33: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - case 240: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - case 242: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + case 35: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FatalError)] */ + case 36: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby)] */ + case 38: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + case 39: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + case 40: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + case 42: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + case 46: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + case 49: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + case 50: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + case 57: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + case 61: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit)] */ + case 63: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + case 8: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 10: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 69: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 71: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + case 73: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + case 74: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower)] */ + case 11: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + case 12: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 13: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + case 82: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + case 86: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + case 87: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + case 14: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 15: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + case 91: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC)] */ + case 92: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EAmount)] */ + case 93: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPower)] */ + case 94: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases)] */ + case 95: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxVoltage)] */ + case 97: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMinVoltage)] */ + case 16: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 99: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + case 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage)] */ + case 102: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEIMax)] */ + case 103: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases)] */ + case 108: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency)] */ + case 109: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff)] */ + case 112: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */ + case 114: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + case 117: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */ + case 119: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */ + case 120: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffPMax)] */ + case 18: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 131: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + case 133: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 19: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */ + case 140: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVPubKey)] */ + case 20: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 146: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + case 22: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 148: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 150: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + case 151: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + case 23: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + case 153: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + case 154: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}SessionInformation)] */ + case 158: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */ + case 171: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Event)] */ *nextEvent = START_ELEMENT; return 0; case 3: - /* First(xsi:type)StartTag[END_ELEMENT] */ + /* FirstStartTag(xsi:type)StartTag[END_ELEMENT] */ + case 26: + /* Element[END_ELEMENT] */ + case 29: + /* Element[END_ELEMENT] */ + case 31: + /* Element[END_ELEMENT] */ case 34: /* Element[END_ELEMENT] */ - case 40: + case 44: /* Element[END_ELEMENT] */ - case 42: - /* Element[END_ELEMENT] */ - case 45: + case 52: /* Element[END_ELEMENT] */ case 60: /* Element[END_ELEMENT] */ - case 74: + case 65: /* Element[END_ELEMENT] */ - case 79: + case 67: /* Element[END_ELEMENT] */ - case 91: + case 9: + /* FirstStartTagStartTag[END_ELEMENT] */ + case 77: /* Element[END_ELEMENT] */ - case 101: + case 78: /* Element[END_ELEMENT] */ - case 106: + case 80: + /* Element[END_ELEMENT] */ + case 85: + /* Element[END_ELEMENT] */ + case 88: + /* Element[END_ELEMENT] */ + case 89: + /* Element[END_ELEMENT] */ + case 98: + /* Element[END_ELEMENT] */ + case 107: /* Element[END_ELEMENT] */ case 116: /* Element[END_ELEMENT] */ - case 120: + case 123: /* Element[END_ELEMENT] */ - case 125: + case 126: /* Element[END_ELEMENT] */ case 130: /* Element[END_ELEMENT] */ - case 132: - /* Element[END_ELEMENT] */ - case 135: + case 139: /* Element[END_ELEMENT] */ case 141: /* Element[END_ELEMENT] */ - case 148: + case 145: /* Element[END_ELEMENT] */ - case 149: + case 147: + /* Element[END_ELEMENT] */ + case 152: + /* Element[END_ELEMENT] */ + case 155: /* Element[END_ELEMENT] */ - case 15: - /* FirstStartTag[END_ELEMENT] */ case 159: /* Element[END_ELEMENT] */ - case 160: - /* Element[END_ELEMENT] */ case 164: /* Element[END_ELEMENT] */ - case 167: - /* Element[END_ELEMENT] */ case 170: /* Element[END_ELEMENT] */ + case 172: + /* Element[END_ELEMENT] */ case 174: /* Element[END_ELEMENT] */ - case 178: - /* Element[END_ELEMENT] */ - case 181: - /* Element[END_ELEMENT] */ - case 185: - /* Element[END_ELEMENT] */ - case 195: - /* Element[END_ELEMENT] */ - case 201: - /* Element[END_ELEMENT] */ - case 202: - /* Element[END_ELEMENT] */ - case 203: - /* Element[END_ELEMENT] */ - case 206: - /* Element[END_ELEMENT] */ - case 211: - /* Element[END_ELEMENT] */ - case 212: - /* Element[END_ELEMENT] */ - case 216: - /* Element[END_ELEMENT] */ - case 219: - /* Element[END_ELEMENT] */ - case 223: - /* Element[END_ELEMENT] */ - case 228: - /* Element[END_ELEMENT] */ - case 234: - /* Element[END_ELEMENT] */ - case 236: - /* Element[END_ELEMENT] */ - case 238: - /* Element[END_ELEMENT] */ - case 239: - /* Element[END_ELEMENT] */ - case 243: - /* Element[END_ELEMENT] */ *nextEvent = END_ELEMENT; return 0; + case 27: + /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ + case 30: + /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ + case 33: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ case 37: - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - case 39: - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ case 41: - /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ - case 44: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 48: - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - case 52: - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - case 54: - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - case 56: - /* FirstStartTag[CHARACTERS[INTEGER_32]] */ - case 59: - /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ - case 61: - /* First(xsi:type)StartTag[CHARACTERS[BOOLEAN]] */ + /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ + case 43: + /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ + case 45: + /* FirstStartTagStartTag[CHARACTERS[INTEGER_32]] */ + case 47: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 51: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 55: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 62: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ case 64: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 76: - /* FirstStartTag[CHARACTERS[INTEGER_16]] */ - case 78: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 80: - /* First(xsi:type)StartTag[CHARACTERS[INTEGER_32]] */ + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 66: + /* FirstStartTag(xsi:type)StartTag[CHARACTERS[INTEGER_32]] */ + case 59: + /* FirstStartTagStartTag[CHARACTERS[INTEGER_16]] */ + case 68: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ case 70: - /* FirstStartTag[CHARACTERS[INTEGER_16]] */ - case 82: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 72: + /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ + case 79: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 81: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ case 90: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 94: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 103: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 105: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 118: - /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER_32]] */ + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 96: + /* FirstStartTagStartTag[CHARACTERS[INTEGER_16]] */ + case 100: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 106: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 110: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 115: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 121: + /* FirstStartTagStartTag[CHARACTERS[UNSIGNED_INTEGER_32]] */ + case 125: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ case 127: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 134: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 129: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 135: + /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ case 137: - /* FirstStartTag[CHARACTERS[STRING]] */ + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 142: + /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ case 144: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 147: - /* FirstStartTag[CHARACTERS[INTEGER_16]] */ - case 150: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 152: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 154: - /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ - case 161: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 163: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 149: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 162: + /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ + case 165: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 167: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ case 169: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 176: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 180: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 182: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 184: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 197: - /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ - case 199: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 204: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 208: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 214: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 226: - /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ - case 229: - /* FirstStartTag[CHARACTERS[STRING]] */ - case 231: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 233: - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - case 237: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - case 241: - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + /* FirstStartTag(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 173: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ *nextEvent = CHARACTERS; return 0; - case 142: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ + case 53: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ decodeNBitUnsignedInteger(stream, 3, &state->eventCode); if (state->eventCode == 0) { *nextEvent = START_ELEMENT; @@ -663,66 +515,36 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, *nextEvent = END_ELEMENT; return 0; } - case 89: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - case 95: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 97: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 98: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 99: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 100: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 108: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 110: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 58: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 76: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ + case 84: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + case 105: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ case 111: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 112: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 113: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 114: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 115: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 119: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EPrice), END_ELEMENT] */ - case 146: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - case 158: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - case 166: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff), END_ELEMENT] */ - case 179: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - case 183: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList), END_ELEMENT] */ - case 187: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 189: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 190: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 191: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 192: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 193: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 194: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 200: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 221: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}Notification), END_ELEMENT] */ - case 227: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - case 232: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */ + case 118: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 122: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ + case 124: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ + case 128: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + case 132: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 138: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 143: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */ + case 157: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */ + case 163: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + case 168: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ decodeNBitUnsignedInteger(stream, 1, &state->eventCode); if (state->eventCode == 0) { *nextEvent = START_ELEMENT; @@ -733,7 +555,7 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, return 0; } case 1: - /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), START_ELEMENT_GENERIC] */ + /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), 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:MsgDef}V2G_Message), START_ELEMENT_GENERIC] */ decodeNBitUnsignedInteger(stream, 5, &state->eventCode); if (state->eventCode == 0) { *nextEvent = START_ELEMENT; @@ -816,46 +638,6 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, return 0; } else if (state->eventCode == 20) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 21) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 22) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 23) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 24) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 25) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 26) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 27) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 28) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 29) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 30) { *nextEvent = START_ELEMENT_GENERIC; return 0; } @@ -891,7 +673,7 @@ int exiDecodeEndDocument(bitstream_t* stream, exi_state_t* state) { } static int _exiDecodeStartElement(exi_state_t* state, eqname_t* se, - uint16_t ns, uint16_t ln, uint16_t stackId, uint16_t newState) { + unsigned int ns, unsigned int ln, size_t stackId, size_t newState) { se->namespaceURI = ns; se->localPart = ln; /* move on */ @@ -900,926 +682,644 @@ static int _exiDecodeStartElement(exi_state_t* state, eqname_t* se, 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:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), START_ELEMENT_GENERIC] */ + /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), 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:MsgDef}V2G_Message), START_ELEMENT_GENERIC] */ if (state->eventCode == 0) { return _exiDecodeStartElement(state, se, 6, 2, 2, 3); } else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 0, 2, 5); + return _exiDecodeStartElement(state, se, 4, 11, 2, 5); } else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 4, 2, 2, 6); + return _exiDecodeStartElement(state, se, 4, 13, 2, 6); } else if (state->eventCode == 3) { - return _exiDecodeStartElement(state, se, 4, 4, 2, 7); + return _exiDecodeStartElement(state, se, 4, 17, 2, 7); } else if (state->eventCode == 4) { - return _exiDecodeStartElement(state, se, 4, 6, 2, 8); + return _exiDecodeStartElement(state, se, 4, 19, 2, 8); } else if (state->eventCode == 5) { - return _exiDecodeStartElement(state, se, 4, 10, 2, 9); + return _exiDecodeStartElement(state, se, 4, 21, 2, 9); } else if (state->eventCode == 6) { - return _exiDecodeStartElement(state, se, 4, 12, 2, 10); + return _exiDecodeStartElement(state, se, 4, 23, 2, 10); } else if (state->eventCode == 7) { - return _exiDecodeStartElement(state, se, 4, 28, 2, 11); + return _exiDecodeStartElement(state, se, 4, 33, 2, 11); } else if (state->eventCode == 8) { - return _exiDecodeStartElement(state, se, 4, 30, 2, 12); + return _exiDecodeStartElement(state, se, 4, 35, 2, 12); } else if (state->eventCode == 9) { - return _exiDecodeStartElement(state, se, 4, 33, 2, 13); + return _exiDecodeStartElement(state, se, 4, 37, 2, 13); } else if (state->eventCode == 10) { - return _exiDecodeStartElement(state, se, 4, 35, 2, 14); + return _exiDecodeStartElement(state, se, 4, 39, 2, 14); } else if (state->eventCode == 11) { - return _exiDecodeStartElement(state, se, 4, 37, 2, 15); + return _exiDecodeStartElement(state, se, 4, 41, 2, 15); } else if (state->eventCode == 12) { - return _exiDecodeStartElement(state, se, 4, 39, 2, 16); + return _exiDecodeStartElement(state, se, 4, 43, 2, 16); } else if (state->eventCode == 13) { - return _exiDecodeStartElement(state, se, 4, 52, 2, 17); + return _exiDecodeStartElement(state, se, 4, 48, 2, 17); } else if (state->eventCode == 14) { - return _exiDecodeStartElement(state, se, 4, 54, 2, 18); + return _exiDecodeStartElement(state, se, 4, 50, 2, 18); } else if (state->eventCode == 15) { - return _exiDecodeStartElement(state, se, 4, 56, 2, 19); + return _exiDecodeStartElement(state, se, 4, 53, 2, 19); } else if (state->eventCode == 16) { - return _exiDecodeStartElement(state, se, 4, 58, 2, 20); + return _exiDecodeStartElement(state, se, 4, 55, 2, 20); } else if (state->eventCode == 17) { - return _exiDecodeStartElement(state, se, 4, 60, 2, 21); + return _exiDecodeStartElement(state, se, 4, 59, 2, 21); } else if (state->eventCode == 18) { - return _exiDecodeStartElement(state, se, 4, 62, 2, 22); + return _exiDecodeStartElement(state, se, 4, 61, 2, 22); } else if (state->eventCode == 19) { - return _exiDecodeStartElement(state, se, 4, 67, 2, 23); - } - else if (state->eventCode == 20) { - return _exiDecodeStartElement(state, se, 4, 69, 2, 24); - } - else if (state->eventCode == 21) { - return _exiDecodeStartElement(state, se, 4, 72, 2, 25); - } - else if (state->eventCode == 22) { - return _exiDecodeStartElement(state, se, 4, 74, 2, 26); - } - else if (state->eventCode == 23) { - return _exiDecodeStartElement(state, se, 4, 78, 2, 27); - } - else if (state->eventCode == 24) { - return _exiDecodeStartElement(state, se, 4, 80, 2, 28); - } - else if (state->eventCode == 25) { - return _exiDecodeStartElement(state, se, 4, 85, 2, 29); - } - else if (state->eventCode == 26) { - return _exiDecodeStartElement(state, se, 4, 87, 2, 30); - } - else if (state->eventCode == 27) { - return _exiDecodeStartElement(state, se, 6, 5, 2, 31); - } - else if (state->eventCode == 28) { - return _exiDecodeStartElement(state, se, 4, 90, 2, 32); - } - else if (state->eventCode == 29) { - return _exiDecodeStartElement(state, se, 4, 92, 2, 33); + return _exiDecodeStartElement(state, se, 6, 8, 2, 23); } break; case 5: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 34, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + return _exiDecodeStartElement(state, se, 4, 32, 24, 25); break; case 6: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 43, 44); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + return _exiDecodeStartElement(state, se, 4, 47, 32, 33); break; case 7: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 62, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 4, 26, 46, 47); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 4, 32, 48, 25); + } break; case 8: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 81, 82); - break; - case 9: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 121, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + return _exiDecodeStartElement(state, se, 4, 47, 67, 68); break; case 10: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 126, 127); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + return _exiDecodeStartElement(state, se, 4, 47, 69, 70); break; case 11: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 131, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + return _exiDecodeStartElement(state, se, 4, 1, 78, 79); break; case 12: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 133, 134); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + return _exiDecodeStartElement(state, se, 4, 47, 80, 81); break; case 13: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 43, 136, 137); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 50, 138, 35); - } + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + return _exiDecodeStartElement(state, se, 4, 32, 82, 25); break; case 14: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 149, 150); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + return _exiDecodeStartElement(state, se, 4, 47, 89, 90); + break; + case 15: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + return _exiDecodeStartElement(state, se, 4, 32, 91, 25); break; case 16: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 151, 152); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + return _exiDecodeStartElement(state, se, 4, 47, 99, 100); break; case 17: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ContractID)] */ - return _exiDecodeStartElement(state, se, 4, 9, 160, 161); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 4, 58, 124, 125); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 4, 57, 126, 127); + } break; case 18: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 162, 163); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + return _exiDecodeStartElement(state, se, 4, 47, 128, 129); break; case 19: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 165, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */ + return _exiDecodeStartElement(state, se, 4, 52, 140, 131); break; case 20: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 168, 169); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + return _exiDecodeStartElement(state, se, 4, 47, 143, 144); break; case 21: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 171, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 4, 26, 146, 47); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 4, 32, 147, 25); + } break; case 22: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 175, 176); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + return _exiDecodeStartElement(state, se, 4, 47, 148, 149); break; case 23: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 77, 179, 180); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 76, 181, 182); - } + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + return _exiDecodeStartElement(state, se, 6, 4, 153, 154); break; case 24: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 183, 184); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus)] */ + return _exiDecodeStartElement(state, se, 4, 45, 26, 27); break; case 25: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList)] */ - return _exiDecodeStartElement(state, se, 4, 71, 202, 186); - break; - case 26: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 203, 204); - break; - case 27: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 43, 205, 137); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 50, 206, 35); - } + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + return _exiDecodeStartElement(state, se, 5, 4, 28, 27); break; case 28: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 207, 208); - break; - case 29: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 212, 35); - break; - case 30: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 213, 214); - break; - case 31: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Header)] */ - return _exiDecodeStartElement(state, se, 6, 4, 217, 218); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargerStandby)] */ + return _exiDecodeStartElement(state, se, 5, 0, 29, 30); break; case 32: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 239, 35); - break; - case 33: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 66, 240, 241); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + return _exiDecodeStartElement(state, se, 4, 7, 34, 35); break; case 35: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked)] */ - return _exiDecodeStartElement(state, se, 5, 4, 36, 37); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FatalError)] */ + return _exiDecodeStartElement(state, se, 5, 12, 36, 37); break; case 36: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby)] */ - return _exiDecodeStartElement(state, se, 5, 0, 38, 39); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby)] */ + return _exiDecodeStartElement(state, se, 5, 7, 38, 30); break; case 38: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ReadyToCharge)] */ - return _exiDecodeStartElement(state, se, 5, 27, 40, 41); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + return _exiDecodeStartElement(state, se, 5, 4, 39, 27); break; - case 43: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 45, 46); + case 39: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + return _exiDecodeStartElement(state, se, 5, 23, 40, 41); + break; + case 40: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + return _exiDecodeStartElement(state, se, 5, 25, 42, 43); + break; + case 42: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + return _exiDecodeStartElement(state, se, 5, 36, 44, 45); break; case 46: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FatalError)] */ - return _exiDecodeStartElement(state, se, 5, 13, 47, 48); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + return _exiDecodeStartElement(state, se, 4, 32, 48, 25); break; - case 47: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEStandby)] */ - return _exiDecodeStartElement(state, se, 5, 8, 49, 39); + case 48: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 4, 63, 49, 45); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 4, 64, 50, 51); + } break; case 49: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked)] */ - return _exiDecodeStartElement(state, se, 5, 4, 50, 37); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + return _exiDecodeStartElement(state, se, 4, 64, 50, 51); break; case 50: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}PowerSwitchClosed)] */ - return _exiDecodeStartElement(state, se, 5, 24, 51, 52); - break; - case 51: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}RCD)] */ - return _exiDecodeStartElement(state, se, 5, 26, 53, 54); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + return _exiDecodeStartElement(state, se, 4, 15, 52, 53); break; case 53: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ShutDownTime)] */ - return _exiDecodeStartElement(state, se, 5, 38, 55, 56); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 16, 54, 55); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 5, 18, 56, 57); + } + else if (state->eventCode == 2) { + return _exiDecodeStartElement(state, se, 5, 19, 58, 59); + } + else if (state->eventCode == 3) { + return _exiDecodeStartElement(state, se, 5, 37, 60, 45); + } break; - case 55: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby)] */ - return _exiDecodeStartElement(state, se, 5, 0, 57, 39); + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 18, 56, 57); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 5, 19, 58, 59); + } + else if (state->eventCode == 2) { + return _exiDecodeStartElement(state, se, 5, 37, 60, 45); + } + break; + case 56: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 19, 58, 59); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 5, 37, 60, 45); + } break; case 57: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEMalfunction)] */ - return _exiDecodeStartElement(state, se, 5, 7, 58, 59); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + return _exiDecodeStartElement(state, se, 5, 20, 61, 62); break; case 58: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}StopCharging)] */ - return _exiDecodeStartElement(state, se, 5, 39, 60, 61); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 37, 60, 45); + } break; - case 62: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargingMode)] */ - return _exiDecodeStartElement(state, se, 4, 8, 63, 64); + case 61: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit)] */ + return _exiDecodeStartElement(state, se, 5, 49, 63, 64); break; case 63: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EoC)] */ - return _exiDecodeStartElement(state, se, 4, 27, 65, 56); - break; - case 65: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EAmount)] */ - return _exiDecodeStartElement(state, se, 4, 15, 66, 67); - break; - case 66: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPower)] */ - return _exiDecodeStartElement(state, se, 4, 46, 68, 67); - break; - case 67: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Multiplier)] */ - return _exiDecodeStartElement(state, se, 5, 21, 75, 76); - break; - case 68: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPhases)] */ - return _exiDecodeStartElement(state, se, 4, 45, 69, 70); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + return _exiDecodeStartElement(state, se, 5, 50, 65, 66); break; case 69: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 47, 71, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + return _exiDecodeStartElement(state, se, 4, 3, 71, 72); break; case 71: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 49, 72, 67); - break; - case 72: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 44, 73, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + return _exiDecodeStartElement(state, se, 4, 7, 73, 35); break; case 73: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 48, 74, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + return _exiDecodeStartElement(state, se, 4, 63, 74, 45); + break; + case 74: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower)] */ + return _exiDecodeStartElement(state, se, 4, 6, 75, 57); break; case 75: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Unit)] */ - return _exiDecodeStartElement(state, se, 5, 52, 77, 78); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 4, 25, 76, 57); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 4, 15, 77, 53); + } break; - case 77: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Value)] */ - return _exiDecodeStartElement(state, se, 5, 53, 79, 80); + case 76: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 4, 15, 77, 53); + } break; - case 81: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 83, 46); + case 82: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + return _exiDecodeStartElement(state, se, 4, 46, 83, 41); break; case 83: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 20, 84, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 4, 64, 84, 51); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 4, 0, 85, 86); + } break; case 84: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 22, 85, 67); - break; - case 85: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 17, 86, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 4, 0, 85, 86); + } break; case 86: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 21, 87, 67); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + return _exiDecodeStartElement(state, se, 5, 2, 87, 45); break; case 87: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPhases)] */ - return _exiDecodeStartElement(state, se, 4, 18, 88, 70); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + return _exiDecodeStartElement(state, se, 5, 1, 88, 57); break; - case 88: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 26, 89, 90); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 84, 91, 92); - } - break; - case 89: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 84, 91, 92); - } + case 91: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC)] */ + return _exiDecodeStartElement(state, se, 4, 10, 92, 45); break; case 92: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Currency)] */ - return _exiDecodeStartElement(state, se, 5, 5, 93, 94); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EAmount)] */ + return _exiDecodeStartElement(state, se, 4, 2, 93, 57); break; case 93: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff)] */ - return _exiDecodeStartElement(state, se, 5, 41, 95, 96); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPower)] */ + return _exiDecodeStartElement(state, se, 4, 28, 94, 57); + break; + case 94: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases)] */ + return _exiDecodeStartElement(state, se, 4, 27, 95, 96); break; case 95: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 41, 97, 96); - } - break; - case 96: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffID)] */ - return _exiDecodeStartElement(state, se, 5, 48, 102, 103); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxVoltage)] */ + return _exiDecodeStartElement(state, se, 4, 29, 97, 57); break; case 97: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 41, 98, 96); - } - break; - case 98: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 41, 99, 96); - } + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMinVoltage)] */ + return _exiDecodeStartElement(state, se, 4, 30, 98, 57); break; case 99: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 41, 100, 96); - } + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + return _exiDecodeStartElement(state, se, 4, 7, 101, 35); break; - case 100: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 41, 101, 96); - } + case 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage)] */ + return _exiDecodeStartElement(state, se, 4, 8, 102, 57); break; case 102: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries)] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 43, 104, 105); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 44, 106, 107); - } + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEIMax)] */ + return _exiDecodeStartElement(state, se, 4, 4, 103, 57); + break; + case 103: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases)] */ + return _exiDecodeStartElement(state, se, 4, 5, 104, 96); break; case 104: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries)] */ - return _exiDecodeStartElement(state, se, 5, 44, 106, 107); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 4, 9, 105, 106); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 4, 65, 107, 108); + } break; - case 107: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry)] */ - return _exiDecodeStartElement(state, se, 5, 46, 108, 109); + case 105: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 4, 65, 107, 108); + } break; case 108: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 110, 109); - } + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency)] */ + return _exiDecodeStartElement(state, se, 5, 5, 109, 110); break; case 109: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffStart)] */ - return _exiDecodeStartElement(state, se, 5, 50, 117, 118); - break; - case 110: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 111, 109); - } + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff)] */ + return _exiDecodeStartElement(state, se, 5, 38, 111, 112); break; case 111: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 112, 109); + return _exiDecodeStartElement(state, se, 5, 38, 111, 112); } break; case 112: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 113, 109); - } + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */ + return _exiDecodeStartElement(state, se, 5, 45, 113, 51); break; case 113: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 114, 109); + return _exiDecodeStartElement(state, se, 5, 40, 114, 115); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 5, 41, 116, 117); } break; case 114: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 115, 109); - } - break; - case 115: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 46, 116, 109); - } + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + return _exiDecodeStartElement(state, se, 5, 41, 116, 117); break; case 117: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffPMax)] */ - return _exiDecodeStartElement(state, se, 5, 49, 119, 67); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */ + return _exiDecodeStartElement(state, se, 5, 43, 118, 119); + break; + case 118: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 43, 118, 119); + } break; case 119: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EPrice), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 6, 120, 67); - } + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */ + return _exiDecodeStartElement(state, se, 5, 47, 120, 121); break; - case 121: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 51, 122, 67); + case 120: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffPMax)] */ + return _exiDecodeStartElement(state, se, 5, 46, 122, 57); break; case 122: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 42, 123, 67); - break; - case 123: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDifferential)] */ - return _exiDecodeStartElement(state, se, 4, 14, 124, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 6, 123, 57); + } break; case 124: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential)] */ - return _exiDecodeStartElement(state, se, 4, 89, 125, 67); - break; - case 126: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 128, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 4, 57, 126, 127); + } break; case 128: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 24, 129, 67); - break; - case 129: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 23, 130, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 4, 52, 130, 131); + } break; case 131: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqLockStatus)] */ - return _exiDecodeStartElement(state, se, 4, 64, 132, 37); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + return _exiDecodeStartElement(state, se, 5, 26, 132, 133); + break; + case 132: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 26, 132, 133); + } break; case 133: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 135, 46); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + return _exiDecodeStartElement(state, se, 5, 28, 134, 135); + break; + case 134: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 30, 136, 137); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 5, 33, 138, 125); + } + else if (state->eventCode == 2) { + return _exiDecodeStartElement(state, se, 5, 31, 139, 127); + } break; case 136: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 138, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 33, 138, 125); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 5, 31, 139, 127); + } break; case 138: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff)] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 82, 139, 56); + return _exiDecodeStartElement(state, se, 5, 31, 139, 127); } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 83, 140, 103); - } - break; - case 139: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff)] */ - return _exiDecodeStartElement(state, se, 4, 83, 140, 103); break; case 140: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo)] */ - return _exiDecodeStartElement(state, se, 4, 32, 141, 142); - break; - case 142: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 17, 143, 144); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 19, 145, 67); - } - else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 5, 20, 146, 147); - } - else if (state->eventCode == 3) { - return _exiDecodeStartElement(state, se, 5, 40, 148, 56); - } + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVPubKey)] */ + return _exiDecodeStartElement(state, se, 4, 31, 141, 142); break; case 143: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 19, 145, 67); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 20, 146, 147); - } - else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 5, 40, 148, 56); - } - break; - case 145: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 20, 146, 147); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 40, 148, 56); + return _exiDecodeStartElement(state, se, 4, 16, 145, 142); } break; case 146: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 40, 148, 56); - } + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + return _exiDecodeStartElement(state, se, 4, 32, 147, 25); + break; + case 148: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + return _exiDecodeStartElement(state, se, 4, 3, 150, 72); + break; + case 150: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + return _exiDecodeStartElement(state, se, 4, 7, 151, 35); break; case 151: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID)] */ - return _exiDecodeStartElement(state, se, 4, 16, 153, 154); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + return _exiDecodeStartElement(state, se, 4, 63, 152, 45); break; case 153: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 155, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + return _exiDecodeStartElement(state, se, 6, 0, 155, 156); break; - case 155: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 82, 156, 56); + case 154: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}SessionInformation)] */ + return _exiDecodeStartElement(state, se, 6, 7, 157, 158); break; case 156: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPower)] */ - return _exiDecodeStartElement(state, se, 4, 19, 157, 67); - break; - case 157: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), 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), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 41, 158, 67); + return _exiDecodeStartElement(state, se, 6, 2, 174, 3); } else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 32, 159, 142); + return _exiDecodeStartElement(state, se, 4, 11, 174, 5); + } + else if (state->eventCode == 2) { + return _exiDecodeStartElement(state, se, 4, 13, 174, 6); + } + else if (state->eventCode == 3) { + return _exiDecodeStartElement(state, se, 4, 17, 174, 7); + } + else if (state->eventCode == 4) { + return _exiDecodeStartElement(state, se, 4, 19, 174, 8); + } + else if (state->eventCode == 5) { + return _exiDecodeStartElement(state, se, 4, 21, 174, 9); + } + else if (state->eventCode == 6) { + return _exiDecodeStartElement(state, se, 4, 23, 174, 10); + } + else if (state->eventCode == 7) { + return _exiDecodeStartElement(state, se, 4, 33, 174, 11); + } + else if (state->eventCode == 8) { + return _exiDecodeStartElement(state, se, 4, 35, 174, 12); + } + else if (state->eventCode == 9) { + return _exiDecodeStartElement(state, se, 4, 37, 174, 13); + } + else if (state->eventCode == 10) { + return _exiDecodeStartElement(state, se, 4, 39, 174, 14); + } + else if (state->eventCode == 11) { + return _exiDecodeStartElement(state, se, 4, 41, 174, 15); + } + else if (state->eventCode == 12) { + return _exiDecodeStartElement(state, se, 4, 43, 174, 16); + } + else if (state->eventCode == 13) { + return _exiDecodeStartElement(state, se, 4, 48, 174, 17); + } + else if (state->eventCode == 14) { + return _exiDecodeStartElement(state, se, 4, 50, 174, 18); + } + else if (state->eventCode == 15) { + return _exiDecodeStartElement(state, se, 4, 53, 174, 19); + } + else if (state->eventCode == 16) { + return _exiDecodeStartElement(state, se, 4, 55, 174, 20); + } + else if (state->eventCode == 17) { + return _exiDecodeStartElement(state, se, 4, 59, 174, 21); + } + else if (state->eventCode == 18) { + return _exiDecodeStartElement(state, se, 4, 61, 174, 22); + } + break; + case 157: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 6, 6, 159, 160); } break; case 158: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */ + return _exiDecodeStartElement(state, se, 5, 34, 161, 162); + break; + case 160: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 32, 159, 142); + return _exiDecodeStartElement(state, se, 5, 13, 166, 167); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 5, 14, 168, 169); + } + else if (state->eventCode == 2) { + return _exiDecodeStartElement(state, se, 5, 10, 170, 171); } break; - case 162: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 82, 164, 56); + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 32, 163, 162); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 5, 24, 164, 165); + } break; - case 165: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqSwitchStatus)] */ - return _exiDecodeStartElement(state, se, 4, 65, 166, 52); + case 163: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 24, 164, 165); + } break; case 166: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff), END_ELEMENT] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 83, 167, 103); + return _exiDecodeStartElement(state, se, 5, 14, 168, 169); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 5, 10, 170, 171); } break; case 168: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 170, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 10, 170, 171); + } break; case 171: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 51, 172, 67); - break; - case 172: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 42, 173, 67); - break; - case 173: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential)] */ - return _exiDecodeStartElement(state, se, 4, 89, 174, 67); - break; - case 175: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 177, 46); - break; - case 177: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 24, 178, 67); - break; - case 179: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 76, 181, 182); - } - break; - case 183: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 71, 185, 186); - } - break; - case 186: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service)] */ - return _exiDecodeStartElement(state, se, 5, 28, 187, 188); - break; - case 187: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 189, 188); - } - break; - case 188: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceID)] */ - return _exiDecodeStartElement(state, se, 5, 30, 196, 197); - break; - case 189: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 190, 188); - } - break; - case 190: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 191, 188); - } - break; - case 191: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 192, 188); - } - break; - case 192: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 193, 188); - } - break; - case 193: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 194, 188); - } - break; - case 194: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 28, 195, 188); - } - break; - case 196: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 32, 198, 199); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 35, 200, 180); - } - else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 5, 33, 201, 182); - } - break; - case 198: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 35, 200, 180); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 33, 201, 182); - } - break; - case 200: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 33, 201, 182); - } - break; - case 205: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 50, 206, 35); - break; - case 207: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID)] */ - return _exiDecodeStartElement(state, se, 4, 16, 209, 154); - break; - case 209: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 210, 46); - break; - case 210: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 82, 211, 56); - break; - case 213: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 215, 46); - break; - case 215: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 24, 216, 67); - break; - case 217: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Body)] */ - return _exiDecodeStartElement(state, se, 6, 0, 219, 220); - break; - case 218: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}SessionInformation)] */ - return _exiDecodeStartElement(state, se, 7, 2, 221, 222); - break; - case 220: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 6, 2, 238, 3); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 0, 238, 5); - } - else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 4, 2, 238, 6); - } - else if (state->eventCode == 3) { - return _exiDecodeStartElement(state, se, 4, 4, 238, 7); - } - else if (state->eventCode == 4) { - return _exiDecodeStartElement(state, se, 4, 6, 238, 8); - } - else if (state->eventCode == 5) { - return _exiDecodeStartElement(state, se, 4, 10, 238, 9); - } - else if (state->eventCode == 6) { - return _exiDecodeStartElement(state, se, 4, 12, 238, 10); - } - else if (state->eventCode == 7) { - return _exiDecodeStartElement(state, se, 4, 28, 238, 11); - } - else if (state->eventCode == 8) { - return _exiDecodeStartElement(state, se, 4, 30, 238, 12); - } - else if (state->eventCode == 9) { - return _exiDecodeStartElement(state, se, 4, 33, 238, 13); - } - else if (state->eventCode == 10) { - return _exiDecodeStartElement(state, se, 4, 35, 238, 14); - } - else if (state->eventCode == 11) { - return _exiDecodeStartElement(state, se, 4, 37, 238, 15); - } - else if (state->eventCode == 12) { - return _exiDecodeStartElement(state, se, 4, 39, 238, 16); - } - else if (state->eventCode == 13) { - return _exiDecodeStartElement(state, se, 4, 52, 238, 17); - } - else if (state->eventCode == 14) { - return _exiDecodeStartElement(state, se, 4, 54, 238, 18); - } - else if (state->eventCode == 15) { - return _exiDecodeStartElement(state, se, 4, 56, 238, 19); - } - else if (state->eventCode == 16) { - return _exiDecodeStartElement(state, se, 4, 58, 238, 20); - } - else if (state->eventCode == 17) { - return _exiDecodeStartElement(state, se, 4, 60, 238, 21); - } - else if (state->eventCode == 18) { - return _exiDecodeStartElement(state, se, 4, 62, 238, 22); - } - else if (state->eventCode == 19) { - return _exiDecodeStartElement(state, se, 4, 67, 238, 23); - } - else if (state->eventCode == 20) { - return _exiDecodeStartElement(state, se, 4, 69, 238, 24); - } - else if (state->eventCode == 21) { - return _exiDecodeStartElement(state, se, 4, 72, 238, 25); - } - else if (state->eventCode == 22) { - return _exiDecodeStartElement(state, se, 4, 74, 238, 26); - } - else if (state->eventCode == 23) { - return _exiDecodeStartElement(state, se, 4, 78, 238, 27); - } - else if (state->eventCode == 24) { - return _exiDecodeStartElement(state, se, 4, 80, 238, 28); - } - else if (state->eventCode == 25) { - return _exiDecodeStartElement(state, se, 4, 85, 238, 29); - } - else if (state->eventCode == 26) { - return _exiDecodeStartElement(state, se, 4, 87, 238, 30); - } - else if (state->eventCode == 27) { - return _exiDecodeStartElement(state, se, 4, 90, 238, 32); - } - else if (state->eventCode == 28) { - return _exiDecodeStartElement(state, se, 4, 92, 238, 33); - } - break; - case 221: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}Notification), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 7, 1, 223, 224); - } - break; - case 222: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}SessionID)] */ - return _exiDecodeStartElement(state, se, 5, 36, 225, 226); - break; - case 224: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 14, 230, 231); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 15, 232, 233); - } - else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 5, 11, 234, 235); - } - break; - case 225: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 34, 227, 226); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 25, 228, 229); - } - break; - case 227: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 25, 228, 229); - } - break; - case 230: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 15, 232, 233); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 11, 234, 235); - } - break; - case 232: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 11, 234, 235); - } - break; - case 235: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Event)] */ - return _exiDecodeStartElement(state, se, 5, 10, 236, 237); - break; - case 240: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 25, 242, 46); - break; - case 242: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 24, 243, 67); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Event)] */ + return _exiDecodeStartElement(state, se, 5, 9, 172, 173); break; default: @@ -1829,17 +1329,6 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state, return -1; } -int exiDecodeStartElementGeneric(bitstream_t* stream, exi_state_t* state, - eqname_t* se) { - switch (state->grammarStack[state->stackIndex]) { -/* $EXI_DECODE_START_ELEMENT_GENERIC$ */ - default: - return -1; - } - - return -1; -} - int exiDecodeEndElement(bitstream_t* stream, exi_state_t* state, eqname_t* ee) { /* pop item and update ahead of time element qname */ @@ -1850,173 +1339,154 @@ int exiDecodeEndElement(bitstream_t* stream, exi_state_t* state, int exiDecodeCharacters(bitstream_t* stream, exi_state_t* state, exi_value_t* val) { - uint32_t xsi; - uint32_t bits; + uint8_t xsi; switch (state->grammarStack[state->stackIndex]) { - case 103: - /* CHARACTERS[ENUMERATION] */ - case 169: - /* CHARACTERS[ENUMERATION] */ - case 184: - /* CHARACTERS[ENUMERATION] */ - case 208: - /* CHARACTERS[ENUMERATION] */ - case 237: + case 62: /* CHARACTERS[ENUMERATION] */ val->type = ENUMERATION; - decodeNBitUnsignedInteger(stream, 3, &val->enumeration); + decodeNBitUnsignedInteger(stream, 4, &val->enumeration); /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 31; return 0; - case 44: - /* CHARACTERS[ENUMERATION] */ - case 64: - /* CHARACTERS[ENUMERATION] */ + case 27: + /* CHARACTERS[BOOLEAN] */ + case 30: + /* CHARACTERS[BOOLEAN] */ + case 37: + /* CHARACTERS[BOOLEAN] */ + case 41: + /* CHARACTERS[BOOLEAN] */ + case 43: + /* CHARACTERS[BOOLEAN] */ + val->type = BOOLEAN; + decodeBoolean(stream, &val->boolean); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + case 47: + /* CHARACTERS[STRING] */ + case 55: + /* CHARACTERS[STRING] */ + case 79: + /* CHARACTERS[STRING] */ + case 106: + /* CHARACTERS[STRING] */ + case 110: + /* CHARACTERS[STRING] */ + case 115: + /* CHARACTERS[STRING] */ case 127: + /* CHARACTERS[STRING] */ + case 137: + /* CHARACTERS[STRING] */ + case 165: + /* CHARACTERS[STRING] */ + val->type = STRING; + decodeStringValue(stream, &val->string); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + case 68: /* CHARACTERS[ENUMERATION] */ - case 150: + case 70: /* CHARACTERS[ENUMERATION] */ - case 152: - /* CHARACTERS[ENUMERATION] */ - case 176: - /* CHARACTERS[ENUMERATION] */ - case 214: - /* CHARACTERS[ENUMERATION] */ - case 241: + case 100: /* CHARACTERS[ENUMERATION] */ val->type = ENUMERATION; decodeNBitUnsignedInteger(stream, 1, &val->enumeration); /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 31; return 0; - case 80: - /* CHARACTERS[INTEGER_32] */ - /* xsi:type OR xsi:nil */ - decodeNBitUnsignedInteger(stream, 1, &xsi); - val->type = INTEGER_32; - decodeInteger32(stream, &val->int32); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 82: + case 33: /* CHARACTERS[ENUMERATION] */ - case 134: + case 81: /* CHARACTERS[ENUMERATION] */ - case 163: + case 125: /* CHARACTERS[ENUMERATION] */ - case 180: + case 144: /* CHARACTERS[ENUMERATION] */ - case 204: - /* CHARACTERS[ENUMERATION] */ - case 231: + case 167: /* CHARACTERS[ENUMERATION] */ val->type = ENUMERATION; decodeNBitUnsignedInteger(stream, 2, &val->enumeration); /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 31; return 0; - case 90: - /* CHARACTERS[STRING] */ - case 94: - /* CHARACTERS[STRING] */ - case 105: - /* CHARACTERS[STRING] */ - case 137: - /* CHARACTERS[STRING] */ - case 144: - /* CHARACTERS[STRING] */ - case 161: - /* CHARACTERS[STRING] */ - case 182: - /* CHARACTERS[STRING] */ - case 199: - /* CHARACTERS[STRING] */ - case 229: - /* CHARACTERS[STRING] */ - val->type = STRING; - decodeStringValue(stream, &val->string); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 76: - /* CHARACTERS[INTEGER_16] */ - case 70: - /* CHARACTERS[INTEGER_16] */ - case 147: - /* CHARACTERS[INTEGER_16] */ - val->type = INTEGER_16; - decodeInteger32(stream, &val->int32); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 78: - /* CHARACTERS[ENUMERATION] */ - val->type = ENUMERATION; - decodeNBitUnsignedInteger(stream, 5, &val->enumeration); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 118: - /* CHARACTERS[UNSIGNED_INTEGER_32] */ - val->type = UNSIGNED_INTEGER_32; - decodeUnsignedInteger32(stream, &val->uint32); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 37: - /* CHARACTERS[BOOLEAN] */ - case 39: - /* CHARACTERS[BOOLEAN] */ - case 48: - /* CHARACTERS[BOOLEAN] */ - case 52: - /* CHARACTERS[BOOLEAN] */ - case 54: - /* CHARACTERS[BOOLEAN] */ - val->type = BOOLEAN; - decodeBoolean(stream, &val->boolean); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 41: - /* CHARACTERS[BOOLEAN] */ - case 59: - /* CHARACTERS[BOOLEAN] */ - case 61: - /* CHARACTERS[BOOLEAN] */ - /* xsi:type OR xsi:nil */ - decodeNBitUnsignedInteger(stream, 1, &xsi); - val->type = BOOLEAN; - decodeBoolean(stream, &val->boolean); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 56: - /* CHARACTERS[INTEGER_32] */ - val->type = INTEGER_32; - decodeInteger32(stream, &val->int32); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 233: - /* CHARACTERS[STRING] */ - /* xsi:type OR xsi:nil */ - decodeNBitUnsignedInteger(stream, 1, &xsi); - val->type = STRING; - decodeStringValue(stream, &val->string); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - case 154: + case 72: /* CHARACTERS[BINARY_HEX] */ - case 197: + case 135: /* CHARACTERS[BINARY_HEX] */ - case 226: + case 142: + /* CHARACTERS[BINARY_HEX] */ + case 162: /* CHARACTERS[BINARY_HEX] */ val->type = BINARY_HEX; decodeBinary(stream, &val->binary); /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 31; + return 0; + case 169: + /* CHARACTERS[STRING] */ + /* xsi:type OR xsi:nil */ + decodeNBitUnsignedInteger(stream, 1, &xsi); + val->type = STRING; + decodeStringValue(stream, &val->string); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + case 66: + /* CHARACTERS[INTEGER_32] */ + /* xsi:type OR xsi:nil */ + decodeNBitUnsignedInteger(stream, 1, &xsi); + val->type = INTEGER_32; + decodeInteger32(stream, &val->int32); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + case 51: + /* CHARACTERS[ENUMERATION] */ + case 90: + /* CHARACTERS[ENUMERATION] */ + case 129: + /* CHARACTERS[ENUMERATION] */ + case 149: + /* CHARACTERS[ENUMERATION] */ + case 173: + /* CHARACTERS[ENUMERATION] */ + val->type = ENUMERATION; + decodeNBitUnsignedInteger(stream, 3, &val->enumeration); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + case 59: + /* CHARACTERS[INTEGER_16] */ + case 96: + /* CHARACTERS[INTEGER_16] */ + val->type = INTEGER_16; + decodeInteger32(stream, &val->int32); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + case 45: + /* CHARACTERS[INTEGER_32] */ + val->type = INTEGER_32; + decodeInteger32(stream, &val->int32); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + case 64: + /* CHARACTERS[ENUMERATION] */ + val->type = ENUMERATION; + decodeNBitUnsignedInteger(stream, 5, &val->enumeration); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + case 121: + /* CHARACTERS[UNSIGNED_INTEGER_32] */ + val->type = UNSIGNED_INTEGER_32; + decodeUnsignedInteger32(stream, &val->uint32); + /* move on */ + state->grammarStack[state->stackIndex] = 31; return 0; default: diff --git a/src/codec/EXIDecoder.h b/src/codec/EXIDecoder.h index 91e650e..f0c1e53 100644 --- a/src/codec/EXIDecoder.h +++ b/src/codec/EXIDecoder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -44,9 +44,6 @@ 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, - eqname_t* se); - int exiDecodeEndElement(bitstream_t* stream, exi_state_t* state, eqname_t* ee); diff --git a/src/codec/EXIEncoder.c b/src/codec/EXIEncoder.c index 12222e5..a88d1f6 100644 --- a/src/codec/EXIEncoder.c +++ b/src/codec/EXIEncoder.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * *

NOTE: Code generated by EXIdizer v0.1

@@ -68,12 +68,9 @@ int exiEncodeEndDocument(bitstream_t* stream, exi_state_t* state) { return -1; } -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) { - int errn = encodeNBitUnsignedInteger(stream, nbits, val); - if (errn) { - return errn; - } +static int _exiEncodeStartElement(bitstream_t* stream, size_t nbits, uint8_t val, + exi_state_t* state, eqname_t* se, size_t stackId, size_t newState) { + encodeNBitUnsignedInteger(stream, nbits, val); /* move on */ state->grammarStack[state->stackIndex] = stackId; /* push element on stack */ @@ -84,1347 +81,928 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state, eqname_t* se) { switch (state->grammarStack[state->stackIndex]) { case 1: - /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), START_ELEMENT_GENERIC] */ + /* DocContent[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), 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:MsgDef}V2G_Message), START_ELEMENT_GENERIC] */ if ( se->localPart == 2 && se->namespaceURI == 6 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement) */ + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement) */ return _exiEncodeStartElement(stream, 5, 0, state, se, 2, 3); } - else if ( se->localPart == 0 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq) */ + else if ( se->localPart == 11 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq) */ return _exiEncodeStartElement(stream, 5, 1, state, se, 2, 5); } - else if ( se->localPart == 2 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes) */ + else if ( se->localPart == 13 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes) */ return _exiEncodeStartElement(stream, 5, 2, state, se, 2, 6); } - else if ( se->localPart == 4 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq) */ + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq) */ return _exiEncodeStartElement(stream, 5, 3, state, se, 2, 7); } - else if ( se->localPart == 6 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes) */ + else if ( se->localPart == 19 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes) */ return _exiEncodeStartElement(stream, 5, 4, state, se, 2, 8); } - else if ( se->localPart == 10 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq) */ + else if ( se->localPart == 21 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq) */ return _exiEncodeStartElement(stream, 5, 5, state, se, 2, 9); } - else if ( se->localPart == 12 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes) */ + else if ( se->localPart == 23 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes) */ return _exiEncodeStartElement(stream, 5, 6, state, se, 2, 10); } - else if ( se->localPart == 28 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq) */ + else if ( se->localPart == 33 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq) */ return _exiEncodeStartElement(stream, 5, 7, state, se, 2, 11); } - else if ( se->localPart == 30 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes) */ + else if ( se->localPart == 35 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes) */ return _exiEncodeStartElement(stream, 5, 8, state, se, 2, 12); } - else if ( se->localPart == 33 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq) */ + else if ( se->localPart == 37 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq) */ return _exiEncodeStartElement(stream, 5, 9, state, se, 2, 13); } - else if ( se->localPart == 35 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes) */ + else if ( se->localPart == 39 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes) */ return _exiEncodeStartElement(stream, 5, 10, state, se, 2, 14); } - else if ( se->localPart == 37 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq) */ + else if ( se->localPart == 41 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq) */ return _exiEncodeStartElement(stream, 5, 11, state, se, 2, 15); } - else if ( se->localPart == 39 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes) */ + else if ( se->localPart == 43 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes) */ return _exiEncodeStartElement(stream, 5, 12, state, se, 2, 16); } - else if ( se->localPart == 52 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq) */ + else if ( se->localPart == 48 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq) */ return _exiEncodeStartElement(stream, 5, 13, state, se, 2, 17); } - else if ( se->localPart == 54 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes) */ + else if ( se->localPart == 50 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes) */ return _exiEncodeStartElement(stream, 5, 14, state, se, 2, 18); } - else if ( se->localPart == 56 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq) */ + else if ( se->localPart == 53 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq) */ return _exiEncodeStartElement(stream, 5, 15, state, se, 2, 19); } - else if ( se->localPart == 58 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes) */ + else if ( se->localPart == 55 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes) */ return _exiEncodeStartElement(stream, 5, 16, state, se, 2, 20); } - else if ( se->localPart == 60 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq) */ + else if ( se->localPart == 59 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq) */ return _exiEncodeStartElement(stream, 5, 17, state, se, 2, 21); } - else if ( se->localPart == 62 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes) */ + else if ( se->localPart == 61 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes) */ return _exiEncodeStartElement(stream, 5, 18, state, se, 2, 22); } - else if ( se->localPart == 67 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq) */ + else if ( se->localPart == 8 && se->namespaceURI == 6 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}V2G_Message) */ return _exiEncodeStartElement(stream, 5, 19, state, se, 2, 23); } - else if ( se->localPart == 69 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes) */ - return _exiEncodeStartElement(stream, 5, 20, state, se, 2, 24); - } - else if ( se->localPart == 72 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq) */ - return _exiEncodeStartElement(stream, 5, 21, state, se, 2, 25); - } - else if ( se->localPart == 74 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes) */ - return _exiEncodeStartElement(stream, 5, 22, state, se, 2, 26); - } - else if ( se->localPart == 78 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq) */ - return _exiEncodeStartElement(stream, 5, 23, state, se, 2, 27); - } - else if ( se->localPart == 80 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes) */ - return _exiEncodeStartElement(stream, 5, 24, state, se, 2, 28); - } - else if ( se->localPart == 85 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq) */ - return _exiEncodeStartElement(stream, 5, 25, state, se, 2, 29); - } - else if ( se->localPart == 87 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes) */ - return _exiEncodeStartElement(stream, 5, 26, state, se, 2, 30); - } - else if ( se->localPart == 5 && se->namespaceURI == 6 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}V2G_Message) */ - return _exiEncodeStartElement(stream, 5, 27, state, se, 2, 31); - } - else if ( se->localPart == 90 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq) */ - return _exiEncodeStartElement(stream, 5, 28, state, se, 2, 32); - } - else if ( se->localPart == 92 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes) */ - return _exiEncodeStartElement(stream, 5, 29, state, se, 2, 33); - } break; case 5: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 34, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 24, 25); } break; case 6: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 43, 44); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 32, 33); } break; case 7: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 62, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 46, 47); + } + else if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 48, 25); } break; case 8: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 81, 82); - } - break; - case 9: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 121, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 67, 68); } break; case 10: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 126, 127); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 69, 70); } break; case 11: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 131, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( se->localPart == 1 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 78, 79); } break; case 12: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 133, 134); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 80, 81); } break; case 13: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 43 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 136, 137); - } - else if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 1, 1, state, se, 138, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 82, 25); } break; case 14: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 149, 150); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 89, 90); + } + break; + case 15: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 91, 25); } break; case 16: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 151, 152); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 99, 100); } break; case 17: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ContractID)] */ - if ( se->localPart == 9 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ContractID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 160, 161); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ + if ( se->localPart == 58 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 124, 125); + } + else if ( se->localPart == 57 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 126, 127); } break; case 18: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 162, 163); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 128, 129); } break; case 19: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 165, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */ + if ( se->localPart == 52 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 140, 131); } break; case 20: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 168, 169); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 143, 144); } break; case 21: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 171, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + if ( se->localPart == 26 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 146, 47); + } + else if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 147, 25); } break; case 22: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 175, 176); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( se->localPart == 47 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 148, 149); } break; case 23: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - if ( se->localPart == 77 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceType) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 179, 180); - } - else if ( se->localPart == 76 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 181, 182); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + if ( se->localPart == 4 && se->namespaceURI == 6 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 153, 154); } break; case 24: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 183, 184); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus)] */ + if ( se->localPart == 45 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 26, 27); } break; case 25: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList)] */ - if ( se->localPart == 71 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 202, 186); - } - break; - case 26: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 203, 204); - } - break; - case 27: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 43 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVID) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 205, 137); - } - else if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 1, 1, state, se, 206, 35); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + if ( se->localPart == 4 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 28, 27); } break; case 28: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 207, 208); - } - break; - case 29: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 212, 35); - } - break; - case 30: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 213, 214); - } - break; - case 31: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Header)] */ - if ( se->localPart == 4 && se->namespaceURI == 6 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Header) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 217, 218); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargerStandby)] */ + if ( se->localPart == 0 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargerStandby) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 29, 30); } break; case 32: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 239, 35); - } - break; - case 33: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode)] */ - if ( se->localPart == 66 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ResponseCode) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 240, 241); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + if ( se->localPart == 7 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 34, 35); } break; case 35: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked)] */ - if ( se->localPart == 4 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked) */ + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FatalError)] */ + if ( se->localPart == 12 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FatalError) */ return _exiEncodeStartElement(stream, 0, 0, state, se, 36, 37); } break; case 36: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby)] */ - if ( se->localPart == 0 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 38, 39); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby)] */ + if ( se->localPart == 7 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 38, 30); } break; case 38: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ReadyToCharge)] */ - if ( se->localPart == 27 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ReadyToCharge) */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + if ( se->localPart == 4 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 39, 27); + } + break; + case 39: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + if ( se->localPart == 23 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed) */ return _exiEncodeStartElement(stream, 0, 0, state, se, 40, 41); } break; - case 43: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 45, 46); + case 40: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + if ( se->localPart == 25 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 42, 43); + } + break; + case 42: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + if ( se->localPart == 36 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 44, 45); } break; case 46: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FatalError)] */ - if ( se->localPart == 13 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FatalError) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 47, 48); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 48, 25); } break; - case 47: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEStandby)] */ - if ( se->localPart == 8 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEStandby) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 49, 39); + case 48: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + if ( se->localPart == 63 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 49, 45); + } + else if ( se->localPart == 64 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 50, 51); } break; case 49: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked)] */ - if ( se->localPart == 4 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ConnectorLocked) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 50, 37); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + if ( se->localPart == 64 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 50, 51); } break; case 50: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}PowerSwitchClosed)] */ - if ( se->localPart == 24 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}PowerSwitchClosed) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 51, 52); - } - break; - case 51: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}RCD)] */ - if ( se->localPart == 26 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}RCD) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 53, 54); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + if ( se->localPart == 15 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 52, 53); } break; case 53: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ShutDownTime)] */ - if ( se->localPart == 38 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ShutDownTime) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 55, 56); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( se->localPart == 16 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID) */ + return _exiEncodeStartElement(stream, 3, 0, state, se, 54, 55); + } + else if ( se->localPart == 18 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading) */ + return _exiEncodeStartElement(stream, 3, 1, state, se, 56, 57); + } + else if ( se->localPart == 19 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */ + return _exiEncodeStartElement(stream, 3, 2, state, se, 58, 59); + } + else if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */ + return _exiEncodeStartElement(stream, 3, 3, state, se, 60, 45); } break; - case 55: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby)] */ - if ( se->localPart == 0 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ChargerStandby) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 57, 39); + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( se->localPart == 18 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 56, 57); + } + else if ( se->localPart == 19 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 58, 59); + } + else if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 60, 45); + } + break; + case 56: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( se->localPart == 19 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 58, 59); + } + else if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 60, 45); } break; case 57: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEMalfunction)] */ - if ( se->localPart == 7 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EVSEMalfunction) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 58, 59); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + if ( se->localPart == 20 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 61, 62); } break; case 58: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}StopCharging)] */ - if ( se->localPart == 39 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}StopCharging) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 60, 61); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( se->localPart == 37 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 60, 45); } break; - case 62: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargingMode)] */ - if ( se->localPart == 8 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargingMode) */ + case 61: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit)] */ + if ( se->localPart == 49 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit) */ return _exiEncodeStartElement(stream, 0, 0, state, se, 63, 64); } break; case 63: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EoC)] */ - if ( se->localPart == 27 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EoC) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 65, 56); - } - break; - case 65: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EAmount)] */ - if ( se->localPart == 15 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EAmount) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 66, 67); - } - break; - case 66: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPower)] */ - if ( se->localPart == 46 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPower) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 68, 67); - } - break; - case 67: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Multiplier)] */ - if ( se->localPart == 21 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Multiplier) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 75, 76); - } - break; - case 68: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPhases)] */ - if ( se->localPart == 45 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxPhases) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 69, 70); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + if ( se->localPart == 50 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 65, 66); } break; case 69: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxVoltage)] */ - if ( se->localPart == 47 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 71, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + if ( se->localPart == 3 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 71, 72); } break; case 71: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinVoltage)] */ - if ( se->localPart == 49 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 72, 67); - } - break; - case 72: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxCurrent)] */ - if ( se->localPart == 44 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMaxCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 73, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + if ( se->localPart == 7 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 73, 35); } break; case 73: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinCurrent)] */ - if ( se->localPart == 48 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVMinCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 74, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + if ( se->localPart == 63 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 74, 45); + } + break; + case 74: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower)] */ + if ( se->localPart == 6 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 75, 57); } break; case 75: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Unit)] */ - if ( se->localPart == 52 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Unit) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 77, 78); - } - break; - case 77: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Value)] */ - if ( se->localPart == 53 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Value) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 79, 80); - } - break; - case 81: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 83, 46); + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 76, 57); + } + else if ( se->localPart == 15 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 77, 53); + } + break; + case 76: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ + if ( se->localPart == 15 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 77, 53); + } + break; + case 82: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + if ( se->localPart == 46 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 83, 41); } break; case 83: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxVoltage)] */ - if ( se->localPart == 20 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 84, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + if ( se->localPart == 64 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 84, 51); + } + else if ( se->localPart == 0 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 85, 86); } break; case 84: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinVoltage)] */ - if ( se->localPart == 22 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 85, 67); - } - break; - case 85: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxCurrent)] */ - if ( se->localPart == 17 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 86, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + if ( se->localPart == 0 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 85, 86); } break; case 86: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinCurrent)] */ - if ( se->localPart == 21 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMinCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 87, 67); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + if ( se->localPart == 2 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 87, 45); } break; case 87: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPhases)] */ - if ( se->localPart == 18 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPhases) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 88, 70); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + if ( se->localPart == 1 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 88, 57); } break; - case 88: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - if ( se->localPart == 26 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EnergyProvider) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 89, 90); - } - else if ( se->localPart == 84 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 91, 92); - } - break; - case 89: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - if ( se->localPart == 84 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 91, 92); + case 91: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC)] */ + if ( se->localPart == 10 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 92, 45); } break; case 92: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Currency)] */ - if ( se->localPart == 5 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Currency) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 93, 94); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EAmount)] */ + if ( se->localPart == 2 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EAmount) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 93, 57); } break; case 93: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff)] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff) */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPower)] */ + if ( se->localPart == 28 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPower) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 94, 57); + } + break; + case 94: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases)] */ + if ( se->localPart == 27 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases) */ return _exiEncodeStartElement(stream, 0, 0, state, se, 95, 96); } break; case 95: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 97, 96); - } - break; - case 96: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffID)] */ - if ( se->localPart == 48 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 102, 103); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxVoltage)] */ + if ( se->localPart == 29 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxVoltage) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 97, 57); } break; case 97: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 98, 96); - } - break; - case 98: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 99, 96); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMinVoltage)] */ + if ( se->localPart == 30 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMinVoltage) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 98, 57); } break; case 99: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 100, 96); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + if ( se->localPart == 7 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 101, 35); } break; - case 100: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 101, 96); + case 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage)] */ + if ( se->localPart == 8 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 102, 57); } break; case 102: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries)] */ - if ( se->localPart == 43 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffDescription) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 104, 105); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEIMax)] */ + if ( se->localPart == 4 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEIMax) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 103, 57); } - else if ( se->localPart == 44 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries) */ - return _exiEncodeStartElement(stream, 1, 1, state, se, 106, 107); + break; + case 103: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases)] */ + if ( se->localPart == 5 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 104, 96); } break; case 104: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries)] */ - if ( se->localPart == 44 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntries) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 106, 107); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ + if ( se->localPart == 9 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 105, 106); + } + else if ( se->localPart == 65 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 107, 108); } break; - case 107: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry)] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 108, 109); + case 105: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ + if ( se->localPart == 65 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 107, 108); } break; case 108: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 110, 109); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency)] */ + if ( se->localPart == 5 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 109, 110); } break; case 109: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffStart)] */ - if ( se->localPart == 50 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffStart) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 117, 118); - } - break; - case 110: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 111, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff)] */ + if ( se->localPart == 38 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 111, 112); } break; case 111: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 112, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */ + if ( se->localPart == 38 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 111, 112); } break; case 112: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 113, 109); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */ + if ( se->localPart == 45 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 113, 51); } break; case 113: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 114, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + if ( se->localPart == 40 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffDescription) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 114, 115); + } + else if ( se->localPart == 41 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries) */ + return _exiEncodeStartElement(stream, 1, 1, state, se, 116, 117); } break; case 114: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 115, 109); - } - break; - case 115: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 116, 109); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + if ( se->localPart == 41 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 116, 117); } break; case 117: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffPMax)] */ - if ( se->localPart == 49 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffPMax) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 119, 67); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */ + if ( se->localPart == 43 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 118, 119); + } + break; + case 118: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + if ( se->localPart == 43 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 118, 119); } break; case 119: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EPrice), END_ELEMENT] */ - if ( se->localPart == 6 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EPrice) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 120, 67); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */ + if ( se->localPart == 47 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 120, 121); } break; - case 121: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage)] */ - if ( se->localPart == 51 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 122, 67); + case 120: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffPMax)] */ + if ( se->localPart == 46 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffPMax) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 122, 57); } break; case 122: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent)] */ - if ( se->localPart == 42 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 123, 67); - } - break; - case 123: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDifferential)] */ - if ( se->localPart == 14 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDifferential) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 124, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ + if ( se->localPart == 6 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 123, 57); } break; case 124: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential)] */ - if ( se->localPart == 89 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 125, 67); - } - break; - case 126: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 128, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ + if ( se->localPart == 57 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 126, 127); } break; case 128: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - if ( se->localPart == 24 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 129, 67); - } - break; - case 129: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentCurrent)] */ - if ( se->localPart == 23 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 130, 67); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + if ( se->localPart == 52 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 130, 131); } break; case 131: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqLockStatus)] */ - if ( se->localPart == 64 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqLockStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 132, 37); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + if ( se->localPart == 26 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 132, 133); + } + break; + case 132: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if ( se->localPart == 26 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 132, 133); } break; case 133: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 135, 46); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + if ( se->localPart == 28 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 134, 135); + } + break; + case 134: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + if ( se->localPart == 30 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 136, 137); + } + else if ( se->localPart == 33 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 138, 125); + } + else if ( se->localPart == 31 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 139, 127); } break; case 136: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 138, 35); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + if ( se->localPart == 33 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 138, 125); + } + else if ( se->localPart == 31 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 139, 127); } break; case 138: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff)] */ - if ( se->localPart == 82 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 139, 56); - } - else if ( se->localPart == 83 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff) */ - return _exiEncodeStartElement(stream, 1, 1, state, se, 140, 103); - } - break; - case 139: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff)] */ - if ( se->localPart == 83 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 140, 103); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + if ( se->localPart == 31 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 139, 127); } break; case 140: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo)] */ - if ( se->localPart == 32 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo) */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVPubKey)] */ + if ( se->localPart == 31 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVPubKey) */ return _exiEncodeStartElement(stream, 0, 0, state, se, 141, 142); } break; - case 142: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( se->localPart == 17 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterID) */ - return _exiEncodeStartElement(stream, 3, 0, state, se, 143, 144); - } - else if ( se->localPart == 19 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading) */ - return _exiEncodeStartElement(stream, 3, 1, state, se, 145, 67); - } - else if ( se->localPart == 20 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus) */ - return _exiEncodeStartElement(stream, 3, 2, state, se, 146, 147); - } - else if ( se->localPart == 40 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter) */ - return _exiEncodeStartElement(stream, 3, 3, state, se, 148, 56); - } - break; case 143: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( se->localPart == 19 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 145, 67); - } - else if ( se->localPart == 20 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 146, 147); - } - else if ( se->localPart == 40 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter) */ - return _exiEncodeStartElement(stream, 2, 2, state, se, 148, 56); - } - break; - case 145: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( se->localPart == 20 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 146, 147); - } - else if ( se->localPart == 40 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 148, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */ + if ( se->localPart == 16 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 145, 142); } break; case 146: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( se->localPart == 40 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 148, 56); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + if ( se->localPart == 32 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 147, 25); + } + break; + case 148: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + if ( se->localPart == 3 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 150, 72); + } + break; + case 150: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + if ( se->localPart == 7 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 151, 35); } break; case 151: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID)] */ - if ( se->localPart == 16 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 153, 154); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + if ( se->localPart == 63 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 152, 45); } break; case 153: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 155, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + if ( se->localPart == 0 && se->namespaceURI == 6 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 155, 156); } break; - case 155: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - if ( se->localPart == 82 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 156, 56); + case 154: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}SessionInformation)] */ + if ( se->localPart == 7 && se->namespaceURI == 6 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}SessionInformation) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 157, 158); } break; case 156: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPower)] */ - if ( se->localPart == 19 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEMaxPower) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 157, 67); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), 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), END_ELEMENT] */ + if ( se->localPart == 2 && se->namespaceURI == 6 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement) */ + return _exiEncodeStartElement(stream, 5, 0, state, se, 174, 3); + } + else if ( se->localPart == 11 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq) */ + return _exiEncodeStartElement(stream, 5, 1, state, se, 174, 5); + } + else if ( se->localPart == 13 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes) */ + return _exiEncodeStartElement(stream, 5, 2, state, se, 174, 6); + } + else if ( se->localPart == 17 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq) */ + return _exiEncodeStartElement(stream, 5, 3, state, se, 174, 7); + } + else if ( se->localPart == 19 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes) */ + return _exiEncodeStartElement(stream, 5, 4, state, se, 174, 8); + } + else if ( se->localPart == 21 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq) */ + return _exiEncodeStartElement(stream, 5, 5, state, se, 174, 9); + } + else if ( se->localPart == 23 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes) */ + return _exiEncodeStartElement(stream, 5, 6, state, se, 174, 10); + } + else if ( se->localPart == 33 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq) */ + return _exiEncodeStartElement(stream, 5, 7, state, se, 174, 11); + } + else if ( se->localPart == 35 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes) */ + return _exiEncodeStartElement(stream, 5, 8, state, se, 174, 12); + } + else if ( se->localPart == 37 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq) */ + return _exiEncodeStartElement(stream, 5, 9, state, se, 174, 13); + } + else if ( se->localPart == 39 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes) */ + return _exiEncodeStartElement(stream, 5, 10, state, se, 174, 14); + } + else if ( se->localPart == 41 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq) */ + return _exiEncodeStartElement(stream, 5, 11, state, se, 174, 15); + } + else if ( se->localPart == 43 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes) */ + return _exiEncodeStartElement(stream, 5, 12, state, se, 174, 16); + } + else if ( se->localPart == 48 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq) */ + return _exiEncodeStartElement(stream, 5, 13, state, se, 174, 17); + } + else if ( se->localPart == 50 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes) */ + return _exiEncodeStartElement(stream, 5, 14, state, se, 174, 18); + } + else if ( se->localPart == 53 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq) */ + return _exiEncodeStartElement(stream, 5, 15, state, se, 174, 19); + } + else if ( se->localPart == 55 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes) */ + return _exiEncodeStartElement(stream, 5, 16, state, se, 174, 20); + } + else if ( se->localPart == 59 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq) */ + return _exiEncodeStartElement(stream, 5, 17, state, se, 174, 21); + } + else if ( se->localPart == 61 && se->namespaceURI == 4 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes) */ + return _exiEncodeStartElement(stream, 5, 18, state, se, 174, 22); } break; case 157: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - if ( se->localPart == 41 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PCurrent) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 158, 67); - } - else if ( se->localPart == 32 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 159, 142); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */ + if ( se->localPart == 6 && se->namespaceURI == 6 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 159, 160); } break; case 158: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - if ( se->localPart == 32 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 159, 142); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */ + if ( se->localPart == 34 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 161, 162); } break; - case 162: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - if ( se->localPart == 82 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 164, 56); + case 160: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ + if ( se->localPart == 13 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 166, 167); + } + else if ( se->localPart == 14 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 168, 169); + } + else if ( se->localPart == 10 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList) */ + return _exiEncodeStartElement(stream, 2, 2, state, se, 170, 171); } break; - case 165: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqSwitchStatus)] */ - if ( se->localPart == 65 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ReqSwitchStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 166, 52); + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + if ( se->localPart == 32 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 163, 162); + } + else if ( se->localPart == 24 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 164, 165); + } + break; + case 163: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + if ( se->localPart == 24 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 164, 165); } break; case 166: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff), END_ELEMENT] */ - if ( se->localPart == 83 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 167, 103); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ + if ( se->localPart == 14 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg) */ + return _exiEncodeStartElement(stream, 2, 0, state, se, 168, 169); + } + else if ( se->localPart == 10 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList) */ + return _exiEncodeStartElement(stream, 2, 1, state, se, 170, 171); } break; case 168: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 170, 46); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ + if ( se->localPart == 10 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList) */ + return _exiEncodeStartElement(stream, 1, 0, state, se, 170, 171); } break; case 171: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage)] */ - if ( se->localPart == 51 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVTargetVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 172, 67); - } - break; - case 172: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent)] */ - if ( se->localPart == 42 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVDemandCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 173, 67); - } - break; - case 173: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential)] */ - if ( se->localPart == 89 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}VoltageDifferential) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 174, 67); - } - break; - case 175: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 177, 46); - } - break; - case 177: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - if ( se->localPart == 24 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 178, 67); - } - break; - case 179: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - if ( se->localPart == 76 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 181, 182); - } - break; - case 183: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList), END_ELEMENT] */ - if ( se->localPart == 71 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 185, 186); - } - break; - case 186: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service)] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 187, 188); - } - break; - case 187: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 189, 188); - } - break; - case 188: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceID)] */ - if ( se->localPart == 30 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 196, 197); - } - break; - case 189: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 190, 188); - } - break; - case 190: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 191, 188); - } - break; - case 191: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 192, 188); - } - break; - case 192: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 193, 188); - } - break; - case 193: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 194, 188); - } - break; - case 194: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - if ( se->localPart == 28 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 195, 188); - } - break; - case 196: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if ( se->localPart == 32 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceName) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 198, 199); - } - else if ( se->localPart == 35 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 200, 180); - } - else if ( se->localPart == 33 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope) */ - return _exiEncodeStartElement(stream, 2, 2, state, se, 201, 182); - } - break; - case 198: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if ( se->localPart == 35 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 200, 180); - } - else if ( se->localPart == 33 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 201, 182); - } - break; - case 200: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if ( se->localPart == 33 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 201, 182); - } - break; - case 205: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus)] */ - if ( se->localPart == 50 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PEVStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 206, 35); - } - break; - case 207: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID)] */ - if ( se->localPart == 16 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 209, 154); - } - break; - case 209: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 210, 46); - } - break; - case 210: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent)] */ - if ( se->localPart == 82 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TCurrent) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 211, 56); - } - break; - case 213: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 215, 46); - } - break; - case 215: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - if ( se->localPart == 24 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 216, 67); - } - break; - case 217: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Body)] */ - if ( se->localPart == 0 && se->namespaceURI == 6 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}Body) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 219, 220); - } - break; - case 218: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}SessionInformation)] */ - if ( se->localPart == 2 && se->namespaceURI == 7 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}SessionInformation) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 221, 222); - } - break; - case 220: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), END_ELEMENT] */ - if ( se->localPart == 2 && se->namespaceURI == 6 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement) */ - return _exiEncodeStartElement(stream, 5, 0, state, se, 238, 3); - } - else if ( se->localPart == 0 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq) */ - return _exiEncodeStartElement(stream, 5, 1, state, se, 238, 5); - } - else if ( se->localPart == 2 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes) */ - return _exiEncodeStartElement(stream, 5, 2, state, se, 238, 6); - } - else if ( se->localPart == 4 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq) */ - return _exiEncodeStartElement(stream, 5, 3, state, se, 238, 7); - } - else if ( se->localPart == 6 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes) */ - return _exiEncodeStartElement(stream, 5, 4, state, se, 238, 8); - } - else if ( se->localPart == 10 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq) */ - return _exiEncodeStartElement(stream, 5, 5, state, se, 238, 9); - } - else if ( se->localPart == 12 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes) */ - return _exiEncodeStartElement(stream, 5, 6, state, se, 238, 10); - } - else if ( se->localPart == 28 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq) */ - return _exiEncodeStartElement(stream, 5, 7, state, se, 238, 11); - } - else if ( se->localPart == 30 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes) */ - return _exiEncodeStartElement(stream, 5, 8, state, se, 238, 12); - } - else if ( se->localPart == 33 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq) */ - return _exiEncodeStartElement(stream, 5, 9, state, se, 238, 13); - } - else if ( se->localPart == 35 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes) */ - return _exiEncodeStartElement(stream, 5, 10, state, se, 238, 14); - } - else if ( se->localPart == 37 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq) */ - return _exiEncodeStartElement(stream, 5, 11, state, se, 238, 15); - } - else if ( se->localPart == 39 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes) */ - return _exiEncodeStartElement(stream, 5, 12, state, se, 238, 16); - } - else if ( se->localPart == 52 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq) */ - return _exiEncodeStartElement(stream, 5, 13, state, se, 238, 17); - } - else if ( se->localPart == 54 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes) */ - return _exiEncodeStartElement(stream, 5, 14, state, se, 238, 18); - } - else if ( se->localPart == 56 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq) */ - return _exiEncodeStartElement(stream, 5, 15, state, se, 238, 19); - } - else if ( se->localPart == 58 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes) */ - return _exiEncodeStartElement(stream, 5, 16, state, se, 238, 20); - } - else if ( se->localPart == 60 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq) */ - return _exiEncodeStartElement(stream, 5, 17, state, se, 238, 21); - } - else if ( se->localPart == 62 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes) */ - return _exiEncodeStartElement(stream, 5, 18, state, se, 238, 22); - } - else if ( se->localPart == 67 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq) */ - return _exiEncodeStartElement(stream, 5, 19, state, se, 238, 23); - } - else if ( se->localPart == 69 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes) */ - return _exiEncodeStartElement(stream, 5, 20, state, se, 238, 24); - } - else if ( se->localPart == 72 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq) */ - return _exiEncodeStartElement(stream, 5, 21, state, se, 238, 25); - } - else if ( se->localPart == 74 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes) */ - return _exiEncodeStartElement(stream, 5, 22, state, se, 238, 26); - } - else if ( se->localPart == 78 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq) */ - return _exiEncodeStartElement(stream, 5, 23, state, se, 238, 27); - } - else if ( se->localPart == 80 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes) */ - return _exiEncodeStartElement(stream, 5, 24, state, se, 238, 28); - } - else if ( se->localPart == 85 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq) */ - return _exiEncodeStartElement(stream, 5, 25, state, se, 238, 29); - } - else if ( se->localPart == 87 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes) */ - return _exiEncodeStartElement(stream, 5, 26, state, se, 238, 30); - } - else if ( se->localPart == 90 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq) */ - return _exiEncodeStartElement(stream, 5, 27, state, se, 238, 32); - } - else if ( se->localPart == 92 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes) */ - return _exiEncodeStartElement(stream, 5, 28, state, se, 238, 33); - } - break; - case 221: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}Notification), END_ELEMENT] */ - if ( se->localPart == 1 && se->namespaceURI == 7 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}Notification) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 223, 224); - } - break; - case 222: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}SessionID)] */ - if ( se->localPart == 36 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}SessionID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 225, 226); - } - break; - case 224: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - if ( se->localPart == 14 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultCode) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 230, 231); - } - else if ( se->localPart == 15 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 232, 233); - } - else if ( se->localPart == 11 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList) */ - return _exiEncodeStartElement(stream, 2, 2, state, se, 234, 235); - } - break; - case 225: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - if ( se->localPart == 34 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceSessionID) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 227, 226); - } - else if ( se->localPart == 25 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 228, 229); - } - break; - case 227: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - if ( se->localPart == 25 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 228, 229); - } - break; - case 230: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - if ( se->localPart == 15 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 232, 233); - } - else if ( se->localPart == 11 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 234, 235); - } - break; - case 232: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - if ( se->localPart == 11 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 234, 235); - } - break; - case 235: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Event)] */ - if ( se->localPart == 10 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Event) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 236, 237); - } - break; - case 240: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus)] */ - if ( se->localPart == 25 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEStatus) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 242, 46); - } - break; - case 242: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage)] */ - if ( se->localPart == 24 && se->namespaceURI == 4 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EVSEPresentVoltage) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 243, 67); + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Event)] */ + if ( se->localPart == 9 && se->namespaceURI == 5 ) { + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Event) */ + return _exiEncodeStartElement(stream, 0, 0, state, se, 172, 173); } break; @@ -1438,192 +1016,141 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state, int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state, eqname_t* ee) { switch (state->grammarStack[state->stackIndex]) { - case 220: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TerminateChargingRes), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}WeldingDetectionRes), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 5, 29); - break; - case 142: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ + case 53: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ encodeNBitUnsignedInteger(stream, 3, 4); break; + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 134: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 160: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ + encodeNBitUnsignedInteger(stream, 2, 3); + break; + case 156: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), 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), END_ELEMENT] */ + encodeNBitUnsignedInteger(stream, 5, 19); + break; + case 58: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 76: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ + case 84: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + case 105: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ + case 111: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */ + case 118: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 122: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ + case 124: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ + case 128: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + case 132: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 138: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 143: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */ + case 157: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */ + case 163: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + case 168: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ + encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 56: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 75: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ + case 83: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + case 104: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ + case 17: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ + case 136: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + case 166: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ + encodeNBitUnsignedInteger(stream, 2, 2); + break; case 3: - /* First(xsi:type)StartTag[END_ELEMENT] */ + /* FirstStartTag(xsi:type)StartTag[END_ELEMENT] */ + case 26: + /* Element[END_ELEMENT] */ + case 29: + /* Element[END_ELEMENT] */ + case 31: + /* Element[END_ELEMENT] */ case 34: /* Element[END_ELEMENT] */ - case 40: + case 44: /* Element[END_ELEMENT] */ - case 42: - /* Element[END_ELEMENT] */ - case 45: + case 52: /* Element[END_ELEMENT] */ case 60: /* Element[END_ELEMENT] */ - case 74: + case 65: /* Element[END_ELEMENT] */ - case 79: + case 67: /* Element[END_ELEMENT] */ - case 91: + case 9: + /* FirstStartTagStartTag[END_ELEMENT] */ + case 77: /* Element[END_ELEMENT] */ - case 101: + case 78: /* Element[END_ELEMENT] */ - case 106: + case 80: + /* Element[END_ELEMENT] */ + case 85: + /* Element[END_ELEMENT] */ + case 88: + /* Element[END_ELEMENT] */ + case 89: + /* Element[END_ELEMENT] */ + case 98: + /* Element[END_ELEMENT] */ + case 107: /* Element[END_ELEMENT] */ case 116: /* Element[END_ELEMENT] */ - case 120: + case 123: /* Element[END_ELEMENT] */ - case 125: + case 126: /* Element[END_ELEMENT] */ case 130: /* Element[END_ELEMENT] */ - case 132: - /* Element[END_ELEMENT] */ - case 135: + case 139: /* Element[END_ELEMENT] */ case 141: /* Element[END_ELEMENT] */ - case 148: + case 145: /* Element[END_ELEMENT] */ - case 149: + case 147: + /* Element[END_ELEMENT] */ + case 152: + /* Element[END_ELEMENT] */ + case 155: /* Element[END_ELEMENT] */ - case 15: - /* FirstStartTag[END_ELEMENT] */ case 159: /* Element[END_ELEMENT] */ - case 160: - /* Element[END_ELEMENT] */ case 164: /* Element[END_ELEMENT] */ - case 167: - /* Element[END_ELEMENT] */ case 170: /* Element[END_ELEMENT] */ + case 172: + /* Element[END_ELEMENT] */ case 174: /* Element[END_ELEMENT] */ - case 178: - /* Element[END_ELEMENT] */ - case 181: - /* Element[END_ELEMENT] */ - case 185: - /* Element[END_ELEMENT] */ - case 195: - /* Element[END_ELEMENT] */ - case 201: - /* Element[END_ELEMENT] */ - case 202: - /* Element[END_ELEMENT] */ - case 203: - /* Element[END_ELEMENT] */ - case 206: - /* Element[END_ELEMENT] */ - case 211: - /* Element[END_ELEMENT] */ - case 212: - /* Element[END_ELEMENT] */ - case 216: - /* Element[END_ELEMENT] */ - case 219: - /* Element[END_ELEMENT] */ - case 223: - /* Element[END_ELEMENT] */ - case 228: - /* Element[END_ELEMENT] */ - case 234: - /* Element[END_ELEMENT] */ - case 236: - /* Element[END_ELEMENT] */ - case 238: - /* Element[END_ELEMENT] */ - case 239: - /* Element[END_ELEMENT] */ - case 243: - /* Element[END_ELEMENT] */ - break; - case 143: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - case 196: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 224: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 2, 3); - break; - case 89: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - case 100: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 99: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 98: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 97: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 95: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Tariff), END_ELEMENT] */ - case 115: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 114: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 113: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 112: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 111: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 110: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 108: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 119: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EPrice), END_ELEMENT] */ - case 146: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - case 158: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - case 166: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}Tariff), END_ELEMENT] */ - case 179: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - case 183: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceList), END_ELEMENT] */ - case 194: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 193: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 192: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 191: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 190: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 189: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 187: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}Service), END_ELEMENT] */ - case 200: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 221: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgHeader}Notification), END_ELEMENT] */ - case 227: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - case 232: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; - case 88: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}TariffTable), END_ELEMENT] */ - case 145: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}TMeter), END_ELEMENT] */ - case 157: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}MeterInfo), END_ELEMENT] */ - case 23: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgBody}ServiceScope), END_ELEMENT] */ - case 198: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 225: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - case 230: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:eval1.0:MsgDataTypes}EventList), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 2, 2); + /* no event code to write */ break; default: @@ -1636,162 +1163,151 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state, int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, exi_value_t* val) { - uint32_t bits; switch (state->grammarStack[state->stackIndex]) { - case 154: - case 197: - case 226: - /* CHARACTERS[BINARY_HEX] */ - if (val->type == BINARY_HEX) { - encodeBinary(stream, &val->binary); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - } - break; + case 27: + case 30: + case 37: case 41: - case 59: - case 61: - /* CHARACTERS[BOOLEAN] */ - /* xsi:type OR xsi:nil */ - encodeNBitUnsignedInteger(stream, 1, 0); + case 43: if (val->type == BOOLEAN) { + /* CHARACTERS[BOOLEAN] */ encodeBoolean(stream, val->boolean); /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 31; return 0; } break; - case 44: - case 64: - case 127: - case 150: - case 152: - case 176: - case 214: - case 241: - /* CHARACTERS[ENUMERATION] */ + case 51: + case 90: + case 129: + case 149: + case 173: if (val->type == ENUMERATION) { - encodeNBitUnsignedInteger(stream, 1, val->enumeration); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - } - break; - case 233: - /* CHARACTERS[STRING] */ - /* xsi:type OR xsi:nil */ - encodeNBitUnsignedInteger(stream, 1, 0); - if (val->type == STRING) { - encodeStringValue(stream, &val->string); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - } - break; - case 103: - case 169: - case 184: - case 208: - case 237: /* CHARACTERS[ENUMERATION] */ - if (val->type == ENUMERATION) { encodeNBitUnsignedInteger(stream, 3, val->enumeration); /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 31; return 0; } break; - case 56: - /* CHARACTERS[INTEGER_32] */ - if (val->type == INTEGER_32) { - encodeInteger32(stream, val->int32); + case 68: + case 70: + case 100: + if (val->type == ENUMERATION) { + /* CHARACTERS[ENUMERATION] */ + encodeNBitUnsignedInteger(stream, 1, val->enumeration); /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 31; return 0; } break; - case 118: - /* CHARACTERS[UNSIGNED_INTEGER_32] */ + case 33: + case 81: + case 125: + case 144: + case 167: + if (val->type == ENUMERATION) { + /* CHARACTERS[ENUMERATION] */ + encodeNBitUnsignedInteger(stream, 2, val->enumeration); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + } + break; + case 169: + if (val->type == STRING) { + /* CHARACTERS[STRING] */ + /* xsi:type OR xsi:nil */ + encodeNBitUnsignedInteger(stream, 1, 0); + encodeStringValue(stream, &val->string); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + } + break; + case 62: + if (val->type == ENUMERATION) { + /* CHARACTERS[ENUMERATION] */ + encodeNBitUnsignedInteger(stream, 4, val->enumeration); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + } + break; + case 121: if (val->type == UNSIGNED_INTEGER_32) { + /* CHARACTERS[UNSIGNED_INTEGER_32] */ encodeUnsignedInteger32(stream, val->uint32); /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 31; return 0; } break; - case 78: - /* CHARACTERS[ENUMERATION] */ + case 47: + case 55: + case 79: + case 106: + case 110: + case 115: + case 127: + case 137: + case 165: + if (val->type == STRING) { + /* CHARACTERS[STRING] */ + encodeStringValue(stream, &val->string); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + } + break; + case 64: if (val->type == ENUMERATION) { + /* CHARACTERS[ENUMERATION] */ encodeNBitUnsignedInteger(stream, 5, val->enumeration); /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 31; return 0; } break; - case 80: + case 66: + if (val->type == INTEGER_32) { /* CHARACTERS[INTEGER_32] */ /* xsi:type OR xsi:nil */ encodeNBitUnsignedInteger(stream, 1, 0); + encodeInteger32(stream, val->int32); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + } + break; + case 45: if (val->type == INTEGER_32) { + /* CHARACTERS[INTEGER_32] */ encodeInteger32(stream, val->int32); /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 31; return 0; } break; - case 37: - case 39: - case 48: - case 52: - case 54: - /* CHARACTERS[BOOLEAN] */ - if (val->type == BOOLEAN) { - encodeBoolean(stream, val->boolean); - /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - } - break; - case 76: - case 70: - case 147: - /* CHARACTERS[INTEGER_16] */ + case 59: + case 96: if (val->type == INTEGER_16) { + /* CHARACTERS[INTEGER_16] */ encodeInteger32(stream, val->int32); /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 31; return 0; } break; - case 90: - case 94: - case 105: - case 137: - case 144: - case 161: - case 182: - case 199: - case 229: - /* CHARACTERS[STRING] */ - if (val->type == STRING) { - encodeStringValue(stream, &val->string); + case 72: + case 135: + case 142: + case 162: + if (val->type == BINARY_HEX) { + /* CHARACTERS[BINARY_HEX] */ + encodeBinary(stream, &val->binary); /* move on */ - state->grammarStack[state->stackIndex] = 42; - return 0; - } - break; - case 82: - case 134: - case 163: - case 180: - case 204: - case 231: - /* CHARACTERS[ENUMERATION] */ - if (val->type == ENUMERATION) { - encodeNBitUnsignedInteger(stream, 2, val->enumeration); - /* move on */ - state->grammarStack[state->stackIndex] = 42; + state->grammarStack[state->stackIndex] = 31; return 0; } break; diff --git a/src/codec/EXIEncoder.h b/src/codec/EXIEncoder.h index 08ea7cb..2a1dbae 100644 --- a/src/codec/EXIEncoder.h +++ b/src/codec/EXIEncoder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIHeaderDecoder.c b/src/codec/EXIHeaderDecoder.c index d3edaa2..f398324 100644 --- a/src/codec/EXIHeaderDecoder.c +++ b/src/codec/EXIHeaderDecoder.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -34,7 +34,7 @@ #define EXI_HEADER_DECODER_C int readEXIHeader(bitstream_t* stream) { - uint32_t header = 0; + uint8_t header; int errn = readBits(stream, 8, &header); if (errn < 0) { return errn; diff --git a/src/codec/EXIHeaderDecoder.h b/src/codec/EXIHeaderDecoder.h index 3533b0b..20d20ae 100644 --- a/src/codec/EXIHeaderDecoder.h +++ b/src/codec/EXIHeaderDecoder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIHeaderEncoder.c b/src/codec/EXIHeaderEncoder.c index 02d38d8..1e9aaea 100644 --- a/src/codec/EXIHeaderEncoder.c +++ b/src/codec/EXIHeaderEncoder.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIHeaderEncoder.h b/src/codec/EXIHeaderEncoder.h index daf7862..8538ab1 100644 --- a/src/codec/EXIHeaderEncoder.h +++ b/src/codec/EXIHeaderEncoder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXITypes.h b/src/codec/EXITypes.h index cfd3568..6c699f6 100644 --- a/src/codec/EXITypes.h +++ b/src/codec/EXITypes.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -35,8 +35,6 @@ extern "C" { #define BITS_IN_BYTE 8 -#define UINT_MAX_VALUE 65535 - #define EXI_ELEMENT_STACK_SIZE 16 /* EXI automaton methods prefixes such as "inline" etc. */ @@ -51,29 +49,29 @@ extern "C" { typedef struct { /* Integer Array */ - uint16_t size; /* array size */ + size_t size; /* array size */ uint8_t* data; /* int data array */ - uint16_t* pos; /* next position in array */ + size_t* pos; /* next position in array */ /* Current byte buffer & its remaining bit capacity */ uint8_t buffer; - uint16_t capacity; + size_t capacity; } bitstream_t; typedef struct { /* Bytes Size and array container */ - uint16_t size; + size_t size; uint8_t* data; /* current length (len <= size) */ - uint16_t len; + size_t len; } bytes_t; /* Universal Character Set (UCS) strings */ typedef struct { /* UCS size and UCS character container*/ - uint16_t size; + size_t size; uint32_t* codepoints; /* current length == number of code-points, (len <= size) */ - uint16_t len; + size_t len; } string_ucs_t; typedef struct { @@ -129,27 +127,27 @@ typedef enum /* TODO list support */ typedef struct { /* List container with memory size */ - uint16_t size; + size_t size; uint8_t* data; /* list item type */ exi_datatype_t type; /* number of items */ - uint16_t len; + size_t len; } list_t; typedef struct { - uint16_t namespaceURI; - uint16_t localPart; + unsigned int namespaceURI; + unsigned int localPart; } eqname_t; typedef struct { /* stack of grammar states and elements */ - uint16_t grammarStack [EXI_ELEMENT_STACK_SIZE]; + size_t grammarStack [EXI_ELEMENT_STACK_SIZE]; eqname_t elementStack [EXI_ELEMENT_STACK_SIZE]; - uint16_t stackIndex; + size_t stackIndex; /* event-code */ - uint32_t eventCode; + uint8_t eventCode; } exi_state_t; @@ -159,16 +157,16 @@ typedef struct { /* base types */ int boolean; + int8_t int8; + uint8_t uint8; uint32_t uint32; - uint64_t uint64; int32_t int32; int64_t int64; - uint32_t enumeration; + uint8_t enumeration; /* Bytes, Strings and Lists are not native types anymore */ bytes_t binary; string_ucs_t string; - float_me_t float_me; list_t list; } exi_value_t; diff --git a/src/codec/StringTable.c b/src/codec/StringTable.c index 8bec0df..d02a019 100644 --- a/src/codec/StringTable.c +++ b/src/codec/StringTable.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -32,12 +32,15 @@ #include #include "StringTable.h" +#include "EXITypes.h" +#include "BitInputStream.h" +#include "BitDecoderChannel.h" #include "StringTableEntries.h" #include "assert.h" -int exiGetUri(uint16_t uriID, const char** uri) { +int exiGetUri(size_t uriID, const char** uri) { if ( uriID < stringTable.len ) { *uri = stringTable.uris[uriID]; } else { @@ -47,13 +50,13 @@ int exiGetUri(uint16_t uriID, const char** uri) { return 0; } -int exiGetUriLength(uint16_t* uriLength) { +int exiGetUriLength(size_t* uriLength) { *uriLength = stringTable.len; return 0; } -int exiGetUriID(const char* uri, uint16_t* uriID) { +int exiGetUriID(const char* uri, size_t* uriID) { unsigned int i; for(i=0; i. - */ - -/******************************************************************* - * - * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 - * @contact Joerg.Heuer@siemens.com - * - ********************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef EXI_SERVICE_H_ -#define EXI_SERVICE_H_ - -#include "v2g_serviceDataTypes.h" -#include "EXITypes.h" - -struct uniqueIDPath -{ - int id[10]; - size_t pos; -}; - - -struct EXIService -{ - /* in-/ out-stream */ - bitstream_t inStream; - bitstream_t outStream; - - /* EXI */ - exi_state_t stateDecode; - exi_state_t stateEncode; - exi_event_t event; - eqname_t eqn; - exi_value_t val; - - /* v2g message data structure */ - struct EXIDocumentType exiMsg; - - /* unique id for ambiguous elements */ - struct uniqueIDPath idPath; - - /* error code */ - uint8_t errorCode; - - /* offset for transport header data */ - uint16_t transportHeaderOffset; -}; - -/* define error codes (TODO: define precise error codes) */ -#define EXI_NON_VALID_MESSAGE 0x01 -#define EXI_SERIALIZATION_FAILED 0x02 - -#define EXI_UNKNOWN_ERROR 0xFF - -#endif /* EXI_SERVICE_H_ */ - -#ifdef __cplusplus -} -#endif +/* + * Copyright (C) 2007-2010 Siemens AG + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +/******************************************************************* + * + * @author Sebastian.Kaebisch.EXT@siemens.com + * @version 0.3 + * @contact Joerg.Heuer@siemens.com + * + ********************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef V2G_SERVICE_H_ +#define V2G_SERVICE_H_ + +#include "v2g_serviceDataTypes.h" +#include "EXITypes.h" + +struct uniqueIDPath +{ + int id[10]; + size_t pos; +}; + + +struct v2gService +{ + /* in-/ out-stream */ + bitstream_t inStream; + bitstream_t outStream; + + /* EXI */ + exi_state_t stateDecode; + exi_state_t stateEncode; + exi_event_t event; + eqname_t eqn; + exi_value_t val; + + /* v2g message data structure */ + struct AnonType_V2G_Message v2gMsg; + + /* unique id for ambiguous elements */ + struct uniqueIDPath idPath; + + /* error code */ + uint8_t errorCode; + + /* offset for transport header data */ + uint16_t transportHeaderOffset; +}; + +/* define error codes (TODO: define precise error codes) */ +#define V2G_NON_VALID_MESSAGE 0x01 +#define V2G_SERIALIZATION_FAILED 0x02 + +#define V2G_UNKNOWN_ERROR 0xFF + +#endif /* V2G_SERVICE_H_ */ + +#ifdef __cplusplus +} +#endif diff --git a/src/service/v2g_serviceClientDataTransmitter.h b/src/service/v2g_serviceClientDataTransmitter.h index 7e3225f..abb6fd6 100644 --- a/src/service/v2g_serviceClientDataTransmitter.h +++ b/src/service/v2g_serviceClientDataTransmitter.h @@ -1,44 +1,44 @@ - -/* - * Copyright (C) 2007-2011 Siemens AG - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -/******************************************************************* - * - * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 - * @contact Joerg.Heuer@siemens.com - * - ********************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef V2G_SERVICECLIENTDATATRANSMITTER_H_ -#define V2G_SERVICECLIENTDATATRANSMITTER_H_ - -#include "EXITypes.h" - -/* This method has to be implemented! - * This method sends EXI stream (outStream) to the EVSE and receives response stream (inStream)*/ -int serviceDataTransmitter(uint8_t* outStream, uint16_t outStreamLength, uint8_t* inStream); - -#endif /* V2G_SERVICECLIENTDATATRANSMITTER_H_ */ - -#ifdef __cplusplus -} -#endif + +/* + * Copyright (C) 2007-2010 Siemens AG + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +/******************************************************************* + * + * @author Sebastian.Kaebisch.EXT@siemens.com + * @version 0.3 + * @contact Joerg.Heuer@siemens.com + * + ********************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef V2G_SERVICECLIENTDATATRANSMITTER_H_ +#define V2G_SERVICECLIENTDATATRANSMITTER_H_ + +#include "EXITypes.h" + +/* This method has to be implemented! + * This method sends EXI stream (outStream) to the EVSE and receives response stream (inStream)*/ +int serviceDataTransmitter(uint8_t* outStream, size_t outStreamLength, uint8_t* inStream); + +#endif /* V2G_SERVICECLIENTDATATRANSMITTER_H_ */ + +#ifdef __cplusplus +} +#endif diff --git a/src/service/v2g_serviceClientStubs.c b/src/service/v2g_serviceClientStubs.c index 1a629c9..0c6c25a 100644 --- a/src/service/v2g_serviceClientStubs.c +++ b/src/service/v2g_serviceClientStubs.c @@ -1,7 +1,7 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -20,34 +20,27 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ #include "v2g_serviceDataTypes.h" - #include "v2g_serviceDataTypes.c" #include "v2g_serviceClientStubs.h" - #include "v2g_serviceDataSerialization.c" + #include "v2g_serviceDataSerializiation.h" #include "v2g_serviceClientDataTransmitter.h" #include "EXITypes.h" #include "EXIDecoder.h" #include "EXIEncoder.h" -static int deserializeMessage(struct EXIService* service); +static int deserializeMessage(struct v2gService* service); -/** - * \brief Calls the remote sessionSetup method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct SessionSetupReqType* Request data for the server (has to be set up before) - * \param result struct SessionSetupResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_sessionSetup(struct EXIService* service, struct HeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result) +/* call sessionSetup */ +int call_sessionSetup(struct v2gService* service, struct HeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result) { - uint16_t posEncode, posDecode; + size_t posEncode, posDecode; /* init uniqueID stack */ service->idPath.pos=0; @@ -69,15 +62,13 @@ int call_sessionSetup(struct EXIService* service, struct HeaderType* header, str - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - + /* init v2g message */ + init_AnonType_V2G_Message(&(service->v2gMsg)); - /* 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->v2gMsg.Header = *header; + service->v2gMsg.Body.SessionSetupReq = *params; + service->v2gMsg.Body.isused.SessionSetupReq=1; /* encode data to exi stream*/ if(serialize_message(service)) @@ -95,8 +86,6 @@ int call_sessionSetup(struct EXIService* service, struct HeaderType* header, str - service->exiMsg.V2G_Message.Body.SessionSetupRes = result; - /* init decoder (read header, set initial state) */ exiInitDecoder(&(service->inStream), &(service->stateDecode)); @@ -106,22 +95,16 @@ int call_sessionSetup(struct EXIService* service, struct HeaderType* header, str return -1; } - + *result = service->v2gMsg.Body.SessionSetupRes; return 0; } -/** - * \brief Calls the remote serviceDiscovery method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct ServiceDiscoveryReqType* Request data for the server (has to be set up before) - * \param result struct ServiceDiscoveryResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_serviceDiscovery(struct EXIService* service, struct HeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result) +/* call serviceDiscovery */ +int call_serviceDiscovery(struct v2gService* service, struct HeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result) { - uint16_t posEncode, posDecode; + size_t posEncode, posDecode; /* init uniqueID stack */ service->idPath.pos=0; @@ -143,15 +126,13 @@ int call_serviceDiscovery(struct EXIService* service, struct HeaderType* header, - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - + /* init v2g message */ + init_AnonType_V2G_Message(&(service->v2gMsg)); - /* 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->v2gMsg.Header = *header; + service->v2gMsg.Body.ServiceDiscoveryReq = *params; + service->v2gMsg.Body.isused.ServiceDiscoveryReq=1; /* encode data to exi stream*/ if(serialize_message(service)) @@ -169,8 +150,6 @@ int call_serviceDiscovery(struct EXIService* service, struct HeaderType* header, - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes = result; - /* init decoder (read header, set initial state) */ exiInitDecoder(&(service->inStream), &(service->stateDecode)); @@ -180,22 +159,16 @@ int call_serviceDiscovery(struct EXIService* service, struct HeaderType* header, return -1; } - + *result = service->v2gMsg.Body.ServiceDiscoveryRes; return 0; } -/** - * \brief Calls the remote selectedServicePayment method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct ServicePaymentSelectionReqType* Request data for the server (has to be set up before) - * \param result struct ServicePaymentSelectionResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_selectedServicePayment(struct EXIService* service, struct HeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result) +/* call selectedServicePayment */ +int call_selectedServicePayment(struct v2gService* service, struct HeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result) { - uint16_t posEncode, posDecode; + size_t posEncode, posDecode; /* init uniqueID stack */ service->idPath.pos=0; @@ -217,15 +190,13 @@ int call_selectedServicePayment(struct EXIService* service, struct HeaderType* h - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - + /* init v2g message */ + init_AnonType_V2G_Message(&(service->v2gMsg)); - /* 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->v2gMsg.Header = *header; + service->v2gMsg.Body.ServicePaymentSelectionReq = *params; + service->v2gMsg.Body.isused.ServicePaymentSelectionReq=1; /* encode data to exi stream*/ if(serialize_message(service)) @@ -243,8 +214,6 @@ int call_selectedServicePayment(struct EXIService* service, struct HeaderType* h - service->exiMsg.V2G_Message.Body.ServicePaymentSelectionRes = result; - /* init decoder (read header, set initial state) */ exiInitDecoder(&(service->inStream), &(service->stateDecode)); @@ -254,22 +223,16 @@ int call_selectedServicePayment(struct EXIService* service, struct HeaderType* h return -1; } - + *result = service->v2gMsg.Body.ServicePaymentSelectionRes; return 0; } -/** - * \brief Calls the remote paymentDetails method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct PaymentDetailsReqType* Request data for the server (has to be set up before) - * \param result struct PaymentDetailsResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_paymentDetails(struct EXIService* service, struct HeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result) +/* call paymentDetails */ +int call_paymentDetails(struct v2gService* service, struct HeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result) { - uint16_t posEncode, posDecode; + size_t posEncode, posDecode; /* init uniqueID stack */ service->idPath.pos=0; @@ -291,15 +254,13 @@ int call_paymentDetails(struct EXIService* service, struct HeaderType* header, s - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - + /* init v2g message */ + init_AnonType_V2G_Message(&(service->v2gMsg)); - /* 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->v2gMsg.Header = *header; + service->v2gMsg.Body.PaymentDetailsReq = *params; + service->v2gMsg.Body.isused.PaymentDetailsReq=1; /* encode data to exi stream*/ if(serialize_message(service)) @@ -317,8 +278,6 @@ int call_paymentDetails(struct EXIService* service, struct HeaderType* header, s - service->exiMsg.V2G_Message.Body.PaymentDetailsRes = result; - /* init decoder (read header, set initial state) */ exiInitDecoder(&(service->inStream), &(service->stateDecode)); @@ -328,22 +287,16 @@ int call_paymentDetails(struct EXIService* service, struct HeaderType* header, s return -1; } - + *result = service->v2gMsg.Body.PaymentDetailsRes; return 0; } -/** - * \brief Calls the remote chargeParameterDiscovery method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct ChargeParameterDiscoveryReqType* Request data for the server (has to be set up before) - * \param result struct ChargeParameterDiscoveryResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_chargeParameterDiscovery(struct EXIService* service, struct HeaderType* header, struct ChargeParameterDiscoveryReqType* params, struct ChargeParameterDiscoveryResType* result) +/* call powerDiscovery */ +int call_powerDiscovery(struct v2gService* service, struct HeaderType* header, struct PowerDiscoveryReqType* params, struct PowerDiscoveryResType* result) { - uint16_t posEncode, posDecode; + size_t posEncode, posDecode; /* init uniqueID stack */ service->idPath.pos=0; @@ -365,15 +318,13 @@ int call_chargeParameterDiscovery(struct EXIService* service, struct HeaderType* - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - + /* init v2g message */ + init_AnonType_V2G_Message(&(service->v2gMsg)); - /* 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->v2gMsg.Header = *header; + service->v2gMsg.Body.PowerDiscoveryReq = *params; + service->v2gMsg.Body.isused.PowerDiscoveryReq=1; /* encode data to exi stream*/ if(serialize_message(service)) @@ -391,8 +342,6 @@ int call_chargeParameterDiscovery(struct EXIService* service, struct HeaderType* - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes = result; - /* init decoder (read header, set initial state) */ exiInitDecoder(&(service->inStream), &(service->stateDecode)); @@ -402,22 +351,16 @@ int call_chargeParameterDiscovery(struct EXIService* service, struct HeaderType* return -1; } - + *result = service->v2gMsg.Body.PowerDiscoveryRes; return 0; } -/** - * \brief Calls the remote lineLock method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct LineLockReqType* Request data for the server (has to be set up before) - * \param result struct LineLockResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_lineLock(struct EXIService* service, struct HeaderType* header, struct LineLockReqType* params, struct LineLockResType* result) +/* call lineLock */ +int call_lineLock(struct v2gService* service, struct HeaderType* header, struct LineLockReqType* params, struct LineLockResType* result) { - uint16_t posEncode, posDecode; + size_t posEncode, posDecode; /* init uniqueID stack */ service->idPath.pos=0; @@ -439,15 +382,13 @@ int call_lineLock(struct EXIService* service, struct HeaderType* header, struct - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - + /* init v2g message */ + init_AnonType_V2G_Message(&(service->v2gMsg)); - /* assign data to service data structure */ - service->exiMsg.V2G_Message.Header = header; - service->exiMsg.V2G_Message.Body.LineLockReq = params; - service->exiMsg.V2G_Message.Body.isused.LineLockReq=1; + service->v2gMsg.Header = *header; + service->v2gMsg.Body.LineLockReq = *params; + service->v2gMsg.Body.isused.LineLockReq=1; /* encode data to exi stream*/ if(serialize_message(service)) @@ -465,8 +406,6 @@ int call_lineLock(struct EXIService* service, struct HeaderType* header, struct - service->exiMsg.V2G_Message.Body.LineLockRes = result; - /* init decoder (read header, set initial state) */ exiInitDecoder(&(service->inStream), &(service->stateDecode)); @@ -476,22 +415,16 @@ int call_lineLock(struct EXIService* service, struct HeaderType* header, struct return -1; } - + *result = service->v2gMsg.Body.LineLockRes; return 0; } -/** - * \brief Calls the remote powerDelivery method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct PowerDeliveryReqType* Request data for the server (has to be set up before) - * \param result struct PowerDeliveryResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_powerDelivery(struct EXIService* service, struct HeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result) +/* call powerDelivery */ +int call_powerDelivery(struct v2gService* service, struct HeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result) { - uint16_t posEncode, posDecode; + size_t posEncode, posDecode; /* init uniqueID stack */ service->idPath.pos=0; @@ -513,15 +446,13 @@ int call_powerDelivery(struct EXIService* service, struct HeaderType* header, st - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - + /* init v2g message */ + init_AnonType_V2G_Message(&(service->v2gMsg)); - /* 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->v2gMsg.Header = *header; + service->v2gMsg.Body.PowerDeliveryReq = *params; + service->v2gMsg.Body.isused.PowerDeliveryReq=1; /* encode data to exi stream*/ if(serialize_message(service)) @@ -539,8 +470,6 @@ int call_powerDelivery(struct EXIService* service, struct HeaderType* header, st - service->exiMsg.V2G_Message.Body.PowerDeliveryRes = result; - /* init decoder (read header, set initial state) */ exiInitDecoder(&(service->inStream), &(service->stateDecode)); @@ -550,21 +479,16 @@ int call_powerDelivery(struct EXIService* service, struct HeaderType* header, st return -1; } - + *result = service->v2gMsg.Body.PowerDeliveryRes; return 0; } -/** - * \brief Calls the remote meteringStatus method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param result struct MeteringStatusResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_meteringStatus(struct EXIService* service, struct HeaderType* header, struct MeteringStatusResType* result) +/* call meteringStatus */ +int call_meteringStatus(struct v2gService* service, struct HeaderType* header, struct MeteringStatusResType* result) { - uint16_t posEncode, posDecode; + size_t posEncode, posDecode; /* init uniqueID stack */ service->idPath.pos=0; @@ -586,14 +510,12 @@ int call_meteringStatus(struct EXIService* service, struct HeaderType* header, s - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - + /* init v2g message */ + init_AnonType_V2G_Message(&(service->v2gMsg)); - /* assign data to service data structure */ - service->exiMsg.V2G_Message.Header = header; - service->exiMsg.V2G_Message.Body.isused.MeteringStatusReq=1; + service->v2gMsg.Header = *header; + service->v2gMsg.Body.isused.MeteringStatusReq=1; /* encode data to exi stream*/ if(serialize_message(service)) @@ -611,8 +533,6 @@ int call_meteringStatus(struct EXIService* service, struct HeaderType* header, s - service->exiMsg.V2G_Message.Body.MeteringStatusRes = result; - /* init decoder (read header, set initial state) */ exiInitDecoder(&(service->inStream), &(service->stateDecode)); @@ -622,22 +542,16 @@ int call_meteringStatus(struct EXIService* service, struct HeaderType* header, s return -1; } - + *result = service->v2gMsg.Body.MeteringStatusRes; return 0; } -/** - * \brief Calls the remote meteringReceipt method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct MeteringReceiptReqType* Request data for the server (has to be set up before) - * \param result struct MeteringReceiptResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_meteringReceipt(struct EXIService* service, struct HeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result) +/* call meteringReceipt */ +int call_meteringReceipt(struct v2gService* service, struct HeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result) { - uint16_t posEncode, posDecode; + size_t posEncode, posDecode; /* init uniqueID stack */ service->idPath.pos=0; @@ -659,15 +573,13 @@ int call_meteringReceipt(struct EXIService* service, struct HeaderType* header, - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - + /* init v2g message */ + init_AnonType_V2G_Message(&(service->v2gMsg)); - /* 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->v2gMsg.Header = *header; + service->v2gMsg.Body.MeteringReceiptReq = *params; + service->v2gMsg.Body.isused.MeteringReceiptReq=1; /* encode data to exi stream*/ if(serialize_message(service)) @@ -685,8 +597,6 @@ int call_meteringReceipt(struct EXIService* service, struct HeaderType* header, - service->exiMsg.V2G_Message.Body.MeteringReceiptRes = result; - /* init decoder (read header, set initial state) */ exiInitDecoder(&(service->inStream), &(service->stateDecode)); @@ -696,377 +606,7 @@ int call_meteringReceipt(struct EXIService* service, struct HeaderType* header, return -1; } - - - - return 0; -} - -/** - * \brief Calls the remote cableCheck method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct CableCheckReqType* Request data for the server (has to be set up before) - * \param result struct CableCheckResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_cableCheck(struct EXIService* service, struct HeaderType* header, struct CableCheckReqType* params, struct CableCheckResType* result) -{ - uint16_t posEncode, posDecode; - - /* init uniqueID stack */ - service->idPath.pos=0; - - /* init outStream data structure */ - posEncode = service->transportHeaderOffset; - service->outStream.pos = &posEncode; - service->outStream.buffer = 0; - service->outStream.capacity = 8; - - /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); - - /* init inStream data structure */ - posDecode = service->transportHeaderOffset; - service->inStream.pos = &posDecode; - service->inStream.buffer=0; - service->inStream.capacity=0; - - - - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - - - - /* assign data to service data structure */ - service->exiMsg.V2G_Message.Header = header; - service->exiMsg.V2G_Message.Body.CableCheckReq = params; - service->exiMsg.V2G_Message.Body.isused.CableCheckReq=1; - - /* encode data to exi stream*/ - if(serialize_message(service)) - { - - return -1; - } - - /* send data to server and wait for the response message */ - service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); - if(service->errorCode) - { - return -1; - } - - - - service->exiMsg.V2G_Message.Body.CableCheckRes = result; - - /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); - - /* deserilize the response message */ - if(deserializeMessage(service)<0) - { - - return -1; - } - - - - return 0; -} - -/** - * \brief Calls the remote preCharge method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct PreChargeReqType* Request data for the server (has to be set up before) - * \param result struct PreChargeResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_preCharge(struct EXIService* service, struct HeaderType* header, struct PreChargeReqType* params, struct PreChargeResType* result) -{ - uint16_t posEncode, posDecode; - - /* init uniqueID stack */ - service->idPath.pos=0; - - /* init outStream data structure */ - posEncode = service->transportHeaderOffset; - service->outStream.pos = &posEncode; - service->outStream.buffer = 0; - service->outStream.capacity = 8; - - /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); - - /* init inStream data structure */ - posDecode = service->transportHeaderOffset; - service->inStream.pos = &posDecode; - service->inStream.buffer=0; - service->inStream.capacity=0; - - - - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - - - - /* assign data to service data structure */ - service->exiMsg.V2G_Message.Header = header; - service->exiMsg.V2G_Message.Body.PreChargeReq = params; - service->exiMsg.V2G_Message.Body.isused.PreChargeReq=1; - - /* encode data to exi stream*/ - if(serialize_message(service)) - { - - return -1; - } - - /* send data to server and wait for the response message */ - service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); - if(service->errorCode) - { - return -1; - } - - - - service->exiMsg.V2G_Message.Body.PreChargeRes = result; - - /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); - - /* deserilize the response message */ - if(deserializeMessage(service)<0) - { - - return -1; - } - - - - return 0; -} - -/** - * \brief Calls the remote currentDemand method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct CurrentDemandReqType* Request data for the server (has to be set up before) - * \param result struct CurrentDemandResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_currentDemand(struct EXIService* service, struct HeaderType* header, struct CurrentDemandReqType* params, struct CurrentDemandResType* result) -{ - uint16_t posEncode, posDecode; - - /* init uniqueID stack */ - service->idPath.pos=0; - - /* init outStream data structure */ - posEncode = service->transportHeaderOffset; - service->outStream.pos = &posEncode; - service->outStream.buffer = 0; - service->outStream.capacity = 8; - - /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); - - /* init inStream data structure */ - posDecode = service->transportHeaderOffset; - service->inStream.pos = &posDecode; - service->inStream.buffer=0; - service->inStream.capacity=0; - - - - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - - - - /* assign data to service data structure */ - service->exiMsg.V2G_Message.Header = header; - service->exiMsg.V2G_Message.Body.CurrentDemandReq = params; - service->exiMsg.V2G_Message.Body.isused.CurrentDemandReq=1; - - /* encode data to exi stream*/ - if(serialize_message(service)) - { - - return -1; - } - - /* send data to server and wait for the response message */ - service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); - if(service->errorCode) - { - return -1; - } - - - - service->exiMsg.V2G_Message.Body.CurrentDemandRes = result; - - /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); - - /* deserilize the response message */ - if(deserializeMessage(service)<0) - { - - return -1; - } - - - - return 0; -} - -/** - * \brief Calls the remote weldingDetection method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct WeldingDetectionReqType* Request data for the server (has to be set up before) - * \param result struct WeldingDetectionResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_weldingDetection(struct EXIService* service, struct HeaderType* header, struct WeldingDetectionReqType* params, struct WeldingDetectionResType* result) -{ - uint16_t posEncode, posDecode; - - /* init uniqueID stack */ - service->idPath.pos=0; - - /* init outStream data structure */ - posEncode = service->transportHeaderOffset; - service->outStream.pos = &posEncode; - service->outStream.buffer = 0; - service->outStream.capacity = 8; - - /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); - - /* init inStream data structure */ - posDecode = service->transportHeaderOffset; - service->inStream.pos = &posDecode; - service->inStream.buffer=0; - service->inStream.capacity=0; - - - - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - - - - /* assign data to service data structure */ - service->exiMsg.V2G_Message.Header = header; - service->exiMsg.V2G_Message.Body.WeldingDetectionReq = params; - service->exiMsg.V2G_Message.Body.isused.WeldingDetectionReq=1; - - /* encode data to exi stream*/ - if(serialize_message(service)) - { - - return -1; - } - - /* send data to server and wait for the response message */ - service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); - if(service->errorCode) - { - return -1; - } - - - - service->exiMsg.V2G_Message.Body.WeldingDetectionRes = result; - - /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); - - /* deserilize the response message */ - if(deserializeMessage(service)<0) - { - - return -1; - } - - - - return 0; -} - -/** - * \brief Calls the remote terminateCharging method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct TerminateChargingReqType* Request data for the server (has to be set up before) - * \param result struct TerminateChargingResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ -int call_terminateCharging(struct EXIService* service, struct HeaderType* header, struct TerminateChargingReqType* params, struct TerminateChargingResType* result) -{ - uint16_t posEncode, posDecode; - - /* init uniqueID stack */ - service->idPath.pos=0; - - /* init outStream data structure */ - posEncode = service->transportHeaderOffset; - service->outStream.pos = &posEncode; - service->outStream.buffer = 0; - service->outStream.capacity = 8; - - /* init encoder (write header, set initial state) */ - exiInitEncoder(&(service->outStream), &(service->stateEncode)); - - /* init inStream data structure */ - posDecode = service->transportHeaderOffset; - service->inStream.pos = &posDecode; - service->inStream.buffer=0; - service->inStream.capacity=0; - - - - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); - - - - /* assign data to service data structure */ - service->exiMsg.V2G_Message.Header = header; - service->exiMsg.V2G_Message.Body.TerminateChargingReq = params; - service->exiMsg.V2G_Message.Body.isused.TerminateChargingReq=1; - - /* encode data to exi stream*/ - if(serialize_message(service)) - { - - return -1; - } - - /* send data to server and wait for the response message */ - service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); - if(service->errorCode) - { - return -1; - } - - - - service->exiMsg.V2G_Message.Body.TerminateChargingRes = result; - - /* init decoder (read header, set initial state) */ - exiInitDecoder(&(service->inStream), &(service->stateDecode)); - - /* deserilize the response message */ - if(deserializeMessage(service)<0) - { - - return -1; - } - + *result = service->v2gMsg.Body.MeteringReceiptRes; return 0; @@ -1078,1105 +618,693 @@ int call_terminateCharging(struct EXIService* service, struct HeaderType* header * Deserialize an element value of the EXI stream and assign it to the * service data structure */ -static int deserializeElementCharacter(struct EXIService* service) +static int deserializeElementCharacter(struct v2gService* service) { switch(service->eqn.namespaceURI) { case 4: switch(service->eqn.localPart) { - case 66: /*ResponseCode*/ - - if(service->val.type == ENUMERATION) + case 47: /*ResponseCode*/ + if(service->val.type == ENUMERATION) { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 69) - { - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 74) - { - service->exiMsg.V2G_Message.Body.ServicePaymentSelectionRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 54) - { - service->exiMsg.V2G_Message.Body.PaymentDetailsRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 35) - { - service->exiMsg.V2G_Message.Body.MeteringReceiptRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->ResponseCode = service->val.enumeration; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->ResponseCode = service->val.enumeration; - } - + if(service->idPath.id[2] == 50) + { + service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode=service->val.enumeration; + + } else if(service->idPath.id[2] == 55) + { + service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode=service->val.enumeration; + + } else if(service->idPath.id[2] == 35) + { + service->v2gMsg.Body.PaymentDetailsRes.ResponseCode=service->val.enumeration; + + } else if(service->idPath.id[2] == 43) + { + service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode=service->val.enumeration; + + } else if(service->idPath.id[2] == 13) + { + service->v2gMsg.Body.LineLockRes.ResponseCode=service->val.enumeration; + + } else if(service->idPath.id[2] == 39) + { + service->v2gMsg.Body.PowerDeliveryRes.ResponseCode=service->val.enumeration; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.ResponseCode=service->val.enumeration; + + } else if(service->idPath.id[2] == 19) + { + service->v2gMsg.Body.MeteringReceiptRes.ResponseCode=service->val.enumeration; + + } else if(service->idPath.id[2] == 61) + { + service->v2gMsg.Body.SessionSetupRes.ResponseCode=service->val.enumeration; + + } } else { return -1; /* wrong data type */ } - break; - case 16: /*EVSEID*/ - + case 3: /*EVSEID*/ + if(service->val.type == BINARY_HEX) - { - if( service->idPath.id[2] == 80) - { - memcpy(service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEID.data, service->val.binary.data,service->val.binary.len); - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEID.arraylen.data = service->val.binary.len; - - } else if(service->idPath.id[2] == 39) - { - memcpy(service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEID.data, service->val.binary.data,service->val.binary.len); - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEID.arraylen.data = service->val.binary.len; - } + { + /* array copy and array length assignment */ + memcpy(service->v2gMsg.Body.SessionSetupRes.EVSEID.data, service->val.binary.data,service->val.binary.len); + service->v2gMsg.Body.SessionSetupRes.EVSEID.arraylen.data = service->val.binary.len; + /* array copy and array length assignment */ + memcpy(service->v2gMsg.Body.MeteringStatusRes.EVSEID.data, service->val.binary.data,service->val.binary.len); + service->v2gMsg.Body.MeteringStatusRes.EVSEID.arraylen.data = service->val.binary.len; + } else { return -1; /* wrong data type */ } - break; - case 82: /*TCurrent*/ - - if(service->val.type == INTEGER_32) + case 63: /*TCurrent*/ + if(service->val.type == INTEGER_32) { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->TCurrent = service->val.int32; - - } else if(service->idPath.id[2] == 54) - { - service->exiMsg.V2G_Message.Body.PaymentDetailsRes->TCurrent = service->val.int32; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->TCurrent = service->val.int32; - } - + service->v2gMsg.Body.SessionSetupRes.TCurrent=service->val.int32; } else { return -1; /* wrong data type */ } - break; - case 18: /*EVSEMaxPhases*/ - - if(service->val.type == INTEGER_16) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxPhases = service->val.int32; - + case 16: /*MeteringAuthPubKey*/ + + if(service->val.type == BINARY_HEX) + { + /* array copy and array length assignment */ + memcpy(service->v2gMsg.Body.ServicePaymentSelectionRes.MeteringAuthPubKey.data, service->val.binary.data,service->val.binary.len); + service->v2gMsg.Body.ServicePaymentSelectionRes.MeteringAuthPubKey.arraylen.data = service->val.binary.len; + } else { return -1; /* wrong data type */ } - + /* is used */ + service->v2gMsg.Body.ServicePaymentSelectionRes.isused.MeteringAuthPubKey=1; break; - case 26: /*EnergyProvider*/ - - if(service->val.type == STRING) + case 5: /*EVSEMaxPhases*/ + if(service->val.type == INTEGER_16) { - memcpy(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EnergyProvider.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EnergyProvider.arraylen.data = service->val.string.len; - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->isused.EnergyProvider=1; - + service->v2gMsg.Body.PowerDiscoveryRes.EVSEMaxPhases=service->val.int32; } else { return -1; /* wrong data type */ } + break; + case 9: /*EnergyProvider*/ + + if(service->val.type == STRING) + { + /* string copy and string length assignment */ + memcpy(service->v2gMsg.Body.PowerDiscoveryRes.EnergyProvider.data, service->val.string.codepoints,service->val.string.len); + service->v2gMsg.Body.PowerDiscoveryRes.EnergyProvider.arraylen.data = service->val.string.len; + + } + else + { + return -1; /* wrong data type */ + } + + /* is used */ + service->v2gMsg.Body.PowerDiscoveryRes.isused.EnergyProvider=1; break; } /* close switch(service->eqn.localPart) */ break; case 5: switch(service->eqn.localPart) { - case 36: /*SessionID*/ - + case 34: /*SessionID*/ + if(service->val.type == BINARY_HEX) - { - memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.SessionID.data, service->val.binary.data,service->val.binary.len); - service->exiMsg.V2G_Message.Header->SessionInformation.SessionID.arraylen.data = service->val.binary.len; - + { + /* array copy and array length assignment */ + memcpy(service->v2gMsg.Header.SessionInformation.SessionID.data, service->val.binary.data,service->val.binary.len); + service->v2gMsg.Header.SessionInformation.SessionID.arraylen.data = service->val.binary.len; + } else { return -1; /* wrong data type */ } - break; - case 34: /*ServiceSessionID*/ - + case 32: /*ServiceSessionID*/ + if(service->val.type == BINARY_HEX) - { - memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.ServiceSessionID.data, service->val.binary.data,service->val.binary.len); - service->exiMsg.V2G_Message.Header->SessionInformation.ServiceSessionID.arraylen.data = service->val.binary.len; - service->exiMsg.V2G_Message.Header->SessionInformation.isused.ServiceSessionID=1; - + { + /* array copy and array length assignment */ + memcpy(service->v2gMsg.Header.SessionInformation.ServiceSessionID.data, service->val.binary.data,service->val.binary.len); + service->v2gMsg.Header.SessionInformation.ServiceSessionID.arraylen.data = service->val.binary.len; + } else { return -1; /* wrong data type */ } - + /* is used */ + service->v2gMsg.Header.SessionInformation.isused.ServiceSessionID=1; break; - case 25: /*ProtocolVersion*/ - - if(service->val.type == STRING) - { - memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.ProtocolVersion.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Header->SessionInformation.ProtocolVersion.arraylen.data = service->val.string.len; - service->exiMsg.V2G_Message.Header->SessionInformation.isused.ProtocolVersion=1; + case 24: /*ProtocolVersion*/ + + if(service->val.type == STRING) + { + /* string copy and string length assignment */ + memcpy(service->v2gMsg.Header.SessionInformation.ProtocolVersion.data, service->val.string.codepoints,service->val.string.len); + service->v2gMsg.Header.SessionInformation.ProtocolVersion.arraylen.data = service->val.string.len; + } else { return -1; /* wrong data type */ } - + /* is used */ + service->v2gMsg.Header.SessionInformation.isused.ProtocolVersion=1; break; - case 10: /*Event*/ - - if(service->val.type == ENUMERATION) + case 13: /*FaultCode*/ + if(service->val.type == ENUMERATION) { - service->exiMsg.V2G_Message.Header->Notification.EventList.Event = service->val.enumeration; - + service->v2gMsg.Header.Notification.FaultCode=service->val.enumeration; } else { return -1; /* wrong data type */ } - + /* is used */ + service->v2gMsg.Header.Notification.isused.FaultCode=1; break; - case 14: /*FaultCode*/ - - if(service->val.type == ENUMERATION) - { - service->exiMsg.V2G_Message.Header->Notification.FaultCode = service->val.enumeration; - service->exiMsg.V2G_Message.Header->Notification.isused.FaultCode=1; + case 14: /*FaultMsg*/ + + if(service->val.type == STRING) + { + /* string copy and string length assignment */ + memcpy(service->v2gMsg.Header.Notification.FaultMsg.data, service->val.string.codepoints,service->val.string.len); + service->v2gMsg.Header.Notification.FaultMsg.arraylen.data = service->val.string.len; + } else { return -1; /* wrong data type */ } - + /* is used */ + service->v2gMsg.Header.Notification.isused.FaultMsg=1; break; - case 15: /*FaultMsg*/ - - if(service->val.type == STRING) + case 12: /*FatalError*/ + if(service->val.type == BOOLEAN) { - 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; - + if(service->idPath.id[2] == 61) + { + service->v2gMsg.Body.SessionSetupRes.EVSEStatus.FatalError=service->val.boolean; + + } else if(service->idPath.id[2] == 43) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEStatus.FatalError=service->val.boolean; + + } else if(service->idPath.id[2] == 13) + { + service->v2gMsg.Body.LineLockRes.EVSEStatus.FatalError=service->val.boolean; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.FatalError=service->val.boolean; + + } } else { return -1; /* wrong data type */ } - break; - case 13: /*FatalError*/ - - if(service->val.type == BOOLEAN) + case 7: /*EVSEStandby*/ + if(service->val.type == BOOLEAN) { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.FatalError = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.FatalError = service->val.boolean; - } - + if(service->idPath.id[2] == 61) + { + service->v2gMsg.Body.SessionSetupRes.EVSEStatus.EVSEStandby=service->val.boolean; + + } else if(service->idPath.id[2] == 43) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEStatus.EVSEStandby=service->val.boolean; + + } else if(service->idPath.id[2] == 13) + { + service->v2gMsg.Body.LineLockRes.EVSEStatus.EVSEStandby=service->val.boolean; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.EVSEStandby=service->val.boolean; + + } } else { return -1; /* wrong data type */ } - - break; - case 8: /*EVSEStandby*/ - - if(service->val.type == BOOLEAN) - { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.EVSEStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.EVSEStandby = service->val.boolean; - } - - } - else - { - return -1; /* wrong data type */ - } - - break; case 4: /*ConnectorLocked*/ - - if(service->val.type == BOOLEAN) + if(service->val.type == BOOLEAN) { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.ConnectorLocked = service->val.boolean; - } - + if(service->idPath.id[2] == 61) + { + service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ConnectorLocked=service->val.boolean; + + } else if(service->idPath.id[2] == 43) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEStatus.ConnectorLocked=service->val.boolean; + + } else if(service->idPath.id[2] == 13) + { + service->v2gMsg.Body.LineLockRes.EVSEStatus.ConnectorLocked=service->val.boolean; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.ConnectorLocked=service->val.boolean; + + } } else { return -1; /* wrong data type */ } - break; - case 24: /*PowerSwitchClosed*/ - - if(service->val.type == BOOLEAN) + case 23: /*PowerSwitchClosed*/ + if(service->val.type == BOOLEAN) { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.PowerSwitchClosed = service->val.boolean; - } - + if(service->idPath.id[2] == 61) + { + service->v2gMsg.Body.SessionSetupRes.EVSEStatus.PowerSwitchClosed=service->val.boolean; + + } else if(service->idPath.id[2] == 43) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEStatus.PowerSwitchClosed=service->val.boolean; + + } else if(service->idPath.id[2] == 13) + { + service->v2gMsg.Body.LineLockRes.EVSEStatus.PowerSwitchClosed=service->val.boolean; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.PowerSwitchClosed=service->val.boolean; + + } } else { return -1; /* wrong data type */ } - break; - case 26: /*RCD*/ - - if(service->val.type == BOOLEAN) + case 25: /*RCD*/ + if(service->val.type == BOOLEAN) { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.RCD = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.RCD = service->val.boolean; - } - + if(service->idPath.id[2] == 61) + { + service->v2gMsg.Body.SessionSetupRes.EVSEStatus.RCD=service->val.boolean; + + } else if(service->idPath.id[2] == 43) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEStatus.RCD=service->val.boolean; + + } else if(service->idPath.id[2] == 13) + { + service->v2gMsg.Body.LineLockRes.EVSEStatus.RCD=service->val.boolean; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.RCD=service->val.boolean; + + } } else { return -1; /* wrong data type */ } - break; - case 38: /*ShutDownTime*/ - - if(service->val.type == INTEGER_32) + case 36: /*ShutDownTime*/ + if(service->val.type == INTEGER_32) { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.ShutDownTime = service->val.int32; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.ShutDownTime = service->val.int32; - } - + if(service->idPath.id[2] == 61) + { + service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ShutDownTime=service->val.int32; + + } else if(service->idPath.id[2] == 43) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEStatus.ShutDownTime=service->val.int32; + + } else if(service->idPath.id[2] == 13) + { + service->v2gMsg.Body.LineLockRes.EVSEStatus.ShutDownTime=service->val.int32; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.ShutDownTime=service->val.int32; + + } } else { return -1; /* wrong data type */ } - break; - case 0: /*ChargerStandby*/ - - if(service->val.type == BOOLEAN) - { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.ChargerStandby = service->val.boolean; - } - - } - else - { - return -1; /* wrong data type */ - } + case 28: /*ServiceID*/ - - break; - case 7: /*EVSEMalfunction*/ - - if(service->val.type == BOOLEAN) - { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.EVSEMalfunction = service->val.boolean; - } - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 39: /*StopCharging*/ - - if(service->val.type == BOOLEAN) - { - if( service->idPath.id[2] == 80) - { - service->exiMsg.V2G_Message.Body.SessionSetupRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 30) - { - service->exiMsg.V2G_Message.Body.LineLockRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 58) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 39) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 2) - { - service->exiMsg.V2G_Message.Body.CableCheckRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEStatus.StopCharging = service->val.boolean; - - } else if(service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEStatus.StopCharging = service->val.boolean; - } - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 30: /*ServiceID*/ - if(service->val.type == BINARY_HEX) - { - memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceID.data, service->val.binary.data,service->val.binary.len); - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceID.arraylen.data = service->val.binary.len; - + { + /* array copy and array length assignment */ + memcpy(service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceID.data, service->val.binary.data,service->val.binary.len); + service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceID.arraylen.data = service->val.binary.len; + } else { return -1; /* wrong data type */ } - break; - case 32: /*ServiceName*/ - - if(service->val.type == STRING) - { - memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceName.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceName.arraylen.data = service->val.string.len; - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].isused.ServiceName=1; + case 30: /*ServiceName*/ + + if(service->val.type == STRING) + { + /* string copy and string length assignment */ + memcpy(service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceName.data, service->val.string.codepoints,service->val.string.len); + service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceName.arraylen.data = service->val.string.len; + } else { return -1; /* wrong data type */ } - + /* is used */ + service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceName=1; break; - case 35: /*ServiceType*/ - - if(service->val.type == ENUMERATION) + case 33: /*ServiceType*/ + if(service->val.type == ENUMERATION) { - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceType = service->val.enumeration; - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].isused.ServiceType=1; - + service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceType=service->val.enumeration; } else { return -1; /* wrong data type */ } - + /* is used */ + service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceType=1; break; - case 33: /*ServiceScope*/ - - if(service->val.type == STRING) - { - memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceScope.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].ServiceScope.arraylen.data = service->val.string.len; - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.Service[service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service].isused.ServiceScope=1; + case 31: /*ServiceScope*/ + + if(service->val.type == STRING) + { + /* string copy and string length assignment */ + memcpy(service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceScope.data, service->val.string.codepoints,service->val.string.len); + service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceScope.arraylen.data = service->val.string.len; + } else { return -1; /* wrong data type */ } - + /* is used */ + service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceScope=1; break; - case 21: /*Multiplier*/ - - if(service->val.type == INTEGER_16) + case 20: /*Multiplier*/ + if(service->val.type == ENUMERATION) { - if( service->idPath.id[3] == 20) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 22) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMinVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 17) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 21) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMinCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 19) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEMaxPower.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 41) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->PCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 23) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEPresentVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[4] == 19) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterReading.Multiplier = service->val.int32; - - } else if(service->idPath.id[7] == 49) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].TariffPMax.Multiplier = service->val.int32; - - } else if(service->idPath.id[7] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].EPrice.Multiplier = service->val.int32; - } - + if(service->idPath.id[3] == 2) + { + service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 28) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPower.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 29) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxVoltage.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 30) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMinVoltage.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 8) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEVoltage.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 4) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEIMax.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 6) + { + service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 25) + { + service->v2gMsg.Body.MeteringStatusRes.PCurrent.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[2] == 37) + { + service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryMaxPower.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[7] == 46) + { + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].TariffPMax.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[7] == 6) + { + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].EPrice.Multiplier=service->val.enumeration; + + } } else { return -1; /* wrong data type */ } - break; - case 52: /*Unit*/ - - if(service->val.type == ENUMERATION) + case 49: /*Unit*/ + if(service->val.type == ENUMERATION) { - if( service->idPath.id[3] == 20) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxVoltage.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 22) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMinVoltage.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 17) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxCurrent.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 21) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMinCurrent.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 19) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEMaxPower.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 41) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->PCurrent.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 23) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEPresentVoltage.Unit = service->val.enumeration; - - } else if(service->idPath.id[4] == 19) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterReading.Unit = service->val.enumeration; - - } else if(service->idPath.id[7] == 49) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].TariffPMax.Unit = service->val.enumeration; - - } else if(service->idPath.id[7] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].EPrice.Unit = service->val.enumeration; - } - + if(service->idPath.id[3] == 2) + { + service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 28) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPower.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 29) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxVoltage.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 30) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMinVoltage.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 8) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEVoltage.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 4) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEIMax.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 6) + { + service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 25) + { + service->v2gMsg.Body.MeteringStatusRes.PCurrent.Unit=service->val.enumeration; + + } else if(service->idPath.id[2] == 37) + { + service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryMaxPower.Unit=service->val.enumeration; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Unit=service->val.enumeration; + + } else if(service->idPath.id[7] == 46) + { + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].TariffPMax.Unit=service->val.enumeration; + + } else if(service->idPath.id[7] == 6) + { + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].EPrice.Unit=service->val.enumeration; + + } } else { return -1; /* wrong data type */ } - break; - case 53: /*Value*/ - - if(service->val.type == INTEGER_32) + case 50: /*Value*/ + if(service->val.type == INTEGER_32) { - if( service->idPath.id[3] == 20) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxVoltage.Value = service->val.int32; - - } else if(service->idPath.id[3] == 22) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMinVoltage.Value = service->val.int32; - - } else if(service->idPath.id[3] == 17) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMaxCurrent.Value = service->val.int32; - - } else if(service->idPath.id[3] == 21) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->EVSEMinCurrent.Value = service->val.int32; - - } else if(service->idPath.id[3] == 19) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->EVSEMaxPower.Value = service->val.int32; - - } else if(service->idPath.id[3] == 41) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->PCurrent.Value = service->val.int32; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 62) - { - service->exiMsg.V2G_Message.Body.PreChargeRes->EVSEPresentVoltage.Value = service->val.int32; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 12) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentVoltage.Value = service->val.int32; - - } else if(service->idPath.id[3] == 23) - { - service->exiMsg.V2G_Message.Body.CurrentDemandRes->EVSEPresentCurrent.Value = service->val.int32; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 92) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionRes->EVSEPresentVoltage.Value = service->val.int32; - - } else if(service->idPath.id[3] == 24 && service->idPath.id[2] == 87) - { - service->exiMsg.V2G_Message.Body.TerminateChargingRes->EVSEPresentVoltage.Value = service->val.int32; - - } else if(service->idPath.id[4] == 19) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterReading.Value = service->val.int32; - - } else if(service->idPath.id[7] == 49) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].TariffPMax.Value = service->val.int32; - - } else if(service->idPath.id[7] == 6) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].EPrice.Value = service->val.int32; - } - + if(service->idPath.id[3] == 2) + { + service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Value=service->val.int32; + + } else if(service->idPath.id[3] == 28) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPower.Value=service->val.int32; + + } else if(service->idPath.id[3] == 29) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxVoltage.Value=service->val.int32; + + } else if(service->idPath.id[3] == 30) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMinVoltage.Value=service->val.int32; + + } else if(service->idPath.id[3] == 8) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEVoltage.Value=service->val.int32; + + } else if(service->idPath.id[3] == 4) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEIMax.Value=service->val.int32; + + } else if(service->idPath.id[3] == 6) + { + service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Value=service->val.int32; + + } else if(service->idPath.id[3] == 25) + { + service->v2gMsg.Body.MeteringStatusRes.PCurrent.Value=service->val.int32; + + } else if(service->idPath.id[2] == 37) + { + service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryMaxPower.Value=service->val.int32; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Value=service->val.int32; + + } else if(service->idPath.id[7] == 46) + { + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].TariffPMax.Value=service->val.int32; + + } else if(service->idPath.id[7] == 6) + { + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].EPrice.Value=service->val.int32; + + } } else { return -1; /* wrong data type */ } - break; - case 50: /*TariffStart*/ - - if(service->val.type == UNSIGNED_INTEGER_32) + case 45: /*TariffID*/ + if(service->val.type == ENUMERATION) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].TariffStart = service->val.uint32; - + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffID=service->val.enumeration; } else { return -1; /* wrong data type */ } - break; - case 48: /*TariffID*/ - - if(service->val.type == ENUMERATION) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffID = service->val.enumeration; + case 40: /*TariffDescription*/ + + if(service->val.type == STRING) + { + /* string copy and string length assignment */ + memcpy(service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffDescription.data, service->val.string.codepoints,service->val.string.len); + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffDescription.arraylen.data = service->val.string.len; + } else { return -1; /* wrong data type */ } - + /* is used */ + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].isused.TariffDescription=1; break; - case 43: /*TariffDescription*/ - - if(service->val.type == STRING) + case 19: /*MeterStatus*/ + if(service->val.type == INTEGER_16) { - memcpy(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffDescription.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffDescription.arraylen.data = service->val.string.len; - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].isused.TariffDescription=1; - + if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterStatus=service->val.int32; + + } else if(service->idPath.id[2] == 17) + { + service->v2gMsg.Body.MeteringReceiptReq.MeterInfo.MeterStatus=service->val.int32; + + } } else { return -1; /* wrong data type */ } - + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterStatus=1; break; - case 5: /*Currency*/ - - if(service->val.type == STRING) + case 37: /*TMeter*/ + if(service->val.type == INTEGER_32) { - memcpy(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Currency.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Currency.arraylen.data = service->val.string.len; - + if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.TMeter=service->val.int32; + + } else if(service->idPath.id[2] == 17) + { + service->v2gMsg.Body.MeteringReceiptReq.MeterInfo.TMeter=service->val.int32; + + } } else { return -1; /* wrong data type */ } - - break; - case 17: /*MeterID*/ - - if(service->val.type == STRING) - { - memcpy(service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterID.arraylen.data = service->val.string.len; - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.isused.MeterID=1; - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 20: /*MeterStatus*/ - - if(service->val.type == INTEGER_16) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.MeterStatus = service->val.int32; - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.isused.MeterStatus=1; - - } - else - { - return -1; /* wrong data type */ - } - - - break; - case 40: /*TMeter*/ - - if(service->val.type == INTEGER_32) - { - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.TMeter = service->val.int32; - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.isused.TMeter=1; - - } - else - { - return -1; /* wrong data type */ - } - - + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.TMeter=1; break; } /* close switch(service->eqn.localPart) */ break; @@ -2189,81 +1317,169 @@ static int deserializeElementCharacter(struct EXIService* service) * Deserialize an element of the EXI stream * @return 0 = 0K; -1 = ERROR */ -static int deserializeElement(struct EXIService* service) +static int deserializeElement(struct v2gService* service) { switch(service->eqn.namespaceURI) { case 4: switch(service->eqn.localPart) { - case 71:/* ServiceList */ + case 52:/* ServiceList */ - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->isused.ServiceList=1; - + /* is used */ + service->v2gMsg.Body.ServiceDiscoveryRes.isused.ServiceList=1; break; - case 84:/* TariffTable */ + case 16:/* MeteringAuthPubKey */ - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->isused.TariffTable=1; - + /* is used */ + service->v2gMsg.Body.ServicePaymentSelectionRes.isused.MeteringAuthPubKey=1; break; - case 41:/* PCurrent */ + case 9:/* EnergyProvider */ - service->exiMsg.V2G_Message.Body.MeteringStatusRes->isused.PCurrent=1; - + /* is used */ + service->v2gMsg.Body.PowerDiscoveryRes.isused.EnergyProvider=1; break; - case 32:/* MeterInfo */ + case 65:/* TariffTable */ - service->exiMsg.V2G_Message.Body.MeteringStatusRes->isused.MeterInfo=1; - + /* is used */ + service->v2gMsg.Body.PowerDiscoveryRes.isused.TariffTable=1; break; + case 25:/* PCurrent */ + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.isused.PCurrent=1; + break; + case 15:/* MeterInfo */ + + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.isused.MeterInfo=1; + break; + case 61:/* SessionSetupRes */ + + /* is used */ + service->v2gMsg.Body.isused.SessionSetupRes=1; + break; + case 50:/* ServiceDiscoveryRes */ + + /* is used */ + service->v2gMsg.Body.isused.ServiceDiscoveryRes=1; + break; + case 55:/* ServicePaymentSelectionRes */ + + /* is used */ + service->v2gMsg.Body.isused.ServicePaymentSelectionRes=1; + break; + case 35:/* PaymentDetailsRes */ + + /* is used */ + service->v2gMsg.Body.isused.PaymentDetailsRes=1; + break; + case 43:/* PowerDiscoveryRes */ + + /* is used */ + service->v2gMsg.Body.isused.PowerDiscoveryRes=1; + break; + case 13:/* LineLockRes */ + + /* is used */ + service->v2gMsg.Body.isused.LineLockRes=1; + break; + case 39:/* PowerDeliveryRes */ + + /* is used */ + service->v2gMsg.Body.isused.PowerDeliveryRes=1; + break; + case 23:/* MeteringStatusRes */ + + /* is used */ + service->v2gMsg.Body.isused.MeteringStatusRes=1; + break; + case 19:/* MeteringReceiptRes */ + + /* is used */ + service->v2gMsg.Body.isused.MeteringReceiptRes=1; + break; } - break; - case 5: + break;case 5: switch(service->eqn.localPart) { - case 11:/* EventList */ + case 32:/* ServiceSessionID */ - service->exiMsg.V2G_Message.Header->Notification.isused.EventList=1; - + /* is used */ + service->v2gMsg.Header.SessionInformation.isused.ServiceSessionID=1; break; - case 28:/* Service */ + case 24:/* ProtocolVersion */ - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes->ServiceList.arraylen.Service++; - + /* is used */ + service->v2gMsg.Header.SessionInformation.isused.ProtocolVersion=1; + break; + case 13:/* FaultCode */ + + /* is used */ + service->v2gMsg.Header.Notification.isused.FaultCode=1; + break; + case 14:/* FaultMsg */ + + /* is used */ + service->v2gMsg.Header.Notification.isused.FaultMsg=1; + break; + case 10:/* EventList */ + + /* is used */ + service->v2gMsg.Header.Notification.isused.EventList=1; + break; + case 30:/* ServiceName */ + + /* is used */ + service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceName=1; + break; + case 33:/* ServiceType */ + + /* is used */ + service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceType=1; + break; + case 31:/* ServiceScope */ + + /* is used */ + service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceScope=1; break; case 6:/* EPrice */ - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].isused.EPrice=1; - + /* is used */ + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].isused.EPrice=1; break; - case 46:/* TariffEntry */ + case 40:/* TariffDescription */ - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.Tariff[service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry++; - + /* is used */ + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].isused.TariffDescription=1; break; - case 41:/* Tariff */ + case 16:/* MeterID */ - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes->TariffTable.arraylen.Tariff++; - + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterID=1; break; - case 19:/* MeterReading */ + case 18:/* MeterReading */ - service->exiMsg.V2G_Message.Body.MeteringStatusRes->MeterInfo.isused.MeterReading=1; - + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterReading=1; break; + case 19:/* MeterStatus */ + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterStatus=1; + break; + case 37:/* TMeter */ + + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.TMeter=1; + break; } - break; - case 7: + break;case 6: switch(service->eqn.localPart) { - case 1:/* Notification */ + case 6:/* Notification */ - service->exiMsg.V2G_Message.Header->isused.Notification=1; - + /* is used */ + service->v2gMsg.Header.isused.Notification=1; break; - } break; - - } return 0; } @@ -2275,7 +1491,7 @@ static int deserializeElement(struct EXIService* service) * Deserialize the EXI stream * @return 0 = 0K; -1 = ERROR */ -static int deserializeMessage(struct EXIService* service) +static int deserializeMessage(struct v2gService* service) { int noEndOfDocument = 1; /* true */ int returnCode=0; @@ -2335,7 +1551,7 @@ static int deserializeMessage(struct EXIService* service) /* Initialize the v2g client */ -int init_v2gServiceClient(struct EXIService* service, bytes_t bytes, string_ucs_t string, uint8_t* inStream, size_t max_inStream_size, uint8_t* outStream, size_t max_outStream_size, uint16_t transportHeaderOffset) +int init_v2gServiceClient(struct v2gService* service, bytes_t bytes, string_ucs_t string, uint8_t* inStream, size_t max_inStream_size, uint8_t* outStream, size_t max_outStream_size, uint16_t transportHeaderOffset) { /* init byte array */ diff --git a/src/service/v2g_serviceClientStubs.h b/src/service/v2g_serviceClientStubs.h index e6b102e..ebfa4b7 100644 --- a/src/service/v2g_serviceClientStubs.h +++ b/src/service/v2g_serviceClientStubs.h @@ -3,7 +3,7 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -22,7 +22,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -40,176 +40,63 @@ extern "C" { #include "v2g_serviceDataTypes.h" #include "v2g_serviceClientStubs.h" -/** - * \brief Calls the remote sessionSetup method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct SessionSetupReqType* Request data for the server (has to be set up before) - * \param result struct SessionSetupResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_sessionSetup(struct EXIService* service, struct HeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result); + /* call sessionSetup */ + int call_sessionSetup(struct v2gService* service, struct HeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result); -/** - * \brief Calls the remote serviceDiscovery method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct ServiceDiscoveryReqType* Request data for the server (has to be set up before) - * \param result struct ServiceDiscoveryResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_serviceDiscovery(struct EXIService* service, struct HeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result); + /* call serviceDiscovery */ + int call_serviceDiscovery(struct v2gService* service, struct HeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result); -/** - * \brief Calls the remote selectedServicePayment method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct ServicePaymentSelectionReqType* Request data for the server (has to be set up before) - * \param result struct ServicePaymentSelectionResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_selectedServicePayment(struct EXIService* service, struct HeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result); + /* call selectedServicePayment */ + int call_selectedServicePayment(struct v2gService* service, struct HeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result); -/** - * \brief Calls the remote paymentDetails method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct PaymentDetailsReqType* Request data for the server (has to be set up before) - * \param result struct PaymentDetailsResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_paymentDetails(struct EXIService* service, struct HeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result); + /* call paymentDetails */ + int call_paymentDetails(struct v2gService* service, struct HeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result); -/** - * \brief Calls the remote chargeParameterDiscovery method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct ChargeParameterDiscoveryReqType* Request data for the server (has to be set up before) - * \param result struct ChargeParameterDiscoveryResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_chargeParameterDiscovery(struct EXIService* service, struct HeaderType* header, struct ChargeParameterDiscoveryReqType* params, struct ChargeParameterDiscoveryResType* result); + /* call powerDiscovery */ + int call_powerDiscovery(struct v2gService* service, struct HeaderType* header, struct PowerDiscoveryReqType* params, struct PowerDiscoveryResType* result); -/** - * \brief Calls the remote lineLock method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct LineLockReqType* Request data for the server (has to be set up before) - * \param result struct LineLockResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_lineLock(struct EXIService* service, struct HeaderType* header, struct LineLockReqType* params, struct LineLockResType* result); + /* call lineLock */ + int call_lineLock(struct v2gService* service, struct HeaderType* header, struct LineLockReqType* params, struct LineLockResType* result); -/** - * \brief Calls the remote powerDelivery method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct PowerDeliveryReqType* Request data for the server (has to be set up before) - * \param result struct PowerDeliveryResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_powerDelivery(struct EXIService* service, struct HeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result); + /* call powerDelivery */ + int call_powerDelivery(struct v2gService* service, struct HeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result); -/** - * \brief Calls the remote meteringStatus method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param result struct MeteringStatusResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_meteringStatus(struct EXIService* service, struct HeaderType* header, struct MeteringStatusResType* result); + /* call meteringStatus */ + int call_meteringStatus(struct v2gService* service, struct HeaderType* header, struct MeteringStatusResType* result); -/** - * \brief Calls the remote meteringReceipt method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct MeteringReceiptReqType* Request data for the server (has to be set up before) - * \param result struct MeteringReceiptResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_meteringReceipt(struct EXIService* service, struct HeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result); - - - - -/** - * \brief Calls the remote cableCheck method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct CableCheckReqType* Request data for the server (has to be set up before) - * \param result struct CableCheckResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_cableCheck(struct EXIService* service, struct HeaderType* header, struct CableCheckReqType* params, struct CableCheckResType* result); - - - - -/** - * \brief Calls the remote preCharge method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct PreChargeReqType* Request data for the server (has to be set up before) - * \param result struct PreChargeResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_preCharge(struct EXIService* service, struct HeaderType* header, struct PreChargeReqType* params, struct PreChargeResType* result); - - - - -/** - * \brief Calls the remote currentDemand method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct CurrentDemandReqType* Request data for the server (has to be set up before) - * \param result struct CurrentDemandResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_currentDemand(struct EXIService* service, struct HeaderType* header, struct CurrentDemandReqType* params, struct CurrentDemandResType* result); - - - - -/** - * \brief Calls the remote weldingDetection method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct WeldingDetectionReqType* Request data for the server (has to be set up before) - * \param result struct WeldingDetectionResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_weldingDetection(struct EXIService* service, struct HeaderType* header, struct WeldingDetectionReqType* params, struct WeldingDetectionResType* result); - - - - -/** - * \brief Calls the remote terminateCharging method - * \param service struct EXIService* Service data structure (has to be initialized before) - * \param header struct HeaderType* Header data structure - * \param params struct TerminateChargingReqType* Request data for the server (has to be set up before) - * \param result struct TerminateChargingResType* Contains the response data from the server - * \return 0 = 0K; -1 = ERROR */ - int call_terminateCharging(struct EXIService* service, struct HeaderType* header, struct TerminateChargingReqType* params, struct TerminateChargingResType* result); + /* call meteringReceipt */ + int call_meteringReceipt(struct v2gService* service, struct HeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result); - /* Initialize the v2g client */ - int init_v2gServiceClient(struct EXIService* service, bytes_t bytes, string_ucs_t string, uint8_t* inStream, size_t max_inStream_size, uint8_t* outStream, size_t max_outStream_size, uint16_t transportHeaderOffset); +/* Initialize the v2g client */ +int init_v2gServiceClient(struct v2gService* service, bytes_t bytes, string_ucs_t string, uint8_t* inStream, size_t max_inStream_size, uint8_t* outStream, size_t max_outStream_size, uint16_t transportHeaderOffset); #endif diff --git a/src/service/v2g_serviceDataSerialization.c b/src/service/v2g_serviceDataSerialization.c index 71c7786..5523804 100644 --- a/src/service/v2g_serviceDataSerialization.c +++ b/src/service/v2g_serviceDataSerialization.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -19,7 +19,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -27,7 +27,7 @@ #include "v2g_service.h" #include "v2g_serviceDataTypes.h" -/* #include "v2g_serviceDataSerializiation.h" */ +#include "v2g_serviceDataSerializiation.h" #include "EXITypes.h" #include "EXIEncoder.h" @@ -36,20 +36,22 @@ -static int serialize_SessionInformationType(struct SessionInformationType* type, struct EXIService* service) +static int serialize_SessionInformationType(struct SessionInformationType* type, struct v2gService* service) { - + + /* element ID assignment of SessionID*/ service->eqn.namespaceURI=5; - service->eqn.localPart=36; + service->eqn.localPart=34; /* encode start element SessionID */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = BINARY_HEX; service->val.binary.len = type->SessionID.arraylen.data; - service->val.binary.data= type->SessionID.data; + memcpy(service->val.binary.data, type->SessionID.data, service->val.binary.len); /* encode character SessionID */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -57,27 +59,34 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, return -1; } - - - /* encode end element of SessionID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + - - if(type->isused.ServiceSessionID) + + + /* encode end element of SessionID */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }if(type->isused.ServiceSessionID) { - + + /* element ID assignment of ServiceSessionID*/ service->eqn.namespaceURI=5; - service->eqn.localPart=34; + service->eqn.localPart=32; /* encode start element ServiceSessionID */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = BINARY_HEX; service->val.binary.len = type->ServiceSessionID.arraylen.data; - service->val.binary.data= type->ServiceSessionID.data; + memcpy(service->val.binary.data, type->ServiceSessionID.data, service->val.binary.len); /* encode character ServiceSessionID */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -85,29 +94,36 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, return -1; } - - - /* encode end element of ServiceSessionID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + - } - - if(type->isused.ProtocolVersion) + + + /* encode end element of ServiceSessionID */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.ProtocolVersion) { - + + /* element ID assignment of ProtocolVersion*/ service->eqn.namespaceURI=5; - service->eqn.localPart=25; + service->eqn.localPart=24; /* encode start element ProtocolVersion */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = STRING; service->val.string.len = type->ProtocolVersion.arraylen.data; - service->val.string.codepoints = type->ProtocolVersion.data; + memcpy(service->val.string.codepoints, type->ProtocolVersion.data, service->val.string.len); /* encode character ProtocolVersion */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -116,26 +132,34 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, return -1; } - - /* encode end element of ProtocolVersion */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - } + + + /* encode end element of ProtocolVersion */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} return 0; } -static int serialize_EventListType(struct EventListType* type, struct EXIService* service) +static int serialize_EventListType(struct EventListType* type, struct v2gService* service) { - + + /* element ID assignment of Event*/ service->eqn.namespaceURI=5; - service->eqn.localPart=10; + service->eqn.localPart=9; /* encode start element Event */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -149,28 +173,34 @@ static int serialize_EventListType(struct EventListType* type, struct EXIService return -1; } - - /* encode end element of Event */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - + + + /* encode end element of Event */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_NotificationType(struct NotificationType* type, struct EXIService* service) +static int serialize_NotificationType(struct NotificationType* type, struct v2gService* service) { - - if(type->isused.FaultCode) +if(type->isused.FaultCode) { - + + /* element ID assignment of FaultCode*/ service->eqn.namespaceURI=5; - service->eqn.localPart=14; + service->eqn.localPart=13; /* encode start element FaultCode */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -184,27 +214,33 @@ static int serialize_NotificationType(struct NotificationType* type, struct EXIS return -1; } - - /* encode end element of FaultCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.FaultMsg) + + + /* encode end element of FaultCode */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.FaultMsg) { - + + /* element ID assignment of FaultMsg*/ service->eqn.namespaceURI=5; - service->eqn.localPart=15; + service->eqn.localPart=14; /* encode start element FaultMsg */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = STRING; service->val.string.len = type->FaultMsg.arraylen.data; - service->val.string.codepoints = type->FaultMsg.data; + memcpy(service->val.string.codepoints, type->FaultMsg.data, service->val.string.len); /* encode character FaultMsg */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -213,21 +249,28 @@ static int serialize_NotificationType(struct NotificationType* type, struct EXIS return -1; } - - /* encode end element of FaultMsg */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - } - - if(type->isused.EventList) + + + /* encode end element of FaultMsg */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.EventList) { - + + /* element ID assignment of EventList*/ service->eqn.namespaceURI=5; - service->eqn.localPart=11; + service->eqn.localPart=10; /* encode start element EventList */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -238,26 +281,33 @@ static int serialize_NotificationType(struct NotificationType* type, struct EXIS } - - /* encode end element of EventList */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } + + + /* encode end element of EventList */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} return 0; } -static int serialize_HeaderType(struct HeaderType* type, struct EXIService* service) +static int serialize_HeaderType(struct HeaderType* type, struct v2gService* service) { - + + /* element ID assignment of SessionInformation*/ - service->eqn.namespaceURI=7; - service->eqn.localPart=2; + service->eqn.namespaceURI=6; + service->eqn.localPart=7; /* encode start element SessionInformation */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -268,20 +318,26 @@ static int serialize_HeaderType(struct HeaderType* type, struct EXIService* serv } - - /* encode end element of SessionInformation */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - - if(type->isused.Notification) + + + /* encode end element of SessionInformation */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }if(type->isused.Notification) { - + + /* element ID assignment of Notification*/ - service->eqn.namespaceURI=7; - service->eqn.localPart=1; + service->eqn.namespaceURI=6; + service->eqn.localPart=6; /* encode start element Notification */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -292,26 +348,33 @@ static int serialize_HeaderType(struct HeaderType* type, struct EXIService* serv } - - /* encode end element of Notification */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } + + + /* encode end element of Notification */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} return 0; } -static int serialize_PEVStatusType(struct PEVStatusType* type, struct EXIService* service) +static int serialize_PEVStatusType(struct PEVStatusType* type, struct v2gService* service) { - + + /* element ID assignment of ConnectorLocked*/ service->eqn.namespaceURI=5; service->eqn.localPart=4; /* encode start element ConnectorLocked */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -325,10 +388,16 @@ static int serialize_PEVStatusType(struct PEVStatusType* type, struct EXIService return -1; } - - /* encode end element of ConnectorLocked */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of ConnectorLocked */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of ChargerStandby*/ service->eqn.namespaceURI=5; @@ -336,6 +405,7 @@ static int serialize_PEVStatusType(struct PEVStatusType* type, struct EXIService /* encode start element ChargerStandby */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -349,58 +419,40 @@ static int serialize_PEVStatusType(struct PEVStatusType* type, struct EXIService return -1; } - - /* encode end element of ChargerStandby */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - /* element ID assignment of ReadyToCharge*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=27; - /* encode start element ReadyToCharge */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = BOOLEAN; - service->val.boolean=type->ReadyToCharge; - - /* encode character ReadyToCharge */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + /* encode end element of ChargerStandby */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { - return -1; + return -1; } - - - /* encode end element of ReadyToCharge */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - return 0; } -static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struct EXIService* service) +static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struct v2gService* service) { - - if(type->isused.PEVID) +if(type->isused.PEVID) { - + + /* element ID assignment of PEVID*/ service->eqn.namespaceURI=4; - service->eqn.localPart=43; + service->eqn.localPart=26; /* encode start element PEVID */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = STRING; service->val.string.len = type->PEVID.arraylen.data; - service->val.string.codepoints = type->PEVID.data; + memcpy(service->val.string.codepoints, type->PEVID.data, service->val.string.len); /* encode character PEVID */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -409,18 +461,26 @@ static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struc return -1; } - - /* encode end element of PEVID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - } - + + + /* encode end element of PEVID */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + + /* element ID assignment of PEVStatus*/ service->eqn.namespaceURI=4; - service->eqn.localPart=50; + service->eqn.localPart=32; /* encode start element PEVStatus */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -431,25 +491,32 @@ static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struc } - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - + + + /* encode end element of PEVStatus */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_EVSEStatusType(struct EVSEStatusType* type, struct EXIService* service) +static int serialize_EVSEStatusType(struct EVSEStatusType* type, struct v2gService* service) { - + + /* element ID assignment of FatalError*/ service->eqn.namespaceURI=5; - service->eqn.localPart=13; + service->eqn.localPart=12; /* encode start element FatalError */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -463,17 +530,24 @@ static int serialize_EVSEStatusType(struct EVSEStatusType* type, struct EXIServi return -1; } - - /* encode end element of FatalError */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of FatalError */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of EVSEStandby*/ service->eqn.namespaceURI=5; - service->eqn.localPart=8; + service->eqn.localPart=7; /* encode start element EVSEStandby */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -487,10 +561,16 @@ static int serialize_EVSEStatusType(struct EVSEStatusType* type, struct EXIServi return -1; } - - /* encode end element of EVSEStandby */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of EVSEStandby */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of ConnectorLocked*/ service->eqn.namespaceURI=5; @@ -498,6 +578,7 @@ static int serialize_EVSEStatusType(struct EVSEStatusType* type, struct EXIServi /* encode start element ConnectorLocked */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -511,17 +592,24 @@ static int serialize_EVSEStatusType(struct EVSEStatusType* type, struct EXIServi return -1; } - - /* encode end element of ConnectorLocked */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of ConnectorLocked */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of PowerSwitchClosed*/ service->eqn.namespaceURI=5; - service->eqn.localPart=24; + service->eqn.localPart=23; /* encode start element PowerSwitchClosed */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -535,17 +623,24 @@ static int serialize_EVSEStatusType(struct EVSEStatusType* type, struct EXIServi return -1; } - - /* encode end element of PowerSwitchClosed */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of PowerSwitchClosed */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of RCD*/ service->eqn.namespaceURI=5; - service->eqn.localPart=26; + service->eqn.localPart=25; /* encode start element RCD */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -559,17 +654,24 @@ static int serialize_EVSEStatusType(struct EVSEStatusType* type, struct EXIServi return -1; } - - /* encode end element of RCD */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of RCD */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of ShutDownTime*/ service->eqn.namespaceURI=5; - service->eqn.localPart=38; + service->eqn.localPart=36; /* encode start element ShutDownTime */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -583,97 +685,32 @@ static int serialize_EVSEStatusType(struct EVSEStatusType* type, struct EXIServi return -1; } + + + /* encode end element of ShutDownTime */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of ChargerStandby*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=0; - /* encode start element ChargerStandby */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = BOOLEAN; - service->val.boolean=type->ChargerStandby; - - /* encode character ChargerStandby */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { - return -1; - } - - - /* encode end element of ChargerStandby */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEMalfunction*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=7; - /* encode start element EVSEMalfunction */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { return -1; } - - service->val.type = BOOLEAN; - service->val.boolean=type->EVSEMalfunction; - - /* encode character EVSEMalfunction */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of EVSEMalfunction */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of StopCharging*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=39; - /* encode start element StopCharging */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = BOOLEAN; - service->val.boolean=type->StopCharging; - - /* encode character StopCharging */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of StopCharging */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - return 0; } -static int serialize_SessionSetupResType(struct SessionSetupResType* type, struct EXIService* service) +static int serialize_SessionSetupResType(struct SessionSetupResType* type, struct v2gService* service) { - + + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; - service->eqn.localPart=66; + service->eqn.localPart=47; /* encode start element ResponseCode */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -687,22 +724,29 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc return -1; } - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of ResponseCode */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of EVSEID*/ service->eqn.namespaceURI=4; - service->eqn.localPart=16; + service->eqn.localPart=3; /* encode start element EVSEID */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = BINARY_HEX; service->val.binary.len = type->EVSEID.arraylen.data; - service->val.binary.data= type->EVSEID.data; + memcpy(service->val.binary.data, type->EVSEID.data, service->val.binary.len); /* encode character EVSEID */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -710,19 +754,27 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc return -1; } - - - /* encode end element of EVSEID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + + + /* encode end element of EVSEID */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of EVSEStatus*/ service->eqn.namespaceURI=4; - service->eqn.localPart=25; + service->eqn.localPart=7; /* encode start element EVSEStatus */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -733,17 +785,24 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc } - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of EVSEStatus */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of TCurrent*/ service->eqn.namespaceURI=4; - service->eqn.localPart=82; + service->eqn.localPart=63; /* encode start element TCurrent */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -757,28 +816,34 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc return -1; } - - /* encode end element of TCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - + + + /* encode end element of TCurrent */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type, struct EXIService* service) +static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type, struct v2gService* service) { - - if(type->isused.ServiceType) +if(type->isused.ServiceType) { - + + /* element ID assignment of ServiceType*/ service->eqn.namespaceURI=4; - service->eqn.localPart=77; + service->eqn.localPart=58; /* encode start element ServiceType */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -792,27 +857,33 @@ static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* typ return -1; } - - /* encode end element of ServiceType */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.ServiceScope) + + + /* encode end element of ServiceType */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.ServiceScope) { - + + /* element ID assignment of ServiceScope*/ service->eqn.namespaceURI=4; - service->eqn.localPart=76; + service->eqn.localPart=57; /* encode start element ServiceScope */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = STRING; service->val.string.len = type->ServiceScope.arraylen.data; - service->val.string.codepoints = type->ServiceScope.data; + memcpy(service->val.string.codepoints, type->ServiceScope.data, service->val.string.len); /* encode character ServiceScope */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -821,31 +892,39 @@ static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* typ return -1; } - - /* encode end element of ServiceScope */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - } + + + /* encode end element of ServiceScope */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} return 0; } -static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, struct EXIService* service) +static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, struct v2gService* service) { - + + /* element ID assignment of ServiceID*/ service->eqn.namespaceURI=5; - service->eqn.localPart=30; + service->eqn.localPart=28; /* encode start element ServiceID */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = BINARY_HEX; service->val.binary.len = type->ServiceID.arraylen.data; - service->val.binary.data= type->ServiceID.data; + memcpy(service->val.binary.data, type->ServiceID.data, service->val.binary.len); /* encode character ServiceID */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -853,28 +932,35 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, return -1; } - - - /* encode end element of ServiceID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + - - if(type->isused.ServiceName) + + + /* encode end element of ServiceID */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }if(type->isused.ServiceName) { - + + /* element ID assignment of ServiceName*/ service->eqn.namespaceURI=5; - service->eqn.localPart=32; + service->eqn.localPart=30; /* encode start element ServiceName */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = STRING; service->val.string.len = type->ServiceName.arraylen.data; - service->val.string.codepoints = type->ServiceName.data; + memcpy(service->val.string.codepoints, type->ServiceName.data, service->val.string.len); /* encode character ServiceName */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -883,21 +969,28 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, return -1; } - - /* encode end element of ServiceName */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - } - - if(type->isused.ServiceType) + + + /* encode end element of ServiceName */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.ServiceType) { - + + /* element ID assignment of ServiceType*/ service->eqn.namespaceURI=5; - service->eqn.localPart=35; + service->eqn.localPart=33; /* encode start element ServiceType */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -911,27 +1004,33 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, return -1; } - - /* encode end element of ServiceType */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.ServiceScope) + + + /* encode end element of ServiceType */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.ServiceScope) { - + + /* element ID assignment of ServiceScope*/ service->eqn.namespaceURI=5; - service->eqn.localPart=33; + service->eqn.localPart=31; /* encode start element ServiceScope */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = STRING; service->val.string.len = type->ServiceScope.arraylen.data; - service->val.string.codepoints = type->ServiceScope.data; + memcpy(service->val.string.codepoints, type->ServiceScope.data, service->val.string.len); /* encode character ServiceScope */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -940,60 +1039,76 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, return -1; } - - /* encode end element of ServiceScope */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - } + + + /* encode end element of ServiceScope */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} return 0; } -static int serialize_ServiceListType(struct ServiceListType* type, struct EXIService* service) +static int serialize_ServiceListType(struct ServiceListType* type, struct v2gService* service) { size_t i_loop; - for(i_loop=0;i_loop < type->arraylen.Service;i_loop++) - { /* element ID assignment of Service*/ service->eqn.namespaceURI=5; - service->eqn.localPart=28; + service->eqn.localPart=26; /* encode start element Service */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - /* encode children of Service */ - if(serialize_ServiceDescriptionType(&(type->Service[i_loop]),service)) + for(i_loop=0;i_loop < type->arraylen.Service;i_loop++) { - return -1; + /* encode children of Service */ + if(serialize_ServiceDescriptionType(&(type->Service[i_loop]),service)) + { + return -1; + } + } + + + + /* encode end element of Service */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_ServiceDiscoveryResType(struct ServiceDiscoveryResType* type, struct EXIService* service) +static int serialize_ServiceDiscoveryResType(struct ServiceDiscoveryResType* type, struct v2gService* service) { - + + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; - service->eqn.localPart=66; + service->eqn.localPart=47; /* encode start element ResponseCode */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1007,20 +1122,26 @@ static int serialize_ServiceDiscoveryResType(struct ServiceDiscoveryResType* typ return -1; } - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - - if(type->isused.ServiceList) + + + /* encode end element of ResponseCode */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }if(type->isused.ServiceList) { - + + /* element ID assignment of ServiceList*/ service->eqn.namespaceURI=4; - service->eqn.localPart=71; + service->eqn.localPart=52; /* encode start element ServiceList */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1031,26 +1152,33 @@ static int serialize_ServiceDiscoveryResType(struct ServiceDiscoveryResType* typ } - - /* encode end element of ServiceList */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } + + + /* encode end element of ServiceList */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} return 0; } -static int serialize_ServicePaymentSelectionReqType(struct ServicePaymentSelectionReqType* type, struct EXIService* service) +static int serialize_ServicePaymentSelectionReqType(struct ServicePaymentSelectionReqType* type, struct v2gService* service) { - + + /* element ID assignment of ServiceList*/ service->eqn.namespaceURI=4; - service->eqn.localPart=71; + service->eqn.localPart=52; /* encode start element ServiceList */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1061,25 +1189,65 @@ static int serialize_ServicePaymentSelectionReqType(struct ServicePaymentSelecti } - - /* encode end element of ServiceList */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of ServiceList */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } + + /* element ID assignment of PEVPubKey*/ + service->eqn.namespaceURI=4; + service->eqn.localPart=31; + /* encode start element PEVPubKey */ + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } + service->val.type = BINARY_HEX; + service->val.binary.len = type->PEVPubKey.arraylen.data; + memcpy(service->val.binary.data, type->PEVPubKey.data, service->val.binary.len); + /* encode character PEVPubKey */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + { + + return -1; + } + + + + + + + + /* encode end element of PEVPubKey */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_ServicePaymentSelectionResType(struct ServicePaymentSelectionResType* type, struct EXIService* service) +static int serialize_ServicePaymentSelectionResType(struct ServicePaymentSelectionResType* type, struct v2gService* service) { - + + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; - service->eqn.localPart=66; + service->eqn.localPart=47; /* encode start element ResponseCode */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1093,31 +1261,74 @@ static int serialize_ServicePaymentSelectionResType(struct ServicePaymentSelecti return -1; } - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of ResponseCode */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }if(type->isused.MeteringAuthPubKey) + { + + + /* element ID assignment of MeteringAuthPubKey*/ + service->eqn.namespaceURI=4; + service->eqn.localPart=16; + /* encode start element MeteringAuthPubKey */ + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } + service->val.type = BINARY_HEX; + service->val.binary.len = type->MeteringAuthPubKey.arraylen.data; + memcpy(service->val.binary.data, type->MeteringAuthPubKey.data, service->val.binary.len); + /* encode character MeteringAuthPubKey */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + { + + return -1; + } + + + + + + + + /* encode end element of MeteringAuthPubKey */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + return 0; } -static int serialize_PaymentDetailsReqType(struct PaymentDetailsReqType* type, struct EXIService* service) +static int serialize_PaymentDetailsReqType(struct PaymentDetailsReqType* type, struct v2gService* service) { - + + /* element ID assignment of ContractID*/ service->eqn.namespaceURI=4; - service->eqn.localPart=9; + service->eqn.localPart=1; /* encode start element ContractID */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = STRING; service->val.string.len = type->ContractID.arraylen.data; - service->val.string.codepoints = type->ContractID.data; + memcpy(service->val.string.codepoints, type->ContractID.data, service->val.string.len); /* encode character ContractID */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -1126,25 +1337,33 @@ static int serialize_PaymentDetailsReqType(struct PaymentDetailsReqType* type, s return -1; } - - /* encode end element of ContractID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - + + + /* encode end element of ContractID */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_PaymentDetailsResType(struct PaymentDetailsResType* type, struct EXIService* service) +static int serialize_PaymentDetailsResType(struct PaymentDetailsResType* type, struct v2gService* service) { - + + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; - service->eqn.localPart=66; + service->eqn.localPart=47; /* encode start element ResponseCode */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1158,54 +1377,37 @@ static int serialize_PaymentDetailsResType(struct PaymentDetailsResType* type, s return -1; } - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - /* element ID assignment of TCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=82; - /* encode start element TCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = INTEGER_32; - service->val.int32=type->TCurrent; - - /* encode character TCurrent */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + /* encode end element of ResponseCode */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { - return -1; + return -1; } - - - /* encode end element of TCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - return 0; } -static int serialize_FloatingValueType(struct FloatingValueType* type, struct EXIService* service) +static int serialize_FloatingValueType(struct FloatingValueType* type, struct v2gService* service) { - + + /* element ID assignment of Multiplier*/ service->eqn.namespaceURI=5; - service->eqn.localPart=21; + service->eqn.localPart=20; /* encode start element Multiplier */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - service->val.type = INTEGER_16; - service->val.int32=type->Multiplier; + service->val.type = ENUMERATION; + service->val.enumeration=type->Multiplier; /* encode character Multiplier */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -1214,17 +1416,24 @@ static int serialize_FloatingValueType(struct FloatingValueType* type, struct EX return -1; } - - /* encode end element of Multiplier */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of Multiplier */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of Unit*/ service->eqn.namespaceURI=5; - service->eqn.localPart=52; + service->eqn.localPart=49; /* encode start element Unit */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1238,17 +1447,24 @@ static int serialize_FloatingValueType(struct FloatingValueType* type, struct EX return -1; } - - /* encode end element of Unit */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of Unit */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of Value*/ service->eqn.namespaceURI=5; - service->eqn.localPart=53; + service->eqn.localPart=50; /* encode start element Value */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1262,25 +1478,32 @@ static int serialize_FloatingValueType(struct FloatingValueType* type, struct EX return -1; } - - /* encode end element of Value */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - + + + /* encode end element of Value */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_ChargeParameterDiscoveryReqType(struct ChargeParameterDiscoveryReqType* type, struct EXIService* service) +static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, struct v2gService* service) { - + + /* element ID assignment of PEVStatus*/ service->eqn.namespaceURI=4; - service->eqn.localPart=50; + service->eqn.localPart=32; /* encode start element PEVStatus */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1291,41 +1514,24 @@ static int serialize_ChargeParameterDiscoveryReqType(struct ChargeParameterDisco } - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of ChargingMode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=8; - /* encode start element ChargingMode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + + + /* encode end element of PEVStatus */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - service->val.type = ENUMERATION; - service->val.enumeration=type->ChargingMode; - - /* encode character ChargingMode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of ChargingMode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of EoC*/ service->eqn.namespaceURI=4; - service->eqn.localPart=27; + service->eqn.localPart=10; /* encode start element EoC */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1339,17 +1545,24 @@ static int serialize_ChargeParameterDiscoveryReqType(struct ChargeParameterDisco return -1; } - - /* encode end element of EoC */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of EoC */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of EAmount*/ service->eqn.namespaceURI=4; - service->eqn.localPart=15; + service->eqn.localPart=2; /* encode start element EAmount */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1360,17 +1573,24 @@ static int serialize_ChargeParameterDiscoveryReqType(struct ChargeParameterDisco } - - /* encode end element of EAmount */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of EAmount */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of PEVMaxPower*/ service->eqn.namespaceURI=4; - service->eqn.localPart=46; + service->eqn.localPart=28; /* encode start element PEVMaxPower */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1381,17 +1601,24 @@ static int serialize_ChargeParameterDiscoveryReqType(struct ChargeParameterDisco } - - /* encode end element of PEVMaxPower */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of PEVMaxPower */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of PEVMaxPhases*/ service->eqn.namespaceURI=4; - service->eqn.localPart=45; + service->eqn.localPart=27; /* encode start element PEVMaxPhases */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1405,17 +1632,24 @@ static int serialize_ChargeParameterDiscoveryReqType(struct ChargeParameterDisco return -1; } - - /* encode end element of PEVMaxPhases */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of PEVMaxPhases */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of PEVMaxVoltage*/ service->eqn.namespaceURI=4; - service->eqn.localPart=47; + service->eqn.localPart=29; /* encode start element PEVMaxVoltage */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1426,17 +1660,24 @@ static int serialize_ChargeParameterDiscoveryReqType(struct ChargeParameterDisco } - - /* encode end element of PEVMaxVoltage */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of PEVMaxVoltage */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of PEVMinVoltage*/ service->eqn.namespaceURI=4; - service->eqn.localPart=49; + service->eqn.localPart=30; /* encode start element PEVMinVoltage */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1447,67 +1688,32 @@ static int serialize_ChargeParameterDiscoveryReqType(struct ChargeParameterDisco } + + + /* encode end element of PEVMinVoltage */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of PEVMaxCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=44; - /* encode start element PEVMaxCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - - /* encode children of PEVMaxCurrent */ - if(serialize_FloatingValueType( &(type->PEVMaxCurrent),service)) - { - return -1; - } - - - - /* encode end element of PEVMaxCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of PEVMinCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=48; - /* encode start element PEVMinCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PEVMinCurrent */ - if(serialize_FloatingValueType( &(type->PEVMinCurrent),service)) - { - return -1; - } - - - - /* encode end element of PEVMinCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - return 0; } -static int serialize_TariffEntryType(struct TariffEntryType* type, struct EXIService* service) +static int serialize_TariffEntryType(struct TariffEntryType* type, struct v2gService* service) { - + + /* element ID assignment of TariffStart*/ service->eqn.namespaceURI=5; - service->eqn.localPart=50; + service->eqn.localPart=47; /* encode start element TariffStart */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1521,17 +1727,24 @@ static int serialize_TariffEntryType(struct TariffEntryType* type, struct EXISer return -1; } - - /* encode end element of TariffStart */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of TariffStart */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of TariffPMax*/ service->eqn.namespaceURI=5; - service->eqn.localPart=49; + service->eqn.localPart=46; /* encode start element TariffPMax */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1542,20 +1755,26 @@ static int serialize_TariffEntryType(struct TariffEntryType* type, struct EXISer } - - /* encode end element of TariffPMax */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - - if(type->isused.EPrice) + + + /* encode end element of TariffPMax */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }if(type->isused.EPrice) { - + + /* element ID assignment of EPrice*/ service->eqn.namespaceURI=5; service->eqn.localPart=6; /* encode start element EPrice */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1566,60 +1785,75 @@ static int serialize_TariffEntryType(struct TariffEntryType* type, struct EXISer } - - /* encode end element of EPrice */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } + + + /* encode end element of EPrice */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} return 0; } -static int serialize_TariffEntriesType(struct TariffEntriesType* type, struct EXIService* service) +static int serialize_TariffEntriesType(struct TariffEntriesType* type, struct v2gService* service) { size_t i_loop; - for(i_loop=0;i_loop < type->arraylen.TariffEntry;i_loop++) - { /* element ID assignment of TariffEntry*/ service->eqn.namespaceURI=5; - service->eqn.localPart=46; + service->eqn.localPart=43; /* encode start element TariffEntry */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - /* encode children of TariffEntry */ - if(serialize_TariffEntryType(&(type->TariffEntry[i_loop]),service)) + for(i_loop=0;i_loop < type->arraylen.TariffEntry;i_loop++) { - return -1; + /* encode children of TariffEntry */ + if(serialize_TariffEntryType(&(type->TariffEntry[i_loop]),service)) + { + return -1; + } + } - - /* encode end element of TariffEntry */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - } - + + + /* encode end element of TariffEntry */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_TariffDescrType(struct TariffDescrType* type, struct EXIService* service) +static int serialize_TariffDescrType(struct TariffDescrType* type, struct v2gService* service) { - + + /* element ID assignment of TariffID*/ service->eqn.namespaceURI=5; - service->eqn.localPart=48; + service->eqn.localPart=45; /* encode start element TariffID */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1633,26 +1867,32 @@ static int serialize_TariffDescrType(struct TariffDescrType* type, struct EXISer return -1; } - - /* encode end element of TariffID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - - if(type->isused.TariffDescription) + + + /* encode end element of TariffID */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }if(type->isused.TariffDescription) { - + + /* element ID assignment of TariffDescription*/ service->eqn.namespaceURI=5; - service->eqn.localPart=43; + service->eqn.localPart=40; /* encode start element TariffDescription */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = STRING; service->val.string.len = type->TariffDescription.arraylen.data; - service->val.string.codepoints = type->TariffDescription.data; + memcpy(service->val.string.codepoints, type->TariffDescription.data, service->val.string.len); /* encode character TariffDescription */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -1661,18 +1901,26 @@ static int serialize_TariffDescrType(struct TariffDescrType* type, struct EXISer return -1; } - - /* encode end element of TariffDescription */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - } - + + + /* encode end element of TariffDescription */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + + /* element ID assignment of TariffEntries*/ service->eqn.namespaceURI=5; - service->eqn.localPart=44; + service->eqn.localPart=41; /* encode start element TariffEntries */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1683,33 +1931,40 @@ static int serialize_TariffDescrType(struct TariffDescrType* type, struct EXISer } - - /* encode end element of TariffEntries */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - + + + /* encode end element of TariffEntries */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_TariffTableType(struct TariffTableType* type, struct EXIService* service) +static int serialize_TariffTableType(struct TariffTableType* type, struct v2gService* service) { size_t i_loop; - + + /* element ID assignment of Currency*/ service->eqn.namespaceURI=5; service->eqn.localPart=5; /* encode start element Currency */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = STRING; service->val.string.len = type->Currency.arraylen.data; - service->val.string.codepoints = type->Currency.data; + memcpy(service->val.string.codepoints, type->Currency.data, service->val.string.len); /* encode character Currency */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -1718,49 +1973,65 @@ static int serialize_TariffTableType(struct TariffTableType* type, struct EXISer return -1; } - - /* encode end element of Currency */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - for(i_loop=0;i_loop < type->arraylen.Tariff;i_loop++) - { - /* element ID assignment of Tariff*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=41; - /* encode start element Tariff */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + + + + /* encode end element of Currency */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - /* encode children of Tariff */ - if(serialize_TariffDescrType(&(type->Tariff[i_loop]),service)) + /* element ID assignment of Tariff*/ + service->eqn.namespaceURI=5; + service->eqn.localPart=38; + /* encode start element Tariff */ + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { - return -1; + + return -1; } - - /* encode end element of Tariff */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + for(i_loop=0;i_loop < type->arraylen.Tariff;i_loop++) + { + /* encode children of Tariff */ + if(serialize_TariffDescrType(&(type->Tariff[i_loop]),service)) + { + return -1; + } + + } + + + - } - + + + /* encode end element of Tariff */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_ChargeParameterDiscoveryResType(struct ChargeParameterDiscoveryResType* type, struct EXIService* service) +static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, struct v2gService* service) { - + + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; - service->eqn.localPart=66; + service->eqn.localPart=47; /* encode start element ResponseCode */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1774,17 +2045,24 @@ static int serialize_ChargeParameterDiscoveryResType(struct ChargeParameterDisco return -1; } - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of ResponseCode */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of EVSEStatus*/ service->eqn.namespaceURI=4; - service->eqn.localPart=25; + service->eqn.localPart=7; /* encode start element EVSEStatus */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1795,101 +2073,80 @@ static int serialize_ChargeParameterDiscoveryResType(struct ChargeParameterDisco } + + + /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } - /* element ID assignment of EVSEMaxVoltage*/ + /* element ID assignment of EVSEVoltage*/ service->eqn.namespaceURI=4; - service->eqn.localPart=20; - /* encode start element EVSEMaxVoltage */ + service->eqn.localPart=8; + /* encode start element EVSEVoltage */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - /* encode children of EVSEMaxVoltage */ - if(serialize_FloatingValueType( &(type->EVSEMaxVoltage),service)) + /* encode children of EVSEVoltage */ + if(serialize_FloatingValueType( &(type->EVSEVoltage),service)) { return -1; } - - /* encode end element of EVSEMaxVoltage */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of EVSEMinVoltage*/ + + + + /* encode end element of EVSEVoltage */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } + + /* element ID assignment of EVSEIMax*/ service->eqn.namespaceURI=4; - service->eqn.localPart=22; - /* encode start element EVSEMinVoltage */ + service->eqn.localPart=4; + /* encode start element EVSEIMax */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - /* encode children of EVSEMinVoltage */ - if(serialize_FloatingValueType( &(type->EVSEMinVoltage),service)) + /* encode children of EVSEIMax */ + if(serialize_FloatingValueType( &(type->EVSEIMax),service)) { return -1; } - - /* encode end element of EVSEMinVoltage */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of EVSEMaxCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=17; - /* encode start element EVSEMaxCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + + + /* encode end element of EVSEIMax */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - - /* encode children of EVSEMaxCurrent */ - if(serialize_FloatingValueType( &(type->EVSEMaxCurrent),service)) - { - return -1; - } - - - - /* encode end element of EVSEMaxCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEMinCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=21; - /* encode start element EVSEMinCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEMinCurrent */ - if(serialize_FloatingValueType( &(type->EVSEMinCurrent),service)) - { - return -1; - } - - - - /* encode end element of EVSEMinCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - /* element ID assignment of EVSEMaxPhases*/ service->eqn.namespaceURI=4; - service->eqn.localPart=18; + service->eqn.localPart=5; /* encode start element EVSEMaxPhases */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1903,26 +2160,32 @@ static int serialize_ChargeParameterDiscoveryResType(struct ChargeParameterDisco return -1; } - - /* encode end element of EVSEMaxPhases */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - - if(type->isused.EnergyProvider) + + + /* encode end element of EVSEMaxPhases */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }if(type->isused.EnergyProvider) { - + + /* element ID assignment of EnergyProvider*/ service->eqn.namespaceURI=4; - service->eqn.localPart=26; + service->eqn.localPart=9; /* encode start element EnergyProvider */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = STRING; service->val.string.len = type->EnergyProvider.arraylen.data; - service->val.string.codepoints = type->EnergyProvider.data; + memcpy(service->val.string.codepoints, type->EnergyProvider.data, service->val.string.len); /* encode character EnergyProvider */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -1931,21 +2194,28 @@ static int serialize_ChargeParameterDiscoveryResType(struct ChargeParameterDisco return -1; } - - /* encode end element of EnergyProvider */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - } - - if(type->isused.TariffTable) + + + /* encode end element of EnergyProvider */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.TariffTable) { - + + /* element ID assignment of TariffTable*/ service->eqn.namespaceURI=4; - service->eqn.localPart=84; + service->eqn.localPart=65; /* encode start element TariffTable */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1956,26 +2226,33 @@ static int serialize_ChargeParameterDiscoveryResType(struct ChargeParameterDisco } - - /* encode end element of TariffTable */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } + + + /* encode end element of TariffTable */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} return 0; } -static int serialize_LineLockReqType(struct LineLockReqType* type, struct EXIService* service) +static int serialize_LineLockReqType(struct LineLockReqType* type, struct v2gService* service) { - + + /* element ID assignment of PEVStatus*/ service->eqn.namespaceURI=4; - service->eqn.localPart=50; + service->eqn.localPart=32; /* encode start element PEVStatus */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -1986,17 +2263,24 @@ static int serialize_LineLockReqType(struct LineLockReqType* type, struct EXISer } - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of PEVStatus */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of ReqLockStatus*/ service->eqn.namespaceURI=4; - service->eqn.localPart=64; + service->eqn.localPart=45; /* encode start element ReqLockStatus */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2010,25 +2294,32 @@ static int serialize_LineLockReqType(struct LineLockReqType* type, struct EXISer return -1; } - - /* encode end element of ReqLockStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - + + + /* encode end element of ReqLockStatus */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_LineLockResType(struct LineLockResType* type, struct EXIService* service) +static int serialize_LineLockResType(struct LineLockResType* type, struct v2gService* service) { - + + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; - service->eqn.localPart=66; + service->eqn.localPart=47; /* encode start element ResponseCode */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2042,17 +2333,24 @@ static int serialize_LineLockResType(struct LineLockResType* type, struct EXISer return -1; } - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of ResponseCode */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of EVSEStatus*/ service->eqn.namespaceURI=4; - service->eqn.localPart=25; + service->eqn.localPart=7; /* encode start element EVSEStatus */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2063,25 +2361,99 @@ static int serialize_LineLockResType(struct LineLockResType* type, struct EXISer } - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - + + + /* encode end element of EVSEStatus */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, struct EXIService* service) +static int serialize_ChargingProfileType(struct ChargingProfileType* type, struct v2gService* service) { - + + + /* element ID assignment of ChargingProfileEntryStart*/ + service->eqn.namespaceURI=5; + service->eqn.localPart=2; + /* encode start element ChargingProfileEntryStart */ + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } + + service->val.type = INTEGER_32; + service->val.int32=type->ChargingProfileEntryStart; + + /* encode character ChargingProfileEntryStart */ + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + { + + return -1; + } + + + + + + /* encode end element of ChargingProfileEntryStart */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } + + /* element ID assignment of ChargingProfileEntryMaxPower*/ + service->eqn.namespaceURI=5; + service->eqn.localPart=1; + /* encode start element ChargingProfileEntryMaxPower */ + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } + + /* encode children of ChargingProfileEntryMaxPower */ + if(serialize_FloatingValueType( &(type->ChargingProfileEntryMaxPower),service)) + { + return -1; + } + + + + + + + /* encode end element of ChargingProfileEntryMaxPower */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } + + return 0; +} + + +static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, struct v2gService* service) +{ + + /* element ID assignment of PEVStatus*/ service->eqn.namespaceURI=4; - service->eqn.localPart=50; + service->eqn.localPart=32; /* encode start element PEVStatus */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2092,17 +2464,24 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str } - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of PEVStatus */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of ReqSwitchStatus*/ service->eqn.namespaceURI=4; - service->eqn.localPart=65; + service->eqn.localPart=46; /* encode start element ReqSwitchStatus */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2116,20 +2495,26 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str return -1; } - - /* encode end element of ReqSwitchStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - - if(type->isused.Tariff) + + + /* encode end element of ReqSwitchStatus */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }if(type->isused.Tariff) { - + + /* element ID assignment of Tariff*/ service->eqn.namespaceURI=4; - service->eqn.localPart=83; + service->eqn.localPart=64; /* encode start element Tariff */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2143,26 +2528,64 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str return -1; } - - /* encode end element of Tariff */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } + + + /* encode end element of Tariff */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.ChargingProfile) + { + + + /* element ID assignment of ChargingProfile*/ + service->eqn.namespaceURI=4; + service->eqn.localPart=0; + /* encode start element ChargingProfile */ + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } + + /* encode children of ChargingProfile */ + if(serialize_ChargingProfileType( &(type->ChargingProfile),service)) + { + return -1; + } + + + + + + + /* encode end element of ChargingProfile */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} return 0; } -static int serialize_PowerDeliveryResType(struct PowerDeliveryResType* type, struct EXIService* service) +static int serialize_PowerDeliveryResType(struct PowerDeliveryResType* type, struct v2gService* service) { - + + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; - service->eqn.localPart=66; + service->eqn.localPart=47; /* encode start element ResponseCode */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2176,38 +2599,22 @@ static int serialize_PowerDeliveryResType(struct PowerDeliveryResType* type, str return -1; } - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + + + + /* encode end element of ResponseCode */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - - /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) - { - return -1; - } - - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - return 0; } -static int serialize_MeteringStatusReqType(struct MeteringStatusReqType* type, struct EXIService* service) +static int serialize_MeteringStatusReqType(struct MeteringStatusReqType* type, struct v2gService* service) { @@ -2215,24 +2622,25 @@ static int serialize_MeteringStatusReqType(struct MeteringStatusReqType* type, s } -static int serialize_MeterInfoType(struct MeterInfoType* type, struct EXIService* service) +static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService* service) { - - if(type->isused.MeterID) +if(type->isused.MeterID) { - + + /* element ID assignment of MeterID*/ service->eqn.namespaceURI=5; - service->eqn.localPart=17; + service->eqn.localPart=16; /* encode start element MeterID */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = STRING; service->val.string.len = type->MeterID.arraylen.data; - service->val.string.codepoints = type->MeterID.data; + memcpy(service->val.string.codepoints, type->MeterID.data, service->val.string.len); /* encode character MeterID */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -2241,21 +2649,28 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct EXIService return -1; } - - /* encode end element of MeterID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - } - - if(type->isused.MeterReading) + + + /* encode end element of MeterID */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.MeterReading) { - + + /* element ID assignment of MeterReading*/ service->eqn.namespaceURI=5; - service->eqn.localPart=19; + service->eqn.localPart=18; /* encode start element MeterReading */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2266,21 +2681,27 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct EXIService } - - /* encode end element of MeterReading */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.MeterStatus) + + + /* encode end element of MeterReading */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.MeterStatus) { - + + /* element ID assignment of MeterStatus*/ service->eqn.namespaceURI=5; - service->eqn.localPart=20; + service->eqn.localPart=19; /* encode start element MeterStatus */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2294,21 +2715,27 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct EXIService return -1; } - - /* encode end element of MeterStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.TMeter) + + + /* encode end element of MeterStatus */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.TMeter) { - + + /* element ID assignment of TMeter*/ service->eqn.namespaceURI=5; - service->eqn.localPart=40; + service->eqn.localPart=37; /* encode start element TMeter */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2322,26 +2749,33 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct EXIService return -1; } - - /* encode end element of TMeter */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } + + + /* encode end element of TMeter */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} return 0; } -static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, struct EXIService* service) +static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, struct v2gService* service) { - + + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; - service->eqn.localPart=66; + service->eqn.localPart=47; /* encode start element ResponseCode */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2355,22 +2789,29 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s return -1; } - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of ResponseCode */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of EVSEID*/ service->eqn.namespaceURI=4; - service->eqn.localPart=16; + service->eqn.localPart=3; /* encode start element EVSEID */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = BINARY_HEX; service->val.binary.len = type->EVSEID.arraylen.data; - service->val.binary.data= type->EVSEID.data; + memcpy(service->val.binary.data, type->EVSEID.data, service->val.binary.len); /* encode character EVSEID */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -2378,19 +2819,27 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s return -1; } - - - /* encode end element of EVSEID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + + + /* encode end element of EVSEID */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of EVSEStatus*/ service->eqn.namespaceURI=4; - service->eqn.localPart=25; + service->eqn.localPart=7; /* encode start element EVSEStatus */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2401,17 +2850,24 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s } - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of EVSEStatus */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of TCurrent*/ service->eqn.namespaceURI=4; - service->eqn.localPart=82; + service->eqn.localPart=63; /* encode start element TCurrent */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2425,17 +2881,24 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s return -1; } - - /* encode end element of TCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of TCurrent */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of EVSEMaxPower*/ service->eqn.namespaceURI=4; - service->eqn.localPart=19; + service->eqn.localPart=6; /* encode start element EVSEMaxPower */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2446,20 +2909,26 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s } - - /* encode end element of EVSEMaxPower */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - - if(type->isused.PCurrent) + + + /* encode end element of EVSEMaxPower */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }if(type->isused.PCurrent) { - + + /* element ID assignment of PCurrent*/ service->eqn.namespaceURI=4; - service->eqn.localPart=41; + service->eqn.localPart=25; /* encode start element PCurrent */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2470,21 +2939,27 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s } - - /* encode end element of PCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.MeterInfo) + + + /* encode end element of PCurrent */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.MeterInfo) { - + + /* element ID assignment of MeterInfo*/ service->eqn.namespaceURI=4; - service->eqn.localPart=32; + service->eqn.localPart=15; /* encode start element MeterInfo */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2495,35 +2970,41 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s } - - /* encode end element of MeterInfo */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } + + + /* encode end element of MeterInfo */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} return 0; } -static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, struct EXIService* service) +static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, struct v2gService* service) { - - if(type->isused.PEVID) +if(type->isused.PEVID) { - + + /* element ID assignment of PEVID*/ service->eqn.namespaceURI=4; - service->eqn.localPart=43; + service->eqn.localPart=26; /* encode start element PEVID */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } service->val.type = STRING; service->val.string.len = type->PEVID.arraylen.data; - service->val.string.codepoints = type->PEVID.data; + memcpy(service->val.string.codepoints, type->PEVID.data, service->val.string.len); /* encode character PEVID */ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) @@ -2532,18 +3013,26 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, return -1; } - - /* encode end element of PEVID */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + - } - + + + /* encode end element of PEVID */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + + /* element ID assignment of PEVStatus*/ service->eqn.namespaceURI=4; - service->eqn.localPart=50; + service->eqn.localPart=32; /* encode start element PEVStatus */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2554,20 +3043,26 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, } - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - - if(type->isused.TCurrent) + + + /* encode end element of PEVStatus */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }if(type->isused.TCurrent) { - + + /* element ID assignment of TCurrent*/ service->eqn.namespaceURI=4; - service->eqn.localPart=82; + service->eqn.localPart=63; /* encode start element TCurrent */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2581,18 +3076,25 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, return -1; } - - /* encode end element of TCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - + + + /* encode end element of TCurrent */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + + /* element ID assignment of Tariff*/ service->eqn.namespaceURI=4; - service->eqn.localPart=83; + service->eqn.localPart=64; /* encode start element Tariff */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2606,17 +3108,24 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, return -1; } - - /* encode end element of Tariff */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of Tariff */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of MeterInfo*/ service->eqn.namespaceURI=4; - service->eqn.localPart=32; + service->eqn.localPart=15; /* encode start element MeterInfo */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2627,25 +3136,32 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, } + + + /* encode end element of MeterInfo */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } return 0; } -static int serialize_MeteringReceiptResType(struct MeteringReceiptResType* type, struct EXIService* service) +static int serialize_MeteringReceiptResType(struct MeteringReceiptResType* type, struct v2gService* service) { - + + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; - service->eqn.localPart=66; + service->eqn.localPart=47; /* encode start element ResponseCode */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -2659,1409 +3175,618 @@ static int serialize_MeteringReceiptResType(struct MeteringReceiptResType* type, return -1; } + + + /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} - - -static int serialize_CableCheckReqType(struct CableCheckReqType* type, struct EXIService* service) -{ - - /* element ID assignment of PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) - { - return -1; - } - - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} - - -static int serialize_CableCheckResType(struct CableCheckResType* type, struct EXIService* service) -{ - - /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = ENUMERATION; - service->val.enumeration=type->ResponseCode; - - /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { - return -1; - } - - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { return -1; } - - /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) - { - return -1; - } - - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - return 0; } -static int serialize_PreChargeReqType(struct PreChargeReqType* type, struct EXIService* service) +static int serialize_BodyType(struct BodyType* type, struct v2gService* service) { - - /* element ID assignment of PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) - { - return -1; - } - - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of PEVTargetVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=51; - /* encode start element PEVTargetVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PEVTargetVoltage */ - if(serialize_FloatingValueType( &(type->PEVTargetVoltage),service)) - { - return -1; - } - - - - /* encode end element of PEVTargetVoltage */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of PEVDemandCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=42; - /* encode start element PEVDemandCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PEVDemandCurrent */ - if(serialize_FloatingValueType( &(type->PEVDemandCurrent),service)) - { - return -1; - } - - - - /* encode end element of PEVDemandCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of VoltageDifferential*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=89; - /* encode start element VoltageDifferential */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of VoltageDifferential */ - if(serialize_FloatingValueType( &(type->VoltageDifferential),service)) - { - return -1; - } - - - - /* encode end element of VoltageDifferential */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} - - -static int serialize_PreChargeResType(struct PreChargeResType* type, struct EXIService* service) -{ - - /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = ENUMERATION; - service->val.enumeration=type->ResponseCode; - - /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) - { - return -1; - } - - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEPresentVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=24; - /* encode start element EVSEPresentVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEPresentVoltage */ - if(serialize_FloatingValueType( &(type->EVSEPresentVoltage),service)) - { - return -1; - } - - - - /* encode end element of EVSEPresentVoltage */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} - - -static int serialize_CurrentDemandReqType(struct CurrentDemandReqType* type, struct EXIService* service) -{ - - /* element ID assignment of PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) - { - return -1; - } - - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of PEVTargetVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=51; - /* encode start element PEVTargetVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PEVTargetVoltage */ - if(serialize_FloatingValueType( &(type->PEVTargetVoltage),service)) - { - return -1; - } - - - - /* encode end element of PEVTargetVoltage */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of PEVDemandCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=42; - /* encode start element PEVDemandCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PEVDemandCurrent */ - if(serialize_FloatingValueType( &(type->PEVDemandCurrent),service)) - { - return -1; - } - - - - /* encode end element of PEVDemandCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of CurrentDifferential*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=14; - /* encode start element CurrentDifferential */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of CurrentDifferential */ - if(serialize_FloatingValueType( &(type->CurrentDifferential),service)) - { - return -1; - } - - - - /* encode end element of CurrentDifferential */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of VoltageDifferential*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=89; - /* encode start element VoltageDifferential */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of VoltageDifferential */ - if(serialize_FloatingValueType( &(type->VoltageDifferential),service)) - { - return -1; - } - - - - /* encode end element of VoltageDifferential */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} - - -static int serialize_CurrentDemandResType(struct CurrentDemandResType* type, struct EXIService* service) -{ - - /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = ENUMERATION; - service->val.enumeration=type->ResponseCode; - - /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) - { - return -1; - } - - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEPresentVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=24; - /* encode start element EVSEPresentVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEPresentVoltage */ - if(serialize_FloatingValueType( &(type->EVSEPresentVoltage),service)) - { - return -1; - } - - - - /* encode end element of EVSEPresentVoltage */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEPresentCurrent*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=23; - /* encode start element EVSEPresentCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEPresentCurrent */ - if(serialize_FloatingValueType( &(type->EVSEPresentCurrent),service)) - { - return -1; - } - - - - /* encode end element of EVSEPresentCurrent */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} - - -static int serialize_WeldingDetectionReqType(struct WeldingDetectionReqType* type, struct EXIService* service) -{ - - /* element ID assignment of PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) - { - return -1; - } - - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} - - -static int serialize_WeldingDetectionResType(struct WeldingDetectionResType* type, struct EXIService* service) -{ - - /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = ENUMERATION; - service->val.enumeration=type->ResponseCode; - - /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) - { - return -1; - } - - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEPresentVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=24; - /* encode start element EVSEPresentVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEPresentVoltage */ - if(serialize_FloatingValueType( &(type->EVSEPresentVoltage),service)) - { - return -1; - } - - - - /* encode end element of EVSEPresentVoltage */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} - - -static int serialize_TerminateChargingReqType(struct TerminateChargingReqType* type, struct EXIService* service) -{ - - /* element ID assignment of PEVStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=50; - /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PEVStatus */ - if(serialize_PEVStatusType( &(type->PEVStatus),service)) - { - return -1; - } - - - - /* encode end element of PEVStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} - - -static int serialize_TerminateChargingResType(struct TerminateChargingResType* type, struct EXIService* service) -{ - - /* element ID assignment of ResponseCode*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=66; - /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - service->val.type = ENUMERATION; - service->val.enumeration=type->ResponseCode; - - /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) - { - - return -1; - } - - - /* encode end element of ResponseCode */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEStatus*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=25; - /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) - { - return -1; - } - - - - /* encode end element of EVSEStatus */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - /* element ID assignment of EVSEPresentVoltage*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=24; - /* encode start element EVSEPresentVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of EVSEPresentVoltage */ - if(serialize_FloatingValueType( &(type->EVSEPresentVoltage),service)) - { - return -1; - } - - - - /* encode end element of EVSEPresentVoltage */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} - - -static int serialize_BodyType(struct BodyType* type, struct EXIService* service) -{ - - if(type->isused.SessionSetupReq) +if(type->isused.SessionSetupReq) { - + + /* element ID assignment of SessionSetupReq*/ service->eqn.namespaceURI=4; - service->eqn.localPart=78; + service->eqn.localPart=59; /* encode start element SessionSetupReq */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of SessionSetupReq */ - if(serialize_SessionSetupReqType( (type->SessionSetupReq),service)) + if(serialize_SessionSetupReqType( &(type->SessionSetupReq),service)) { return -1; } - - /* encode end element of SessionSetupReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.SessionSetupRes) + + + /* encode end element of SessionSetupReq */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.SessionSetupRes) { - + + /* element ID assignment of SessionSetupRes*/ service->eqn.namespaceURI=4; - service->eqn.localPart=80; + service->eqn.localPart=61; /* encode start element SessionSetupRes */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of SessionSetupRes */ - if(serialize_SessionSetupResType( (type->SessionSetupRes),service)) + if(serialize_SessionSetupResType( &(type->SessionSetupRes),service)) { return -1; } - - /* encode end element of SessionSetupRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.ServiceDiscoveryReq) + + + /* encode end element of SessionSetupRes */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.ServiceDiscoveryReq) { - + + /* element ID assignment of ServiceDiscoveryReq*/ service->eqn.namespaceURI=4; - service->eqn.localPart=67; + service->eqn.localPart=48; /* encode start element ServiceDiscoveryReq */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of ServiceDiscoveryReq */ - if(serialize_ServiceDiscoveryReqType( (type->ServiceDiscoveryReq),service)) + if(serialize_ServiceDiscoveryReqType( &(type->ServiceDiscoveryReq),service)) { return -1; } - - /* encode end element of ServiceDiscoveryReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.ServiceDiscoveryRes) + + + /* encode end element of ServiceDiscoveryReq */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.ServiceDiscoveryRes) { - + + /* element ID assignment of ServiceDiscoveryRes*/ service->eqn.namespaceURI=4; - service->eqn.localPart=69; + service->eqn.localPart=50; /* encode start element ServiceDiscoveryRes */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of ServiceDiscoveryRes */ - if(serialize_ServiceDiscoveryResType( (type->ServiceDiscoveryRes),service)) + if(serialize_ServiceDiscoveryResType( &(type->ServiceDiscoveryRes),service)) { return -1; } - - /* encode end element of ServiceDiscoveryRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.ServicePaymentSelectionReq) + + + /* encode end element of ServiceDiscoveryRes */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.ServicePaymentSelectionReq) { - + + /* element ID assignment of ServicePaymentSelectionReq*/ service->eqn.namespaceURI=4; - service->eqn.localPart=72; + service->eqn.localPart=53; /* encode start element ServicePaymentSelectionReq */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of ServicePaymentSelectionReq */ - if(serialize_ServicePaymentSelectionReqType( (type->ServicePaymentSelectionReq),service)) + if(serialize_ServicePaymentSelectionReqType( &(type->ServicePaymentSelectionReq),service)) { return -1; } - - /* encode end element of ServicePaymentSelectionReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.ServicePaymentSelectionRes) + + + /* encode end element of ServicePaymentSelectionReq */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.ServicePaymentSelectionRes) { - + + /* element ID assignment of ServicePaymentSelectionRes*/ service->eqn.namespaceURI=4; - service->eqn.localPart=74; + service->eqn.localPart=55; /* encode start element ServicePaymentSelectionRes */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of ServicePaymentSelectionRes */ - if(serialize_ServicePaymentSelectionResType( (type->ServicePaymentSelectionRes),service)) + if(serialize_ServicePaymentSelectionResType( &(type->ServicePaymentSelectionRes),service)) { return -1; } - - /* encode end element of ServicePaymentSelectionRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.PaymentDetailsReq) + + + /* encode end element of ServicePaymentSelectionRes */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.PaymentDetailsReq) { - + + /* element ID assignment of PaymentDetailsReq*/ service->eqn.namespaceURI=4; - service->eqn.localPart=52; + service->eqn.localPart=33; /* encode start element PaymentDetailsReq */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of PaymentDetailsReq */ - if(serialize_PaymentDetailsReqType( (type->PaymentDetailsReq),service)) + if(serialize_PaymentDetailsReqType( &(type->PaymentDetailsReq),service)) { return -1; } - - /* encode end element of PaymentDetailsReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.PaymentDetailsRes) + + + /* encode end element of PaymentDetailsReq */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.PaymentDetailsRes) { - + + /* element ID assignment of PaymentDetailsRes*/ service->eqn.namespaceURI=4; - service->eqn.localPart=54; + service->eqn.localPart=35; /* encode start element PaymentDetailsRes */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of PaymentDetailsRes */ - if(serialize_PaymentDetailsResType( (type->PaymentDetailsRes),service)) + if(serialize_PaymentDetailsResType( &(type->PaymentDetailsRes),service)) { return -1; } + + + /* encode end element of PaymentDetailsRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - - if(type->isused.ChargeParameterDiscoveryReq) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.PowerDiscoveryReq) { - - /* element ID assignment of ChargeParameterDiscoveryReq*/ + + + /* element ID assignment of PowerDiscoveryReq*/ service->eqn.namespaceURI=4; - service->eqn.localPart=4; - /* encode start element ChargeParameterDiscoveryReq */ + service->eqn.localPart=41; + /* encode start element PowerDiscoveryReq */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - /* encode children of ChargeParameterDiscoveryReq */ - if(serialize_ChargeParameterDiscoveryReqType( (type->ChargeParameterDiscoveryReq),service)) + /* encode children of PowerDiscoveryReq */ + if(serialize_PowerDiscoveryReqType( &(type->PowerDiscoveryReq),service)) { return -1; } - - /* encode end element of ChargeParameterDiscoveryReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.ChargeParameterDiscoveryRes) + + + /* encode end element of PowerDiscoveryReq */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.PowerDiscoveryRes) { - - /* element ID assignment of ChargeParameterDiscoveryRes*/ + + + /* element ID assignment of PowerDiscoveryRes*/ service->eqn.namespaceURI=4; - service->eqn.localPart=6; - /* encode start element ChargeParameterDiscoveryRes */ + service->eqn.localPart=43; + /* encode start element PowerDiscoveryRes */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - /* encode children of ChargeParameterDiscoveryRes */ - if(serialize_ChargeParameterDiscoveryResType( (type->ChargeParameterDiscoveryRes),service)) + /* encode children of PowerDiscoveryRes */ + if(serialize_PowerDiscoveryResType( &(type->PowerDiscoveryRes),service)) { return -1; } - - /* encode end element of ChargeParameterDiscoveryRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.LineLockReq) + + + /* encode end element of PowerDiscoveryRes */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.LineLockReq) { - + + /* element ID assignment of LineLockReq*/ service->eqn.namespaceURI=4; - service->eqn.localPart=28; + service->eqn.localPart=11; /* encode start element LineLockReq */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of LineLockReq */ - if(serialize_LineLockReqType( (type->LineLockReq),service)) + if(serialize_LineLockReqType( &(type->LineLockReq),service)) { return -1; } - - /* encode end element of LineLockReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.LineLockRes) + + + /* encode end element of LineLockReq */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.LineLockRes) { - + + /* element ID assignment of LineLockRes*/ service->eqn.namespaceURI=4; - service->eqn.localPart=30; + service->eqn.localPart=13; /* encode start element LineLockRes */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of LineLockRes */ - if(serialize_LineLockResType( (type->LineLockRes),service)) + if(serialize_LineLockResType( &(type->LineLockRes),service)) { return -1; } - - /* encode end element of LineLockRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.PowerDeliveryReq) + + + /* encode end element of LineLockRes */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.PowerDeliveryReq) { - + + /* element ID assignment of PowerDeliveryReq*/ service->eqn.namespaceURI=4; - service->eqn.localPart=56; + service->eqn.localPart=37; /* encode start element PowerDeliveryReq */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of PowerDeliveryReq */ - if(serialize_PowerDeliveryReqType( (type->PowerDeliveryReq),service)) + if(serialize_PowerDeliveryReqType( &(type->PowerDeliveryReq),service)) { return -1; } - - /* encode end element of PowerDeliveryReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.PowerDeliveryRes) + + + /* encode end element of PowerDeliveryReq */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.PowerDeliveryRes) { - + + /* element ID assignment of PowerDeliveryRes*/ service->eqn.namespaceURI=4; - service->eqn.localPart=58; + service->eqn.localPart=39; /* encode start element PowerDeliveryRes */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of PowerDeliveryRes */ - if(serialize_PowerDeliveryResType( (type->PowerDeliveryRes),service)) + if(serialize_PowerDeliveryResType( &(type->PowerDeliveryRes),service)) { return -1; } - - /* encode end element of PowerDeliveryRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.MeteringStatusReq) + + + /* encode end element of PowerDeliveryRes */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.MeteringStatusReq) { - + + /* element ID assignment of MeteringStatusReq*/ service->eqn.namespaceURI=4; - service->eqn.localPart=37; + service->eqn.localPart=21; /* encode start element MeteringStatusReq */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of MeteringStatusReq */ - if(serialize_MeteringStatusReqType( (type->MeteringStatusReq),service)) + if(serialize_MeteringStatusReqType( &(type->MeteringStatusReq),service)) { return -1; } - - /* encode end element of MeteringStatusReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.MeteringStatusRes) + + + /* encode end element of MeteringStatusReq */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.MeteringStatusRes) { - + + /* element ID assignment of MeteringStatusRes*/ service->eqn.namespaceURI=4; - service->eqn.localPart=39; + service->eqn.localPart=23; /* encode start element MeteringStatusRes */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of MeteringStatusRes */ - if(serialize_MeteringStatusResType( (type->MeteringStatusRes),service)) + if(serialize_MeteringStatusResType( &(type->MeteringStatusRes),service)) { return -1; } - - /* encode end element of MeteringStatusRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.MeteringReceiptReq) + + + /* encode end element of MeteringStatusRes */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.MeteringReceiptReq) { - + + /* element ID assignment of MeteringReceiptReq*/ service->eqn.namespaceURI=4; - service->eqn.localPart=33; + service->eqn.localPart=17; /* encode start element MeteringReceiptReq */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of MeteringReceiptReq */ - if(serialize_MeteringReceiptReqType( (type->MeteringReceiptReq),service)) + if(serialize_MeteringReceiptReqType( &(type->MeteringReceiptReq),service)) { return -1; } - - /* encode end element of MeteringReceiptReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + - } - - if(type->isused.MeteringReceiptRes) + + + /* encode end element of MeteringReceiptReq */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + }} + if(type->isused.MeteringReceiptRes) { - + + /* element ID assignment of MeteringReceiptRes*/ service->eqn.namespaceURI=4; - service->eqn.localPart=35; + service->eqn.localPart=19; /* encode start element MeteringReceiptRes */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of MeteringReceiptRes */ - if(serialize_MeteringReceiptResType( (type->MeteringReceiptRes),service)) + if(serialize_MeteringReceiptResType( &(type->MeteringReceiptRes),service)) { return -1; } + + + /* encode end element of MeteringReceiptRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - - if(type->isused.CableCheckReq) - { - - /* element ID assignment of CableCheckReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=0; - /* encode start element CableCheckReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; - } - - /* encode children of CableCheckReq */ - if(serialize_CableCheckReqType( (type->CableCheckReq),service)) - { - return -1; - } - - - - /* encode end element of CableCheckReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - - if(type->isused.CableCheckRes) - { - - /* element ID assignment of CableCheckRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=2; - /* encode start element CableCheckRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of CableCheckRes */ - if(serialize_CableCheckResType( (type->CableCheckRes),service)) - { - return -1; - } - - - - /* encode end element of CableCheckRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - - if(type->isused.PreChargeReq) - { - - /* element ID assignment of PreChargeReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=60; - /* encode start element PreChargeReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PreChargeReq */ - if(serialize_PreChargeReqType( (type->PreChargeReq),service)) - { - return -1; - } - - - - /* encode end element of PreChargeReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - - if(type->isused.PreChargeRes) - { - - /* element ID assignment of PreChargeRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=62; - /* encode start element PreChargeRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of PreChargeRes */ - if(serialize_PreChargeResType( (type->PreChargeRes),service)) - { - return -1; - } - - - - /* encode end element of PreChargeRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - - if(type->isused.CurrentDemandReq) - { - - /* element ID assignment of CurrentDemandReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=10; - /* encode start element CurrentDemandReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of CurrentDemandReq */ - if(serialize_CurrentDemandReqType( (type->CurrentDemandReq),service)) - { - return -1; - } - - - - /* encode end element of CurrentDemandReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - - if(type->isused.CurrentDemandRes) - { - - /* element ID assignment of CurrentDemandRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=12; - /* encode start element CurrentDemandRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of CurrentDemandRes */ - if(serialize_CurrentDemandResType( (type->CurrentDemandRes),service)) - { - return -1; - } - - - - /* encode end element of CurrentDemandRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - - if(type->isused.WeldingDetectionReq) - { - - /* element ID assignment of WeldingDetectionReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=90; - /* encode start element WeldingDetectionReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of WeldingDetectionReq */ - if(serialize_WeldingDetectionReqType( (type->WeldingDetectionReq),service)) - { - return -1; - } - - - - /* encode end element of WeldingDetectionReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - - if(type->isused.WeldingDetectionRes) - { - - /* element ID assignment of WeldingDetectionRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=92; - /* encode start element WeldingDetectionRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of WeldingDetectionRes */ - if(serialize_WeldingDetectionResType( (type->WeldingDetectionRes),service)) - { - return -1; - } - - - - /* encode end element of WeldingDetectionRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - - if(type->isused.TerminateChargingReq) - { - - /* element ID assignment of TerminateChargingReq*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=85; - /* encode start element TerminateChargingReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of TerminateChargingReq */ - if(serialize_TerminateChargingReqType( (type->TerminateChargingReq),service)) - { - return -1; - } - - - - /* encode end element of TerminateChargingReq */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } - - if(type->isused.TerminateChargingRes) - { - - /* element ID assignment of TerminateChargingRes*/ - service->eqn.namespaceURI=4; - service->eqn.localPart=87; - /* encode start element TerminateChargingRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) - { - return -1; - } - - /* encode children of TerminateChargingRes */ - if(serialize_TerminateChargingResType( (type->TerminateChargingRes),service)) - { - return -1; - } - - - - /* encode end element of TerminateChargingRes */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - } + }} return 0; } -static int serialize_AnonType_V2G_Message(struct AnonType_V2G_Message* type, struct EXIService* service) +static int serialize_AnonType_V2G_Message(struct AnonType_V2G_Message* type, struct v2gService* service) { - + + /* element ID assignment of Header*/ service->eqn.namespaceURI=6; service->eqn.localPart=4; /* encode start element Header */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } /* encode children of Header */ - if(serialize_HeaderType( (type->Header),service)) + if(serialize_HeaderType( &(type->Header),service)) { return -1; } - - /* encode end element of Header */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); + + + + /* encode end element of Header */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } /* element ID assignment of Body*/ service->eqn.namespaceURI=6; @@ -4069,6 +3794,7 @@ static int serialize_AnonType_V2G_Message(struct AnonType_V2G_Message* type, str /* encode start element Body */ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } @@ -4079,40 +3805,16 @@ static int serialize_AnonType_V2G_Message(struct AnonType_V2G_Message* type, str } + + + /* encode end element of Body */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - - - return 0; -} - - -static int serialize_EXIDocumentType(struct EXIDocumentType* type, struct EXIService* service) -{ - - /* element ID assignment of V2G_Message*/ - service->eqn.namespaceURI=6; - service->eqn.localPart=5; - /* encode start element V2G_Message */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { + return -1; } - - /* encode children of V2G_Message */ - if(serialize_AnonType_V2G_Message( &(type->V2G_Message),service)) - { - return -1; - } - - - - /* encode end element of V2G_Message */ - exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)); - - return 0; } @@ -4123,7 +3825,7 @@ static int serialize_EXIDocumentType(struct EXIDocumentType* type, struct EXISer /* marshal data to EXI stream */ -static int serialize_message(struct EXIService* service) + int serialize_message(struct v2gService* service) { @@ -4134,8 +3836,30 @@ static int serialize_message(struct EXIService* service) return -1; } + /* element ID assignment of V2G_Message*/ + service->eqn.namespaceURI=6; + service->eqn.localPart=8; + + /* encode start element V2G_Message */ + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) + { + + return -1; + } + + + /* encode root element of V2G_Message */ - if (serialize_EXIDocumentType(&(service->exiMsg), service)) + if (serialize_AnonType_V2G_Message(&(service->v2gMsg), service)) + { + + return -1; + } + + + + /* encode end element of V2G_Message */ + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -4151,7 +3875,3 @@ static int serialize_message(struct EXIService* service) return 0; } - - - - diff --git a/src/service/v2g_serviceDataSerializiation.h b/src/service/v2g_serviceDataSerializiation.h new file mode 100644 index 0000000..88d1fb3 --- /dev/null +++ b/src/service/v2g_serviceDataSerializiation.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2007-2010 Siemens AG + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +/******************************************************************* + * + * @author Sebastian.Kaebisch.EXT@siemens.com + * @version 0.3 + * @contact Joerg.Heuer@siemens.com + * + ********************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef V2GSERVICEDATASERIAL_H_ +#define V2GSERVICEDATASERIAL_H_ + +#include "v2g_service.h" + +int serialize_message(struct v2gService* service); + + +#endif /* V2GSERVICEDATASERIAL_H_ */ + +#ifdef __cplusplus +} +#endif diff --git a/src/service/v2g_serviceDataTypes.c b/src/service/v2g_serviceDataTypes.c index 657fdc9..e162b3c 100644 --- a/src/service/v2g_serviceDataTypes.c +++ b/src/service/v2g_serviceDataTypes.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -19,7 +19,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -29,13 +29,19 @@ #include "v2g_serviceDataTypes.h" -static void init_sessionIDType(struct sessionIDType* type) +static void init_SessionInformationType_SessionID(struct SessionInformationType_SessionID* type) { type->arraylen.data=0; } -static void init_protocolVersionType(struct protocolVersionType* type) +static void init_SessionInformationType_ServiceSessionID(struct SessionInformationType_ServiceSessionID* type) +{ + type->arraylen.data=0; + +} + +static void init_SessionInformationType_ProtocolVersion(struct SessionInformationType_ProtocolVersion* type) { type->arraylen.data=0; @@ -43,15 +49,15 @@ static void init_protocolVersionType(struct protocolVersionType* type) static void init_SessionInformationType(struct SessionInformationType* type) { - init_sessionIDType(&(type->SessionID)); - init_sessionIDType(&(type->ServiceSessionID)); + init_SessionInformationType_SessionID(&(type->SessionID)); + init_SessionInformationType_ServiceSessionID(&(type->ServiceSessionID)); type->isused.ServiceSessionID=0; - init_protocolVersionType(&(type->ProtocolVersion)); + init_SessionInformationType_ProtocolVersion(&(type->ProtocolVersion)); type->isused.ProtocolVersion=0; } -static void init_service_string(struct service_string* type) +static void init_NotificationType_FaultMsg(struct NotificationType_FaultMsg* type) { type->arraylen.data=0; @@ -60,7 +66,7 @@ static void init_service_string(struct service_string* type) static void init_NotificationType(struct NotificationType* type) { type->isused.FaultCode=0; - init_service_string(&(type->FaultMsg)); + init_NotificationType_FaultMsg(&(type->FaultMsg)); type->isused.FaultMsg=0; type->isused.EventList=0; @@ -74,7 +80,7 @@ static void init_HeaderType(struct HeaderType* type) } -static void init_pevIDType(struct pevIDType* type) +static void init_SessionSetupReqType_PEVID(struct SessionSetupReqType_PEVID* type) { type->arraylen.data=0; @@ -82,12 +88,12 @@ static void init_pevIDType(struct pevIDType* type) static void init_SessionSetupReqType(struct SessionSetupReqType* type) { - init_pevIDType(&(type->PEVID)); + init_SessionSetupReqType_PEVID(&(type->PEVID)); type->isused.PEVID=0; } -static void init_evseIDType(struct evseIDType* type) +static void init_SessionSetupResType_EVSEID(struct SessionSetupResType_EVSEID* type) { type->arraylen.data=0; @@ -95,11 +101,11 @@ static void init_evseIDType(struct evseIDType* type) static void init_SessionSetupResType(struct SessionSetupResType* type) { - init_evseIDType(&(type->EVSEID)); + init_SessionSetupResType_EVSEID(&(type->EVSEID)); } -static void init_serviceScopeType(struct serviceScopeType* type) +static void init_ServiceDiscoveryReqType_ServiceScope(struct ServiceDiscoveryReqType_ServiceScope* type) { type->arraylen.data=0; @@ -108,18 +114,24 @@ static void init_serviceScopeType(struct serviceScopeType* type) static void init_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type) { type->isused.ServiceType=0; - init_serviceScopeType(&(type->ServiceScope)); + init_ServiceDiscoveryReqType_ServiceScope(&(type->ServiceScope)); type->isused.ServiceScope=0; } -static void init_serviceIDType(struct serviceIDType* type) +static void init_ServiceDescriptionType_ServiceID(struct ServiceDescriptionType_ServiceID* type) { type->arraylen.data=0; } -static void init_serviceNameType(struct serviceNameType* type) +static void init_ServiceDescriptionType_ServiceName(struct ServiceDescriptionType_ServiceName* type) +{ + type->arraylen.data=0; + +} + +static void init_ServiceDescriptionType_ServiceScope(struct ServiceDescriptionType_ServiceScope* type) { type->arraylen.data=0; @@ -127,11 +139,11 @@ static void init_serviceNameType(struct serviceNameType* type) static void init_ServiceDescriptionType(struct ServiceDescriptionType* type) { - init_serviceIDType(&(type->ServiceID)); - init_serviceNameType(&(type->ServiceName)); + init_ServiceDescriptionType_ServiceID(&(type->ServiceID)); + init_ServiceDescriptionType_ServiceName(&(type->ServiceName)); type->isused.ServiceName=0; type->isused.ServiceType=0; - init_serviceScopeType(&(type->ServiceScope)); + init_ServiceDescriptionType_ServiceScope(&(type->ServiceScope)); type->isused.ServiceScope=0; } @@ -156,13 +168,33 @@ static void init_ServiceDiscoveryResType(struct ServiceDiscoveryResType* type) } -static void init_ServicePaymentSelectionReqType(struct ServicePaymentSelectionReqType* type) +static void init_ServicePaymentSelectionReqType_PEVPubKey(struct ServicePaymentSelectionReqType_PEVPubKey* type) { - init_ServiceListType(&(type->ServiceList)); + type->arraylen.data=0; } -static void init_contractIDType(struct contractIDType* type) +static void init_ServicePaymentSelectionReqType(struct ServicePaymentSelectionReqType* type) +{ + init_ServiceListType(&(type->ServiceList)); + init_ServicePaymentSelectionReqType_PEVPubKey(&(type->PEVPubKey)); + +} + +static void init_ServicePaymentSelectionResType_MeteringAuthPubKey(struct ServicePaymentSelectionResType_MeteringAuthPubKey* type) +{ + type->arraylen.data=0; + +} + +static void init_ServicePaymentSelectionResType(struct ServicePaymentSelectionResType* type) +{ + init_ServicePaymentSelectionResType_MeteringAuthPubKey(&(type->MeteringAuthPubKey)); + type->isused.MeteringAuthPubKey=0; + +} + +static void init_PaymentDetailsReqType_ContractID(struct PaymentDetailsReqType_ContractID* type) { type->arraylen.data=0; @@ -170,28 +202,28 @@ static void init_contractIDType(struct contractIDType* type) static void init_PaymentDetailsReqType(struct PaymentDetailsReqType* type) { - init_contractIDType(&(type->ContractID)); + init_PaymentDetailsReqType_ContractID(&(type->ContractID)); } -static void init_ChargeParameterDiscoveryReqType(struct ChargeParameterDiscoveryReqType* type) -{ +static void init_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type) +{ } -static void init_energyProviderType(struct energyProviderType* type) +static void init_PowerDiscoveryResType_EnergyProvider(struct PowerDiscoveryResType_EnergyProvider* type) { type->arraylen.data=0; } -static void init_currencyType(struct currencyType* type) +static void init_TariffTableType_Currency(struct TariffTableType_Currency* type) { type->arraylen.data=0; } -static void init_tariffDescriptionType(struct tariffDescriptionType* type) +static void init_TariffDescrType_TariffDescription(struct TariffDescrType_TariffDescription* type) { type->arraylen.data=0; @@ -218,7 +250,7 @@ static void init_TariffEntriesType(struct TariffEntriesType* type) static void init_TariffDescrType(struct TariffDescrType* type) { - init_tariffDescriptionType(&(type->TariffDescription)); + init_TariffDescrType_TariffDescription(&(type->TariffDescription)); type->isused.TariffDescription=0; init_TariffEntriesType(&(type->TariffEntries)); @@ -228,7 +260,7 @@ static void init_TariffTableType(struct TariffTableType* type) { int i_loop; - init_currencyType(&(type->Currency)); + init_TariffTableType_Currency(&(type->Currency)); for(i_loop=0; i_loop<6;i_loop++) { init_TariffDescrType(&(type->Tariff[i_loop])); @@ -238,9 +270,9 @@ static void init_TariffTableType(struct TariffTableType* type) } -static void init_ChargeParameterDiscoveryResType(struct ChargeParameterDiscoveryResType* type) -{ - init_energyProviderType(&(type->EnergyProvider)); +static void init_PowerDiscoveryResType(struct PowerDiscoveryResType* type) +{ + init_PowerDiscoveryResType_EnergyProvider(&(type->EnergyProvider)); type->isused.EnergyProvider=0; init_TariffTableType(&(type->TariffTable)); type->isused.TariffTable=0; @@ -257,18 +289,26 @@ static void init_LineLockResType(struct LineLockResType* type) } -static void init_PowerDeliveryReqType(struct PowerDeliveryReqType* type) -{ - type->isused.Tariff=0; - -} - -static void init_PowerDeliveryResType(struct PowerDeliveryResType* type) +static void init_ChargingProfileType(struct ChargingProfileType* type) { } -static void init_meterIDType(struct meterIDType* type) +static void init_PowerDeliveryReqType(struct PowerDeliveryReqType* type) +{ + type->isused.Tariff=0; + init_ChargingProfileType(&(type->ChargingProfile)); + type->isused.ChargingProfile=0; + +} + +static void init_MeteringStatusResType_EVSEID(struct MeteringStatusResType_EVSEID* type) +{ + type->arraylen.data=0; + +} + +static void init_MeterInfoType_MeterID(struct MeterInfoType_MeterID* type) { type->arraylen.data=0; @@ -276,7 +316,7 @@ static void init_meterIDType(struct meterIDType* type) static void init_MeterInfoType(struct MeterInfoType* type) { - init_meterIDType(&(type->MeterID)); + init_MeterInfoType_MeterID(&(type->MeterID)); type->isused.MeterID=0; type->isused.MeterReading=0; type->isused.MeterStatus=0; @@ -286,113 +326,67 @@ static void init_MeterInfoType(struct MeterInfoType* type) static void init_MeteringStatusResType(struct MeteringStatusResType* type) { - init_evseIDType(&(type->EVSEID)); + init_MeteringStatusResType_EVSEID(&(type->EVSEID)); type->isused.PCurrent=0; init_MeterInfoType(&(type->MeterInfo)); type->isused.MeterInfo=0; } +static void init_MeteringReceiptReqType_PEVID(struct MeteringReceiptReqType_PEVID* type) +{ + type->arraylen.data=0; + +} + static void init_MeteringReceiptReqType(struct MeteringReceiptReqType* type) { - init_pevIDType(&(type->PEVID)); + init_MeteringReceiptReqType_PEVID(&(type->PEVID)); type->isused.PEVID=0; type->isused.TCurrent=0; init_MeterInfoType(&(type->MeterInfo)); } -static void init_CableCheckReqType(struct CableCheckReqType* type) -{ - -} - -static void init_CableCheckResType(struct CableCheckResType* type) -{ - -} - -static void init_PreChargeReqType(struct PreChargeReqType* type) -{ - -} - -static void init_PreChargeResType(struct PreChargeResType* type) -{ - -} - -static void init_CurrentDemandReqType(struct CurrentDemandReqType* type) -{ - -} - -static void init_CurrentDemandResType(struct CurrentDemandResType* type) -{ - -} - -static void init_WeldingDetectionReqType(struct WeldingDetectionReqType* type) -{ - -} - -static void init_WeldingDetectionResType(struct WeldingDetectionResType* type) -{ - -} - -static void init_TerminateChargingReqType(struct TerminateChargingReqType* type) -{ - -} - -static void init_TerminateChargingResType(struct TerminateChargingResType* type) -{ - -} - static void init_BodyType(struct BodyType* type) -{ - type->isused.SessionSetupReq=0; - type->isused.SessionSetupRes=0; - type->isused.ServiceDiscoveryReq=0; - type->isused.ServiceDiscoveryRes=0; - type->isused.ServicePaymentSelectionReq=0; - type->isused.ServicePaymentSelectionRes=0; +{ + init_SessionSetupReqType(&(type->SessionSetupReq)); + type->isused.SessionSetupReq=0; + init_SessionSetupResType(&(type->SessionSetupRes)); + type->isused.SessionSetupRes=0; + init_ServiceDiscoveryReqType(&(type->ServiceDiscoveryReq)); + type->isused.ServiceDiscoveryReq=0; + init_ServiceDiscoveryResType(&(type->ServiceDiscoveryRes)); + type->isused.ServiceDiscoveryRes=0; + init_ServicePaymentSelectionReqType(&(type->ServicePaymentSelectionReq)); + type->isused.ServicePaymentSelectionReq=0; + init_ServicePaymentSelectionResType(&(type->ServicePaymentSelectionRes)); + type->isused.ServicePaymentSelectionRes=0; + init_PaymentDetailsReqType(&(type->PaymentDetailsReq)); type->isused.PaymentDetailsReq=0; - type->isused.PaymentDetailsRes=0; - type->isused.ChargeParameterDiscoveryReq=0; - type->isused.ChargeParameterDiscoveryRes=0; - type->isused.LineLockReq=0; - type->isused.LineLockRes=0; + type->isused.PaymentDetailsRes=0; + init_PowerDiscoveryReqType(&(type->PowerDiscoveryReq)); + type->isused.PowerDiscoveryReq=0; + init_PowerDiscoveryResType(&(type->PowerDiscoveryRes)); + type->isused.PowerDiscoveryRes=0; + init_LineLockReqType(&(type->LineLockReq)); + type->isused.LineLockReq=0; + init_LineLockResType(&(type->LineLockRes)); + type->isused.LineLockRes=0; + init_PowerDeliveryReqType(&(type->PowerDeliveryReq)); type->isused.PowerDeliveryReq=0; type->isused.PowerDeliveryRes=0; - type->isused.MeteringStatusReq=0; - type->isused.MeteringStatusRes=0; + type->isused.MeteringStatusReq=0; + init_MeteringStatusResType(&(type->MeteringStatusRes)); + type->isused.MeteringStatusRes=0; + init_MeteringReceiptReqType(&(type->MeteringReceiptReq)); type->isused.MeteringReceiptReq=0; - type->isused.MeteringReceiptRes=0; - type->isused.CableCheckReq=0; - type->isused.CableCheckRes=0; - type->isused.PreChargeReq=0; - type->isused.PreChargeRes=0; - type->isused.CurrentDemandReq=0; - type->isused.CurrentDemandRes=0; - type->isused.WeldingDetectionReq=0; - type->isused.WeldingDetectionRes=0; - type->isused.TerminateChargingReq=0; - type->isused.TerminateChargingRes=0; + type->isused.MeteringReceiptRes=0; } - -static void init_AnonType_V2G_Message(struct AnonType_V2G_Message* type) -{ + void init_AnonType_V2G_Message(struct AnonType_V2G_Message* type) +{ + init_HeaderType(&(type->Header)); 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 index d6e4c4d..e691f0c 100644 --- a/src/service/v2g_serviceDataTypes.h +++ b/src/service/v2g_serviceDataTypes.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -19,7 +19,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -40,201 +40,195 @@ extern "C" { enum faultCodeType { - ParsingError_faultCodeType, - V2GProtocolVersionNotSupported_faultCodeType, - UnknownError_faultCodeType + ParsingError, + V2GProtocolVersionNotSupported, + UnknownError }; enum eventEntryType { - InitiateSessionSetup_eventEntryType, - InitiateServiceDiscovery_eventEntryType, - InitiatePowerDiscovery_eventEntryType, - InitiateLineLock_eventEntryType, - InitiatePowerDelivery_eventEntryType, - InitiateInitiateMeteringStatus_eventEntryType + InitiateSessionSetup, + InitiateServiceDiscovery, + InitiatePowerDiscovery, + InitiateLineLock, + InitiatePowerDelivery, + InitiateInitiateMeteringStatus }; enum responseCode_SessionSetupType { - OK_SessionSetup_responseCode_SessionSetupType, - OK_NewSessionEstablished_responseCode_SessionSetupType, - OK_OldSessionJoined_responseCode_SessionSetupType, - FAILED_UnknownSession_responseCode_SessionSetupType, - FAILED_SessionEstablishmentError_responseCode_SessionSetupType, - FAILED_UnknownError_InSessionSetup_responseCode_SessionSetupType + OK_SessionSetup, + OK_NewSessionEstablished, + OK_OldSessionJoined, + FAILED_UnknownSession, + FAILED_SessionEstablishmentError, + FAILED_UnknownError_InSessionSetup }; enum serviceTypeType { - PEV_Recharge_serviceTypeType, - Remote_Customer_Support_serviceTypeType, - Internet_serviceTypeType, - Other_serviceTypeType + PEV_Recharge, + Remote_Customer_Support, + Internet, + Other }; enum responseCode_ServiceDiscoveryType { - OK_ServiceDiscovery_responseCode_ServiceDiscoveryType, - FAILED_NoServicesOfThisType_responseCode_ServiceDiscoveryType, - FAILED_NoServicesInThisScope_responseCode_ServiceDiscoveryType, - FAILED_NoServicesOfThisTypeScope_responseCode_ServiceDiscoveryType, - FAILED_NoServicesFound_responseCode_ServiceDiscoveryType, - FAILED_UnknownError_InServiceDiscovery_responseCode_ServiceDiscoveryType + OK_ServiceDiscovery, + FAILED_NoServicesOfThisType, + FAILED_NoServicesInThisScope, + FAILED_NoServicesOfThisTypeScope, + FAILED_NoServicesFound, + FAILED_UnknownError_InServiceDiscovery }; enum responseCode_ServicePaymentSelectionType { - OK_ServicePaymentSelection_responseCode_ServicePaymentSelectionType, - FAILED_ServiceSelectionInvalid_responseCode_ServicePaymentSelectionType, - FAILED_PaymentSelectionInvalid_responseCode_ServicePaymentSelectionType, - FAILED_UnknownError_InServicePaymentSelection_responseCode_ServicePaymentSelectionType + OK_ServicePaymentSelection, + FAILED_ServiceSelectionInvalid, + FAILED_PaymentSelectionInvalid, + FAILED_UnknownError_InServicePaymentSelection }; enum responseCode_PaymentDetailsType { - OK_PaymentDetails_responseCode_PaymentDetailsType, - FAILED_PaymentDetailsInvalid_responseCode_PaymentDetailsType, - FAILED_UnknownError_responseCode_PaymentDetailsType + OK_PaymentDetails, + FAILED_PaymentDetailsInvalid, + FAILED_UnknownError }; -enum chargingModeType +enum unitMultiplierType { - AC_charging_chargingModeType, - DC_charging_chargingModeType + d, + c, + m, + micro, + n, + p, + k, + M, + G, + T, + none }; enum unitSymbolType { - A_unitSymbolType, - deg_unitSymbolType, - F_unitSymbolType, - h_unitSymbolType, - min_unitSymbolType, - s_unitSymbolType, - s_1_unitSymbolType, - V_unitSymbolType, - V_VAr_unitSymbolType, - VA_unitSymbolType, - VAh_unitSymbolType, - VAr_unitSymbolType, - VArh_unitSymbolType, - W_unitSymbolType, - W_Hz_unitSymbolType, - W_s_unitSymbolType, - Wh_unitSymbolType, - Ah_unitSymbolType, - J_unitSymbolType + A, + deg, + F, + g, + h, + J, + J_s, + kg_J, + min, + N, + ohm, + s, + S, + s_1, + V, + V_VAr, + VA, + VAh, + VAr, + VArh, + W, + W_Hz, + W_s, + Wh, + Ah + }; -enum responseCode_ChargeParameterDiscoveryType +enum responseCode_PowerDiscoveryType { - OK_responseCode_ChargeParameterDiscoveryType, - FAILED_BatteryNotCompatible_responseCode_ChargeParameterDiscoveryType, - FAILED_UnknownError_responseCode_ChargeParameterDiscoveryType + OK_PowerDiscovery, + FAILED_UnknownError_InPowerDiscovery }; enum tariffIDType { - Standard_charge_tariffIDType, - Fast_charge_tariffIDType, - Green_charge_tariffIDType, - Grid_friendly_charge_tariffIDType, - Freely_parameterisable_charge_tariffIDType, - Charge_under_reserve_tariffIDType + Standard_charge, + Fast_charge, + Green_charge, + Grid_friendly_charge, + Freely_parameterisable_charge, + Charge_under_reserve }; enum responseCode_LineLockType { - OK_LineLock_responseCode_LineLockType, - FAILED_LineLockNotApplied_responseCode_LineLockType, - FAILED_UnknownError_InLineLock_responseCode_LineLockType + OK_LineLock, + FAILED_LineLockNotApplied, + FAILED_UnknownError_InLineLock }; enum responseCode_PowerDeliveryType { - OK_PowerDelivery_responseCode_PowerDeliveryType, - FAILED_PowerDeliveryNotApplied_responseCode_PowerDeliveryType, - FAILED_TariffSelectionInvalid_responseCode_PowerDeliveryType, - FAILED_ChargingProfileInvalid_responseCode_PowerDeliveryType, - FAILED_UnknownError_InPowerDelivery_responseCode_PowerDeliveryType + OK_PowerDelivery, + FAILED_PowerDeliveryNotApplied, + FAILED_TariffSelectionInvalid, + FAILED_ChargingProfileInvalid, + FAILED_UnknownError_InPowerDelivery }; enum responseCode_MeteringStatusType { - OK_MeteringStatus_responseCode_MeteringStatusType, - FAILED_UnknownError_InMeteringStatus_responseCode_MeteringStatusType + OK_MeteringStatus, + FAILED_UnknownError_InMeteringStatus }; enum responseCode_MeteringReceiptType { - OK_MeteringReceipt_responseCode_MeteringReceiptType, - FAILED_UnknownError_MeteringReceipt_responseCode_MeteringReceiptType - -}; - -enum responseCode_CableCheckType -{ - OK_responseCode_CableCheckType, - FAILED_UnknownError_responseCode_CableCheckType - -}; - -enum responseCode_PreChargeType -{ - OK_responseCode_PreChargeType, - FAILED_UnknownError_responseCode_PreChargeType - -}; - -enum responseCode_CurrentDemandType -{ - OK_responseCode_CurrentDemandType, - FAILED_UnknownError_responseCode_CurrentDemandType - -}; - -enum responseCode_WeldingDetectionType -{ - OK_responseCode_WeldingDetectionType, - FAILED_UnknownError_responseCode_WeldingDetectionType - -}; - -enum responseCode_TerminateChargingType -{ - OK_responseCode_TerminateChargingType, - FAILED_UnknownError_responseCode_TerminateChargingType + OK_MeteringReceipt, + FAILED_UnknownError_MeteringReceipt }; -struct arraylen_sessionIDType +struct arraylen_SessionInformationType_SessionID { size_t data; }; -struct sessionIDType +struct SessionInformationType_SessionID { uint8_t data[8]; - struct arraylen_sessionIDType arraylen; + struct arraylen_SessionInformationType_SessionID arraylen; + +}; + +struct arraylen_SessionInformationType_ServiceSessionID +{ + size_t data; + + +}; + +struct SessionInformationType_ServiceSessionID +{ + uint8_t data[8]; + struct arraylen_SessionInformationType_ServiceSessionID arraylen; }; @@ -246,25 +240,25 @@ struct selection_SessionInformationType }; -struct arraylen_protocolVersionType +struct arraylen_SessionInformationType_ProtocolVersion { size_t data; }; -struct protocolVersionType +struct SessionInformationType_ProtocolVersion { - uint32_t data[5]; - struct arraylen_protocolVersionType arraylen; + uint32_t data[256]; + struct arraylen_SessionInformationType_ProtocolVersion arraylen; }; struct SessionInformationType { - struct sessionIDType SessionID; - struct sessionIDType ServiceSessionID; - struct protocolVersionType ProtocolVersion; + struct SessionInformationType_SessionID SessionID; + struct SessionInformationType_ServiceSessionID ServiceSessionID; + struct SessionInformationType_ProtocolVersion ProtocolVersion; struct selection_SessionInformationType isused; }; @@ -278,17 +272,17 @@ struct selection_NotificationType }; -struct arraylen_service_string +struct arraylen_NotificationType_FaultMsg { size_t data; }; -struct service_string +struct NotificationType_FaultMsg { uint32_t data[256]; - struct arraylen_service_string arraylen; + struct arraylen_NotificationType_FaultMsg arraylen; }; @@ -302,7 +296,7 @@ struct EventListType struct NotificationType { enum faultCodeType FaultCode; - struct service_string FaultMsg; + struct NotificationType_FaultMsg FaultMsg; struct EventListType EventList; struct selection_NotificationType isused; @@ -323,17 +317,17 @@ struct HeaderType }; -struct arraylen_pevIDType +struct arraylen_SessionSetupReqType_PEVID { size_t data; }; -struct pevIDType +struct SessionSetupReqType_PEVID { uint32_t data[32]; - struct arraylen_pevIDType arraylen; + struct arraylen_SessionSetupReqType_PEVID arraylen; }; @@ -348,14 +342,13 @@ struct PEVStatusType { int ConnectorLocked; int ChargerStandby; - int ReadyToCharge; }; struct SessionSetupReqType { - struct pevIDType PEVID; + struct SessionSetupReqType_PEVID PEVID; struct PEVStatusType PEVStatus; struct selection_SessionSetupReqType isused; @@ -371,8 +364,8 @@ struct selection_BodyType unsigned int ServicePaymentSelectionRes:1; unsigned int PaymentDetailsReq:1; unsigned int PaymentDetailsRes:1; - unsigned int ChargeParameterDiscoveryReq:1; - unsigned int ChargeParameterDiscoveryRes:1; + unsigned int PowerDiscoveryReq:1; + unsigned int PowerDiscoveryRes:1; unsigned int LineLockReq:1; unsigned int LineLockRes:1; unsigned int PowerDeliveryReq:1; @@ -381,31 +374,21 @@ struct selection_BodyType unsigned int MeteringStatusRes:1; unsigned int MeteringReceiptReq:1; unsigned int MeteringReceiptRes:1; - unsigned int CableCheckReq:1; - unsigned int CableCheckRes:1; - unsigned int PreChargeReq:1; - unsigned int PreChargeRes:1; - unsigned int CurrentDemandReq:1; - unsigned int CurrentDemandRes:1; - unsigned int WeldingDetectionReq:1; - unsigned int WeldingDetectionRes:1; - unsigned int TerminateChargingReq:1; - unsigned int TerminateChargingRes:1; }; -struct arraylen_evseIDType +struct arraylen_SessionSetupResType_EVSEID { size_t data; }; -struct evseIDType +struct SessionSetupResType_EVSEID { uint8_t data[32]; - struct arraylen_evseIDType arraylen; + struct arraylen_SessionSetupResType_EVSEID arraylen; }; @@ -417,9 +400,6 @@ struct EVSEStatusType int PowerSwitchClosed; int RCD; int32_t ShutDownTime; - int ChargerStandby; - int EVSEMalfunction; - int StopCharging; }; @@ -427,7 +407,7 @@ struct EVSEStatusType struct SessionSetupResType { enum responseCode_SessionSetupType ResponseCode; - struct evseIDType EVSEID; + struct SessionSetupResType_EVSEID EVSEID; struct EVSEStatusType EVSEStatus; int32_t TCurrent; @@ -442,53 +422,53 @@ struct selection_ServiceDiscoveryReqType }; -struct arraylen_serviceScopeType +struct arraylen_ServiceDiscoveryReqType_ServiceScope { size_t data; }; -struct serviceScopeType +struct ServiceDiscoveryReqType_ServiceScope { - uint32_t data[20]; - struct arraylen_serviceScopeType arraylen; + uint32_t data[255]; + struct arraylen_ServiceDiscoveryReqType_ServiceScope arraylen; }; struct ServiceDiscoveryReqType { enum serviceTypeType ServiceType; - struct serviceScopeType ServiceScope; + struct ServiceDiscoveryReqType_ServiceScope ServiceScope; struct selection_ServiceDiscoveryReqType isused; }; -struct arraylen_serviceIDType +struct arraylen_ServiceDescriptionType_ServiceID { size_t data; }; -struct serviceIDType +struct ServiceDescriptionType_ServiceID { uint8_t data[8]; - struct arraylen_serviceIDType arraylen; + struct arraylen_ServiceDescriptionType_ServiceID arraylen; }; -struct arraylen_serviceNameType +struct arraylen_ServiceDescriptionType_ServiceName { size_t data; }; -struct serviceNameType +struct ServiceDescriptionType_ServiceName { - uint32_t data[20]; - struct arraylen_serviceNameType arraylen; + uint32_t data[64]; + struct arraylen_ServiceDescriptionType_ServiceName arraylen; }; @@ -501,12 +481,26 @@ struct selection_ServiceDescriptionType }; +struct arraylen_ServiceDescriptionType_ServiceScope +{ + size_t data; + + +}; + +struct ServiceDescriptionType_ServiceScope +{ + uint32_t data[255]; + struct arraylen_ServiceDescriptionType_ServiceScope arraylen; + +}; + struct ServiceDescriptionType { - struct serviceIDType ServiceID; - struct serviceNameType ServiceName; + struct ServiceDescriptionType_ServiceID ServiceID; + struct ServiceDescriptionType_ServiceName ServiceName; enum serviceTypeType ServiceType; - struct serviceScopeType ServiceScope; + struct ServiceDescriptionType_ServiceScope ServiceScope; struct selection_ServiceDescriptionType isused; }; @@ -540,9 +534,45 @@ struct ServiceDiscoveryResType }; +struct arraylen_ServicePaymentSelectionReqType_PEVPubKey +{ + size_t data; + + +}; + +struct ServicePaymentSelectionReqType_PEVPubKey +{ + uint8_t data[64]; + struct arraylen_ServicePaymentSelectionReqType_PEVPubKey arraylen; + +}; + struct ServicePaymentSelectionReqType { struct ServiceListType ServiceList; + struct ServicePaymentSelectionReqType_PEVPubKey PEVPubKey; + + +}; + +struct arraylen_ServicePaymentSelectionResType_MeteringAuthPubKey +{ + size_t data; + + +}; + +struct ServicePaymentSelectionResType_MeteringAuthPubKey +{ + uint8_t data[64]; + struct arraylen_ServicePaymentSelectionResType_MeteringAuthPubKey arraylen; + +}; + +struct selection_ServicePaymentSelectionResType +{ + unsigned int MeteringAuthPubKey:1; }; @@ -550,27 +580,28 @@ struct ServicePaymentSelectionReqType struct ServicePaymentSelectionResType { enum responseCode_ServicePaymentSelectionType ResponseCode; - + struct ServicePaymentSelectionResType_MeteringAuthPubKey MeteringAuthPubKey; + struct selection_ServicePaymentSelectionResType isused; }; -struct arraylen_contractIDType +struct arraylen_PaymentDetailsReqType_ContractID { size_t data; }; -struct contractIDType +struct PaymentDetailsReqType_ContractID { uint32_t data[128]; - struct arraylen_contractIDType arraylen; + struct arraylen_PaymentDetailsReqType_ContractID arraylen; }; struct PaymentDetailsReqType { - struct contractIDType ContractID; + struct PaymentDetailsReqType_ContractID ContractID; }; @@ -578,51 +609,47 @@ struct PaymentDetailsReqType struct PaymentDetailsResType { enum responseCode_PaymentDetailsType ResponseCode; - int32_t TCurrent; }; struct FloatingValueType { - int16_t Multiplier; + enum unitMultiplierType Multiplier; enum unitSymbolType Unit; int32_t Value; }; -struct ChargeParameterDiscoveryReqType +struct PowerDiscoveryReqType { struct PEVStatusType PEVStatus; - enum chargingModeType ChargingMode; int32_t EoC; struct FloatingValueType EAmount; struct FloatingValueType PEVMaxPower; int16_t PEVMaxPhases; struct FloatingValueType PEVMaxVoltage; struct FloatingValueType PEVMinVoltage; - struct FloatingValueType PEVMaxCurrent; - struct FloatingValueType PEVMinCurrent; }; -struct arraylen_energyProviderType +struct arraylen_PowerDiscoveryResType_EnergyProvider { size_t data; }; -struct energyProviderType +struct PowerDiscoveryResType_EnergyProvider { - uint32_t data[20]; - struct arraylen_energyProviderType arraylen; + uint32_t data[256]; + struct arraylen_PowerDiscoveryResType_EnergyProvider arraylen; }; -struct selection_ChargeParameterDiscoveryResType +struct selection_PowerDiscoveryResType { unsigned int EnergyProvider:1; unsigned int TariffTable:1; @@ -630,31 +657,31 @@ struct selection_ChargeParameterDiscoveryResType }; -struct arraylen_currencyType +struct arraylen_TariffTableType_Currency { size_t data; }; -struct currencyType +struct TariffTableType_Currency { uint32_t data[3]; - struct arraylen_currencyType arraylen; + struct arraylen_TariffTableType_Currency arraylen; }; -struct arraylen_tariffDescriptionType +struct arraylen_TariffDescrType_TariffDescription { size_t data; }; -struct tariffDescriptionType +struct TariffDescrType_TariffDescription { uint32_t data[32]; - struct arraylen_tariffDescriptionType arraylen; + struct arraylen_TariffDescrType_TariffDescription arraylen; }; @@ -698,7 +725,7 @@ struct TariffEntriesType struct TariffDescrType { enum tariffIDType TariffID; - struct tariffDescriptionType TariffDescription; + struct TariffDescrType_TariffDescription TariffDescription; struct TariffEntriesType TariffEntries; struct selection_TariffDescrType isused; @@ -713,24 +740,22 @@ struct arraylen_TariffTableType struct TariffTableType { - struct currencyType Currency; + struct TariffTableType_Currency Currency; struct TariffDescrType Tariff[6]; struct arraylen_TariffTableType arraylen; }; -struct ChargeParameterDiscoveryResType +struct PowerDiscoveryResType { - enum responseCode_ChargeParameterDiscoveryType ResponseCode; + enum responseCode_PowerDiscoveryType ResponseCode; struct EVSEStatusType EVSEStatus; - struct FloatingValueType EVSEMaxVoltage; - struct FloatingValueType EVSEMinVoltage; - struct FloatingValueType EVSEMaxCurrent; - struct FloatingValueType EVSEMinCurrent; + struct FloatingValueType EVSEVoltage; + struct FloatingValueType EVSEIMax; int16_t EVSEMaxPhases; - struct energyProviderType EnergyProvider; + struct PowerDiscoveryResType_EnergyProvider EnergyProvider; struct TariffTableType TariffTable; - struct selection_ChargeParameterDiscoveryResType isused; + struct selection_PowerDiscoveryResType isused; }; @@ -753,6 +778,15 @@ struct LineLockResType struct selection_PowerDeliveryReqType { unsigned int Tariff:1; + unsigned int ChargingProfile:1; + + +}; + +struct ChargingProfileType +{ + int32_t ChargingProfileEntryStart; + struct FloatingValueType ChargingProfileEntryMaxPower; }; @@ -762,6 +796,7 @@ struct PowerDeliveryReqType struct PEVStatusType PEVStatus; int ReqSwitchStatus; enum tariffIDType Tariff; + struct ChargingProfileType ChargingProfile; struct selection_PowerDeliveryReqType isused; }; @@ -769,7 +804,6 @@ struct PowerDeliveryReqType struct PowerDeliveryResType { enum responseCode_PowerDeliveryType ResponseCode; - struct EVSEStatusType EVSEStatus; }; @@ -782,6 +816,20 @@ struct MeteringStatusReqType }; +struct arraylen_MeteringStatusResType_EVSEID +{ + size_t data; + + +}; + +struct MeteringStatusResType_EVSEID +{ + uint8_t data[32]; + struct arraylen_MeteringStatusResType_EVSEID arraylen; + +}; + struct selection_MeteringStatusResType { unsigned int PCurrent:1; @@ -790,17 +838,17 @@ struct selection_MeteringStatusResType }; -struct arraylen_meterIDType +struct arraylen_MeterInfoType_MeterID { size_t data; }; -struct meterIDType +struct MeterInfoType_MeterID { uint32_t data[32]; - struct arraylen_meterIDType arraylen; + struct arraylen_MeterInfoType_MeterID arraylen; }; @@ -816,7 +864,7 @@ struct selection_MeterInfoType struct MeterInfoType { - struct meterIDType MeterID; + struct MeterInfoType_MeterID MeterID; struct FloatingValueType MeterReading; int16_t MeterStatus; int32_t TMeter; @@ -827,7 +875,7 @@ struct MeterInfoType struct MeteringStatusResType { enum responseCode_MeteringStatusType ResponseCode; - struct evseIDType EVSEID; + struct MeteringStatusResType_EVSEID EVSEID; struct EVSEStatusType EVSEStatus; int32_t TCurrent; struct FloatingValueType EVSEMaxPower; @@ -837,6 +885,20 @@ struct MeteringStatusResType }; +struct arraylen_MeteringReceiptReqType_PEVID +{ + size_t data; + + +}; + +struct MeteringReceiptReqType_PEVID +{ + uint32_t data[32]; + struct arraylen_MeteringReceiptReqType_PEVID arraylen; + +}; + struct selection_MeteringReceiptReqType { unsigned int PEVID:1; @@ -847,7 +909,7 @@ struct selection_MeteringReceiptReqType struct MeteringReceiptReqType { - struct pevIDType PEVID; + struct MeteringReceiptReqType_PEVID PEVID; struct PEVStatusType PEVStatus; int32_t TCurrent; enum tariffIDType Tariff; @@ -861,143 +923,44 @@ struct MeteringReceiptResType enum responseCode_MeteringReceiptType ResponseCode; -}; - -struct CableCheckReqType -{ - struct PEVStatusType PEVStatus; - - -}; - -struct CableCheckResType -{ - enum responseCode_CableCheckType ResponseCode; - struct EVSEStatusType EVSEStatus; - - -}; - -struct PreChargeReqType -{ - struct PEVStatusType PEVStatus; - struct FloatingValueType PEVTargetVoltage; - struct FloatingValueType PEVDemandCurrent; - struct FloatingValueType VoltageDifferential; - - -}; - -struct PreChargeResType -{ - enum responseCode_PreChargeType ResponseCode; - struct EVSEStatusType EVSEStatus; - struct FloatingValueType EVSEPresentVoltage; - - -}; - -struct CurrentDemandReqType -{ - struct PEVStatusType PEVStatus; - struct FloatingValueType PEVTargetVoltage; - struct FloatingValueType PEVDemandCurrent; - struct FloatingValueType CurrentDifferential; - struct FloatingValueType VoltageDifferential; - - -}; - -struct CurrentDemandResType -{ - enum responseCode_CurrentDemandType ResponseCode; - struct EVSEStatusType EVSEStatus; - struct FloatingValueType EVSEPresentVoltage; - struct FloatingValueType EVSEPresentCurrent; - - -}; - -struct WeldingDetectionReqType -{ - struct PEVStatusType PEVStatus; - - -}; - -struct WeldingDetectionResType -{ - enum responseCode_WeldingDetectionType ResponseCode; - struct EVSEStatusType EVSEStatus; - struct FloatingValueType EVSEPresentVoltage; - - -}; - -struct TerminateChargingReqType -{ - struct PEVStatusType PEVStatus; - - -}; - -struct TerminateChargingResType -{ - enum responseCode_TerminateChargingType ResponseCode; - struct EVSEStatusType EVSEStatus; - struct FloatingValueType EVSEPresentVoltage; - - }; struct BodyType { - struct SessionSetupReqType* SessionSetupReq; - struct SessionSetupResType* SessionSetupRes; - struct ServiceDiscoveryReqType* ServiceDiscoveryReq; - struct ServiceDiscoveryResType* ServiceDiscoveryRes; - struct ServicePaymentSelectionReqType* ServicePaymentSelectionReq; - struct ServicePaymentSelectionResType* ServicePaymentSelectionRes; - struct PaymentDetailsReqType* PaymentDetailsReq; - struct PaymentDetailsResType* PaymentDetailsRes; - struct ChargeParameterDiscoveryReqType* ChargeParameterDiscoveryReq; - struct ChargeParameterDiscoveryResType* ChargeParameterDiscoveryRes; - struct LineLockReqType* LineLockReq; - struct LineLockResType* LineLockRes; - struct PowerDeliveryReqType* PowerDeliveryReq; - struct PowerDeliveryResType* PowerDeliveryRes; - struct MeteringStatusReqType* MeteringStatusReq; - struct MeteringStatusResType* MeteringStatusRes; - struct MeteringReceiptReqType* MeteringReceiptReq; - struct MeteringReceiptResType* MeteringReceiptRes; - struct CableCheckReqType* CableCheckReq; - struct CableCheckResType* CableCheckRes; - struct PreChargeReqType* PreChargeReq; - struct PreChargeResType* PreChargeRes; - struct CurrentDemandReqType* CurrentDemandReq; - struct CurrentDemandResType* CurrentDemandRes; - struct WeldingDetectionReqType* WeldingDetectionReq; - struct WeldingDetectionResType* WeldingDetectionRes; - struct TerminateChargingReqType* TerminateChargingReq; - struct TerminateChargingResType* TerminateChargingRes; + struct SessionSetupReqType SessionSetupReq; + struct SessionSetupResType SessionSetupRes; + struct ServiceDiscoveryReqType ServiceDiscoveryReq; + struct ServiceDiscoveryResType ServiceDiscoveryRes; + struct ServicePaymentSelectionReqType ServicePaymentSelectionReq; + struct ServicePaymentSelectionResType ServicePaymentSelectionRes; + struct PaymentDetailsReqType PaymentDetailsReq; + struct PaymentDetailsResType PaymentDetailsRes; + struct PowerDiscoveryReqType PowerDiscoveryReq; + struct PowerDiscoveryResType PowerDiscoveryRes; + struct LineLockReqType LineLockReq; + struct LineLockResType LineLockRes; + struct PowerDeliveryReqType PowerDeliveryReq; + struct PowerDeliveryResType PowerDeliveryRes; + struct MeteringStatusReqType MeteringStatusReq; + struct MeteringStatusResType MeteringStatusRes; + struct MeteringReceiptReqType MeteringReceiptReq; + struct MeteringReceiptResType MeteringReceiptRes; struct selection_BodyType isused; }; struct AnonType_V2G_Message { - struct HeaderType* Header; + struct HeaderType Header; struct BodyType Body; }; - -struct EXIDocumentType -{ - struct AnonType_V2G_Message V2G_Message; + +/* init method of the V2G message */ +void init_AnonType_V2G_Message(struct AnonType_V2G_Message* v2gMsg); -}; #endif diff --git a/src/service/v2g_serviceDispatcher.c b/src/service/v2g_serviceDispatcher.c index 905269f..2a1296a 100644 --- a/src/service/v2g_serviceDispatcher.c +++ b/src/service/v2g_serviceDispatcher.c @@ -2,7 +2,7 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -21,7 +21,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -30,685 +30,578 @@ #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 "v2g_serviceDataSerializiation.h" #include "EXITypes.h" #include "EXIDecoder.h" #include "EXIEncoder.h" -static int deserializeMessage(struct EXIService* service); - /** * Deserialize an element value of the EXI stream and assign it to the * service data structure */ -static int deserializeElementCharacter(struct EXIService* service) +static int deserializeElementCharacter(struct v2gService* service) { switch(service->eqn.namespaceURI) { case 4: switch(service->eqn.localPart) { - case 43: /*PEVID*/ - if(service->val.type == STRING) - { - if( service->idPath.id[2] == 78) - { - memcpy(service->exiMsg.V2G_Message.Body.SessionSetupReq->PEVID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Body.SessionSetupReq->PEVID.arraylen.data = service->val.string.len; - service->exiMsg.V2G_Message.Body.SessionSetupReq->isused.PEVID=1; - - } else if(service->idPath.id[2] == 33) - { - memcpy(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->PEVID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->PEVID.arraylen.data = service->val.string.len; - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->isused.PEVID=1; - } - + case 26: /*PEVID*/ + + if(service->val.type == STRING) + { + /* string copy and string length assignment */ + memcpy(service->v2gMsg.Body.SessionSetupReq.PEVID.data, service->val.string.codepoints,service->val.string.len); + service->v2gMsg.Body.SessionSetupReq.PEVID.arraylen.data = service->val.string.len; + } else { return -1; /* wrong data type */ } - + + /* is used */ + service->v2gMsg.Body.SessionSetupReq.isused.PEVID=1; break; - case 77: /*ServiceType*/ - if(service->val.type == ENUMERATION) + case 58: /*ServiceType*/ + if(service->val.type == ENUMERATION) { - service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq->ServiceType = service->val.enumeration; - service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq->isused.ServiceType=1; - - + service->v2gMsg.Body.ServiceDiscoveryReq.ServiceType=service->val.enumeration; } else { return -1; /* wrong data type */ } - + + /* is used */ + service->v2gMsg.Body.ServiceDiscoveryReq.isused.ServiceType=1; break; - case 76: /*ServiceScope*/ - if(service->val.type == STRING) - { - memcpy(service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq->ServiceScope.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq->ServiceScope.arraylen.data = service->val.string.len; - service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq->isused.ServiceScope=1; - + case 57: /*ServiceScope*/ + + if(service->val.type == STRING) + { + /* string copy and string length assignment */ + memcpy(service->v2gMsg.Body.ServiceDiscoveryReq.ServiceScope.data, service->val.string.codepoints,service->val.string.len); + service->v2gMsg.Body.ServiceDiscoveryReq.ServiceScope.arraylen.data = service->val.string.len; + } else { return -1; /* wrong data type */ } - + + /* is used */ + service->v2gMsg.Body.ServiceDiscoveryReq.isused.ServiceScope=1; break; - case 9: /*ContractID*/ - if(service->val.type == STRING) - { - memcpy(service->exiMsg.V2G_Message.Body.PaymentDetailsReq->ContractID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Body.PaymentDetailsReq->ContractID.arraylen.data = service->val.string.len; - - + case 31: /*PEVPubKey*/ + + if(service->val.type == BINARY_HEX) + { + /* array copy and array length assignment */ + memcpy(service->v2gMsg.Body.ServicePaymentSelectionReq.PEVPubKey.data, service->val.binary.data,service->val.binary.len); + service->v2gMsg.Body.ServicePaymentSelectionReq.PEVPubKey.arraylen.data = service->val.binary.len; + } else { return -1; /* wrong data type */ } - + break; - case 8: /*ChargingMode*/ - if(service->val.type == ENUMERATION) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->ChargingMode = service->val.enumeration; - + case 1: /*ContractID*/ + + if(service->val.type == STRING) + { + /* string copy and string length assignment */ + memcpy(service->v2gMsg.Body.PaymentDetailsReq.ContractID.data, service->val.string.codepoints,service->val.string.len); + service->v2gMsg.Body.PaymentDetailsReq.ContractID.arraylen.data = service->val.string.len; + } else { return -1; /* wrong data type */ } - + break; - case 27: /*EoC*/ - if(service->val.type == INTEGER_32) + case 10: /*EoC*/ + if(service->val.type == INTEGER_32) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->EoC = service->val.int32; - - + service->v2gMsg.Body.PowerDiscoveryReq.EoC=service->val.int32; } else { return -1; /* wrong data type */ } - + break; - case 45: /*PEVMaxPhases*/ - if(service->val.type == INTEGER_16) + case 27: /*PEVMaxPhases*/ + if(service->val.type == INTEGER_16) { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxPhases = service->val.int32; - - + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPhases=service->val.int32; } else { return -1; /* wrong data type */ } - + break; - case 64: /*ReqLockStatus*/ - if(service->val.type == BOOLEAN) + case 45: /*ReqLockStatus*/ + if(service->val.type == BOOLEAN) { - service->exiMsg.V2G_Message.Body.LineLockReq->ReqLockStatus = service->val.boolean; - - + service->v2gMsg.Body.LineLockReq.ReqLockStatus=service->val.boolean; } else { return -1; /* wrong data type */ } - + break; - case 65: /*ReqSwitchStatus*/ - if(service->val.type == BOOLEAN) + case 46: /*ReqSwitchStatus*/ + if(service->val.type == BOOLEAN) { - service->exiMsg.V2G_Message.Body.PowerDeliveryReq->ReqSwitchStatus = service->val.boolean; - - + service->v2gMsg.Body.PowerDeliveryReq.ReqSwitchStatus=service->val.boolean; } else { return -1; /* wrong data type */ } - + break; - case 83: /*Tariff*/ - if(service->val.type == ENUMERATION) + case 64: /*Tariff*/ + if(service->val.type == ENUMERATION) { - if( service->idPath.id[2] == 56) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryReq->Tariff = service->val.enumeration; - service->exiMsg.V2G_Message.Body.PowerDeliveryReq->isused.Tariff=1; - - } else if(service->idPath.id[2] == 33) - { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->Tariff = service->val.enumeration; - } - - + service->v2gMsg.Body.PowerDeliveryReq.Tariff=service->val.enumeration; } else { return -1; /* wrong data type */ } - + + /* is used */ + service->v2gMsg.Body.PowerDeliveryReq.isused.Tariff=1; break; - case 82: /*TCurrent*/ - if(service->val.type == INTEGER_32) + case 63: /*TCurrent*/ + if(service->val.type == INTEGER_32) { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->TCurrent = service->val.int32; - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->isused.TCurrent=1; - - + service->v2gMsg.Body.MeteringReceiptReq.TCurrent=service->val.int32; } else { return -1; /* wrong data type */ } - + + /* is used */ + service->v2gMsg.Body.MeteringReceiptReq.isused.TCurrent=1; break; } /* close switch(service->eqn.localPart) */ break; case 5: switch(service->eqn.localPart) { - case 36: /*SessionID*/ - if(service->val.type == BINARY_HEX) - { - memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.SessionID.data, service->val.binary.data,service->val.binary.len); - service->exiMsg.V2G_Message.Header->SessionInformation.SessionID.arraylen.data = service->val.binary.len; - - + case 34: /*SessionID*/ + + if(service->val.type == BINARY_HEX) + { + /* array copy and array length assignment */ + memcpy(service->v2gMsg.Header.SessionInformation.SessionID.data, service->val.binary.data,service->val.binary.len); + service->v2gMsg.Header.SessionInformation.SessionID.arraylen.data = service->val.binary.len; + } else { return -1; /* wrong data type */ } - + break; - case 34: /*ServiceSessionID*/ - if(service->val.type == BINARY_HEX) - { - memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.ServiceSessionID.data, service->val.binary.data,service->val.binary.len); - service->exiMsg.V2G_Message.Header->SessionInformation.ServiceSessionID.arraylen.data = service->val.binary.len; - service->exiMsg.V2G_Message.Header->SessionInformation.isused.ServiceSessionID=1; - - + case 32: /*ServiceSessionID*/ + + if(service->val.type == BINARY_HEX) + { + /* array copy and array length assignment */ + memcpy(service->v2gMsg.Header.SessionInformation.ServiceSessionID.data, service->val.binary.data,service->val.binary.len); + service->v2gMsg.Header.SessionInformation.ServiceSessionID.arraylen.data = service->val.binary.len; + } else { return -1; /* wrong data type */ } - + + /* is used */ + service->v2gMsg.Header.SessionInformation.isused.ServiceSessionID=1; break; - case 25: /*ProtocolVersion*/ - if(service->val.type == STRING) - { - memcpy(service->exiMsg.V2G_Message.Header->SessionInformation.ProtocolVersion.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Header->SessionInformation.ProtocolVersion.arraylen.data = service->val.string.len; - service->exiMsg.V2G_Message.Header->SessionInformation.isused.ProtocolVersion=1; - + case 24: /*ProtocolVersion*/ + + if(service->val.type == STRING) + { + /* string copy and string length assignment */ + memcpy(service->v2gMsg.Header.SessionInformation.ProtocolVersion.data, service->val.string.codepoints,service->val.string.len); + service->v2gMsg.Header.SessionInformation.ProtocolVersion.arraylen.data = service->val.string.len; + } else { return -1; /* wrong data type */ } - + + /* is used */ + service->v2gMsg.Header.SessionInformation.isused.ProtocolVersion=1; break; - case 10: /*Event*/ - if(service->val.type == ENUMERATION) + case 9: /*Event*/ + if(service->val.type == ENUMERATION) { - service->exiMsg.V2G_Message.Header->Notification.EventList.Event = service->val.enumeration; - - + service->v2gMsg.Header.Notification.EventList.Event=service->val.enumeration; } else { return -1; /* wrong data type */ } - + break; - case 14: /*FaultCode*/ - if(service->val.type == ENUMERATION) + case 13: /*FaultCode*/ + if(service->val.type == ENUMERATION) { - service->exiMsg.V2G_Message.Header->Notification.FaultCode = service->val.enumeration; - service->exiMsg.V2G_Message.Header->Notification.isused.FaultCode=1; - - + service->v2gMsg.Header.Notification.FaultCode=service->val.enumeration; } else { return -1; /* wrong data type */ } - + + /* is used */ + service->v2gMsg.Header.Notification.isused.FaultCode=1; break; - case 15: /*FaultMsg*/ - if(service->val.type == STRING) - { - memcpy(service->exiMsg.V2G_Message.Header->Notification.FaultMsg.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Header->Notification.FaultMsg.arraylen.data = service->val.string.len; - service->exiMsg.V2G_Message.Header->Notification.isused.FaultMsg=1; - + case 14: /*FaultMsg*/ + + if(service->val.type == STRING) + { + /* string copy and string length assignment */ + memcpy(service->v2gMsg.Header.Notification.FaultMsg.data, service->val.string.codepoints,service->val.string.len); + service->v2gMsg.Header.Notification.FaultMsg.arraylen.data = service->val.string.len; + } else { return -1; /* wrong data type */ } - + + /* is used */ + service->v2gMsg.Header.Notification.isused.FaultMsg=1; break; case 4: /*ConnectorLocked*/ - if(service->val.type == BOOLEAN) + if(service->val.type == BOOLEAN) { - if( service->idPath.id[2] == 78) - { - service->exiMsg.V2G_Message.Body.SessionSetupReq->PEVStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 4) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 28) - { - service->exiMsg.V2G_Message.Body.LineLockReq->PEVStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 56) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryReq->PEVStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 33) - { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->PEVStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 0) - { - service->exiMsg.V2G_Message.Body.CableCheckReq->PEVStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 90) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionReq->PEVStatus.ConnectorLocked = service->val.boolean; - - } else if(service->idPath.id[2] == 85) - { - service->exiMsg.V2G_Message.Body.TerminateChargingReq->PEVStatus.ConnectorLocked = service->val.boolean; - } - - + if(service->idPath.id[2] == 59) + { + service->v2gMsg.Body.SessionSetupReq.PEVStatus.ConnectorLocked=service->val.boolean; + + } else if(service->idPath.id[2] == 41) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVStatus.ConnectorLocked=service->val.boolean; + + } else if(service->idPath.id[2] == 11) + { + service->v2gMsg.Body.LineLockReq.PEVStatus.ConnectorLocked=service->val.boolean; + + } else if(service->idPath.id[2] == 37) + { + service->v2gMsg.Body.PowerDeliveryReq.PEVStatus.ConnectorLocked=service->val.boolean; + + } else if(service->idPath.id[2] == 17) + { + service->v2gMsg.Body.MeteringReceiptReq.PEVStatus.ConnectorLocked=service->val.boolean; + + } } else { return -1; /* wrong data type */ } - + break; case 0: /*ChargerStandby*/ - if(service->val.type == BOOLEAN) + if(service->val.type == BOOLEAN) { - if( service->idPath.id[2] == 78) - { - service->exiMsg.V2G_Message.Body.SessionSetupReq->PEVStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 4) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 28) - { - service->exiMsg.V2G_Message.Body.LineLockReq->PEVStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 56) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryReq->PEVStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 33) - { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->PEVStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 0) - { - service->exiMsg.V2G_Message.Body.CableCheckReq->PEVStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 90) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionReq->PEVStatus.ChargerStandby = service->val.boolean; - - } else if(service->idPath.id[2] == 85) - { - service->exiMsg.V2G_Message.Body.TerminateChargingReq->PEVStatus.ChargerStandby = service->val.boolean; - } - - + if(service->idPath.id[2] == 59) + { + service->v2gMsg.Body.SessionSetupReq.PEVStatus.ChargerStandby=service->val.boolean; + + } else if(service->idPath.id[2] == 41) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVStatus.ChargerStandby=service->val.boolean; + + } else if(service->idPath.id[2] == 11) + { + service->v2gMsg.Body.LineLockReq.PEVStatus.ChargerStandby=service->val.boolean; + + } else if(service->idPath.id[2] == 37) + { + service->v2gMsg.Body.PowerDeliveryReq.PEVStatus.ChargerStandby=service->val.boolean; + + } else if(service->idPath.id[2] == 17) + { + service->v2gMsg.Body.MeteringReceiptReq.PEVStatus.ChargerStandby=service->val.boolean; + + } } else { return -1; /* wrong data type */ } - + break; - case 27: /*ReadyToCharge*/ - if(service->val.type == BOOLEAN) + case 20: /*Multiplier*/ + if(service->val.type == ENUMERATION) { - if( service->idPath.id[2] == 78) - { - service->exiMsg.V2G_Message.Body.SessionSetupReq->PEVStatus.ReadyToCharge = service->val.boolean; - - } else if(service->idPath.id[2] == 4) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVStatus.ReadyToCharge = service->val.boolean; - - } else if(service->idPath.id[2] == 28) - { - service->exiMsg.V2G_Message.Body.LineLockReq->PEVStatus.ReadyToCharge = service->val.boolean; - - } else if(service->idPath.id[2] == 56) - { - service->exiMsg.V2G_Message.Body.PowerDeliveryReq->PEVStatus.ReadyToCharge = service->val.boolean; - - } else if(service->idPath.id[2] == 33) - { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->PEVStatus.ReadyToCharge = service->val.boolean; - - } else if(service->idPath.id[2] == 0) - { - service->exiMsg.V2G_Message.Body.CableCheckReq->PEVStatus.ReadyToCharge = service->val.boolean; - - } else if(service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVStatus.ReadyToCharge = service->val.boolean; - - } else if(service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVStatus.ReadyToCharge = service->val.boolean; - - } else if(service->idPath.id[2] == 90) - { - service->exiMsg.V2G_Message.Body.WeldingDetectionReq->PEVStatus.ReadyToCharge = service->val.boolean; - - } else if(service->idPath.id[2] == 85) - { - service->exiMsg.V2G_Message.Body.TerminateChargingReq->PEVStatus.ReadyToCharge = service->val.boolean; - } - - + if(service->idPath.id[3] == 2) + { + service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 28) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPower.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 29) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxVoltage.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 30) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMinVoltage.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 8) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEVoltage.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 4) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEIMax.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 6) + { + service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[3] == 25) + { + service->v2gMsg.Body.MeteringStatusRes.PCurrent.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[2] == 37) + { + service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryMaxPower.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[7] == 46) + { + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].TariffPMax.Multiplier=service->val.enumeration; + + } else if(service->idPath.id[7] == 6) + { + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].EPrice.Multiplier=service->val.enumeration; + + } } else { return -1; /* wrong data type */ } - + break; - case 21: /*Multiplier*/ - if(service->val.type == INTEGER_16) + case 49: /*Unit*/ + if(service->val.type == ENUMERATION) { - if( service->idPath.id[3] == 15) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->EAmount.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 46) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxPower.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 47) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 49) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMinVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 44) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 48) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMinCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 51 && service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVTargetVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 42 && service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVDemandCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 89 && service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->VoltageDifferential.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 51 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVTargetVoltage.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 42 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVDemandCurrent.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 14) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->CurrentDifferential.Multiplier = service->val.int32; - - } else if(service->idPath.id[3] == 89 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->VoltageDifferential.Multiplier = service->val.int32; - - } else if(service->idPath.id[4] == 19) - { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterReading.Multiplier = service->val.int32; - } - - + if(service->idPath.id[3] == 2) + { + service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 28) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPower.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 29) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxVoltage.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 30) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMinVoltage.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 8) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEVoltage.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 4) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEIMax.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 6) + { + service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Unit=service->val.enumeration; + + } else if(service->idPath.id[3] == 25) + { + service->v2gMsg.Body.MeteringStatusRes.PCurrent.Unit=service->val.enumeration; + + } else if(service->idPath.id[2] == 37) + { + service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryMaxPower.Unit=service->val.enumeration; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Unit=service->val.enumeration; + + } else if(service->idPath.id[7] == 46) + { + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].TariffPMax.Unit=service->val.enumeration; + + } else if(service->idPath.id[7] == 6) + { + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].EPrice.Unit=service->val.enumeration; + + } } else { return -1; /* wrong data type */ } - + break; - case 52: /*Unit*/ - if(service->val.type == ENUMERATION) + case 50: /*Value*/ + if(service->val.type == INTEGER_32) { - if( service->idPath.id[3] == 15) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->EAmount.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 46) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxPower.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 47) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxVoltage.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 49) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMinVoltage.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 44) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxCurrent.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 48) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMinCurrent.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 51 && service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVTargetVoltage.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 42 && service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVDemandCurrent.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 89 && service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->VoltageDifferential.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 51 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVTargetVoltage.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 42 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVDemandCurrent.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 14) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->CurrentDifferential.Unit = service->val.enumeration; - - } else if(service->idPath.id[3] == 89 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->VoltageDifferential.Unit = service->val.enumeration; - - } else if(service->idPath.id[4] == 19) - { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterReading.Unit = service->val.enumeration; - } - - + if(service->idPath.id[3] == 2) + { + service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Value=service->val.int32; + + } else if(service->idPath.id[3] == 28) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPower.Value=service->val.int32; + + } else if(service->idPath.id[3] == 29) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxVoltage.Value=service->val.int32; + + } else if(service->idPath.id[3] == 30) + { + service->v2gMsg.Body.PowerDiscoveryReq.PEVMinVoltage.Value=service->val.int32; + + } else if(service->idPath.id[3] == 8) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEVoltage.Value=service->val.int32; + + } else if(service->idPath.id[3] == 4) + { + service->v2gMsg.Body.PowerDiscoveryRes.EVSEIMax.Value=service->val.int32; + + } else if(service->idPath.id[3] == 6) + { + service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Value=service->val.int32; + + } else if(service->idPath.id[3] == 25) + { + service->v2gMsg.Body.MeteringStatusRes.PCurrent.Value=service->val.int32; + + } else if(service->idPath.id[2] == 37) + { + service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryMaxPower.Value=service->val.int32; + + } else if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Value=service->val.int32; + + } else if(service->idPath.id[7] == 46) + { + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].TariffPMax.Value=service->val.int32; + + } else if(service->idPath.id[7] == 6) + { + service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.TariffEntry[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffEntries.arraylen.TariffEntry].EPrice.Value=service->val.int32; + + } } else { return -1; /* wrong data type */ } - + break; - case 53: /*Value*/ - if(service->val.type == INTEGER_32) + case 2: /*ChargingProfileEntryStart*/ + if(service->val.type == INTEGER_32) { - if( service->idPath.id[3] == 15) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->EAmount.Value = service->val.int32; - - } else if(service->idPath.id[3] == 46) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxPower.Value = service->val.int32; - - } else if(service->idPath.id[3] == 47) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxVoltage.Value = service->val.int32; - - } else if(service->idPath.id[3] == 49) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMinVoltage.Value = service->val.int32; - - } else if(service->idPath.id[3] == 44) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMaxCurrent.Value = service->val.int32; - - } else if(service->idPath.id[3] == 48) - { - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->PEVMinCurrent.Value = service->val.int32; - - } else if(service->idPath.id[3] == 51 && service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVTargetVoltage.Value = service->val.int32; - - } else if(service->idPath.id[3] == 42 && service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->PEVDemandCurrent.Value = service->val.int32; - - } else if(service->idPath.id[3] == 89 && service->idPath.id[2] == 60) - { - service->exiMsg.V2G_Message.Body.PreChargeReq->VoltageDifferential.Value = service->val.int32; - - } else if(service->idPath.id[3] == 51 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVTargetVoltage.Value = service->val.int32; - - } else if(service->idPath.id[3] == 42 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->PEVDemandCurrent.Value = service->val.int32; - - } else if(service->idPath.id[3] == 14) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->CurrentDifferential.Value = service->val.int32; - - } else if(service->idPath.id[3] == 89 && service->idPath.id[2] == 10) - { - service->exiMsg.V2G_Message.Body.CurrentDemandReq->VoltageDifferential.Value = service->val.int32; - - } else if(service->idPath.id[4] == 19) - { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterReading.Value = service->val.int32; - } - - + service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryStart=service->val.int32; } else { return -1; /* wrong data type */ } - + break; - case 17: /*MeterID*/ - if(service->val.type == STRING) - { - memcpy(service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterID.data, service->val.string.codepoints,service->val.string.len*sizeof(uint32_t)); - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterID.arraylen.data = service->val.string.len; - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.isused.MeterID=1; - + case 16: /*MeterID*/ + + if(service->val.type == STRING) + { + /* string copy and string length assignment */ + memcpy(service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterID.data, service->val.string.codepoints,service->val.string.len); + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterID.arraylen.data = service->val.string.len; + } else { return -1; /* wrong data type */ } - + + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterID=1; break; - case 20: /*MeterStatus*/ - if(service->val.type == INTEGER_16) + case 19: /*MeterStatus*/ + if(service->val.type == INTEGER_16) { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.MeterStatus = service->val.int32; - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.isused.MeterStatus=1; - - + if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterStatus=service->val.int32; + + } else if(service->idPath.id[2] == 17) + { + service->v2gMsg.Body.MeteringReceiptReq.MeterInfo.MeterStatus=service->val.int32; + + } } else { return -1; /* wrong data type */ } - + + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterStatus=1; break; - case 40: /*TMeter*/ - if(service->val.type == INTEGER_32) + case 37: /*TMeter*/ + if(service->val.type == INTEGER_32) { - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.TMeter = service->val.int32; - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.isused.TMeter=1; - - + if(service->idPath.id[2] == 23) + { + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.TMeter=service->val.int32; + + } else if(service->idPath.id[2] == 17) + { + service->v2gMsg.Body.MeteringReceiptReq.MeterInfo.TMeter=service->val.int32; + + } } else { return -1; /* wrong data type */ } - + + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.TMeter=1; break; } /* close switch(service->eqn.localPart) */ break; @@ -721,13 +614,49 @@ static int deserializeElementCharacter(struct EXIService* service) * Depending on the current EXI event a message element is deserialized or a * defined service method is called in here */ -static int deserializeElementOrServiceCall(struct EXIService* service) +static int deserializeElementOrServiceCall(struct v2gService* service) { switch(service->eqn.namespaceURI) { case 4: switch(service->eqn.localPart) { - case 78:/* SessionSetupReq */ + case 26:/* PEVID */ + + service->v2gMsg.Body.SessionSetupReq.isused.PEVID=1; + service->v2gMsg.Body.MeteringReceiptReq.isused.PEVID=1; + + break; + case 58:/* ServiceType */ + + + /* is used */ + service->v2gMsg.Body.ServiceDiscoveryReq.isused.ServiceType=1; + break; + case 57:/* ServiceScope */ + + + /* is used */ + service->v2gMsg.Body.ServiceDiscoveryReq.isused.ServiceScope=1; + break; + case 64:/* Tariff */ + + + /* is used */ + service->v2gMsg.Body.PowerDeliveryReq.isused.Tariff=1; + break; + case 0:/* ChargingProfile */ + + + /* is used */ + service->v2gMsg.Body.PowerDeliveryReq.isused.ChargingProfile=1; + break; + case 63:/* TCurrent */ + + + /* is used */ + service->v2gMsg.Body.MeteringReceiptReq.isused.TCurrent=1; + break; + case 59:/* SessionSetupReq */ @@ -735,28 +664,27 @@ static int deserializeElementOrServiceCall(struct EXIService* service) /* test, if data length is unequal to the expected payload */ if((service->inStream.size)!= *(service->inStream.pos)) { - service->errorCode = EXI_NON_VALID_MESSAGE; + service->errorCode = V2G_NON_VALID_MESSAGE; return -1; } /* service call */ - sessionSetup((service->exiMsg.V2G_Message.Body.SessionSetupReq), (service->exiMsg.V2G_Message.Body.SessionSetupRes)); + sessionSetup(&(service->v2gMsg.Body.SessionSetupReq), &(service->v2gMsg.Body.SessionSetupRes)); /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.SessionSetupRes=1; - service->exiMsg.V2G_Message.Body.isused.SessionSetupReq=0; + service->v2gMsg.Body.isused.SessionSetupRes=1; /* serialize the response data */ if(serialize_message(service)) { /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; + service->errorCode= V2G_SERIALIZATION_FAILED; } break; - case 67:/* ServiceDiscoveryReq */ + case 48:/* ServiceDiscoveryReq */ @@ -764,28 +692,27 @@ static int deserializeElementOrServiceCall(struct EXIService* service) /* test, if data length is unequal to the expected payload */ if((service->inStream.size)!= *(service->inStream.pos)) { - service->errorCode = EXI_NON_VALID_MESSAGE; + service->errorCode = V2G_NON_VALID_MESSAGE; return -1; } /* service call */ - serviceDiscovery((service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq), (service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes)); + serviceDiscovery(&(service->v2gMsg.Body.ServiceDiscoveryReq), &(service->v2gMsg.Body.ServiceDiscoveryRes)); /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.ServiceDiscoveryRes=1; - service->exiMsg.V2G_Message.Body.isused.ServiceDiscoveryReq=0; + service->v2gMsg.Body.isused.ServiceDiscoveryRes=1; /* serialize the response data */ if(serialize_message(service)) { /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; + service->errorCode= V2G_SERIALIZATION_FAILED; } break; - case 72:/* ServicePaymentSelectionReq */ + case 53:/* ServicePaymentSelectionReq */ @@ -793,28 +720,27 @@ static int deserializeElementOrServiceCall(struct EXIService* service) /* test, if data length is unequal to the expected payload */ if((service->inStream.size)!= *(service->inStream.pos)) { - service->errorCode = EXI_NON_VALID_MESSAGE; + service->errorCode = V2G_NON_VALID_MESSAGE; return -1; } /* service call */ - selectedServicePayment((service->exiMsg.V2G_Message.Body.ServicePaymentSelectionReq), (service->exiMsg.V2G_Message.Body.ServicePaymentSelectionRes)); + selectedServicePayment(&(service->v2gMsg.Body.ServicePaymentSelectionReq), &(service->v2gMsg.Body.ServicePaymentSelectionRes)); /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.ServicePaymentSelectionRes=1; - service->exiMsg.V2G_Message.Body.isused.ServicePaymentSelectionReq=0; + service->v2gMsg.Body.isused.ServicePaymentSelectionRes=1; /* serialize the response data */ if(serialize_message(service)) { /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; + service->errorCode= V2G_SERIALIZATION_FAILED; } break; - case 52:/* PaymentDetailsReq */ + case 33:/* PaymentDetailsReq */ @@ -822,28 +748,27 @@ static int deserializeElementOrServiceCall(struct EXIService* service) /* test, if data length is unequal to the expected payload */ if((service->inStream.size)!= *(service->inStream.pos)) { - service->errorCode = EXI_NON_VALID_MESSAGE; + service->errorCode = V2G_NON_VALID_MESSAGE; return -1; } /* service call */ - paymentDetails((service->exiMsg.V2G_Message.Body.PaymentDetailsReq), (service->exiMsg.V2G_Message.Body.PaymentDetailsRes)); + paymentDetails(&(service->v2gMsg.Body.PaymentDetailsReq), &(service->v2gMsg.Body.PaymentDetailsRes)); /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.PaymentDetailsRes=1; - service->exiMsg.V2G_Message.Body.isused.PaymentDetailsReq=0; + service->v2gMsg.Body.isused.PaymentDetailsRes=1; /* serialize the response data */ if(serialize_message(service)) { /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; + service->errorCode= V2G_SERIALIZATION_FAILED; } break; - case 4:/* ChargeParameterDiscoveryReq */ + case 41:/* PowerDiscoveryReq */ @@ -851,28 +776,27 @@ static int deserializeElementOrServiceCall(struct EXIService* service) /* test, if data length is unequal to the expected payload */ if((service->inStream.size)!= *(service->inStream.pos)) { - service->errorCode = EXI_NON_VALID_MESSAGE; + service->errorCode = V2G_NON_VALID_MESSAGE; return -1; } /* service call */ - chargeParameterDiscovery((service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq), (service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes)); + powerDiscovery(&(service->v2gMsg.Body.PowerDiscoveryReq), &(service->v2gMsg.Body.PowerDiscoveryRes)); /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.ChargeParameterDiscoveryRes=1; - service->exiMsg.V2G_Message.Body.isused.ChargeParameterDiscoveryReq=0; + service->v2gMsg.Body.isused.PowerDiscoveryRes=1; /* serialize the response data */ if(serialize_message(service)) { /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; + service->errorCode= V2G_SERIALIZATION_FAILED; } break; - case 28:/* LineLockReq */ + case 11:/* LineLockReq */ @@ -880,28 +804,27 @@ static int deserializeElementOrServiceCall(struct EXIService* service) /* test, if data length is unequal to the expected payload */ if((service->inStream.size)!= *(service->inStream.pos)) { - service->errorCode = EXI_NON_VALID_MESSAGE; + service->errorCode = V2G_NON_VALID_MESSAGE; return -1; } /* service call */ - lineLock((service->exiMsg.V2G_Message.Body.LineLockReq), (service->exiMsg.V2G_Message.Body.LineLockRes)); + lineLock(&(service->v2gMsg.Body.LineLockReq), &(service->v2gMsg.Body.LineLockRes)); /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.LineLockRes=1; - service->exiMsg.V2G_Message.Body.isused.LineLockReq=0; + service->v2gMsg.Body.isused.LineLockRes=1; /* serialize the response data */ if(serialize_message(service)) { /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; + service->errorCode= V2G_SERIALIZATION_FAILED; } break; - case 56:/* PowerDeliveryReq */ + case 37:/* PowerDeliveryReq */ @@ -909,28 +832,27 @@ static int deserializeElementOrServiceCall(struct EXIService* service) /* test, if data length is unequal to the expected payload */ if((service->inStream.size)!= *(service->inStream.pos)) { - service->errorCode = EXI_NON_VALID_MESSAGE; + service->errorCode = V2G_NON_VALID_MESSAGE; return -1; } /* service call */ - powerDelivery((service->exiMsg.V2G_Message.Body.PowerDeliveryReq), (service->exiMsg.V2G_Message.Body.PowerDeliveryRes)); + powerDelivery(&(service->v2gMsg.Body.PowerDeliveryReq), &(service->v2gMsg.Body.PowerDeliveryRes)); /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.PowerDeliveryRes=1; - service->exiMsg.V2G_Message.Body.isused.PowerDeliveryReq=0; + service->v2gMsg.Body.isused.PowerDeliveryRes=1; /* serialize the response data */ if(serialize_message(service)) { /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; + service->errorCode= V2G_SERIALIZATION_FAILED; } break; - case 37:/* MeteringStatusReq */ + case 21:/* MeteringStatusReq */ @@ -938,28 +860,27 @@ static int deserializeElementOrServiceCall(struct EXIService* service) /* test, if data length is unequal to the expected payload */ if((service->inStream.size)!= *(service->inStream.pos)) { - service->errorCode = EXI_NON_VALID_MESSAGE; + service->errorCode = V2G_NON_VALID_MESSAGE; return -1; } /* service call */ - meteringStatus((service->exiMsg.V2G_Message.Body.MeteringStatusReq), (service->exiMsg.V2G_Message.Body.MeteringStatusRes)); + meteringStatus(&(service->v2gMsg.Body.MeteringStatusReq), &(service->v2gMsg.Body.MeteringStatusRes)); /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.MeteringStatusRes=1; - service->exiMsg.V2G_Message.Body.isused.MeteringStatusReq=0; + service->v2gMsg.Body.isused.MeteringStatusRes=1; /* serialize the response data */ if(serialize_message(service)) { /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; + service->errorCode= V2G_SERIALIZATION_FAILED; } break; - case 33:/* MeteringReceiptReq */ + case 17:/* MeteringReceiptReq */ @@ -967,167 +888,21 @@ static int deserializeElementOrServiceCall(struct EXIService* service) /* test, if data length is unequal to the expected payload */ if((service->inStream.size)!= *(service->inStream.pos)) { - service->errorCode = EXI_NON_VALID_MESSAGE; + service->errorCode = V2G_NON_VALID_MESSAGE; return -1; } /* service call */ - meteringReceipt((service->exiMsg.V2G_Message.Body.MeteringReceiptReq), (service->exiMsg.V2G_Message.Body.MeteringReceiptRes)); + meteringReceipt(&(service->v2gMsg.Body.MeteringReceiptReq), &(service->v2gMsg.Body.MeteringReceiptRes)); /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.MeteringReceiptRes=1; - service->exiMsg.V2G_Message.Body.isused.MeteringReceiptReq=0; + service->v2gMsg.Body.isused.MeteringReceiptRes=1; /* serialize the response data */ if(serialize_message(service)) { /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; - } - - - - break; - case 0:/* CableCheckReq */ - - - - - /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) - { - service->errorCode = EXI_NON_VALID_MESSAGE; - return -1; - } - - /* service call */ - cableCheck((service->exiMsg.V2G_Message.Body.CableCheckReq), (service->exiMsg.V2G_Message.Body.CableCheckRes)); - - /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.CableCheckRes=1; - service->exiMsg.V2G_Message.Body.isused.CableCheckReq=0; - - /* serialize the response data */ - if(serialize_message(service)) - { - /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; - } - - - - break; - case 60:/* PreChargeReq */ - - - - - /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) - { - service->errorCode = EXI_NON_VALID_MESSAGE; - return -1; - } - - /* service call */ - preCharge((service->exiMsg.V2G_Message.Body.PreChargeReq), (service->exiMsg.V2G_Message.Body.PreChargeRes)); - - /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.PreChargeRes=1; - service->exiMsg.V2G_Message.Body.isused.PreChargeReq=0; - - /* serialize the response data */ - if(serialize_message(service)) - { - /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; - } - - - - break; - case 10:/* CurrentDemandReq */ - - - - - /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) - { - service->errorCode = EXI_NON_VALID_MESSAGE; - return -1; - } - - /* service call */ - currentDemand((service->exiMsg.V2G_Message.Body.CurrentDemandReq), (service->exiMsg.V2G_Message.Body.CurrentDemandRes)); - - /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.CurrentDemandRes=1; - service->exiMsg.V2G_Message.Body.isused.CurrentDemandReq=0; - - /* serialize the response data */ - if(serialize_message(service)) - { - /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; - } - - - - break; - case 90:/* WeldingDetectionReq */ - - - - - /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) - { - service->errorCode = EXI_NON_VALID_MESSAGE; - return -1; - } - - /* service call */ - weldingDetection((service->exiMsg.V2G_Message.Body.WeldingDetectionReq), (service->exiMsg.V2G_Message.Body.WeldingDetectionRes)); - - /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.WeldingDetectionRes=1; - service->exiMsg.V2G_Message.Body.isused.WeldingDetectionReq=0; - - /* serialize the response data */ - if(serialize_message(service)) - { - /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; - } - - - - break; - case 85:/* TerminateChargingReq */ - - - - - /* test, if data length is unequal to the expected payload */ - if((service->inStream.size)!= *(service->inStream.pos)) - { - service->errorCode = EXI_NON_VALID_MESSAGE; - return -1; - } - - /* service call */ - terminateCharging((service->exiMsg.V2G_Message.Body.TerminateChargingReq), (service->exiMsg.V2G_Message.Body.TerminateChargingRes)); - - /* signalize the response message */ - service->exiMsg.V2G_Message.Body.isused.TerminateChargingRes=1; - service->exiMsg.V2G_Message.Body.isused.TerminateChargingReq=0; - - /* serialize the response data */ - if(serialize_message(service)) - { - /* serializiation error*/ - service->errorCode= EXI_SERIALIZATION_FAILED; + service->errorCode= V2G_SERIALIZATION_FAILED; } @@ -1137,199 +912,83 @@ static int deserializeElementOrServiceCall(struct EXIService* service) break; case 5: switch(service->eqn.localPart) { - case 11:/* EventList */ + case 32:/* ServiceSessionID */ - service->exiMsg.V2G_Message.Header->Notification.isused.EventList=1; - + + /* is used */ + service->v2gMsg.Header.SessionInformation.isused.ServiceSessionID=1; break; - case 28:/* Service */ + case 24:/* ProtocolVersion */ - service->exiMsg.V2G_Message.Body.ServicePaymentSelectionReq->ServiceList.arraylen.Service++; - + + /* is used */ + service->v2gMsg.Header.SessionInformation.isused.ProtocolVersion=1; break; - case 19:/* MeterReading */ + case 13:/* FaultCode */ - service->exiMsg.V2G_Message.Body.MeteringReceiptReq->MeterInfo.isused.MeterReading=1; - + + /* is used */ + service->v2gMsg.Header.Notification.isused.FaultCode=1; + break; + case 14:/* FaultMsg */ + + + /* is used */ + service->v2gMsg.Header.Notification.isused.FaultMsg=1; + break; + case 10:/* EventList */ + + + /* is used */ + service->v2gMsg.Header.Notification.isused.EventList=1; + break; + case 16:/* MeterID */ + + + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterID=1; + break; + case 18:/* MeterReading */ + + + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterReading=1; + break; + case 19:/* MeterStatus */ + + + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterStatus=1; + break; + case 37:/* TMeter */ + + + /* is used */ + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.TMeter=1; break; } break; - case 7: + case 6: switch(service->eqn.localPart) { - case 1:/* Notification */ + case 6:/* Notification */ - service->exiMsg.V2G_Message.Header->isused.Notification=1; - + + /* is used */ + service->v2gMsg.Header.isused.Notification=1; break; } break; - } return 0; } -static int deserializeSessionSetupReqMsg(struct EXIService* service) -{ - struct SessionSetupReqType reqMsg; - struct SessionSetupResType resMsg; - init_SessionSetupReqType(&reqMsg); - - service->exiMsg.V2G_Message.Body.SessionSetupReq = &reqMsg; - service->exiMsg.V2G_Message.Body.SessionSetupRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializeServiceDiscoveryReqMsg(struct EXIService* service) -{ - struct ServiceDiscoveryReqType reqMsg; - struct ServiceDiscoveryResType resMsg; - init_ServiceDiscoveryReqType(&reqMsg); - - service->exiMsg.V2G_Message.Body.ServiceDiscoveryReq = &reqMsg; - service->exiMsg.V2G_Message.Body.ServiceDiscoveryRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializeServicePaymentSelectionReqMsg(struct EXIService* service) -{ - struct ServicePaymentSelectionReqType reqMsg; - struct ServicePaymentSelectionResType resMsg; - service->exiMsg.V2G_Message.Body.ServicePaymentSelectionReq = &reqMsg; - service->exiMsg.V2G_Message.Body.ServicePaymentSelectionRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializePaymentDetailsReqMsg(struct EXIService* service) -{ - struct PaymentDetailsReqType reqMsg; - struct PaymentDetailsResType resMsg; - service->exiMsg.V2G_Message.Body.PaymentDetailsReq = &reqMsg; - service->exiMsg.V2G_Message.Body.PaymentDetailsRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializeChargeParameterDiscoveryReqMsg(struct EXIService* service) -{ - struct ChargeParameterDiscoveryReqType reqMsg; - struct ChargeParameterDiscoveryResType resMsg; - init_ChargeParameterDiscoveryReqType(&reqMsg); - - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq = &reqMsg; - service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializeLineLockReqMsg(struct EXIService* service) -{ - struct LineLockReqType reqMsg; - struct LineLockResType resMsg; - init_LineLockReqType(&reqMsg); - - service->exiMsg.V2G_Message.Body.LineLockReq = &reqMsg; - service->exiMsg.V2G_Message.Body.LineLockRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializePowerDeliveryReqMsg(struct EXIService* service) -{ - struct PowerDeliveryReqType reqMsg; - struct PowerDeliveryResType resMsg; - init_PowerDeliveryReqType(&reqMsg); - - service->exiMsg.V2G_Message.Body.PowerDeliveryReq = &reqMsg; - service->exiMsg.V2G_Message.Body.PowerDeliveryRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializeMeteringStatusReqMsg(struct EXIService* service) -{ - struct MeteringStatusReqType reqMsg; - struct MeteringStatusResType resMsg; - service->exiMsg.V2G_Message.Body.MeteringStatusReq = &reqMsg; - service->exiMsg.V2G_Message.Body.MeteringStatusRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializeMeteringReceiptReqMsg(struct EXIService* service) -{ - struct MeteringReceiptReqType reqMsg; - struct MeteringReceiptResType resMsg; - init_MeteringReceiptReqType(&reqMsg); - - service->exiMsg.V2G_Message.Body.MeteringReceiptReq = &reqMsg; - service->exiMsg.V2G_Message.Body.MeteringReceiptRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializeCableCheckReqMsg(struct EXIService* service) -{ - struct CableCheckReqType reqMsg; - struct CableCheckResType resMsg; - service->exiMsg.V2G_Message.Body.CableCheckReq = &reqMsg; - service->exiMsg.V2G_Message.Body.CableCheckRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializePreChargeReqMsg(struct EXIService* service) -{ - struct PreChargeReqType reqMsg; - struct PreChargeResType resMsg; - init_PreChargeReqType(&reqMsg); - - service->exiMsg.V2G_Message.Body.PreChargeReq = &reqMsg; - service->exiMsg.V2G_Message.Body.PreChargeRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializeCurrentDemandReqMsg(struct EXIService* service) -{ - struct CurrentDemandReqType reqMsg; - struct CurrentDemandResType resMsg; - init_CurrentDemandReqType(&reqMsg); - - service->exiMsg.V2G_Message.Body.CurrentDemandReq = &reqMsg; - service->exiMsg.V2G_Message.Body.CurrentDemandRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializeWeldingDetectionReqMsg(struct EXIService* service) -{ - struct WeldingDetectionReqType reqMsg; - struct WeldingDetectionResType resMsg; - service->exiMsg.V2G_Message.Body.WeldingDetectionReq = &reqMsg; - service->exiMsg.V2G_Message.Body.WeldingDetectionRes = &resMsg; - - return deserializeMessage(service); -} - -static int deserializeTerminateChargingReqMsg(struct EXIService* service) -{ - struct TerminateChargingReqType reqMsg; - struct TerminateChargingResType resMsg; - service->exiMsg.V2G_Message.Body.TerminateChargingReq = &reqMsg; - service->exiMsg.V2G_Message.Body.TerminateChargingRes = &resMsg; - - return deserializeMessage(service); -} /** * Deserialize the EXI stream * @return 0 = 0K; -1 = ERROR */ -static int deserializeMessage(struct EXIService* service) +static int deserializeMessage(struct v2gService* service) { int noEndOfDocument = 1; /* true */ int returnCode=0; @@ -1342,7 +1001,7 @@ static int deserializeMessage(struct EXIService* service) if(service->errorCode==0) { - service->errorCode= EXI_NON_VALID_MESSAGE; + service->errorCode= V2G_NON_VALID_MESSAGE; } return returnCode; @@ -1363,52 +1022,6 @@ static int deserializeMessage(struct EXIService* service) returnCode = exiDecodeStartElement(&(service->inStream), &(service->stateDecode), &(service->eqn)); service->idPath.id[service->idPath.pos++]=service->eqn.localPart; - /* setup the request context*/ - if(service->eqn.localPart==78 && service->eqn.namespaceURI==4) - { - return deserializeSessionSetupReqMsg(service); - } else if(service->eqn.localPart==67 && service->eqn.namespaceURI==4) - { - return deserializeServiceDiscoveryReqMsg(service); - } else if(service->eqn.localPart==72 && service->eqn.namespaceURI==4) - { - return deserializeServicePaymentSelectionReqMsg(service); - } else if(service->eqn.localPart==52 && service->eqn.namespaceURI==4) - { - return deserializePaymentDetailsReqMsg(service); - } else if(service->eqn.localPart==4 && service->eqn.namespaceURI==4) - { - return deserializeChargeParameterDiscoveryReqMsg(service); - } else if(service->eqn.localPart==28 && service->eqn.namespaceURI==4) - { - return deserializeLineLockReqMsg(service); - } else if(service->eqn.localPart==56 && service->eqn.namespaceURI==4) - { - return deserializePowerDeliveryReqMsg(service); - } else if(service->eqn.localPart==37 && service->eqn.namespaceURI==4) - { - return deserializeMeteringStatusReqMsg(service); - } else if(service->eqn.localPart==33 && service->eqn.namespaceURI==4) - { - return deserializeMeteringReceiptReqMsg(service); - } else if(service->eqn.localPart==0 && service->eqn.namespaceURI==4) - { - return deserializeCableCheckReqMsg(service); - } else if(service->eqn.localPart==60 && service->eqn.namespaceURI==4) - { - return deserializePreChargeReqMsg(service); - } else if(service->eqn.localPart==10 && service->eqn.namespaceURI==4) - { - return deserializeCurrentDemandReqMsg(service); - } else if(service->eqn.localPart==90 && service->eqn.namespaceURI==4) - { - return deserializeWeldingDetectionReqMsg(service); - } else if(service->eqn.localPart==85 && service->eqn.namespaceURI==4) - { - return deserializeTerminateChargingReqMsg(service); - } - - break; case END_ELEMENT: @@ -1421,7 +1034,7 @@ static int deserializeMessage(struct EXIService* service) /* decode */ returnCode = exiDecodeCharacters(&(service->inStream), &(service->stateDecode), &(service->val)); - /* assign data to the EXI message structure */ + /* assign data to the v2g message structure */ returnCode = deserializeElementCharacter(service); break; case ATTRIBUTE: @@ -1440,23 +1053,15 @@ static int deserializeMessage(struct EXIService* service) /** - * \brief Takes the EXI stream, invokes the called service method, and provides the response EXI stream - * \param service struct EXIService* Represent the service data structure - * \param inStream uint8_t* EXI in stream - * \param sizeInStream uint16_t Length of the inStream - * \param outStream uint8_t* Represent the out stream - * \param sizeOutStream uint16_t Size of the out stream - * \param outStreamLength uint16_t* Length of the stream - * \return 0 = 0K; -1 = ERROR + * Takes the EXI stream, invokes the called service method, and provides the response EXI stream + * @return 0 = 0K; -1 = ERROR */ -int messageDispatcher(struct EXIService* service, uint8_t* inStream, uint16_t sizeInStream, uint8_t* outStream, uint16_t sizeOutStream, uint16_t* outStreamLength) +int messageDispatcher(struct v2gService* service, uint8_t* inStream, size_t sizeInStream, uint8_t* outStream, size_t sizeOutStream, size_t* outStreamLength) { - struct HeaderType header; + size_t inPos, outPos; - uint16_t inPos, outPos; - - /* assign inStream data to service EXI structure */ + /* assign inStream data to service v2g structure */ inPos = service->transportHeaderOffset; service->inStream.data = inStream; service->inStream.size = sizeInStream+inPos; @@ -1465,7 +1070,7 @@ int messageDispatcher(struct EXIService* service, uint8_t* inStream, uint16_t si service->inStream.capacity=0; - /* assign outStream data to service EXI structure */ + /* assign outStream data to service v2g structure */ outPos=service->transportHeaderOffset; service->outStream.data = outStream; service->outStream.size = sizeOutStream; @@ -1485,11 +1090,8 @@ int messageDispatcher(struct EXIService* service, uint8_t* inStream, uint16_t si /* init uniqueID stack */ service->idPath.pos=0; - init_HeaderType(&header); - service->exiMsg.V2G_Message.Header = &header; - - /* init EXI message */ - init_EXIDocumentType(&(service->exiMsg)); + /* init v2g message */ + init_AnonType_V2G_Message(&(service->v2gMsg)); /* deserialize the input stream and call the corresponding service */ if(deserializeMessage(service)) @@ -1506,14 +1108,10 @@ int messageDispatcher(struct EXIService* service, uint8_t* inStream, uint16_t si } /** - * \brief Init the v2g service data structure - * \param service struct EXIService* Service data structure - * \param bytes bytes_t setted up byte data structure - * \param string_ucs_t setted up string data structure - * \param transportHeaderOffset uint16_t Transport protocol offset - * \return 0 = 0K; -1 = ERROR + * Init the service + * @return 0 = 0K; -1 = ERROR */ -int init_v2gservice(struct EXIService* service, bytes_t bytes, string_ucs_t string, uint16_t transportHeaderOffset) +int init_v2gservice(struct v2gService* service, bytes_t bytes, string_ucs_t string, uint16_t transportHeaderOffset) { /* init byte array */ diff --git a/src/service/v2g_serviceDispatcher.h b/src/service/v2g_serviceDispatcher.h index 9f65eff..026f0d0 100644 --- a/src/service/v2g_serviceDispatcher.h +++ b/src/service/v2g_serviceDispatcher.h @@ -1,43 +1,43 @@ -/* - * Copyright (C) 2007-2011 Siemens AG - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ - -/******************************************************************* - * - * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 - * @contact Joerg.Heuer@siemens.com - * - ********************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef V2GSERVER_H_ -#define V2GSERVER_H_ - -#include "v2g_serviceDataTypes.h" - - -int init_v2gservice(struct EXIService* service,bytes_t bytes, string_ucs_t string, uint16_t transportHeaderOffset); -int messageDispatcher(struct EXIService* service, uint8_t* inStream, uint16_t sizeInStream, uint8_t* outStream, uint16_t sizeOutStream, uint16_t* outPos); - -#endif /* V2GSERVER_H_ */ - -#ifdef __cplusplus -} -#endif +/* + * Copyright (C) 2007-2010 Siemens AG + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +/******************************************************************* + * + * @author Sebastian.Kaebisch.EXT@siemens.com + * @version 0.3 + * @contact Joerg.Heuer@siemens.com + * + ********************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef V2GSERVER_H_ +#define V2GSERVER_H_ + +#include "v2g_serviceDataTypes.h" + + +int init_v2gservice(struct v2gService* service,bytes_t bytes, string_ucs_t string, uint16_t transportHeaderOffset); +int messageDispatcher(struct v2gService* service, uint8_t* inStream, size_t sizeInStream, uint8_t* outStream, size_t sizeOutStream, size_t* outPos); + +#endif /* V2GSERVER_H_ */ + +#ifdef __cplusplus +} +#endif diff --git a/src/service/v2g_serviceMethods.h b/src/service/v2g_serviceMethods.h index bf49988..a154be8 100644 --- a/src/service/v2g_serviceMethods.h +++ b/src/service/v2g_serviceMethods.h @@ -3,7 +3,7 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -22,7 +22,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.3.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -47,7 +47,7 @@ int selectedServicePayment(struct ServicePaymentSelectionReqType* param, struct int paymentDetails(struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result); -int chargeParameterDiscovery(struct ChargeParameterDiscoveryReqType* param, struct ChargeParameterDiscoveryResType* result); +int powerDiscovery(struct PowerDiscoveryReqType* param, struct PowerDiscoveryResType* result); int lineLock(struct LineLockReqType* param, struct LineLockResType* result); @@ -56,16 +56,6 @@ int powerDelivery(struct PowerDeliveryReqType* param, struct PowerDeliveryResTyp int meteringStatus(struct MeteringStatusReqType* param, struct MeteringStatusResType* result); int meteringReceipt(struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result); - -int cableCheck(struct CableCheckReqType* param, struct CableCheckResType* result); - -int preCharge(struct PreChargeReqType* param, struct PreChargeResType* result); - -int currentDemand(struct CurrentDemandReqType* param, struct CurrentDemandResType* result); - -int weldingDetection(struct WeldingDetectionReqType* param, struct WeldingDetectionResType* result); - -int terminateCharging(struct TerminateChargingReqType* param, struct TerminateChargingResType* result); diff --git a/src/test/main.c b/src/test/main.c index 42c4fa0..70f8325 100644 --- a/src/test/main.c +++ b/src/test/main.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -19,7 +19,7 @@ * * @author Daniel.Peintner.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * *

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

@@ -33,8 +33,7 @@ int main(int argc, char *argv[]) { /* EXI codec only */ - /* return main_codec(argc, argv);*/ - + /*return main_codec(argc, argv);*/ /* V2G client / service example scenario */ return main_service(argc, argv); diff --git a/src/test/main.h b/src/test/main.h index 37cf8b7..6f91a1b 100644 --- a/src/test/main.h +++ b/src/test/main.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -19,7 +19,7 @@ * * @author Daniel.Peintner.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * * diff --git a/src/test/main_codec.c b/src/test/main_codec.c index 11f6621..1d20962 100644 --- a/src/test/main_codec.c +++ b/src/test/main_codec.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * *

Sample program to illustrate how to read an EXI stream and @@ -36,10 +36,10 @@ #include "EXITypes.h" #include "ByteStream.h" -#define BUFFER_SIZE 1000 +#define BUFFER_SIZE 100 -#define ARRAY_SIZE_BYTES 100 -#define ARRAY_SIZE_STRINGS 100 +#define ARRAY_SIZE_BYTES 50 +#define ARRAY_SIZE_STRINGS 50 /* avoids warning: initializer element is not computable at load time */ uint8_t bufferIn[BUFFER_SIZE]; @@ -53,8 +53,8 @@ int main_codec(int argc, char *argv[]) { unsigned int i; bitstream_t iStream, oStream; - uint16_t posDecode; - uint16_t posEncode; + size_t posDecode; + size_t posEncode; /* EXI set-up */ exi_state_t stateDecode; @@ -66,7 +66,7 @@ int main_codec(int argc, char *argv[]) { /* BINARY memory setup */ bytes_t bytes = { ARRAY_SIZE_BYTES, data, 0 }; - /* STRING memory setup */ + /* STRING memory setuo */ string_ucs_t string = { ARRAY_SIZE_STRINGS, codepoints, 0 }; const char * localName; @@ -182,7 +182,7 @@ int main_codec(int argc, char *argv[]) { return errn; } if (val.type == INTEGER_BIG) { - printf(" CH int64 : %ld \n", (long int)val.int64); + printf(" CH int64 : %lld \n", val.int64); } else if (val.type == BINARY_BASE64 || val.type == BINARY_HEX) { printf(" CH Binary (len == %d) : ", val.binary.len); for(i=0; i array length = 0*/ - v2gHeader.SessionInformation.ProtocolVersion.data[0]='1'; /* assign protocol version number*/ - v2gHeader.SessionInformation.ProtocolVersion.arraylen.data=1; /* array string length =1 of protocol version */ - v2gHeader.SessionInformation.isused.ProtocolVersion = 1; /* important: optional elements have to be set used (=1) or not used (=0) */ - v2gHeader.SessionInformation.isused.ServiceSessionID = 0; /* service session is not used */ - v2gHeader.isused.Notification=0; /* no notification */ - - /* setup sessionSetup parameter */ - sessionSetup.isused.PEVID=1; /* PEVID is transported */ - sessionSetup.PEVID.arraylen.data=1; - sessionSetup.PEVID.data[0]=10; - sessionSetup.PEVStatus.ChargerStandby=0; /* charger standby = true */ - sessionSetup.PEVStatus.ConnectorLocked=0; /* connector locked = false */ - sessionSetup.PEVStatus.ReadyToCharge=0; /* ReadyToCharge = false */ - - - - printf("PEV: call EVSE sessionSetup\n"); - - /********************* - * Call sessionSetup * - *********************/ - if(call_sessionSetup(&service,&v2gHeader,&sessionSetup,&resultSessionSetup)) - { - printErrorMessage(&service); - } - else - { - /* show result of the answer message of EVSE sessionSetup */ - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d (OK)\n",resultSessionSetup.ResponseCode); - printf("\tEVSEID=%d\n", resultSessionSetup.EVSEID.data[0]); - printEVSEStatus(&resultSessionSetup.EVSEStatus); - printf("\tTCurrent=%d\n",resultSessionSetup.TCurrent); - } - - - /******************************************* - * Setup data for chargeParameterDiscovery * - *******************************************/ - - powerDiscovery.PEVStatus.ChargerStandby = 1; - powerDiscovery.PEVStatus.ConnectorLocked = 0; - powerDiscovery.PEVStatus.ReadyToCharge=0; - powerDiscovery.ChargingMode = AC_charging_chargingModeType; - powerDiscovery.EoC = 12345678; - - float_type.Multiplier = 0; - float_type.Unit = J_unitSymbolType; - float_type.Value = 100; - - powerDiscovery.EAmount = float_type; - powerDiscovery.PEVMaxPhases = 3; - - float_type.Unit = W_unitSymbolType; - float_type.Value = 600; - powerDiscovery.PEVMaxPower = float_type; - - float_type.Unit = V_unitSymbolType; - float_type.Value = 1000; - powerDiscovery.PEVMaxVoltage = float_type; - float_type.Value = 200; - powerDiscovery.PEVMinVoltage = float_type; - - /* only required for DC */ - float_type.Unit = A_unitSymbolType; - float_type.Value = 200; - powerDiscovery.PEVMaxCurrent = float_type; - powerDiscovery.PEVMinCurrent = float_type; - - - /********************************* - * Call chargeParameterDiscovery * - *********************************/ - printf("\nPEV: call EVSE chargeParameterDiscovery\n"); - - if(call_chargeParameterDiscovery(&service,&v2gHeader,&powerDiscovery,&resultPowerDiscovery)) - { - printErrorMessage(&service); - } - else - { - - /* show result of the answer message of EVSE sessionSetup*/ - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d\n",resultPowerDiscovery.ResponseCode); - printEVSEStatus(&resultPowerDiscovery.EVSEStatus); - printf("\tEVSEMaxVoltage=%d\n",resultPowerDiscovery.EVSEMaxVoltage.Value); - /*printf("\tEVSEMaxCurrent=%d\n",resultPowerDiscovery.EVSEMaxCurrent.Value);*/ - printf("\tEVSEMaxPhases=%d\n",resultPowerDiscovery.EVSEMaxPhases); - - /*printf("\tEnergyProvider=%d\n",resultPowerDiscovery.EnergyProvider.data[0]);*/ - - } - - - - - /********************************* - * Setup data for lineLock * - *********************************/ - - lineLock.PEVStatus.ChargerStandby = 1; - lineLock.PEVStatus.ConnectorLocked = 1; - lineLock.PEVStatus.ReadyToCharge = 1; - lineLock.ReqLockStatus = 1; - - /*********************** - * Call lineLock * - ***********************/ - printf("\nPEV: call EVSE lineLock\n"); - - if(call_lineLock(&service,&v2gHeader,&lineLock,&resultLineLock)) - { - printErrorMessage(&service); - } - else - { - - /* show result of the answer message of EVSE sessionSetup*/ - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d\n",resultLineLock.ResponseCode); - printEVSEStatus(&resultLineLock.EVSEStatus); - - } - - - - /********************************* - * Setup data for powerDelivery * - *********************************/ - - powerDelivery.PEVStatus = lineLock.PEVStatus; /* PEV status, taken from lineLock */ - /*powerDelivery.isused.Tariff = 0; - powerDelivery.Tariff = Green_charge_tariffIDType;*/ - - /*********************** - * Call powerDelivery * - ***********************/ - printf("\nPEV: call EVSE powerDelivery\n"); - - if(call_powerDelivery(&service,&v2gHeader,&powerDelivery,&resultPowerDelivery)) - { - printErrorMessage(&service); - } - else - { - - /* show result of the answer message of EVSE sessionSetup*/ - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d\n",resultPowerDelivery.ResponseCode); - } - - - - - - - /******************** - * Call meterStatus * - ********************/ - - printf("\nPEV: call EVSE meterStatus\n"); - - if(call_meteringStatus(&service,&v2gHeader,&resultMeteringStatus)) - { - printErrorMessage(&service); - } - else - { - - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d\n",resultPowerDiscovery.ResponseCode); - printEVSEStatus(&resultPowerDiscovery.EVSEStatus); - printf("\tEVSEID=%d\n",resultMeteringStatus.EVSEID.data[0]); - printf("\tEVSEMaxPower=%d\n",resultMeteringStatus.EVSEMaxPower.Value); - printf("\tisused.MeterInfo=%d\n", resultMeteringStatus.isused.MeterInfo); - printf("\t\tMeterInfo.MeterID=%d\n", resultMeteringStatus.MeterInfo.MeterID.data[0]); - printf("\t\tMeterInfo.MeterReading.Value=%d\n", resultMeteringStatus.MeterInfo.MeterReading.Value); - printf("\t\tMeterInfo.MeterStatus=%d\n", resultMeteringStatus.MeterInfo.MeterStatus); - /* printf("\t\tMeterInfo.TMeter=%d\n", resultMeteringStatus.MeterInfo.TMeter);*/ - /* printf("\t\tisused.PCurrent=%d\n", resultMeteringStatus.isused.PCurrent); - printf("\t\tPCurrent=%d\n", resultMeteringStatus.PCurrent.Value);*/ - - } - - - - - /********************************* - * Setup data for meteringReceipt * - *********************************/ - - meteringReceipt.PEVID.arraylen.data=1; - meteringReceipt.PEVID.data[0]=10; - meteringReceipt.isused.PEVID=1; - - meteringReceipt.PEVStatus = powerDelivery.PEVStatus; /* PEV status, taken from sessionSetup */ - - meteringReceipt.TCurrent = 12345; - meteringReceipt.isused.TCurrent = 1; - meteringReceipt.Tariff = Green_charge_tariffIDType; - meteringReceipt.MeterInfo.MeterStatus = 2; - meteringReceipt.MeterInfo.isused.MeterStatus = 1; - - - meteringReceipt.MeterInfo.MeterID.arraylen.data=1; - meteringReceipt.MeterInfo.MeterID.data[0]=3; - meteringReceipt.MeterInfo.isused.MeterID = 1; - - meteringReceipt.MeterInfo.MeterReading.Multiplier = 0; - meteringReceipt.MeterInfo.MeterReading.Unit = A_unitSymbolType; - meteringReceipt.MeterInfo.MeterReading.Value = 500; - meteringReceipt.MeterInfo.isused.MeterReading = 1; - - meteringReceipt.MeterInfo.TMeter =123456789; - meteringReceipt.MeterInfo.isused.TMeter = 1; - - - - /*********************** - * Call meteringReceipt * - ***********************/ - printf("\nPEV: call EVSE meteringReceipt\n"); - - - - if(call_meteringReceipt(&service,&v2gHeader,&meteringReceipt,&resultMeteringReceipt)) - { - printErrorMessage(&service); - } - else - { - /* show result of the answer message of EVSE sessionSetup*/ - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d\n",resultMeteringReceipt.ResponseCode); - } - - - return 0; - - -} - -static int dc_charging() -{ - - static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/ static uint32_t string_array[MAX_STRING_SIZE]; /* define MAX_STRING_SIZE before*/ @@ -353,31 +54,15 @@ static int dc_charging() /* service data structure */ - struct EXIService service; + struct v2gService service; struct HeaderType v2gHeader; struct SessionSetupReqType sessionSetup; struct SessionSetupResType resultSessionSetup; - struct ChargeParameterDiscoveryReqType powerDiscovery; - struct ChargeParameterDiscoveryResType resultPowerDiscovery; - struct CableCheckReqType cableCheck; - struct CableCheckResType resultCableCheck; - struct PowerDeliveryReqType powerDelivery; - struct PowerDeliveryResType resultPowerDelivery; - struct PreChargeReqType preCharge; - struct PreChargeResType resultPreCharge; - struct CurrentDemandReqType currentDemand; - struct CurrentDemandResType resultCurrentDemand; - struct WeldingDetectionReqType weldingDetection; - struct WeldingDetectionResType resultWeldingDetection; - struct TerminateChargingReqType terminateCharging; - struct TerminateChargingResType resultTerminateCharging; + /*struct PowerDiscoveryReqType powerDiscovery; + struct PowerDiscoveryResType resultPowerDiscovery; */ - - struct FloatingValueType float_type; /* test float type*/ - - /* BINARY memory setup */ bytes_t bytes = { MAX_BYTE_SIZE, byte_array, 0 }; @@ -389,6 +74,8 @@ static int dc_charging() transportHeaderOffset = DOIP_HEADER_LENGTH; + printf("+++Start V2G Client / Service Example+++\n\n"); + /******************* * Init V2G Client * *******************/ @@ -396,26 +83,22 @@ static int dc_charging() init_v2gServiceClient(&service,bytes,string,inStream,MAX_STREAM_SIZE, outStream, MAX_STREAM_SIZE, transportHeaderOffset); /******************************* - * Setup data for sessionSetup * + * Setup data for sessionSetup * *******************************/ /* setup header information */ v2gHeader.SessionInformation.SessionID.arraylen.data = 0; /* no session id in the initial message -> array length = 0*/ v2gHeader.SessionInformation.ProtocolVersion.data[0]='1'; /* assign protocol version number*/ v2gHeader.SessionInformation.ProtocolVersion.arraylen.data=1; /* array string length =1 of protocol version */ - v2gHeader.SessionInformation.isused.ProtocolVersion = 1; /* important: optional elements have to be set used (=1) or not used (=0) */ - v2gHeader.SessionInformation.isused.ServiceSessionID = 0; /* service session is not used */ + v2gHeader.SessionInformation.isused.ProtocolVersion = 1; /* important: signalize, protocol version is used */ v2gHeader.isused.Notification=0; /* no notification */ /* setup sessionSetup parameter */ sessionSetup.isused.PEVID=1; /* no PEVID is transported */ - sessionSetup.PEVID.arraylen.data=1; - sessionSetup.PEVID.data[0]=10; - sessionSetup.PEVStatus.ChargerStandby=0; /* charger standby = true */ + sessionSetup.PEVStatus.ChargerStandby=1; /* charger standby = true */ sessionSetup.PEVStatus.ConnectorLocked=0; /* connector locked = false */ - printf("PEV: call EVSE sessionSetup\n"); /********************* @@ -427,280 +110,31 @@ static int dc_charging() } else { - /* show result of the answer message of EVSE sessionSetup */ + /* show result of the answer message of EVSE sessionSetup*/ printf("PEV: received response message from EVSE\n"); printf("\tResponseCode=%d\n",resultSessionSetup.ResponseCode); printf("\tEVSEID=%d\n", resultSessionSetup.EVSEID.data[0]); - printEVSEStatus(&resultSessionSetup.EVSEStatus); + printf("\tEVSEStatus:\n\t\tConnectorLocked=%d\n",resultSessionSetup.EVSEStatus.ConnectorLocked); + printf("\t\tEVSEStandby=%d\n",resultSessionSetup.EVSEStatus.EVSEStandby); + printf("\t\tFatalError=%d\n",resultSessionSetup.EVSEStatus.FatalError); + printf("\t\tPowerSwitchClosed=%d\n",resultSessionSetup.EVSEStatus.PowerSwitchClosed); + printf("\t\tRCD=%d\n",resultSessionSetup.EVSEStatus.RCD); + printf("\t\tShutDownTime=%d\n",resultSessionSetup.EVSEStatus.ShutDownTime); printf("\tTCurrent=%d\n",resultSessionSetup.TCurrent); } - - /******************************************* - * Setup data for chargeParameterDiscovery * - *******************************************/ - - powerDiscovery.PEVStatus = sessionSetup.PEVStatus; /* PEV status, taken from sessionSetup */ - powerDiscovery.EoC = 4321; - powerDiscovery.ChargingMode = DC_charging_chargingModeType; - - float_type.Multiplier = 2; - float_type.Unit = A_unitSymbolType; - float_type.Value = 700; - - float_type.Multiplier = 0; - float_type.Unit = J_unitSymbolType; - float_type.Value = 100; - - powerDiscovery.EAmount = float_type; - powerDiscovery.PEVMaxPhases = 3; - - float_type.Unit = W_unitSymbolType; - float_type.Value = 600; - powerDiscovery.PEVMaxPower = float_type; - - float_type.Unit = V_unitSymbolType; - float_type.Value = 1000; - powerDiscovery.PEVMaxVoltage = float_type; - float_type.Value = 200; - powerDiscovery.PEVMinVoltage = float_type; - - float_type.Unit = A_unitSymbolType; - float_type.Value = 800; - powerDiscovery.PEVMaxCurrent = float_type; - float_type.Value = 150; - powerDiscovery.PEVMinCurrent = float_type; - - - /********************************* - * Call chargeParameterDiscovery * - *********************************/ - printf("\nPEV: call EVSE chargeParameterDiscovery\n"); - - if(call_chargeParameterDiscovery(&service,&v2gHeader,&powerDiscovery,&resultPowerDiscovery)) - { - printErrorMessage(&service); - } - else - { - - /* show result of the answer message of EVSE sessionSetup*/ - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d\n",resultPowerDiscovery.ResponseCode); - printEVSEStatus(&resultPowerDiscovery.EVSEStatus); - printf("\tEVSEMaxVoltage=%d\n",resultPowerDiscovery.EVSEMaxVoltage.Value); - printf("\tEVSEMaxCurrent=%d\n",resultPowerDiscovery.EVSEMaxCurrent.Value); - printf("\tEVSEMinCurrent=%d\n",resultPowerDiscovery.EVSEMinCurrent.Value); - printf("\tEVSEMaxPhases=%d\n",resultPowerDiscovery.EVSEMaxPhases); - - /*printf("\tEnergyProvider=%d\n",resultPowerDiscovery.EnergyProvider.data[0]);*/ - - } - - /*********************** - * Call cableCheck * - ***********************/ - printf("\nPEV: call EVSE cableCheck\n"); - - cableCheck.PEVStatus.ChargerStandby = 1; - cableCheck.PEVStatus.ConnectorLocked = 1; - cableCheck.PEVStatus.ReadyToCharge = 1; - - - if(call_cableCheck(&service,&v2gHeader,&cableCheck,&resultCableCheck)) - { - printErrorMessage(&service); - } - else - { - - /* show result of the answer message of EVSE powerDiscovery*/ - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d\n",resultCableCheck.ResponseCode); - printEVSEStatus(&resultCableCheck.EVSEStatus); - } - - - /********************************* - * Setup data for powerDelivery * - *********************************/ - - powerDelivery.PEVStatus = cableCheck.PEVStatus; /* PEV status, taken from sessionSetup */ - powerDelivery.isused.Tariff = 0; - /*powerDelivery.Tariff = Green_charge_tariffIDType;*/ - - /*********************** - * Call powerDelivery * - ***********************/ - printf("\nPEV: call EVSE powerDelivery\n"); - - if(call_powerDelivery(&service,&v2gHeader,&powerDelivery,&resultPowerDelivery)) - { - printErrorMessage(&service); - } - else - { - - /* show result of the answer message of EVSE sessionSetup*/ - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d\n",resultPowerDelivery.ResponseCode); - printEVSEStatus(&resultPowerDelivery.EVSEStatus); - } - - - /*********************** - * Call preCharge * - ***********************/ - printf("\nPEV: call EVSE preCharge\n"); - - preCharge.PEVStatus = cableCheck.PEVStatus; - float_type.Unit = A_unitSymbolType; - float_type.Value = 400; - preCharge.PEVDemandCurrent = float_type; - - float_type.Unit = V_unitSymbolType; - float_type.Value = 700; - preCharge.PEVTargetVoltage = float_type; - float_type.Value = 300; - preCharge.VoltageDifferential = float_type; - - if(call_preCharge(&service,&v2gHeader,&preCharge,&resultPreCharge)) - { - printErrorMessage(&service); - } - else - { - - /* show result of the answer message of EVSE powerDiscovery*/ - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d\n",resultPreCharge.ResponseCode); - printEVSEStatus(&resultPreCharge.EVSEStatus); - printf("\tEVSEPresentVoltage=%d\n",resultPreCharge.EVSEPresentVoltage.Value); - } - - /*********************** - * Call currentDemand * - ***********************/ - printf("\nPEV: call EVSE currentDemand\n"); - - currentDemand.PEVStatus = powerDelivery.PEVStatus; - - float_type.Unit = A_unitSymbolType; - float_type.Value = 44; - currentDemand.CurrentDifferential = float_type; - - float_type.Value = 40; - currentDemand.PEVDemandCurrent = float_type; - - float_type.Unit = V_unitSymbolType; - float_type.Value = 300; - currentDemand.VoltageDifferential = float_type; - - float_type.Value = 700; - preCharge.PEVTargetVoltage = float_type; - currentDemand.PEVTargetVoltage = float_type; - - if(call_currentDemand(&service,&v2gHeader,¤tDemand,&resultCurrentDemand)) - { - printErrorMessage(&service); - } - else - { - - /* show result of the answer message of EVSE powerDiscovery*/ - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d\n",resultCurrentDemand.ResponseCode); - printEVSEStatus(&resultCurrentDemand.EVSEStatus); - printf("\tEVSEPresentVoltage.Value=%d\n",resultCurrentDemand.EVSEPresentVoltage.Value); - printf("\tEVSEPresentCurrent.Value=%d\n",resultCurrentDemand.EVSEPresentCurrent.Value); - - } - - - - /*********************** - * Call weldingDetection * - ***********************/ - printf("\nPEV: call EVSE weldingDetection\n"); - weldingDetection.PEVStatus = powerDelivery.PEVStatus; - - if(call_weldingDetection(&service,&v2gHeader,&weldingDetection,&resultWeldingDetection)) - { - printErrorMessage(&service); - } - else - { - - /* show result of the answer message of EVSE powerDiscovery*/ - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d\n",resultWeldingDetection.ResponseCode); - printEVSEStatus(&resultWeldingDetection.EVSEStatus); - printf("\tEVSEPresentVoltage=%d\n",resultWeldingDetection.EVSEPresentVoltage.Value); - } - - /************************* - * Call terminateCharging* - *************************/ - printf("\nPEV: call EVSE terminateCharging\n"); - terminateCharging.PEVStatus = sessionSetup.PEVStatus; - - if(call_terminateCharging(&service,&v2gHeader,&terminateCharging,&resultTerminateCharging)) - { - printErrorMessage(&service); - } - else - { - - /* show result of the answer message of EVSE powerDiscovery*/ - printf("PEV: received response message from EVSE\n"); - printf("\tResponseCode=%d\n",resultTerminateCharging.ResponseCode); - printEVSEStatus(&resultWeldingDetection.EVSEStatus); - printf("\tEVSEPresentVoltage.Value=%d\n",resultTerminateCharging.EVSEPresentVoltage.Value); - } - + printf("\n+++Terminate V2G Client / Service Example+++"); return 0; } -int main_service() +static void printErrorMessage(struct v2gService* service) { - printf("+++ Start V2G client / service example for AC charging +++\n\n"); - - ac_charging(); - - printf("\n+++Terminate V2G Client / Service example for AC charging +++\n"); - printf("Please press enter for DC charging!\n"); - fflush(stdout); - getchar(); - - printf("+++ Start V2G client / service example for DC charging +++\n\n"); - - dc_charging(); - - printf("\n+++Terminate V2G client / service example for DC charging +++"); - - return 0; -} - -static void printEVSEStatus(struct EVSEStatusType* status) -{ - printf("\tEVSEStatus:\n\t\tConnectorLocked=%d\n",status->ConnectorLocked); - printf("\t\tEVSEStandby=%d\n",status->EVSEStandby); - printf("\t\tFatalError=%d\n",status->FatalError); - printf("\t\tPowerSwitchClosed=%d\n",status->PowerSwitchClosed); - printf("\t\tRCD=%d\n",status->RCD); - printf("\t\tChargerStandby=%d\n",status->ChargerStandby); - printf("\t\tEVSEMalfunction=%d\n",status->EVSEMalfunction); - printf("\t\tShutDownTime=%d\n",status->ShutDownTime); -} - -static void printErrorMessage(struct EXIService* service) -{ - if(service->errorCode==EXI_NON_VALID_MESSAGE) + if(service->errorCode==V2G_NON_VALID_MESSAGE) { printf("PEV did not send a valid V2G message!\n"); } - else if(service->errorCode==EXI_SERIALIZATION_FAILED) + else if(service->errorCode==V2G_SERIALIZATION_FAILED) { printf("EVSE error: Could not serialize the response message\n"); } diff --git a/src/test/v2g_server.c b/src/test/v2g_server.c index 321950b..c54f2f1 100644 --- a/src/test/v2g_server.c +++ b/src/test/v2g_server.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -32,15 +32,15 @@ #define MAX_STRING_SIZE 256 #define MAX_STREAM_SIZE 60 -int testV2GService(uint8_t* inStream, uint16_t inStreamLength, uint8_t* outStream, uint16_t* outStreamLength) +int testV2GService(uint8_t* inStream, size_t inStreamLength, uint8_t* outStream, size_t* outStreamLength) { static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/ static uint32_t string_array[MAX_STRING_SIZE]; /* define MAX_STRING_SIZE before*/ - uint16_t exiMsgLength; + size_t exiMsgLength; - struct EXIService service; + struct v2gService service; /* BINARY memory setup */ bytes_t bytes = { MAX_BYTE_SIZE, byte_array, 0 }; diff --git a/src/test/v2g_server.h b/src/test/v2g_server.h index 60ceca9..22e050d 100644 --- a/src/test/v2g_server.h +++ b/src/test/v2g_server.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -28,6 +28,6 @@ #include "EXITypes.h" -int testV2GService(uint8_t* inStream, uint16_t inStreamLength, uint8_t* outStream,uint16_t* outStreamLength); +int testV2GService(uint8_t* inStream, size_t inStreamLength, uint8_t* outStream,size_t* outStreamLength); #endif /* V2G_SERVER_H_ */ diff --git a/src/test/v2g_serviceClientDataTransmitter.c b/src/test/v2g_serviceClientDataTransmitter.c index 8b90254..9d1eadb 100644 --- a/src/test/v2g_serviceClientDataTransmitter.c +++ b/src/test/v2g_serviceClientDataTransmitter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -29,13 +29,13 @@ /* This method has to be implemented! * Send EXI stream (outStream) to EVSE and receive response stream (inStream)*/ -int serviceDataTransmitter(uint8_t* outStream, uint16_t outStreamLength, uint8_t* inStream) +int serviceDataTransmitter(uint8_t* outStream, size_t outStreamLength, uint8_t* inStream) { /* send output stream to the underlying network to the EVSE and wait for response * --> here provide data to the V2G server directly*/ - uint16_t inStreamLength = 0; - uint16_t payloadLength = 0; + size_t inStreamLength = 0; + size_t payloadLength = 0; /* setup DoIP header information; outStreamLength==payloadLength*/ write_doIPHeader(outStream,&outStreamLength,DOIP_EXI_TYPE); diff --git a/src/test/v2g_serviceMethods.c b/src/test/v2g_serviceMethods.c index f5a17dc..74cebb6 100644 --- a/src/test/v2g_serviceMethods.c +++ b/src/test/v2g_serviceMethods.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,7 +18,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -31,27 +31,26 @@ int sessionSetup(struct SessionSetupReqType* param, struct SessionSetupResType* result) { + printf("EVSE: sessionSetup called\n" ); printf("\tReceived data:\n"); - printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby); - printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked); - printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge); + printf("\t\t PEVStatus ChargerStandby=%d\n",param->PEVStatus.ChargerStandby); + printf("\t\t PEVStatus ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked); /* Prepare data for PEV */ - result->ResponseCode = OK_SessionSetup_responseCode_SessionSetupType; - result->EVSEID.data[0]=1; + result->ResponseCode = OK_SessionSetup; + result->EVSEID.data[0]='E'; result->EVSEID.arraylen.data=1; result->EVSEStatus.ConnectorLocked=0; result->EVSEStatus.EVSEStandby=1; result->EVSEStatus.FatalError=0; result->EVSEStatus.PowerSwitchClosed=1; result->EVSEStatus.RCD=1; - result->EVSEStatus.ShutDownTime=12345678; - result->EVSEStatus.ChargerStandby = 1; - result->EVSEStatus.EVSEMalfunction = 0; - result->TCurrent=12345678; + result->EVSEStatus.ShutDownTime=12345678L; + result->TCurrent=12345678L; return 0; + } int serviceDiscovery(struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result) @@ -69,309 +68,28 @@ int paymentDetails(struct PaymentDetailsReqType* param, struct PaymentDetailsRes return 0; } -int chargeParameterDiscovery(struct ChargeParameterDiscoveryReqType* param, struct ChargeParameterDiscoveryResType* result) +int powerDiscovery(struct PowerDiscoveryReqType* param, struct PowerDiscoveryResType* result) { - printf("EVSE: chargeParameterDiscovery called\n" ); - printf("\tReceived data:\n"); - printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby); - printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked); - printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge); - - if(param->ChargingMode==AC_charging_chargingModeType) - printf("\t\t ChargingMode=AC_charging\n"); - else - printf("\t\t ChargingMode=DC_charging\n"); - - printf("\t\t Eoc=%d\n", param->EoC); - printf("\t\t EAmount=%d\n", param->EAmount.Value); - printf("\t\t PEVMaxPower=%d\n", param->PEVMaxPower.Value); - printf("\t\t PEVMaxPhases=%d\n", param->PEVMaxPhases); - printf("\t\t PEVMaxVoltage=%d\n", param->PEVMaxVoltage.Value); - printf("\t\t PEVMinVoltage=%d\n", param->PEVMinVoltage.Value); - - - if(param->ChargingMode==DC_charging_chargingModeType) - { - printf("\t\t PEVMaxCurrent=%d\n", param->PEVMaxCurrent.Value); - printf("\t\t PEVMinCurrent=%d\n", param->PEVMinCurrent.Value); - } - - result->ResponseCode = 0; - result->EVSEStatus.ConnectorLocked=0; - result->EVSEStatus.FatalError=0; - result->EVSEStatus.EVSEStandby=1; - result->EVSEStatus.PowerSwitchClosed=0; - result->EVSEStatus.RCD=1; - result->EVSEStatus.ShutDownTime=12345; - result->EVSEStatus.ChargerStandby = 1; - result->EVSEStatus.EVSEMalfunction = 0; - result->EVSEMaxVoltage.Multiplier = 0; - result->EVSEMaxVoltage.Unit = V_unitSymbolType; - result->EVSEMaxVoltage.Value = 950; - result->EVSEMaxPhases = 3; - - /* only for DC charging */ - result->EVSEMaxCurrent.Multiplier = 0; - result->EVSEMaxCurrent.Unit = A_unitSymbolType; - result->EVSEMaxCurrent.Value = 10; - result->EVSEMinCurrent.Multiplier = 0; - result->EVSEMinCurrent.Unit = A_unitSymbolType; - result->EVSEMinCurrent.Value = 2; - - - result->isused.EnergyProvider=0; - /*result->EnergyProvider.arraylen.data=1; - result->EnergyProvider.data[0]=11; */ - result->isused.TariffTable = 0; return 0; } int lineLock(struct LineLockReqType* param, struct LineLockResType* result) { - printf("EVSE: lineLock called\n" ); - printf("\tReceived data:\n"); - printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby); - printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked); - printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge); - printf("\t\t ReqLockStatus=%d\n", param->ReqLockStatus); - - result->ResponseCode = 0; - result->EVSEStatus.ConnectorLocked=0; - result->EVSEStatus.FatalError=0; - result->EVSEStatus.EVSEStandby=1; - result->EVSEStatus.PowerSwitchClosed=1; - result->EVSEStatus.RCD=1; - result->EVSEStatus.ShutDownTime=12345; - result->EVSEStatus.ChargerStandby = 1; - result->EVSEStatus.EVSEMalfunction = 0; - return 0; } int powerDelivery(struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result) { - printf("EVSE: powerDelivery called\n" ); - printf("\tReceived data:\n"); - printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby); - printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked); - printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge); - - result->ResponseCode=0; - result->EVSEStatus.ConnectorLocked=0; - result->EVSEStatus.FatalError=0; - result->EVSEStatus.EVSEStandby=1; - result->EVSEStatus.PowerSwitchClosed=1; - result->EVSEStatus.RCD=1; - result->EVSEStatus.ShutDownTime=12345; - result->EVSEStatus.ChargerStandby = 1; - result->EVSEStatus.EVSEMalfunction = 0; - return 0; } int meteringStatus(struct MeteringStatusReqType* param, struct MeteringStatusResType* result) { - printf("EVSE: meteringStatus called\n" ); - - result->ResponseCode=1; - result->EVSEID.data[0]=1; - result->EVSEID.arraylen.data=1; - result->EVSEStatus.ConnectorLocked=1; - result->EVSEStatus.EVSEStandby=1; - result->EVSEStatus.FatalError=0; - result->EVSEStatus.PowerSwitchClosed=1; - result->EVSEStatus.RCD=1; - result->EVSEStatus.ShutDownTime=12345678; - result->EVSEStatus.EVSEMalfunction = 0; - result->EVSEStatus.ChargerStandby = 1; - result->TCurrent=12345678; - result->EVSEMaxPower.Multiplier = 2; - result->EVSEMaxPower.Unit = A_unitSymbolType; - result->EVSEMaxPower.Value = 400; - - result->isused.MeterInfo=1; - result->MeterInfo.MeterID.arraylen.data=1; - result->MeterInfo.MeterID.data[0]=2; - result->MeterInfo.MeterReading.Multiplier = 0; - result->MeterInfo.MeterReading.Unit = A_unitSymbolType; - result->MeterInfo.MeterReading.Value = 500; - result->MeterInfo.MeterStatus = 4321; - result->MeterInfo.TMeter =123456789; - result->MeterInfo.isused.MeterID=1; - result->MeterInfo.isused.MeterReading = 1; - result->MeterInfo.isused.MeterStatus=1; - result->MeterInfo.isused.TMeter=1; - - result->isused.PCurrent=1; - result->PCurrent.Value=4321; - return 0; } int meteringReceipt(struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result) { - - printf("EVSE: meteringReceipt called\n" ); - printf("\tReceived data:\n"); - printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby); - printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked); - printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge); - printf("\t\t TCurrent=%d\n", param->TCurrent); - printf("\t\t MeterInfo.MeterStatus=%d\n", param->MeterInfo.MeterStatus); - printf("\t\t MeterInfo.MeterID=%d\n", param->MeterInfo.MeterID.data[0]); - printf("\t\t MeterInfo.isused.MeterReading=%d\n", param->MeterInfo.isused.MeterReading); - printf("\t\t MeterReading.Value=%d\n", param->MeterInfo.MeterReading.Value); - printf("\t\t MeterInfo.TMeter=%d\n", param->MeterInfo.TMeter); - if(param->Tariff==Green_charge_tariffIDType) - printf("\t\t Tariff==Green_charge_tariffIDType\n"); - result->ResponseCode = 0; - return 0; } - -int cableCheck(struct CableCheckReqType* param, struct CableCheckResType* result) -{ - printf("EVSE: cableCheck called\n" ); - printf("\tReceived data:\n"); - printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby); - printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked); - printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge); - - result->EVSEStatus.ConnectorLocked=1; - result->EVSEStatus.EVSEStandby=1; - result->EVSEStatus.FatalError=0; - result->EVSEStatus.PowerSwitchClosed=1; - result->EVSEStatus.RCD=1; - result->EVSEStatus.ShutDownTime=12345678; - result->EVSEStatus.EVSEMalfunction = 0; - result->EVSEStatus.ChargerStandby = 1; - - result->ResponseCode = OK_responseCode_CableCheckType; - - return 0; -} - - -int preCharge(struct PreChargeReqType* param, struct PreChargeResType* result) -{ - struct FloatingValueType float_type; - float_type.Multiplier = 0; - float_type.Unit = V_unitSymbolType; - - printf("EVSE: currentDemand called\n" ); - printf("\tReceived data:\n"); - printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby); - printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked); - printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge); - - printf("\t\t PEVDemandCurrent=%d\n",param->PEVDemandCurrent.Value); - printf("\t\t PEVTargetVoltage=%d\n", param->PEVTargetVoltage.Value); - - result->ResponseCode=OK_responseCode_CurrentDemandType; - result->EVSEStatus.ConnectorLocked=1; - result->EVSEStatus.EVSEStandby=1; - result->EVSEStatus.FatalError=0; - result->EVSEStatus.PowerSwitchClosed=1; - result->EVSEStatus.RCD=1; - result->EVSEStatus.ShutDownTime=12345678; - result->EVSEStatus.ChargerStandby=1; - result->EVSEStatus.EVSEMalfunction=0; - result->EVSEStatus.StopCharging=0; - - float_type.Value = 800; - - result->EVSEPresentVoltage = float_type; - - - return 0; - - -} - -int currentDemand(struct CurrentDemandReqType* param, struct CurrentDemandResType* result) -{ - struct FloatingValueType float_type; - float_type.Multiplier = 0; - - printf("EVSE: currentDemand called\n" ); - printf("\tReceived data:\n"); - printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby); - printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked); - printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge); - - printf("\t\t PEVDemandCurrent=%d\n",param->PEVDemandCurrent.Value); - printf("\t\t PEVTargetVoltage=%d\n", param->PEVTargetVoltage.Value); - - result->EVSEStatus.ConnectorLocked=1; - result->EVSEStatus.EVSEStandby=1; - result->EVSEStatus.FatalError=0; - result->EVSEStatus.PowerSwitchClosed=1; - result->EVSEStatus.RCD=1; - result->EVSEStatus.ShutDownTime=12345678; - result->EVSEStatus.ChargerStandby=1; - result->EVSEStatus.EVSEMalfunction=0; - result->EVSEStatus.StopCharging=0; - result->ResponseCode=OK_responseCode_CurrentDemandType; - - float_type.Unit = A_unitSymbolType; - float_type.Value = 40; - result->EVSEPresentCurrent = float_type; - - float_type.Unit = V_unitSymbolType; - float_type.Value = 700; - result->EVSEPresentVoltage = float_type; - - return 0; -} - -int weldingDetection(struct WeldingDetectionReqType* param, struct WeldingDetectionResType* result) -{ - struct FloatingValueType float_type; - float_type.Multiplier = 0; - float_type.Unit = V_unitSymbolType; - float_type.Value = 0; - - printf("EVSE: weldingDetection called\n" ); - printf("\tReceived data:\n"); - printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby); - printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked); - printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge); - - result->ResponseCode = OK_responseCode_WeldingDetectionType; - - result->EVSEStatus.ConnectorLocked=1; - result->EVSEStatus.EVSEStandby=1; - result->EVSEStatus.FatalError=0; - result->EVSEStatus.PowerSwitchClosed=1; - result->EVSEStatus.RCD=1; - result->EVSEStatus.ShutDownTime=12345678; - result->EVSEStatus.ChargerStandby=1; - result->EVSEStatus.EVSEMalfunction=0; - result->EVSEStatus.StopCharging=0; - - result->EVSEPresentVoltage=float_type; - - return 0; -} - -int terminateCharging(struct TerminateChargingReqType* param, struct TerminateChargingResType* result) -{ - struct FloatingValueType float_type; - float_type.Multiplier = 0; - float_type.Unit = V_unitSymbolType; - float_type.Value =0; - - printf("EVSE: terminateCharging called\n" ); - printf("\tReceived data:\n"); - printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby); - printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked); - printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge); - - result->EVSEPresentVoltage = float_type; - result->ResponseCode = OK_responseCode_TerminateChargingType; - - - return 0; - -} diff --git a/src/transport/doIP.c b/src/transport/doIP.c index 12ad8bf..2593303 100644 --- a/src/transport/doIP.c +++ b/src/transport/doIP.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2007-2011 Siemens AG + * Copyright (C) 2007-2010 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -19,7 +19,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.4 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -39,7 +39,7 @@ #include "doIP.h" -int write_doIPNack(uint8_t* outStream, uint16_t* outStreamLength, uint8_t nackCode) +int write_doIPNack(uint8_t* outStream, uint32_t* outStreamLength, uint8_t nackCode) { /* if(outStreamLength