From 69e25e01721ba664a372fbbdaee228ef650e3d45 Mon Sep 17 00:00:00 2001 From: daniel_peintner Date: Wed, 20 Oct 2010 12:22:39 +0000 Subject: [PATCH] * improves EXI codec footprint git-svn-id: https://svn.code.sf.net/p/openv2g/code/trunk@15 d9f2db14-54d0-4bde-b00c-16405c910529 --- src/codec/BitDecoderChannel.c | 2 +- src/codec/BitDecoderChannel.h | 2 +- src/codec/BitEncoderChannel.c | 2 +- src/codec/BitEncoderChannel.h | 2 +- src/codec/BitInputStream.c | 2 +- src/codec/BitInputStream.h | 2 +- src/codec/BitOutputStream.c | 2 +- src/codec/BitOutputStream.h | 2 +- src/codec/BitStream.c | 2 +- src/codec/BitStream.h | 2 +- src/codec/EXICoder.c | 2 +- src/codec/EXICoder.h | 2 +- src/codec/EXIDecoder.c | 1780 +++++++++++--------------------- src/codec/EXIDecoder.h | 2 +- src/codec/EXIEncoder.c | 376 ++----- src/codec/EXIEncoder.h | 2 +- src/codec/EXIHeaderDecoder.c | 2 +- src/codec/EXIHeaderDecoder.h | 2 +- src/codec/EXIHeaderEncoder.c | 2 +- src/codec/EXIHeaderEncoder.h | 2 +- src/codec/EXITypes.h | 2 +- src/codec/StringTable.c | 2 +- src/codec/StringTable.h | 2 +- src/codec/StringTableEntries.c | 2 +- src/codec/StringTableEntries.h | 2 +- src/codec/UCSString.c | 2 +- src/codec/UCSString.h | 2 +- src/test/main.c | 41 + src/test/main.h | 24 + src/test/main_codec.c | 2 +- src/test/main_service.c | 2 +- 31 files changed, 766 insertions(+), 1509 deletions(-) create mode 100644 src/test/main.c create mode 100644 src/test/main.h diff --git a/src/codec/BitDecoderChannel.c b/src/codec/BitDecoderChannel.c index 7b53341..5c930c8 100644 --- a/src/codec/BitDecoderChannel.c +++ b/src/codec/BitDecoderChannel.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * * Bit decoding functionalities diff --git a/src/codec/BitDecoderChannel.h b/src/codec/BitDecoderChannel.h index 4d0c183..6bd2a18 100644 --- a/src/codec/BitDecoderChannel.h +++ b/src/codec/BitDecoderChannel.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/BitEncoderChannel.c b/src/codec/BitEncoderChannel.c index 9b46d42..e42254e 100644 --- a/src/codec/BitEncoderChannel.c +++ b/src/codec/BitEncoderChannel.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/BitEncoderChannel.h b/src/codec/BitEncoderChannel.h index 71be379..a0af344 100644 --- a/src/codec/BitEncoderChannel.h +++ b/src/codec/BitEncoderChannel.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/BitInputStream.c b/src/codec/BitInputStream.c index 737abf8..db2d0bf 100644 --- a/src/codec/BitInputStream.c +++ b/src/codec/BitInputStream.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/BitInputStream.h b/src/codec/BitInputStream.h index d205145..58c2694 100644 --- a/src/codec/BitInputStream.h +++ b/src/codec/BitInputStream.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/BitOutputStream.c b/src/codec/BitOutputStream.c index 2e921cf..987ce9b 100644 --- a/src/codec/BitOutputStream.c +++ b/src/codec/BitOutputStream.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/BitOutputStream.h b/src/codec/BitOutputStream.h index 2c77e8c..fe8994f 100644 --- a/src/codec/BitOutputStream.h +++ b/src/codec/BitOutputStream.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/BitStream.c b/src/codec/BitStream.c index dcd3de5..d3ea766 100644 --- a/src/codec/BitStream.c +++ b/src/codec/BitStream.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/BitStream.h b/src/codec/BitStream.h index 517e1d0..d0a2502 100644 --- a/src/codec/BitStream.h +++ b/src/codec/BitStream.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXICoder.c b/src/codec/EXICoder.c index a5178b0..ca55bf8 100644 --- a/src/codec/EXICoder.c +++ b/src/codec/EXICoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXICoder.h b/src/codec/EXICoder.h index 50f3d7c..736c67b 100644 --- a/src/codec/EXICoder.h +++ b/src/codec/EXICoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIDecoder.c b/src/codec/EXIDecoder.c index 8f04b6a..b923e1b 100644 --- a/src/codec/EXIDecoder.c +++ b/src/codec/EXIDecoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * *

