diff --git a/.cproject b/.cproject
index 531b7e9..c1f0526 100644
--- a/.cproject
+++ b/.cproject
@@ -1,942 +1,1112 @@
-
-
-
-
NOTE: Code generated by EXIdizer v0.1
@@ -52,7 +52,40 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, exi_event_t* nextEvent) { switch (state->grammarStack[state->stackIndex]) { - case 157: + case 2: + /* DocEnd[END_DOCUMENT] */ + *nextEvent = END_DOCUMENT; + return 0; + 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; + return 0; + } + else if (state->eventCode == 1) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 2) { + *nextEvent = END_ELEMENT; + return 0; + } + 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) { @@ -135,6 +168,46 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, *nextEvent = END_ELEMENT; return 0; } + 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; + 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 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; + return 0; + } + else if (state->eventCode == 1) { + *nextEvent = START_ELEMENT; + return 0; + } case 5: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ case 24: @@ -165,23 +238,23 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */ case 50: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ - case 59: + case 57: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ - case 63: + case 61: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit)] */ - case 65: + 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 71: + case 69: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ - case 73: + case 71: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ - case 75: + case 73: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ - case 76: + case 74: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower)] */ case 11: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ @@ -189,126 +262,86 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ case 13: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ - case 84: + case 82: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */ - case 88: + case 86: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ - case 89: + 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 93: + case 91: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC)] */ - case 94: + case 92: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EAmount)] */ - case 95: + case 93: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPower)] */ - case 96: + case 94: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases)] */ - case 97: + case 95: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxVoltage)] */ - case 99: + 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 101: + case 99: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ - case 103: + case 101: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage)] */ - case 104: + case 102: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEIMax)] */ - case 105: + case 103: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases)] */ - case 110: + case 108: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency)] */ - case 111: + case 109: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff)] */ - case 114: + case 112: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */ - case 116: + case 114: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ - case 119: + case 117: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */ - case 121: + case 119: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */ - case 122: + 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 133: + case 131: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ - case 135: + 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 142: + 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 147: + 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 149: + case 148: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ - case 151: + case 150: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ - case 152: + 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 154: + case 153: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ - case 155: + case 154: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}SessionInformation)] */ - case 159: + case 158: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */ - case 172: + case 171: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Event)] */ *nextEvent = START_ELEMENT; return 0; - 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 115: - /* 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 56: - /* 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 136: - /* 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 161: - /* 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 3: /* FirstStartTag(xsi:type)StartTag[END_ELEMENT] */ case 26: @@ -323,62 +356,204 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state, /* Element[END_ELEMENT] */ case 52: /* Element[END_ELEMENT] */ - case 62: + case 60: + /* Element[END_ELEMENT] */ + case 65: /* Element[END_ELEMENT] */ case 67: /* Element[END_ELEMENT] */ - case 69: - /* Element[END_ELEMENT] */ case 9: /* FirstStartTagStartTag[END_ELEMENT] */ - case 79: + case 77: + /* Element[END_ELEMENT] */ + case 78: /* Element[END_ELEMENT] */ case 80: /* Element[END_ELEMENT] */ - case 82: + case 85: /* Element[END_ELEMENT] */ - case 87: + case 88: /* Element[END_ELEMENT] */ - case 90: + case 89: /* Element[END_ELEMENT] */ - case 91: + case 98: /* Element[END_ELEMENT] */ - case 100: + case 107: /* Element[END_ELEMENT] */ - case 109: + case 116: /* Element[END_ELEMENT] */ - case 118: + case 123: /* Element[END_ELEMENT] */ - case 125: + case 126: /* Element[END_ELEMENT] */ - case 128: + case 130: /* Element[END_ELEMENT] */ - case 132: + case 139: /* Element[END_ELEMENT] */ case 141: /* Element[END_ELEMENT] */ - case 143: + case 145: /* Element[END_ELEMENT] */ - case 146: + case 147: /* Element[END_ELEMENT] */ - case 148: + case 152: /* Element[END_ELEMENT] */ - case 153: + case 155: /* Element[END_ELEMENT] */ - case 156: + case 159: /* Element[END_ELEMENT] */ - case 160: + case 164: /* Element[END_ELEMENT] */ - case 165: + case 170: /* Element[END_ELEMENT] */ - case 171: + case 172: /* Element[END_ELEMENT] */ - case 173: - /* Element[END_ELEMENT] */ - case 175: + case 174: /* 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: + /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ + case 41: + /* 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: + /* 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: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 72: + /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ + case 79: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 81: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 90: + /* 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: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 129: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + case 135: + /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ + case 137: + /* FirstStartTagStartTag[CHARACTERS[STRING]] */ + case 142: + /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ + case 144: + /* 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(xsi:type)StartTag[CHARACTERS[STRING]] */ + case 173: + /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ + *nextEvent = CHARACTERS; + return 0; + 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; + return 0; + } + else if (state->eventCode == 1) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 2) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 3) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 4) { + *nextEvent = END_ELEMENT; + return 0; + } + case 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] */ + decodeNBitUnsignedInteger(stream, 1, &state->eventCode); + if (state->eventCode == 0) { + *nextEvent = START_ELEMENT; + return 0; + } + else if (state->eventCode == 1) { + *nextEvent = END_ELEMENT; + return 0; + } case 1: /* DocContent[START_ELEMENT({urn:iso:15118:2:2010: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); @@ -466,208 +641,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 58: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - case 77: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ - case 85: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ - case 106: - /* 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 138: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 162: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - case 167: - /* 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 53: - /* 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 27: - /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ - case 30: - /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ - case 33: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 37: - /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ - case 41: - /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ - case 43: - /* FirstStartTagStartTag[CHARACTERS[BOOLEAN]] */ - case 45: - /* FirstStartTagStartTag[CHARACTERS[INTEGER_64]] */ - case 47: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - case 51: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 55: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - case 57: - /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ - case 64: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 66: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 68: - /* FirstStartTag(xsi:type)StartTag[CHARACTERS[INTEGER_64]] */ - case 61: - /* FirstStartTagStartTag[CHARACTERS[INTEGER_16]] */ - case 70: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 72: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 74: - /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ - case 81: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - case 83: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 92: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 98: - /* FirstStartTagStartTag[CHARACTERS[INTEGER_16]] */ - case 102: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 108: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - case 112: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - case 117: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - case 123: - /* FirstStartTagStartTag[CHARACTERS[UNSIGNED_INTEGER_32]] */ - case 127: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 129: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - case 131: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 137: - /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ - case 139: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - case 145: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 150: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 163: - /* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */ - case 166: - /* FirstStartTagStartTag[CHARACTERS[STRING]] */ - case 168: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - case 170: - /* FirstStartTag(xsi:type)StartTag[CHARACTERS[STRING]] */ - case 174: - /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */ - *nextEvent = CHARACTERS; - return 0; - case 54: - /* 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); - if (state->eventCode == 0) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 1) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 2) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 3) { - *nextEvent = START_ELEMENT; - return 0; - } - else if (state->eventCode == 4) { - *nextEvent = END_ELEMENT; - return 0; - } - case 60: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - case 78: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ - case 86: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ - case 107: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ - case 113: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */ - case 120: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 124: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ - case 126: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ - case 130: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ - case 134: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ - case 140: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 144: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */ - case 158: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */ - case 164: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - case 169: - /* 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; @@ -794,73 +767,73 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state, break; case 8: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 47, 69, 70); + return _exiDecodeStartElement(state, se, 4, 47, 67, 68); break; case 10: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 47, 71, 72); + return _exiDecodeStartElement(state, se, 4, 47, 69, 70); break; case 11: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ - return _exiDecodeStartElement(state, se, 4, 1, 80, 81); + return _exiDecodeStartElement(state, se, 4, 1, 78, 79); break; case 12: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 47, 82, 83); + return _exiDecodeStartElement(state, se, 4, 47, 80, 81); break; case 13: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 32, 84, 25); + return _exiDecodeStartElement(state, se, 4, 32, 82, 25); break; case 14: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 47, 91, 92); + 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, 93, 25); + return _exiDecodeStartElement(state, se, 4, 32, 91, 25); break; case 16: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 47, 101, 102); + return _exiDecodeStartElement(state, se, 4, 47, 99, 100); break; case 17: /* 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, 126, 127); + return _exiDecodeStartElement(state, se, 4, 58, 124, 125); } else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 57, 128, 129); + return _exiDecodeStartElement(state, se, 4, 57, 126, 127); } break; case 18: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 47, 130, 131); + return _exiDecodeStartElement(state, se, 4, 47, 128, 129); break; case 19: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */ - return _exiDecodeStartElement(state, se, 4, 52, 142, 133); + return _exiDecodeStartElement(state, se, 4, 52, 140, 131); break; case 20: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 47, 144, 145); + return _exiDecodeStartElement(state, se, 4, 47, 143, 144); break; case 21: /* 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, 147, 47); + return _exiDecodeStartElement(state, se, 4, 26, 146, 47); } else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 32, 148, 25); + return _exiDecodeStartElement(state, se, 4, 32, 147, 25); } break; case 22: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - return _exiDecodeStartElement(state, se, 4, 47, 149, 150); + return _exiDecodeStartElement(state, se, 4, 47, 148, 149); break; case 23: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ - return _exiDecodeStartElement(state, se, 6, 4, 154, 155); + return _exiDecodeStartElement(state, se, 6, 4, 153, 154); break; case 24: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus)] */ @@ -892,15 +865,15 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state, break; case 39: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ - return _exiDecodeStartElement(state, se, 5, 24, 40, 41); + 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, 26, 42, 43); + 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, 37, 44, 45); + return _exiDecodeStartElement(state, se, 5, 36, 44, 45); break; case 46: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ @@ -924,7 +897,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state, return _exiDecodeStartElement(state, se, 4, 15, 52, 53); break; case 53: - /* 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] */ + /* 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); } @@ -935,14 +908,11 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state, return _exiDecodeStartElement(state, se, 5, 19, 58, 59); } else if (state->eventCode == 3) { - return _exiDecodeStartElement(state, se, 5, 20, 60, 61); - } - else if (state->eventCode == 4) { - return _exiDecodeStartElement(state, se, 5, 38, 62, 45); + return _exiDecodeStartElement(state, se, 5, 37, 60, 45); } break; case 54: - /* 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] */ + /* 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); } @@ -950,421 +920,406 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state, return _exiDecodeStartElement(state, se, 5, 19, 58, 59); } else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 5, 20, 60, 61); - } - else if (state->eventCode == 3) { - return _exiDecodeStartElement(state, se, 5, 38, 62, 45); + return _exiDecodeStartElement(state, se, 5, 37, 60, 45); } break; case 56: - /* 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] */ + /* 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, 20, 60, 61); - } - else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 5, 38, 62, 45); + return _exiDecodeStartElement(state, se, 5, 37, 60, 45); } break; + case 57: + /* 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:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 20, 60, 61); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 38, 62, 45); - } - break; - case 59: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ - return _exiDecodeStartElement(state, se, 5, 21, 63, 64); - break; - case 60: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 38, 62, 45); + return _exiDecodeStartElement(state, se, 5, 37, 60, 45); } break; + 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:MsgDataTypes}Unit)] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ return _exiDecodeStartElement(state, se, 5, 50, 65, 66); break; - case 65: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ - return _exiDecodeStartElement(state, se, 5, 51, 67, 68); + case 69: + /* 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:MsgBody}EVSEID)] */ - return _exiDecodeStartElement(state, se, 4, 3, 73, 74); + /* 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:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 7, 75, 35); + /* 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:MsgBody}TCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 63, 76, 45); - break; - case 76: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower)] */ - return _exiDecodeStartElement(state, se, 4, 6, 77, 59); - break; - case 77: /* 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, 78, 59); + return _exiDecodeStartElement(state, se, 4, 25, 76, 57); } else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 15, 79, 53); + return _exiDecodeStartElement(state, se, 4, 15, 77, 53); } break; - case 78: + case 76: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 15, 79, 53); + return _exiDecodeStartElement(state, se, 4, 15, 77, 53); + } + break; + 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: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:MsgBody}ReqSwitchStatus)] */ - return _exiDecodeStartElement(state, se, 4, 46, 85, 41); - break; - case 85: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 64, 86, 51); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 0, 87, 88); + return _exiDecodeStartElement(state, se, 4, 0, 85, 86); } break; case 86: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 0, 87, 88); - } - break; - case 88: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ - return _exiDecodeStartElement(state, se, 5, 2, 89, 45); + return _exiDecodeStartElement(state, se, 5, 2, 87, 45); break; - case 89: + case 87: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ - return _exiDecodeStartElement(state, se, 5, 1, 90, 59); + return _exiDecodeStartElement(state, se, 5, 1, 88, 57); + break; + case 91: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC)] */ + return _exiDecodeStartElement(state, se, 4, 10, 92, 45); + break; + case 92: + /* 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:MsgBody}EoC)] */ - return _exiDecodeStartElement(state, se, 4, 10, 94, 45); + /* 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}EAmount)] */ - return _exiDecodeStartElement(state, se, 4, 2, 95, 59); + /* 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:MsgBody}PEVMaxPower)] */ - return _exiDecodeStartElement(state, se, 4, 28, 96, 59); - break; - case 96: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases)] */ - return _exiDecodeStartElement(state, se, 4, 27, 97, 98); + /* 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:MsgBody}PEVMaxVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 29, 99, 59); + /* 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:MsgBody}PEVMinVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 30, 100, 59); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ + return _exiDecodeStartElement(state, se, 4, 7, 101, 35); break; case 101: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 7, 103, 35); + /* 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:MsgBody}EVSEIMax)] */ + return _exiDecodeStartElement(state, se, 4, 4, 103, 57); break; case 103: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage)] */ - return _exiDecodeStartElement(state, se, 4, 8, 104, 59); + /* 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:MsgBody}EVSEIMax)] */ - return _exiDecodeStartElement(state, se, 4, 4, 105, 59); - break; - case 105: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases)] */ - return _exiDecodeStartElement(state, se, 4, 5, 106, 98); - break; - case 106: /* 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, 107, 108); + return _exiDecodeStartElement(state, se, 4, 9, 105, 106); } else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 65, 109, 110); + return _exiDecodeStartElement(state, se, 4, 65, 107, 108); } break; - case 107: + case 105: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 65, 109, 110); + return _exiDecodeStartElement(state, se, 4, 65, 107, 108); } break; - case 110: + case 108: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency)] */ - return _exiDecodeStartElement(state, se, 5, 5, 111, 112); + return _exiDecodeStartElement(state, se, 5, 5, 109, 110); + break; + case 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:MsgDataTypes}Tariff)] */ - return _exiDecodeStartElement(state, se, 5, 39, 113, 114); - break; - case 113: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 39, 113, 114); + return _exiDecodeStartElement(state, se, 5, 38, 111, 112); + } + break; + case 112: + /* 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:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ + if (state->eventCode == 0) { + return _exiDecodeStartElement(state, se, 5, 40, 114, 115); + } + else if (state->eventCode == 1) { + return _exiDecodeStartElement(state, se, 5, 41, 116, 117); } break; case 114: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */ - return _exiDecodeStartElement(state, se, 5, 46, 115, 51); - break; - case 115: - /* 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, 41, 116, 117); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 42, 118, 119); - } - break; - case 116: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ - return _exiDecodeStartElement(state, se, 5, 42, 118, 119); + return _exiDecodeStartElement(state, se, 5, 41, 116, 117); break; - case 119: + case 117: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */ - return _exiDecodeStartElement(state, se, 5, 44, 120, 121); + return _exiDecodeStartElement(state, se, 5, 43, 118, 119); break; - case 120: + case 118: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 44, 120, 121); + return _exiDecodeStartElement(state, se, 5, 43, 118, 119); } break; - case 121: + case 119: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */ - return _exiDecodeStartElement(state, se, 5, 48, 122, 123); + return _exiDecodeStartElement(state, se, 5, 47, 120, 121); + break; + 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:MsgDataTypes}TariffPMax)] */ - return _exiDecodeStartElement(state, se, 5, 47, 124, 59); - break; - case 124: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 6, 125, 59); + return _exiDecodeStartElement(state, se, 5, 6, 123, 57); } break; - case 126: + case 124: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 57, 128, 129); + return _exiDecodeStartElement(state, se, 4, 57, 126, 127); } break; - case 130: + case 128: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 52, 132, 133); + return _exiDecodeStartElement(state, se, 4, 52, 130, 131); + } + break; + case 131: + /* 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: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ - return _exiDecodeStartElement(state, se, 5, 27, 134, 135); + /* 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}Service), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 27, 134, 135); - } - break; - case 135: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ - return _exiDecodeStartElement(state, se, 5, 29, 136, 137); - break; - case 136: /* 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, 31, 138, 139); + return _exiDecodeStartElement(state, se, 5, 30, 136, 137); } else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 34, 140, 127); + return _exiDecodeStartElement(state, se, 5, 33, 138, 125); } else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 5, 32, 141, 129); + return _exiDecodeStartElement(state, se, 5, 31, 139, 127); + } + break; + case 136: + /* 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:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 34, 140, 127); - } - else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 32, 141, 129); + return _exiDecodeStartElement(state, se, 5, 31, 139, 127); } break; case 140: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 32, 141, 129); - } - break; - case 142: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVPubKey)] */ - return _exiDecodeStartElement(state, se, 4, 31, 143, 57); + return _exiDecodeStartElement(state, se, 4, 31, 141, 142); break; - case 144: + case 143: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 4, 16, 146, 57); + return _exiDecodeStartElement(state, se, 4, 16, 145, 142); } break; - case 147: + case 146: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */ - return _exiDecodeStartElement(state, se, 4, 32, 148, 25); + return _exiDecodeStartElement(state, se, 4, 32, 147, 25); break; - case 149: + case 148: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ - return _exiDecodeStartElement(state, se, 4, 3, 151, 74); + 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:MsgBody}EVSEStatus)] */ - return _exiDecodeStartElement(state, se, 4, 7, 152, 35); - break; - case 152: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */ - return _exiDecodeStartElement(state, se, 4, 63, 153, 45); + return _exiDecodeStartElement(state, se, 4, 63, 152, 45); + break; + case 153: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + return _exiDecodeStartElement(state, se, 6, 0, 155, 156); break; case 154: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ - return _exiDecodeStartElement(state, se, 6, 0, 156, 157); - break; - case 155: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}SessionInformation)] */ - return _exiDecodeStartElement(state, se, 6, 7, 158, 159); + return _exiDecodeStartElement(state, se, 6, 7, 157, 158); break; - case 157: + 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] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 6, 2, 175, 3); + return _exiDecodeStartElement(state, se, 6, 2, 174, 3); } else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 4, 11, 175, 5); + return _exiDecodeStartElement(state, se, 4, 11, 174, 5); } else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 4, 13, 175, 6); + return _exiDecodeStartElement(state, se, 4, 13, 174, 6); } else if (state->eventCode == 3) { - return _exiDecodeStartElement(state, se, 4, 17, 175, 7); + return _exiDecodeStartElement(state, se, 4, 17, 174, 7); } else if (state->eventCode == 4) { - return _exiDecodeStartElement(state, se, 4, 19, 175, 8); + return _exiDecodeStartElement(state, se, 4, 19, 174, 8); } else if (state->eventCode == 5) { - return _exiDecodeStartElement(state, se, 4, 21, 175, 9); + return _exiDecodeStartElement(state, se, 4, 21, 174, 9); } else if (state->eventCode == 6) { - return _exiDecodeStartElement(state, se, 4, 23, 175, 10); + return _exiDecodeStartElement(state, se, 4, 23, 174, 10); } else if (state->eventCode == 7) { - return _exiDecodeStartElement(state, se, 4, 33, 175, 11); + return _exiDecodeStartElement(state, se, 4, 33, 174, 11); } else if (state->eventCode == 8) { - return _exiDecodeStartElement(state, se, 4, 35, 175, 12); + return _exiDecodeStartElement(state, se, 4, 35, 174, 12); } else if (state->eventCode == 9) { - return _exiDecodeStartElement(state, se, 4, 37, 175, 13); + return _exiDecodeStartElement(state, se, 4, 37, 174, 13); } else if (state->eventCode == 10) { - return _exiDecodeStartElement(state, se, 4, 39, 175, 14); + return _exiDecodeStartElement(state, se, 4, 39, 174, 14); } else if (state->eventCode == 11) { - return _exiDecodeStartElement(state, se, 4, 41, 175, 15); + return _exiDecodeStartElement(state, se, 4, 41, 174, 15); } else if (state->eventCode == 12) { - return _exiDecodeStartElement(state, se, 4, 43, 175, 16); + return _exiDecodeStartElement(state, se, 4, 43, 174, 16); } else if (state->eventCode == 13) { - return _exiDecodeStartElement(state, se, 4, 48, 175, 17); + return _exiDecodeStartElement(state, se, 4, 48, 174, 17); } else if (state->eventCode == 14) { - return _exiDecodeStartElement(state, se, 4, 50, 175, 18); + return _exiDecodeStartElement(state, se, 4, 50, 174, 18); } else if (state->eventCode == 15) { - return _exiDecodeStartElement(state, se, 4, 53, 175, 19); + return _exiDecodeStartElement(state, se, 4, 53, 174, 19); } else if (state->eventCode == 16) { - return _exiDecodeStartElement(state, se, 4, 55, 175, 20); + return _exiDecodeStartElement(state, se, 4, 55, 174, 20); } else if (state->eventCode == 17) { - return _exiDecodeStartElement(state, se, 4, 59, 175, 21); + return _exiDecodeStartElement(state, se, 4, 59, 174, 21); } else if (state->eventCode == 18) { - return _exiDecodeStartElement(state, se, 4, 61, 175, 22); + 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:MsgDef}Notification), END_ELEMENT] */ - if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 6, 6, 160, 161); - } - break; - case 159: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */ - return _exiDecodeStartElement(state, se, 5, 35, 162, 163); + return _exiDecodeStartElement(state, se, 5, 34, 161, 162); break; - case 161: + 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, 5, 13, 167, 168); + return _exiDecodeStartElement(state, se, 5, 13, 166, 167); } else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 14, 169, 170); + return _exiDecodeStartElement(state, se, 5, 14, 168, 169); } else if (state->eventCode == 2) { - return _exiDecodeStartElement(state, se, 5, 10, 171, 172); + return _exiDecodeStartElement(state, se, 5, 10, 170, 171); } break; - case 162: + 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, 33, 164, 163); + return _exiDecodeStartElement(state, se, 5, 32, 163, 162); } else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 25, 165, 166); + return _exiDecodeStartElement(state, se, 5, 24, 164, 165); } break; - case 164: + case 163: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 25, 165, 166); + return _exiDecodeStartElement(state, se, 5, 24, 164, 165); } break; - case 167: + case 166: /* 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, 5, 14, 169, 170); + return _exiDecodeStartElement(state, se, 5, 14, 168, 169); } else if (state->eventCode == 1) { - return _exiDecodeStartElement(state, se, 5, 10, 171, 172); + return _exiDecodeStartElement(state, se, 5, 10, 170, 171); } break; - case 169: + case 168: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ if (state->eventCode == 0) { - return _exiDecodeStartElement(state, se, 5, 10, 171, 172); + return _exiDecodeStartElement(state, se, 5, 10, 170, 171); } break; - case 172: + case 171: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Event)] */ - return _exiDecodeStartElement(state, se, 5, 9, 173, 174); + return _exiDecodeStartElement(state, se, 5, 9, 172, 173); break; default: @@ -1386,7 +1341,7 @@ int exiDecodeCharacters(bitstream_t* stream, exi_state_t* state, exi_value_t* val) { uint8_t xsi; switch (state->grammarStack[state->stackIndex]) { - case 64: + case 62: /* CHARACTERS[ENUMERATION] */ val->type = ENUMERATION; decodeNBitUnsignedInteger(stream, 4, &val->enumeration); @@ -1412,72 +1367,65 @@ int exiDecodeCharacters(bitstream_t* stream, exi_state_t* state, /* CHARACTERS[STRING] */ case 55: /* CHARACTERS[STRING] */ - case 81: + case 79: /* CHARACTERS[STRING] */ - case 108: + case 106: /* CHARACTERS[STRING] */ - case 112: + case 110: /* CHARACTERS[STRING] */ - case 117: + case 115: /* CHARACTERS[STRING] */ - case 129: + case 127: /* CHARACTERS[STRING] */ - case 139: + case 137: /* CHARACTERS[STRING] */ - case 166: + 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 70: /* CHARACTERS[ENUMERATION] */ - case 72: - /* CHARACTERS[ENUMERATION] */ - case 102: + case 100: /* CHARACTERS[ENUMERATION] */ val->type = ENUMERATION; decodeNBitUnsignedInteger(stream, 1, &val->enumeration); /* move on */ state->grammarStack[state->stackIndex] = 31; return 0; - case 45: - /* CHARACTERS[INTEGER_64] */ - val->type = INTEGER_64; - decodeInteger64(stream, &val->int64); - /* move on */ - state->grammarStack[state->stackIndex] = 31; - return 0; case 33: /* CHARACTERS[ENUMERATION] */ - case 83: + case 81: /* CHARACTERS[ENUMERATION] */ - case 127: + case 125: /* CHARACTERS[ENUMERATION] */ - case 145: + case 144: /* CHARACTERS[ENUMERATION] */ - case 168: + case 167: /* CHARACTERS[ENUMERATION] */ val->type = ENUMERATION; decodeNBitUnsignedInteger(stream, 2, &val->enumeration); /* move on */ state->grammarStack[state->stackIndex] = 31; return 0; - case 57: + case 72: /* CHARACTERS[BINARY_HEX] */ - case 74: + case 135: /* CHARACTERS[BINARY_HEX] */ - case 137: + case 142: /* CHARACTERS[BINARY_HEX] */ - case 163: + case 162: /* CHARACTERS[BINARY_HEX] */ val->type = BINARY_HEX; decodeBinary(stream, &val->binary); /* move on */ state->grammarStack[state->stackIndex] = 31; return 0; - case 170: + case 169: /* CHARACTERS[STRING] */ /* xsi:type OR xsi:nil */ decodeNBitUnsignedInteger(stream, 1, &xsi); @@ -1486,47 +1434,54 @@ int exiDecodeCharacters(bitstream_t* stream, exi_state_t* state, /* 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 92: + case 90: /* CHARACTERS[ENUMERATION] */ - case 131: + case 129: /* CHARACTERS[ENUMERATION] */ - case 150: + case 149: /* CHARACTERS[ENUMERATION] */ - case 174: + case 173: /* CHARACTERS[ENUMERATION] */ val->type = ENUMERATION; decodeNBitUnsignedInteger(stream, 3, &val->enumeration); /* move on */ state->grammarStack[state->stackIndex] = 31; return 0; - case 68: - /* CHARACTERS[INTEGER_64] */ - /* xsi:type OR xsi:nil */ - decodeNBitUnsignedInteger(stream, 1, &xsi); - val->type = INTEGER_64; - decodeInteger64(stream, &val->int64); - /* move on */ - state->grammarStack[state->stackIndex] = 31; - return 0; - case 61: + case 59: /* CHARACTERS[INTEGER_16] */ - case 98: + case 96: /* CHARACTERS[INTEGER_16] */ val->type = INTEGER_16; decodeInteger32(stream, &val->int32); /* move on */ state->grammarStack[state->stackIndex] = 31; return 0; - case 66: + 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 123: + case 121: /* CHARACTERS[UNSIGNED_INTEGER_32] */ val->type = UNSIGNED_INTEGER_32; decodeUnsignedInteger32(stream, &val->uint32); diff --git a/src/codec/EXIDecoder.h b/src/codec/EXIDecoder.h index c745331..f0c1e53 100644 --- a/src/codec/EXIDecoder.h +++ b/src/codec/EXIDecoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIEncoder.c b/src/codec/EXIEncoder.c index e488844..a88d1f6 100644 --- a/src/codec/EXIEncoder.c +++ b/src/codec/EXIEncoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * *NOTE: Code generated by EXIdizer v0.1
@@ -192,113 +192,113 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state, /* 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); + return _exiEncodeStartElement(stream, 0, 0, state, se, 67, 68); } break; case 10: /* 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, 71, 72); + return _exiEncodeStartElement(stream, 0, 0, state, se, 69, 70); } break; case 11: /* 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, 80, 81); + return _exiEncodeStartElement(stream, 0, 0, state, se, 78, 79); } break; case 12: /* 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, 82, 83); + return _exiEncodeStartElement(stream, 0, 0, state, se, 80, 81); } break; case 13: /* 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, 84, 25); + return _exiEncodeStartElement(stream, 0, 0, state, se, 82, 25); } break; case 14: /* 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, 91, 92); + 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, 93, 25); + return _exiEncodeStartElement(stream, 0, 0, state, se, 91, 25); } break; case 16: /* 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, 101, 102); + return _exiEncodeStartElement(stream, 0, 0, state, se, 99, 100); } break; case 17: /* 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, 126, 127); + 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, 128, 129); + return _exiEncodeStartElement(stream, 2, 1, state, se, 126, 127); } break; case 18: /* 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, 130, 131); + return _exiEncodeStartElement(stream, 0, 0, state, se, 128, 129); } break; case 19: /* 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, 142, 133); + return _exiEncodeStartElement(stream, 0, 0, state, se, 140, 131); } break; case 20: /* 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, 144, 145); + return _exiEncodeStartElement(stream, 0, 0, state, se, 143, 144); } break; case 21: /* 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, 147, 47); + 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, 148, 25); + return _exiEncodeStartElement(stream, 1, 1, state, se, 147, 25); } break; case 22: /* 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, 149, 150); + return _exiEncodeStartElement(stream, 0, 0, state, se, 148, 149); } break; case 23: /* 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, 154, 155); + return _exiEncodeStartElement(stream, 0, 0, state, se, 153, 154); } break; case 24: @@ -352,21 +352,21 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state, break; case 39: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ - if ( se->localPart == 24 && se->namespaceURI == 5 ) { + 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 40: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ - if ( se->localPart == 26 && se->namespaceURI == 5 ) { + 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 == 37 && se->namespaceURI == 5 ) { + 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); } @@ -404,628 +404,605 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state, } break; case 53: - /* 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] */ + /* 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}MeterPubKey) */ + /* 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}MeterReading) */ + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */ return _exiEncodeStartElement(stream, 3, 2, state, se, 58, 59); } - else if ( se->localPart == 20 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */ - return _exiEncodeStartElement(stream, 3, 3, state, se, 60, 61); - } - else if ( se->localPart == 38 && se->namespaceURI == 5 ) { + else if ( se->localPart == 37 && se->namespaceURI == 5 ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */ - return _exiEncodeStartElement(stream, 3, 4, state, se, 62, 45); + return _exiEncodeStartElement(stream, 3, 3, state, se, 60, 45); } break; case 54: - /* 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] */ + /* 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}MeterPubKey) */ - return _exiEncodeStartElement(stream, 3, 0, state, se, 56, 57); + /* 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}MeterReading) */ - return _exiEncodeStartElement(stream, 3, 1, state, se, 58, 59); - } - else if ( se->localPart == 20 && se->namespaceURI == 5 ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */ - return _exiEncodeStartElement(stream, 3, 2, state, se, 60, 61); + return _exiEncodeStartElement(stream, 2, 1, state, se, 58, 59); } - else if ( se->localPart == 38 && se->namespaceURI == 5 ) { + else if ( se->localPart == 37 && se->namespaceURI == 5 ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */ - return _exiEncodeStartElement(stream, 3, 3, state, se, 62, 45); + return _exiEncodeStartElement(stream, 2, 2, state, se, 60, 45); } break; case 56: - /* 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] */ + /* 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}MeterReading) */ + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */ return _exiEncodeStartElement(stream, 2, 0, state, se, 58, 59); } - else if ( se->localPart == 20 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 60, 61); - } - else if ( se->localPart == 38 && se->namespaceURI == 5 ) { + else if ( se->localPart == 37 && se->namespaceURI == 5 ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */ - return _exiEncodeStartElement(stream, 2, 2, state, se, 62, 45); + return _exiEncodeStartElement(stream, 2, 1, state, se, 60, 45); + } + break; + case 57: + /* 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:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( se->localPart == 20 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 60, 61); - } - else if ( se->localPart == 38 && se->namespaceURI == 5 ) { + /* 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, 2, 1, state, se, 62, 45); + return _exiEncodeStartElement(stream, 1, 0, state, se, 60, 45); } break; - case 59: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ - if ( se->localPart == 21 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier) */ + 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 60: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( se->localPart == 38 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 62, 45); - } - break; case 63: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit)] */ + /* 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}Unit) */ + /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value) */ return _exiEncodeStartElement(stream, 0, 0, state, se, 65, 66); } break; - case 65: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ - if ( se->localPart == 51 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 67, 68); - } - break; - case 71: + case 69: /* 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, 73, 74); + return _exiEncodeStartElement(stream, 0, 0, state, se, 71, 72); + } + break; + case 71: + /* 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: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, 75, 35); - } - break; - case 75: /* 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, 76, 45); + return _exiEncodeStartElement(stream, 0, 0, state, se, 74, 45); } break; - case 76: + 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, 77, 59); + return _exiEncodeStartElement(stream, 0, 0, state, se, 75, 57); } break; - case 77: + case 75: /* 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:MsgBody}PCurrent) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 78, 59); + 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, 79, 53); + return _exiEncodeStartElement(stream, 2, 1, state, se, 77, 53); } break; - case 78: + 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, 79, 53); + return _exiEncodeStartElement(stream, 1, 0, state, se, 77, 53); } break; - case 84: + 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, 85, 41); + return _exiEncodeStartElement(stream, 0, 0, state, se, 83, 41); } break; - case 85: + case 83: /* 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, 86, 51); + 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, 87, 88); + return _exiEncodeStartElement(stream, 2, 1, state, se, 85, 86); } break; - case 86: + case 84: /* 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, 87, 88); + return _exiEncodeStartElement(stream, 1, 0, state, se, 85, 86); } break; - case 88: + case 86: /* 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, 89, 45); + return _exiEncodeStartElement(stream, 0, 0, state, se, 87, 45); } break; - case 89: + case 87: /* 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, 90, 59); + return _exiEncodeStartElement(stream, 0, 0, state, se, 88, 57); } break; - case 93: + 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, 94, 45); + return _exiEncodeStartElement(stream, 0, 0, state, se, 92, 45); } break; - case 94: + case 92: /* 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, 95, 59); + return _exiEncodeStartElement(stream, 0, 0, state, se, 93, 57); } break; - case 95: + case 93: /* 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, 96, 59); + return _exiEncodeStartElement(stream, 0, 0, state, se, 94, 57); } break; - case 96: + 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, 97, 98); + return _exiEncodeStartElement(stream, 0, 0, state, se, 95, 96); } break; - case 97: + case 95: /* 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, 99, 59); + return _exiEncodeStartElement(stream, 0, 0, state, se, 97, 57); } break; - case 99: + case 97: /* 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, 100, 59); + return _exiEncodeStartElement(stream, 0, 0, state, se, 98, 57); } break; - case 101: + case 99: /* 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, 103, 35); + return _exiEncodeStartElement(stream, 0, 0, state, se, 101, 35); } break; - case 103: + 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, 104, 59); + return _exiEncodeStartElement(stream, 0, 0, state, se, 102, 57); } break; - case 104: + case 102: /* 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, 105, 59); + return _exiEncodeStartElement(stream, 0, 0, state, se, 103, 57); } break; - case 105: + 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, 106, 98); + return _exiEncodeStartElement(stream, 0, 0, state, se, 104, 96); } break; - case 106: + case 104: /* 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, 107, 108); + 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, 109, 110); + return _exiEncodeStartElement(stream, 2, 1, state, se, 107, 108); } break; - case 107: + 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, 109, 110); + return _exiEncodeStartElement(stream, 1, 0, state, se, 107, 108); } break; - case 110: + case 108: /* 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: + /* 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:MsgDataTypes}Tariff)] */ - if ( se->localPart == 39 && se->namespaceURI == 5 ) { + /* 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, 0, 0, state, se, 113, 114); + return _exiEncodeStartElement(stream, 1, 0, state, se, 111, 112); + } + break; + case 112: + /* 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:MsgDataTypes}Tariff), END_ELEMENT] */ - if ( se->localPart == 39 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 113, 114); + /* 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: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */ - if ( se->localPart == 46 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 115, 51); - } - break; - case 115: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ - if ( se->localPart == 41 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffDescription) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 116, 117); - } - else if ( se->localPart == 42 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries) */ - return _exiEncodeStartElement(stream, 1, 1, state, se, 118, 119); - } - break; - case 116: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */ - if ( se->localPart == 42 && se->namespaceURI == 5 ) { + 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: + /* 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 119: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */ - if ( se->localPart == 44 && se->namespaceURI == 5 ) { + 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: + /* 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 120: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ - if ( se->localPart == 44 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 120, 121); - } - break; - case 121: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */ - if ( se->localPart == 48 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 122, 123); + /* 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:MsgDataTypes}TariffPMax)] */ - if ( se->localPart == 47 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffPMax) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 124, 59); - } - break; - case 124: /* 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, 125, 59); + return _exiEncodeStartElement(stream, 1, 0, state, se, 123, 57); } break; - case 126: + case 124: /* 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, 128, 129); + return _exiEncodeStartElement(stream, 1, 0, state, se, 126, 127); } break; - case 130: + case 128: /* 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: + /* 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: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ - if ( se->localPart == 27 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service) */ + /* 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}Service), END_ELEMENT] */ - if ( se->localPart == 27 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 134, 135); + /* 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); } - break; - case 135: - /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ - if ( se->localPart == 29 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID) */ - return _exiEncodeStartElement(stream, 0, 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: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 == 31 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 138, 139); - } - else if ( se->localPart == 34 && se->namespaceURI == 5 ) { + /* 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, 1, state, se, 140, 127); + return _exiEncodeStartElement(stream, 2, 0, state, se, 138, 125); } - else if ( se->localPart == 32 && se->namespaceURI == 5 ) { + else if ( se->localPart == 31 && se->namespaceURI == 5 ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */ - return _exiEncodeStartElement(stream, 2, 2, state, se, 141, 129); + return _exiEncodeStartElement(stream, 2, 1, state, se, 139, 127); } break; case 138: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if ( se->localPart == 34 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 140, 127); - } - else if ( se->localPart == 32 && se->namespaceURI == 5 ) { + /* 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, 2, 1, state, se, 141, 129); + return _exiEncodeStartElement(stream, 1, 0, state, se, 139, 127); } break; case 140: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if ( se->localPart == 32 && se->namespaceURI == 5 ) { - /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 141, 129); - } - break; - case 142: /* 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, 143, 57); + return _exiEncodeStartElement(stream, 0, 0, state, se, 141, 142); } break; - case 144: + case 143: /* 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, 146, 57); + return _exiEncodeStartElement(stream, 1, 0, state, se, 145, 142); } break; - case 147: + case 146: /* 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, 148, 25); + return _exiEncodeStartElement(stream, 0, 0, state, se, 147, 25); } break; - case 149: + 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, 151, 74); + return _exiEncodeStartElement(stream, 0, 0, state, se, 150, 72); } break; - case 151: + 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, 152, 35); + return _exiEncodeStartElement(stream, 0, 0, state, se, 151, 35); } break; - case 152: + case 151: /* 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, 153, 45); + return _exiEncodeStartElement(stream, 0, 0, state, se, 152, 45); } break; - case 154: + case 153: /* 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, 156, 157); + return _exiEncodeStartElement(stream, 0, 0, state, se, 155, 156); } break; - case 155: + 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, 158, 159); + return _exiEncodeStartElement(stream, 0, 0, state, se, 157, 158); } break; - case 157: + 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] */ if ( se->localPart == 2 && se->namespaceURI == 6 ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement) */ - return _exiEncodeStartElement(stream, 5, 0, state, se, 175, 3); + 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, 175, 5); + 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, 175, 6); + 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, 175, 7); + 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, 175, 8); + 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, 175, 9); + 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, 175, 10); + 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, 175, 11); + 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, 175, 12); + 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, 175, 13); + 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, 175, 14); + 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, 175, 15); + 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, 175, 16); + 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, 175, 17); + 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, 175, 18); + 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, 175, 19); + 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, 175, 20); + 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, 175, 21); + 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, 175, 22); + return _exiEncodeStartElement(stream, 5, 18, state, se, 174, 22); } break; - case 158: + case 157: /* 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, 160, 161); + return _exiEncodeStartElement(stream, 1, 0, state, se, 159, 160); } break; - case 159: + case 158: /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */ - if ( se->localPart == 35 && se->namespaceURI == 5 ) { + if ( se->localPart == 34 && se->namespaceURI == 5 ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID) */ - return _exiEncodeStartElement(stream, 0, 0, state, se, 162, 163); + return _exiEncodeStartElement(stream, 0, 0, state, se, 161, 162); } break; - case 161: + 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, 167, 168); + 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, 169, 170); + 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, 171, 172); + return _exiEncodeStartElement(stream, 2, 2, state, se, 170, 171); } break; - case 162: + 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 == 33 && se->namespaceURI == 5 ) { + if ( se->localPart == 32 && se->namespaceURI == 5 ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID) */ - return _exiEncodeStartElement(stream, 2, 0, state, se, 164, 163); + return _exiEncodeStartElement(stream, 2, 0, state, se, 163, 162); } - else if ( se->localPart == 25 && se->namespaceURI == 5 ) { + else if ( se->localPart == 24 && se->namespaceURI == 5 ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion) */ - return _exiEncodeStartElement(stream, 2, 1, state, se, 165, 166); + return _exiEncodeStartElement(stream, 2, 1, state, se, 164, 165); } break; - case 164: + case 163: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - if ( se->localPart == 25 && se->namespaceURI == 5 ) { + if ( se->localPart == 24 && se->namespaceURI == 5 ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion) */ - return _exiEncodeStartElement(stream, 1, 0, state, se, 165, 166); + return _exiEncodeStartElement(stream, 1, 0, state, se, 164, 165); } break; - case 167: + case 166: /* 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, 169, 170); + 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, 171, 172); + return _exiEncodeStartElement(stream, 2, 1, state, se, 170, 171); } break; - case 169: + case 168: /* 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, 171, 172); + return _exiEncodeStartElement(stream, 1, 0, state, se, 170, 171); } break; - case 172: + case 171: /* 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, 173, 174); + return _exiEncodeStartElement(stream, 0, 0, state, se, 172, 173); } break; @@ -1039,69 +1016,69 @@ 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 54: - /* 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] */ + 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 56: + 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 136: + 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 161: + 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 157: + 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 60: + case 58: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - case 78: + case 76: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ - case 86: + case 84: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ - case 107: + case 105: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */ - case 113: + case 111: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */ - case 120: + case 118: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */ - case 124: + case 122: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */ - case 126: + case 124: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */ - case 130: + case 128: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ - case 134: + case 132: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ - case 140: + case 138: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 144: + case 143: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */ - case 158: + case 157: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */ - case 164: + case 163: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - case 169: + case 168: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */ encodeNBitUnsignedInteger(stream, 1, 1); break; - case 58: + case 56: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - case 77: + case 75: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */ - case 85: + case 83: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */ - case 106: + 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 138: + case 136: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ - case 162: + case 161: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */ - case 167: + 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; @@ -1119,66 +1096,62 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state, /* Element[END_ELEMENT] */ case 52: /* Element[END_ELEMENT] */ - case 62: + case 60: + /* Element[END_ELEMENT] */ + case 65: /* Element[END_ELEMENT] */ case 67: /* Element[END_ELEMENT] */ - case 69: - /* Element[END_ELEMENT] */ case 9: /* FirstStartTagStartTag[END_ELEMENT] */ - case 79: + case 77: + /* Element[END_ELEMENT] */ + case 78: /* Element[END_ELEMENT] */ case 80: /* Element[END_ELEMENT] */ - case 82: + case 85: /* Element[END_ELEMENT] */ - case 87: + case 88: /* Element[END_ELEMENT] */ - case 90: + case 89: /* Element[END_ELEMENT] */ - case 91: + case 98: /* Element[END_ELEMENT] */ - case 100: + case 107: /* Element[END_ELEMENT] */ - case 109: + case 116: /* Element[END_ELEMENT] */ - case 118: + case 123: /* Element[END_ELEMENT] */ - case 125: + case 126: /* Element[END_ELEMENT] */ - case 128: + case 130: /* Element[END_ELEMENT] */ - case 132: + case 139: /* Element[END_ELEMENT] */ case 141: /* Element[END_ELEMENT] */ - case 143: + case 145: /* Element[END_ELEMENT] */ - case 146: + case 147: /* Element[END_ELEMENT] */ - case 148: + case 152: /* Element[END_ELEMENT] */ - case 153: + case 155: /* Element[END_ELEMENT] */ - case 156: + case 159: /* Element[END_ELEMENT] */ - case 160: + case 164: /* Element[END_ELEMENT] */ - case 165: + case 170: /* Element[END_ELEMENT] */ - case 171: + case 172: /* Element[END_ELEMENT] */ - case 173: - /* Element[END_ELEMENT] */ - case 175: + case 174: /* Element[END_ELEMENT] */ /* no event code to write */ break; - case 53: - /* 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; default: return -1; @@ -1205,10 +1178,10 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, } break; case 51: - case 92: - case 131: - case 150: - case 174: + case 90: + case 129: + case 149: + case 173: if (val->type == ENUMERATION) { /* CHARACTERS[ENUMERATION] */ encodeNBitUnsignedInteger(stream, 3, val->enumeration); @@ -1217,9 +1190,9 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, return 0; } break; + case 68: case 70: - case 72: - case 102: + case 100: if (val->type == ENUMERATION) { /* CHARACTERS[ENUMERATION] */ encodeNBitUnsignedInteger(stream, 1, val->enumeration); @@ -1229,10 +1202,10 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, } break; case 33: - case 83: - case 127: - case 145: - case 168: + case 81: + case 125: + case 144: + case 167: if (val->type == ENUMERATION) { /* CHARACTERS[ENUMERATION] */ encodeNBitUnsignedInteger(stream, 2, val->enumeration); @@ -1241,7 +1214,7 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, return 0; } break; - case 170: + case 169: if (val->type == STRING) { /* CHARACTERS[STRING] */ /* xsi:type OR xsi:nil */ @@ -1252,7 +1225,7 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, return 0; } break; - case 64: + case 62: if (val->type == ENUMERATION) { /* CHARACTERS[ENUMERATION] */ encodeNBitUnsignedInteger(stream, 4, val->enumeration); @@ -1261,7 +1234,7 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, return 0; } break; - case 123: + case 121: if (val->type == UNSIGNED_INTEGER_32) { /* CHARACTERS[UNSIGNED_INTEGER_32] */ encodeUnsignedInteger32(stream, val->uint32); @@ -1272,13 +1245,13 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, break; case 47: case 55: - case 81: - case 108: - case 112: - case 117: - case 129: - case 139: - case 166: + case 79: + case 106: + case 110: + case 115: + case 127: + case 137: + case 165: if (val->type == STRING) { /* CHARACTERS[STRING] */ encodeStringValue(stream, &val->string); @@ -1287,16 +1260,7 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, return 0; } break; - case 45: - if (val->type == INTEGER_64) { - /* CHARACTERS[INTEGER_64] */ - encodeInteger64(stream, val->int64); - /* move on */ - state->grammarStack[state->stackIndex] = 31; - return 0; - } - break; - case 66: + case 64: if (val->type == ENUMERATION) { /* CHARACTERS[ENUMERATION] */ encodeNBitUnsignedInteger(stream, 5, val->enumeration); @@ -1305,31 +1269,28 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, return 0; } break; - case 57: - case 74: - case 137: - case 163: - if (val->type == BINARY_HEX) { - /* CHARACTERS[BINARY_HEX] */ - encodeBinary(stream, &val->binary); - /* move on */ - state->grammarStack[state->stackIndex] = 31; - return 0; - } - break; - case 68: - if (val->type == INTEGER_64) { - /* CHARACTERS[INTEGER_64] */ + case 66: + if (val->type == INTEGER_32) { + /* CHARACTERS[INTEGER_32] */ /* xsi:type OR xsi:nil */ encodeNBitUnsignedInteger(stream, 1, 0); - encodeInteger64(stream, val->int64); + encodeInteger32(stream, val->int32); /* move on */ state->grammarStack[state->stackIndex] = 31; return 0; } break; - case 61: - case 98: + case 45: + if (val->type == INTEGER_32) { + /* CHARACTERS[INTEGER_32] */ + encodeInteger32(stream, val->int32); + /* move on */ + state->grammarStack[state->stackIndex] = 31; + return 0; + } + break; + case 59: + case 96: if (val->type == INTEGER_16) { /* CHARACTERS[INTEGER_16] */ encodeInteger32(stream, val->int32); @@ -1338,6 +1299,18 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state, return 0; } break; + 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] = 31; + return 0; + } + break; default: return -1; diff --git a/src/codec/EXIEncoder.h b/src/codec/EXIEncoder.h index 221a608..2a1dbae 100644 --- a/src/codec/EXIEncoder.h +++ b/src/codec/EXIEncoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIHeaderDecoder.c b/src/codec/EXIHeaderDecoder.c index f36e502..f398324 100644 --- a/src/codec/EXIHeaderDecoder.c +++ b/src/codec/EXIHeaderDecoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIHeaderDecoder.h b/src/codec/EXIHeaderDecoder.h index 76c3121..20d20ae 100644 --- a/src/codec/EXIHeaderDecoder.h +++ b/src/codec/EXIHeaderDecoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIHeaderEncoder.c b/src/codec/EXIHeaderEncoder.c index 3fa9bcd..1e9aaea 100644 --- a/src/codec/EXIHeaderEncoder.c +++ b/src/codec/EXIHeaderEncoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXIHeaderEncoder.h b/src/codec/EXIHeaderEncoder.h index e4860df..8538ab1 100644 --- a/src/codec/EXIHeaderEncoder.h +++ b/src/codec/EXIHeaderEncoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/EXITypes.h b/src/codec/EXITypes.h index 5799cfa..6c699f6 100644 --- a/src/codec/EXITypes.h +++ b/src/codec/EXITypes.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/StringTable.c b/src/codec/StringTable.c index dac1c03..d02a019 100644 --- a/src/codec/StringTable.c +++ b/src/codec/StringTable.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/StringTable.h b/src/codec/StringTable.h index 154e35a..9a91bc4 100644 --- a/src/codec/StringTable.h +++ b/src/codec/StringTable.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/StringTableEntries.c b/src/codec/StringTableEntries.c index 79c1d1f..14ef4bb 100644 --- a/src/codec/StringTableEntries.c +++ b/src/codec/StringTableEntries.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -79,22 +79,22 @@ const char * localNames5[] = { "ChargerStandby", "ChargingProfileEntryMaxPower", "ChargingProfileEntryStart", "ChargingProfileType", "ConnectorLocked", "Currency", "EPrice", "EVSEStandby", "EVSEStatusType", "Event", "EventList", "EventListType", "FatalError", "FaultCode", "FaultMsg", - "FloatingValueType", "MeterID", "MeterInfoType", "MeterPubKey", "MeterReading", - "MeterStatus", "Multiplier", "NotificationType", "PEVStatusType", "PowerSwitchClosed", - "ProtocolVersion", "RCD", "Service", "ServiceDescriptionType", "ServiceID", - "ServiceListType", "ServiceName", "ServiceScope", "ServiceSessionID", "ServiceType", - "SessionID", "SessionInformationType", "ShutDownTime", "TMeter", "Tariff", - "TariffDescrType", "TariffDescription", "TariffEntries", "TariffEntriesType", "TariffEntry", - "TariffEntryType", "TariffID", "TariffPMax", "TariffStart", "TariffTableType", - "Unit", "Value", "contractIDType", "currencyType", "energyProviderType", - "eventEntryType", "evseIDType", "fatalErrorType", "faultCodeType", "lockStatusType", - "maxPhasesType", "meterIDType", "meterStatusType", "paymentOptionListType", "paymentOptionType", - "pevIDType", "protocolVersionType", "pubKeyType", "rcdType", "responseCode_LineLockType", - "responseCode_MeteringReceiptType", "responseCode_MeteringStatusType", "responseCode_PaymentDetailsType", "responseCode_PowerDeliveryType", "responseCode_PowerDiscoveryType", - "responseCode_ServiceDiscoveryType", "responseCode_ServicePaymentSelectionType", "responseCode_SessionSetupType", "serviceDetailsType", "serviceIDType", - "serviceNameType", "serviceScopeType", "serviceTypeType", "sessionIDType", "standbyType", - "switchStatusType", "tariffDescriptionType", "tariffIDType", "tariffStartType", "timeType", - "unitMultiplierType", "unitSymbolType" + "FloatingValueType", "MeterID", "MeterInfoType", "MeterReading", "MeterStatus", + "Multiplier", "NotificationType", "PEVStatusType", "PowerSwitchClosed", "ProtocolVersion", + "RCD", "Service", "ServiceDescriptionType", "ServiceID", "ServiceListType", + "ServiceName", "ServiceScope", "ServiceSessionID", "ServiceType", "SessionID", + "SessionInformationType", "ShutDownTime", "TMeter", "Tariff", "TariffDescrType", + "TariffDescription", "TariffEntries", "TariffEntriesType", "TariffEntry", "TariffEntryType", + "TariffID", "TariffPMax", "TariffStart", "TariffTableType", "Unit", + "Value", "contractIDType", "currencyType", "energyProviderType", "eventEntryType", + "evseIDType", "fatalErrorType", "faultCodeType", "lockStatusType", "maxPhasesType", + "meterIDType", "meterStatusType", "paymentOptionListType", "paymentOptionType", "pevIDType", + "protocolVersionType", "pubKeyType", "rcdType", "responseCode_LineLockType", "responseCode_MeteringReceiptType", + "responseCode_MeteringStatusType", "responseCode_PaymentDetailsType", "responseCode_PowerDeliveryType", "responseCode_PowerDiscoveryType", "responseCode_ServiceDiscoveryType", + "responseCode_ServicePaymentSelectionType", "responseCode_SessionSetupType", "serviceDetailsType", "serviceIDType", "serviceNameType", + "serviceScopeType", "serviceTypeType", "sessionIDType", "standbyType", "switchStatusType", + "tariffDescriptionType", "tariffIDType", "tariffStartType", "timeType", "unitMultiplierType", + "unitSymbolType" }; /* localName entries for URI id = 6 */ const char * localNames6[] = { @@ -107,7 +107,7 @@ struct exiPartition localNamePartitions[7] = { { 2, localNames2 }, { 46, localNames3 }, { 66, localNames4 }, - { 92, localNames5 }, + { 91, localNames5 }, { 9, localNames6 } }; const char * uris[] = { diff --git a/src/codec/StringTableEntries.h b/src/codec/StringTableEntries.h index 7d02d3a..d162a9b 100644 --- a/src/codec/StringTableEntries.h +++ b/src/codec/StringTableEntries.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/UCSString.c b/src/codec/UCSString.c index 1d42682..a71b630 100644 --- a/src/codec/UCSString.c +++ b/src/codec/UCSString.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/codec/UCSString.h b/src/codec/UCSString.h index 0292266..7055d7f 100644 --- a/src/codec/UCSString.h +++ b/src/codec/UCSString.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/service/v2g_service.h b/src/service/v2g_service.h index 304087a..5043d55 100644 --- a/src/service/v2g_service.h +++ b/src/service/v2g_service.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -58,9 +58,19 @@ struct v2gService /* 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_ */ diff --git a/src/service/v2g_serviceClientDataTransmitter.h b/src/service/v2g_serviceClientDataTransmitter.h index 3210656..abb6fd6 100644 --- a/src/service/v2g_serviceClientDataTransmitter.h +++ b/src/service/v2g_serviceClientDataTransmitter.h @@ -19,7 +19,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/service/v2g_serviceClientStubs.c b/src/service/v2g_serviceClientStubs.c index 4e60eeb..0c6c25a 100644 --- a/src/service/v2g_serviceClientStubs.c +++ b/src/service/v2g_serviceClientStubs.c @@ -20,7 +20,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -46,7 +46,7 @@ int call_sessionSetup(struct v2gService* service, struct HeaderType* header, str service->idPath.pos=0; /* init outStream data structure */ - posEncode = 0; + posEncode = service->transportHeaderOffset; service->outStream.pos = &posEncode; service->outStream.buffer = 0; service->outStream.capacity = 8; @@ -55,7 +55,7 @@ int call_sessionSetup(struct v2gService* service, struct HeaderType* header, str exiInitEncoder(&(service->outStream), &(service->stateEncode)); /* init inStream data structure */ - posDecode = 0; + posDecode = service->transportHeaderOffset; service->inStream.pos = &posDecode; service->inStream.buffer=0; service->inStream.capacity=0; @@ -71,14 +71,15 @@ int call_sessionSetup(struct v2gService* service, struct HeaderType* header, str service->v2gMsg.Body.isused.SessionSetupReq=1; /* encode data to exi stream*/ - if(serialize_message(service)<0) + if(serialize_message(service)) { return -1; } /* send data to server and wait for the response message */ - if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0) + service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); + if(service->errorCode) { return -1; } @@ -109,7 +110,7 @@ int call_serviceDiscovery(struct v2gService* service, struct HeaderType* header, service->idPath.pos=0; /* init outStream data structure */ - posEncode = 0; + posEncode = service->transportHeaderOffset; service->outStream.pos = &posEncode; service->outStream.buffer = 0; service->outStream.capacity = 8; @@ -118,7 +119,7 @@ int call_serviceDiscovery(struct v2gService* service, struct HeaderType* header, exiInitEncoder(&(service->outStream), &(service->stateEncode)); /* init inStream data structure */ - posDecode = 0; + posDecode = service->transportHeaderOffset; service->inStream.pos = &posDecode; service->inStream.buffer=0; service->inStream.capacity=0; @@ -134,14 +135,15 @@ int call_serviceDiscovery(struct v2gService* service, struct HeaderType* header, service->v2gMsg.Body.isused.ServiceDiscoveryReq=1; /* encode data to exi stream*/ - if(serialize_message(service)<0) + if(serialize_message(service)) { return -1; } /* send data to server and wait for the response message */ - if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0) + service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); + if(service->errorCode) { return -1; } @@ -172,7 +174,7 @@ int call_selectedServicePayment(struct v2gService* service, struct HeaderType* h service->idPath.pos=0; /* init outStream data structure */ - posEncode = 0; + posEncode = service->transportHeaderOffset; service->outStream.pos = &posEncode; service->outStream.buffer = 0; service->outStream.capacity = 8; @@ -181,7 +183,7 @@ int call_selectedServicePayment(struct v2gService* service, struct HeaderType* h exiInitEncoder(&(service->outStream), &(service->stateEncode)); /* init inStream data structure */ - posDecode = 0; + posDecode = service->transportHeaderOffset; service->inStream.pos = &posDecode; service->inStream.buffer=0; service->inStream.capacity=0; @@ -197,14 +199,15 @@ int call_selectedServicePayment(struct v2gService* service, struct HeaderType* h service->v2gMsg.Body.isused.ServicePaymentSelectionReq=1; /* encode data to exi stream*/ - if(serialize_message(service)<0) + if(serialize_message(service)) { return -1; } /* send data to server and wait for the response message */ - if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0) + service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); + if(service->errorCode) { return -1; } @@ -235,7 +238,7 @@ int call_paymentDetails(struct v2gService* service, struct HeaderType* header, s service->idPath.pos=0; /* init outStream data structure */ - posEncode = 0; + posEncode = service->transportHeaderOffset; service->outStream.pos = &posEncode; service->outStream.buffer = 0; service->outStream.capacity = 8; @@ -244,7 +247,7 @@ int call_paymentDetails(struct v2gService* service, struct HeaderType* header, s exiInitEncoder(&(service->outStream), &(service->stateEncode)); /* init inStream data structure */ - posDecode = 0; + posDecode = service->transportHeaderOffset; service->inStream.pos = &posDecode; service->inStream.buffer=0; service->inStream.capacity=0; @@ -260,14 +263,15 @@ int call_paymentDetails(struct v2gService* service, struct HeaderType* header, s service->v2gMsg.Body.isused.PaymentDetailsReq=1; /* encode data to exi stream*/ - if(serialize_message(service)<0) + if(serialize_message(service)) { return -1; } /* send data to server and wait for the response message */ - if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0) + service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); + if(service->errorCode) { return -1; } @@ -298,7 +302,7 @@ int call_powerDiscovery(struct v2gService* service, struct HeaderType* header, s service->idPath.pos=0; /* init outStream data structure */ - posEncode = 0; + posEncode = service->transportHeaderOffset; service->outStream.pos = &posEncode; service->outStream.buffer = 0; service->outStream.capacity = 8; @@ -307,7 +311,7 @@ int call_powerDiscovery(struct v2gService* service, struct HeaderType* header, s exiInitEncoder(&(service->outStream), &(service->stateEncode)); /* init inStream data structure */ - posDecode = 0; + posDecode = service->transportHeaderOffset; service->inStream.pos = &posDecode; service->inStream.buffer=0; service->inStream.capacity=0; @@ -323,14 +327,15 @@ int call_powerDiscovery(struct v2gService* service, struct HeaderType* header, s service->v2gMsg.Body.isused.PowerDiscoveryReq=1; /* encode data to exi stream*/ - if(serialize_message(service)<0) + if(serialize_message(service)) { return -1; } /* send data to server and wait for the response message */ - if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0) + service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); + if(service->errorCode) { return -1; } @@ -361,7 +366,7 @@ int call_lineLock(struct v2gService* service, struct HeaderType* header, struct service->idPath.pos=0; /* init outStream data structure */ - posEncode = 0; + posEncode = service->transportHeaderOffset; service->outStream.pos = &posEncode; service->outStream.buffer = 0; service->outStream.capacity = 8; @@ -370,7 +375,7 @@ int call_lineLock(struct v2gService* service, struct HeaderType* header, struct exiInitEncoder(&(service->outStream), &(service->stateEncode)); /* init inStream data structure */ - posDecode = 0; + posDecode = service->transportHeaderOffset; service->inStream.pos = &posDecode; service->inStream.buffer=0; service->inStream.capacity=0; @@ -386,14 +391,15 @@ int call_lineLock(struct v2gService* service, struct HeaderType* header, struct service->v2gMsg.Body.isused.LineLockReq=1; /* encode data to exi stream*/ - if(serialize_message(service)<0) + if(serialize_message(service)) { return -1; } /* send data to server and wait for the response message */ - if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0) + service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); + if(service->errorCode) { return -1; } @@ -424,7 +430,7 @@ int call_powerDelivery(struct v2gService* service, struct HeaderType* header, st service->idPath.pos=0; /* init outStream data structure */ - posEncode = 0; + posEncode = service->transportHeaderOffset; service->outStream.pos = &posEncode; service->outStream.buffer = 0; service->outStream.capacity = 8; @@ -433,7 +439,7 @@ int call_powerDelivery(struct v2gService* service, struct HeaderType* header, st exiInitEncoder(&(service->outStream), &(service->stateEncode)); /* init inStream data structure */ - posDecode = 0; + posDecode = service->transportHeaderOffset; service->inStream.pos = &posDecode; service->inStream.buffer=0; service->inStream.capacity=0; @@ -449,14 +455,15 @@ int call_powerDelivery(struct v2gService* service, struct HeaderType* header, st service->v2gMsg.Body.isused.PowerDeliveryReq=1; /* encode data to exi stream*/ - if(serialize_message(service)<0) + if(serialize_message(service)) { return -1; } /* send data to server and wait for the response message */ - if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0) + service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); + if(service->errorCode) { return -1; } @@ -487,7 +494,7 @@ int call_meteringStatus(struct v2gService* service, struct HeaderType* header, s service->idPath.pos=0; /* init outStream data structure */ - posEncode = 0; + posEncode = service->transportHeaderOffset; service->outStream.pos = &posEncode; service->outStream.buffer = 0; service->outStream.capacity = 8; @@ -496,7 +503,7 @@ int call_meteringStatus(struct v2gService* service, struct HeaderType* header, s exiInitEncoder(&(service->outStream), &(service->stateEncode)); /* init inStream data structure */ - posDecode = 0; + posDecode = service->transportHeaderOffset; service->inStream.pos = &posDecode; service->inStream.buffer=0; service->inStream.capacity=0; @@ -511,14 +518,15 @@ int call_meteringStatus(struct v2gService* service, struct HeaderType* header, s service->v2gMsg.Body.isused.MeteringStatusReq=1; /* encode data to exi stream*/ - if(serialize_message(service)<0) + if(serialize_message(service)) { return -1; } /* send data to server and wait for the response message */ - if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0) + service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); + if(service->errorCode) { return -1; } @@ -549,7 +557,7 @@ int call_meteringReceipt(struct v2gService* service, struct HeaderType* header, service->idPath.pos=0; /* init outStream data structure */ - posEncode = 0; + posEncode = service->transportHeaderOffset; service->outStream.pos = &posEncode; service->outStream.buffer = 0; service->outStream.capacity = 8; @@ -558,7 +566,7 @@ int call_meteringReceipt(struct v2gService* service, struct HeaderType* header, exiInitEncoder(&(service->outStream), &(service->stateEncode)); /* init inStream data structure */ - posDecode = 0; + posDecode = service->transportHeaderOffset; service->inStream.pos = &posDecode; service->inStream.buffer=0; service->inStream.capacity=0; @@ -574,14 +582,15 @@ int call_meteringReceipt(struct v2gService* service, struct HeaderType* header, service->v2gMsg.Body.isused.MeteringReceiptReq=1; /* encode data to exi stream*/ - if(serialize_message(service)<0) + if(serialize_message(service)) { return -1; } /* send data to server and wait for the response message */ - if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0) + service->errorCode=serviceDataTransmitter(service->outStream.data, (*(service->outStream.pos)-service->transportHeaderOffset), service->inStream.data); + if(service->errorCode) { return -1; } @@ -650,7 +659,7 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.MeteringReceiptRes.ResponseCode=service->val.enumeration; - } else if(service->idPath.id[1] == 61) + } else if(service->idPath.id[2] == 61) { service->v2gMsg.Body.SessionSetupRes.ResponseCode=service->val.enumeration; @@ -669,6 +678,10 @@ static int deserializeElementCharacter(struct v2gService* service) /* 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 @@ -678,9 +691,9 @@ static int deserializeElementCharacter(struct v2gService* service) break; case 63: /*TCurrent*/ - if(service->val.type == INTEGER_64) + if(service->val.type == INTEGER_32) { - service->v2gMsg.Body.SessionSetupRes.TCurrent=service->val.int64; + service->v2gMsg.Body.SessionSetupRes.TCurrent=service->val.int32; } else { @@ -738,7 +751,7 @@ static int deserializeElementCharacter(struct v2gService* service) break; case 5: switch(service->eqn.localPart) { - case 35: /*SessionID*/ + case 34: /*SessionID*/ if(service->val.type == BINARY_HEX) { @@ -753,7 +766,7 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 33: /*ServiceSessionID*/ + case 32: /*ServiceSessionID*/ if(service->val.type == BINARY_HEX) { @@ -770,7 +783,7 @@ static int deserializeElementCharacter(struct v2gService* service) /* is used */ service->v2gMsg.Header.SessionInformation.isused.ServiceSessionID=1; break; - case 25: /*ProtocolVersion*/ + case 24: /*ProtocolVersion*/ if(service->val.type == STRING) { @@ -834,7 +847,7 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.LineLockRes.EVSEStatus.FatalError=service->val.boolean; - } else if(service->idPath.id[1] == 23) + } else if(service->idPath.id[2] == 23) { service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.FatalError=service->val.boolean; @@ -861,7 +874,7 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.LineLockRes.EVSEStatus.EVSEStandby=service->val.boolean; - } else if(service->idPath.id[1] == 23) + } else if(service->idPath.id[2] == 23) { service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.EVSEStandby=service->val.boolean; @@ -888,7 +901,7 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.LineLockRes.EVSEStatus.ConnectorLocked=service->val.boolean; - } else if(service->idPath.id[1] == 23) + } else if(service->idPath.id[2] == 23) { service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.ConnectorLocked=service->val.boolean; @@ -900,7 +913,7 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 24: /*PowerSwitchClosed*/ + case 23: /*PowerSwitchClosed*/ if(service->val.type == BOOLEAN) { if(service->idPath.id[2] == 61) @@ -915,7 +928,7 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.LineLockRes.EVSEStatus.PowerSwitchClosed=service->val.boolean; - } else if(service->idPath.id[1] == 23) + } else if(service->idPath.id[2] == 23) { service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.PowerSwitchClosed=service->val.boolean; @@ -927,7 +940,7 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 26: /*RCD*/ + case 25: /*RCD*/ if(service->val.type == BOOLEAN) { if(service->idPath.id[2] == 61) @@ -942,7 +955,7 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.LineLockRes.EVSEStatus.RCD=service->val.boolean; - } else if(service->idPath.id[1] == 23) + } else if(service->idPath.id[2] == 23) { service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.RCD=service->val.boolean; @@ -954,24 +967,24 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 37: /*ShutDownTime*/ - if(service->val.type == INTEGER_64) + case 36: /*ShutDownTime*/ + if(service->val.type == INTEGER_32) { if(service->idPath.id[2] == 61) { - service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ShutDownTime=service->val.int64; + service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ShutDownTime=service->val.int32; } else if(service->idPath.id[2] == 43) { - service->v2gMsg.Body.PowerDiscoveryRes.EVSEStatus.ShutDownTime=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryRes.EVSEStatus.ShutDownTime=service->val.int32; } else if(service->idPath.id[2] == 13) { - service->v2gMsg.Body.LineLockRes.EVSEStatus.ShutDownTime=service->val.int64; + service->v2gMsg.Body.LineLockRes.EVSEStatus.ShutDownTime=service->val.int32; - } else if(service->idPath.id[1] == 23) + } else if(service->idPath.id[2] == 23) { - service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.ShutDownTime=service->val.int64; + service->v2gMsg.Body.MeteringStatusRes.EVSEStatus.ShutDownTime=service->val.int32; } } @@ -981,7 +994,7 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 29: /*ServiceID*/ + case 28: /*ServiceID*/ if(service->val.type == BINARY_HEX) { @@ -996,7 +1009,7 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 31: /*ServiceName*/ + case 30: /*ServiceName*/ if(service->val.type == STRING) { @@ -1014,7 +1027,7 @@ static int deserializeElementCharacter(struct v2gService* service) /* is used */ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceName=1; break; - case 34: /*ServiceType*/ + case 33: /*ServiceType*/ if(service->val.type == ENUMERATION) { service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceType=service->val.enumeration; @@ -1027,7 +1040,7 @@ static int deserializeElementCharacter(struct v2gService* service) /* is used */ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceType=1; break; - case 32: /*ServiceScope*/ + case 31: /*ServiceScope*/ if(service->val.type == STRING) { @@ -1045,7 +1058,7 @@ static int deserializeElementCharacter(struct v2gService* service) /* is used */ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceScope=1; break; - case 21: /*Multiplier*/ + case 20: /*Multiplier*/ if(service->val.type == ENUMERATION) { if(service->idPath.id[3] == 2) @@ -1076,7 +1089,7 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Multiplier=service->val.enumeration; - } else if(service->idPath.id[2] == 25) + } else if(service->idPath.id[3] == 25) { service->v2gMsg.Body.MeteringStatusRes.PCurrent.Multiplier=service->val.enumeration; @@ -1084,15 +1097,15 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryMaxPower.Multiplier=service->val.enumeration; - } else if(service->idPath.id[1] == 23) + } else if(service->idPath.id[2] == 23) { service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Multiplier=service->val.enumeration; - } else if(service->idPath.id[7] == 47) + } 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[6] == 6) + } 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; @@ -1104,7 +1117,7 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 50: /*Unit*/ + case 49: /*Unit*/ if(service->val.type == ENUMERATION) { if(service->idPath.id[3] == 2) @@ -1135,7 +1148,7 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Unit=service->val.enumeration; - } else if(service->idPath.id[2] == 25) + } else if(service->idPath.id[3] == 25) { service->v2gMsg.Body.MeteringStatusRes.PCurrent.Unit=service->val.enumeration; @@ -1143,15 +1156,15 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryMaxPower.Unit=service->val.enumeration; - } else if(service->idPath.id[1] == 23) + } else if(service->idPath.id[2] == 23) { service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Unit=service->val.enumeration; - } else if(service->idPath.id[7] == 47) + } 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[6] == 6) + } 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; @@ -1163,56 +1176,56 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 51: /*Value*/ - if(service->val.type == INTEGER_64) + case 50: /*Value*/ + if(service->val.type == INTEGER_32) { if(service->idPath.id[3] == 2) { - service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Value=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Value=service->val.int32; } else if(service->idPath.id[3] == 28) { - service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPower.Value=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPower.Value=service->val.int32; } else if(service->idPath.id[3] == 29) { - service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxVoltage.Value=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxVoltage.Value=service->val.int32; } else if(service->idPath.id[3] == 30) { - service->v2gMsg.Body.PowerDiscoveryReq.PEVMinVoltage.Value=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryReq.PEVMinVoltage.Value=service->val.int32; } else if(service->idPath.id[3] == 8) { - service->v2gMsg.Body.PowerDiscoveryRes.EVSEVoltage.Value=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryRes.EVSEVoltage.Value=service->val.int32; } else if(service->idPath.id[3] == 4) { - service->v2gMsg.Body.PowerDiscoveryRes.EVSEIMax.Value=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryRes.EVSEIMax.Value=service->val.int32; } else if(service->idPath.id[3] == 6) { - service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Value=service->val.int64; + service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Value=service->val.int32; - } else if(service->idPath.id[2] == 25) + } else if(service->idPath.id[3] == 25) { - service->v2gMsg.Body.MeteringStatusRes.PCurrent.Value=service->val.int64; + 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.int64; + service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryMaxPower.Value=service->val.int32; - } else if(service->idPath.id[1] == 23) + } else if(service->idPath.id[2] == 23) { - service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Value=service->val.int64; + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Value=service->val.int32; - } else if(service->idPath.id[7] == 47) + } 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.int64; + 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[6] == 6) + } 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.int64; + 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; } } @@ -1222,18 +1235,7 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 48: /*TariffStart*/ - if(service->val.type == UNSIGNED_INTEGER_32) - { - 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].TariffStart=service->val.uint32; - } - else - { - return -1; /* wrong data type */ - } - - break; - case 46: /*TariffID*/ + case 45: /*TariffID*/ if(service->val.type == ENUMERATION) { service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffID=service->val.enumeration; @@ -1244,7 +1246,7 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 41: /*TariffDescription*/ + case 40: /*TariffDescription*/ if(service->val.type == STRING) { @@ -1262,31 +1264,14 @@ static int deserializeElementCharacter(struct v2gService* service) /* is used */ service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].isused.TariffDescription=1; break; - case 18: /*MeterPubKey*/ - - if(service->val.type == BINARY_HEX) - { - /* array copy and array length assignment */ - memcpy(service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterPubKey.data, service->val.binary.data,service->val.binary.len); - service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterPubKey.arraylen.data = service->val.binary.len; - - } - else - { - return -1; /* wrong data type */ - } - - /* is used */ - service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterPubKey=1; - break; - case 20: /*MeterStatus*/ + case 19: /*MeterStatus*/ if(service->val.type == INTEGER_16) { if(service->idPath.id[2] == 23) { service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterStatus=service->val.int32; - } else if(service->idPath.id[1] == 17) + } else if(service->idPath.id[2] == 17) { service->v2gMsg.Body.MeteringReceiptReq.MeterInfo.MeterStatus=service->val.int32; @@ -1300,16 +1285,16 @@ static int deserializeElementCharacter(struct v2gService* service) /* is used */ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterStatus=1; break; - case 38: /*TMeter*/ - if(service->val.type == INTEGER_64) + case 37: /*TMeter*/ + if(service->val.type == INTEGER_32) { if(service->idPath.id[2] == 23) { - service->v2gMsg.Body.MeteringStatusRes.MeterInfo.TMeter=service->val.int64; + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.TMeter=service->val.int32; - } else if(service->idPath.id[1] == 17) + } else if(service->idPath.id[2] == 17) { - service->v2gMsg.Body.MeteringReceiptReq.MeterInfo.TMeter=service->val.int64; + service->v2gMsg.Body.MeteringReceiptReq.MeterInfo.TMeter=service->val.int32; } } @@ -1415,12 +1400,12 @@ static int deserializeElement(struct v2gService* service) } break;case 5: switch(service->eqn.localPart) { - case 33:/* ServiceSessionID */ + case 32:/* ServiceSessionID */ /* is used */ service->v2gMsg.Header.SessionInformation.isused.ServiceSessionID=1; break; - case 25:/* ProtocolVersion */ + case 24:/* ProtocolVersion */ /* is used */ service->v2gMsg.Header.SessionInformation.isused.ProtocolVersion=1; @@ -1440,17 +1425,17 @@ static int deserializeElement(struct v2gService* service) /* is used */ service->v2gMsg.Header.Notification.isused.EventList=1; break; - case 31:/* ServiceName */ + case 30:/* ServiceName */ /* is used */ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceName=1; break; - case 34:/* ServiceType */ + case 33:/* ServiceType */ /* is used */ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceType=1; break; - case 32:/* ServiceScope */ + case 31:/* ServiceScope */ /* is used */ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceScope=1; @@ -1460,7 +1445,7 @@ static int deserializeElement(struct v2gService* service) /* 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 41:/* TariffDescription */ + case 40:/* TariffDescription */ /* is used */ service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].isused.TariffDescription=1; @@ -1470,22 +1455,17 @@ static int deserializeElement(struct v2gService* service) /* is used */ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterID=1; break; - case 18:/* MeterPubKey */ - - /* is used */ - service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterPubKey=1; - break; - case 19:/* MeterReading */ + case 18:/* MeterReading */ /* is used */ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterReading=1; break; - case 20:/* MeterStatus */ + case 19:/* MeterStatus */ /* is used */ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterStatus=1; break; - case 38:/* TMeter */ + case 37:/* TMeter */ /* is used */ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.TMeter=1; @@ -1514,49 +1494,49 @@ static int deserializeElement(struct v2gService* service) static int deserializeMessage(struct v2gService* service) { int noEndOfDocument = 1; /* true */ - int errno=0; + int returnCode=0; do { exiDecodeNextEvent(&(service->inStream), &(service->stateDecode), &(service->event)); - if (errno < 0) { - printf("[ERROR] %d \n", errno); - return errno; + if (returnCode < 0) { + printf("[ERROR] %d \n", returnCode); + return returnCode; } switch (service->event) { case START_DOCUMENT: - errno = exiDecodeStartDocument(&(service->inStream), &(service->stateDecode)); + returnCode = exiDecodeStartDocument(&(service->inStream), &(service->stateDecode)); break; case END_DOCUMENT: - errno = exiDecodeEndDocument(&(service->inStream), &(service->stateDecode)); + returnCode = exiDecodeEndDocument(&(service->inStream), &(service->stateDecode)); noEndOfDocument = 0; /* false */ break; case START_ELEMENT: - errno = exiDecodeStartElement(&(service->inStream), &(service->stateDecode), &(service->eqn)); + returnCode = exiDecodeStartElement(&(service->inStream), &(service->stateDecode), &(service->eqn)); service->idPath.id[service->idPath.pos++]=service->eqn.localPart; break; case END_ELEMENT: - errno = exiDecodeEndElement(&(service->inStream), &(service->stateDecode), &(service->eqn)); + returnCode = exiDecodeEndElement(&(service->inStream), &(service->stateDecode), &(service->eqn)); service->idPath.pos--; - errno = deserializeElement(service); + returnCode = deserializeElement(service); break; case CHARACTERS: /* decode */ - errno = exiDecodeCharacters(&(service->inStream), &(service->stateDecode), &(service->val)); + returnCode = exiDecodeCharacters(&(service->inStream), &(service->stateDecode), &(service->val)); /* assign character data to the v2g message structure */ - errno = deserializeElementCharacter(service); + returnCode = deserializeElementCharacter(service); break; case ATTRIBUTE: /* decode */ - /* errno = exiDecodeAttribute(&isStream, &stateDecode, &eqn, &val); */ + /* returnCode = exiDecodeAttribute(&isStream, &stateDecode, &eqn, &val); */ break; default: /* ERROR */ @@ -1571,7 +1551,7 @@ static int deserializeMessage(struct v2gService* service) /* 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) +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 */ @@ -1587,6 +1567,8 @@ static int deserializeMessage(struct v2gService* service) service->outStream.data=outStream; service->outStream.size=max_outStream_size; + /* init offset for transport protocoll */ + service->transportHeaderOffset=transportHeaderOffset; return 0; } diff --git a/src/service/v2g_serviceClientStubs.h b/src/service/v2g_serviceClientStubs.h index c1be560..ebfa4b7 100644 --- a/src/service/v2g_serviceClientStubs.h +++ b/src/service/v2g_serviceClientStubs.h @@ -22,7 +22,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -96,7 +96,7 @@ extern "C" { /* 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); +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 f9861e7..5523804 100644 --- a/src/service/v2g_serviceDataSerialization.c +++ b/src/service/v2g_serviceDataSerialization.c @@ -19,7 +19,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -38,12 +38,13 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, struct v2gService* service) { + /* element ID assignment of SessionID*/ service->eqn.namespaceURI=5; - service->eqn.localPart=35; + service->eqn.localPart=34; /* encode start element SessionID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -53,7 +54,7 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, memcpy(service->val.binary.data, type->SessionID.data, service->val.binary.len); /* encode character SessionID */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -66,7 +67,7 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, /* encode end element of SessionID */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -76,9 +77,9 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, /* element ID assignment of ServiceSessionID*/ service->eqn.namespaceURI=5; - service->eqn.localPart=33; + service->eqn.localPart=32; /* encode start element ServiceSessionID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -88,7 +89,7 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, memcpy(service->val.binary.data, type->ServiceSessionID.data, service->val.binary.len); /* encode character ServiceSessionID */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -101,7 +102,7 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, /* encode end element of ServiceSessionID */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -112,9 +113,9 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, /* 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)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -125,7 +126,7 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, memcpy(service->val.string.codepoints, type->ProtocolVersion.data, service->val.string.len); /* encode character ProtocolVersion */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -137,7 +138,7 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, /* encode end element of ProtocolVersion */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -148,24 +149,25 @@ static int serialize_SessionInformationType(struct SessionInformationType* type, } -static int serialize_EventListType(struct v2gService* service) +static int serialize_EventListType(struct EventListType* type, struct v2gService* service) { + /* element ID assignment of Event*/ service->eqn.namespaceURI=5; service->eqn.localPart=9; /* encode start element Event */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Header.Notification.EventList.Event; + service->val.enumeration=type->Event; /* encode character Event */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -176,7 +178,7 @@ static int serialize_EventListType(struct v2gService* service) /* encode end element of Event */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -187,7 +189,8 @@ static int serialize_EventListType(struct v2gService* service) static int serialize_NotificationType(struct NotificationType* type, struct v2gService* service) -{if(type->isused.FaultCode) +{ +if(type->isused.FaultCode) { @@ -195,17 +198,17 @@ static int serialize_NotificationType(struct NotificationType* type, struct v2gS service->eqn.namespaceURI=5; service->eqn.localPart=13; /* encode start element FaultCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Header.Notification.FaultCode; + service->val.enumeration=type->FaultCode; /* encode character FaultCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -216,7 +219,7 @@ static int serialize_NotificationType(struct NotificationType* type, struct v2gS /* encode end element of FaultCode */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -229,7 +232,7 @@ static int serialize_NotificationType(struct NotificationType* type, struct v2gS service->eqn.namespaceURI=5; service->eqn.localPart=14; /* encode start element FaultMsg */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -240,7 +243,7 @@ static int serialize_NotificationType(struct NotificationType* type, struct v2gS memcpy(service->val.string.codepoints, type->FaultMsg.data, service->val.string.len); /* encode character FaultMsg */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -252,7 +255,7 @@ static int serialize_NotificationType(struct NotificationType* type, struct v2gS /* encode end element of FaultMsg */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -265,14 +268,14 @@ static int serialize_NotificationType(struct NotificationType* type, struct v2gS service->eqn.namespaceURI=5; service->eqn.localPart=10; /* encode start element EventList */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of EventList */ - if(serialize_EventListType(service)<0) + if(serialize_EventListType( &(type->EventList),service)) { return -1; } @@ -283,7 +286,7 @@ static int serialize_NotificationType(struct NotificationType* type, struct v2gS /* encode end element of EventList */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -296,19 +299,20 @@ static int serialize_NotificationType(struct NotificationType* type, struct v2gS static int serialize_HeaderType(struct HeaderType* type, struct v2gService* service) { + /* element ID assignment of SessionInformation*/ service->eqn.namespaceURI=6; service->eqn.localPart=7; /* encode start element SessionInformation */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of SessionInformation */ - if(serialize_SessionInformationType( &(type->SessionInformation),service)<0) + if(serialize_SessionInformationType( &(type->SessionInformation),service)) { return -1; } @@ -319,7 +323,7 @@ static int serialize_HeaderType(struct HeaderType* type, struct v2gService* serv /* encode end element of SessionInformation */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -331,14 +335,14 @@ static int serialize_HeaderType(struct HeaderType* type, struct v2gService* serv service->eqn.namespaceURI=6; service->eqn.localPart=6; /* encode start element Notification */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of Notification */ - if(serialize_NotificationType( &(type->Notification),service)<0) + if(serialize_NotificationType( &(type->Notification),service)) { return -1; } @@ -349,7 +353,7 @@ static int serialize_HeaderType(struct HeaderType* type, struct v2gService* serv /* encode end element of Notification */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -360,24 +364,25 @@ static int serialize_HeaderType(struct HeaderType* type, struct v2gService* serv } -static int serialize_PEVStatusType(struct v2gService* 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)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = BOOLEAN; - service->val.boolean=service->v2gMsg.Body.SessionSetupReq.PEVStatus.ConnectorLocked; + service->val.boolean=type->ConnectorLocked; /* encode character ConnectorLocked */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -388,7 +393,7 @@ static int serialize_PEVStatusType(struct v2gService* service) /* encode end element of ConnectorLocked */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -398,17 +403,17 @@ static int serialize_PEVStatusType(struct v2gService* service) service->eqn.namespaceURI=5; service->eqn.localPart=0; /* encode start element ChargerStandby */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = BOOLEAN; - service->val.boolean=service->v2gMsg.Body.SessionSetupReq.PEVStatus.ChargerStandby; + service->val.boolean=type->ChargerStandby; /* encode character ChargerStandby */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -419,7 +424,7 @@ static int serialize_PEVStatusType(struct v2gService* service) /* encode end element of ChargerStandby */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -430,7 +435,8 @@ static int serialize_PEVStatusType(struct v2gService* service) static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struct v2gService* service) -{if(type->isused.PEVID) +{ +if(type->isused.PEVID) { @@ -438,7 +444,7 @@ static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struc service->eqn.namespaceURI=4; service->eqn.localPart=26; /* encode start element PEVID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -449,7 +455,7 @@ static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struc memcpy(service->val.string.codepoints, type->PEVID.data, service->val.string.len); /* encode character PEVID */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -461,7 +467,7 @@ static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struc /* encode end element of PEVID */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -472,14 +478,14 @@ static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struc service->eqn.namespaceURI=4; service->eqn.localPart=32; /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PEVStatus */ - if(serialize_PEVStatusType(service)<0) + if(serialize_PEVStatusType( &(type->PEVStatus),service)) { return -1; } @@ -490,7 +496,7 @@ static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struc /* encode end element of PEVStatus */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -500,24 +506,25 @@ static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struc } -static int serialize_EVSEStatusType(struct v2gService* service) +static int serialize_EVSEStatusType(struct EVSEStatusType* type, struct v2gService* service) { + /* element ID assignment of FatalError*/ service->eqn.namespaceURI=5; service->eqn.localPart=12; /* encode start element FatalError */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = BOOLEAN; - service->val.boolean=service->v2gMsg.Body.SessionSetupRes.EVSEStatus.FatalError; + service->val.boolean=type->FatalError; /* encode character FatalError */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -528,7 +535,7 @@ static int serialize_EVSEStatusType(struct v2gService* service) /* encode end element of FatalError */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -538,17 +545,17 @@ static int serialize_EVSEStatusType(struct v2gService* service) service->eqn.namespaceURI=5; service->eqn.localPart=7; /* encode start element EVSEStandby */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = BOOLEAN; - service->val.boolean=service->v2gMsg.Body.SessionSetupRes.EVSEStatus.EVSEStandby; + service->val.boolean=type->EVSEStandby; /* encode character EVSEStandby */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -559,7 +566,7 @@ static int serialize_EVSEStatusType(struct v2gService* service) /* encode end element of EVSEStandby */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -569,17 +576,17 @@ static int serialize_EVSEStatusType(struct v2gService* service) service->eqn.namespaceURI=5; service->eqn.localPart=4; /* encode start element ConnectorLocked */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = BOOLEAN; - service->val.boolean=service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ConnectorLocked; + service->val.boolean=type->ConnectorLocked; /* encode character ConnectorLocked */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -590,7 +597,7 @@ static int serialize_EVSEStatusType(struct v2gService* service) /* encode end element of ConnectorLocked */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -598,19 +605,19 @@ static int serialize_EVSEStatusType(struct v2gService* service) /* 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)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = BOOLEAN; - service->val.boolean=service->v2gMsg.Body.SessionSetupRes.EVSEStatus.PowerSwitchClosed; + service->val.boolean=type->PowerSwitchClosed; /* encode character PowerSwitchClosed */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -621,7 +628,7 @@ static int serialize_EVSEStatusType(struct v2gService* service) /* encode end element of PowerSwitchClosed */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -629,19 +636,19 @@ static int serialize_EVSEStatusType(struct v2gService* service) /* 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)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = BOOLEAN; - service->val.boolean=service->v2gMsg.Body.SessionSetupRes.EVSEStatus.RCD; + service->val.boolean=type->RCD; /* encode character RCD */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -652,7 +659,7 @@ static int serialize_EVSEStatusType(struct v2gService* service) /* encode end element of RCD */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -660,19 +667,19 @@ static int serialize_EVSEStatusType(struct v2gService* service) /* element ID assignment of ShutDownTime*/ service->eqn.namespaceURI=5; - service->eqn.localPart=37; + service->eqn.localPart=36; /* encode start element ShutDownTime */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } - service->val.type = INTEGER_64; - service->val.int64=service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ShutDownTime; + service->val.type = INTEGER_32; + service->val.int32=type->ShutDownTime; /* encode character ShutDownTime */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -683,7 +690,7 @@ static int serialize_EVSEStatusType(struct v2gService* service) /* encode end element of ShutDownTime */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -695,22 +702,23 @@ static int serialize_EVSEStatusType(struct v2gService* service) static int serialize_SessionSetupResType(struct SessionSetupResType* type, struct v2gService* service) { + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; service->eqn.localPart=47; /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.SessionSetupRes.ResponseCode; + service->val.enumeration=type->ResponseCode; /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -721,7 +729,7 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc /* encode end element of ResponseCode */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -731,7 +739,7 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc service->eqn.namespaceURI=4; service->eqn.localPart=3; /* encode start element EVSEID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -741,7 +749,7 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc memcpy(service->val.binary.data, type->EVSEID.data, service->val.binary.len); /* encode character EVSEID */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -754,7 +762,7 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc /* encode end element of EVSEID */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -764,14 +772,14 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc service->eqn.namespaceURI=4; service->eqn.localPart=7; /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType(service)<0) + if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) { return -1; } @@ -782,7 +790,7 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc /* encode end element of EVSEStatus */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -792,17 +800,17 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc service->eqn.namespaceURI=4; service->eqn.localPart=63; /* encode start element TCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } - service->val.type = INTEGER_64; - service->val.int64=service->v2gMsg.Body.SessionSetupRes.TCurrent; + service->val.type = INTEGER_32; + service->val.int32=type->TCurrent; /* encode character TCurrent */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -813,7 +821,7 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc /* encode end element of TCurrent */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -824,7 +832,8 @@ static int serialize_SessionSetupResType(struct SessionSetupResType* type, struc static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type, struct v2gService* service) -{if(type->isused.ServiceType) +{ +if(type->isused.ServiceType) { @@ -832,17 +841,17 @@ static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* typ service->eqn.namespaceURI=4; service->eqn.localPart=58; /* encode start element ServiceType */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.ServiceDiscoveryReq.ServiceType; + service->val.enumeration=type->ServiceType; /* encode character ServiceType */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -853,7 +862,7 @@ static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* typ /* encode end element of ServiceType */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -866,7 +875,7 @@ static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* typ service->eqn.namespaceURI=4; service->eqn.localPart=57; /* encode start element ServiceScope */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -877,7 +886,7 @@ static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* typ memcpy(service->val.string.codepoints, type->ServiceScope.data, service->val.string.len); /* encode character ServiceScope */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -889,7 +898,7 @@ static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* typ /* encode end element of ServiceScope */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -902,12 +911,13 @@ static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* typ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, struct v2gService* service) { + /* element ID assignment of ServiceID*/ service->eqn.namespaceURI=5; - service->eqn.localPart=29; + service->eqn.localPart=28; /* encode start element ServiceID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -917,7 +927,7 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, memcpy(service->val.binary.data, type->ServiceID.data, service->val.binary.len); /* encode character ServiceID */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -930,7 +940,7 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, /* encode end element of ServiceID */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -940,9 +950,9 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, /* element ID assignment of ServiceName*/ service->eqn.namespaceURI=5; - service->eqn.localPart=31; + service->eqn.localPart=30; /* encode start element ServiceName */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -953,7 +963,7 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, memcpy(service->val.string.codepoints, type->ServiceName.data, service->val.string.len); /* encode character ServiceName */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -965,7 +975,7 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, /* encode end element of ServiceName */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -976,19 +986,19 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, /* element ID assignment of ServiceType*/ service->eqn.namespaceURI=5; - service->eqn.localPart=34; + service->eqn.localPart=33; /* encode start element ServiceType */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceType; + service->val.enumeration=type->ServiceType; /* encode character ServiceType */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -999,7 +1009,7 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, /* encode end element of ServiceType */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1010,9 +1020,9 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, /* element ID assignment of ServiceScope*/ service->eqn.namespaceURI=5; - service->eqn.localPart=32; + service->eqn.localPart=31; /* encode start element ServiceScope */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1023,7 +1033,7 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, memcpy(service->val.string.codepoints, type->ServiceScope.data, service->val.string.len); /* encode character ServiceScope */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1035,7 +1045,7 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, /* encode end element of ServiceScope */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1048,14 +1058,15 @@ static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, static int serialize_ServiceListType(struct ServiceListType* type, struct v2gService* service) { + size_t i_loop; /* element ID assignment of Service*/ service->eqn.namespaceURI=5; - service->eqn.localPart=27; + service->eqn.localPart=26; /* encode start element Service */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1064,7 +1075,7 @@ static int serialize_ServiceListType(struct ServiceListType* type, struct v2gSer for(i_loop=0;i_loop < type->arraylen.Service;i_loop++) { /* encode children of Service */ - if(serialize_ServiceDescriptionType(&(type->Service[i_loop]),service)<0) + if(serialize_ServiceDescriptionType(&(type->Service[i_loop]),service)) { return -1; } @@ -1077,7 +1088,7 @@ static int serialize_ServiceListType(struct ServiceListType* type, struct v2gSer /* encode end element of Service */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1089,22 +1100,23 @@ static int serialize_ServiceListType(struct ServiceListType* type, struct v2gSer static int serialize_ServiceDiscoveryResType(struct ServiceDiscoveryResType* type, struct v2gService* service) { + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; service->eqn.localPart=47; /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode; + service->val.enumeration=type->ResponseCode; /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1115,7 +1127,7 @@ static int serialize_ServiceDiscoveryResType(struct ServiceDiscoveryResType* typ /* encode end element of ResponseCode */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1127,14 +1139,14 @@ static int serialize_ServiceDiscoveryResType(struct ServiceDiscoveryResType* typ service->eqn.namespaceURI=4; service->eqn.localPart=52; /* encode start element ServiceList */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of ServiceList */ - if(serialize_ServiceListType( &(type->ServiceList),service)<0) + if(serialize_ServiceListType( &(type->ServiceList),service)) { return -1; } @@ -1145,7 +1157,7 @@ static int serialize_ServiceDiscoveryResType(struct ServiceDiscoveryResType* typ /* encode end element of ServiceList */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1158,19 +1170,20 @@ static int serialize_ServiceDiscoveryResType(struct ServiceDiscoveryResType* typ static int serialize_ServicePaymentSelectionReqType(struct ServicePaymentSelectionReqType* type, struct v2gService* service) { + /* element ID assignment of ServiceList*/ service->eqn.namespaceURI=4; service->eqn.localPart=52; /* encode start element ServiceList */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of ServiceList */ - if(serialize_ServiceListType( &(type->ServiceList),service)<0) + if(serialize_ServiceListType( &(type->ServiceList),service)) { return -1; } @@ -1181,7 +1194,7 @@ static int serialize_ServicePaymentSelectionReqType(struct ServicePaymentSelecti /* encode end element of ServiceList */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1191,7 +1204,7 @@ static int serialize_ServicePaymentSelectionReqType(struct ServicePaymentSelecti service->eqn.namespaceURI=4; service->eqn.localPart=31; /* encode start element PEVPubKey */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1201,7 +1214,7 @@ static int serialize_ServicePaymentSelectionReqType(struct ServicePaymentSelecti memcpy(service->val.binary.data, type->PEVPubKey.data, service->val.binary.len); /* encode character PEVPubKey */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1214,7 +1227,7 @@ static int serialize_ServicePaymentSelectionReqType(struct ServicePaymentSelecti /* encode end element of PEVPubKey */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1226,22 +1239,23 @@ static int serialize_ServicePaymentSelectionReqType(struct ServicePaymentSelecti static int serialize_ServicePaymentSelectionResType(struct ServicePaymentSelectionResType* type, struct v2gService* service) { + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; service->eqn.localPart=47; /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode; + service->val.enumeration=type->ResponseCode; /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1252,7 +1266,7 @@ static int serialize_ServicePaymentSelectionResType(struct ServicePaymentSelecti /* encode end element of ResponseCode */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1264,7 +1278,7 @@ static int serialize_ServicePaymentSelectionResType(struct ServicePaymentSelecti service->eqn.namespaceURI=4; service->eqn.localPart=16; /* encode start element MeteringAuthPubKey */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1274,7 +1288,7 @@ static int serialize_ServicePaymentSelectionResType(struct ServicePaymentSelecti memcpy(service->val.binary.data, type->MeteringAuthPubKey.data, service->val.binary.len); /* encode character MeteringAuthPubKey */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1287,7 +1301,7 @@ static int serialize_ServicePaymentSelectionResType(struct ServicePaymentSelecti /* encode end element of MeteringAuthPubKey */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1300,12 +1314,13 @@ static int serialize_ServicePaymentSelectionResType(struct ServicePaymentSelecti static int serialize_PaymentDetailsReqType(struct PaymentDetailsReqType* type, struct v2gService* service) { + /* element ID assignment of ContractID*/ service->eqn.namespaceURI=4; service->eqn.localPart=1; /* encode start element ContractID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1316,7 +1331,7 @@ static int serialize_PaymentDetailsReqType(struct PaymentDetailsReqType* type, s memcpy(service->val.string.codepoints, type->ContractID.data, service->val.string.len); /* encode character ContractID */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1328,7 +1343,7 @@ static int serialize_PaymentDetailsReqType(struct PaymentDetailsReqType* type, s /* encode end element of ContractID */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1338,24 +1353,25 @@ static int serialize_PaymentDetailsReqType(struct PaymentDetailsReqType* type, s } -static int serialize_PaymentDetailsResType(struct v2gService* service) +static int serialize_PaymentDetailsResType(struct PaymentDetailsResType* type, struct v2gService* service) { + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; service->eqn.localPart=47; /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.PaymentDetailsRes.ResponseCode; + service->val.enumeration=type->ResponseCode; /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1366,7 +1382,7 @@ static int serialize_PaymentDetailsResType(struct v2gService* service) /* encode end element of ResponseCode */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1376,24 +1392,25 @@ static int serialize_PaymentDetailsResType(struct v2gService* service) } -static int serialize_FloatingValueType(struct v2gService* 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)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Multiplier; + service->val.enumeration=type->Multiplier; /* encode character Multiplier */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1404,7 +1421,7 @@ static int serialize_FloatingValueType(struct v2gService* service) /* encode end element of Multiplier */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1412,19 +1429,19 @@ static int serialize_FloatingValueType(struct v2gService* service) /* element ID assignment of Unit*/ service->eqn.namespaceURI=5; - service->eqn.localPart=50; + service->eqn.localPart=49; /* encode start element Unit */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Unit; + service->val.enumeration=type->Unit; /* encode character Unit */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1435,7 +1452,7 @@ static int serialize_FloatingValueType(struct v2gService* service) /* encode end element of Unit */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1443,19 +1460,19 @@ static int serialize_FloatingValueType(struct v2gService* service) /* element ID assignment of Value*/ service->eqn.namespaceURI=5; - service->eqn.localPart=51; + service->eqn.localPart=50; /* encode start element Value */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } - service->val.type = INTEGER_64; - service->val.int64=service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Value; + service->val.type = INTEGER_32; + service->val.int32=type->Value; /* encode character Value */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1466,7 +1483,7 @@ static int serialize_FloatingValueType(struct v2gService* service) /* encode end element of Value */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1478,19 +1495,20 @@ static int serialize_FloatingValueType(struct v2gService* service) static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, struct v2gService* service) { + /* element ID assignment of PEVStatus*/ service->eqn.namespaceURI=4; service->eqn.localPart=32; /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PEVStatus */ - if(serialize_PEVStatusType(service)<0) + if(serialize_PEVStatusType( &(type->PEVStatus),service)) { return -1; } @@ -1501,7 +1519,7 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s /* encode end element of PEVStatus */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1511,17 +1529,17 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=10; /* encode start element EoC */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } - service->val.type = INTEGER_64; - service->val.int64=service->v2gMsg.Body.PowerDiscoveryReq.EoC; + service->val.type = INTEGER_32; + service->val.int32=type->EoC; /* encode character EoC */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1532,7 +1550,7 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s /* encode end element of EoC */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1542,14 +1560,14 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=2; /* encode start element EAmount */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of EAmount */ - if(serialize_FloatingValueType(service)<0) + if(serialize_FloatingValueType( &(type->EAmount),service)) { return -1; } @@ -1560,7 +1578,7 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s /* encode end element of EAmount */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1570,14 +1588,14 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=28; /* encode start element PEVMaxPower */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PEVMaxPower */ - if(serialize_FloatingValueType(service)<0) + if(serialize_FloatingValueType( &(type->PEVMaxPower),service)) { return -1; } @@ -1588,7 +1606,7 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s /* encode end element of PEVMaxPower */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1598,17 +1616,17 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=27; /* encode start element PEVMaxPhases */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = INTEGER_16; - service->val.int32=service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPhases; + service->val.int32=type->PEVMaxPhases; /* encode character PEVMaxPhases */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1619,7 +1637,7 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s /* encode end element of PEVMaxPhases */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1629,14 +1647,14 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=29; /* encode start element PEVMaxVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PEVMaxVoltage */ - if(serialize_FloatingValueType(service)<0) + if(serialize_FloatingValueType( &(type->PEVMaxVoltage),service)) { return -1; } @@ -1647,7 +1665,7 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s /* encode end element of PEVMaxVoltage */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1657,14 +1675,14 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=30; /* encode start element PEVMinVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PEVMinVoltage */ - if(serialize_FloatingValueType(service)<0) + if(serialize_FloatingValueType( &(type->PEVMinVoltage),service)) { return -1; } @@ -1675,7 +1693,7 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s /* encode end element of PEVMinVoltage */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1687,22 +1705,23 @@ static int serialize_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type, s static int serialize_TariffEntryType(struct TariffEntryType* type, struct v2gService* service) { + /* element ID assignment of TariffStart*/ service->eqn.namespaceURI=5; - service->eqn.localPart=48; + service->eqn.localPart=47; /* encode start element TariffStart */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = UNSIGNED_INTEGER_32; - service->val.uint32=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].TariffStart; + service->val.uint32=type->TariffStart; /* encode character TariffStart */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1713,7 +1732,7 @@ static int serialize_TariffEntryType(struct TariffEntryType* type, struct v2gSer /* encode end element of TariffStart */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1721,16 +1740,16 @@ static int serialize_TariffEntryType(struct TariffEntryType* type, struct v2gSer /* element ID assignment of TariffPMax*/ service->eqn.namespaceURI=5; - service->eqn.localPart=47; + service->eqn.localPart=46; /* encode start element TariffPMax */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of TariffPMax */ - if(serialize_FloatingValueType(service)<0) + if(serialize_FloatingValueType( &(type->TariffPMax),service)) { return -1; } @@ -1741,7 +1760,7 @@ static int serialize_TariffEntryType(struct TariffEntryType* type, struct v2gSer /* encode end element of TariffPMax */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1753,14 +1772,14 @@ static int serialize_TariffEntryType(struct TariffEntryType* type, struct v2gSer service->eqn.namespaceURI=5; service->eqn.localPart=6; /* encode start element EPrice */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of EPrice */ - if(serialize_FloatingValueType(service)<0) + if(serialize_FloatingValueType( &(type->EPrice),service)) { return -1; } @@ -1771,7 +1790,7 @@ static int serialize_TariffEntryType(struct TariffEntryType* type, struct v2gSer /* encode end element of EPrice */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1784,14 +1803,15 @@ static int serialize_TariffEntryType(struct TariffEntryType* type, struct v2gSer static int serialize_TariffEntriesType(struct TariffEntriesType* type, struct v2gService* service) { + size_t i_loop; /* element ID assignment of TariffEntry*/ service->eqn.namespaceURI=5; - service->eqn.localPart=44; + service->eqn.localPart=43; /* encode start element TariffEntry */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1800,7 +1820,7 @@ static int serialize_TariffEntriesType(struct TariffEntriesType* type, struct v2 for(i_loop=0;i_loop < type->arraylen.TariffEntry;i_loop++) { /* encode children of TariffEntry */ - if(serialize_TariffEntryType(&(type->TariffEntry[i_loop]),service)<0) + if(serialize_TariffEntryType(&(type->TariffEntry[i_loop]),service)) { return -1; } @@ -1813,7 +1833,7 @@ static int serialize_TariffEntriesType(struct TariffEntriesType* type, struct v2 /* encode end element of TariffEntry */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1825,22 +1845,23 @@ static int serialize_TariffEntriesType(struct TariffEntriesType* type, struct v2 static int serialize_TariffDescrType(struct TariffDescrType* type, struct v2gService* service) { + /* element ID assignment of TariffID*/ service->eqn.namespaceURI=5; - service->eqn.localPart=46; + service->eqn.localPart=45; /* encode start element TariffID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffID; + service->val.enumeration=type->TariffID; /* encode character TariffID */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1851,7 +1872,7 @@ static int serialize_TariffDescrType(struct TariffDescrType* type, struct v2gSer /* encode end element of TariffID */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1861,9 +1882,9 @@ static int serialize_TariffDescrType(struct TariffDescrType* type, struct v2gSer /* element ID assignment of TariffDescription*/ service->eqn.namespaceURI=5; - service->eqn.localPart=41; + service->eqn.localPart=40; /* encode start element TariffDescription */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1874,7 +1895,7 @@ static int serialize_TariffDescrType(struct TariffDescrType* type, struct v2gSer memcpy(service->val.string.codepoints, type->TariffDescription.data, service->val.string.len); /* encode character TariffDescription */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1886,7 +1907,7 @@ static int serialize_TariffDescrType(struct TariffDescrType* type, struct v2gSer /* encode end element of TariffDescription */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1895,16 +1916,16 @@ static int serialize_TariffDescrType(struct TariffDescrType* type, struct v2gSer /* element ID assignment of TariffEntries*/ service->eqn.namespaceURI=5; - service->eqn.localPart=42; + service->eqn.localPart=41; /* encode start element TariffEntries */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of TariffEntries */ - if(serialize_TariffEntriesType( &(type->TariffEntries),service)<0) + if(serialize_TariffEntriesType( &(type->TariffEntries),service)) { return -1; } @@ -1915,7 +1936,7 @@ static int serialize_TariffDescrType(struct TariffDescrType* type, struct v2gSer /* encode end element of TariffEntries */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1927,6 +1948,7 @@ static int serialize_TariffDescrType(struct TariffDescrType* type, struct v2gSer static int serialize_TariffTableType(struct TariffTableType* type, struct v2gService* service) { + size_t i_loop; @@ -1934,7 +1956,7 @@ static int serialize_TariffTableType(struct TariffTableType* type, struct v2gSer service->eqn.namespaceURI=5; service->eqn.localPart=5; /* encode start element Currency */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1945,7 +1967,7 @@ static int serialize_TariffTableType(struct TariffTableType* type, struct v2gSer memcpy(service->val.string.codepoints, type->Currency.data, service->val.string.len); /* encode character Currency */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -1957,7 +1979,7 @@ static int serialize_TariffTableType(struct TariffTableType* type, struct v2gSer /* encode end element of Currency */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1965,9 +1987,9 @@ static int serialize_TariffTableType(struct TariffTableType* type, struct v2gSer /* element ID assignment of Tariff*/ service->eqn.namespaceURI=5; - service->eqn.localPart=39; + service->eqn.localPart=38; /* encode start element Tariff */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -1976,7 +1998,7 @@ static int serialize_TariffTableType(struct TariffTableType* type, struct v2gSer for(i_loop=0;i_loop < type->arraylen.Tariff;i_loop++) { /* encode children of Tariff */ - if(serialize_TariffDescrType(&(type->Tariff[i_loop]),service)<0) + if(serialize_TariffDescrType(&(type->Tariff[i_loop]),service)) { return -1; } @@ -1989,7 +2011,7 @@ static int serialize_TariffTableType(struct TariffTableType* type, struct v2gSer /* encode end element of Tariff */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2001,22 +2023,23 @@ static int serialize_TariffTableType(struct TariffTableType* type, struct v2gSer static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, struct v2gService* service) { + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; service->eqn.localPart=47; /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode; + service->val.enumeration=type->ResponseCode; /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2027,7 +2050,7 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s /* encode end element of ResponseCode */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2037,14 +2060,14 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=7; /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType(service)<0) + if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) { return -1; } @@ -2055,7 +2078,7 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s /* encode end element of EVSEStatus */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2065,14 +2088,14 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=8; /* encode start element EVSEVoltage */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of EVSEVoltage */ - if(serialize_FloatingValueType(service)<0) + if(serialize_FloatingValueType( &(type->EVSEVoltage),service)) { return -1; } @@ -2083,7 +2106,7 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s /* encode end element of EVSEVoltage */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2093,14 +2116,14 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=4; /* encode start element EVSEIMax */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of EVSEIMax */ - if(serialize_FloatingValueType(service)<0) + if(serialize_FloatingValueType( &(type->EVSEIMax),service)) { return -1; } @@ -2111,7 +2134,7 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s /* encode end element of EVSEIMax */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2121,17 +2144,17 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=5; /* encode start element EVSEMaxPhases */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = INTEGER_16; - service->val.int32=service->v2gMsg.Body.PowerDiscoveryRes.EVSEMaxPhases; + service->val.int32=type->EVSEMaxPhases; /* encode character EVSEMaxPhases */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2142,7 +2165,7 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s /* encode end element of EVSEMaxPhases */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2154,7 +2177,7 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=9; /* encode start element EnergyProvider */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2165,7 +2188,7 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s memcpy(service->val.string.codepoints, type->EnergyProvider.data, service->val.string.len); /* encode character EnergyProvider */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2177,7 +2200,7 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s /* encode end element of EnergyProvider */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2190,14 +2213,14 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=65; /* encode start element TariffTable */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of TariffTable */ - if(serialize_TariffTableType( &(type->TariffTable),service)<0) + if(serialize_TariffTableType( &(type->TariffTable),service)) { return -1; } @@ -2208,7 +2231,7 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s /* encode end element of TariffTable */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2221,19 +2244,20 @@ static int serialize_PowerDiscoveryResType(struct PowerDiscoveryResType* type, s static int serialize_LineLockReqType(struct LineLockReqType* type, struct v2gService* service) { + /* element ID assignment of PEVStatus*/ service->eqn.namespaceURI=4; service->eqn.localPart=32; /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PEVStatus */ - if(serialize_PEVStatusType(service)<0) + if(serialize_PEVStatusType( &(type->PEVStatus),service)) { return -1; } @@ -2244,7 +2268,7 @@ static int serialize_LineLockReqType(struct LineLockReqType* type, struct v2gSer /* encode end element of PEVStatus */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2254,17 +2278,17 @@ static int serialize_LineLockReqType(struct LineLockReqType* type, struct v2gSer service->eqn.namespaceURI=4; service->eqn.localPart=45; /* encode start element ReqLockStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = BOOLEAN; - service->val.boolean=service->v2gMsg.Body.LineLockReq.ReqLockStatus; + service->val.boolean=type->ReqLockStatus; /* encode character ReqLockStatus */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2275,7 +2299,7 @@ static int serialize_LineLockReqType(struct LineLockReqType* type, struct v2gSer /* encode end element of ReqLockStatus */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2287,22 +2311,23 @@ static int serialize_LineLockReqType(struct LineLockReqType* type, struct v2gSer static int serialize_LineLockResType(struct LineLockResType* type, struct v2gService* service) { + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; service->eqn.localPart=47; /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.LineLockRes.ResponseCode; + service->val.enumeration=type->ResponseCode; /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2313,7 +2338,7 @@ static int serialize_LineLockResType(struct LineLockResType* type, struct v2gSer /* encode end element of ResponseCode */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2323,14 +2348,14 @@ static int serialize_LineLockResType(struct LineLockResType* type, struct v2gSer service->eqn.namespaceURI=4; service->eqn.localPart=7; /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType(service)<0) + if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) { return -1; } @@ -2341,7 +2366,7 @@ static int serialize_LineLockResType(struct LineLockResType* type, struct v2gSer /* encode end element of EVSEStatus */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2353,22 +2378,23 @@ static int serialize_LineLockResType(struct LineLockResType* type, struct v2gSer 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)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } - service->val.type = INTEGER_64; - service->val.int64=service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryStart; + service->val.type = INTEGER_32; + service->val.int32=type->ChargingProfileEntryStart; /* encode character ChargingProfileEntryStart */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2379,7 +2405,7 @@ static int serialize_ChargingProfileType(struct ChargingProfileType* type, struc /* encode end element of ChargingProfileEntryStart */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2389,14 +2415,14 @@ static int serialize_ChargingProfileType(struct ChargingProfileType* type, struc service->eqn.namespaceURI=5; service->eqn.localPart=1; /* encode start element ChargingProfileEntryMaxPower */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of ChargingProfileEntryMaxPower */ - if(serialize_FloatingValueType(service)<0) + if(serialize_FloatingValueType( &(type->ChargingProfileEntryMaxPower),service)) { return -1; } @@ -2407,7 +2433,7 @@ static int serialize_ChargingProfileType(struct ChargingProfileType* type, struc /* encode end element of ChargingProfileEntryMaxPower */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2419,19 +2445,20 @@ static int serialize_ChargingProfileType(struct ChargingProfileType* type, struc static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, struct v2gService* service) { + /* element ID assignment of PEVStatus*/ service->eqn.namespaceURI=4; service->eqn.localPart=32; /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PEVStatus */ - if(serialize_PEVStatusType(service)<0) + if(serialize_PEVStatusType( &(type->PEVStatus),service)) { return -1; } @@ -2442,7 +2469,7 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str /* encode end element of PEVStatus */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2452,17 +2479,17 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str service->eqn.namespaceURI=4; service->eqn.localPart=46; /* encode start element ReqSwitchStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = BOOLEAN; - service->val.boolean=service->v2gMsg.Body.PowerDeliveryReq.ReqSwitchStatus; + service->val.boolean=type->ReqSwitchStatus; /* encode character ReqSwitchStatus */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2473,7 +2500,7 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str /* encode end element of ReqSwitchStatus */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2485,17 +2512,17 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str service->eqn.namespaceURI=4; service->eqn.localPart=64; /* encode start element Tariff */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.PowerDeliveryReq.Tariff; + service->val.enumeration=type->Tariff; /* encode character Tariff */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2506,7 +2533,7 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str /* encode end element of Tariff */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2519,14 +2546,14 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str service->eqn.namespaceURI=4; service->eqn.localPart=0; /* encode start element ChargingProfile */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of ChargingProfile */ - if(serialize_ChargingProfileType( &(type->ChargingProfile),service)<0) + if(serialize_ChargingProfileType( &(type->ChargingProfile),service)) { return -1; } @@ -2537,7 +2564,7 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str /* encode end element of ChargingProfile */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2548,24 +2575,25 @@ static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, str } -static int serialize_PowerDeliveryResType(struct v2gService* service) +static int serialize_PowerDeliveryResType(struct PowerDeliveryResType* type, struct v2gService* service) { + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; service->eqn.localPart=47; /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.PowerDeliveryRes.ResponseCode; + service->val.enumeration=type->ResponseCode; /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2576,7 +2604,7 @@ static int serialize_PowerDeliveryResType(struct v2gService* service) /* encode end element of ResponseCode */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2586,15 +2614,17 @@ static int serialize_PowerDeliveryResType(struct v2gService* service) } -static int serialize_MeteringStatusReqType(struct v2gService* service) +static int serialize_MeteringStatusReqType(struct MeteringStatusReqType* type, struct v2gService* service) { + return 0; } static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService* service) -{if(type->isused.MeterID) +{ +if(type->isused.MeterID) { @@ -2602,7 +2632,7 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService service->eqn.namespaceURI=5; service->eqn.localPart=16; /* encode start element MeterID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2613,7 +2643,7 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService memcpy(service->val.string.codepoints, type->MeterID.data, service->val.string.len); /* encode character MeterID */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2625,43 +2655,7 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService /* encode end element of MeterID */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) - { - - return -1; - }} - if(type->isused.MeterPubKey) - { - - - /* element ID assignment of MeterPubKey*/ - service->eqn.namespaceURI=5; - service->eqn.localPart=18; - /* encode start element MeterPubKey */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) - { - - return -1; - } - service->val.type = BINARY_HEX; - service->val.binary.len = type->MeterPubKey.arraylen.data; - memcpy(service->val.binary.data, type->MeterPubKey.data, service->val.binary.len); - - /* encode character MeterPubKey */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) - { - - return -1; - } - - - - - - - - /* encode end element of MeterPubKey */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2672,16 +2666,16 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService /* 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)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of MeterReading */ - if(serialize_FloatingValueType(service)<0) + if(serialize_FloatingValueType( &(type->MeterReading),service)) { return -1; } @@ -2692,7 +2686,7 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService /* encode end element of MeterReading */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2703,19 +2697,19 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService /* 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)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = INTEGER_16; - service->val.int32=service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterStatus; + service->val.int32=type->MeterStatus; /* encode character MeterStatus */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2726,7 +2720,7 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService /* encode end element of MeterStatus */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2737,19 +2731,19 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService /* element ID assignment of TMeter*/ service->eqn.namespaceURI=5; - service->eqn.localPart=38; + service->eqn.localPart=37; /* encode start element TMeter */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } - service->val.type = INTEGER_64; - service->val.int64=service->v2gMsg.Body.MeteringStatusRes.MeterInfo.TMeter; + service->val.type = INTEGER_32; + service->val.int32=type->TMeter; /* encode character TMeter */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2760,7 +2754,7 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService /* encode end element of TMeter */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2773,22 +2767,23 @@ static int serialize_MeterInfoType(struct MeterInfoType* type, struct v2gService static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, struct v2gService* service) { + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; service->eqn.localPart=47; /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.MeteringStatusRes.ResponseCode; + service->val.enumeration=type->ResponseCode; /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2799,7 +2794,7 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s /* encode end element of ResponseCode */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2809,7 +2804,7 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=3; /* encode start element EVSEID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2819,7 +2814,7 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s memcpy(service->val.binary.data, type->EVSEID.data, service->val.binary.len); /* encode character EVSEID */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2832,7 +2827,7 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s /* encode end element of EVSEID */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2842,14 +2837,14 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=7; /* encode start element EVSEStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of EVSEStatus */ - if(serialize_EVSEStatusType(service)<0) + if(serialize_EVSEStatusType( &(type->EVSEStatus),service)) { return -1; } @@ -2860,7 +2855,7 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s /* encode end element of EVSEStatus */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2870,17 +2865,17 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=63; /* encode start element TCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } - service->val.type = INTEGER_64; - service->val.int64=service->v2gMsg.Body.MeteringStatusRes.TCurrent; + service->val.type = INTEGER_32; + service->val.int32=type->TCurrent; /* encode character TCurrent */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -2891,7 +2886,7 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s /* encode end element of TCurrent */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2901,14 +2896,14 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=6; /* encode start element EVSEMaxPower */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of EVSEMaxPower */ - if(serialize_FloatingValueType(service)<0) + if(serialize_FloatingValueType( &(type->EVSEMaxPower),service)) { return -1; } @@ -2919,7 +2914,7 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s /* encode end element of EVSEMaxPower */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2931,14 +2926,14 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=25; /* encode start element PCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PCurrent */ - if(serialize_FloatingValueType(service)<0) + if(serialize_FloatingValueType( &(type->PCurrent),service)) { return -1; } @@ -2949,7 +2944,7 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s /* encode end element of PCurrent */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2962,14 +2957,14 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s service->eqn.namespaceURI=4; service->eqn.localPart=15; /* encode start element MeterInfo */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of MeterInfo */ - if(serialize_MeterInfoType( &(type->MeterInfo),service)<0) + if(serialize_MeterInfoType( &(type->MeterInfo),service)) { return -1; } @@ -2980,7 +2975,7 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s /* encode end element of MeterInfo */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -2992,7 +2987,8 @@ static int serialize_MeteringStatusResType(struct MeteringStatusResType* type, s static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, struct v2gService* service) -{if(type->isused.PEVID) +{ +if(type->isused.PEVID) { @@ -3000,7 +2996,7 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, service->eqn.namespaceURI=4; service->eqn.localPart=26; /* encode start element PEVID */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3011,7 +3007,7 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, memcpy(service->val.string.codepoints, type->PEVID.data, service->val.string.len); /* encode character PEVID */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -3023,7 +3019,7 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, /* encode end element of PEVID */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3034,14 +3030,14 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, service->eqn.namespaceURI=4; service->eqn.localPart=32; /* encode start element PEVStatus */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PEVStatus */ - if(serialize_PEVStatusType(service)<0) + if(serialize_PEVStatusType( &(type->PEVStatus),service)) { return -1; } @@ -3052,7 +3048,7 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, /* encode end element of PEVStatus */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3064,17 +3060,17 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, service->eqn.namespaceURI=4; service->eqn.localPart=63; /* encode start element TCurrent */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } - service->val.type = INTEGER_64; - service->val.int64=service->v2gMsg.Body.MeteringReceiptReq.TCurrent; + service->val.type = INTEGER_32; + service->val.int32=type->TCurrent; /* encode character TCurrent */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -3085,7 +3081,7 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, /* encode end element of TCurrent */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3096,17 +3092,17 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, service->eqn.namespaceURI=4; service->eqn.localPart=64; /* encode start element Tariff */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.MeteringReceiptReq.Tariff; + service->val.enumeration=type->Tariff; /* encode character Tariff */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -3117,7 +3113,7 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, /* encode end element of Tariff */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3127,14 +3123,14 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, service->eqn.namespaceURI=4; service->eqn.localPart=15; /* encode start element MeterInfo */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of MeterInfo */ - if(serialize_MeterInfoType( &(type->MeterInfo),service)<0) + if(serialize_MeterInfoType( &(type->MeterInfo),service)) { return -1; } @@ -3145,7 +3141,7 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, /* encode end element of MeterInfo */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3155,24 +3151,25 @@ static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, } -static int serialize_MeteringReceiptResType(struct v2gService* service) +static int serialize_MeteringReceiptResType(struct MeteringReceiptResType* type, struct v2gService* service) { + /* element ID assignment of ResponseCode*/ service->eqn.namespaceURI=4; service->eqn.localPart=47; /* encode start element ResponseCode */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } service->val.type = ENUMERATION; - service->val.enumeration=service->v2gMsg.Body.MeteringReceiptRes.ResponseCode; + service->val.enumeration=type->ResponseCode; /* encode character ResponseCode */ - if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) + if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val))) { return -1; @@ -3183,7 +3180,7 @@ static int serialize_MeteringReceiptResType(struct v2gService* service) /* encode end element of ResponseCode */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3194,7 +3191,8 @@ static int serialize_MeteringReceiptResType(struct v2gService* service) static int serialize_BodyType(struct BodyType* type, struct v2gService* service) -{if(type->isused.SessionSetupReq) +{ +if(type->isused.SessionSetupReq) { @@ -3202,14 +3200,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=59; /* encode start element SessionSetupReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of SessionSetupReq */ - if(serialize_SessionSetupReqType( &(type->SessionSetupReq),service)<0) + if(serialize_SessionSetupReqType( &(type->SessionSetupReq),service)) { return -1; } @@ -3220,7 +3218,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of SessionSetupReq */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3233,14 +3231,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=61; /* encode start element SessionSetupRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of SessionSetupRes */ - if(serialize_SessionSetupResType( &(type->SessionSetupRes),service)<0) + if(serialize_SessionSetupResType( &(type->SessionSetupRes),service)) { return -1; } @@ -3251,7 +3249,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of SessionSetupRes */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3264,14 +3262,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=48; /* encode start element ServiceDiscoveryReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of ServiceDiscoveryReq */ - if(serialize_ServiceDiscoveryReqType( &(type->ServiceDiscoveryReq),service)<0) + if(serialize_ServiceDiscoveryReqType( &(type->ServiceDiscoveryReq),service)) { return -1; } @@ -3282,7 +3280,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of ServiceDiscoveryReq */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3295,14 +3293,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=50; /* encode start element ServiceDiscoveryRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of ServiceDiscoveryRes */ - if(serialize_ServiceDiscoveryResType( &(type->ServiceDiscoveryRes),service)<0) + if(serialize_ServiceDiscoveryResType( &(type->ServiceDiscoveryRes),service)) { return -1; } @@ -3313,7 +3311,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of ServiceDiscoveryRes */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3326,14 +3324,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=53; /* encode start element ServicePaymentSelectionReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of ServicePaymentSelectionReq */ - if(serialize_ServicePaymentSelectionReqType( &(type->ServicePaymentSelectionReq),service)<0) + if(serialize_ServicePaymentSelectionReqType( &(type->ServicePaymentSelectionReq),service)) { return -1; } @@ -3344,7 +3342,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of ServicePaymentSelectionReq */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3357,14 +3355,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=55; /* encode start element ServicePaymentSelectionRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of ServicePaymentSelectionRes */ - if(serialize_ServicePaymentSelectionResType( &(type->ServicePaymentSelectionRes),service)<0) + if(serialize_ServicePaymentSelectionResType( &(type->ServicePaymentSelectionRes),service)) { return -1; } @@ -3375,7 +3373,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of ServicePaymentSelectionRes */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3388,14 +3386,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=33; /* encode start element PaymentDetailsReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PaymentDetailsReq */ - if(serialize_PaymentDetailsReqType( &(type->PaymentDetailsReq),service)<0) + if(serialize_PaymentDetailsReqType( &(type->PaymentDetailsReq),service)) { return -1; } @@ -3406,7 +3404,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of PaymentDetailsReq */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3419,14 +3417,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=35; /* encode start element PaymentDetailsRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PaymentDetailsRes */ - if(serialize_PaymentDetailsResType(service)<0) + if(serialize_PaymentDetailsResType( &(type->PaymentDetailsRes),service)) { return -1; } @@ -3437,7 +3435,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of PaymentDetailsRes */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3450,14 +3448,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=41; /* encode start element PowerDiscoveryReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PowerDiscoveryReq */ - if(serialize_PowerDiscoveryReqType( &(type->PowerDiscoveryReq),service)<0) + if(serialize_PowerDiscoveryReqType( &(type->PowerDiscoveryReq),service)) { return -1; } @@ -3468,7 +3466,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of PowerDiscoveryReq */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3481,14 +3479,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=43; /* encode start element PowerDiscoveryRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PowerDiscoveryRes */ - if(serialize_PowerDiscoveryResType( &(type->PowerDiscoveryRes),service)<0) + if(serialize_PowerDiscoveryResType( &(type->PowerDiscoveryRes),service)) { return -1; } @@ -3499,7 +3497,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of PowerDiscoveryRes */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3512,14 +3510,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=11; /* encode start element LineLockReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of LineLockReq */ - if(serialize_LineLockReqType( &(type->LineLockReq),service)<0) + if(serialize_LineLockReqType( &(type->LineLockReq),service)) { return -1; } @@ -3530,7 +3528,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of LineLockReq */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3543,14 +3541,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=13; /* encode start element LineLockRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of LineLockRes */ - if(serialize_LineLockResType( &(type->LineLockRes),service)<0) + if(serialize_LineLockResType( &(type->LineLockRes),service)) { return -1; } @@ -3561,7 +3559,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of LineLockRes */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3574,14 +3572,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=37; /* encode start element PowerDeliveryReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PowerDeliveryReq */ - if(serialize_PowerDeliveryReqType( &(type->PowerDeliveryReq),service)<0) + if(serialize_PowerDeliveryReqType( &(type->PowerDeliveryReq),service)) { return -1; } @@ -3592,7 +3590,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of PowerDeliveryReq */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3605,14 +3603,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=39; /* encode start element PowerDeliveryRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of PowerDeliveryRes */ - if(serialize_PowerDeliveryResType(service)<0) + if(serialize_PowerDeliveryResType( &(type->PowerDeliveryRes),service)) { return -1; } @@ -3623,7 +3621,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of PowerDeliveryRes */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3636,14 +3634,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=21; /* encode start element MeteringStatusReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of MeteringStatusReq */ - if(serialize_MeteringStatusReqType(service)<0) + if(serialize_MeteringStatusReqType( &(type->MeteringStatusReq),service)) { return -1; } @@ -3654,7 +3652,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of MeteringStatusReq */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3667,14 +3665,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=23; /* encode start element MeteringStatusRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of MeteringStatusRes */ - if(serialize_MeteringStatusResType( &(type->MeteringStatusRes),service)<0) + if(serialize_MeteringStatusResType( &(type->MeteringStatusRes),service)) { return -1; } @@ -3685,7 +3683,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of MeteringStatusRes */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3698,14 +3696,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=17; /* encode start element MeteringReceiptReq */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of MeteringReceiptReq */ - if(serialize_MeteringReceiptReqType( &(type->MeteringReceiptReq),service)<0) + if(serialize_MeteringReceiptReqType( &(type->MeteringReceiptReq),service)) { return -1; } @@ -3716,7 +3714,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of MeteringReceiptReq */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3729,14 +3727,14 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) service->eqn.namespaceURI=4; service->eqn.localPart=19; /* encode start element MeteringReceiptRes */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of MeteringReceiptRes */ - if(serialize_MeteringReceiptResType(service)<0) + if(serialize_MeteringReceiptResType( &(type->MeteringReceiptRes),service)) { return -1; } @@ -3747,7 +3745,7 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* service) /* encode end element of MeteringReceiptRes */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3760,19 +3758,20 @@ static int serialize_BodyType(struct BodyType* type, struct v2gService* 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)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of Header */ - if(serialize_HeaderType( &(type->Header),service)<0) + if(serialize_HeaderType( &(type->Header),service)) { return -1; } @@ -3783,7 +3782,7 @@ static int serialize_AnonType_V2G_Message(struct AnonType_V2G_Message* type, str /* encode end element of Header */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3793,14 +3792,14 @@ static int serialize_AnonType_V2G_Message(struct AnonType_V2G_Message* type, str service->eqn.namespaceURI=6; service->eqn.localPart=0; /* encode start element Body */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } /* encode children of Body */ - if(serialize_BodyType( &(type->Body),service)<0) + if(serialize_BodyType( &(type->Body),service)) { return -1; } @@ -3811,7 +3810,7 @@ static int serialize_AnonType_V2G_Message(struct AnonType_V2G_Message* type, str /* encode end element of Body */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3831,7 +3830,7 @@ static int serialize_AnonType_V2G_Message(struct AnonType_V2G_Message* type, str /* encode start document */ - if (exiEncodeStartDocument(&(service->outStream), &(service->stateEncode)) < 0) + if (exiEncodeStartDocument(&(service->outStream), &(service->stateEncode)) ) { return -1; @@ -3842,18 +3841,25 @@ static int serialize_AnonType_V2G_Message(struct AnonType_V2G_Message* type, str service->eqn.localPart=8; /* encode start element V2G_Message */ - if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; } - serialize_AnonType_V2G_Message(&(service->v2gMsg), service); + + /* encode root element of V2G_Message */ + if (serialize_AnonType_V2G_Message(&(service->v2gMsg), service)) + { + + return -1; + } + /* encode end element of V2G_Message */ - if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0) + if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn))) { return -1; @@ -3861,7 +3867,7 @@ static int serialize_AnonType_V2G_Message(struct AnonType_V2G_Message* type, str /* encode end document */ - if (exiEncodeEndDocument(&(service->outStream), &(service->stateEncode)) < 0) { + if (exiEncodeEndDocument(&(service->outStream), &(service->stateEncode))) { return -1; } diff --git a/src/service/v2g_serviceDataSerializiation.h b/src/service/v2g_serviceDataSerializiation.h index 145e432..88d1fb3 100644 --- a/src/service/v2g_serviceDataSerializiation.h +++ b/src/service/v2g_serviceDataSerializiation.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/service/v2g_serviceDataTypes.c b/src/service/v2g_serviceDataTypes.c index 9291a0d..e162b3c 100644 --- a/src/service/v2g_serviceDataTypes.c +++ b/src/service/v2g_serviceDataTypes.c @@ -19,7 +19,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -314,18 +314,10 @@ static void init_MeterInfoType_MeterID(struct MeterInfoType_MeterID* type) } -static void init_MeterInfoType_MeterPubKey(struct MeterInfoType_MeterPubKey* type) -{ - type->arraylen.data=0; - -} - static void init_MeterInfoType(struct MeterInfoType* type) { init_MeterInfoType_MeterID(&(type->MeterID)); - type->isused.MeterID=0; - init_MeterInfoType_MeterPubKey(&(type->MeterPubKey)); - type->isused.MeterPubKey=0; + type->isused.MeterID=0; type->isused.MeterReading=0; type->isused.MeterStatus=0; type->isused.TMeter=0; diff --git a/src/service/v2g_serviceDataTypes.h b/src/service/v2g_serviceDataTypes.h index b53b7d8..e691f0c 100644 --- a/src/service/v2g_serviceDataTypes.h +++ b/src/service/v2g_serviceDataTypes.h @@ -19,7 +19,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -128,18 +128,12 @@ enum unitSymbolType F, g, h, - H, - Hz, - Hz_1, J, J_s, kg_J, min, N, - C, ohm, - Pa, - rad, s, S, s_1, @@ -243,6 +237,7 @@ struct selection_SessionInformationType unsigned int ServiceSessionID:1; unsigned int ProtocolVersion:1; + }; struct arraylen_SessionInformationType_ProtocolVersion @@ -274,6 +269,7 @@ struct selection_NotificationType unsigned int FaultMsg:1; unsigned int EventList:1; + }; struct arraylen_NotificationType_FaultMsg @@ -379,6 +375,7 @@ struct selection_BodyType unsigned int MeteringReceiptReq:1; unsigned int MeteringReceiptRes:1; + }; struct arraylen_SessionSetupResType_EVSEID @@ -402,7 +399,7 @@ struct EVSEStatusType int ConnectorLocked; int PowerSwitchClosed; int RCD; - int64_t ShutDownTime; + int32_t ShutDownTime; }; @@ -412,7 +409,7 @@ struct SessionSetupResType enum responseCode_SessionSetupType ResponseCode; struct SessionSetupResType_EVSEID EVSEID; struct EVSEStatusType EVSEStatus; - int64_t TCurrent; + int32_t TCurrent; }; @@ -620,7 +617,7 @@ struct FloatingValueType { enum unitMultiplierType Multiplier; enum unitSymbolType Unit; - int64_t Value; + int32_t Value; }; @@ -628,10 +625,10 @@ struct FloatingValueType struct PowerDiscoveryReqType { struct PEVStatusType PEVStatus; - int64_t EoC; + int32_t EoC; struct FloatingValueType EAmount; struct FloatingValueType PEVMaxPower; - int32_t PEVMaxPhases; + int16_t PEVMaxPhases; struct FloatingValueType PEVMaxVoltage; struct FloatingValueType PEVMinVoltage; @@ -657,6 +654,7 @@ struct selection_PowerDiscoveryResType unsigned int EnergyProvider:1; unsigned int TariffTable:1; + }; struct arraylen_TariffTableType_Currency @@ -691,6 +689,7 @@ struct selection_TariffDescrType { unsigned int TariffDescription:1; + }; struct selection_TariffEntryType @@ -753,7 +752,7 @@ struct PowerDiscoveryResType struct EVSEStatusType EVSEStatus; struct FloatingValueType EVSEVoltage; struct FloatingValueType EVSEIMax; - int32_t EVSEMaxPhases; + int16_t EVSEMaxPhases; struct PowerDiscoveryResType_EnergyProvider EnergyProvider; struct TariffTableType TariffTable; struct selection_PowerDiscoveryResType isused; @@ -786,7 +785,7 @@ struct selection_PowerDeliveryReqType struct ChargingProfileType { - int64_t ChargingProfileEntryStart; + int32_t ChargingProfileEntryStart; struct FloatingValueType ChargingProfileEntryMaxPower; @@ -833,8 +832,8 @@ struct MeteringStatusResType_EVSEID struct selection_MeteringStatusResType { - unsigned int PCurrent:1; - unsigned int MeterInfo:1; + unsigned int PCurrent:1; + unsigned int MeterInfo:1; }; @@ -856,7 +855,6 @@ struct MeterInfoType_MeterID struct selection_MeterInfoType { unsigned int MeterID:1; - unsigned int MeterPubKey:1; unsigned int MeterReading:1; unsigned int MeterStatus:1; unsigned int TMeter:1; @@ -864,27 +862,12 @@ struct selection_MeterInfoType }; -struct arraylen_MeterInfoType_MeterPubKey -{ - size_t data; - - -}; - -struct MeterInfoType_MeterPubKey -{ - uint8_t data[64]; - struct arraylen_MeterInfoType_MeterPubKey arraylen; - -}; - struct MeterInfoType { struct MeterInfoType_MeterID MeterID; - struct MeterInfoType_MeterPubKey MeterPubKey; struct FloatingValueType MeterReading; - int32_t MeterStatus; - int64_t TMeter; + int16_t MeterStatus; + int32_t TMeter; struct selection_MeterInfoType isused; }; @@ -894,7 +877,7 @@ struct MeteringStatusResType enum responseCode_MeteringStatusType ResponseCode; struct MeteringStatusResType_EVSEID EVSEID; struct EVSEStatusType EVSEStatus; - int64_t TCurrent; + int32_t TCurrent; struct FloatingValueType EVSEMaxPower; struct FloatingValueType PCurrent; struct MeterInfoType MeterInfo; @@ -928,7 +911,7 @@ struct MeteringReceiptReqType { struct MeteringReceiptReqType_PEVID PEVID; struct PEVStatusType PEVStatus; - int64_t TCurrent; + int32_t TCurrent; enum tariffIDType Tariff; struct MeterInfoType MeterInfo; struct selection_MeteringReceiptReqType isused; diff --git a/src/service/v2g_serviceDispatcher.c b/src/service/v2g_serviceDispatcher.c index e310066..2a1296a 100644 --- a/src/service/v2g_serviceDispatcher.c +++ b/src/service/v2g_serviceDispatcher.c @@ -21,7 +21,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -128,9 +128,9 @@ static int deserializeElementCharacter(struct v2gService* service) break; case 10: /*EoC*/ - if(service->val.type == INTEGER_64) + if(service->val.type == INTEGER_32) { - service->v2gMsg.Body.PowerDiscoveryReq.EoC=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryReq.EoC=service->val.int32; } else { @@ -185,9 +185,9 @@ static int deserializeElementCharacter(struct v2gService* service) service->v2gMsg.Body.PowerDeliveryReq.isused.Tariff=1; break; case 63: /*TCurrent*/ - if(service->val.type == INTEGER_64) + if(service->val.type == INTEGER_32) { - service->v2gMsg.Body.MeteringReceiptReq.TCurrent=service->val.int64; + service->v2gMsg.Body.MeteringReceiptReq.TCurrent=service->val.int32; } else { @@ -201,7 +201,7 @@ static int deserializeElementCharacter(struct v2gService* service) break; case 5: switch(service->eqn.localPart) { - case 35: /*SessionID*/ + case 34: /*SessionID*/ if(service->val.type == BINARY_HEX) { @@ -216,7 +216,7 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 33: /*ServiceSessionID*/ + case 32: /*ServiceSessionID*/ if(service->val.type == BINARY_HEX) { @@ -233,7 +233,7 @@ static int deserializeElementCharacter(struct v2gService* service) /* is used */ service->v2gMsg.Header.SessionInformation.isused.ServiceSessionID=1; break; - case 25: /*ProtocolVersion*/ + case 24: /*ProtocolVersion*/ if(service->val.type == STRING) { @@ -312,7 +312,7 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.PowerDeliveryReq.PEVStatus.ConnectorLocked=service->val.boolean; - } else if(service->idPath.id[1] == 17) + } else if(service->idPath.id[2] == 17) { service->v2gMsg.Body.MeteringReceiptReq.PEVStatus.ConnectorLocked=service->val.boolean; @@ -343,7 +343,7 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.PowerDeliveryReq.PEVStatus.ChargerStandby=service->val.boolean; - } else if(service->idPath.id[1] == 17) + } else if(service->idPath.id[2] == 17) { service->v2gMsg.Body.MeteringReceiptReq.PEVStatus.ChargerStandby=service->val.boolean; @@ -355,7 +355,7 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 21: /*Multiplier*/ + case 20: /*Multiplier*/ if(service->val.type == ENUMERATION) { if(service->idPath.id[3] == 2) @@ -386,7 +386,7 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Multiplier=service->val.enumeration; - } else if(service->idPath.id[2] == 25) + } else if(service->idPath.id[3] == 25) { service->v2gMsg.Body.MeteringStatusRes.PCurrent.Multiplier=service->val.enumeration; @@ -394,15 +394,15 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryMaxPower.Multiplier=service->val.enumeration; - } else if(service->idPath.id[1] == 23) + } else if(service->idPath.id[2] == 23) { service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Multiplier=service->val.enumeration; - } else if(service->idPath.id[7] == 47) + } 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[6] == 6) + } 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; @@ -414,7 +414,7 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 50: /*Unit*/ + case 49: /*Unit*/ if(service->val.type == ENUMERATION) { if(service->idPath.id[3] == 2) @@ -445,7 +445,7 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Unit=service->val.enumeration; - } else if(service->idPath.id[2] == 25) + } else if(service->idPath.id[3] == 25) { service->v2gMsg.Body.MeteringStatusRes.PCurrent.Unit=service->val.enumeration; @@ -453,15 +453,15 @@ static int deserializeElementCharacter(struct v2gService* service) { service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryMaxPower.Unit=service->val.enumeration; - } else if(service->idPath.id[1] == 23) + } else if(service->idPath.id[2] == 23) { service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Unit=service->val.enumeration; - } else if(service->idPath.id[7] == 47) + } 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[6] == 6) + } 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; @@ -473,56 +473,56 @@ static int deserializeElementCharacter(struct v2gService* service) } break; - case 51: /*Value*/ - if(service->val.type == INTEGER_64) + case 50: /*Value*/ + if(service->val.type == INTEGER_32) { if(service->idPath.id[3] == 2) { - service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Value=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Value=service->val.int32; } else if(service->idPath.id[3] == 28) { - service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPower.Value=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPower.Value=service->val.int32; } else if(service->idPath.id[3] == 29) { - service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxVoltage.Value=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxVoltage.Value=service->val.int32; } else if(service->idPath.id[3] == 30) { - service->v2gMsg.Body.PowerDiscoveryReq.PEVMinVoltage.Value=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryReq.PEVMinVoltage.Value=service->val.int32; } else if(service->idPath.id[3] == 8) { - service->v2gMsg.Body.PowerDiscoveryRes.EVSEVoltage.Value=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryRes.EVSEVoltage.Value=service->val.int32; } else if(service->idPath.id[3] == 4) { - service->v2gMsg.Body.PowerDiscoveryRes.EVSEIMax.Value=service->val.int64; + service->v2gMsg.Body.PowerDiscoveryRes.EVSEIMax.Value=service->val.int32; } else if(service->idPath.id[3] == 6) { - service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Value=service->val.int64; + service->v2gMsg.Body.MeteringStatusRes.EVSEMaxPower.Value=service->val.int32; - } else if(service->idPath.id[2] == 25) + } else if(service->idPath.id[3] == 25) { - service->v2gMsg.Body.MeteringStatusRes.PCurrent.Value=service->val.int64; + 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.int64; + service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryMaxPower.Value=service->val.int32; - } else if(service->idPath.id[1] == 23) + } else if(service->idPath.id[2] == 23) { - service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Value=service->val.int64; + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterReading.Value=service->val.int32; - } else if(service->idPath.id[7] == 47) + } 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.int64; + 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[6] == 6) + } 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.int64; + 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; } } @@ -533,9 +533,9 @@ static int deserializeElementCharacter(struct v2gService* service) break; case 2: /*ChargingProfileEntryStart*/ - if(service->val.type == INTEGER_64) + if(service->val.type == INTEGER_32) { - service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryStart=service->val.int64; + service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryStart=service->val.int32; } else { @@ -561,31 +561,14 @@ static int deserializeElementCharacter(struct v2gService* service) /* is used */ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterID=1; break; - case 18: /*MeterPubKey*/ - - if(service->val.type == BINARY_HEX) - { - /* array copy and array length assignment */ - memcpy(service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterPubKey.data, service->val.binary.data,service->val.binary.len); - service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterPubKey.arraylen.data = service->val.binary.len; - - } - else - { - return -1; /* wrong data type */ - } - - /* is used */ - service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterPubKey=1; - break; - case 20: /*MeterStatus*/ + case 19: /*MeterStatus*/ if(service->val.type == INTEGER_16) { if(service->idPath.id[2] == 23) { service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterStatus=service->val.int32; - } else if(service->idPath.id[1] == 17) + } else if(service->idPath.id[2] == 17) { service->v2gMsg.Body.MeteringReceiptReq.MeterInfo.MeterStatus=service->val.int32; @@ -599,16 +582,16 @@ static int deserializeElementCharacter(struct v2gService* service) /* is used */ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterStatus=1; break; - case 38: /*TMeter*/ - if(service->val.type == INTEGER_64) + case 37: /*TMeter*/ + if(service->val.type == INTEGER_32) { if(service->idPath.id[2] == 23) { - service->v2gMsg.Body.MeteringStatusRes.MeterInfo.TMeter=service->val.int64; + service->v2gMsg.Body.MeteringStatusRes.MeterInfo.TMeter=service->val.int32; - } else if(service->idPath.id[1] == 17) + } else if(service->idPath.id[2] == 17) { - service->v2gMsg.Body.MeteringReceiptReq.MeterInfo.TMeter=service->val.int64; + service->v2gMsg.Body.MeteringReceiptReq.MeterInfo.TMeter=service->val.int32; } } @@ -676,6 +659,15 @@ static int deserializeElementOrServiceCall(struct v2gService* service) case 59:/* SessionSetupReq */ + + + /* test, if data length is unequal to the expected payload */ + if((service->inStream.size)!= *(service->inStream.pos)) + { + service->errorCode = V2G_NON_VALID_MESSAGE; + return -1; + } + /* service call */ sessionSetup(&(service->v2gMsg.Body.SessionSetupReq), &(service->v2gMsg.Body.SessionSetupRes)); @@ -683,7 +675,11 @@ static int deserializeElementOrServiceCall(struct v2gService* service) service->v2gMsg.Body.isused.SessionSetupRes=1; /* serialize the response data */ - serialize_message(service); + if(serialize_message(service)) + { + /* serializiation error*/ + service->errorCode= V2G_SERIALIZATION_FAILED; + } @@ -691,6 +687,15 @@ static int deserializeElementOrServiceCall(struct v2gService* service) case 48:/* ServiceDiscoveryReq */ + + + /* test, if data length is unequal to the expected payload */ + if((service->inStream.size)!= *(service->inStream.pos)) + { + service->errorCode = V2G_NON_VALID_MESSAGE; + return -1; + } + /* service call */ serviceDiscovery(&(service->v2gMsg.Body.ServiceDiscoveryReq), &(service->v2gMsg.Body.ServiceDiscoveryRes)); @@ -698,7 +703,11 @@ static int deserializeElementOrServiceCall(struct v2gService* service) service->v2gMsg.Body.isused.ServiceDiscoveryRes=1; /* serialize the response data */ - serialize_message(service); + if(serialize_message(service)) + { + /* serializiation error*/ + service->errorCode= V2G_SERIALIZATION_FAILED; + } @@ -706,6 +715,15 @@ static int deserializeElementOrServiceCall(struct v2gService* service) case 53:/* ServicePaymentSelectionReq */ + + + /* test, if data length is unequal to the expected payload */ + if((service->inStream.size)!= *(service->inStream.pos)) + { + service->errorCode = V2G_NON_VALID_MESSAGE; + return -1; + } + /* service call */ selectedServicePayment(&(service->v2gMsg.Body.ServicePaymentSelectionReq), &(service->v2gMsg.Body.ServicePaymentSelectionRes)); @@ -713,7 +731,11 @@ static int deserializeElementOrServiceCall(struct v2gService* service) service->v2gMsg.Body.isused.ServicePaymentSelectionRes=1; /* serialize the response data */ - serialize_message(service); + if(serialize_message(service)) + { + /* serializiation error*/ + service->errorCode= V2G_SERIALIZATION_FAILED; + } @@ -721,6 +743,15 @@ static int deserializeElementOrServiceCall(struct v2gService* service) case 33:/* PaymentDetailsReq */ + + + /* test, if data length is unequal to the expected payload */ + if((service->inStream.size)!= *(service->inStream.pos)) + { + service->errorCode = V2G_NON_VALID_MESSAGE; + return -1; + } + /* service call */ paymentDetails(&(service->v2gMsg.Body.PaymentDetailsReq), &(service->v2gMsg.Body.PaymentDetailsRes)); @@ -728,7 +759,11 @@ static int deserializeElementOrServiceCall(struct v2gService* service) service->v2gMsg.Body.isused.PaymentDetailsRes=1; /* serialize the response data */ - serialize_message(service); + if(serialize_message(service)) + { + /* serializiation error*/ + service->errorCode= V2G_SERIALIZATION_FAILED; + } @@ -736,6 +771,15 @@ static int deserializeElementOrServiceCall(struct v2gService* service) case 41:/* PowerDiscoveryReq */ + + + /* test, if data length is unequal to the expected payload */ + if((service->inStream.size)!= *(service->inStream.pos)) + { + service->errorCode = V2G_NON_VALID_MESSAGE; + return -1; + } + /* service call */ powerDiscovery(&(service->v2gMsg.Body.PowerDiscoveryReq), &(service->v2gMsg.Body.PowerDiscoveryRes)); @@ -743,7 +787,11 @@ static int deserializeElementOrServiceCall(struct v2gService* service) service->v2gMsg.Body.isused.PowerDiscoveryRes=1; /* serialize the response data */ - serialize_message(service); + if(serialize_message(service)) + { + /* serializiation error*/ + service->errorCode= V2G_SERIALIZATION_FAILED; + } @@ -751,6 +799,15 @@ static int deserializeElementOrServiceCall(struct v2gService* service) case 11:/* LineLockReq */ + + + /* test, if data length is unequal to the expected payload */ + if((service->inStream.size)!= *(service->inStream.pos)) + { + service->errorCode = V2G_NON_VALID_MESSAGE; + return -1; + } + /* service call */ lineLock(&(service->v2gMsg.Body.LineLockReq), &(service->v2gMsg.Body.LineLockRes)); @@ -758,7 +815,11 @@ static int deserializeElementOrServiceCall(struct v2gService* service) service->v2gMsg.Body.isused.LineLockRes=1; /* serialize the response data */ - serialize_message(service); + if(serialize_message(service)) + { + /* serializiation error*/ + service->errorCode= V2G_SERIALIZATION_FAILED; + } @@ -766,6 +827,15 @@ static int deserializeElementOrServiceCall(struct v2gService* service) case 37:/* PowerDeliveryReq */ + + + /* test, if data length is unequal to the expected payload */ + if((service->inStream.size)!= *(service->inStream.pos)) + { + service->errorCode = V2G_NON_VALID_MESSAGE; + return -1; + } + /* service call */ powerDelivery(&(service->v2gMsg.Body.PowerDeliveryReq), &(service->v2gMsg.Body.PowerDeliveryRes)); @@ -773,7 +843,11 @@ static int deserializeElementOrServiceCall(struct v2gService* service) service->v2gMsg.Body.isused.PowerDeliveryRes=1; /* serialize the response data */ - serialize_message(service); + if(serialize_message(service)) + { + /* serializiation error*/ + service->errorCode= V2G_SERIALIZATION_FAILED; + } @@ -781,6 +855,15 @@ static int deserializeElementOrServiceCall(struct v2gService* service) case 21:/* MeteringStatusReq */ + + + /* test, if data length is unequal to the expected payload */ + if((service->inStream.size)!= *(service->inStream.pos)) + { + service->errorCode = V2G_NON_VALID_MESSAGE; + return -1; + } + /* service call */ meteringStatus(&(service->v2gMsg.Body.MeteringStatusReq), &(service->v2gMsg.Body.MeteringStatusRes)); @@ -788,7 +871,11 @@ static int deserializeElementOrServiceCall(struct v2gService* service) service->v2gMsg.Body.isused.MeteringStatusRes=1; /* serialize the response data */ - serialize_message(service); + if(serialize_message(service)) + { + /* serializiation error*/ + service->errorCode= V2G_SERIALIZATION_FAILED; + } @@ -796,6 +883,15 @@ static int deserializeElementOrServiceCall(struct v2gService* service) case 17:/* MeteringReceiptReq */ + + + /* test, if data length is unequal to the expected payload */ + if((service->inStream.size)!= *(service->inStream.pos)) + { + service->errorCode = V2G_NON_VALID_MESSAGE; + return -1; + } + /* service call */ meteringReceipt(&(service->v2gMsg.Body.MeteringReceiptReq), &(service->v2gMsg.Body.MeteringReceiptRes)); @@ -803,7 +899,11 @@ static int deserializeElementOrServiceCall(struct v2gService* service) service->v2gMsg.Body.isused.MeteringReceiptRes=1; /* serialize the response data */ - serialize_message(service); + if(serialize_message(service)) + { + /* serializiation error*/ + service->errorCode= V2G_SERIALIZATION_FAILED; + } @@ -812,13 +912,13 @@ static int deserializeElementOrServiceCall(struct v2gService* service) break; case 5: switch(service->eqn.localPart) { - case 33:/* ServiceSessionID */ + case 32:/* ServiceSessionID */ /* is used */ service->v2gMsg.Header.SessionInformation.isused.ServiceSessionID=1; break; - case 25:/* ProtocolVersion */ + case 24:/* ProtocolVersion */ /* is used */ @@ -848,25 +948,19 @@ static int deserializeElementOrServiceCall(struct v2gService* service) /* is used */ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterID=1; break; - case 18:/* MeterPubKey */ - - - /* is used */ - service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterPubKey=1; - break; - case 19:/* MeterReading */ + case 18:/* MeterReading */ /* is used */ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterReading=1; break; - case 20:/* MeterStatus */ + case 19:/* MeterStatus */ /* is used */ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterStatus=1; break; - case 38:/* TMeter */ + case 37:/* TMeter */ /* is used */ @@ -897,49 +991,55 @@ static int deserializeElementOrServiceCall(struct v2gService* service) static int deserializeMessage(struct v2gService* service) { int noEndOfDocument = 1; /* true */ - int errno=0; + int returnCode=0; do { exiDecodeNextEvent(&(service->inStream), &(service->stateDecode), &(service->event)); - if (errno < 0) { - printf("[ERROR] %d \n", errno); - return errno; + if (returnCode) + { + + if(service->errorCode==0) + { + service->errorCode= V2G_NON_VALID_MESSAGE; + } + + return returnCode; } switch (service->event) { case START_DOCUMENT: - errno = exiDecodeStartDocument(&(service->inStream), &(service->stateDecode)); + returnCode = exiDecodeStartDocument(&(service->inStream), &(service->stateDecode)); break; case END_DOCUMENT: - errno = exiDecodeEndDocument(&(service->inStream), &(service->stateDecode)); + returnCode = exiDecodeEndDocument(&(service->inStream), &(service->stateDecode)); noEndOfDocument = 0; /* false */ break; case START_ELEMENT: - errno = exiDecodeStartElement(&(service->inStream), &(service->stateDecode), &(service->eqn)); + returnCode = exiDecodeStartElement(&(service->inStream), &(service->stateDecode), &(service->eqn)); service->idPath.id[service->idPath.pos++]=service->eqn.localPart; break; case END_ELEMENT: - errno = exiDecodeEndElement(&(service->inStream), &(service->stateDecode), &(service->eqn)); - errno = deserializeElementOrServiceCall(service); + returnCode = exiDecodeEndElement(&(service->inStream), &(service->stateDecode), &(service->eqn)); + returnCode = deserializeElementOrServiceCall(service); service->idPath.pos--; break; case CHARACTERS: /* decode */ - errno = exiDecodeCharacters(&(service->inStream), &(service->stateDecode), &(service->val)); + returnCode = exiDecodeCharacters(&(service->inStream), &(service->stateDecode), &(service->val)); /* assign data to the v2g message structure */ - errno = deserializeElementCharacter(service); + returnCode = deserializeElementCharacter(service); break; case ATTRIBUTE: /* decode */ - /* errno = exiDecodeAttribute(&isStream, &stateDecode, &eqn, &val); */ + /* returnCode = exiDecodeAttribute(&isStream, &stateDecode, &eqn, &val); */ break; default: /* ERROR */ @@ -956,28 +1056,30 @@ static int deserializeMessage(struct v2gService* service) * Takes the EXI stream, invokes the called service method, and provides the response EXI stream * @return 0 = 0K; -1 = ERROR */ -int messageDispatcher(struct v2gService* service, uint8_t* inStream, size_t sizeInStream, size_t* inPos, uint8_t* outStream, size_t sizeOutStream, size_t* outPos) +int messageDispatcher(struct v2gService* service, uint8_t* inStream, size_t sizeInStream, uint8_t* outStream, size_t sizeOutStream, size_t* outStreamLength) { - int responseCode; - + size_t inPos, outPos; + /* assign inStream data to service v2g structure */ + inPos = service->transportHeaderOffset; service->inStream.data = inStream; - service->inStream.size = sizeInStream; - service->inStream.pos = inPos; + service->inStream.size = sizeInStream+inPos; + service->inStream.pos = &inPos; service->inStream.buffer=0; service->inStream.capacity=0; - - + /* assign outStream data to service v2g structure */ + outPos=service->transportHeaderOffset; service->outStream.data = outStream; service->outStream.size = sizeOutStream; - service->outStream.pos = outPos; + service->outStream.pos = &outPos; service->outStream.buffer=0; service->outStream.capacity=8; - + /* clear error code */ + service->errorCode = 0; /* init EXI decoder (read header, set initial state) */ exiInitDecoder(&(service->inStream), &(service->stateDecode)); @@ -992,30 +1094,24 @@ int messageDispatcher(struct v2gService* service, uint8_t* inStream, size_t size init_AnonType_V2G_Message(&(service->v2gMsg)); /* deserialize the input stream and call the corresponding service */ - responseCode = deserializeMessage(service); - - - - if(responseCode<0) + if(deserializeMessage(service)) { - /* an error occurred */ - return -1; - } else if(responseCode==1) - { - - return 0; + return -1; /* something went wrong */ } + /* determine payload size (without transport offset) */ + outPos -= service->transportHeaderOffset; + *outStreamLength = outPos; + return 0; - } /** * Init the service * @return 0 = 0K; -1 = ERROR */ -int init_v2gservice(struct v2gService* service, bytes_t bytes, string_ucs_t string) +int init_v2gservice(struct v2gService* service, bytes_t bytes, string_ucs_t string, uint16_t transportHeaderOffset) { /* init byte array */ @@ -1024,6 +1120,8 @@ int init_v2gservice(struct v2gService* service, bytes_t bytes, string_ucs_t stri /* init string array */ service->val.string = string; + /* init offset for transport protocoll */ + service->transportHeaderOffset=transportHeaderOffset; return 0; } diff --git a/src/service/v2g_serviceDispatcher.h b/src/service/v2g_serviceDispatcher.h index bfefee1..026f0d0 100644 --- a/src/service/v2g_serviceDispatcher.h +++ b/src/service/v2g_serviceDispatcher.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ @@ -33,8 +33,8 @@ extern "C" { #include "v2g_serviceDataTypes.h" -int init_v2gservice(struct v2gService* service,bytes_t bytes, string_ucs_t string); -int messageDispatcher(struct v2gService* service, uint8_t* inStream, size_t sizeInStream, size_t* inPos, uint8_t* outStream, size_t sizeOutStream, size_t* outPos); +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_ */ diff --git a/src/service/v2g_serviceMethods.h b/src/service/v2g_serviceMethods.h index da77fa2..a154be8 100644 --- a/src/service/v2g_serviceMethods.h +++ b/src/service/v2g_serviceMethods.h @@ -22,7 +22,7 @@ /******************************************************************* * * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * ********************************************************************/ diff --git a/src/test/main.c b/src/test/main.c index c6d2be4..70f8325 100644 --- a/src/test/main.c +++ b/src/test/main.c @@ -19,10 +19,10 @@ * * @author Daniel.Peintner.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * - *Switch for sample programs: EXI codec only or for entire service
+ *Switch for sample programs: EXI codec only or for entire V2G service
* ********************************************************************/ @@ -33,12 +33,10 @@ 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); - /* network example 1 */ - /* return main_network_1(argc, argv); */ } diff --git a/src/test/main.h b/src/test/main.h index 64db40d..6f91a1b 100644 --- a/src/test/main.h +++ b/src/test/main.h @@ -19,7 +19,7 @@ * * @author Daniel.Peintner.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com - * @version 0.2.2 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * * @@ -30,6 +30,5 @@ int main_codec(int argc, char *argv[]); int main_service(int argc, char *argv[]); -int main_network_1(int argc, char *argv[]); #endif diff --git a/src/test/main_codec.c b/src/test/main_codec.c index fdb6215..1d20962 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.1 + * @version 0.3 * @contact Joerg.Heuer@siemens.com * *Sample program to illustrate how to read an EXI stream and
@@ -47,7 +47,7 @@ uint8_t bufferOut[BUFFER_SIZE];
uint8_t data[ARRAY_SIZE_BYTES];
uint32_t codepoints[ARRAY_SIZE_STRINGS];
-int mainX(int argc, char *argv[]) {
+int main_codec(int argc, char *argv[]) {
int errn = 0;
unsigned int i;
diff --git a/src/test/main_service.c b/src/test/main_service.c
index 1b55665..43c8e58 100644
--- a/src/test/main_service.c
+++ b/src/test/main_service.c
@@ -18,7 +18,7 @@
/*******************************************************************
*
* @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.2.2
+ * @version 0.3
* @contact Joerg.Heuer@siemens.com
*
********************************************************************/
@@ -29,6 +29,7 @@
#include "v2g_serviceDataTypes.h"
#include "v2g_serviceClientStubs.h"
#include "EXITypes.h"
+#include "doIP.h"
#include