NOTE: Code generated by EXIdizer v0.1

@@ -53,10 +53,588 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, exi_event_t* nextEvent) { switch (state->grammarStack[state->stackIndex]) { + case 68: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 91: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ + case 103: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + case 126: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ + case 134: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */ + case 143: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 147: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ + case 150: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ + case 156: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 167: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 173: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */ + case 189: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */ + case 195: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + case 202: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ + decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + if (state->eventCode == 0) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 1) { + *nextEvent = END_ELEMENT; + return 0; + } case 0: /* Document[START_DOCUMENT] */ *nextEvent = START_DOCUMENT; return 0; + case 7: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + case 137: + /* 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; + return 0; + } + else if (state->eventCode == 1) { + *nextEvent = START_ELEMENT; + return 0; + } + case 64: + /* 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 163: + /* 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 192: + /* 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; + return 0; + } + else if (state->eventCode == 1) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 2) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 3) { + *nextEvent = END_ELEMENT; + return 0; + } + case 66: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 90: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ + case 102: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + case 125: + /* 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 165: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 193: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + case 200: + /* 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; + return 0; + } + else if (state->eventCode == 1) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 2) { + *nextEvent = END_ELEMENT; + return 0; + } + case 188: + /* 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; + return 0; + } + else if (state->eventCode == 1) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 2) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 3) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 4) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 5) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 6) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 7) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 8) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 9) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 10) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 11) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 12) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 13) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 14) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 15) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 16) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 17) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 18) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 19) { + *nextEvent = END_ELEMENT; + return 0; + } + case 27: + /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ + case 30: + /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ + case 34: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 39: + /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ + case 43: + /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ + case 45: + /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ + case 47: + /* FirstStartTagStartTag[CHARACTERS[INTEGER_64]] */ + case 53: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 57: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 63: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 65: + /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ + case 74: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 77: + /* FirstStartTag(xsi:type)StartTag[CHARACTERS[INTEGER_64]] */ + case 69: + /* FirstStartTagStartTag[CHARACTERS[INTEGER_16]] */ + case 82: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 85: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 87: + /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ + case 96: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 99: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 109: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 116: + /* FirstStartTagStartTag[CHARACTERS[INTEGER_16]] */ + case 121: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 127: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 133: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 139: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 146: + /* FirstStartTagStartTag[CHARACTERS[UNSIGNED_INTEGER_32]] */ + case 151: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 153: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 157: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 164: + /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ + case 166: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 174: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 180: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 194: + /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ + case 197: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 201: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 203: + /* FirstStartTag(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 209: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + *nextEvent = CHARACTERS; + return 0; + case 3: + /* FirstStartTag(xsi:type)StartTag[END_ELEMENT] */ + case 26: + /* Element[END_ELEMENT] */ + case 29: + /* Element[END_ELEMENT] */ + case 31: + /* Element[END_ELEMENT] */ + case 32: + /* Element[END_ELEMENT] */ + case 35: + /* Element[END_ELEMENT] */ + case 37: + /* Element[END_ELEMENT] */ + case 46: + /* Element[END_ELEMENT] */ + case 48: + /* Element[END_ELEMENT] */ + case 49: + /* Element[END_ELEMENT] */ + case 50: + /* Element[END_ELEMENT] */ + case 51: + /* Element[END_ELEMENT] */ + case 58: + /* Element[END_ELEMENT] */ + case 60: + /* Element[END_ELEMENT] */ + case 61: + /* Element[END_ELEMENT] */ + case 70: + /* Element[END_ELEMENT] */ + case 71: + /* Element[END_ELEMENT] */ + case 72: + /* Element[END_ELEMENT] */ + case 76: + /* Element[END_ELEMENT] */ + case 78: + /* Element[END_ELEMENT] */ + case 79: + /* Element[END_ELEMENT] */ + case 80: + /* Element[END_ELEMENT] */ + case 81: + /* Element[END_ELEMENT] */ + case 83: + /* Element[END_ELEMENT] */ + case 9: + /* FirstStartTagStartTag[END_ELEMENT] */ + case 92: + /* Element[END_ELEMENT] */ + case 93: + /* Element[END_ELEMENT] */ + case 94: + /* Element[END_ELEMENT] */ + case 95: + /* Element[END_ELEMENT] */ + case 97: + /* Element[END_ELEMENT] */ + case 98: + /* Element[END_ELEMENT] */ + case 100: + /* Element[END_ELEMENT] */ + case 104: + /* Element[END_ELEMENT] */ + case 107: + /* Element[END_ELEMENT] */ + case 108: + /* Element[END_ELEMENT] */ + case 110: + /* Element[END_ELEMENT] */ + case 118: + /* Element[END_ELEMENT] */ + case 119: + /* Element[END_ELEMENT] */ + case 128: + /* Element[END_ELEMENT] */ + case 130: + /* Element[END_ELEMENT] */ + case 131: + /* Element[END_ELEMENT] */ + case 136: + /* Element[END_ELEMENT] */ + case 140: + /* Element[END_ELEMENT] */ + case 142: + /* Element[END_ELEMENT] */ + case 148: + /* Element[END_ELEMENT] */ + case 149: + /* Element[END_ELEMENT] */ + case 152: + /* Element[END_ELEMENT] */ + case 154: + /* Element[END_ELEMENT] */ + case 155: + /* Element[END_ELEMENT] */ + case 158: + /* Element[END_ELEMENT] */ + case 160: + /* Element[END_ELEMENT] */ + case 168: + /* Element[END_ELEMENT] */ + case 169: + /* Element[END_ELEMENT] */ + case 170: + /* Element[END_ELEMENT] */ + case 172: + /* Element[END_ELEMENT] */ + case 175: + /* Element[END_ELEMENT] */ + case 176: + /* Element[END_ELEMENT] */ + case 178: + /* Element[END_ELEMENT] */ + case 183: + /* Element[END_ELEMENT] */ + case 184: + /* Element[END_ELEMENT] */ + case 187: + /* Element[END_ELEMENT] */ + case 191: + /* Element[END_ELEMENT] */ + case 196: + /* Element[END_ELEMENT] */ + case 198: + /* Element[END_ELEMENT] */ + case 199: + /* Element[END_ELEMENT] */ + case 204: + /* Element[END_ELEMENT] */ + case 206: + /* Element[END_ELEMENT] */ + case 207: + /* Element[END_ELEMENT] */ + case 208: + /* Element[END_ELEMENT] */ + case 210: + /* Element[END_ELEMENT] */ + case 211: + /* Element[END_ELEMENT] */ + *nextEvent = END_ELEMENT; + return 0; + case 59: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + decodeNBitUnsignedInteger(stream, 3, &state->eventCode); + if (state->eventCode == 0) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 1) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 2) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 3) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 4) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 5) { + *nextEvent = END_ELEMENT; + return 0; + } + case 2: + /* DocEnd[END_DOCUMENT] */ + *nextEvent = END_DOCUMENT; + return 0; + case 5: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + case 24: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus)] */ + case 25: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + case 28: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargerStandby)] */ + case 6: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 33: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + case 36: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FatalError)] */ + case 38: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby)] */ + case 40: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ + case 41: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + case 42: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + case 44: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ + case 52: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + case 55: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ + case 56: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + case 67: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + case 73: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit)] */ + case 75: + /* 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 84: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 86: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + case 88: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + case 89: + /* 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 101: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ + case 105: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + case 106: + /* 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 111: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC)] */ + case 112: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EAmount)] */ + case 113: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPower)] */ + case 114: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases)] */ + case 115: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxVoltage)] */ + case 117: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMinVoltage)] */ + case 16: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 120: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + case 122: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage)] */ + case 123: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEIMax)] */ + case 124: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases)] */ + case 129: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency)] */ + case 132: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff)] */ + case 135: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */ + case 138: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + case 141: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */ + case 144: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */ + case 145: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffPMax)] */ + case 18: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 159: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + case 162: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + case 19: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */ + case 171: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVPubKey)] */ + case 20: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 177: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ + case 22: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + case 179: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + case 181: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + case 182: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ + case 23: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + case 185: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + case 186: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}SessionInformation)] */ + case 190: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */ + case 205: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Event)] */ + *nextEvent = START_ELEMENT; + return 0; case 1: /* 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); @@ -144,215 +722,6 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, *nextEvent = START_ELEMENT_GENERIC; return 0; } - case 2: - /* DocEnd[END_DOCUMENT] */ - *nextEvent = END_DOCUMENT; - return 0; - case 3: - /* FirstStartTag(xsi:type)StartTag[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 5: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ - *nextEvent = START_ELEMENT; - return 0; - case 24: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus)] */ - *nextEvent = START_ELEMENT; - return 0; - case 26: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 25: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ - *nextEvent = START_ELEMENT; - return 0; - case 28: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargerStandby)] */ - *nextEvent = START_ELEMENT; - return 0; - case 29: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 27: - /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ - *nextEvent = CHARACTERS; - return 0; - case 31: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 30: - /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ - *nextEvent = CHARACTERS; - return 0; - case 32: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 6: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - *nextEvent = START_ELEMENT; - return 0; - case 33: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ - *nextEvent = START_ELEMENT; - return 0; - case 35: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 34: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 37: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 36: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FatalError)] */ - *nextEvent = START_ELEMENT; - return 0; - case 38: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStandby)] */ - *nextEvent = START_ELEMENT; - return 0; - case 40: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConnectorLocked)] */ - *nextEvent = START_ELEMENT; - return 0; - case 41: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ - *nextEvent = START_ELEMENT; - return 0; - case 42: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ - *nextEvent = START_ELEMENT; - return 0; - case 44: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */ - *nextEvent = START_ELEMENT; - return 0; - case 46: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 39: - /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ - *nextEvent = CHARACTERS; - return 0; - case 48: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 43: - /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ - *nextEvent = CHARACTERS; - return 0; - case 49: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 45: - /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ - *nextEvent = CHARACTERS; - return 0; - case 50: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 47: - /* FirstStartTagStartTag[CHARACTERS[INTEGER_64]] */ - *nextEvent = CHARACTERS; - return 0; - case 51: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 7: - /* 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; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - case 52: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ - *nextEvent = START_ELEMENT; - return 0; - case 54: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - case 55: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ - *nextEvent = START_ELEMENT; - return 0; - case 56: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ - *nextEvent = START_ELEMENT; - return 0; - case 58: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 53: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - *nextEvent = CHARACTERS; - return 0; - case 60: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 57: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 61: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 59: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 3, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 3) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 4) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 5) { - *nextEvent = END_ELEMENT; - return 0; - } case 62: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ decodeNBitUnsignedInteger(stream, 3, &state->eventCode); @@ -376,997 +745,6 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, *nextEvent = END_ELEMENT; return 0; } - case 64: - /* 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] */ - decodeNBitUnsignedInteger(stream, 2, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 3) { - *nextEvent = END_ELEMENT; - return 0; - } - case 66: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 2, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = END_ELEMENT; - return 0; - } - case 68: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 70: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 63: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - *nextEvent = CHARACTERS; - return 0; - case 71: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 65: - /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ - *nextEvent = CHARACTERS; - return 0; - case 72: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 67: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ - *nextEvent = START_ELEMENT; - return 0; - case 73: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit)] */ - *nextEvent = START_ELEMENT; - return 0; - case 75: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ - *nextEvent = START_ELEMENT; - return 0; - case 76: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 74: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 78: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 77: - /* FirstStartTag(xsi:type)StartTag[CHARACTERS[INTEGER_64]] */ - *nextEvent = CHARACTERS; - return 0; - case 79: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 69: - /* FirstStartTagStartTag[CHARACTERS[INTEGER_16]] */ - *nextEvent = CHARACTERS; - return 0; - case 80: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 8: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - *nextEvent = START_ELEMENT; - return 0; - case 81: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 82: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 83: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 9: - /* FirstStartTagStartTag[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 10: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - *nextEvent = START_ELEMENT; - return 0; - case 84: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ - *nextEvent = START_ELEMENT; - return 0; - case 86: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ - *nextEvent = START_ELEMENT; - return 0; - case 88: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ - *nextEvent = START_ELEMENT; - return 0; - case 89: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower)] */ - *nextEvent = START_ELEMENT; - return 0; - case 90: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 2, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = END_ELEMENT; - return 0; - } - case 91: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 92: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 85: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 93: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 87: - /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ - *nextEvent = CHARACTERS; - return 0; - case 94: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 11: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ - *nextEvent = START_ELEMENT; - return 0; - case 95: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 96: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - *nextEvent = CHARACTERS; - return 0; - case 97: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 12: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - *nextEvent = START_ELEMENT; - return 0; - case 98: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 99: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 100: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 13: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ - *nextEvent = START_ELEMENT; - return 0; - case 101: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ - *nextEvent = START_ELEMENT; - return 0; - case 102: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 2, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = END_ELEMENT; - return 0; - } - case 103: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 104: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 105: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ - *nextEvent = START_ELEMENT; - return 0; - case 106: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ - *nextEvent = START_ELEMENT; - return 0; - case 107: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 14: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - *nextEvent = START_ELEMENT; - return 0; - case 108: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 109: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 110: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 15: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ - *nextEvent = START_ELEMENT; - return 0; - case 111: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC)] */ - *nextEvent = START_ELEMENT; - return 0; - case 112: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EAmount)] */ - *nextEvent = START_ELEMENT; - return 0; - case 113: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPower)] */ - *nextEvent = START_ELEMENT; - return 0; - case 114: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases)] */ - *nextEvent = START_ELEMENT; - return 0; - case 115: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxVoltage)] */ - *nextEvent = START_ELEMENT; - return 0; - case 117: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMinVoltage)] */ - *nextEvent = START_ELEMENT; - return 0; - case 118: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 116: - /* FirstStartTagStartTag[CHARACTERS[INTEGER_16]] */ - *nextEvent = CHARACTERS; - return 0; - case 119: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 16: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - *nextEvent = START_ELEMENT; - return 0; - case 120: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ - *nextEvent = START_ELEMENT; - return 0; - case 122: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage)] */ - *nextEvent = START_ELEMENT; - return 0; - case 123: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEIMax)] */ - *nextEvent = START_ELEMENT; - return 0; - case 124: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases)] */ - *nextEvent = START_ELEMENT; - return 0; - case 125: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 2, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = END_ELEMENT; - return 0; - } - case 126: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 128: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 121: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 130: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 127: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - *nextEvent = CHARACTERS; - return 0; - case 131: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 129: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency)] */ - *nextEvent = START_ELEMENT; - return 0; - case 132: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff)] */ - *nextEvent = START_ELEMENT; - return 0; - case 134: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 133: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - *nextEvent = CHARACTERS; - return 0; - case 136: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 135: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */ - *nextEvent = START_ELEMENT; - return 0; - case 137: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - case 138: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ - *nextEvent = START_ELEMENT; - return 0; - case 140: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 139: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - *nextEvent = CHARACTERS; - return 0; - case 142: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 141: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */ - *nextEvent = START_ELEMENT; - return 0; - case 143: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 144: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */ - *nextEvent = START_ELEMENT; - return 0; - case 145: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffPMax)] */ - *nextEvent = START_ELEMENT; - return 0; - case 147: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 148: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 146: - /* FirstStartTagStartTag[CHARACTERS[UNSIGNED_INTEGER_32]] */ - *nextEvent = CHARACTERS; - return 0; - case 149: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 17: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 2, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = END_ELEMENT; - return 0; - } - case 150: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 152: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 151: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 154: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 153: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - *nextEvent = CHARACTERS; - return 0; - case 155: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 18: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - *nextEvent = START_ELEMENT; - return 0; - case 156: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 158: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 157: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 160: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 159: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ - *nextEvent = START_ELEMENT; - return 0; - case 161: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 162: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ - *nextEvent = START_ELEMENT; - return 0; - case 163: - /* 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] */ - decodeNBitUnsignedInteger(stream, 2, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 3) { - *nextEvent = END_ELEMENT; - return 0; - } - case 165: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 2, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = END_ELEMENT; - return 0; - } - case 167: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 168: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 164: - /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ - *nextEvent = CHARACTERS; - return 0; - case 169: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 166: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - *nextEvent = CHARACTERS; - return 0; - case 170: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 19: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */ - *nextEvent = START_ELEMENT; - return 0; - case 171: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVPubKey)] */ - *nextEvent = START_ELEMENT; - return 0; - case 172: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 20: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - *nextEvent = START_ELEMENT; - return 0; - case 173: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 175: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 174: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 176: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - 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; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - case 177: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ - *nextEvent = START_ELEMENT; - return 0; - case 178: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 22: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - *nextEvent = START_ELEMENT; - return 0; - case 179: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ - *nextEvent = START_ELEMENT; - return 0; - case 181: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ - *nextEvent = START_ELEMENT; - return 0; - case 182: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ - *nextEvent = START_ELEMENT; - return 0; - case 183: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 180: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 184: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 23: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ - *nextEvent = START_ELEMENT; - return 0; - case 185: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ - *nextEvent = START_ELEMENT; - return 0; - case 187: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 186: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}SessionInformation)] */ - *nextEvent = START_ELEMENT; - return 0; - case 189: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 191: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 190: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */ - *nextEvent = START_ELEMENT; - return 0; - case 193: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 2, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = END_ELEMENT; - return 0; - } - case 195: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 196: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 194: - /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ - *nextEvent = CHARACTERS; - return 0; - case 198: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 197: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - *nextEvent = CHARACTERS; - return 0; - case 199: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 192: - /* 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; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 3) { - *nextEvent = END_ELEMENT; - return 0; - } - case 200: - /* 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; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = END_ELEMENT; - return 0; - } - case 202: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ - decodeNBitUnsignedInteger(stream, 1, &state->eventCode); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = END_ELEMENT; - return 0; - } - case 204: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 201: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 206: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 203: - /* FirstStartTag(xsi:type)StartTag[CHARACTERS[STRING]] */ - *nextEvent = CHARACTERS; - return 0; - case 207: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 205: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Event)] */ - *nextEvent = START_ELEMENT; - return 0; - case 208: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 209: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 210: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; - case 188: - /* 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; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 3) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 4) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 5) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 6) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 7) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 8) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 9) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 10) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 11) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 12) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 13) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 14) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 15) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 16) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 17) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 18) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 19) { - *nextEvent = END_ELEMENT; - return 0; - } - case 211: - /* Element[END_ELEMENT] */ - *nextEvent = END_ELEMENT; - return 0; default: *nextEvent = ERROR; diff --git a/src/codec/EXIDecoder.h b/src/codec/EXIDecoder.h index f56f598..c745331 100644 --- a/src/codec/EXIDecoder.h +++ b/src/codec/EXIDecoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIEncoder.c b/src/codec/EXIEncoder.c index d44a4fd..6810e59 100644 --- a/src/codec/EXIEncoder.c +++ b/src/codec/EXIEncoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * *

NOTE: Code generated by EXIdizer v0.1

@@ -1613,398 +1613,150 @@ 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 3: - /* FirstStartTag(xsi:type)StartTag[END_ELEMENT] */ - /* no event code to write */ - break; - case 26: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 29: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 31: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 32: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 35: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 37: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 46: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 48: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 49: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 50: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 51: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 58: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 60: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 61: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 70: - /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 68: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; - case 66: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 2, 2); - break; - case 64: - /* 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] */ - encodeNBitUnsignedInteger(stream, 2, 3); - break; case 62: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ encodeNBitUnsignedInteger(stream, 3, 4); break; - case 59: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 3, 5); - break; + case 3: + /* FirstStartTag(xsi:type)StartTag[END_ELEMENT] */ + case 26: + /* Element[END_ELEMENT] */ + case 29: + /* Element[END_ELEMENT] */ + case 31: + /* Element[END_ELEMENT] */ + case 32: + /* Element[END_ELEMENT] */ + case 35: + /* Element[END_ELEMENT] */ + case 37: + /* Element[END_ELEMENT] */ + case 46: + /* Element[END_ELEMENT] */ + case 48: + /* Element[END_ELEMENT] */ + case 49: + /* Element[END_ELEMENT] */ + case 50: + /* Element[END_ELEMENT] */ + case 51: + /* Element[END_ELEMENT] */ + case 58: + /* Element[END_ELEMENT] */ + case 60: + /* Element[END_ELEMENT] */ + case 61: + /* Element[END_ELEMENT] */ + case 70: + /* Element[END_ELEMENT] */ case 71: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 72: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 76: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 78: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 79: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 80: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 81: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 83: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 9: /* FirstStartTagStartTag[END_ELEMENT] */ - /* no event code to write */ - break; case 92: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 91: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; - case 90: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 2, 2); - break; case 93: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 94: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 95: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 97: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 98: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 100: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 104: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 103: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; - case 102: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 2, 2); - break; case 107: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 108: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 110: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 118: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 119: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 128: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 126: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; - case 125: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 2, 2); - break; case 130: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 131: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 134: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; case 136: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 140: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 142: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 143: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; case 148: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 147: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; case 149: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 152: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 150: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; - case 17: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 2, 2); - break; case 154: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 155: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 158: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 156: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; case 160: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 161: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; case 168: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 167: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; - case 165: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 2, 2); - break; - case 163: - /* 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] */ - encodeNBitUnsignedInteger(stream, 2, 3); - break; case 169: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 170: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 172: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 175: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 173: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; case 176: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 178: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 183: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 184: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 187: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 191: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 189: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; case 196: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 195: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; - case 193: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 2, 2); - break; case 198: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 199: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 204: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; - case 202: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ - encodeNBitUnsignedInteger(stream, 1, 1); - break; - case 200: - /* 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 192: - /* 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 206: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 207: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 208: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 210: /* Element[END_ELEMENT] */ - /* no event code to write */ - break; case 211: /* Element[END_ELEMENT] */ /* no event code to write */ @@ -2013,6 +1765,68 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state, /* 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 64: + /* 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 163: + /* 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 192: + /* 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 68: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 91: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ + case 103: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + case 126: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ + case 134: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */ + case 143: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ + case 147: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ + case 150: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ + case 156: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + case 161: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + case 167: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 173: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */ + case 189: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */ + case 195: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + case 202: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ + encodeNBitUnsignedInteger(stream, 1, 1); + break; + case 59: + /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterPubKey), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + encodeNBitUnsignedInteger(stream, 3, 5); + break; + case 66: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + case 90: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ + case 102: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + case 125: + /* 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 165: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + case 193: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ + case 200: + /* 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; default: return -1; diff --git a/src/codec/EXIEncoder.h b/src/codec/EXIEncoder.h index 4ea5b07..221a608 100644 --- a/src/codec/EXIEncoder.h +++ b/src/codec/EXIEncoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIHeaderDecoder.c b/src/codec/EXIHeaderDecoder.c index 4f508cb..f36e502 100644 --- a/src/codec/EXIHeaderDecoder.c +++ b/src/codec/EXIHeaderDecoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIHeaderDecoder.h b/src/codec/EXIHeaderDecoder.h index 01ff388..76c3121 100644 --- a/src/codec/EXIHeaderDecoder.h +++ b/src/codec/EXIHeaderDecoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIHeaderEncoder.c b/src/codec/EXIHeaderEncoder.c index 8d560bd..3fa9bcd 100644 --- a/src/codec/EXIHeaderEncoder.c +++ b/src/codec/EXIHeaderEncoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIHeaderEncoder.h b/src/codec/EXIHeaderEncoder.h index 4a5b1e4..e4860df 100644 --- a/src/codec/EXIHeaderEncoder.h +++ b/src/codec/EXIHeaderEncoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXITypes.h b/src/codec/EXITypes.h index 7cc0d64..5799cfa 100644 --- a/src/codec/EXITypes.h +++ b/src/codec/EXITypes.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/StringTable.c b/src/codec/StringTable.c index aa95e46..dac1c03 100644 --- a/src/codec/StringTable.c +++ b/src/codec/StringTable.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/StringTable.h b/src/codec/StringTable.h index 743f032..154e35a 100644 --- a/src/codec/StringTable.h +++ b/src/codec/StringTable.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/StringTableEntries.c b/src/codec/StringTableEntries.c index 5fefd29..79c1d1f 100644 --- a/src/codec/StringTableEntries.c +++ b/src/codec/StringTableEntries.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/StringTableEntries.h b/src/codec/StringTableEntries.h index a177b03..7d02d3a 100644 --- a/src/codec/StringTableEntries.h +++ b/src/codec/StringTableEntries.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/UCSString.c b/src/codec/UCSString.c index afecde0..1d42682 100644 --- a/src/codec/UCSString.c +++ b/src/codec/UCSString.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/UCSString.h b/src/codec/UCSString.h index 8c6494a..0292266 100644 --- a/src/codec/UCSString.h +++ b/src/codec/UCSString.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/test/main.c b/src/test/main.c new file mode 100644 index 0000000..270b526 --- /dev/null +++ b/src/test/main.c @@ -0,0 +1,41 @@ +/* + * 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 Daniel.Peintner.EXT@siemens.com + * @author Sebastian.Kaebisch.EXT@siemens.com + * @version 0.2.2 + * @contact Joerg.Heuer@siemens.com + * + *

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

+ * + ********************************************************************/ + +#include +#include + +#include "main.h" + +int main(int argc, char *argv[]) { + /* EXI codec only */ + /* return main_codec(argc, argv);*/ + + /* Entire V2G service */ + return main_service(argc, argv); +} + diff --git a/src/test/main.h b/src/test/main.h new file mode 100644 index 0000000..6cb52ec --- /dev/null +++ b/src/test/main.h @@ -0,0 +1,24 @@ +/* + * 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 . + */ + +#ifndef MAIN_H_ +#define MAIN_H_ + +int main_codec(int argc, char *argv[]); +int main_service(int argc, char *argv[]); + +#endif diff --git a/src/test/main_codec.c b/src/test/main_codec.c index 21d6bb3..5db442e 100644 --- a/src/test/main_codec.c +++ b/src/test/main_codec.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.1 + * @version 0.2.2 * @contact Joerg.Heuer@siemens.com * *

Sample program to illustrate how to read an EXI stream and diff --git a/src/test/main_service.c b/src/test/main_service.c index a28e629..6edebd3 100644 --- a/src/test/main_service.c +++ b/src/test/main_service.c @@ -37,7 +37,7 @@ #define MAX_STRING_SIZE 256 #define MAX_STREAM_SIZE 60 -int main(int argc, char *argv[]) +int main_service(int argc, char *argv[]) { static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/