diff --git a/.cproject b/.cproject
index 5af70ab..051a90d 100644
--- a/.cproject
+++ b/.cproject
@@ -32,11 +32,13 @@
-
-
+
+
@@ -472,6 +474,7 @@
+
@@ -930,6 +933,7 @@
+
diff --git a/src/codec/EXIDecoder.c b/src/codec/EXIDecoder.c
index e0d9ece..53db908 100644
--- a/src/codec/EXIDecoder.c
+++ b/src/codec/EXIDecoder.c
@@ -608,7 +608,22 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = START_ELEMENT;
return 0;
case 102:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), END_ELEMENT] */
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */
+ decodeNBitUnsignedInteger(stream, 2, &state->eventCode);
+ if (state->eventCode == 0) {
+ *nextEvent = START_ELEMENT;
+ return 0;
+ }
+ else if (state->eventCode == 1) {
+ *nextEvent = START_ELEMENT;
+ return 0;
+ }
+ else if (state->eventCode == 2) {
+ *nextEvent = END_ELEMENT;
+ return 0;
+ }
+ case 103:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
if (state->eventCode == 0) {
*nextEvent = START_ELEMENT;
@@ -618,7 +633,19 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 103:
+ case 104:
+ /* Element[END_ELEMENT] */
+ *nextEvent = END_ELEMENT;
+ return 0;
+ case 105:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */
+ *nextEvent = START_ELEMENT;
+ return 0;
+ case 106:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */
+ *nextEvent = START_ELEMENT;
+ return 0;
+ case 107:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
@@ -626,15 +653,15 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
*nextEvent = START_ELEMENT;
return 0;
- case 104:
+ case 108:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 105:
+ case 109:
/* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */
*nextEvent = CHARACTERS;
return 0;
- case 106:
+ case 110:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
@@ -642,39 +669,39 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
*nextEvent = START_ELEMENT;
return 0;
- case 107:
+ case 111:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC)] */
*nextEvent = START_ELEMENT;
return 0;
- case 108:
+ case 112:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EAmount)] */
*nextEvent = START_ELEMENT;
return 0;
- case 109:
+ case 113:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPower)] */
*nextEvent = START_ELEMENT;
return 0;
- case 110:
+ case 114:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases)] */
*nextEvent = START_ELEMENT;
return 0;
- case 111:
+ case 115:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxVoltage)] */
*nextEvent = START_ELEMENT;
return 0;
- case 113:
+ case 117:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMinVoltage)] */
*nextEvent = START_ELEMENT;
return 0;
- case 114:
+ case 118:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 112:
+ case 116:
/* FirstStartTagStartTag[CHARACTERS[INTEGER_16]] */
*nextEvent = CHARACTERS;
return 0;
- case 115:
+ case 119:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
@@ -682,24 +709,39 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
*nextEvent = START_ELEMENT;
return 0;
- case 116:
+ case 120:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */
*nextEvent = START_ELEMENT;
return 0;
- case 118:
+ case 122:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage)] */
*nextEvent = START_ELEMENT;
return 0;
- case 119:
+ case 123:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEIMax)] */
*nextEvent = START_ELEMENT;
return 0;
- case 120:
+ case 124:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases)] */
*nextEvent = START_ELEMENT;
return 0;
- case 121:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), END_ELEMENT] */
+ case 125:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */
+ decodeNBitUnsignedInteger(stream, 2, &state->eventCode);
+ if (state->eventCode == 0) {
+ *nextEvent = START_ELEMENT;
+ return 0;
+ }
+ else if (state->eventCode == 1) {
+ *nextEvent = START_ELEMENT;
+ return 0;
+ }
+ else if (state->eventCode == 2) {
+ *nextEvent = END_ELEMENT;
+ return 0;
+ }
+ case 126:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
if (state->eventCode == 0) {
*nextEvent = START_ELEMENT;
@@ -709,23 +751,127 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 122:
+ case 128:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 117:
+ case 121:
/* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */
*nextEvent = CHARACTERS;
return 0;
- case 124:
+ case 130:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 123:
+ case 127:
/* FirstStartTagStartTag[CHARACTERS[STRING]] */
*nextEvent = CHARACTERS;
return 0;
- case 125:
+ case 131:
+ /* Element[END_ELEMENT] */
+ *nextEvent = END_ELEMENT;
+ return 0;
+ case 129:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency)] */
+ *nextEvent = START_ELEMENT;
+ return 0;
+ case 132:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff)] */
+ *nextEvent = START_ELEMENT;
+ return 0;
+ case 134:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */
+ decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
+ if (state->eventCode == 0) {
+ *nextEvent = START_ELEMENT;
+ return 0;
+ }
+ else if (state->eventCode == 1) {
+ *nextEvent = END_ELEMENT;
+ return 0;
+ }
+ case 133:
+ /* FirstStartTagStartTag[CHARACTERS[STRING]] */
+ *nextEvent = CHARACTERS;
+ return 0;
+ case 136:
+ /* Element[END_ELEMENT] */
+ *nextEvent = END_ELEMENT;
+ return 0;
+ case 135:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */
+ *nextEvent = START_ELEMENT;
+ return 0;
+ case 137:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */
+ decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
+ if (state->eventCode == 0) {
+ *nextEvent = START_ELEMENT;
+ return 0;
+ }
+ else if (state->eventCode == 1) {
+ *nextEvent = START_ELEMENT;
+ return 0;
+ }
+ case 138:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */
+ *nextEvent = START_ELEMENT;
+ return 0;
+ case 140:
+ /* Element[END_ELEMENT] */
+ *nextEvent = END_ELEMENT;
+ return 0;
+ case 139:
+ /* FirstStartTagStartTag[CHARACTERS[STRING]] */
+ *nextEvent = CHARACTERS;
+ return 0;
+ case 142:
+ /* Element[END_ELEMENT] */
+ *nextEvent = END_ELEMENT;
+ return 0;
+ case 141:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */
+ *nextEvent = START_ELEMENT;
+ return 0;
+ case 143:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */
+ decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
+ if (state->eventCode == 0) {
+ *nextEvent = START_ELEMENT;
+ return 0;
+ }
+ else if (state->eventCode == 1) {
+ *nextEvent = END_ELEMENT;
+ return 0;
+ }
+ case 144:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */
+ *nextEvent = START_ELEMENT;
+ return 0;
+ case 145:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffPMax)] */
+ *nextEvent = START_ELEMENT;
+ return 0;
+ case 147:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */
+ decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
+ if (state->eventCode == 0) {
+ *nextEvent = START_ELEMENT;
+ return 0;
+ }
+ else if (state->eventCode == 1) {
+ *nextEvent = END_ELEMENT;
+ return 0;
+ }
+ case 148:
+ /* Element[END_ELEMENT] */
+ *nextEvent = END_ELEMENT;
+ return 0;
+ case 146:
+ /* FirstStartTagStartTag[CHARACTERS[UNSIGNED_INTEGER_32]] */
+ *nextEvent = CHARACTERS;
+ return 0;
+ case 149:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
@@ -744,7 +890,7 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 126:
+ case 150:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
if (state->eventCode == 0) {
@@ -755,23 +901,23 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 128:
+ case 152:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 127:
+ case 151:
/* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */
*nextEvent = CHARACTERS;
return 0;
- case 130:
+ case 154:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 129:
+ case 153:
/* FirstStartTagStartTag[CHARACTERS[STRING]] */
*nextEvent = CHARACTERS;
return 0;
- case 131:
+ case 155:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
@@ -779,7 +925,7 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
*nextEvent = START_ELEMENT;
return 0;
- case 132:
+ case 156:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
if (state->eventCode == 0) {
@@ -790,23 +936,23 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 134:
+ case 158:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 133:
+ case 157:
/* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */
*nextEvent = CHARACTERS;
return 0;
- case 136:
+ case 160:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 135:
+ case 159:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */
*nextEvent = START_ELEMENT;
return 0;
- case 137:
+ case 161:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
if (state->eventCode == 0) {
@@ -817,35 +963,12 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 138:
+ case 162:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */
*nextEvent = START_ELEMENT;
return 0;
- case 139:
- /* 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), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), 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 141:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
+ case 163:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 2, &state->eventCode);
if (state->eventCode == 0) {
*nextEvent = START_ELEMENT;
@@ -863,8 +986,8 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 143:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
+ case 165:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 2, &state->eventCode);
if (state->eventCode == 0) {
*nextEvent = START_ELEMENT;
@@ -878,8 +1001,8 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 144:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
+ case 167:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
if (state->eventCode == 0) {
*nextEvent = START_ELEMENT;
@@ -889,31 +1012,23 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 145:
+ case 168:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 140:
+ case 164:
/* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */
*nextEvent = CHARACTERS;
return 0;
- case 147:
+ case 169:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 142:
+ case 166:
/* FirstStartTagStartTag[CHARACTERS[STRING]] */
*nextEvent = CHARACTERS;
return 0;
- case 148:
- /* Element[END_ELEMENT] */
- *nextEvent = END_ELEMENT;
- return 0;
- case 146:
- /* FirstStartTagStartTag[START_ELEMENT_GENERIC] */
- *nextEvent = START_ELEMENT_GENERIC;
- return 0;
- case 149:
+ case 170:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
@@ -921,11 +1036,11 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */
*nextEvent = START_ELEMENT;
return 0;
- case 150:
+ case 171:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVPubKey)] */
*nextEvent = START_ELEMENT;
return 0;
- case 151:
+ case 172:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
@@ -933,7 +1048,7 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
*nextEvent = START_ELEMENT;
return 0;
- case 152:
+ case 173:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
if (state->eventCode == 0) {
@@ -944,15 +1059,15 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 154:
+ case 175:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 153:
+ case 174:
/* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */
*nextEvent = CHARACTERS;
return 0;
- case 155:
+ case 176:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
@@ -967,11 +1082,11 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = START_ELEMENT;
return 0;
}
- case 156:
+ case 177:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
*nextEvent = START_ELEMENT;
return 0;
- case 157:
+ case 178:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
@@ -979,27 +1094,27 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
*nextEvent = START_ELEMENT;
return 0;
- case 158:
+ case 179:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */
*nextEvent = START_ELEMENT;
return 0;
- case 160:
+ case 181:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */
*nextEvent = START_ELEMENT;
return 0;
- case 161:
+ case 182:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */
*nextEvent = START_ELEMENT;
return 0;
- case 162:
+ case 183:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 159:
+ case 180:
/* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */
*nextEvent = CHARACTERS;
return 0;
- case 163:
+ case 184:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
@@ -1007,19 +1122,19 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */
*nextEvent = START_ELEMENT;
return 0;
- case 164:
+ case 185:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */
*nextEvent = START_ELEMENT;
return 0;
- case 166:
+ case 187:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 165:
+ case 186:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}SessionInformation)] */
*nextEvent = START_ELEMENT;
return 0;
- case 168:
+ case 189:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
if (state->eventCode == 0) {
@@ -1030,15 +1145,15 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 170:
+ case 191:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 169:
+ case 190:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */
*nextEvent = START_ELEMENT;
return 0;
- case 172:
+ case 193:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 2, &state->eventCode);
if (state->eventCode == 0) {
@@ -1053,7 +1168,7 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 174:
+ case 195:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
if (state->eventCode == 0) {
@@ -1064,27 +1179,27 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 175:
+ case 196:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 173:
+ case 194:
/* FirstStartTagStartTag[CHARACTERS[BINARY_HEX]] */
*nextEvent = CHARACTERS;
return 0;
- case 177:
+ case 198:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 176:
+ case 197:
/* FirstStartTagStartTag[CHARACTERS[STRING]] */
*nextEvent = CHARACTERS;
return 0;
- case 178:
+ case 199:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 171:
+ case 192:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 2, &state->eventCode);
if (state->eventCode == 0) {
@@ -1103,7 +1218,7 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 179:
+ case 200:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 2, &state->eventCode);
if (state->eventCode == 0) {
@@ -1118,7 +1233,7 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 181:
+ case 202:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
decodeNBitUnsignedInteger(stream, 1, &state->eventCode);
if (state->eventCode == 0) {
@@ -1129,43 +1244,43 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 183:
+ case 204:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 180:
+ case 201:
/* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */
*nextEvent = CHARACTERS;
return 0;
- case 185:
+ case 206:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 182:
+ case 203:
/* FirstStartTag(xsi:type)StartTag[CHARACTERS[STRING]] */
*nextEvent = CHARACTERS;
return 0;
- case 186:
+ case 207:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
- case 184:
+ case 205:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Event)] */
*nextEvent = START_ELEMENT;
return 0;
- case 187:
+ case 208:
+ /* Element[END_ELEMENT] */
+ *nextEvent = END_ELEMENT;
+ return 0;
+ case 209:
+ /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */
+ *nextEvent = CHARACTERS;
+ return 0;
+ case 210:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
case 188:
- /* FirstStartTagStartTag[CHARACTERS[ENUMERATION]] */
- *nextEvent = CHARACTERS;
- return 0;
- case 189:
- /* Element[END_ELEMENT] */
- *nextEvent = END_ELEMENT;
- return 0;
- case 167:
/* 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) {
@@ -1248,7 +1363,7 @@ int exiDecodeNextEvent(bitstream_t* stream, exi_state_t* state,
*nextEvent = END_ELEMENT;
return 0;
}
- case 190:
+ case 211:
/* Element[END_ELEMENT] */
*nextEvent = END_ELEMENT;
return 0;
@@ -1293,7 +1408,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 3, se);
}
else if (state->eventCode == 1) {
- se->localPart = 10; /* "LineLockReq" */
+ se->localPart = 11; /* "LineLockReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1301,7 +1416,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 5, se);
}
else if (state->eventCode == 2) {
- se->localPart = 12; /* "LineLockRes" */
+ se->localPart = 13; /* "LineLockRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1309,7 +1424,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 6, se);
}
else if (state->eventCode == 3) {
- se->localPart = 16; /* "MeteringReceiptReq" */
+ se->localPart = 17; /* "MeteringReceiptReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1317,7 +1432,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 7, se);
}
else if (state->eventCode == 4) {
- se->localPart = 18; /* "MeteringReceiptRes" */
+ se->localPart = 19; /* "MeteringReceiptRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1325,7 +1440,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 8, se);
}
else if (state->eventCode == 5) {
- se->localPart = 20; /* "MeteringStatusReq" */
+ se->localPart = 21; /* "MeteringStatusReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1333,7 +1448,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 9, se);
}
else if (state->eventCode == 6) {
- se->localPart = 22; /* "MeteringStatusRes" */
+ se->localPart = 23; /* "MeteringStatusRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1341,7 +1456,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 10, se);
}
else if (state->eventCode == 7) {
- se->localPart = 32; /* "PaymentDetailsReq" */
+ se->localPart = 33; /* "PaymentDetailsReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1349,7 +1464,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 11, se);
}
else if (state->eventCode == 8) {
- se->localPart = 34; /* "PaymentDetailsRes" */
+ se->localPart = 35; /* "PaymentDetailsRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1357,7 +1472,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 12, se);
}
else if (state->eventCode == 9) {
- se->localPart = 36; /* "PowerDeliveryReq" */
+ se->localPart = 37; /* "PowerDeliveryReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1365,7 +1480,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 13, se);
}
else if (state->eventCode == 10) {
- se->localPart = 38; /* "PowerDeliveryRes" */
+ se->localPart = 39; /* "PowerDeliveryRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1373,7 +1488,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 14, se);
}
else if (state->eventCode == 11) {
- se->localPart = 40; /* "PowerDiscoveryReq" */
+ se->localPart = 41; /* "PowerDiscoveryReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1381,7 +1496,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 15, se);
}
else if (state->eventCode == 12) {
- se->localPart = 42; /* "PowerDiscoveryRes" */
+ se->localPart = 43; /* "PowerDiscoveryRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1389,7 +1504,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 16, se);
}
else if (state->eventCode == 13) {
- se->localPart = 47; /* "ServiceDiscoveryReq" */
+ se->localPart = 48; /* "ServiceDiscoveryReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1397,7 +1512,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 17, se);
}
else if (state->eventCode == 14) {
- se->localPart = 49; /* "ServiceDiscoveryRes" */
+ se->localPart = 50; /* "ServiceDiscoveryRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1405,7 +1520,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 18, se);
}
else if (state->eventCode == 15) {
- se->localPart = 52; /* "ServicePaymentSelectionReq" */
+ se->localPart = 53; /* "ServicePaymentSelectionReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1413,7 +1528,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 19, se);
}
else if (state->eventCode == 16) {
- se->localPart = 54; /* "ServicePaymentSelectionRes" */
+ se->localPart = 55; /* "ServicePaymentSelectionRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1421,7 +1536,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 20, se);
}
else if (state->eventCode == 17) {
- se->localPart = 58; /* "SessionSetupReq" */
+ se->localPart = 59; /* "SessionSetupReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1429,7 +1544,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 21, se);
}
else if (state->eventCode == 18) {
- se->localPart = 60; /* "SessionSetupRes" */
+ se->localPart = 61; /* "SessionSetupRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 2;
@@ -1447,7 +1562,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 5:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
- se->localPart = 31; /* "PEVStatus" */
+ se->localPart = 32; /* "PEVStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 24;
@@ -1456,7 +1571,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 6:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- se->localPart = 46; /* "ResponseCode" */
+ se->localPart = 47; /* "ResponseCode" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 33;
@@ -1466,7 +1581,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
case 7:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
if (state->eventCode == 0) {
- se->localPart = 25; /* "PEVID" */
+ se->localPart = 26; /* "PEVID" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 52;
@@ -1474,7 +1589,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 53, se);
}
else if (state->eventCode == 1) {
- se->localPart = 31; /* "PEVStatus" */
+ se->localPart = 32; /* "PEVStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 54;
@@ -1484,7 +1599,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 8:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- se->localPart = 46; /* "ResponseCode" */
+ se->localPart = 47; /* "ResponseCode" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 81;
@@ -1493,7 +1608,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 10:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- se->localPart = 46; /* "ResponseCode" */
+ se->localPart = 47; /* "ResponseCode" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 84;
@@ -1502,7 +1617,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 11:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */
- se->localPart = 0; /* "ContractID" */
+ se->localPart = 1; /* "ContractID" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 95;
@@ -1511,7 +1626,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 12:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- se->localPart = 46; /* "ResponseCode" */
+ se->localPart = 47; /* "ResponseCode" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 98;
@@ -1520,7 +1635,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 13:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
- se->localPart = 31; /* "PEVStatus" */
+ se->localPart = 32; /* "PEVStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 101;
@@ -1529,117 +1644,117 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 14:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- se->localPart = 46; /* "ResponseCode" */
+ se->localPart = 47; /* "ResponseCode" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 104;
+ state->grammarStack[state->stackIndex] = 108;
/* push element on stack */
- return exiPushStack(state, 105, se);
+ return exiPushStack(state, 109, se);
break;
case 15:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
- se->localPart = 31; /* "PEVStatus" */
+ se->localPart = 32; /* "PEVStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 107;
+ state->grammarStack[state->stackIndex] = 111;
/* push element on stack */
return exiPushStack(state, 25, se);
break;
case 16:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- se->localPart = 46; /* "ResponseCode" */
+ se->localPart = 47; /* "ResponseCode" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 116;
+ state->grammarStack[state->stackIndex] = 120;
/* push element on stack */
- return exiPushStack(state, 117, se);
+ return exiPushStack(state, 121, se);
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) {
- se->localPart = 57; /* "ServiceType" */
- se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
- /* move on */
- state->grammarStack[state->stackIndex] = 126;
- /* push element on stack */
- return exiPushStack(state, 127, se);
- }
- else if (state->eventCode == 1) {
- se->localPart = 56; /* "ServiceScope" */
- se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
- /* move on */
- state->grammarStack[state->stackIndex] = 128;
- /* push element on stack */
- return exiPushStack(state, 129, se);
- }
- break;
- case 18:
- /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- se->localPart = 46; /* "ResponseCode" */
- se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
- /* move on */
- state->grammarStack[state->stackIndex] = 132;
- /* push element on stack */
- return exiPushStack(state, 133, se);
- break;
- case 19:
- /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */
- se->localPart = 51; /* "ServiceList" */
+ se->localPart = 58; /* "ServiceType" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 150;
/* push element on stack */
- return exiPushStack(state, 135, se);
- break;
- case 20:
- /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- se->localPart = 46; /* "ResponseCode" */
+ return exiPushStack(state, 151, se);
+ }
+ else if (state->eventCode == 1) {
+ se->localPart = 57; /* "ServiceScope" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 152;
/* push element on stack */
return exiPushStack(state, 153, se);
+ }
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) {
- se->localPart = 25; /* "PEVID" */
+ case 18:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
+ se->localPart = 47; /* "ResponseCode" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 156;
/* push element on stack */
+ return exiPushStack(state, 157, se);
+ break;
+ case 19:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */
+ se->localPart = 52; /* "ServiceList" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 171;
+ /* push element on stack */
+ return exiPushStack(state, 159, se);
+ break;
+ case 20:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
+ se->localPart = 47; /* "ResponseCode" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 173;
+ /* push element on stack */
+ return exiPushStack(state, 174, se);
+ 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) {
+ se->localPart = 26; /* "PEVID" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 177;
+ /* push element on stack */
return exiPushStack(state, 53, se);
}
else if (state->eventCode == 1) {
- se->localPart = 31; /* "PEVStatus" */
+ se->localPart = 32; /* "PEVStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 157;
+ state->grammarStack[state->stackIndex] = 178;
/* push element on stack */
return exiPushStack(state, 25, se);
}
break;
case 22:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- se->localPart = 46; /* "ResponseCode" */
+ se->localPart = 47; /* "ResponseCode" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 158;
+ state->grammarStack[state->stackIndex] = 179;
/* push element on stack */
- return exiPushStack(state, 159, se);
+ return exiPushStack(state, 180, se);
break;
case 23:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */
se->localPart = 4; /* "Header" */
se->namespaceURI = 6; /* "urn:iso:15118:2:2010:MsgDef" */
/* move on */
- state->grammarStack[state->stackIndex] = 164;
+ state->grammarStack[state->stackIndex] = 185;
/* push element on stack */
- return exiPushStack(state, 165, se);
+ return exiPushStack(state, 186, se);
break;
case 24:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus)] */
- se->localPart = 44; /* "ReqLockStatus" */
+ se->localPart = 45; /* "ReqLockStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 26;
@@ -1666,7 +1781,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 33:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */
- se->localPart = 6; /* "EVSEStatus" */
+ se->localPart = 7; /* "EVSEStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 35;
@@ -1720,7 +1835,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 44:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */
- se->localPart = 38; /* "ShutDownTime" */
+ se->localPart = 37; /* "ShutDownTime" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
state->grammarStack[state->stackIndex] = 46;
@@ -1729,7 +1844,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 52:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
- se->localPart = 31; /* "PEVStatus" */
+ se->localPart = 32; /* "PEVStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 54;
@@ -1739,7 +1854,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
case 54:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */
if (state->eventCode == 0) {
- se->localPart = 62; /* "TCurrent" */
+ se->localPart = 63; /* "TCurrent" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 55;
@@ -1747,7 +1862,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 47, se);
}
else if (state->eventCode == 1) {
- se->localPart = 63; /* "Tariff" */
+ se->localPart = 64; /* "Tariff" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 56;
@@ -1757,7 +1872,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 55:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */
- se->localPart = 63; /* "Tariff" */
+ se->localPart = 64; /* "Tariff" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 56;
@@ -1766,7 +1881,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 56:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */
- se->localPart = 14; /* "MeterInfo" */
+ se->localPart = 15; /* "MeterInfo" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 58;
@@ -1808,7 +1923,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 69, se);
}
else if (state->eventCode == 4) {
- se->localPart = 39; /* "TMeter" */
+ se->localPart = 38; /* "TMeter" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
state->grammarStack[state->stackIndex] = 70;
@@ -1843,7 +1958,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 69, se);
}
else if (state->eventCode == 3) {
- se->localPart = 39; /* "TMeter" */
+ se->localPart = 38; /* "TMeter" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
state->grammarStack[state->stackIndex] = 70;
@@ -1870,7 +1985,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 69, se);
}
else if (state->eventCode == 2) {
- se->localPart = 39; /* "TMeter" */
+ se->localPart = 38; /* "TMeter" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
state->grammarStack[state->stackIndex] = 70;
@@ -1889,7 +2004,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 69, se);
}
else if (state->eventCode == 1) {
- se->localPart = 39; /* "TMeter" */
+ se->localPart = 38; /* "TMeter" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
state->grammarStack[state->stackIndex] = 70;
@@ -1909,7 +2024,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
case 68:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
if (state->eventCode == 0) {
- se->localPart = 39; /* "TMeter" */
+ se->localPart = 38; /* "TMeter" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
state->grammarStack[state->stackIndex] = 70;
@@ -1919,7 +2034,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 73:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit)] */
- se->localPart = 51; /* "Unit" */
+ se->localPart = 50; /* "Unit" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
state->grammarStack[state->stackIndex] = 75;
@@ -1928,7 +2043,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 75:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */
- se->localPart = 52; /* "Value" */
+ se->localPart = 51; /* "Value" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
state->grammarStack[state->stackIndex] = 76;
@@ -1937,7 +2052,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 84:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */
- se->localPart = 2; /* "EVSEID" */
+ se->localPart = 3; /* "EVSEID" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 86;
@@ -1946,7 +2061,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 86:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */
- se->localPart = 6; /* "EVSEStatus" */
+ se->localPart = 7; /* "EVSEStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 88;
@@ -1955,7 +2070,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 88:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */
- se->localPart = 62; /* "TCurrent" */
+ se->localPart = 63; /* "TCurrent" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 89;
@@ -1964,7 +2079,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 89:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower)] */
- se->localPart = 5; /* "EVSEMaxPower" */
+ se->localPart = 6; /* "EVSEMaxPower" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 90;
@@ -1974,7 +2089,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
case 90:
/* 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) {
- se->localPart = 24; /* "PCurrent" */
+ se->localPart = 25; /* "PCurrent" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 91;
@@ -1982,7 +2097,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 67, se);
}
else if (state->eventCode == 1) {
- se->localPart = 14; /* "MeterInfo" */
+ se->localPart = 15; /* "MeterInfo" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 92;
@@ -1993,7 +2108,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
case 91:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */
if (state->eventCode == 0) {
- se->localPart = 14; /* "MeterInfo" */
+ se->localPart = 15; /* "MeterInfo" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 92;
@@ -2003,7 +2118,7 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 101:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */
- se->localPart = 45; /* "ReqSwitchStatus" */
+ se->localPart = 46; /* "ReqSwitchStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 102;
@@ -2011,55 +2126,65 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 43, se);
break;
case 102:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), END_ELEMENT] */
+ /* 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) {
- se->localPart = 63; /* "Tariff" */
+ se->localPart = 64; /* "Tariff" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 103;
/* push element on stack */
return exiPushStack(state, 57, se);
}
- break;
- case 107:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC)] */
- se->localPart = 9; /* "EoC" */
+ else if (state->eventCode == 1) {
+ se->localPart = 0; /* "ChargingProfile" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 108;
+ state->grammarStack[state->stackIndex] = 104;
+ /* push element on stack */
+ return exiPushStack(state, 105, se);
+ }
+ break;
+ case 103:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */
+ if (state->eventCode == 0) {
+ se->localPart = 0; /* "ChargingProfile" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 104;
+ /* push element on stack */
+ return exiPushStack(state, 105, se);
+ }
+ break;
+ case 105:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */
+ se->localPart = 2; /* "ChargingProfileEntryStart" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 106;
/* push element on stack */
return exiPushStack(state, 47, se);
break;
- case 108:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EAmount)] */
- se->localPart = 1; /* "EAmount" */
- se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ case 106:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */
+ se->localPart = 1; /* "ChargingProfileEntryMaxPower" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 109;
+ state->grammarStack[state->stackIndex] = 107;
/* push element on stack */
return exiPushStack(state, 67, se);
break;
- case 109:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPower)] */
- se->localPart = 27; /* "PEVMaxPower" */
- se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
- /* move on */
- state->grammarStack[state->stackIndex] = 110;
- /* push element on stack */
- return exiPushStack(state, 67, se);
- break;
- case 110:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases)] */
- se->localPart = 26; /* "PEVMaxPhases" */
- se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
- /* move on */
- state->grammarStack[state->stackIndex] = 111;
- /* push element on stack */
- return exiPushStack(state, 112, se);
- break;
case 111:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxVoltage)] */
- se->localPart = 28; /* "PEVMaxVoltage" */
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC)] */
+ se->localPart = 10; /* "EoC" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 112;
+ /* push element on stack */
+ return exiPushStack(state, 47, se);
+ break;
+ case 112:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EAmount)] */
+ se->localPart = 2; /* "EAmount" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 113;
@@ -2067,65 +2192,89 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 67, se);
break;
case 113:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMinVoltage)] */
- se->localPart = 29; /* "PEVMinVoltage" */
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPower)] */
+ se->localPart = 28; /* "PEVMaxPower" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 114;
/* push element on stack */
return exiPushStack(state, 67, se);
break;
- case 116:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */
- se->localPart = 6; /* "EVSEStatus" */
+ case 114:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases)] */
+ se->localPart = 27; /* "PEVMaxPhases" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 115;
+ /* push element on stack */
+ return exiPushStack(state, 116, se);
+ break;
+ case 115:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxVoltage)] */
+ se->localPart = 29; /* "PEVMaxVoltage" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 117;
+ /* push element on stack */
+ return exiPushStack(state, 67, se);
+ break;
+ case 117:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMinVoltage)] */
+ se->localPart = 30; /* "PEVMinVoltage" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 118;
/* push element on stack */
- return exiPushStack(state, 36, se);
- break;
- case 118:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage)] */
- se->localPart = 7; /* "EVSEVoltage" */
- se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
- /* move on */
- state->grammarStack[state->stackIndex] = 119;
- /* push element on stack */
- return exiPushStack(state, 67, se);
- break;
- case 119:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEIMax)] */
- se->localPart = 3; /* "EVSEIMax" */
- se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
- /* move on */
- state->grammarStack[state->stackIndex] = 120;
- /* push element on stack */
return exiPushStack(state, 67, se);
break;
case 120:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases)] */
- se->localPart = 4; /* "EVSEMaxPhases" */
- se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
- /* move on */
- state->grammarStack[state->stackIndex] = 121;
- /* push element on stack */
- return exiPushStack(state, 112, se);
- break;
- case 121:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), END_ELEMENT] */
- if (state->eventCode == 0) {
- se->localPart = 8; /* "EnergyProvider" */
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */
+ se->localPart = 7; /* "EVSEStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 122;
/* push element on stack */
- return exiPushStack(state, 123, se);
- }
+ return exiPushStack(state, 36, se);
break;
- case 126:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
+ case 122:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage)] */
+ se->localPart = 8; /* "EVSEVoltage" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 123;
+ /* push element on stack */
+ return exiPushStack(state, 67, se);
+ break;
+ case 123:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEIMax)] */
+ se->localPart = 4; /* "EVSEIMax" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 124;
+ /* push element on stack */
+ return exiPushStack(state, 67, se);
+ break;
+ case 124:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases)] */
+ se->localPart = 5; /* "EVSEMaxPhases" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 125;
+ /* push element on stack */
+ return exiPushStack(state, 116, se);
+ break;
+ case 125:
+ /* 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) {
- se->localPart = 56; /* "ServiceScope" */
+ se->localPart = 9; /* "EnergyProvider" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 126;
+ /* push element on stack */
+ return exiPushStack(state, 127, se);
+ }
+ else if (state->eventCode == 1) {
+ se->localPart = 65; /* "TariffTable" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
state->grammarStack[state->stackIndex] = 128;
@@ -2133,482 +2282,584 @@ int exiDecodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 129, se);
}
break;
- case 132:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */
+ case 126:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */
if (state->eventCode == 0) {
- se->localPart = 51; /* "ServiceList" */
+ se->localPart = 65; /* "TariffTable" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
+ state->grammarStack[state->stackIndex] = 128;
+ /* push element on stack */
+ return exiPushStack(state, 129, se);
+ }
+ break;
+ case 129:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Currency)] */
+ se->localPart = 5; /* "Currency" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 132;
+ /* push element on stack */
+ return exiPushStack(state, 133, se);
+ break;
+ case 132:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff)] */
+ se->localPart = 39; /* "Tariff" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 134;
+ /* push element on stack */
+ return exiPushStack(state, 135, se);
+ break;
+ case 134:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */
+ if (state->eventCode == 0) {
+ se->localPart = 39; /* "Tariff" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
state->grammarStack[state->stackIndex] = 134;
/* push element on stack */
return exiPushStack(state, 135, se);
}
break;
case 135:
- /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */
- se->localPart = 27; /* "Service" */
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffID)] */
+ se->localPart = 46; /* "TariffID" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
state->grammarStack[state->stackIndex] = 137;
/* push element on stack */
- return exiPushStack(state, 138, se);
+ return exiPushStack(state, 57, se);
break;
case 137:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */
+ if (state->eventCode == 0) {
+ se->localPart = 41; /* "TariffDescription" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 138;
+ /* push element on stack */
+ return exiPushStack(state, 139, se);
+ }
+ else if (state->eventCode == 1) {
+ se->localPart = 42; /* "TariffEntries" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 140;
+ /* push element on stack */
+ return exiPushStack(state, 141, se);
+ }
+ break;
+ case 138:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */
+ se->localPart = 42; /* "TariffEntries" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 140;
+ /* push element on stack */
+ return exiPushStack(state, 141, se);
+ break;
+ case 141:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */
+ se->localPart = 44; /* "TariffEntry" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 143;
+ /* push element on stack */
+ return exiPushStack(state, 144, se);
+ break;
+ case 143:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */
+ if (state->eventCode == 0) {
+ se->localPart = 44; /* "TariffEntry" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 143;
+ /* push element on stack */
+ return exiPushStack(state, 144, se);
+ }
+ break;
+ case 144:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffStart)] */
+ se->localPart = 48; /* "TariffStart" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 145;
+ /* push element on stack */
+ return exiPushStack(state, 146, se);
+ break;
+ case 145:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffPMax)] */
+ se->localPart = 47; /* "TariffPMax" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 147;
+ /* push element on stack */
+ return exiPushStack(state, 67, se);
+ break;
+ case 147:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */
+ if (state->eventCode == 0) {
+ se->localPart = 6; /* "EPrice" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 148;
+ /* push element on stack */
+ return exiPushStack(state, 67, se);
+ }
+ break;
+ case 150:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
+ if (state->eventCode == 0) {
+ se->localPart = 57; /* "ServiceScope" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 152;
+ /* push element on stack */
+ return exiPushStack(state, 153, se);
+ }
+ break;
+ case 156:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */
+ if (state->eventCode == 0) {
+ se->localPart = 52; /* "ServiceList" */
+ se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 158;
+ /* push element on stack */
+ return exiPushStack(state, 159, se);
+ }
+ break;
+ case 159:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */
+ se->localPart = 27; /* "Service" */
+ se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 161;
+ /* push element on stack */
+ return exiPushStack(state, 162, se);
+ break;
+ case 161:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */
if (state->eventCode == 0) {
se->localPart = 27; /* "Service" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 137;
+ state->grammarStack[state->stackIndex] = 161;
/* push element on stack */
- return exiPushStack(state, 138, se);
+ return exiPushStack(state, 162, se);
}
break;
- case 138:
+ case 162:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */
- se->localPart = 30; /* "ServiceID" */
+ se->localPart = 29; /* "ServiceID" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 139;
+ state->grammarStack[state->stackIndex] = 163;
/* push element on stack */
- return exiPushStack(state, 140, se);
+ return exiPushStack(state, 164, se);
break;
- case 139:
- /* 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), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
+ case 163:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
if (state->eventCode == 0) {
- se->localPart = 32; /* "ServiceName" */
+ se->localPart = 31; /* "ServiceName" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 141;
+ state->grammarStack[state->stackIndex] = 165;
/* push element on stack */
- return exiPushStack(state, 142, se);
+ return exiPushStack(state, 166, se);
}
else if (state->eventCode == 1) {
- se->localPart = 35; /* "ServiceType" */
+ se->localPart = 34; /* "ServiceType" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 143;
+ state->grammarStack[state->stackIndex] = 167;
/* push element on stack */
- return exiPushStack(state, 127, se);
+ return exiPushStack(state, 151, se);
}
else if (state->eventCode == 2) {
- se->localPart = 33; /* "ServiceScope" */
+ se->localPart = 32; /* "ServiceScope" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 144;
+ state->grammarStack[state->stackIndex] = 168;
/* push element on stack */
- return exiPushStack(state, 129, se);
- }
- else if (state->eventCode == 3) {
- se->localPart = 29; /* "ServiceDetails" */
- se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
- /* move on */
- state->grammarStack[state->stackIndex] = 145;
- /* push element on stack */
- return exiPushStack(state, 146, se);
+ return exiPushStack(state, 153, se);
}
break;
- case 141:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
+ case 165:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
if (state->eventCode == 0) {
- se->localPart = 35; /* "ServiceType" */
+ se->localPart = 34; /* "ServiceType" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 143;
+ state->grammarStack[state->stackIndex] = 167;
/* push element on stack */
- return exiPushStack(state, 127, se);
+ return exiPushStack(state, 151, se);
}
else if (state->eventCode == 1) {
- se->localPart = 33; /* "ServiceScope" */
+ se->localPart = 32; /* "ServiceScope" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 144;
+ state->grammarStack[state->stackIndex] = 168;
/* push element on stack */
- return exiPushStack(state, 129, se);
- }
- else if (state->eventCode == 2) {
- se->localPart = 29; /* "ServiceDetails" */
- se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
- /* move on */
- state->grammarStack[state->stackIndex] = 145;
- /* push element on stack */
- return exiPushStack(state, 146, se);
+ return exiPushStack(state, 153, se);
}
break;
- case 143:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
+ case 167:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
if (state->eventCode == 0) {
- se->localPart = 33; /* "ServiceScope" */
+ se->localPart = 32; /* "ServiceScope" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 144;
+ state->grammarStack[state->stackIndex] = 168;
/* push element on stack */
- return exiPushStack(state, 129, se);
- }
- else if (state->eventCode == 1) {
- se->localPart = 29; /* "ServiceDetails" */
- se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
- /* move on */
- state->grammarStack[state->stackIndex] = 145;
- /* push element on stack */
- return exiPushStack(state, 146, se);
+ return exiPushStack(state, 153, se);
}
break;
- case 144:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
- if (state->eventCode == 0) {
- se->localPart = 29; /* "ServiceDetails" */
- se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
- /* move on */
- state->grammarStack[state->stackIndex] = 145;
- /* push element on stack */
- return exiPushStack(state, 146, se);
- }
- break;
- case 150:
+ case 171:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVPubKey)] */
- se->localPart = 30; /* "PEVPubKey" */
+ se->localPart = 31; /* "PEVPubKey" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 151;
+ state->grammarStack[state->stackIndex] = 172;
/* push element on stack */
return exiPushStack(state, 65, se);
break;
- case 152:
+ case 173:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */
if (state->eventCode == 0) {
- se->localPart = 15; /* "MeteringAuthPubKey" */
+ se->localPart = 16; /* "MeteringAuthPubKey" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 154;
+ state->grammarStack[state->stackIndex] = 175;
/* push element on stack */
return exiPushStack(state, 65, se);
}
break;
- case 156:
+ case 177:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
- se->localPart = 31; /* "PEVStatus" */
+ se->localPart = 32; /* "PEVStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 157;
+ state->grammarStack[state->stackIndex] = 178;
/* push element on stack */
return exiPushStack(state, 25, se);
break;
- case 158:
+ case 179:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */
- se->localPart = 2; /* "EVSEID" */
+ se->localPart = 3; /* "EVSEID" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 160;
+ state->grammarStack[state->stackIndex] = 181;
/* push element on stack */
return exiPushStack(state, 87, se);
break;
- case 160:
+ case 181:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */
- se->localPart = 6; /* "EVSEStatus" */
+ se->localPart = 7; /* "EVSEStatus" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 161;
+ state->grammarStack[state->stackIndex] = 182;
/* push element on stack */
return exiPushStack(state, 36, se);
break;
- case 161:
+ case 182:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */
- se->localPart = 62; /* "TCurrent" */
+ se->localPart = 63; /* "TCurrent" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 162;
+ state->grammarStack[state->stackIndex] = 183;
/* push element on stack */
return exiPushStack(state, 47, se);
break;
- case 164:
+ case 185:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */
se->localPart = 0; /* "Body" */
se->namespaceURI = 6; /* "urn:iso:15118:2:2010:MsgDef" */
/* move on */
- state->grammarStack[state->stackIndex] = 166;
+ state->grammarStack[state->stackIndex] = 187;
/* push element on stack */
- return exiPushStack(state, 167, se);
+ return exiPushStack(state, 188, se);
break;
- case 165:
+ case 186:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}SessionInformation)] */
se->localPart = 7; /* "SessionInformation" */
se->namespaceURI = 6; /* "urn:iso:15118:2:2010:MsgDef" */
/* move on */
- state->grammarStack[state->stackIndex] = 168;
+ state->grammarStack[state->stackIndex] = 189;
/* push element on stack */
- return exiPushStack(state, 169, se);
+ return exiPushStack(state, 190, se);
break;
- case 167:
+ case 188:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), END_ELEMENT] */
if (state->eventCode == 0) {
se->localPart = 2; /* "BodyElement" */
se->namespaceURI = 6; /* "urn:iso:15118:2:2010:MsgDef" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 3, se);
}
else if (state->eventCode == 1) {
- se->localPart = 10; /* "LineLockReq" */
+ se->localPart = 11; /* "LineLockReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 5, se);
}
else if (state->eventCode == 2) {
- se->localPart = 12; /* "LineLockRes" */
+ se->localPart = 13; /* "LineLockRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 6, se);
}
else if (state->eventCode == 3) {
- se->localPart = 16; /* "MeteringReceiptReq" */
+ se->localPart = 17; /* "MeteringReceiptReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 7, se);
}
else if (state->eventCode == 4) {
- se->localPart = 18; /* "MeteringReceiptRes" */
+ se->localPart = 19; /* "MeteringReceiptRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 8, se);
}
else if (state->eventCode == 5) {
- se->localPart = 20; /* "MeteringStatusReq" */
+ se->localPart = 21; /* "MeteringStatusReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 9, se);
}
else if (state->eventCode == 6) {
- se->localPart = 22; /* "MeteringStatusRes" */
+ se->localPart = 23; /* "MeteringStatusRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 10, se);
}
else if (state->eventCode == 7) {
- se->localPart = 32; /* "PaymentDetailsReq" */
+ se->localPart = 33; /* "PaymentDetailsReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 11, se);
}
else if (state->eventCode == 8) {
- se->localPart = 34; /* "PaymentDetailsRes" */
+ se->localPart = 35; /* "PaymentDetailsRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 12, se);
}
else if (state->eventCode == 9) {
- se->localPart = 36; /* "PowerDeliveryReq" */
+ se->localPart = 37; /* "PowerDeliveryReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 13, se);
}
else if (state->eventCode == 10) {
- se->localPart = 38; /* "PowerDeliveryRes" */
+ se->localPart = 39; /* "PowerDeliveryRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 14, se);
}
else if (state->eventCode == 11) {
- se->localPart = 40; /* "PowerDiscoveryReq" */
+ se->localPart = 41; /* "PowerDiscoveryReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 15, se);
}
else if (state->eventCode == 12) {
- se->localPart = 42; /* "PowerDiscoveryRes" */
+ se->localPart = 43; /* "PowerDiscoveryRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 16, se);
}
else if (state->eventCode == 13) {
- se->localPart = 47; /* "ServiceDiscoveryReq" */
+ se->localPart = 48; /* "ServiceDiscoveryReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 17, se);
}
else if (state->eventCode == 14) {
- se->localPart = 49; /* "ServiceDiscoveryRes" */
+ se->localPart = 50; /* "ServiceDiscoveryRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 18, se);
}
else if (state->eventCode == 15) {
- se->localPart = 52; /* "ServicePaymentSelectionReq" */
+ se->localPart = 53; /* "ServicePaymentSelectionReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 19, se);
}
else if (state->eventCode == 16) {
- se->localPart = 54; /* "ServicePaymentSelectionRes" */
+ se->localPart = 55; /* "ServicePaymentSelectionRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 20, se);
}
else if (state->eventCode == 17) {
- se->localPart = 58; /* "SessionSetupReq" */
+ se->localPart = 59; /* "SessionSetupReq" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 21, se);
}
else if (state->eventCode == 18) {
- se->localPart = 60; /* "SessionSetupRes" */
+ se->localPart = 61; /* "SessionSetupRes" */
se->namespaceURI = 4; /* "urn:iso:15118:2:2010:MsgBody" */
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 22, se);
}
break;
- case 168:
+ case 189:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */
if (state->eventCode == 0) {
se->localPart = 6; /* "Notification" */
se->namespaceURI = 6; /* "urn:iso:15118:2:2010:MsgDef" */
/* move on */
- state->grammarStack[state->stackIndex] = 170;
+ state->grammarStack[state->stackIndex] = 191;
/* push element on stack */
- return exiPushStack(state, 171, se);
+ return exiPushStack(state, 192, se);
}
break;
- case 169:
+ case 190:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */
- se->localPart = 36; /* "SessionID" */
+ se->localPart = 35; /* "SessionID" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 172;
+ state->grammarStack[state->stackIndex] = 193;
/* push element on stack */
- return exiPushStack(state, 173, se);
+ return exiPushStack(state, 194, se);
break;
- case 171:
+ case 192:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
if (state->eventCode == 0) {
se->localPart = 13; /* "FaultCode" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 179;
+ state->grammarStack[state->stackIndex] = 200;
/* push element on stack */
- return exiPushStack(state, 180, se);
+ return exiPushStack(state, 201, se);
}
else if (state->eventCode == 1) {
se->localPart = 14; /* "FaultMsg" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 181;
+ state->grammarStack[state->stackIndex] = 202;
/* push element on stack */
- return exiPushStack(state, 182, se);
+ return exiPushStack(state, 203, se);
}
else if (state->eventCode == 2) {
se->localPart = 10; /* "EventList" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 183;
+ state->grammarStack[state->stackIndex] = 204;
/* push element on stack */
- return exiPushStack(state, 184, se);
+ return exiPushStack(state, 205, se);
}
break;
- case 172:
+ case 193:
/* 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) {
- se->localPart = 34; /* "ServiceSessionID" */
+ se->localPart = 33; /* "ServiceSessionID" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 174;
+ state->grammarStack[state->stackIndex] = 195;
/* push element on stack */
- return exiPushStack(state, 173, se);
+ return exiPushStack(state, 194, se);
}
else if (state->eventCode == 1) {
se->localPart = 25; /* "ProtocolVersion" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 175;
+ state->grammarStack[state->stackIndex] = 196;
/* push element on stack */
- return exiPushStack(state, 176, se);
+ return exiPushStack(state, 197, se);
}
break;
- case 174:
+ case 195:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
if (state->eventCode == 0) {
se->localPart = 25; /* "ProtocolVersion" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 175;
+ state->grammarStack[state->stackIndex] = 196;
/* push element on stack */
- return exiPushStack(state, 176, se);
+ return exiPushStack(state, 197, se);
}
break;
- case 179:
+ case 200:
/* 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) {
se->localPart = 14; /* "FaultMsg" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 181;
+ state->grammarStack[state->stackIndex] = 202;
/* push element on stack */
- return exiPushStack(state, 182, se);
+ return exiPushStack(state, 203, se);
}
else if (state->eventCode == 1) {
se->localPart = 10; /* "EventList" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 183;
+ state->grammarStack[state->stackIndex] = 204;
/* push element on stack */
- return exiPushStack(state, 184, se);
+ return exiPushStack(state, 205, se);
}
break;
- case 181:
+ case 202:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
if (state->eventCode == 0) {
se->localPart = 10; /* "EventList" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 183;
+ state->grammarStack[state->stackIndex] = 204;
/* push element on stack */
- return exiPushStack(state, 184, se);
+ return exiPushStack(state, 205, se);
}
break;
- case 184:
+ case 205:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Event)] */
se->localPart = 9; /* "Event" */
se->namespaceURI = 5; /* "urn:iso:15118:2:2010:MsgDataTypes" */
/* move on */
- state->grammarStack[state->stackIndex] = 187;
+ state->grammarStack[state->stackIndex] = 208;
/* push element on stack */
- return exiPushStack(state, 188, se);
+ return exiPushStack(state, 209, se);
break;
default:
@@ -2765,42 +3016,28 @@ int exiDecodeCharacters(bitstream_t* stream, exi_state_t* state,
/* move on */
state->grammarStack[state->stackIndex] = 100;
return 0;
- case 105:
+ case 109:
/* CHARACTERS[ENUMERATION] */
val->type = ENUMERATION;
decodeNBitUnsignedInteger(stream, 3, &val->enumeration);
/* move on */
- state->grammarStack[state->stackIndex] = 106;
+ state->grammarStack[state->stackIndex] = 110;
return 0;
- case 112:
+ case 116:
/* CHARACTERS[INTEGER_16] */
val->type = INTEGER_16;
decodeInteger32(stream, &val->int32);
/* move on */
- state->grammarStack[state->stackIndex] = 115;
+ state->grammarStack[state->stackIndex] = 119;
return 0;
- case 117:
+ case 121:
/* CHARACTERS[ENUMERATION] */
val->type = ENUMERATION;
decodeNBitUnsignedInteger(stream, 1, &val->enumeration);
/* move on */
- state->grammarStack[state->stackIndex] = 124;
- return 0;
- case 123:
- /* CHARACTERS[STRING] */
- val->type = STRING;
- decodeStringValue(stream, &val->string);
- /* move on */
- state->grammarStack[state->stackIndex] = 125;
- return 0;
- case 127:
- /* CHARACTERS[ENUMERATION] */
- val->type = ENUMERATION;
- decodeNBitUnsignedInteger(stream, 2, &val->enumeration);
- /* move on */
state->grammarStack[state->stackIndex] = 130;
return 0;
- case 129:
+ case 127:
/* CHARACTERS[STRING] */
val->type = STRING;
decodeStringValue(stream, &val->string);
@@ -2808,76 +3045,111 @@ int exiDecodeCharacters(bitstream_t* stream, exi_state_t* state,
state->grammarStack[state->stackIndex] = 131;
return 0;
case 133:
- /* CHARACTERS[ENUMERATION] */
- val->type = ENUMERATION;
- decodeNBitUnsignedInteger(stream, 3, &val->enumeration);
- /* move on */
- state->grammarStack[state->stackIndex] = 136;
- return 0;
- case 140:
- /* CHARACTERS[BINARY_HEX] */
- val->type = BINARY_HEX;
- decodeBinary(stream, &val->binary);
- /* move on */
- state->grammarStack[state->stackIndex] = 147;
- return 0;
- case 142:
/* CHARACTERS[STRING] */
val->type = STRING;
decodeStringValue(stream, &val->string);
/* move on */
- state->grammarStack[state->stackIndex] = 148;
+ state->grammarStack[state->stackIndex] = 136;
return 0;
- case 153:
+ case 139:
+ /* CHARACTERS[STRING] */
+ val->type = STRING;
+ decodeStringValue(stream, &val->string);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 142;
+ return 0;
+ case 146:
+ /* CHARACTERS[UNSIGNED_INTEGER_32] */
+ val->type = UNSIGNED_INTEGER_32;
+ decodeUnsignedInteger32(stream, &val->uint32);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 149;
+ return 0;
+ case 151:
/* CHARACTERS[ENUMERATION] */
val->type = ENUMERATION;
decodeNBitUnsignedInteger(stream, 2, &val->enumeration);
/* move on */
- state->grammarStack[state->stackIndex] = 155;
+ state->grammarStack[state->stackIndex] = 154;
return 0;
- case 159:
- /* CHARACTERS[ENUMERATION] */
- val->type = ENUMERATION;
- decodeNBitUnsignedInteger(stream, 3, &val->enumeration);
- /* move on */
- state->grammarStack[state->stackIndex] = 163;
- return 0;
- case 173:
- /* CHARACTERS[BINARY_HEX] */
- val->type = BINARY_HEX;
- decodeBinary(stream, &val->binary);
- /* move on */
- state->grammarStack[state->stackIndex] = 177;
- return 0;
- case 176:
+ case 153:
/* CHARACTERS[STRING] */
val->type = STRING;
decodeStringValue(stream, &val->string);
/* move on */
- state->grammarStack[state->stackIndex] = 178;
+ state->grammarStack[state->stackIndex] = 155;
+ return 0;
+ case 157:
+ /* CHARACTERS[ENUMERATION] */
+ val->type = ENUMERATION;
+ decodeNBitUnsignedInteger(stream, 3, &val->enumeration);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 160;
+ return 0;
+ case 164:
+ /* CHARACTERS[BINARY_HEX] */
+ val->type = BINARY_HEX;
+ decodeBinary(stream, &val->binary);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 169;
+ return 0;
+ case 166:
+ /* CHARACTERS[STRING] */
+ val->type = STRING;
+ decodeStringValue(stream, &val->string);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 170;
+ return 0;
+ case 174:
+ /* CHARACTERS[ENUMERATION] */
+ val->type = ENUMERATION;
+ decodeNBitUnsignedInteger(stream, 2, &val->enumeration);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 176;
return 0;
case 180:
+ /* CHARACTERS[ENUMERATION] */
+ val->type = ENUMERATION;
+ decodeNBitUnsignedInteger(stream, 3, &val->enumeration);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 184;
+ return 0;
+ case 194:
+ /* CHARACTERS[BINARY_HEX] */
+ val->type = BINARY_HEX;
+ decodeBinary(stream, &val->binary);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 198;
+ return 0;
+ case 197:
+ /* CHARACTERS[STRING] */
+ val->type = STRING;
+ decodeStringValue(stream, &val->string);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 199;
+ return 0;
+ case 201:
/* CHARACTERS[ENUMERATION] */
val->type = ENUMERATION;
decodeNBitUnsignedInteger(stream, 2, &val->enumeration);
/* move on */
- state->grammarStack[state->stackIndex] = 185;
+ state->grammarStack[state->stackIndex] = 206;
return 0;
- case 182:
+ case 203:
/* CHARACTERS[STRING] */
/* xsi:type OR xsi:nil */
decodeNBitUnsignedInteger(stream, 1, &xsi);
val->type = STRING;
decodeStringValue(stream, &val->string);
/* move on */
- state->grammarStack[state->stackIndex] = 186;
+ state->grammarStack[state->stackIndex] = 207;
return 0;
- case 188:
+ case 209:
/* CHARACTERS[ENUMERATION] */
val->type = ENUMERATION;
decodeNBitUnsignedInteger(stream, 3, &val->enumeration);
/* move on */
- state->grammarStack[state->stackIndex] = 189;
+ state->grammarStack[state->stackIndex] = 210;
return 0;
default:
diff --git a/src/codec/EXIEncoder.c b/src/codec/EXIEncoder.c
index 6172fc2..d9a321c 100644
--- a/src/codec/EXIEncoder.c
+++ b/src/codec/EXIEncoder.c
@@ -62,6 +62,7 @@ int exiEncodeStartDocument(bitstream_t* stream, exi_state_t* state) {
int exiEncodeEndDocument(bitstream_t* stream, exi_state_t* state) {
if ( state->grammarStack[state->stackIndex] == 2) {
+ encodeFinish(stream);
return 0;
}
@@ -81,7 +82,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 3, se);
}
- else if ( se->localPart == 10 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 11 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq) */
encodeNBitUnsignedInteger(stream, 5, 1);
/* move on */
@@ -89,7 +90,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 5, se);
}
- else if ( se->localPart == 12 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 13 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes) */
encodeNBitUnsignedInteger(stream, 5, 2);
/* move on */
@@ -97,7 +98,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 6, se);
}
- else if ( se->localPart == 16 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 17 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq) */
encodeNBitUnsignedInteger(stream, 5, 3);
/* move on */
@@ -105,7 +106,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 7, se);
}
- else if ( se->localPart == 18 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 19 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes) */
encodeNBitUnsignedInteger(stream, 5, 4);
/* move on */
@@ -113,7 +114,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 8, se);
}
- else if ( se->localPart == 20 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 21 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq) */
encodeNBitUnsignedInteger(stream, 5, 5);
/* move on */
@@ -121,7 +122,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 9, se);
}
- else if ( se->localPart == 22 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 23 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes) */
encodeNBitUnsignedInteger(stream, 5, 6);
/* move on */
@@ -129,7 +130,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 10, se);
}
- else if ( se->localPart == 32 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 33 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq) */
encodeNBitUnsignedInteger(stream, 5, 7);
/* move on */
@@ -137,7 +138,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 11, se);
}
- else if ( se->localPart == 34 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 35 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes) */
encodeNBitUnsignedInteger(stream, 5, 8);
/* move on */
@@ -145,7 +146,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 12, se);
}
- else if ( se->localPart == 36 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 37 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq) */
encodeNBitUnsignedInteger(stream, 5, 9);
/* move on */
@@ -153,7 +154,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 13, se);
}
- else if ( se->localPart == 38 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 39 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes) */
encodeNBitUnsignedInteger(stream, 5, 10);
/* move on */
@@ -161,7 +162,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 14, se);
}
- else if ( se->localPart == 40 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 41 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq) */
encodeNBitUnsignedInteger(stream, 5, 11);
/* move on */
@@ -169,7 +170,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 15, se);
}
- else if ( se->localPart == 42 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 43 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes) */
encodeNBitUnsignedInteger(stream, 5, 12);
/* move on */
@@ -177,7 +178,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 16, se);
}
- else if ( se->localPart == 47 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 48 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq) */
encodeNBitUnsignedInteger(stream, 5, 13);
/* move on */
@@ -185,7 +186,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 17, se);
}
- else if ( se->localPart == 49 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 50 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes) */
encodeNBitUnsignedInteger(stream, 5, 14);
/* move on */
@@ -193,7 +194,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 18, se);
}
- else if ( se->localPart == 52 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 53 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq) */
encodeNBitUnsignedInteger(stream, 5, 15);
/* move on */
@@ -201,7 +202,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 19, se);
}
- else if ( se->localPart == 54 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 55 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes) */
encodeNBitUnsignedInteger(stream, 5, 16);
/* move on */
@@ -209,7 +210,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 20, se);
}
- else if ( se->localPart == 58 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 59 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq) */
encodeNBitUnsignedInteger(stream, 5, 17);
/* move on */
@@ -217,7 +218,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 21, se);
}
- else if ( se->localPart == 60 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 61 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes) */
encodeNBitUnsignedInteger(stream, 5, 18);
/* move on */
@@ -236,7 +237,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 5:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
- if ( se->localPart == 31 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 32 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */
/* move on */
state->grammarStack[state->stackIndex] = 24;
@@ -246,7 +247,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 6:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- if ( se->localPart == 46 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 47 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */
/* move on */
state->grammarStack[state->stackIndex] = 33;
@@ -256,7 +257,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 7:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
- if ( se->localPart == 25 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 26 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID) */
encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */
@@ -264,7 +265,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 53, se);
}
- else if ( se->localPart == 31 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 32 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */
encodeNBitUnsignedInteger(stream, 1, 1);
/* move on */
@@ -275,7 +276,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 8:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- if ( se->localPart == 46 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 47 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */
/* move on */
state->grammarStack[state->stackIndex] = 81;
@@ -285,7 +286,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 10:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- if ( se->localPart == 46 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 47 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */
/* move on */
state->grammarStack[state->stackIndex] = 84;
@@ -295,7 +296,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 11:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */
- if ( se->localPart == 0 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 1 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID) */
/* move on */
state->grammarStack[state->stackIndex] = 95;
@@ -305,7 +306,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 12:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- if ( se->localPart == 46 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 47 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */
/* move on */
state->grammarStack[state->stackIndex] = 98;
@@ -315,7 +316,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 13:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
- if ( se->localPart == 31 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 32 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */
/* move on */
state->grammarStack[state->stackIndex] = 101;
@@ -325,110 +326,110 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 14:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- if ( se->localPart == 46 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 47 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */
/* move on */
- state->grammarStack[state->stackIndex] = 104;
+ state->grammarStack[state->stackIndex] = 108;
/* push element on stack */
- return exiPushStack(state, 105, se);
+ return exiPushStack(state, 109, se);
}
break;
case 15:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
- if ( se->localPart == 31 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 32 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */
/* move on */
- state->grammarStack[state->stackIndex] = 107;
+ state->grammarStack[state->stackIndex] = 111;
/* push element on stack */
return exiPushStack(state, 25, se);
}
break;
case 16:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- if ( se->localPart == 46 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 47 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */
/* move on */
- state->grammarStack[state->stackIndex] = 116;
+ state->grammarStack[state->stackIndex] = 120;
/* push element on stack */
- return exiPushStack(state, 117, se);
+ return exiPushStack(state, 121, se);
}
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 == 57 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 58 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType) */
encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 126;
- /* push element on stack */
- return exiPushStack(state, 127, se);
- }
- else if ( se->localPart == 56 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope) */
- encodeNBitUnsignedInteger(stream, 2, 1);
- /* move on */
- state->grammarStack[state->stackIndex] = 128;
- /* push element on stack */
- return exiPushStack(state, 129, se);
- }
- break;
- case 18:
- /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- if ( se->localPart == 46 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */
- /* move on */
- state->grammarStack[state->stackIndex] = 132;
- /* push element on stack */
- return exiPushStack(state, 133, se);
- }
- break;
- case 19:
- /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList)] */
- if ( se->localPart == 51 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList) */
- /* move on */
state->grammarStack[state->stackIndex] = 150;
/* push element on stack */
- return exiPushStack(state, 135, se);
+ return exiPushStack(state, 151, se);
}
- break;
- case 20:
- /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- if ( se->localPart == 46 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */
+ else if ( se->localPart == 57 && se->namespaceURI == 4 ) {
+ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope) */
+ encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */
state->grammarStack[state->stackIndex] = 152;
/* push element on stack */
return exiPushStack(state, 153, se);
}
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 == 25 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVID) */
- encodeNBitUnsignedInteger(stream, 1, 0);
+ 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) */
/* move on */
state->grammarStack[state->stackIndex] = 156;
/* push element on stack */
+ return exiPushStack(state, 157, se);
+ }
+ 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) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 171;
+ /* push element on stack */
+ return exiPushStack(state, 159, se);
+ }
+ 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) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 173;
+ /* push element on stack */
+ return exiPushStack(state, 174, se);
+ }
+ 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) */
+ encodeNBitUnsignedInteger(stream, 1, 0);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 177;
+ /* push element on stack */
return exiPushStack(state, 53, se);
}
- else if ( se->localPart == 31 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 32 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */
encodeNBitUnsignedInteger(stream, 1, 1);
/* move on */
- state->grammarStack[state->stackIndex] = 157;
+ state->grammarStack[state->stackIndex] = 178;
/* push element on stack */
return exiPushStack(state, 25, se);
}
break;
case 22:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */
- if ( se->localPart == 46 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 47 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */
/* move on */
- state->grammarStack[state->stackIndex] = 158;
+ state->grammarStack[state->stackIndex] = 179;
/* push element on stack */
- return exiPushStack(state, 159, se);
+ return exiPushStack(state, 180, se);
}
break;
case 23:
@@ -436,14 +437,14 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
if ( se->localPart == 4 && se->namespaceURI == 6 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header) */
/* move on */
- state->grammarStack[state->stackIndex] = 164;
+ state->grammarStack[state->stackIndex] = 185;
/* push element on stack */
- return exiPushStack(state, 165, se);
+ return exiPushStack(state, 186, se);
}
break;
case 24:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus)] */
- if ( se->localPart == 44 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 45 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqLockStatus) */
/* move on */
state->grammarStack[state->stackIndex] = 26;
@@ -473,7 +474,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 33:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */
- if ( se->localPart == 6 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 7 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus) */
/* move on */
state->grammarStack[state->stackIndex] = 35;
@@ -533,7 +534,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 44:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime)] */
- if ( se->localPart == 38 && se->namespaceURI == 5 ) {
+ if ( se->localPart == 37 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ShutDownTime) */
/* move on */
state->grammarStack[state->stackIndex] = 46;
@@ -543,7 +544,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 52:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
- if ( se->localPart == 31 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 32 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */
/* move on */
state->grammarStack[state->stackIndex] = 54;
@@ -553,7 +554,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 54:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */
- if ( se->localPart == 62 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 63 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent) */
encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */
@@ -561,7 +562,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 47, se);
}
- else if ( se->localPart == 63 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 64 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff) */
encodeNBitUnsignedInteger(stream, 1, 1);
/* move on */
@@ -572,7 +573,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 55:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff)] */
- if ( se->localPart == 63 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 64 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff) */
/* move on */
state->grammarStack[state->stackIndex] = 56;
@@ -582,7 +583,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 56:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */
- if ( se->localPart == 14 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 15 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo) */
/* move on */
state->grammarStack[state->stackIndex] = 58;
@@ -624,7 +625,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 69, se);
}
- else if ( se->localPart == 39 && se->namespaceURI == 5 ) {
+ else if ( se->localPart == 38 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */
encodeNBitUnsignedInteger(stream, 3, 4);
/* move on */
@@ -659,7 +660,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 69, se);
}
- else if ( se->localPart == 39 && se->namespaceURI == 5 ) {
+ else if ( se->localPart == 38 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */
encodeNBitUnsignedInteger(stream, 3, 3);
/* move on */
@@ -686,7 +687,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 69, se);
}
- else if ( se->localPart == 39 && se->namespaceURI == 5 ) {
+ else if ( se->localPart == 38 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */
encodeNBitUnsignedInteger(stream, 2, 2);
/* move on */
@@ -705,7 +706,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 69, se);
}
- else if ( se->localPart == 39 && se->namespaceURI == 5 ) {
+ else if ( se->localPart == 38 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */
encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */
@@ -726,7 +727,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 68:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */
- if ( se->localPart == 39 && se->namespaceURI == 5 ) {
+ if ( se->localPart == 38 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter) */
encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */
@@ -737,7 +738,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 73:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit)] */
- if ( se->localPart == 51 && se->namespaceURI == 5 ) {
+ if ( se->localPart == 50 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit) */
/* move on */
state->grammarStack[state->stackIndex] = 75;
@@ -747,7 +748,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 75:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */
- if ( se->localPart == 52 && se->namespaceURI == 5 ) {
+ if ( se->localPart == 51 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value) */
/* move on */
state->grammarStack[state->stackIndex] = 76;
@@ -757,7 +758,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 84:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */
- if ( se->localPart == 2 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 3 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID) */
/* move on */
state->grammarStack[state->stackIndex] = 86;
@@ -767,7 +768,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 86:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */
- if ( se->localPart == 6 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 7 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus) */
/* move on */
state->grammarStack[state->stackIndex] = 88;
@@ -777,7 +778,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 88:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */
- if ( se->localPart == 62 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 63 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent) */
/* move on */
state->grammarStack[state->stackIndex] = 89;
@@ -787,7 +788,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 89:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower)] */
- if ( se->localPart == 5 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 6 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPower) */
/* move on */
state->grammarStack[state->stackIndex] = 90;
@@ -797,7 +798,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 90:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */
- if ( se->localPart == 24 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 25 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PCurrent) */
encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */
@@ -805,7 +806,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
/* push element on stack */
return exiPushStack(state, 67, se);
}
- else if ( se->localPart == 14 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 15 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo) */
encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */
@@ -816,7 +817,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 91:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), END_ELEMENT] */
- if ( se->localPart == 14 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 15 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo) */
encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */
@@ -827,7 +828,7 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
break;
case 101:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus)] */
- if ( se->localPart == 45 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 46 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReqSwitchStatus) */
/* move on */
state->grammarStack[state->stackIndex] = 102;
@@ -836,60 +837,69 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
}
break;
case 102:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), END_ELEMENT] */
- if ( se->localPart == 63 && se->namespaceURI == 4 ) {
+ /* 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) */
- encodeNBitUnsignedInteger(stream, 1, 0);
+ encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */
state->grammarStack[state->stackIndex] = 103;
/* push element on stack */
return exiPushStack(state, 57, se);
}
- break;
- case 107:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC)] */
- if ( se->localPart == 9 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EoC) */
+ else if ( se->localPart == 0 && se->namespaceURI == 4 ) {
+ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile) */
+ encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */
- state->grammarStack[state->stackIndex] = 108;
+ state->grammarStack[state->stackIndex] = 104;
+ /* push element on stack */
+ return exiPushStack(state, 105, se);
+ }
+ break;
+ case 103:
+ /* 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) */
+ encodeNBitUnsignedInteger(stream, 1, 0);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 104;
+ /* push element on stack */
+ return exiPushStack(state, 105, se);
+ }
+ break;
+ case 105:
+ /* 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) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 106;
/* push element on stack */
return exiPushStack(state, 47, se);
}
break;
- case 108:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EAmount)] */
- if ( se->localPart == 1 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EAmount) */
+ case 106:
+ /* 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) */
/* move on */
- state->grammarStack[state->stackIndex] = 109;
+ state->grammarStack[state->stackIndex] = 107;
/* push element on stack */
return exiPushStack(state, 67, se);
}
break;
- case 109:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPower)] */
- if ( se->localPart == 27 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPower) */
- /* move on */
- state->grammarStack[state->stackIndex] = 110;
- /* push element on stack */
- return exiPushStack(state, 67, se);
- }
- break;
- case 110:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases)] */
- if ( se->localPart == 26 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxPhases) */
- /* move on */
- state->grammarStack[state->stackIndex] = 111;
- /* push element on stack */
- return exiPushStack(state, 112, se);
- }
- break;
case 111:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxVoltage)] */
- if ( se->localPart == 28 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMaxVoltage) */
+ /* 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) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 112;
+ /* push element on stack */
+ return exiPushStack(state, 47, se);
+ }
+ break;
+ case 112:
+ /* 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) */
/* move on */
state->grammarStack[state->stackIndex] = 113;
/* push element on stack */
@@ -897,70 +907,108 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
}
break;
case 113:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMinVoltage)] */
- if ( se->localPart == 29 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVMinVoltage) */
+ /* 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) */
/* move on */
state->grammarStack[state->stackIndex] = 114;
/* push element on stack */
return exiPushStack(state, 67, se);
}
break;
- case 116:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */
- if ( se->localPart == 6 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus) */
+ case 114:
+ /* 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) */
/* move on */
- state->grammarStack[state->stackIndex] = 118;
+ state->grammarStack[state->stackIndex] = 115;
/* push element on stack */
- return exiPushStack(state, 36, se);
+ return exiPushStack(state, 116, se);
}
break;
- case 118:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage)] */
- if ( se->localPart == 7 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltage) */
+ case 115:
+ /* 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) */
/* move on */
- state->grammarStack[state->stackIndex] = 119;
+ state->grammarStack[state->stackIndex] = 117;
/* push element on stack */
return exiPushStack(state, 67, se);
}
break;
- case 119:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEIMax)] */
- if ( se->localPart == 3 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEIMax) */
+ case 117:
+ /* 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) */
/* move on */
- state->grammarStack[state->stackIndex] = 120;
+ state->grammarStack[state->stackIndex] = 118;
/* push element on stack */
return exiPushStack(state, 67, se);
}
break;
case 120:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases)] */
- if ( se->localPart == 4 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxPhases) */
- /* move on */
- state->grammarStack[state->stackIndex] = 121;
- /* push element on stack */
- return exiPushStack(state, 112, se);
- }
- break;
- case 121:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), END_ELEMENT] */
- if ( se->localPart == 8 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider) */
- encodeNBitUnsignedInteger(stream, 1, 0);
+ /* 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) */
/* move on */
state->grammarStack[state->stackIndex] = 122;
/* push element on stack */
- return exiPushStack(state, 123, se);
+ return exiPushStack(state, 36, se);
+ }
+ break;
+ case 122:
+ /* 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) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 123;
+ /* push element on stack */
+ return exiPushStack(state, 67, se);
+ }
+ break;
+ case 123:
+ /* 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) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 124;
+ /* push element on stack */
+ return exiPushStack(state, 67, se);
+ }
+ break;
+ case 124:
+ /* 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) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 125;
+ /* push element on stack */
+ return exiPushStack(state, 116, se);
+ }
+ break;
+ case 125:
+ /* 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) */
+ encodeNBitUnsignedInteger(stream, 2, 0);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 126;
+ /* push element on stack */
+ return exiPushStack(state, 127, se);
+ }
+ else if ( se->localPart == 65 && se->namespaceURI == 4 ) {
+ /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable) */
+ encodeNBitUnsignedInteger(stream, 2, 1);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 128;
+ /* push element on stack */
+ return exiPushStack(state, 129, se);
}
break;
case 126:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
- if ( se->localPart == 56 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope) */
+ /* 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) */
encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */
state->grammarStack[state->stackIndex] = 128;
@@ -968,10 +1016,30 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
return exiPushStack(state, 129, se);
}
break;
+ case 129:
+ /* 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) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 132;
+ /* push element on stack */
+ return exiPushStack(state, 133, se);
+ }
+ break;
case 132:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */
- if ( se->localPart == 51 && se->namespaceURI == 4 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList) */
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff)] */
+ if ( se->localPart == 39 && se->namespaceURI == 5 ) {
+ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 134;
+ /* push element on stack */
+ return exiPushStack(state, 135, se);
+ }
+ break;
+ case 134:
+ /* 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) */
encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */
state->grammarStack[state->stackIndex] = 134;
@@ -980,480 +1048,558 @@ int exiEncodeStartElement(bitstream_t* stream, exi_state_t* state,
}
break;
case 135:
+ /* 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) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 137;
+ /* push element on stack */
+ return exiPushStack(state, 57, se);
+ }
+ break;
+ case 137:
+ /* 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) */
+ encodeNBitUnsignedInteger(stream, 1, 0);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 138;
+ /* push element on stack */
+ return exiPushStack(state, 139, se);
+ }
+ else if ( se->localPart == 42 && se->namespaceURI == 5 ) {
+ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries) */
+ encodeNBitUnsignedInteger(stream, 1, 1);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 140;
+ /* push element on stack */
+ return exiPushStack(state, 141, se);
+ }
+ break;
+ case 138:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries)] */
+ if ( se->localPart == 42 && se->namespaceURI == 5 ) {
+ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntries) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 140;
+ /* push element on stack */
+ return exiPushStack(state, 141, se);
+ }
+ break;
+ case 141:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry)] */
+ if ( se->localPart == 44 && se->namespaceURI == 5 ) {
+ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 143;
+ /* push element on stack */
+ return exiPushStack(state, 144, se);
+ }
+ break;
+ case 143:
+ /* 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) */
+ encodeNBitUnsignedInteger(stream, 1, 0);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 143;
+ /* push element on stack */
+ return exiPushStack(state, 144, se);
+ }
+ break;
+ case 144:
+ /* 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) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 145;
+ /* push element on stack */
+ return exiPushStack(state, 146, se);
+ }
+ break;
+ case 145:
+ /* 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) */
+ /* move on */
+ state->grammarStack[state->stackIndex] = 147;
+ /* push element on stack */
+ return exiPushStack(state, 67, se);
+ }
+ break;
+ case 147:
+ /* 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) */
+ encodeNBitUnsignedInteger(stream, 1, 0);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 148;
+ /* push element on stack */
+ return exiPushStack(state, 67, se);
+ }
+ break;
+ case 150:
+ /* 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) */
+ encodeNBitUnsignedInteger(stream, 1, 0);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 152;
+ /* push element on stack */
+ return exiPushStack(state, 153, se);
+ }
+ break;
+ case 156:
+ /* 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) */
+ encodeNBitUnsignedInteger(stream, 1, 0);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 158;
+ /* push element on stack */
+ return exiPushStack(state, 159, se);
+ }
+ break;
+ case 159:
/* 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) */
/* move on */
- state->grammarStack[state->stackIndex] = 137;
+ state->grammarStack[state->stackIndex] = 161;
/* push element on stack */
- return exiPushStack(state, 138, se);
+ return exiPushStack(state, 162, se);
}
break;
- case 137:
+ case 161:
/* 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) */
encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 137;
+ state->grammarStack[state->stackIndex] = 161;
/* push element on stack */
- return exiPushStack(state, 138, se);
+ return exiPushStack(state, 162, se);
}
break;
- case 138:
+ case 162:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */
- if ( se->localPart == 30 && se->namespaceURI == 5 ) {
+ if ( se->localPart == 29 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID) */
/* move on */
- state->grammarStack[state->stackIndex] = 139;
+ state->grammarStack[state->stackIndex] = 163;
/* push element on stack */
- return exiPushStack(state, 140, se);
+ return exiPushStack(state, 164, se);
}
break;
- case 139:
- /* 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), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
- if ( se->localPart == 32 && se->namespaceURI == 5 ) {
+ case 163:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
+ if ( se->localPart == 31 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName) */
- encodeNBitUnsignedInteger(stream, 3, 0);
- /* move on */
- state->grammarStack[state->stackIndex] = 141;
- /* push element on stack */
- return exiPushStack(state, 142, se);
- }
- else if ( se->localPart == 35 && se->namespaceURI == 5 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType) */
- encodeNBitUnsignedInteger(stream, 3, 1);
- /* move on */
- state->grammarStack[state->stackIndex] = 143;
- /* push element on stack */
- return exiPushStack(state, 127, se);
- }
- else if ( se->localPart == 33 && se->namespaceURI == 5 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */
- encodeNBitUnsignedInteger(stream, 3, 2);
- /* move on */
- state->grammarStack[state->stackIndex] = 144;
- /* push element on stack */
- return exiPushStack(state, 129, se);
- }
- else if ( se->localPart == 29 && se->namespaceURI == 5 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails) */
- encodeNBitUnsignedInteger(stream, 3, 3);
- /* move on */
- state->grammarStack[state->stackIndex] = 145;
- /* push element on stack */
- return exiPushStack(state, 146, se);
- }
- break;
- case 141:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
- if ( se->localPart == 35 && se->namespaceURI == 5 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType) */
encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 143;
+ state->grammarStack[state->stackIndex] = 165;
/* push element on stack */
- return exiPushStack(state, 127, se);
+ return exiPushStack(state, 166, se);
}
- else if ( se->localPart == 33 && se->namespaceURI == 5 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */
+ else if ( se->localPart == 34 && se->namespaceURI == 5 ) {
+ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType) */
encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */
- state->grammarStack[state->stackIndex] = 144;
+ state->grammarStack[state->stackIndex] = 167;
/* push element on stack */
- return exiPushStack(state, 129, se);
+ return exiPushStack(state, 151, se);
}
- else if ( se->localPart == 29 && se->namespaceURI == 5 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails) */
+ else if ( se->localPart == 32 && se->namespaceURI == 5 ) {
+ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */
encodeNBitUnsignedInteger(stream, 2, 2);
/* move on */
- state->grammarStack[state->stackIndex] = 145;
+ state->grammarStack[state->stackIndex] = 168;
/* push element on stack */
- return exiPushStack(state, 146, se);
+ return exiPushStack(state, 153, se);
}
break;
- case 143:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
- if ( se->localPart == 33 && se->namespaceURI == 5 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */
+ case 165:
+ /* 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) */
encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 144;
+ state->grammarStack[state->stackIndex] = 167;
/* push element on stack */
- return exiPushStack(state, 129, se);
+ return exiPushStack(state, 151, se);
}
- else if ( se->localPart == 29 && se->namespaceURI == 5 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails) */
+ else if ( se->localPart == 32 && se->namespaceURI == 5 ) {
+ /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */
encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */
- state->grammarStack[state->stackIndex] = 145;
+ state->grammarStack[state->stackIndex] = 168;
/* push element on stack */
- return exiPushStack(state, 146, se);
+ return exiPushStack(state, 153, se);
}
break;
- case 144:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
- if ( se->localPart == 29 && se->namespaceURI == 5 ) {
- /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails) */
+ case 167:
+ /* 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) */
encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 145;
+ state->grammarStack[state->stackIndex] = 168;
/* push element on stack */
- return exiPushStack(state, 146, se);
+ return exiPushStack(state, 153, se);
}
break;
- case 150:
+ case 171:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVPubKey)] */
- if ( se->localPart == 30 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 31 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVPubKey) */
/* move on */
- state->grammarStack[state->stackIndex] = 151;
+ state->grammarStack[state->stackIndex] = 172;
/* push element on stack */
return exiPushStack(state, 65, se);
}
break;
- case 152:
+ case 173:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */
- if ( se->localPart == 15 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 16 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey) */
encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 154;
+ state->grammarStack[state->stackIndex] = 175;
/* push element on stack */
return exiPushStack(state, 65, se);
}
break;
- case 156:
+ case 177:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus)] */
- if ( se->localPart == 31 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 32 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PEVStatus) */
/* move on */
- state->grammarStack[state->stackIndex] = 157;
+ state->grammarStack[state->stackIndex] = 178;
/* push element on stack */
return exiPushStack(state, 25, se);
}
break;
- case 158:
+ case 179:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */
- if ( se->localPart == 2 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 3 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID) */
/* move on */
- state->grammarStack[state->stackIndex] = 160;
+ state->grammarStack[state->stackIndex] = 181;
/* push element on stack */
return exiPushStack(state, 87, se);
}
break;
- case 160:
+ case 181:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus)] */
- if ( se->localPart == 6 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 7 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEStatus) */
/* move on */
- state->grammarStack[state->stackIndex] = 161;
+ state->grammarStack[state->stackIndex] = 182;
/* push element on stack */
return exiPushStack(state, 36, se);
}
break;
- case 161:
+ case 182:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent)] */
- if ( se->localPart == 62 && se->namespaceURI == 4 ) {
+ if ( se->localPart == 63 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TCurrent) */
/* move on */
- state->grammarStack[state->stackIndex] = 162;
+ state->grammarStack[state->stackIndex] = 183;
/* push element on stack */
return exiPushStack(state, 47, se);
}
break;
- case 164:
+ case 185:
/* 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) */
/* move on */
- state->grammarStack[state->stackIndex] = 166;
+ state->grammarStack[state->stackIndex] = 187;
/* push element on stack */
- return exiPushStack(state, 167, se);
+ return exiPushStack(state, 188, se);
}
break;
- case 165:
+ case 186:
/* 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) */
/* move on */
- state->grammarStack[state->stackIndex] = 168;
+ state->grammarStack[state->stackIndex] = 189;
/* push element on stack */
- return exiPushStack(state, 169, se);
+ return exiPushStack(state, 190, se);
}
break;
- case 167:
+ case 188:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), END_ELEMENT] */
if ( se->localPart == 2 && se->namespaceURI == 6 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement) */
encodeNBitUnsignedInteger(stream, 5, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 3, se);
}
- else if ( se->localPart == 10 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 11 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq) */
encodeNBitUnsignedInteger(stream, 5, 1);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 5, se);
}
- else if ( se->localPart == 12 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 13 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes) */
encodeNBitUnsignedInteger(stream, 5, 2);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 6, se);
}
- else if ( se->localPart == 16 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 17 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq) */
encodeNBitUnsignedInteger(stream, 5, 3);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 7, se);
}
- else if ( se->localPart == 18 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 19 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes) */
encodeNBitUnsignedInteger(stream, 5, 4);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 8, se);
}
- else if ( se->localPart == 20 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 21 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq) */
encodeNBitUnsignedInteger(stream, 5, 5);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 9, se);
}
- else if ( se->localPart == 22 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 23 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes) */
encodeNBitUnsignedInteger(stream, 5, 6);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 10, se);
}
- else if ( se->localPart == 32 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 33 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq) */
encodeNBitUnsignedInteger(stream, 5, 7);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 11, se);
}
- else if ( se->localPart == 34 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 35 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes) */
encodeNBitUnsignedInteger(stream, 5, 8);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 12, se);
}
- else if ( se->localPart == 36 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 37 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq) */
encodeNBitUnsignedInteger(stream, 5, 9);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 13, se);
}
- else if ( se->localPart == 38 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 39 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes) */
encodeNBitUnsignedInteger(stream, 5, 10);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 14, se);
}
- else if ( se->localPart == 40 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 41 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq) */
encodeNBitUnsignedInteger(stream, 5, 11);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 15, se);
}
- else if ( se->localPart == 42 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 43 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes) */
encodeNBitUnsignedInteger(stream, 5, 12);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 16, se);
}
- else if ( se->localPart == 47 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 48 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq) */
encodeNBitUnsignedInteger(stream, 5, 13);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 17, se);
}
- else if ( se->localPart == 49 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 50 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes) */
encodeNBitUnsignedInteger(stream, 5, 14);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 18, se);
}
- else if ( se->localPart == 52 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 53 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq) */
encodeNBitUnsignedInteger(stream, 5, 15);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 19, se);
}
- else if ( se->localPart == 54 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 55 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes) */
encodeNBitUnsignedInteger(stream, 5, 16);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 20, se);
}
- else if ( se->localPart == 58 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 59 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq) */
encodeNBitUnsignedInteger(stream, 5, 17);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 21, se);
}
- else if ( se->localPart == 60 && se->namespaceURI == 4 ) {
+ else if ( se->localPart == 61 && se->namespaceURI == 4 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes) */
encodeNBitUnsignedInteger(stream, 5, 18);
/* move on */
- state->grammarStack[state->stackIndex] = 190;
+ state->grammarStack[state->stackIndex] = 211;
/* push element on stack */
return exiPushStack(state, 22, se);
}
break;
- case 168:
+ case 189:
/* 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) */
encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 170;
+ state->grammarStack[state->stackIndex] = 191;
/* push element on stack */
- return exiPushStack(state, 171, se);
+ return exiPushStack(state, 192, se);
}
break;
- case 169:
+ case 190:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID)] */
- if ( se->localPart == 36 && se->namespaceURI == 5 ) {
+ if ( se->localPart == 35 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SessionID) */
/* move on */
- state->grammarStack[state->stackIndex] = 172;
+ state->grammarStack[state->stackIndex] = 193;
/* push element on stack */
- return exiPushStack(state, 173, se);
+ return exiPushStack(state, 194, se);
}
break;
- case 171:
+ case 192:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
if ( se->localPart == 13 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode) */
encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 179;
+ state->grammarStack[state->stackIndex] = 200;
/* push element on stack */
- return exiPushStack(state, 180, se);
+ return exiPushStack(state, 201, se);
}
else if ( se->localPart == 14 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg) */
encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */
- state->grammarStack[state->stackIndex] = 181;
+ state->grammarStack[state->stackIndex] = 202;
/* push element on stack */
- return exiPushStack(state, 182, se);
+ return exiPushStack(state, 203, se);
}
else if ( se->localPart == 10 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList) */
encodeNBitUnsignedInteger(stream, 2, 2);
/* move on */
- state->grammarStack[state->stackIndex] = 183;
+ state->grammarStack[state->stackIndex] = 204;
/* push element on stack */
- return exiPushStack(state, 184, se);
+ return exiPushStack(state, 205, se);
}
break;
- case 172:
+ case 193:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
- if ( se->localPart == 34 && se->namespaceURI == 5 ) {
+ if ( se->localPart == 33 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID) */
encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 174;
+ state->grammarStack[state->stackIndex] = 195;
/* push element on stack */
- return exiPushStack(state, 173, se);
+ return exiPushStack(state, 194, se);
}
else if ( se->localPart == 25 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion) */
encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */
- state->grammarStack[state->stackIndex] = 175;
+ state->grammarStack[state->stackIndex] = 196;
/* push element on stack */
- return exiPushStack(state, 176, se);
+ return exiPushStack(state, 197, se);
}
break;
- case 174:
+ case 195:
/* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
if ( se->localPart == 25 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion) */
encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 175;
+ state->grammarStack[state->stackIndex] = 196;
/* push element on stack */
- return exiPushStack(state, 176, se);
+ return exiPushStack(state, 197, se);
}
break;
- case 179:
+ case 200:
/* 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) */
encodeNBitUnsignedInteger(stream, 2, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 181;
+ state->grammarStack[state->stackIndex] = 202;
/* push element on stack */
- return exiPushStack(state, 182, se);
+ return exiPushStack(state, 203, se);
}
else if ( se->localPart == 10 && se->namespaceURI == 5 ) {
/* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList) */
encodeNBitUnsignedInteger(stream, 2, 1);
/* move on */
- state->grammarStack[state->stackIndex] = 183;
+ state->grammarStack[state->stackIndex] = 204;
/* push element on stack */
- return exiPushStack(state, 184, se);
+ return exiPushStack(state, 205, se);
}
break;
- case 181:
+ case 202:
/* 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) */
encodeNBitUnsignedInteger(stream, 1, 0);
/* move on */
- state->grammarStack[state->stackIndex] = 183;
+ state->grammarStack[state->stackIndex] = 204;
/* push element on stack */
- return exiPushStack(state, 184, se);
+ return exiPushStack(state, 205, se);
}
break;
- case 184:
+ case 205:
/* 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) */
/* move on */
- state->grammarStack[state->stackIndex] = 187;
+ state->grammarStack[state->stackIndex] = 208;
/* push element on stack */
- return exiPushStack(state, 188, se);
+ return exiPushStack(state, 209, se);
}
break;
@@ -1623,43 +1769,35 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state,
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 103:
- /* Element[END_ELEMENT] */
- /* no event code to write */
- break;
- case 102:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), END_ELEMENT] */
- encodeNBitUnsignedInteger(stream, 1, 1);
- break;
case 104:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 106:
- /* Element[END_ELEMENT] */
- /* no event code to write */
- break;
- case 114:
- /* Element[END_ELEMENT] */
- /* no event code to write */
- break;
- case 115:
- /* Element[END_ELEMENT] */
- /* no event code to write */
- break;
- case 122:
- /* Element[END_ELEMENT] */
- /* no event code to write */
- break;
- case 121:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), END_ELEMENT] */
+ case 103:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
- case 124:
+ case 102:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}Tariff), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 2, 2);
+ break;
+ case 107:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 125:
+ case 108:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
+ break;
+ case 110:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
+ break;
+ case 118:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
+ break;
+ case 119:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
@@ -1668,11 +1806,11 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state,
/* no event code to write */
break;
case 126:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
- case 17:
- /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
+ case 125:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EnergyProvider), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}TariffTable), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 2, 2);
break;
case 130:
@@ -1684,82 +1822,90 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state,
/* no event code to write */
break;
case 134:
- /* Element[END_ELEMENT] */
- /* no event code to write */
- break;
- case 132:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Tariff), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 136:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 137:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */
- encodeNBitUnsignedInteger(stream, 1, 1);
- break;
- case 145:
+ case 140:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 144:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
- encodeNBitUnsignedInteger(stream, 1, 1);
+ case 142:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
break;
case 143:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
- encodeNBitUnsignedInteger(stream, 2, 2);
- break;
- case 141:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
- encodeNBitUnsignedInteger(stream, 2, 3);
- break;
- case 139:
- /* 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), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceDetails), END_ELEMENT] */
- encodeNBitUnsignedInteger(stream, 3, 4);
- break;
- case 147:
- /* Element[END_ELEMENT] */
- /* no event code to write */
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TariffEntry), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 1, 1);
break;
case 148:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
+ case 147:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPrice), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 1, 1);
+ break;
case 149:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 151:
+ case 152:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
+ case 150:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 1, 1);
+ break;
+ case 17:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 2, 2);
+ break;
case 154:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 152:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */
- encodeNBitUnsignedInteger(stream, 1, 1);
- break;
case 155:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 157:
+ case 158:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 162:
+ case 156:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 1, 1);
+ break;
+ case 160:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
+ case 161:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 1, 1);
+ break;
+ case 168:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
+ break;
+ case 167:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 1, 1);
+ break;
+ case 165:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 2, 2);
+ break;
case 163:
- /* Element[END_ELEMENT] */
- /* no event code to write */
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceType), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 2, 3);
break;
- case 166:
+ case 169:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
@@ -1767,23 +1913,19 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state,
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 168:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */
- encodeNBitUnsignedInteger(stream, 1, 1);
+ case 172:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
break;
case 175:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 174:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
+ case 173:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringAuthPubKey), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 1, 1);
break;
- case 172:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
- encodeNBitUnsignedInteger(stream, 2, 2);
- break;
- case 177:
+ case 176:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
@@ -1795,23 +1937,7 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state,
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 181:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
- encodeNBitUnsignedInteger(stream, 1, 1);
- break;
- case 179:
- /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
- encodeNBitUnsignedInteger(stream, 2, 2);
- break;
- case 171:
- /* 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 185:
- /* Element[END_ELEMENT] */
- /* no event code to write */
- break;
- case 186:
+ case 184:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
@@ -1819,15 +1945,71 @@ int exiEncodeEndElement(bitstream_t* stream, exi_state_t* state,
/* Element[END_ELEMENT] */
/* no event code to write */
break;
+ case 191:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
+ break;
case 189:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Notification), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 1, 1);
+ break;
+ case 196:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 190:
+ case 195:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 1, 1);
+ break;
+ case 193:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceSessionID), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProtocolVersion), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 2, 2);
+ break;
+ case 198:
/* Element[END_ELEMENT] */
/* no event code to write */
break;
- case 167:
+ case 199:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
+ break;
+ case 204:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
+ break;
+ case 202:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 1, 1);
+ break;
+ case 200:
+ /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 2, 2);
+ break;
+ case 192:
+ /* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EventList), END_ELEMENT] */
+ encodeNBitUnsignedInteger(stream, 2, 3);
+ break;
+ case 206:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
+ break;
+ case 207:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
+ break;
+ case 208:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
+ break;
+ case 210:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
+ break;
+ case 211:
+ /* Element[END_ELEMENT] */
+ /* no event code to write */
+ break;
+ case 188:
/* FirstStartTagStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}LineLockRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), END_ELEMENT] */
encodeNBitUnsignedInteger(stream, 5, 19);
break;
@@ -2016,52 +2198,34 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state,
return 0;
}
break;
- case 105:
+ case 109:
if (val->type == ENUMERATION) {
/* CHARACTERS[ENUMERATION] */
encodeNBitUnsignedInteger(stream, 3, val->enumeration);
/* move on */
- state->grammarStack[state->stackIndex] = 106;
+ state->grammarStack[state->stackIndex] = 110;
return 0;
}
break;
- case 112:
+ case 116:
if (val->type == INTEGER_16) {
/* CHARACTERS[INTEGER_16] */
encodeInteger32(stream, val->int32);
/* move on */
- state->grammarStack[state->stackIndex] = 115;
+ state->grammarStack[state->stackIndex] = 119;
return 0;
}
break;
- case 117:
+ case 121:
if (val->type == ENUMERATION) {
/* CHARACTERS[ENUMERATION] */
encodeNBitUnsignedInteger(stream, 1, val->enumeration);
/* move on */
- state->grammarStack[state->stackIndex] = 124;
- return 0;
- }
- break;
- case 123:
- if (val->type == STRING) {
- /* CHARACTERS[STRING] */
- encodeStringValue(stream, &val->string);
- /* move on */
- state->grammarStack[state->stackIndex] = 125;
- return 0;
- }
- break;
- case 127:
- if (val->type == ENUMERATION) {
- /* CHARACTERS[ENUMERATION] */
- encodeNBitUnsignedInteger(stream, 2, val->enumeration);
- /* move on */
state->grammarStack[state->stackIndex] = 130;
return 0;
}
break;
- case 129:
+ case 127:
if (val->type == STRING) {
/* CHARACTERS[STRING] */
encodeStringValue(stream, &val->string);
@@ -2071,94 +2235,139 @@ int exiEncodeCharacters(bitstream_t* stream, exi_state_t* state,
}
break;
case 133:
- if (val->type == ENUMERATION) {
- /* CHARACTERS[ENUMERATION] */
- encodeNBitUnsignedInteger(stream, 3, val->enumeration);
+ if (val->type == STRING) {
+ /* CHARACTERS[STRING] */
+ encodeStringValue(stream, &val->string);
/* move on */
state->grammarStack[state->stackIndex] = 136;
return 0;
}
break;
- case 140:
- if (val->type == BINARY_HEX) {
- /* CHARACTERS[BINARY_HEX] */
- encodeBinary(stream, &val->binary);
- /* move on */
- state->grammarStack[state->stackIndex] = 147;
- return 0;
- }
- break;
- case 142:
+ case 139:
if (val->type == STRING) {
/* CHARACTERS[STRING] */
encodeStringValue(stream, &val->string);
/* move on */
- state->grammarStack[state->stackIndex] = 148;
+ state->grammarStack[state->stackIndex] = 142;
+ return 0;
+ }
+ break;
+ case 146:
+ if (val->type == UNSIGNED_INTEGER_32) {
+ /* CHARACTERS[UNSIGNED_INTEGER_32] */
+ encodeUnsignedInteger32(stream, val->uint32);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 149;
+ return 0;
+ }
+ break;
+ case 151:
+ if (val->type == ENUMERATION) {
+ /* CHARACTERS[ENUMERATION] */
+ encodeNBitUnsignedInteger(stream, 2, val->enumeration);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 154;
return 0;
}
break;
case 153:
- if (val->type == ENUMERATION) {
- /* CHARACTERS[ENUMERATION] */
- encodeNBitUnsignedInteger(stream, 2, val->enumeration);
+ if (val->type == STRING) {
+ /* CHARACTERS[STRING] */
+ encodeStringValue(stream, &val->string);
/* move on */
state->grammarStack[state->stackIndex] = 155;
return 0;
}
break;
- case 159:
+ case 157:
if (val->type == ENUMERATION) {
/* CHARACTERS[ENUMERATION] */
encodeNBitUnsignedInteger(stream, 3, val->enumeration);
/* move on */
- state->grammarStack[state->stackIndex] = 163;
+ state->grammarStack[state->stackIndex] = 160;
return 0;
}
break;
- case 173:
+ case 164:
if (val->type == BINARY_HEX) {
/* CHARACTERS[BINARY_HEX] */
encodeBinary(stream, &val->binary);
/* move on */
- state->grammarStack[state->stackIndex] = 177;
+ state->grammarStack[state->stackIndex] = 169;
return 0;
}
break;
- case 176:
+ case 166:
if (val->type == STRING) {
/* CHARACTERS[STRING] */
encodeStringValue(stream, &val->string);
/* move on */
- state->grammarStack[state->stackIndex] = 178;
+ state->grammarStack[state->stackIndex] = 170;
+ return 0;
+ }
+ break;
+ case 174:
+ if (val->type == ENUMERATION) {
+ /* CHARACTERS[ENUMERATION] */
+ encodeNBitUnsignedInteger(stream, 2, val->enumeration);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 176;
return 0;
}
break;
case 180:
if (val->type == ENUMERATION) {
/* CHARACTERS[ENUMERATION] */
- encodeNBitUnsignedInteger(stream, 2, val->enumeration);
+ encodeNBitUnsignedInteger(stream, 3, val->enumeration);
/* move on */
- state->grammarStack[state->stackIndex] = 185;
+ state->grammarStack[state->stackIndex] = 184;
return 0;
}
break;
- case 182:
+ case 194:
+ if (val->type == BINARY_HEX) {
+ /* CHARACTERS[BINARY_HEX] */
+ encodeBinary(stream, &val->binary);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 198;
+ return 0;
+ }
+ break;
+ case 197:
+ if (val->type == STRING) {
+ /* CHARACTERS[STRING] */
+ encodeStringValue(stream, &val->string);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 199;
+ return 0;
+ }
+ break;
+ case 201:
+ if (val->type == ENUMERATION) {
+ /* CHARACTERS[ENUMERATION] */
+ encodeNBitUnsignedInteger(stream, 2, val->enumeration);
+ /* move on */
+ state->grammarStack[state->stackIndex] = 206;
+ return 0;
+ }
+ break;
+ case 203:
if (val->type == STRING) {
/* CHARACTERS[STRING] */
/* xsi:type OR xsi:nil */
encodeNBitUnsignedInteger(stream, 1, 0);
encodeStringValue(stream, &val->string);
/* move on */
- state->grammarStack[state->stackIndex] = 186;
+ state->grammarStack[state->stackIndex] = 207;
return 0;
}
break;
- case 188:
+ case 209:
if (val->type == ENUMERATION) {
/* CHARACTERS[ENUMERATION] */
encodeNBitUnsignedInteger(stream, 3, val->enumeration);
/* move on */
- state->grammarStack[state->stackIndex] = 189;
+ state->grammarStack[state->stackIndex] = 210;
return 0;
}
break;
diff --git a/src/codec/StringTableEntries.c b/src/codec/StringTableEntries.c
index 9f74a32..4edb3ef 100644
--- a/src/codec/StringTableEntries.c
+++ b/src/codec/StringTableEntries.c
@@ -59,19 +59,20 @@ const char * localNames3[] = {
};
/* localName entries for URI id = 4 */
const char * localNames4[] = {
- "ContractID", "EAmount", "EVSEID", "EVSEIMax", "EVSEMaxPhases",
- "EVSEMaxPower", "EVSEStatus", "EVSEVoltage", "EnergyProvider", "EoC",
- "LineLockReq", "LineLockReqType", "LineLockRes", "LineLockResType", "MeterInfo",
- "MeteringAuthPubKey", "MeteringReceiptReq", "MeteringReceiptReqType", "MeteringReceiptRes", "MeteringReceiptResType",
- "MeteringStatusReq", "MeteringStatusReqType", "MeteringStatusRes", "MeteringStatusResType", "PCurrent",
- "PEVID", "PEVMaxPhases", "PEVMaxPower", "PEVMaxVoltage", "PEVMinVoltage",
- "PEVPubKey", "PEVStatus", "PaymentDetailsReq", "PaymentDetailsReqType", "PaymentDetailsRes",
- "PaymentDetailsResType", "PowerDeliveryReq", "PowerDeliveryReqType", "PowerDeliveryRes", "PowerDeliveryResType",
- "PowerDiscoveryReq", "PowerDiscoveryReqType", "PowerDiscoveryRes", "PowerDiscoveryResType", "ReqLockStatus",
- "ReqSwitchStatus", "ResponseCode", "ServiceDiscoveryReq", "ServiceDiscoveryReqType", "ServiceDiscoveryRes",
- "ServiceDiscoveryResType", "ServiceList", "ServicePaymentSelectionReq", "ServicePaymentSelectionReqType", "ServicePaymentSelectionRes",
- "ServicePaymentSelectionResType", "ServiceScope", "ServiceType", "SessionSetupReq", "SessionSetupReqType",
- "SessionSetupRes", "SessionSetupResType", "TCurrent", "Tariff"
+ "ChargingProfile", "ContractID", "EAmount", "EVSEID", "EVSEIMax",
+ "EVSEMaxPhases", "EVSEMaxPower", "EVSEStatus", "EVSEVoltage", "EnergyProvider",
+ "EoC", "LineLockReq", "LineLockReqType", "LineLockRes", "LineLockResType",
+ "MeterInfo", "MeteringAuthPubKey", "MeteringReceiptReq", "MeteringReceiptReqType", "MeteringReceiptRes",
+ "MeteringReceiptResType", "MeteringStatusReq", "MeteringStatusReqType", "MeteringStatusRes", "MeteringStatusResType",
+ "PCurrent", "PEVID", "PEVMaxPhases", "PEVMaxPower", "PEVMaxVoltage",
+ "PEVMinVoltage", "PEVPubKey", "PEVStatus", "PaymentDetailsReq", "PaymentDetailsReqType",
+ "PaymentDetailsRes", "PaymentDetailsResType", "PowerDeliveryReq", "PowerDeliveryReqType", "PowerDeliveryRes",
+ "PowerDeliveryResType", "PowerDiscoveryReq", "PowerDiscoveryReqType", "PowerDiscoveryRes", "PowerDiscoveryResType",
+ "ReqLockStatus", "ReqSwitchStatus", "ResponseCode", "ServiceDiscoveryReq", "ServiceDiscoveryReqType",
+ "ServiceDiscoveryRes", "ServiceDiscoveryResType", "ServiceList", "ServicePaymentSelectionReq", "ServicePaymentSelectionReqType",
+ "ServicePaymentSelectionRes", "ServicePaymentSelectionResType", "ServiceScope", "ServiceType", "SessionSetupReq",
+ "SessionSetupReqType", "SessionSetupRes", "SessionSetupResType", "TCurrent", "Tariff",
+ "TariffTable"
};
/* localName entries for URI id = 5 */
const char * localNames5[] = {
@@ -80,20 +81,20 @@ const char * localNames5[] = {
"EventList", "EventListType", "FatalError", "FaultCode", "FaultMsg",
"FloatingValueType", "MeterID", "MeterInfoType", "MeterPubKey", "MeterReading",
"MeterStatus", "Multiplier", "NotificationType", "PEVStatusType", "PowerSwitchClosed",
- "ProtocolVersion", "RCD", "Service", "ServiceDescriptionType", "ServiceDetails",
- "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"
+ "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[] = {
@@ -105,8 +106,8 @@ struct exiPartition localNamePartitions[7] = {
{ 4, localNames1 },
{ 2, localNames2 },
{ 46, localNames3 },
- { 64, localNames4 },
- { 93, localNames5 },
+ { 66, localNames4 },
+ { 92, localNames5 },
{ 9, localNames6 }
};
const char * uris[] = {
diff --git a/src/service/v2g_service.h b/src/service/v2g_service.h
new file mode 100644
index 0000000..d8c1d3f
--- /dev/null
+++ b/src/service/v2g_service.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef V2G_SERVICE_H_
+#define V2G_SERVICE_H_
+
+#include "v2g_serviceDataTypes.h"
+#include "../codec/EXITypes.h"
+
+struct v2gService
+{
+ /* in-/ out-stream */
+ bitstream_t inStream;
+ bitstream_t outStream;
+
+ /* EXI */
+ exi_state_t stateDecode;
+ exi_state_t stateEncode;
+ exi_event_t event;
+ eqname_t eqn;
+ exi_value_t val;
+
+ /* v2g message data structure */
+ struct AnonType_V2G_Message v2gMsg;
+
+};
+
+#endif /* V2G_SERVICE_H_ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/service/v2g_serviceClientDataTransmitter.h b/src/service/v2g_serviceClientDataTransmitter.h
new file mode 100644
index 0000000..5d5ee25
--- /dev/null
+++ b/src/service/v2g_serviceClientDataTransmitter.h
@@ -0,0 +1,44 @@
+
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef V2G_SERVICECLIENTDATATRANSMITTER_H_
+#define V2G_SERVICECLIENTDATATRANSMITTER_H_
+
+#include "../codec/EXITypes.h"
+
+/* This method has to be implemented!
+ * This method sends EXI stream (outStream) to the EVSE and receives response stream (inStream)*/
+int serviceDataTransmitter(uint8_t* outStream, size_t outStreamLength, uint8_t* inStream);
+
+#endif /* V2G_SERVICECLIENTDATATRANSMITTER_H_ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/service/v2g_serviceClientStubs.c b/src/service/v2g_serviceClientStubs.c
new file mode 100644
index 0000000..dc83a0d
--- /dev/null
+++ b/src/service/v2g_serviceClientStubs.c
@@ -0,0 +1,1981 @@
+
+
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+
+ #include "v2g_serviceDataTypes.h"
+ #include "v2g_serviceClientStubs.h"
+ #include "v2g_serviceDataSerializiation.h"
+ #include "v2g_serviceClientDataTransmitter.h"
+ #include "../codec/EXITypes.h"
+ #include "../codec/EXIDecoder.h"
+ #include "../codec/EXIEncoder.h"
+
+
+static int deserializeMessage(struct v2gService* service);
+
+/* call sessionSetup */
+int call_sessionSetup(struct v2gService* service, struct HeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result)
+{
+ size_t posEncode, posDecode;
+
+ /* init outStream data structure */
+ posEncode = 0;
+ service->outStream.pos = &posEncode;
+ service->outStream.buffer = 0;
+ service->outStream.capacity = 8;
+
+ /* init encoder (write header, set initial state) */
+ exiInitEncoder(&(service->outStream), &(service->stateEncode));
+
+ /* init inStream data structure */
+ posDecode = 0;
+ service->inStream.pos = &posDecode;
+ service->inStream.buffer=0;
+ service->inStream.capacity=0;
+
+
+
+ /* init v2g message */
+ init_AnonType_V2G_Message(&(service->v2gMsg));
+
+ /* assign data to service data structure */
+ service->v2gMsg.Header = *header;
+ service->v2gMsg.Body.SessionSetupReq = *params;
+ service->v2gMsg.Body.isused.SessionSetupReq=1;
+
+ /* encode data to exi stream*/
+ if(serialize_message(service)<0)
+ {
+
+ return -1;
+ }
+
+ /* send data to server and wait for the response message */
+ if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* init decoder (read header, set initial state) */
+ exiInitDecoder(&(service->inStream), &(service->stateDecode));
+
+ /* deserilize the response message */
+ if(deserializeMessage(service)<0)
+ {
+
+ return -1;
+ }
+ *result = service->v2gMsg.Body.SessionSetupRes;
+
+
+ return 0;
+}
+
+/* call serviceDiscovery */
+int call_serviceDiscovery(struct v2gService* service, struct HeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result)
+{
+ size_t posEncode, posDecode;
+
+ /* init outStream data structure */
+ posEncode = 0;
+ service->outStream.pos = &posEncode;
+ service->outStream.buffer = 0;
+ service->outStream.capacity = 8;
+
+ /* init encoder (write header, set initial state) */
+ exiInitEncoder(&(service->outStream), &(service->stateEncode));
+
+ /* init inStream data structure */
+ posDecode = 0;
+ service->inStream.pos = &posDecode;
+ service->inStream.buffer=0;
+ service->inStream.capacity=0;
+
+
+
+ /* init v2g message */
+ init_AnonType_V2G_Message(&(service->v2gMsg));
+
+ /* assign data to service data structure */
+ service->v2gMsg.Header = *header;
+ service->v2gMsg.Body.ServiceDiscoveryReq = *params;
+ service->v2gMsg.Body.isused.ServiceDiscoveryReq=1;
+
+ /* encode data to exi stream*/
+ if(serialize_message(service)<0)
+ {
+
+ return -1;
+ }
+
+ /* send data to server and wait for the response message */
+ if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* init decoder (read header, set initial state) */
+ exiInitDecoder(&(service->inStream), &(service->stateDecode));
+
+ /* deserilize the response message */
+ if(deserializeMessage(service)<0)
+ {
+
+ return -1;
+ }
+ *result = service->v2gMsg.Body.ServiceDiscoveryRes;
+
+
+ return 0;
+}
+
+/* call selectedServicePayment */
+int call_selectedServicePayment(struct v2gService* service, struct HeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result)
+{
+ size_t posEncode, posDecode;
+
+ /* init outStream data structure */
+ posEncode = 0;
+ service->outStream.pos = &posEncode;
+ service->outStream.buffer = 0;
+ service->outStream.capacity = 8;
+
+ /* init encoder (write header, set initial state) */
+ exiInitEncoder(&(service->outStream), &(service->stateEncode));
+
+ /* init inStream data structure */
+ posDecode = 0;
+ service->inStream.pos = &posDecode;
+ service->inStream.buffer=0;
+ service->inStream.capacity=0;
+
+
+
+ /* init v2g message */
+ init_AnonType_V2G_Message(&(service->v2gMsg));
+
+ /* assign data to service data structure */
+ service->v2gMsg.Header = *header;
+ service->v2gMsg.Body.ServicePaymentSelectionReq = *params;
+ service->v2gMsg.Body.isused.ServicePaymentSelectionReq=1;
+
+ /* encode data to exi stream*/
+ if(serialize_message(service)<0)
+ {
+
+ return -1;
+ }
+
+ /* send data to server and wait for the response message */
+ if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* init decoder (read header, set initial state) */
+ exiInitDecoder(&(service->inStream), &(service->stateDecode));
+
+ /* deserilize the response message */
+ if(deserializeMessage(service)<0)
+ {
+
+ return -1;
+ }
+ *result = service->v2gMsg.Body.ServicePaymentSelectionRes;
+
+
+ return 0;
+}
+
+/* call paymentDetails */
+int call_paymentDetails(struct v2gService* service, struct HeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result)
+{
+ size_t posEncode, posDecode;
+
+ /* init outStream data structure */
+ posEncode = 0;
+ service->outStream.pos = &posEncode;
+ service->outStream.buffer = 0;
+ service->outStream.capacity = 8;
+
+ /* init encoder (write header, set initial state) */
+ exiInitEncoder(&(service->outStream), &(service->stateEncode));
+
+ /* init inStream data structure */
+ posDecode = 0;
+ service->inStream.pos = &posDecode;
+ service->inStream.buffer=0;
+ service->inStream.capacity=0;
+
+
+
+ /* init v2g message */
+ init_AnonType_V2G_Message(&(service->v2gMsg));
+
+ /* assign data to service data structure */
+ service->v2gMsg.Header = *header;
+ service->v2gMsg.Body.PaymentDetailsReq = *params;
+ service->v2gMsg.Body.isused.PaymentDetailsReq=1;
+
+ /* encode data to exi stream*/
+ if(serialize_message(service)<0)
+ {
+
+ return -1;
+ }
+
+ /* send data to server and wait for the response message */
+ if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* init decoder (read header, set initial state) */
+ exiInitDecoder(&(service->inStream), &(service->stateDecode));
+
+ /* deserilize the response message */
+ if(deserializeMessage(service)<0)
+ {
+
+ return -1;
+ }
+ *result = service->v2gMsg.Body.PaymentDetailsRes;
+
+
+ return 0;
+}
+
+/* call powerDiscovery */
+int call_powerDiscovery(struct v2gService* service, struct HeaderType* header, struct PowerDiscoveryReqType* params, struct PowerDiscoveryResType* result)
+{
+ size_t posEncode, posDecode;
+
+ /* init outStream data structure */
+ posEncode = 0;
+ service->outStream.pos = &posEncode;
+ service->outStream.buffer = 0;
+ service->outStream.capacity = 8;
+
+ /* init encoder (write header, set initial state) */
+ exiInitEncoder(&(service->outStream), &(service->stateEncode));
+
+ /* init inStream data structure */
+ posDecode = 0;
+ service->inStream.pos = &posDecode;
+ service->inStream.buffer=0;
+ service->inStream.capacity=0;
+
+
+
+ /* init v2g message */
+ init_AnonType_V2G_Message(&(service->v2gMsg));
+
+ /* assign data to service data structure */
+ service->v2gMsg.Header = *header;
+ service->v2gMsg.Body.PowerDiscoveryReq = *params;
+ service->v2gMsg.Body.isused.PowerDiscoveryReq=1;
+
+ /* encode data to exi stream*/
+ if(serialize_message(service)<0)
+ {
+
+ return -1;
+ }
+
+ /* send data to server and wait for the response message */
+ if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* init decoder (read header, set initial state) */
+ exiInitDecoder(&(service->inStream), &(service->stateDecode));
+
+ /* deserilize the response message */
+ if(deserializeMessage(service)<0)
+ {
+
+ return -1;
+ }
+ *result = service->v2gMsg.Body.PowerDiscoveryRes;
+
+
+ return 0;
+}
+
+/* call lineLock */
+int call_lineLock(struct v2gService* service, struct HeaderType* header, struct LineLockReqType* params, struct LineLockResType* result)
+{
+ size_t posEncode, posDecode;
+
+ /* init outStream data structure */
+ posEncode = 0;
+ service->outStream.pos = &posEncode;
+ service->outStream.buffer = 0;
+ service->outStream.capacity = 8;
+
+ /* init encoder (write header, set initial state) */
+ exiInitEncoder(&(service->outStream), &(service->stateEncode));
+
+ /* init inStream data structure */
+ posDecode = 0;
+ service->inStream.pos = &posDecode;
+ service->inStream.buffer=0;
+ service->inStream.capacity=0;
+
+
+
+ /* init v2g message */
+ init_AnonType_V2G_Message(&(service->v2gMsg));
+
+ /* assign data to service data structure */
+ service->v2gMsg.Header = *header;
+ service->v2gMsg.Body.LineLockReq = *params;
+ service->v2gMsg.Body.isused.LineLockReq=1;
+
+ /* encode data to exi stream*/
+ if(serialize_message(service)<0)
+ {
+
+ return -1;
+ }
+
+ /* send data to server and wait for the response message */
+ if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* init decoder (read header, set initial state) */
+ exiInitDecoder(&(service->inStream), &(service->stateDecode));
+
+ /* deserilize the response message */
+ if(deserializeMessage(service)<0)
+ {
+
+ return -1;
+ }
+ *result = service->v2gMsg.Body.LineLockRes;
+
+
+ return 0;
+}
+
+/* call powerDelivery */
+int call_powerDelivery(struct v2gService* service, struct HeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result)
+{
+ size_t posEncode, posDecode;
+
+ /* init outStream data structure */
+ posEncode = 0;
+ service->outStream.pos = &posEncode;
+ service->outStream.buffer = 0;
+ service->outStream.capacity = 8;
+
+ /* init encoder (write header, set initial state) */
+ exiInitEncoder(&(service->outStream), &(service->stateEncode));
+
+ /* init inStream data structure */
+ posDecode = 0;
+ service->inStream.pos = &posDecode;
+ service->inStream.buffer=0;
+ service->inStream.capacity=0;
+
+
+
+ /* init v2g message */
+ init_AnonType_V2G_Message(&(service->v2gMsg));
+
+ /* assign data to service data structure */
+ service->v2gMsg.Header = *header;
+ service->v2gMsg.Body.PowerDeliveryReq = *params;
+ service->v2gMsg.Body.isused.PowerDeliveryReq=1;
+
+ /* encode data to exi stream*/
+ if(serialize_message(service)<0)
+ {
+
+ return -1;
+ }
+
+ /* send data to server and wait for the response message */
+ if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* init decoder (read header, set initial state) */
+ exiInitDecoder(&(service->inStream), &(service->stateDecode));
+
+ /* deserilize the response message */
+ if(deserializeMessage(service)<0)
+ {
+
+ return -1;
+ }
+ *result = service->v2gMsg.Body.PowerDeliveryRes;
+
+
+ return 0;
+}
+
+/* call meteringStatus */
+int call_meteringStatus(struct v2gService* service, struct HeaderType* header, struct MeteringStatusResType* result)
+{
+ size_t posEncode, posDecode;
+
+ /* init outStream data structure */
+ posEncode = 0;
+ service->outStream.pos = &posEncode;
+ service->outStream.buffer = 0;
+ service->outStream.capacity = 8;
+
+ /* init encoder (write header, set initial state) */
+ exiInitEncoder(&(service->outStream), &(service->stateEncode));
+
+ /* init inStream data structure */
+ posDecode = 0;
+ service->inStream.pos = &posDecode;
+ service->inStream.buffer=0;
+ service->inStream.capacity=0;
+
+
+
+ /* init v2g message */
+ init_AnonType_V2G_Message(&(service->v2gMsg));
+
+ /* assign data to service data structure */
+ service->v2gMsg.Header = *header;
+ service->v2gMsg.Body.isused.MeteringStatusReq=1;
+
+ /* encode data to exi stream*/
+ if(serialize_message(service)<0)
+ {
+
+ return -1;
+ }
+
+ /* send data to server and wait for the response message */
+ if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* init decoder (read header, set initial state) */
+ exiInitDecoder(&(service->inStream), &(service->stateDecode));
+
+ /* deserilize the response message */
+ if(deserializeMessage(service)<0)
+ {
+
+ return -1;
+ }
+ *result = service->v2gMsg.Body.MeteringStatusRes;
+
+
+ return 0;
+}
+
+/* call meteringReceipt */
+int call_meteringReceipt(struct v2gService* service, struct HeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result)
+{
+ size_t posEncode, posDecode;
+
+ /* init outStream data structure */
+ posEncode = 0;
+ service->outStream.pos = &posEncode;
+ service->outStream.buffer = 0;
+ service->outStream.capacity = 8;
+
+ /* init encoder (write header, set initial state) */
+ exiInitEncoder(&(service->outStream), &(service->stateEncode));
+
+ /* init inStream data structure */
+ posDecode = 0;
+ service->inStream.pos = &posDecode;
+ service->inStream.buffer=0;
+ service->inStream.capacity=0;
+
+
+
+ /* init v2g message */
+ init_AnonType_V2G_Message(&(service->v2gMsg));
+
+ /* assign data to service data structure */
+ service->v2gMsg.Header = *header;
+ service->v2gMsg.Body.MeteringReceiptReq = *params;
+ service->v2gMsg.Body.isused.MeteringReceiptReq=1;
+
+ /* encode data to exi stream*/
+ if(serialize_message(service)<0)
+ {
+
+ return -1;
+ }
+
+ /* send data to server and wait for the response message */
+ if(serviceDataTransmitter(service->outStream.data, *(service->outStream.pos), service->inStream.data)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* init decoder (read header, set initial state) */
+ exiInitDecoder(&(service->inStream), &(service->stateDecode));
+
+ /* deserilize the response message */
+ if(deserializeMessage(service)<0)
+ {
+
+ return -1;
+ }
+ *result = service->v2gMsg.Body.MeteringReceiptRes;
+
+
+ return 0;
+}
+
+
+
+ /**
+ * Deserialize an element value of the EXI stream and assign it to the
+ * service data structure
+ */
+static int deserializeElementCharacter(struct v2gService* service)
+{
+
+ /* SessionID */
+ if(service->eqn.namespaceURI==5 && service->eqn.localPart==35)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* array copy and array length assignment */
+ memcpy(service->v2gMsg.Header.SessionInformation.SessionID.data, service->val.binary.data,service->val.binary.len);
+ service->v2gMsg.Header.SessionInformation.SessionID.arraylen.data = service->val.binary.len;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ServiceSessionID */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==33)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* array copy and array length assignment */
+ memcpy(service->v2gMsg.Header.SessionInformation.ServiceSessionID.data, service->val.binary.data,service->val.binary.len);
+ service->v2gMsg.Header.SessionInformation.ServiceSessionID.arraylen.data = service->val.binary.len;
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Header.SessionInformation.isused.ServiceSessionID=1;
+ }
+
+ /* ProtocolVersion */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==25)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Header.SessionInformation.ProtocolVersion.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Header.SessionInformation.ProtocolVersion.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Header.SessionInformation.isused.ProtocolVersion=1;
+ }
+
+ /* Event */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==9)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Header.Notification.EventList.Event=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* FaultCode */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==13)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Header.Notification.FaultCode=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Header.Notification.isused.FaultCode=1;
+ }
+
+ /* FaultMsg */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==14)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Header.Notification.FaultMsg.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Header.Notification.FaultMsg.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Header.Notification.isused.FaultMsg=1;
+ }
+
+ /* ConnectorLocked */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==4)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+
+ service->v2gMsg.Body.SessionSetupReq.PEVStatus.ConnectorLocked=service->val.boolean;
+
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ConnectorLocked=service->val.boolean;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ChargerStandby */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==0)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+
+ service->v2gMsg.Body.SessionSetupReq.PEVStatus.ChargerStandby=service->val.boolean;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* PEVID */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==26)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.SessionSetupReq.PEVID.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.SessionSetupReq.PEVID.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.SessionSetupReq.isused.PEVID=1;
+ }
+
+ /* FatalError */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==12)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.FatalError=service->val.boolean;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* EVSEStandby */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==7)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.EVSEStandby=service->val.boolean;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ConnectorLocked */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==4)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+
+ service->v2gMsg.Body.SessionSetupReq.PEVStatus.ConnectorLocked=service->val.boolean;
+
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ConnectorLocked=service->val.boolean;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* PowerSwitchClosed */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==24)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.PowerSwitchClosed=service->val.boolean;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* RCD */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==26)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.RCD=service->val.boolean;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ShutDownTime */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==37)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ShutDownTime=service->val.int64;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PaymentDetailsRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.LineLockRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDeliveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringStatusRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringReceiptRes.ResponseCode=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* EVSEID */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==3)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* 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;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* TCurrent */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==63)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.TCurrent=service->val.int64;
+
+ service->v2gMsg.Body.MeteringStatusRes.TCurrent=service->val.int64;
+
+ service->v2gMsg.Body.MeteringReceiptReq.TCurrent=service->val.int64;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ServiceType */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==58)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.ServiceDiscoveryReq.ServiceType=service->val.enumeration;
+
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceType=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.ServiceDiscoveryReq.isused.ServiceType=1;
+ }
+
+ /* ServiceScope */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==57)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.ServiceDiscoveryReq.ServiceScope.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.ServiceDiscoveryReq.ServiceScope.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.ServiceDiscoveryReq.isused.ServiceScope=1;
+ }
+
+ /* ServiceID */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==29)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* array copy and array length assignment */
+ memcpy(service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceID.data, service->val.binary.data,service->val.binary.len);
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceID.arraylen.data = service->val.binary.len;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ServiceName */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==31)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceName.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceName.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceName=1;
+ }
+
+ /* ServiceType */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==34)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.ServiceDiscoveryReq.ServiceType=service->val.enumeration;
+
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceType=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceType=1;
+ }
+
+ /* ServiceScope */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==32)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceScope.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceScope.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceScope=1;
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PaymentDetailsRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.LineLockRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDeliveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringStatusRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringReceiptRes.ResponseCode=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* PEVPubKey */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==31)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* array copy and array length assignment */
+ memcpy(service->v2gMsg.Body.ServicePaymentSelectionReq.PEVPubKey.data, service->val.binary.data,service->val.binary.len);
+ service->v2gMsg.Body.ServicePaymentSelectionReq.PEVPubKey.arraylen.data = service->val.binary.len;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PaymentDetailsRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.LineLockRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDeliveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringStatusRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringReceiptRes.ResponseCode=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* MeteringAuthPubKey */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==16)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* array copy and array length assignment */
+ memcpy(service->v2gMsg.Body.ServicePaymentSelectionRes.MeteringAuthPubKey.data, service->val.binary.data,service->val.binary.len);
+ service->v2gMsg.Body.ServicePaymentSelectionRes.MeteringAuthPubKey.arraylen.data = service->val.binary.len;
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.ServicePaymentSelectionRes.isused.MeteringAuthPubKey=1;
+ }
+
+ /* ContractID */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==1)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.PaymentDetailsReq.ContractID.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.PaymentDetailsReq.ContractID.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PaymentDetailsRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.LineLockRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDeliveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringStatusRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringReceiptRes.ResponseCode=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* Multiplier */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==21)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Multiplier=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* Unit */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==50)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Unit=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* Value */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==51)
+ {
+ if(service->val.type == INTEGER_16)
+ {
+
+ service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Value=service->val.int32;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* EoC */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==10)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+
+ service->v2gMsg.Body.PowerDiscoveryReq.EoC=service->val.int64;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* PEVMaxPhases */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==27)
+ {
+ if(service->val.type == INTEGER_16)
+ {
+
+ service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPhases=service->val.int32;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* TariffStart */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==48)
+ {
+ 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;
+ }
+ }
+
+ /* TariffID */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==46)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffID=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* TariffDescription */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==41)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffDescription.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffDescription.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].isused.TariffDescription=1;
+ }
+
+ /* Currency */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==5)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Currency.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Currency.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PaymentDetailsRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.LineLockRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDeliveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringStatusRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringReceiptRes.ResponseCode=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* EVSEMaxPhases */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==5)
+ {
+ if(service->val.type == INTEGER_16)
+ {
+
+ service->v2gMsg.Body.PowerDiscoveryRes.EVSEMaxPhases=service->val.int32;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* EnergyProvider */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==9)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.PowerDiscoveryRes.EnergyProvider.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.PowerDiscoveryRes.EnergyProvider.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.PowerDiscoveryRes.isused.EnergyProvider=1;
+ }
+
+ /* ReqLockStatus */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==45)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+
+ service->v2gMsg.Body.LineLockReq.ReqLockStatus=service->val.boolean;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PaymentDetailsRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.LineLockRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDeliveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringStatusRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringReceiptRes.ResponseCode=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ChargingProfileEntryStart */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==2)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+
+ service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryStart=service->val.int64;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ReqSwitchStatus */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==46)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+
+ service->v2gMsg.Body.PowerDeliveryReq.ReqSwitchStatus=service->val.boolean;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* Tariff */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==64)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.PowerDeliveryReq.Tariff=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringReceiptReq.Tariff=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.PowerDeliveryReq.isused.Tariff=1;
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PaymentDetailsRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.LineLockRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDeliveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringStatusRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringReceiptRes.ResponseCode=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* MeterID */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==16)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterID.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterID.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterID=1;
+ }
+
+ /* MeterPubKey */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==18)
+ {
+ 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;
+ }
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterPubKey=1;
+ }
+
+ /* MeterStatus */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==20)
+ {
+ if(service->val.type == INTEGER_16)
+ {
+
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterStatus=service->val.int32;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterStatus=1;
+ }
+
+ /* TMeter */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==38)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.TMeter=service->val.int64;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.TMeter=1;
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PaymentDetailsRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.LineLockRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDeliveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringStatusRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringReceiptRes.ResponseCode=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* EVSEID */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==3)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* array copy and array length assignment */
+ memcpy(service->v2gMsg.Body.MeteringStatusRes.EVSEID.data, service->val.binary.data,service->val.binary.len);
+ service->v2gMsg.Body.MeteringStatusRes.EVSEID.arraylen.data = service->val.binary.len;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* TCurrent */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==63)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.TCurrent=service->val.int64;
+
+ service->v2gMsg.Body.MeteringStatusRes.TCurrent=service->val.int64;
+
+ service->v2gMsg.Body.MeteringReceiptReq.TCurrent=service->val.int64;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* PEVID */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==26)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.MeteringReceiptReq.PEVID.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.MeteringReceiptReq.PEVID.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.MeteringReceiptReq.isused.PEVID=1;
+ }
+
+ /* TCurrent */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==63)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.TCurrent=service->val.int64;
+
+ service->v2gMsg.Body.MeteringStatusRes.TCurrent=service->val.int64;
+
+ service->v2gMsg.Body.MeteringReceiptReq.TCurrent=service->val.int64;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.MeteringReceiptReq.isused.TCurrent=1;
+ }
+
+ /* Tariff */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==64)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.PowerDeliveryReq.Tariff=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringReceiptReq.Tariff=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+
+ service->v2gMsg.Body.SessionSetupRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PaymentDetailsRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.LineLockRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.PowerDeliveryRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringStatusRes.ResponseCode=service->val.enumeration;
+
+ service->v2gMsg.Body.MeteringReceiptRes.ResponseCode=service->val.enumeration;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/**
+ * Deserialize an element of the EXI stream
+ * @return 0 = 0K; -1 = ERROR
+ */
+static int deserializeElement(struct v2gService* service)
+{
+
+ /* EventList */
+ if(service->eqn.namespaceURI==5 && service->eqn.localPart==10)
+ {
+ /* is used */
+ service->v2gMsg.Header.Notification.isused.EventList=1;
+ }
+
+ /* Notification */
+ else if(service->eqn.namespaceURI==6 && service->eqn.localPart==6)
+ {
+ /* is used */
+ service->v2gMsg.Header.isused.Notification=1;
+ }
+
+ /* ServiceList */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==52)
+ {
+ /* is used */
+ service->v2gMsg.Body.ServiceDiscoveryRes.isused.ServiceList=1;
+ }
+
+ /* EPrice */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==6)
+ {
+ /* 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;
+ }
+
+ /* TariffTable */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==65)
+ {
+ /* is used */
+ service->v2gMsg.Body.PowerDiscoveryRes.isused.TariffTable=1;
+ }
+
+ /* ChargingProfile */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==0)
+ {
+ /* is used */
+ service->v2gMsg.Body.PowerDeliveryReq.isused.ChargingProfile=1;
+ }
+
+ /* MeterReading */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==19)
+ {
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterReading=1;
+ }
+
+ /* PCurrent */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==25)
+ {
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.isused.PCurrent=1;
+ }
+
+ /* MeterInfo */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==15)
+ {
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.isused.MeterInfo=1;
+ }
+
+ /* SessionSetupReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==59)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.SessionSetupReq=1;
+ }
+
+ /* SessionSetupRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==61)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.SessionSetupRes=1;
+ }
+
+ /* ServiceDiscoveryReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==48)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.ServiceDiscoveryReq=1;
+ }
+
+ /* ServiceDiscoveryRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==50)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.ServiceDiscoveryRes=1;
+ }
+
+ /* ServicePaymentSelectionReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==53)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.ServicePaymentSelectionReq=1;
+ }
+
+ /* ServicePaymentSelectionRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==55)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.ServicePaymentSelectionRes=1;
+ }
+
+ /* PaymentDetailsReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==33)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.PaymentDetailsReq=1;
+ }
+
+ /* PaymentDetailsRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==35)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.PaymentDetailsRes=1;
+ }
+
+ /* PowerDiscoveryReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==41)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.PowerDiscoveryReq=1;
+ }
+
+ /* PowerDiscoveryRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==43)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.PowerDiscoveryRes=1;
+ }
+
+ /* LineLockReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==11)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.LineLockReq=1;
+ }
+
+ /* LineLockRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==13)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.LineLockRes=1;
+ }
+
+ /* PowerDeliveryReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==37)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.PowerDeliveryReq=1;
+ }
+
+ /* PowerDeliveryRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==39)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.PowerDeliveryRes=1;
+ }
+
+ /* MeteringStatusReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==21)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.MeteringStatusReq=1;
+ }
+
+ /* MeteringStatusRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==23)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.MeteringStatusRes=1;
+ }
+
+ /* MeteringReceiptReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==17)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.MeteringReceiptReq=1;
+ }
+
+ /* MeteringReceiptRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==19)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.MeteringReceiptRes=1;
+ }
+
+ return 0;
+}
+
+
+
+
+ /**
+ * Deserialize the EXI stream
+ * @return 0 = 0K; -1 = ERROR
+ */
+static int deserializeMessage(struct v2gService* service)
+{
+ int noEndOfDocument = 1; /* true */
+ int errno;
+ #ifdef DEBUG
+ const char * localName;
+ const char * namespaceURI;
+ #endif
+
+ do {
+ exiDecodeNextEvent(&(service->inStream), &(service->stateDecode), &(service->event));
+ if (errno < 0) {
+ printf("[ERROR] %d \n", errno);
+ return errno;
+ }
+
+ switch (service->event) {
+ case START_DOCUMENT:
+
+ errno = exiDecodeStartDocument(&(service->inStream), &(service->stateDecode));
+
+ break;
+ case END_DOCUMENT:
+
+ errno = exiDecodeEndDocument(&(service->inStream), &(service->stateDecode));
+ noEndOfDocument = 0; /* false */
+ break;
+ case START_ELEMENT:
+ errno = exiDecodeStartElement(&(service->inStream), &(service->stateDecode), &(service->eqn));
+
+ break;
+ case END_ELEMENT:
+
+ errno = exiDecodeEndElement(&(service->inStream), &(service->stateDecode), &(service->eqn));
+
+ break;
+ case CHARACTERS:
+ /* decode */
+ errno = exiDecodeCharacters(&(service->inStream), &(service->stateDecode), &(service->val));
+
+ /* assign character data to the v2g message structure */
+ errno = deserializeElementCharacter(service);
+ break;
+ case ATTRIBUTE:
+ /* decode */
+ /* errno = exiDecodeAttribute(&isStream, &stateDecode, &eqn, &val); */
+ break;
+ default:
+ /* ERROR */
+ return -1;
+ }
+
+ } while (noEndOfDocument);
+
+ return 0;
+}
+
+
+
+ /* 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)
+{
+
+ /* init byte array */
+ service->val.binary = bytes;
+
+ /* init string array */
+ service->val.string = string;
+
+ /* init input / output stream */
+ service->inStream.data=inStream;
+ service->inStream.size=max_inStream_size;
+
+ service->outStream.data=outStream;
+ service->outStream.size=max_outStream_size;
+
+
+ return 0;
+}
+
diff --git a/src/service/v2g_serviceClientStubs.h b/src/service/v2g_serviceClientStubs.h
new file mode 100644
index 0000000..c1be560
--- /dev/null
+++ b/src/service/v2g_serviceClientStubs.h
@@ -0,0 +1,105 @@
+
+
+
+
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+
+
+ #ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef SERVICECLIENTSTUBS_H
+#define SERVICECLIENTSTUBS_H
+
+ #include "v2g_service.h"
+ #include "v2g_serviceDataTypes.h"
+ #include "v2g_serviceClientStubs.h"
+
+ /* call sessionSetup */
+ int call_sessionSetup(struct v2gService* service, struct HeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result);
+
+
+
+
+ /* call serviceDiscovery */
+ int call_serviceDiscovery(struct v2gService* service, struct HeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result);
+
+
+
+
+ /* call selectedServicePayment */
+ int call_selectedServicePayment(struct v2gService* service, struct HeaderType* header, struct ServicePaymentSelectionReqType* params, struct ServicePaymentSelectionResType* result);
+
+
+
+
+ /* call paymentDetails */
+ int call_paymentDetails(struct v2gService* service, struct HeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result);
+
+
+
+
+ /* call powerDiscovery */
+ int call_powerDiscovery(struct v2gService* service, struct HeaderType* header, struct PowerDiscoveryReqType* params, struct PowerDiscoveryResType* result);
+
+
+
+
+ /* call lineLock */
+ int call_lineLock(struct v2gService* service, struct HeaderType* header, struct LineLockReqType* params, struct LineLockResType* result);
+
+
+
+
+ /* call powerDelivery */
+ int call_powerDelivery(struct v2gService* service, struct HeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result);
+
+
+
+
+ /* call meteringStatus */
+ int call_meteringStatus(struct v2gService* service, struct HeaderType* header, struct MeteringStatusResType* result);
+
+
+
+
+ /* call meteringReceipt */
+ int call_meteringReceipt(struct v2gService* service, struct HeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result);
+
+
+
+
+
+/* Initialize the v2g client */
+int init_v2gServiceClient(struct 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);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/service/v2g_serviceDataSerialization.c b/src/service/v2g_serviceDataSerialization.c
new file mode 100644
index 0000000..2c3cfcd
--- /dev/null
+++ b/src/service/v2g_serviceDataSerialization.c
@@ -0,0 +1,4080 @@
+
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+
+#include "v2g_service.h"
+#include "v2g_serviceDataTypes.h"
+#include "v2g_serviceDataSerializiation.h"
+#include "../codec/EXITypes.h"
+#include "../codec/EXIEncoder.h"
+
+
+
+
+
+
+static int serialize_SessionInformationType(struct SessionInformationType* type, struct v2gService* service)
+{
+
+ /* element ID assignment of SessionID*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=35;
+ /* encode start element SessionID */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+ service->val.type = BINARY_HEX;
+ service->val.binary.len = type->SessionID.arraylen.data;
+ memcpy(service->val.binary.data, type->SessionID.data, service->val.binary.len);
+
+ /* encode character SessionID */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+
+ /* element ID assignment of SessionID*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=35;
+
+
+ /* encode end element of SessionID */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }if(type->isused.ServiceSessionID)
+ {
+
+
+ /* element ID assignment of ServiceSessionID*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=33;
+ /* encode start element ServiceSessionID */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+ service->val.type = BINARY_HEX;
+ service->val.binary.len = type->ServiceSessionID.arraylen.data;
+ memcpy(service->val.binary.data, type->ServiceSessionID.data, service->val.binary.len);
+
+ /* encode character ServiceSessionID */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+
+ /* element ID assignment of ServiceSessionID*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=33;
+
+
+ /* encode end element of ServiceSessionID */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.ProtocolVersion)
+ {
+
+
+ /* element ID assignment of ProtocolVersion*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=25;
+ /* encode start element ProtocolVersion */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = STRING;
+ service->val.string.len = type->ProtocolVersion.arraylen.data;
+ memcpy(service->val.string.codepoints, type->ProtocolVersion.data, service->val.string.len);
+
+ /* encode character ProtocolVersion */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ProtocolVersion*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=25;
+
+
+ /* encode end element of ProtocolVersion */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Header.Notification.EventList.Event;
+
+ /* encode character Event */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of Event*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=9;
+
+
+ /* encode end element of Event */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int serialize_NotificationType(struct NotificationType* type, struct v2gService* service)
+{if(type->isused.FaultCode)
+ {
+
+
+ /* element ID assignment of FaultCode*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=13;
+ /* encode start element FaultCode */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Header.Notification.FaultCode;
+
+ /* encode character FaultCode */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of FaultCode*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=13;
+
+
+ /* encode end element of FaultCode */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.FaultMsg)
+ {
+
+
+ /* element ID assignment of FaultMsg*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=14;
+ /* encode start element FaultMsg */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = STRING;
+ service->val.string.len = type->FaultMsg.arraylen.data;
+ memcpy(service->val.string.codepoints, type->FaultMsg.data, service->val.string.len);
+
+ /* encode character FaultMsg */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+ /* element ID assignment of FaultMsg*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=14;
+
+
+ /* encode end element of FaultMsg */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.EventList)
+ {
+
+
+ /* element ID assignment of EventList*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=10;
+ /* encode start element EventList */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of EventList */
+ if(serialize_EventListType(&(type->EventList),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of EventList*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=10;
+
+
+ /* encode end element of EventList */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ /* encode children of SessionInformation */
+ if(serialize_SessionInformationType(&(type->SessionInformation),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of SessionInformation*/
+ service->eqn.namespaceURI=6;
+ service->eqn.localPart=7;
+
+
+ /* encode end element of SessionInformation */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }if(type->isused.Notification)
+ {
+
+
+ /* element ID assignment of Notification*/
+ service->eqn.namespaceURI=6;
+ service->eqn.localPart=6;
+ /* encode start element Notification */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of Notification */
+ if(serialize_NotificationType(&(type->Notification),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of Notification*/
+ service->eqn.namespaceURI=6;
+ service->eqn.localPart=6;
+
+
+ /* encode end element of Notification */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = BOOLEAN;
+ service->val.boolean=service->v2gMsg.Body.SessionSetupReq.PEVStatus.ConnectorLocked;
+
+ /* encode character ConnectorLocked */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ConnectorLocked*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=4;
+
+
+ /* encode end element of ConnectorLocked */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of ChargerStandby*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=0;
+ /* encode start element ChargerStandby */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = BOOLEAN;
+ service->val.boolean=service->v2gMsg.Body.SessionSetupReq.PEVStatus.ChargerStandby;
+
+ /* encode character ChargerStandby */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ChargerStandby*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=0;
+
+
+ /* encode end element of ChargerStandby */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int serialize_SessionSetupReqType(struct SessionSetupReqType* type, struct v2gService* service)
+{if(type->isused.PEVID)
+ {
+
+
+ /* element ID assignment of PEVID*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=26;
+ /* encode start element PEVID */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = STRING;
+ service->val.string.len = type->PEVID.arraylen.data;
+ memcpy(service->val.string.codepoints, type->PEVID.data, service->val.string.len);
+
+ /* encode character PEVID */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PEVID*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=26;
+
+
+ /* encode end element of PEVID */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ /* 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)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PEVStatus */
+ if(serialize_PEVStatusType(&(type->PEVStatus),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PEVStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=32;
+
+
+ /* encode end element of PEVStatus */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = BOOLEAN;
+ service->val.boolean=service->v2gMsg.Body.SessionSetupRes.EVSEStatus.FatalError;
+
+ /* encode character FatalError */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of FatalError*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=12;
+
+
+ /* encode end element of FatalError */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EVSEStandby*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=7;
+ /* encode start element EVSEStandby */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = BOOLEAN;
+ service->val.boolean=service->v2gMsg.Body.SessionSetupRes.EVSEStatus.EVSEStandby;
+
+ /* encode character EVSEStandby */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of EVSEStandby*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=7;
+
+
+ /* encode end element of EVSEStandby */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* 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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = BOOLEAN;
+ service->val.boolean=service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ConnectorLocked;
+
+ /* encode character ConnectorLocked */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ConnectorLocked*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=4;
+
+
+ /* encode end element of ConnectorLocked */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of PowerSwitchClosed*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=24;
+ /* encode start element PowerSwitchClosed */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = BOOLEAN;
+ service->val.boolean=service->v2gMsg.Body.SessionSetupRes.EVSEStatus.PowerSwitchClosed;
+
+ /* encode character PowerSwitchClosed */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of PowerSwitchClosed*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=24;
+
+
+ /* encode end element of PowerSwitchClosed */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of RCD*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=26;
+ /* encode start element RCD */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = BOOLEAN;
+ service->val.boolean=service->v2gMsg.Body.SessionSetupRes.EVSEStatus.RCD;
+
+ /* encode character RCD */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of RCD*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=26;
+
+
+ /* encode end element of RCD */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of ShutDownTime*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=37;
+ /* encode start element ShutDownTime */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = INTEGER_64;
+ service->val.int64=service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ShutDownTime;
+
+ /* encode character ShutDownTime */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ShutDownTime*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=37;
+
+
+ /* encode end element of ShutDownTime */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.SessionSetupRes.ResponseCode;
+
+ /* encode character ResponseCode */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ResponseCode*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=47;
+
+
+ /* encode end element of ResponseCode */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EVSEID*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=3;
+ /* encode start element EVSEID */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+ service->val.type = BINARY_HEX;
+ service->val.binary.len = type->EVSEID.arraylen.data;
+ memcpy(service->val.binary.data, type->EVSEID.data, service->val.binary.len);
+
+ /* encode character EVSEID */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+
+ /* element ID assignment of EVSEID*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=3;
+
+
+ /* encode end element of EVSEID */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EVSEStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=7;
+ /* encode start element EVSEStatus */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of EVSEStatus */
+ if(serialize_EVSEStatusType(&(type->EVSEStatus),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of EVSEStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=7;
+
+
+ /* encode end element of EVSEStatus */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of TCurrent*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=63;
+ /* encode start element TCurrent */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = INTEGER_64;
+ service->val.int64=service->v2gMsg.Body.SessionSetupRes.TCurrent;
+
+ /* encode character TCurrent */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of TCurrent*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=63;
+
+
+ /* encode end element of TCurrent */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int serialize_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type, struct v2gService* service)
+{if(type->isused.ServiceType)
+ {
+
+
+ /* element ID assignment of ServiceType*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=58;
+ /* encode start element ServiceType */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.ServiceDiscoveryReq.ServiceType;
+
+ /* encode character ServiceType */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ServiceType*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=58;
+
+
+ /* encode end element of ServiceType */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.ServiceScope)
+ {
+
+
+ /* element ID assignment of ServiceScope*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=57;
+ /* encode start element ServiceScope */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = STRING;
+ service->val.string.len = type->ServiceScope.arraylen.data;
+ memcpy(service->val.string.codepoints, type->ServiceScope.data, service->val.string.len);
+
+ /* encode character ServiceScope */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ServiceScope*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=57;
+
+
+ /* encode end element of ServiceScope */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+static int serialize_ServiceDescriptionType(struct ServiceDescriptionType* type, struct v2gService* service)
+{
+
+ /* element ID assignment of ServiceID*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=29;
+ /* encode start element ServiceID */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+ service->val.type = BINARY_HEX;
+ service->val.binary.len = type->ServiceID.arraylen.data;
+ memcpy(service->val.binary.data, type->ServiceID.data, service->val.binary.len);
+
+ /* encode character ServiceID */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+
+ /* element ID assignment of ServiceID*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=29;
+
+
+ /* encode end element of ServiceID */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }if(type->isused.ServiceName)
+ {
+
+
+ /* element ID assignment of ServiceName*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=31;
+ /* encode start element ServiceName */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = STRING;
+ service->val.string.len = type->ServiceName.arraylen.data;
+ memcpy(service->val.string.codepoints, type->ServiceName.data, service->val.string.len);
+
+ /* encode character ServiceName */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ServiceName*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=31;
+
+
+ /* encode end element of ServiceName */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.ServiceType)
+ {
+
+
+ /* element ID assignment of ServiceType*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=34;
+ /* encode start element ServiceType */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceType;
+
+ /* encode character ServiceType */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ServiceType*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=34;
+
+
+ /* encode end element of ServiceType */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.ServiceScope)
+ {
+
+
+ /* element ID assignment of ServiceScope*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=32;
+ /* encode start element ServiceScope */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = STRING;
+ service->val.string.len = type->ServiceScope.arraylen.data;
+ memcpy(service->val.string.codepoints, type->ServiceScope.data, service->val.string.len);
+
+ /* encode character ServiceScope */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ServiceScope*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=32;
+
+
+ /* encode end element of ServiceScope */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+static int serialize_ServiceListType(struct ServiceListType* type, struct v2gService* service)
+{
+
+ /* element ID assignment of Service*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=27;
+ /* encode start element Service */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of Service */
+ if(serialize_ServiceDescriptionType(&(type->Service),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of Service*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=27;
+
+
+ /* encode end element of Service */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode;
+
+ /* encode character ResponseCode */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ResponseCode*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=47;
+
+
+ /* encode end element of ResponseCode */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }if(type->isused.ServiceList)
+ {
+
+
+ /* 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)
+ {
+
+ return -1;
+ }
+
+ /* encode children of ServiceList */
+ if(serialize_ServiceListType(&(type->ServiceList),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ServiceList*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=52;
+
+
+ /* encode end element of ServiceList */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ /* encode children of ServiceList */
+ if(serialize_ServiceListType(&(type->ServiceList),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ServiceList*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=52;
+
+
+ /* encode end element of ServiceList */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of PEVPubKey*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=31;
+ /* encode start element PEVPubKey */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+ service->val.type = BINARY_HEX;
+ service->val.binary.len = type->PEVPubKey.arraylen.data;
+ memcpy(service->val.binary.data, type->PEVPubKey.data, service->val.binary.len);
+
+ /* encode character PEVPubKey */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+
+ /* element ID assignment of PEVPubKey*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=31;
+
+
+ /* encode end element of PEVPubKey */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode;
+
+ /* encode character ResponseCode */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ResponseCode*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=47;
+
+
+ /* encode end element of ResponseCode */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }if(type->isused.MeteringAuthPubKey)
+ {
+
+
+ /* element ID assignment of MeteringAuthPubKey*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=16;
+ /* encode start element MeteringAuthPubKey */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+ service->val.type = BINARY_HEX;
+ service->val.binary.len = type->MeteringAuthPubKey.arraylen.data;
+ memcpy(service->val.binary.data, type->MeteringAuthPubKey.data, service->val.binary.len);
+
+ /* encode character MeteringAuthPubKey */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+
+ /* element ID assignment of MeteringAuthPubKey*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=16;
+
+
+ /* encode end element of MeteringAuthPubKey */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = STRING;
+ service->val.string.len = type->ContractID.arraylen.data;
+ memcpy(service->val.string.codepoints, type->ContractID.data, service->val.string.len);
+
+ /* encode character ContractID */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ContractID*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=1;
+
+
+ /* encode end element of ContractID */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.PaymentDetailsRes.ResponseCode;
+
+ /* encode character ResponseCode */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ResponseCode*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=47;
+
+
+ /* encode end element of ResponseCode */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int serialize_FloatingValueType(struct FloatingValueType* type, struct v2gService* service)
+{
+
+ /* element ID assignment of Multiplier*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=21;
+ /* encode start element Multiplier */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Multiplier;
+
+ /* encode character Multiplier */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of Multiplier*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=21;
+
+
+ /* encode end element of Multiplier */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of Unit*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=50;
+ /* encode start element Unit */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Unit;
+
+ /* encode character Unit */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of Unit*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=50;
+
+
+ /* encode end element of Unit */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of Value*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=51;
+ /* encode start element Value */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = INTEGER_16;
+ service->val.int32=service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Value;
+
+ /* encode character Value */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of Value*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=51;
+
+
+ /* encode end element of Value */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PEVStatus */
+ if(serialize_PEVStatusType(&(type->PEVStatus),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PEVStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=32;
+
+
+ /* encode end element of PEVStatus */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EoC*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=10;
+ /* encode start element EoC */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = INTEGER_64;
+ service->val.int64=service->v2gMsg.Body.PowerDiscoveryReq.EoC;
+
+ /* encode character EoC */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of EoC*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=10;
+
+
+ /* encode end element of EoC */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EAmount*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=2;
+ /* encode start element EAmount */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of EAmount */
+ if(serialize_FloatingValueType(&(type->EAmount),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of EAmount*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=2;
+
+
+ /* encode end element of EAmount */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of PEVMaxPower*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=28;
+ /* encode start element PEVMaxPower */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PEVMaxPower */
+ if(serialize_FloatingValueType(&(type->PEVMaxPower),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PEVMaxPower*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=28;
+
+
+ /* encode end element of PEVMaxPower */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of PEVMaxPhases*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=27;
+ /* encode start element PEVMaxPhases */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = INTEGER_16;
+ service->val.int32=service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPhases;
+
+ /* encode character PEVMaxPhases */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of PEVMaxPhases*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=27;
+
+
+ /* encode end element of PEVMaxPhases */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of PEVMaxVoltage*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=29;
+ /* encode start element PEVMaxVoltage */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PEVMaxVoltage */
+ if(serialize_FloatingValueType(&(type->PEVMaxVoltage),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PEVMaxVoltage*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=29;
+
+
+ /* encode end element of PEVMaxVoltage */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of PEVMinVoltage*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=30;
+ /* encode start element PEVMinVoltage */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PEVMinVoltage */
+ if(serialize_FloatingValueType(&(type->PEVMinVoltage),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PEVMinVoltage*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=30;
+
+
+ /* encode end element of PEVMinVoltage */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int serialize_TariffEntryType(struct TariffEntryType* type, struct v2gService* service)
+{
+
+ /* element ID assignment of TariffStart*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=48;
+ /* encode start element TariffStart */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ 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;
+
+ /* encode character TariffStart */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of TariffStart*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=48;
+
+
+ /* encode end element of TariffStart */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of TariffPMax*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=47;
+ /* encode start element TariffPMax */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of TariffPMax */
+ if(serialize_FloatingValueType(&(type->TariffPMax),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of TariffPMax*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=47;
+
+
+ /* encode end element of TariffPMax */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }if(type->isused.EPrice)
+ {
+
+
+ /* element ID assignment of EPrice*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=6;
+ /* encode start element EPrice */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of EPrice */
+ if(serialize_FloatingValueType(&(type->EPrice),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of EPrice*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=6;
+
+
+ /* encode end element of EPrice */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+static int serialize_TariffEntriesType(struct TariffEntriesType* type, struct v2gService* service)
+{
+
+ /* element ID assignment of TariffEntry*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=44;
+ /* encode start element TariffEntry */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of TariffEntry */
+ if(serialize_TariffEntryType(&(type->TariffEntry),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of TariffEntry*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=44;
+
+
+ /* encode end element of TariffEntry */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int serialize_TariffDescrType(struct TariffDescrType* type, struct v2gService* service)
+{
+
+ /* element ID assignment of TariffID*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=46;
+ /* encode start element TariffID */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffID;
+
+ /* encode character TariffID */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of TariffID*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=46;
+
+
+ /* encode end element of TariffID */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }if(type->isused.TariffDescription)
+ {
+
+
+ /* element ID assignment of TariffDescription*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=41;
+ /* encode start element TariffDescription */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = STRING;
+ service->val.string.len = type->TariffDescription.arraylen.data;
+ memcpy(service->val.string.codepoints, type->TariffDescription.data, service->val.string.len);
+
+ /* encode character TariffDescription */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+ /* element ID assignment of TariffDescription*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=41;
+
+
+ /* encode end element of TariffDescription */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ /* element ID assignment of TariffEntries*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=42;
+ /* encode start element TariffEntries */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of TariffEntries */
+ if(serialize_TariffEntriesType(&(type->TariffEntries),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of TariffEntries*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=42;
+
+
+ /* encode end element of TariffEntries */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int serialize_TariffTableType(struct TariffTableType* type, struct v2gService* service)
+{
+
+ /* element ID assignment of Currency*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=5;
+ /* encode start element Currency */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = STRING;
+ service->val.string.len = type->Currency.arraylen.data;
+ memcpy(service->val.string.codepoints, type->Currency.data, service->val.string.len);
+
+ /* encode character Currency */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+ /* element ID assignment of Currency*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=5;
+
+
+ /* encode end element of Currency */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of Tariff*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=39;
+ /* encode start element Tariff */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of Tariff */
+ if(serialize_TariffDescrType(&(type->Tariff),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of Tariff*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=39;
+
+
+ /* encode end element of Tariff */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode;
+
+ /* encode character ResponseCode */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ResponseCode*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=47;
+
+
+ /* encode end element of ResponseCode */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EVSEStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=7;
+ /* encode start element EVSEStatus */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of EVSEStatus */
+ if(serialize_EVSEStatusType(&(type->EVSEStatus),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of EVSEStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=7;
+
+
+ /* encode end element of EVSEStatus */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EVSEVoltage*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=8;
+ /* encode start element EVSEVoltage */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of EVSEVoltage */
+ if(serialize_FloatingValueType(&(type->EVSEVoltage),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of EVSEVoltage*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=8;
+
+
+ /* encode end element of EVSEVoltage */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EVSEIMax*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=4;
+ /* encode start element EVSEIMax */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of EVSEIMax */
+ if(serialize_FloatingValueType(&(type->EVSEIMax),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of EVSEIMax*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=4;
+
+
+ /* encode end element of EVSEIMax */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EVSEMaxPhases*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=5;
+ /* encode start element EVSEMaxPhases */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = INTEGER_16;
+ service->val.int32=service->v2gMsg.Body.PowerDiscoveryRes.EVSEMaxPhases;
+
+ /* encode character EVSEMaxPhases */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of EVSEMaxPhases*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=5;
+
+
+ /* encode end element of EVSEMaxPhases */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }if(type->isused.EnergyProvider)
+ {
+
+
+ /* element ID assignment of EnergyProvider*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=9;
+ /* encode start element EnergyProvider */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = STRING;
+ service->val.string.len = type->EnergyProvider.arraylen.data;
+ memcpy(service->val.string.codepoints, type->EnergyProvider.data, service->val.string.len);
+
+ /* encode character EnergyProvider */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+ /* element ID assignment of EnergyProvider*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=9;
+
+
+ /* encode end element of EnergyProvider */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.TariffTable)
+ {
+
+
+ /* element ID assignment of TariffTable*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=65;
+ /* encode start element TariffTable */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of TariffTable */
+ if(serialize_TariffTableType(&(type->TariffTable),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of TariffTable*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=65;
+
+
+ /* encode end element of TariffTable */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PEVStatus */
+ if(serialize_PEVStatusType(&(type->PEVStatus),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PEVStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=32;
+
+
+ /* encode end element of PEVStatus */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of ReqLockStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=45;
+ /* encode start element ReqLockStatus */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = BOOLEAN;
+ service->val.boolean=service->v2gMsg.Body.LineLockReq.ReqLockStatus;
+
+ /* encode character ReqLockStatus */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ReqLockStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=45;
+
+
+ /* encode end element of ReqLockStatus */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.LineLockRes.ResponseCode;
+
+ /* encode character ResponseCode */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ResponseCode*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=47;
+
+
+ /* encode end element of ResponseCode */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EVSEStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=7;
+ /* encode start element EVSEStatus */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of EVSEStatus */
+ if(serialize_EVSEStatusType(&(type->EVSEStatus),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of EVSEStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=7;
+
+
+ /* encode end element of EVSEStatus */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = INTEGER_64;
+ service->val.int64=service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryStart;
+
+ /* encode character ChargingProfileEntryStart */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ChargingProfileEntryStart*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=2;
+
+
+ /* encode end element of ChargingProfileEntryStart */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of ChargingProfileEntryMaxPower*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=1;
+ /* encode start element ChargingProfileEntryMaxPower */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of ChargingProfileEntryMaxPower */
+ if(serialize_FloatingValueType(&(type->ChargingProfileEntryMaxPower),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ChargingProfileEntryMaxPower*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=1;
+
+
+ /* encode end element of ChargingProfileEntryMaxPower */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int serialize_PowerDeliveryReqType(struct PowerDeliveryReqType* type, struct v2gService* service)
+{
+
+ /* element ID assignment of PEVStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=32;
+ /* encode start element PEVStatus */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PEVStatus */
+ if(serialize_PEVStatusType(&(type->PEVStatus),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PEVStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=32;
+
+
+ /* encode end element of PEVStatus */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of ReqSwitchStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=46;
+ /* encode start element ReqSwitchStatus */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = BOOLEAN;
+ service->val.boolean=service->v2gMsg.Body.PowerDeliveryReq.ReqSwitchStatus;
+
+ /* encode character ReqSwitchStatus */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ReqSwitchStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=46;
+
+
+ /* encode end element of ReqSwitchStatus */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }if(type->isused.Tariff)
+ {
+
+
+ /* element ID assignment of Tariff*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=64;
+ /* encode start element Tariff */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.PowerDeliveryReq.Tariff;
+
+ /* encode character Tariff */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of Tariff*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=64;
+
+
+ /* encode end element of Tariff */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.ChargingProfile)
+ {
+
+
+ /* element ID assignment of ChargingProfile*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=0;
+ /* encode start element ChargingProfile */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of ChargingProfile */
+ if(serialize_ChargingProfileType(&(type->ChargingProfile),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ChargingProfile*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=0;
+
+
+ /* encode end element of ChargingProfile */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.PowerDeliveryRes.ResponseCode;
+
+ /* encode character ResponseCode */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ResponseCode*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=47;
+
+
+ /* encode end element of ResponseCode */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+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)
+ {
+
+
+ /* element ID assignment of MeterID*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=16;
+ /* encode start element MeterID */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = STRING;
+ service->val.string.len = type->MeterID.arraylen.data;
+ memcpy(service->val.string.codepoints, type->MeterID.data, service->val.string.len);
+
+ /* encode character MeterID */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+ /* element ID assignment of MeterID*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=16;
+
+
+ /* 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;
+ }
+
+
+
+
+ /* element ID assignment of MeterPubKey*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=18;
+
+
+ /* encode end element of MeterPubKey */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.MeterReading)
+ {
+
+
+ /* element ID assignment of MeterReading*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=19;
+ /* encode start element MeterReading */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of MeterReading */
+ if(serialize_FloatingValueType(&(type->MeterReading),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of MeterReading*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=19;
+
+
+ /* encode end element of MeterReading */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.MeterStatus)
+ {
+
+
+ /* element ID assignment of MeterStatus*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=20;
+ /* encode start element MeterStatus */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = INTEGER_16;
+ service->val.int32=service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterStatus;
+
+ /* encode character MeterStatus */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of MeterStatus*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=20;
+
+
+ /* encode end element of MeterStatus */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.TMeter)
+ {
+
+
+ /* element ID assignment of TMeter*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=38;
+ /* encode start element TMeter */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = INTEGER_64;
+ service->val.int64=service->v2gMsg.Body.MeteringStatusRes.MeterInfo.TMeter;
+
+ /* encode character TMeter */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of TMeter*/
+ service->eqn.namespaceURI=5;
+ service->eqn.localPart=38;
+
+
+ /* encode end element of TMeter */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.MeteringStatusRes.ResponseCode;
+
+ /* encode character ResponseCode */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ResponseCode*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=47;
+
+
+ /* encode end element of ResponseCode */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EVSEID*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=3;
+ /* encode start element EVSEID */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+ service->val.type = BINARY_HEX;
+ service->val.binary.len = type->EVSEID.arraylen.data;
+ memcpy(service->val.binary.data, type->EVSEID.data, service->val.binary.len);
+
+ /* encode character EVSEID */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+
+ /* element ID assignment of EVSEID*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=3;
+
+
+ /* encode end element of EVSEID */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EVSEStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=7;
+ /* encode start element EVSEStatus */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of EVSEStatus */
+ if(serialize_EVSEStatusType(&(type->EVSEStatus),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of EVSEStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=7;
+
+
+ /* encode end element of EVSEStatus */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of TCurrent*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=63;
+ /* encode start element TCurrent */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = INTEGER_64;
+ service->val.int64=service->v2gMsg.Body.MeteringStatusRes.TCurrent;
+
+ /* encode character TCurrent */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of TCurrent*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=63;
+
+
+ /* encode end element of TCurrent */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of EVSEMaxPower*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=6;
+ /* encode start element EVSEMaxPower */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of EVSEMaxPower */
+ if(serialize_FloatingValueType(&(type->EVSEMaxPower),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of EVSEMaxPower*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=6;
+
+
+ /* encode end element of EVSEMaxPower */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }if(type->isused.PCurrent)
+ {
+
+
+ /* element ID assignment of PCurrent*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=25;
+ /* encode start element PCurrent */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PCurrent */
+ if(serialize_FloatingValueType(&(type->PCurrent),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PCurrent*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=25;
+
+
+ /* encode end element of PCurrent */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.MeterInfo)
+ {
+
+
+ /* element ID assignment of MeterInfo*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=15;
+ /* encode start element MeterInfo */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of MeterInfo */
+ if(serialize_MeterInfoType(&(type->MeterInfo),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of MeterInfo*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=15;
+
+
+ /* encode end element of MeterInfo */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+static int serialize_MeteringReceiptReqType(struct MeteringReceiptReqType* type, struct v2gService* service)
+{if(type->isused.PEVID)
+ {
+
+
+ /* element ID assignment of PEVID*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=26;
+ /* encode start element PEVID */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = STRING;
+ service->val.string.len = type->PEVID.arraylen.data;
+ memcpy(service->val.string.codepoints, type->PEVID.data, service->val.string.len);
+
+ /* encode character PEVID */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PEVID*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=26;
+
+
+ /* encode end element of PEVID */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ /* 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)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PEVStatus */
+ if(serialize_PEVStatusType(&(type->PEVStatus),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PEVStatus*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=32;
+
+
+ /* encode end element of PEVStatus */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }if(type->isused.TCurrent)
+ {
+
+
+ /* element ID assignment of TCurrent*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=63;
+ /* encode start element TCurrent */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = INTEGER_64;
+ service->val.int64=service->v2gMsg.Body.MeteringReceiptReq.TCurrent;
+
+ /* encode character TCurrent */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of TCurrent*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=63;
+
+
+ /* encode end element of TCurrent */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ /* element ID assignment of Tariff*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=64;
+ /* encode start element Tariff */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.MeteringReceiptReq.Tariff;
+
+ /* encode character Tariff */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of Tariff*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=64;
+
+
+ /* encode end element of Tariff */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of MeterInfo*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=15;
+ /* encode start element MeterInfo */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of MeterInfo */
+ if(serialize_MeterInfoType(&(type->MeterInfo),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of MeterInfo*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=15;
+
+
+ /* encode end element of MeterInfo */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ service->val.type = ENUMERATION;
+ service->val.enumeration=service->v2gMsg.Body.MeteringReceiptRes.ResponseCode;
+
+ /* encode character ResponseCode */
+ if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* element ID assignment of ResponseCode*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=47;
+
+
+ /* encode end element of ResponseCode */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int serialize_BodyType(struct BodyType* type, struct v2gService* service)
+{if(type->isused.SessionSetupReq)
+ {
+
+
+ /* element ID assignment of SessionSetupReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=59;
+ /* encode start element SessionSetupReq */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of SessionSetupReq */
+ if(serialize_SessionSetupReqType(&(type->SessionSetupReq),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of SessionSetupReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=59;
+
+
+ /* encode end element of SessionSetupReq */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.SessionSetupRes)
+ {
+
+
+ /* element ID assignment of SessionSetupRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=61;
+ /* encode start element SessionSetupRes */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of SessionSetupRes */
+ if(serialize_SessionSetupResType(&(type->SessionSetupRes),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of SessionSetupRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=61;
+
+
+ /* encode end element of SessionSetupRes */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.ServiceDiscoveryReq)
+ {
+
+
+ /* element ID assignment of ServiceDiscoveryReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=48;
+ /* encode start element ServiceDiscoveryReq */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of ServiceDiscoveryReq */
+ if(serialize_ServiceDiscoveryReqType(&(type->ServiceDiscoveryReq),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ServiceDiscoveryReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=48;
+
+
+ /* encode end element of ServiceDiscoveryReq */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.ServiceDiscoveryRes)
+ {
+
+
+ /* element ID assignment of ServiceDiscoveryRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=50;
+ /* encode start element ServiceDiscoveryRes */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of ServiceDiscoveryRes */
+ if(serialize_ServiceDiscoveryResType(&(type->ServiceDiscoveryRes),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ServiceDiscoveryRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=50;
+
+
+ /* encode end element of ServiceDiscoveryRes */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.ServicePaymentSelectionReq)
+ {
+
+
+ /* element ID assignment of ServicePaymentSelectionReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=53;
+ /* encode start element ServicePaymentSelectionReq */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of ServicePaymentSelectionReq */
+ if(serialize_ServicePaymentSelectionReqType(&(type->ServicePaymentSelectionReq),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ServicePaymentSelectionReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=53;
+
+
+ /* encode end element of ServicePaymentSelectionReq */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.ServicePaymentSelectionRes)
+ {
+
+
+ /* element ID assignment of ServicePaymentSelectionRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=55;
+ /* encode start element ServicePaymentSelectionRes */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of ServicePaymentSelectionRes */
+ if(serialize_ServicePaymentSelectionResType(&(type->ServicePaymentSelectionRes),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of ServicePaymentSelectionRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=55;
+
+
+ /* encode end element of ServicePaymentSelectionRes */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.PaymentDetailsReq)
+ {
+
+
+ /* element ID assignment of PaymentDetailsReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=33;
+ /* encode start element PaymentDetailsReq */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PaymentDetailsReq */
+ if(serialize_PaymentDetailsReqType(&(type->PaymentDetailsReq),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PaymentDetailsReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=33;
+
+
+ /* encode end element of PaymentDetailsReq */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.PaymentDetailsRes)
+ {
+
+
+ /* element ID assignment of PaymentDetailsRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=35;
+ /* encode start element PaymentDetailsRes */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PaymentDetailsRes */
+ if(serialize_PaymentDetailsResType(&(type->PaymentDetailsRes),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PaymentDetailsRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=35;
+
+
+ /* encode end element of PaymentDetailsRes */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.PowerDiscoveryReq)
+ {
+
+
+ /* element ID assignment of PowerDiscoveryReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=41;
+ /* encode start element PowerDiscoveryReq */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PowerDiscoveryReq */
+ if(serialize_PowerDiscoveryReqType(&(type->PowerDiscoveryReq),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PowerDiscoveryReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=41;
+
+
+ /* encode end element of PowerDiscoveryReq */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.PowerDiscoveryRes)
+ {
+
+
+ /* element ID assignment of PowerDiscoveryRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=43;
+ /* encode start element PowerDiscoveryRes */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PowerDiscoveryRes */
+ if(serialize_PowerDiscoveryResType(&(type->PowerDiscoveryRes),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PowerDiscoveryRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=43;
+
+
+ /* encode end element of PowerDiscoveryRes */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.LineLockReq)
+ {
+
+
+ /* element ID assignment of LineLockReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=11;
+ /* encode start element LineLockReq */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of LineLockReq */
+ if(serialize_LineLockReqType(&(type->LineLockReq),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of LineLockReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=11;
+
+
+ /* encode end element of LineLockReq */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.LineLockRes)
+ {
+
+
+ /* element ID assignment of LineLockRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=13;
+ /* encode start element LineLockRes */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of LineLockRes */
+ if(serialize_LineLockResType(&(type->LineLockRes),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of LineLockRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=13;
+
+
+ /* encode end element of LineLockRes */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.PowerDeliveryReq)
+ {
+
+
+ /* element ID assignment of PowerDeliveryReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=37;
+ /* encode start element PowerDeliveryReq */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PowerDeliveryReq */
+ if(serialize_PowerDeliveryReqType(&(type->PowerDeliveryReq),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PowerDeliveryReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=37;
+
+
+ /* encode end element of PowerDeliveryReq */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.PowerDeliveryRes)
+ {
+
+
+ /* element ID assignment of PowerDeliveryRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=39;
+ /* encode start element PowerDeliveryRes */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of PowerDeliveryRes */
+ if(serialize_PowerDeliveryResType(&(type->PowerDeliveryRes),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of PowerDeliveryRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=39;
+
+
+ /* encode end element of PowerDeliveryRes */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.MeteringStatusReq)
+ {
+
+
+ /* element ID assignment of MeteringStatusReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=21;
+ /* encode start element MeteringStatusReq */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of MeteringStatusReq */
+ if(serialize_MeteringStatusReqType(&(type->MeteringStatusReq),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of MeteringStatusReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=21;
+
+
+ /* encode end element of MeteringStatusReq */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.MeteringStatusRes)
+ {
+
+
+ /* element ID assignment of MeteringStatusRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=23;
+ /* encode start element MeteringStatusRes */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of MeteringStatusRes */
+ if(serialize_MeteringStatusResType(&(type->MeteringStatusRes),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of MeteringStatusRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=23;
+
+
+ /* encode end element of MeteringStatusRes */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.MeteringReceiptReq)
+ {
+
+
+ /* element ID assignment of MeteringReceiptReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=17;
+ /* encode start element MeteringReceiptReq */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of MeteringReceiptReq */
+ if(serialize_MeteringReceiptReqType(&(type->MeteringReceiptReq),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of MeteringReceiptReq*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=17;
+
+
+ /* encode end element of MeteringReceiptReq */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+ if(type->isused.MeteringReceiptRes)
+ {
+
+
+ /* element ID assignment of MeteringReceiptRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=19;
+ /* encode start element MeteringReceiptRes */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of MeteringReceiptRes */
+ if(serialize_MeteringReceiptResType(&(type->MeteringReceiptRes),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of MeteringReceiptRes*/
+ service->eqn.namespaceURI=4;
+ service->eqn.localPart=19;
+
+
+ /* encode end element of MeteringReceiptRes */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }}
+
+
+ return 0;
+}
+
+
+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)
+ {
+
+ return -1;
+ }
+
+ /* encode children of Header */
+ if(serialize_HeaderType(&(type->Header),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of Header*/
+ service->eqn.namespaceURI=6;
+ service->eqn.localPart=4;
+
+
+ /* encode end element of Header */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of Body*/
+ service->eqn.namespaceURI=6;
+ service->eqn.localPart=0;
+ /* encode start element Body */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* encode children of Body */
+ if(serialize_BodyType(&(type->Body),service)<0)
+ {
+ return -1;
+ }
+
+
+
+ /* element ID assignment of Body*/
+ service->eqn.namespaceURI=6;
+ service->eqn.localPart=0;
+
+
+ /* encode end element of Body */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+
+
+
+
+ /* marshal data to EXI stream */
+ int serialize_message(struct v2gService* service)
+ {
+
+
+ /* encode start document */
+ if (exiEncodeStartDocument(&(service->outStream), &(service->stateEncode)) < 0)
+ {
+
+ return -1;
+ }
+
+ /* element ID assignment of V2G_Message*/
+ service->eqn.namespaceURI=6;
+ service->eqn.localPart=8;
+
+ /* encode start element V2G_Message */
+ if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ serialize_AnonType_V2G_Message(&(service->v2gMsg), service);
+
+
+ /* encode end element of V2G_Message */
+ if (exiEncodeEndElement(&(service->outStream), &(service->stateEncode), &(service->eqn)) < 0)
+ {
+
+ return -1;
+ }
+
+
+ /* encode end document */
+ if (exiEncodeEndDocument(&(service->outStream), &(service->stateEncode)) < 0) {
+
+ return -1;
+ }
+
+ return 0;
+
+ }
+
\ No newline at end of file
diff --git a/src/service/v2g_serviceDataSerializiation.h b/src/service/v2g_serviceDataSerializiation.h
new file mode 100644
index 0000000..145e432
--- /dev/null
+++ b/src/service/v2g_serviceDataSerializiation.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef V2GSERVICEDATASERIAL_H_
+#define V2GSERVICEDATASERIAL_H_
+
+#include "v2g_service.h"
+
+int serialize_message(struct v2gService* service);
+
+
+#endif /* V2GSERVICEDATASERIAL_H_ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/service/v2g_serviceDataTypes.c b/src/service/v2g_serviceDataTypes.c
new file mode 100644
index 0000000..60e2896
--- /dev/null
+++ b/src/service/v2g_serviceDataTypes.c
@@ -0,0 +1,429 @@
+
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+
+#include "../codec/EXITypes.h"
+#include "v2g_serviceDataTypes.h"
+
+
+static void init_SessionInformationType_SessionID(struct SessionInformationType_SessionID* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_SessionInformationType_ServiceSessionID(struct SessionInformationType_ServiceSessionID* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_SessionInformationType_ProtocolVersion(struct SessionInformationType_ProtocolVersion* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_SessionInformationType(struct SessionInformationType* type)
+{
+
+ init_SessionInformationType_SessionID(&(type->SessionID));
+ init_SessionInformationType_ServiceSessionID(&(type->ServiceSessionID));
+ type->isused.ServiceSessionID=0;
+ init_SessionInformationType_ProtocolVersion(&(type->ProtocolVersion));
+ type->isused.ProtocolVersion=0;
+
+}
+
+static void init_NotificationType_FaultMsg(struct NotificationType_FaultMsg* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_NotificationType(struct NotificationType* type)
+{
+
+ type->isused.FaultCode=0;
+ init_NotificationType_FaultMsg(&(type->FaultMsg));
+ type->isused.FaultMsg=0;
+ type->isused.EventList=0;
+
+}
+
+static void init_HeaderType(struct HeaderType* type)
+{
+
+ init_SessionInformationType(&(type->SessionInformation));
+ init_NotificationType(&(type->Notification));
+ type->isused.Notification=0;
+
+}
+
+static void init_SessionSetupReqType_PEVID(struct SessionSetupReqType_PEVID* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_SessionSetupReqType(struct SessionSetupReqType* type)
+{
+
+ init_SessionSetupReqType_PEVID(&(type->PEVID));
+ type->isused.PEVID=0;
+
+}
+
+static void init_SessionSetupResType_EVSEID(struct SessionSetupResType_EVSEID* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_SessionSetupResType(struct SessionSetupResType* type)
+{
+
+ init_SessionSetupResType_EVSEID(&(type->EVSEID));
+
+}
+
+static void init_ServiceDiscoveryReqType_ServiceScope(struct ServiceDiscoveryReqType_ServiceScope* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type)
+{
+
+ type->isused.ServiceType=0;
+ init_ServiceDiscoveryReqType_ServiceScope(&(type->ServiceScope));
+ type->isused.ServiceScope=0;
+
+}
+
+static void init_ServiceDescriptionType_ServiceID(struct ServiceDescriptionType_ServiceID* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_ServiceDescriptionType_ServiceName(struct ServiceDescriptionType_ServiceName* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_ServiceDescriptionType_ServiceScope(struct ServiceDescriptionType_ServiceScope* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_ServiceDescriptionType(struct ServiceDescriptionType* type)
+{
+
+ init_ServiceDescriptionType_ServiceID(&(type->ServiceID));
+ init_ServiceDescriptionType_ServiceName(&(type->ServiceName));
+ type->isused.ServiceName=0;
+ type->isused.ServiceType=0;
+ init_ServiceDescriptionType_ServiceScope(&(type->ServiceScope));
+ type->isused.ServiceScope=0;
+
+}
+
+static void init_ServiceListType(struct ServiceListType* type)
+{
+
+ init_ServiceDescriptionType((type->Service));
+ type->arraylen.Service=0;
+
+}
+
+static void init_ServiceDiscoveryResType(struct ServiceDiscoveryResType* type)
+{
+
+ init_ServiceListType(&(type->ServiceList));
+ type->isused.ServiceList=0;
+
+}
+
+static void init_ServicePaymentSelectionReqType_PEVPubKey(struct ServicePaymentSelectionReqType_PEVPubKey* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_ServicePaymentSelectionReqType(struct ServicePaymentSelectionReqType* type)
+{
+
+ init_ServiceListType(&(type->ServiceList));
+ init_ServicePaymentSelectionReqType_PEVPubKey(&(type->PEVPubKey));
+
+}
+
+static void init_ServicePaymentSelectionResType_MeteringAuthPubKey(struct ServicePaymentSelectionResType_MeteringAuthPubKey* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_ServicePaymentSelectionResType(struct ServicePaymentSelectionResType* type)
+{
+
+ init_ServicePaymentSelectionResType_MeteringAuthPubKey(&(type->MeteringAuthPubKey));
+ type->isused.MeteringAuthPubKey=0;
+
+}
+
+static void init_PaymentDetailsReqType_ContractID(struct PaymentDetailsReqType_ContractID* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_PaymentDetailsReqType(struct PaymentDetailsReqType* type)
+{
+
+ init_PaymentDetailsReqType_ContractID(&(type->ContractID));
+
+}
+
+static void init_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type)
+{
+
+
+}
+
+static void init_PowerDiscoveryResType_EnergyProvider(struct PowerDiscoveryResType_EnergyProvider* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_TariffTableType_Currency(struct TariffTableType_Currency* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_TariffDescrType_TariffDescription(struct TariffDescrType_TariffDescription* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_TariffEntryType(struct TariffEntryType* type)
+{
+
+ type->isused.EPrice=0;
+
+}
+
+static void init_TariffEntriesType(struct TariffEntriesType* type)
+{
+
+ init_TariffEntryType((type->TariffEntry));
+ type->arraylen.TariffEntry=0;
+
+}
+
+static void init_TariffDescrType(struct TariffDescrType* type)
+{
+
+ init_TariffDescrType_TariffDescription(&(type->TariffDescription));
+ type->isused.TariffDescription=0;
+ init_TariffEntriesType(&(type->TariffEntries));
+
+}
+
+static void init_TariffTableType(struct TariffTableType* type)
+{
+
+ init_TariffTableType_Currency(&(type->Currency));
+ init_TariffDescrType((type->Tariff));
+ type->arraylen.Tariff=0;
+
+}
+
+static void init_PowerDiscoveryResType(struct PowerDiscoveryResType* type)
+{
+
+ init_PowerDiscoveryResType_EnergyProvider(&(type->EnergyProvider));
+ type->isused.EnergyProvider=0;
+ init_TariffTableType(&(type->TariffTable));
+ type->isused.TariffTable=0;
+
+}
+
+static void init_LineLockReqType(struct LineLockReqType* type)
+{
+
+
+}
+
+static void init_LineLockResType(struct LineLockResType* type)
+{
+
+
+}
+
+static void init_ChargingProfileType(struct ChargingProfileType* type)
+{
+
+
+}
+
+static void init_PowerDeliveryReqType(struct PowerDeliveryReqType* type)
+{
+
+ type->isused.Tariff=0;
+ init_ChargingProfileType(&(type->ChargingProfile));
+ type->isused.ChargingProfile=0;
+
+}
+
+static void init_MeteringStatusResType_EVSEID(struct MeteringStatusResType_EVSEID* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_MeterInfoType_MeterID(struct MeterInfoType_MeterID* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+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.MeterReading=0;
+ type->isused.MeterStatus=0;
+ type->isused.TMeter=0;
+
+}
+
+static void init_MeteringStatusResType(struct MeteringStatusResType* type)
+{
+
+ init_MeteringStatusResType_EVSEID(&(type->EVSEID));
+ type->isused.PCurrent=0;
+ init_MeterInfoType(&(type->MeterInfo));
+ type->isused.MeterInfo=0;
+
+}
+
+static void init_MeteringReceiptReqType_PEVID(struct MeteringReceiptReqType_PEVID* type)
+{
+
+ type->arraylen.data=0;
+
+}
+
+static void init_MeteringReceiptReqType(struct MeteringReceiptReqType* type)
+{
+
+ init_MeteringReceiptReqType_PEVID(&(type->PEVID));
+ type->isused.PEVID=0;
+ type->isused.TCurrent=0;
+ init_MeterInfoType(&(type->MeterInfo));
+
+}
+
+static void init_BodyType(struct BodyType* type)
+{
+
+ init_SessionSetupReqType(&(type->SessionSetupReq));
+ type->isused.SessionSetupReq=0;
+ init_SessionSetupResType(&(type->SessionSetupRes));
+ type->isused.SessionSetupRes=0;
+ init_ServiceDiscoveryReqType(&(type->ServiceDiscoveryReq));
+ type->isused.ServiceDiscoveryReq=0;
+ init_ServiceDiscoveryResType(&(type->ServiceDiscoveryRes));
+ type->isused.ServiceDiscoveryRes=0;
+ init_ServicePaymentSelectionReqType(&(type->ServicePaymentSelectionReq));
+ type->isused.ServicePaymentSelectionReq=0;
+ init_ServicePaymentSelectionResType(&(type->ServicePaymentSelectionRes));
+ type->isused.ServicePaymentSelectionRes=0;
+ init_PaymentDetailsReqType(&(type->PaymentDetailsReq));
+ type->isused.PaymentDetailsReq=0;
+ type->isused.PaymentDetailsRes=0;
+ init_PowerDiscoveryReqType(&(type->PowerDiscoveryReq));
+ type->isused.PowerDiscoveryReq=0;
+ init_PowerDiscoveryResType(&(type->PowerDiscoveryRes));
+ type->isused.PowerDiscoveryRes=0;
+ init_LineLockReqType(&(type->LineLockReq));
+ type->isused.LineLockReq=0;
+ init_LineLockResType(&(type->LineLockRes));
+ type->isused.LineLockRes=0;
+ init_PowerDeliveryReqType(&(type->PowerDeliveryReq));
+ type->isused.PowerDeliveryReq=0;
+ type->isused.PowerDeliveryRes=0;
+ type->isused.MeteringStatusReq=0;
+ init_MeteringStatusResType(&(type->MeteringStatusRes));
+ type->isused.MeteringStatusRes=0;
+ init_MeteringReceiptReqType(&(type->MeteringReceiptReq));
+ type->isused.MeteringReceiptReq=0;
+ type->isused.MeteringReceiptRes=0;
+
+}
+ void init_AnonType_V2G_Message(struct AnonType_V2G_Message* type)
+{
+
+ init_HeaderType(&(type->Header));
+ init_BodyType(&(type->Body));
+
+}
diff --git a/src/service/v2g_serviceDataTypes.h b/src/service/v2g_serviceDataTypes.h
new file mode 100644
index 0000000..8025126
--- /dev/null
+++ b/src/service/v2g_serviceDataTypes.h
@@ -0,0 +1,1047 @@
+
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef SERVICEDATATYPES_H
+#define SERVICEDATATYPES_H
+
+#include "../codec/EXITypes.h"
+
+
+
+
+enum faultCodeType
+{
+ ParsingError,
+ V2GProtocolVersionNotSupported,
+ UnknownError
+
+};
+
+enum eventEntryType
+{
+ InitiateSessionSetup,
+ InitiateServiceDiscovery,
+ InitiatePowerDiscovery,
+ InitiateLineLock,
+ InitiatePowerDelivery,
+ InitiateInitiateMeteringStatus
+
+};
+
+enum responseCode_SessionSetupType
+{
+ OK_SessionSetup,
+ OK_NewSessionEstablished,
+ OK_OldSessionJoined,
+ FAILED_UnknownSession,
+ FAILED_SessionEstablishmentError,
+ FAILED_UnknownError_InSessionSetup
+
+};
+
+enum serviceTypeType
+{
+ PEV_Recharge,
+ Remote_Customer_Support,
+ Internet,
+ Other
+
+};
+
+enum responseCode_ServiceDiscoveryType
+{
+ OK_ServiceDiscovery,
+ FAILED_NoServicesOfThisType,
+ FAILED_NoServicesInThisScope,
+ FAILED_NoServicesOfThisTypeScope,
+ FAILED_NoServicesFound,
+ FAILED_UnknownError_InServiceDiscovery
+
+};
+
+enum responseCode_ServicePaymentSelectionType
+{
+ OK_ServicePaymentSelection,
+ FAILED_ServiceSelectionInvalid,
+ FAILED_PaymentSelectionInvalid,
+ FAILED_UnknownError_InServicePaymentSelection
+
+};
+
+enum responseCode_PaymentDetailsType
+{
+ OK_PaymentDetails,
+ FAILED_PaymentDetailsInvalid,
+ FAILED_UnknownError
+
+};
+
+enum unitMultiplierType
+{
+ d,
+ c,
+ m,
+ micro,
+ n,
+ p,
+ k,
+ M,
+ G,
+ T,
+ none
+
+};
+
+enum responseCode_PowerDiscoveryType
+{
+ OK_PowerDiscovery,
+ FAILED_UnknownError_InPowerDiscovery
+
+};
+
+enum tariffIDType
+{
+ Standard_charge,
+ Fast_charge,
+ Green_charge,
+ Grid_friendly_charge,
+ Freely_parameterisable_charge,
+ Charge_under_reserve
+
+};
+
+enum responseCode_LineLockType
+{
+ OK_LineLock,
+ FAILED_LineLockNotApplied,
+ FAILED_UnknownError_InLineLock
+
+};
+
+enum responseCode_PowerDeliveryType
+{
+ OK_PowerDelivery,
+ FAILED_PowerDeliveryNotApplied,
+ FAILED_TariffSelectionInvalid,
+ FAILED_ChargingProfileInvalid,
+ FAILED_UnknownError_InPowerDelivery
+
+};
+
+enum responseCode_MeteringStatusType
+{
+ OK_MeteringStatus,
+ FAILED_UnknownError_InMeteringStatus
+
+};
+
+enum responseCode_MeteringReceiptType
+{
+ OK_MeteringReceipt,
+ FAILED_UnknownError_MeteringReceipt
+
+};
+
+
+
+
+struct arraylen_SessionInformationType_SessionID
+{
+ size_t data;
+
+
+};
+
+
+struct SessionInformationType_SessionID
+{
+ uint8_t data[8];
+ struct arraylen_SessionInformationType_SessionID arraylen;
+
+};
+
+
+struct arraylen_SessionInformationType_ServiceSessionID
+{
+ size_t data;
+
+
+};
+
+
+struct SessionInformationType_ServiceSessionID
+{
+ uint8_t data[8];
+ struct arraylen_SessionInformationType_ServiceSessionID arraylen;
+
+};
+
+
+struct selection_SessionInformationType
+{
+ int ServiceSessionID:1;
+ int ProtocolVersion:1;
+
+
+};
+
+
+struct arraylen_SessionInformationType_ProtocolVersion
+{
+ size_t data;
+
+
+};
+
+
+struct SessionInformationType_ProtocolVersion
+{
+ uint32_t data[256];
+ struct arraylen_SessionInformationType_ProtocolVersion arraylen;
+
+};
+
+
+struct SessionInformationType
+{
+ struct SessionInformationType_SessionID SessionID;
+ struct SessionInformationType_ServiceSessionID ServiceSessionID;
+ struct SessionInformationType_ProtocolVersion ProtocolVersion;
+ struct selection_SessionInformationType isused;
+
+};
+
+
+struct selection_NotificationType
+{
+ int FaultCode:1;
+ int FaultMsg:1;
+ int EventList:1;
+
+
+};
+
+
+struct arraylen_NotificationType_FaultMsg
+{
+ size_t data;
+
+
+};
+
+
+struct NotificationType_FaultMsg
+{
+ uint32_t data[256];
+ struct arraylen_NotificationType_FaultMsg arraylen;
+
+};
+
+
+struct EventListType
+{
+ enum eventEntryType Event;
+
+
+};
+
+
+struct NotificationType
+{
+ enum faultCodeType FaultCode;
+ struct NotificationType_FaultMsg FaultMsg;
+ struct EventListType EventList;
+ struct selection_NotificationType isused;
+
+};
+
+
+struct selection_HeaderType
+{
+ int Notification:1;
+
+
+};
+
+
+struct HeaderType
+{
+ struct SessionInformationType SessionInformation;
+ struct NotificationType Notification;
+ struct selection_HeaderType isused;
+
+};
+
+
+struct arraylen_SessionSetupReqType_PEVID
+{
+ size_t data;
+
+
+};
+
+
+struct SessionSetupReqType_PEVID
+{
+ uint32_t data[32];
+ struct arraylen_SessionSetupReqType_PEVID arraylen;
+
+};
+
+
+struct selection_SessionSetupReqType
+{
+ int PEVID:1;
+
+
+};
+
+
+struct PEVStatusType
+{
+ int ConnectorLocked;
+ int ChargerStandby;
+
+
+};
+
+
+struct SessionSetupReqType
+{
+ struct SessionSetupReqType_PEVID PEVID;
+ struct PEVStatusType PEVStatus;
+ struct selection_SessionSetupReqType isused;
+
+};
+
+
+struct selection_BodyType
+{
+ int SessionSetupReq:1;
+ int SessionSetupRes:1;
+ int ServiceDiscoveryReq:1;
+ int ServiceDiscoveryRes:1;
+ int ServicePaymentSelectionReq:1;
+ int ServicePaymentSelectionRes:1;
+ int PaymentDetailsReq:1;
+ int PaymentDetailsRes:1;
+ int PowerDiscoveryReq:1;
+ int PowerDiscoveryRes:1;
+ int LineLockReq:1;
+ int LineLockRes:1;
+ int PowerDeliveryReq:1;
+ int PowerDeliveryRes:1;
+ int MeteringStatusReq:1;
+ int MeteringStatusRes:1;
+ int MeteringReceiptReq:1;
+ int MeteringReceiptRes:1;
+
+
+};
+
+
+struct arraylen_SessionSetupResType_EVSEID
+{
+ size_t data;
+
+
+};
+
+
+struct SessionSetupResType_EVSEID
+{
+ uint8_t data[32];
+ struct arraylen_SessionSetupResType_EVSEID arraylen;
+
+};
+
+
+struct EVSEStatusType
+{
+ int FatalError;
+ int EVSEStandby;
+ int ConnectorLocked;
+ int PowerSwitchClosed;
+ int RCD;
+ int64_t ShutDownTime;
+
+
+};
+
+
+struct SessionSetupResType
+{
+ enum responseCode_SessionSetupType ResponseCode;
+ struct SessionSetupResType_EVSEID EVSEID;
+ struct EVSEStatusType EVSEStatus;
+ int64_t TCurrent;
+
+
+};
+
+
+struct selection_ServiceDiscoveryReqType
+{
+ int ServiceType:1;
+ int ServiceScope:1;
+
+
+};
+
+
+struct arraylen_ServiceDiscoveryReqType_ServiceScope
+{
+ size_t data;
+
+
+};
+
+
+struct ServiceDiscoveryReqType_ServiceScope
+{
+ uint32_t data[255];
+ struct arraylen_ServiceDiscoveryReqType_ServiceScope arraylen;
+
+};
+
+
+struct ServiceDiscoveryReqType
+{
+ enum serviceTypeType ServiceType;
+ struct ServiceDiscoveryReqType_ServiceScope ServiceScope;
+ struct selection_ServiceDiscoveryReqType isused;
+
+};
+
+
+struct arraylen_ServiceDescriptionType_ServiceID
+{
+ size_t data;
+
+
+};
+
+
+struct ServiceDescriptionType_ServiceID
+{
+ uint8_t data[8];
+ struct arraylen_ServiceDescriptionType_ServiceID arraylen;
+
+};
+
+
+struct arraylen_ServiceDescriptionType_ServiceName
+{
+ size_t data;
+
+
+};
+
+
+struct ServiceDescriptionType_ServiceName
+{
+ uint32_t data[64];
+ struct arraylen_ServiceDescriptionType_ServiceName arraylen;
+
+};
+
+
+struct selection_ServiceDescriptionType
+{
+ int ServiceName:1;
+ int ServiceType:1;
+ int ServiceScope:1;
+
+
+};
+
+
+struct arraylen_ServiceDescriptionType_ServiceScope
+{
+ size_t data;
+
+
+};
+
+
+struct ServiceDescriptionType_ServiceScope
+{
+ uint32_t data[255];
+ struct arraylen_ServiceDescriptionType_ServiceScope arraylen;
+
+};
+
+
+struct ServiceDescriptionType
+{
+ struct ServiceDescriptionType_ServiceID ServiceID;
+ struct ServiceDescriptionType_ServiceName ServiceName;
+ enum serviceTypeType ServiceType;
+ struct ServiceDescriptionType_ServiceScope ServiceScope;
+ struct selection_ServiceDescriptionType isused;
+
+};
+
+
+struct arraylen_ServiceListType
+{
+ size_t Service;
+
+
+};
+
+
+struct ServiceListType
+{
+ struct ServiceDescriptionType Service[8];
+ struct arraylen_ServiceListType arraylen;
+
+};
+
+
+struct selection_ServiceDiscoveryResType
+{
+ int ServiceList:1;
+
+
+};
+
+
+struct ServiceDiscoveryResType
+{
+ enum responseCode_ServiceDiscoveryType ResponseCode;
+ struct ServiceListType ServiceList;
+ struct selection_ServiceDiscoveryResType isused;
+
+};
+
+
+struct arraylen_ServicePaymentSelectionReqType_PEVPubKey
+{
+ size_t data;
+
+
+};
+
+
+struct ServicePaymentSelectionReqType_PEVPubKey
+{
+ uint8_t data[64];
+ struct arraylen_ServicePaymentSelectionReqType_PEVPubKey arraylen;
+
+};
+
+
+struct ServicePaymentSelectionReqType
+{
+ struct ServiceListType ServiceList;
+ struct ServicePaymentSelectionReqType_PEVPubKey PEVPubKey;
+
+
+};
+
+
+struct arraylen_ServicePaymentSelectionResType_MeteringAuthPubKey
+{
+ size_t data;
+
+
+};
+
+
+struct ServicePaymentSelectionResType_MeteringAuthPubKey
+{
+ uint8_t data[64];
+ struct arraylen_ServicePaymentSelectionResType_MeteringAuthPubKey arraylen;
+
+};
+
+
+struct selection_ServicePaymentSelectionResType
+{
+ int MeteringAuthPubKey:1;
+
+
+};
+
+
+struct ServicePaymentSelectionResType
+{
+ enum responseCode_ServicePaymentSelectionType ResponseCode;
+ struct ServicePaymentSelectionResType_MeteringAuthPubKey MeteringAuthPubKey;
+ struct selection_ServicePaymentSelectionResType isused;
+
+};
+
+
+struct arraylen_PaymentDetailsReqType_ContractID
+{
+ size_t data;
+
+
+};
+
+
+struct PaymentDetailsReqType_ContractID
+{
+ uint32_t data[128];
+ struct arraylen_PaymentDetailsReqType_ContractID arraylen;
+
+};
+
+
+struct PaymentDetailsReqType
+{
+ struct PaymentDetailsReqType_ContractID ContractID;
+
+
+};
+
+
+struct PaymentDetailsResType
+{
+ enum responseCode_PaymentDetailsType ResponseCode;
+
+
+};
+
+
+struct FloatingValueType
+{
+ enum unitMultiplierType Multiplier;
+ enum unitMultiplierType Unit;
+ int32_t Value;
+
+
+};
+
+
+struct PowerDiscoveryReqType
+{
+ struct PEVStatusType PEVStatus;
+ int64_t EoC;
+ struct FloatingValueType EAmount;
+ struct FloatingValueType PEVMaxPower;
+ int32_t PEVMaxPhases;
+ struct FloatingValueType PEVMaxVoltage;
+ struct FloatingValueType PEVMinVoltage;
+
+
+};
+
+
+struct arraylen_PowerDiscoveryResType_EnergyProvider
+{
+ size_t data;
+
+
+};
+
+
+struct PowerDiscoveryResType_EnergyProvider
+{
+ uint32_t data[256];
+ struct arraylen_PowerDiscoveryResType_EnergyProvider arraylen;
+
+};
+
+
+struct selection_PowerDiscoveryResType
+{
+ int EnergyProvider:1;
+ int TariffTable:1;
+
+
+};
+
+
+struct arraylen_TariffTableType_Currency
+{
+ size_t data;
+
+
+};
+
+
+struct TariffTableType_Currency
+{
+ uint32_t data[3];
+ struct arraylen_TariffTableType_Currency arraylen;
+
+};
+
+
+struct arraylen_TariffDescrType_TariffDescription
+{
+ size_t data;
+
+
+};
+
+
+struct TariffDescrType_TariffDescription
+{
+ uint32_t data[32];
+ struct arraylen_TariffDescrType_TariffDescription arraylen;
+
+};
+
+
+struct selection_TariffDescrType
+{
+ int TariffDescription:1;
+
+
+};
+
+
+struct selection_TariffEntryType
+{
+ int EPrice:1;
+
+
+};
+
+
+struct TariffEntryType
+{
+ uint32_t TariffStart;
+ struct FloatingValueType TariffPMax;
+ struct FloatingValueType EPrice;
+ struct selection_TariffEntryType isused;
+
+};
+
+
+struct arraylen_TariffEntriesType
+{
+ size_t TariffEntry;
+
+
+};
+
+
+struct TariffEntriesType
+{
+ struct TariffEntryType TariffEntry[8];
+ struct arraylen_TariffEntriesType arraylen;
+
+};
+
+
+struct TariffDescrType
+{
+ enum tariffIDType TariffID;
+ struct TariffDescrType_TariffDescription TariffDescription;
+ struct TariffEntriesType TariffEntries;
+ struct selection_TariffDescrType isused;
+
+};
+
+
+struct arraylen_TariffTableType
+{
+ size_t Tariff;
+
+
+};
+
+
+struct TariffTableType
+{
+ struct TariffTableType_Currency Currency;
+ struct TariffDescrType Tariff[6];
+ struct arraylen_TariffTableType arraylen;
+
+};
+
+
+struct PowerDiscoveryResType
+{
+ enum responseCode_PowerDiscoveryType ResponseCode;
+ struct EVSEStatusType EVSEStatus;
+ struct FloatingValueType EVSEVoltage;
+ struct FloatingValueType EVSEIMax;
+ int32_t EVSEMaxPhases;
+ struct PowerDiscoveryResType_EnergyProvider EnergyProvider;
+ struct TariffTableType TariffTable;
+ struct selection_PowerDiscoveryResType isused;
+
+};
+
+
+struct LineLockReqType
+{
+ struct PEVStatusType PEVStatus;
+ int ReqLockStatus;
+
+
+};
+
+
+struct LineLockResType
+{
+ enum responseCode_LineLockType ResponseCode;
+ struct EVSEStatusType EVSEStatus;
+
+
+};
+
+
+struct selection_PowerDeliveryReqType
+{
+ int Tariff:1;
+ int ChargingProfile:1;
+
+
+};
+
+
+struct ChargingProfileType
+{
+ int64_t ChargingProfileEntryStart;
+ struct FloatingValueType ChargingProfileEntryMaxPower;
+
+
+};
+
+
+struct PowerDeliveryReqType
+{
+ struct PEVStatusType PEVStatus;
+ int ReqSwitchStatus;
+ enum tariffIDType Tariff;
+ struct ChargingProfileType ChargingProfile;
+ struct selection_PowerDeliveryReqType isused;
+
+};
+
+
+struct PowerDeliveryResType
+{
+ enum responseCode_PowerDeliveryType ResponseCode;
+
+
+};
+
+
+struct MeteringStatusReqType
+{
+
+
+};
+
+
+struct arraylen_MeteringStatusResType_EVSEID
+{
+ size_t data;
+
+
+};
+
+
+struct MeteringStatusResType_EVSEID
+{
+ uint8_t data[32];
+ struct arraylen_MeteringStatusResType_EVSEID arraylen;
+
+};
+
+
+struct selection_MeteringStatusResType
+{
+ int PCurrent:1;
+ int MeterInfo:1;
+
+
+};
+
+
+struct arraylen_MeterInfoType_MeterID
+{
+ size_t data;
+
+
+};
+
+
+struct MeterInfoType_MeterID
+{
+ uint32_t data[32];
+ struct arraylen_MeterInfoType_MeterID arraylen;
+
+};
+
+
+struct selection_MeterInfoType
+{
+ int MeterID:1;
+ int MeterPubKey:1;
+ int MeterReading:1;
+ int MeterStatus:1;
+ int TMeter:1;
+
+
+};
+
+
+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;
+ struct selection_MeterInfoType isused;
+
+};
+
+
+struct MeteringStatusResType
+{
+ enum responseCode_MeteringStatusType ResponseCode;
+ struct MeteringStatusResType_EVSEID EVSEID;
+ struct EVSEStatusType EVSEStatus;
+ int64_t TCurrent;
+ struct FloatingValueType EVSEMaxPower;
+ struct FloatingValueType PCurrent;
+ struct MeterInfoType MeterInfo;
+ struct selection_MeteringStatusResType isused;
+
+};
+
+
+struct arraylen_MeteringReceiptReqType_PEVID
+{
+ size_t data;
+
+
+};
+
+
+struct MeteringReceiptReqType_PEVID
+{
+ uint32_t data[32];
+ struct arraylen_MeteringReceiptReqType_PEVID arraylen;
+
+};
+
+
+struct selection_MeteringReceiptReqType
+{
+ int PEVID:1;
+ int TCurrent:1;
+
+
+};
+
+
+struct MeteringReceiptReqType
+{
+ struct MeteringReceiptReqType_PEVID PEVID;
+ struct PEVStatusType PEVStatus;
+ int64_t TCurrent;
+ enum tariffIDType Tariff;
+ struct MeterInfoType MeterInfo;
+ struct selection_MeteringReceiptReqType isused;
+
+};
+
+
+struct MeteringReceiptResType
+{
+ enum responseCode_MeteringReceiptType ResponseCode;
+
+
+};
+
+
+struct BodyType
+{
+ struct SessionSetupReqType SessionSetupReq;
+ struct SessionSetupResType SessionSetupRes;
+ struct ServiceDiscoveryReqType ServiceDiscoveryReq;
+ struct ServiceDiscoveryResType ServiceDiscoveryRes;
+ struct ServicePaymentSelectionReqType ServicePaymentSelectionReq;
+ struct ServicePaymentSelectionResType ServicePaymentSelectionRes;
+ struct PaymentDetailsReqType PaymentDetailsReq;
+ struct PaymentDetailsResType PaymentDetailsRes;
+ struct PowerDiscoveryReqType PowerDiscoveryReq;
+ struct PowerDiscoveryResType PowerDiscoveryRes;
+ struct LineLockReqType LineLockReq;
+ struct LineLockResType LineLockRes;
+ struct PowerDeliveryReqType PowerDeliveryReq;
+ struct PowerDeliveryResType PowerDeliveryRes;
+ struct MeteringStatusReqType MeteringStatusReq;
+ struct MeteringStatusResType MeteringStatusRes;
+ struct MeteringReceiptReqType MeteringReceiptReq;
+ struct MeteringReceiptResType MeteringReceiptRes;
+ struct selection_BodyType isused;
+
+};
+
+
+struct AnonType_V2G_Message
+{
+ struct HeaderType Header;
+ struct BodyType Body;
+
+
+};
+
+
+/* init method of the V2G message */
+void init_AnonType_V2G_Message(struct AnonType_V2G_Message* v2gMsg);
+
+
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/service/v2g_serviceDispatcher.c b/src/service/v2g_serviceDispatcher.c
new file mode 100644
index 0000000..57bcb3b
--- /dev/null
+++ b/src/service/v2g_serviceDispatcher.c
@@ -0,0 +1,1358 @@
+
+
+
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+
+#include "v2g_service.h"
+#include "v2g_serviceDispatcher.h"
+#include "v2g_serviceDataTypes.h"
+#include "v2g_serviceMethods.h"
+#include "v2g_serviceDataSerializiation.h"
+#include "../codec/EXITypes.h"
+#include "../codec/EXIDecoder.h"
+#include "../codec/EXIEncoder.h"
+
+
+/**
+ * Assigns an element value of the EXI stream into the service data structure
+ */
+static int deserializeElementCharacter(struct v2gService* service)
+{
+
+ /* SessionID */
+ if(service->eqn.namespaceURI==5 && service->eqn.localPart==35)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* array copy and array length assignment */
+ memcpy(service->v2gMsg.Header.SessionInformation.SessionID.data, service->val.binary.data,service->val.binary.len);
+ service->v2gMsg.Header.SessionInformation.SessionID.arraylen.data = service->val.binary.len;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ServiceSessionID */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==33)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* array copy and array length assignment */
+ memcpy(service->v2gMsg.Header.SessionInformation.ServiceSessionID.data, service->val.binary.data,service->val.binary.len);
+ service->v2gMsg.Header.SessionInformation.ServiceSessionID.arraylen.data = service->val.binary.len;
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Header.SessionInformation.isused.ServiceSessionID=1;
+ }
+
+ /* ProtocolVersion */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==25)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Header.SessionInformation.ProtocolVersion.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Header.SessionInformation.ProtocolVersion.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Header.SessionInformation.isused.ProtocolVersion=1;
+ }
+
+ /* Event */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==9)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Header.Notification.EventList.Event=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* FaultCode */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==13)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Header.Notification.FaultCode=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Header.Notification.isused.FaultCode=1;
+ }
+
+ /* FaultMsg */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==14)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Header.Notification.FaultMsg.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Header.Notification.FaultMsg.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Header.Notification.isused.FaultMsg=1;
+ }
+
+ /* ConnectorLocked */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==4)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+ service->v2gMsg.Body.SessionSetupReq.PEVStatus.ConnectorLocked=service->val.boolean;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ChargerStandby */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==0)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+ service->v2gMsg.Body.SessionSetupReq.PEVStatus.ChargerStandby=service->val.boolean;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* PEVID */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==26)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.SessionSetupReq.PEVID.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.SessionSetupReq.PEVID.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.SessionSetupReq.isused.PEVID=1;
+ }
+
+ /* FatalError */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==12)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.FatalError=service->val.boolean;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* EVSEStandby */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==7)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.EVSEStandby=service->val.boolean;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ConnectorLocked */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==4)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ConnectorLocked=service->val.boolean;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* PowerSwitchClosed */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==24)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.PowerSwitchClosed=service->val.boolean;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* RCD */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==26)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.RCD=service->val.boolean;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ShutDownTime */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==37)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+ service->v2gMsg.Body.SessionSetupRes.EVSEStatus.ShutDownTime=service->val.int64;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.SessionSetupRes.ResponseCode=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* EVSEID */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==3)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* 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;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* TCurrent */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==63)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+ service->v2gMsg.Body.SessionSetupRes.TCurrent=service->val.int64;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ServiceType */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==58)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.ServiceDiscoveryReq.ServiceType=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.ServiceDiscoveryReq.isused.ServiceType=1;
+ }
+
+ /* ServiceScope */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==57)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.ServiceDiscoveryReq.ServiceScope.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.ServiceDiscoveryReq.ServiceScope.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.ServiceDiscoveryReq.isused.ServiceScope=1;
+ }
+
+ /* ServiceID */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==29)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* array copy and array length assignment */
+ memcpy(service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceID.data, service->val.binary.data,service->val.binary.len);
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceID.arraylen.data = service->val.binary.len;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ServiceName */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==31)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceName.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceName.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceName=1;
+ }
+
+ /* ServiceType */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==34)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceType=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceType=1;
+ }
+
+ /* ServiceScope */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==32)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceScope.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].ServiceScope.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.Service[service->v2gMsg.Body.ServiceDiscoveryRes.ServiceList.arraylen.Service].isused.ServiceScope=1;
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.ServiceDiscoveryRes.ResponseCode=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* PEVPubKey */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==31)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* array copy and array length assignment */
+ memcpy(service->v2gMsg.Body.ServicePaymentSelectionReq.PEVPubKey.data, service->val.binary.data,service->val.binary.len);
+ service->v2gMsg.Body.ServicePaymentSelectionReq.PEVPubKey.arraylen.data = service->val.binary.len;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.ServicePaymentSelectionRes.ResponseCode=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* MeteringAuthPubKey */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==16)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* array copy and array length assignment */
+ memcpy(service->v2gMsg.Body.ServicePaymentSelectionRes.MeteringAuthPubKey.data, service->val.binary.data,service->val.binary.len);
+ service->v2gMsg.Body.ServicePaymentSelectionRes.MeteringAuthPubKey.arraylen.data = service->val.binary.len;
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.ServicePaymentSelectionRes.isused.MeteringAuthPubKey=1;
+ }
+
+ /* ContractID */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==1)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.PaymentDetailsReq.ContractID.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.PaymentDetailsReq.ContractID.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.PaymentDetailsRes.ResponseCode=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* Multiplier */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==21)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Multiplier=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* Unit */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==50)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Unit=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* Value */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==51)
+ {
+ if(service->val.type == INTEGER_16)
+ {
+ service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Value=service->val.int32;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* EoC */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==10)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+ service->v2gMsg.Body.PowerDiscoveryReq.EoC=service->val.int64;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* PEVMaxPhases */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==27)
+ {
+ if(service->val.type == INTEGER_16)
+ {
+ service->v2gMsg.Body.PowerDiscoveryReq.PEVMaxPhases=service->val.int32;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* TariffStart */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==48)
+ {
+ 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;
+ }
+ }
+
+ /* TariffID */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==46)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffID=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* TariffDescription */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==41)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffDescription.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].TariffDescription.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Tariff[service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.arraylen.Tariff].isused.TariffDescription=1;
+ }
+
+ /* Currency */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==5)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Currency.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.PowerDiscoveryRes.TariffTable.Currency.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.PowerDiscoveryRes.ResponseCode=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* EVSEMaxPhases */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==5)
+ {
+ if(service->val.type == INTEGER_16)
+ {
+ service->v2gMsg.Body.PowerDiscoveryRes.EVSEMaxPhases=service->val.int32;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* EnergyProvider */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==9)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.PowerDiscoveryRes.EnergyProvider.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.PowerDiscoveryRes.EnergyProvider.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.PowerDiscoveryRes.isused.EnergyProvider=1;
+ }
+
+ /* ReqLockStatus */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==45)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+ service->v2gMsg.Body.LineLockReq.ReqLockStatus=service->val.boolean;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.LineLockRes.ResponseCode=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ChargingProfileEntryStart */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==2)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+ service->v2gMsg.Body.PowerDeliveryReq.ChargingProfile.ChargingProfileEntryStart=service->val.int64;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ReqSwitchStatus */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==46)
+ {
+ if(service->val.type == BOOLEAN)
+ {
+ service->v2gMsg.Body.PowerDeliveryReq.ReqSwitchStatus=service->val.boolean;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* Tariff */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==64)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.PowerDeliveryReq.Tariff=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.PowerDeliveryReq.isused.Tariff=1;
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.PowerDeliveryRes.ResponseCode=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* MeterID */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==16)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterID.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterID.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterID=1;
+ }
+
+ /* MeterPubKey */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==18)
+ {
+ 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;
+ }
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterPubKey=1;
+ }
+
+ /* MeterStatus */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==20)
+ {
+ if(service->val.type == INTEGER_16)
+ {
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.MeterStatus=service->val.int32;
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterStatus=1;
+ }
+
+ /* TMeter */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==38)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.TMeter=service->val.int64;
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.TMeter=1;
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.MeteringStatusRes.ResponseCode=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* EVSEID */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==3)
+ {
+ if(service->val.type == BINARY_HEX)
+ {
+ /* array copy and array length assignment */
+ memcpy(service->v2gMsg.Body.MeteringStatusRes.EVSEID.data, service->val.binary.data,service->val.binary.len);
+ service->v2gMsg.Body.MeteringStatusRes.EVSEID.arraylen.data = service->val.binary.len;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* TCurrent */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==63)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+ service->v2gMsg.Body.MeteringStatusRes.TCurrent=service->val.int64;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* PEVID */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==26)
+ {
+ if(service->val.type == STRING)
+ {
+ /* string copy and string length assignment */
+ memcpy(service->v2gMsg.Body.MeteringReceiptReq.PEVID.data, service->val.string.codepoints,service->val.string.len);
+ service->v2gMsg.Body.MeteringReceiptReq.PEVID.arraylen.data = service->val.string.len;
+
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.MeteringReceiptReq.isused.PEVID=1;
+ }
+
+ /* TCurrent */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==63)
+ {
+ if(service->val.type == INTEGER_64)
+ {
+ service->v2gMsg.Body.MeteringReceiptReq.TCurrent=service->val.int64;
+ }
+ else
+ {
+ return -1;
+ }
+ /* is used */
+ service->v2gMsg.Body.MeteringReceiptReq.isused.TCurrent=1;
+ }
+
+ /* Tariff */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==64)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.MeteringReceiptReq.Tariff=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ /* ResponseCode */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==47)
+ {
+ if(service->val.type == ENUMERATION)
+ {
+ service->v2gMsg.Body.MeteringReceiptRes.ResponseCode=service->val.enumeration;
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/**
+ * Depending on the current EXI event a message element is deserialized or a
+ * defined service method is called in here
+ */
+static int deserializeElementOrServiceCall(struct v2gService* service)
+{
+
+ /* EventList */
+ if(service->eqn.namespaceURI==5 && service->eqn.localPart==10)
+ {
+ /* is used */
+ service->v2gMsg.Header.Notification.isused.EventList=1;
+
+ }
+
+ /* Notification */
+ else if(service->eqn.namespaceURI==6 && service->eqn.localPart==6)
+ {
+ /* is used */
+ service->v2gMsg.Header.isused.Notification=1;
+
+ }
+
+ /* ServiceList */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==52)
+ {
+ /* is used */
+ service->v2gMsg.Body.ServiceDiscoveryRes.isused.ServiceList=1;
+
+ }
+
+ /* EPrice */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==6)
+ {
+ /* 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;
+
+ }
+
+ /* TariffTable */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==65)
+ {
+ /* is used */
+ service->v2gMsg.Body.PowerDiscoveryRes.isused.TariffTable=1;
+
+ }
+
+ /* ChargingProfile */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==0)
+ {
+ /* is used */
+ service->v2gMsg.Body.PowerDeliveryReq.isused.ChargingProfile=1;
+
+ }
+
+ /* MeterReading */
+ else if(service->eqn.namespaceURI==5 && service->eqn.localPart==19)
+ {
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.MeterInfo.isused.MeterReading=1;
+
+ }
+
+ /* PCurrent */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==25)
+ {
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.isused.PCurrent=1;
+
+ }
+
+ /* MeterInfo */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==15)
+ {
+ /* is used */
+ service->v2gMsg.Body.MeteringStatusRes.isused.MeterInfo=1;
+
+ }
+
+ /* SessionSetupReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==59)
+ {
+
+ /* service call */
+ sessionSetup(&(service->v2gMsg.Body.SessionSetupReq), &(service->v2gMsg.Body.SessionSetupRes));
+
+ /* signalize the response message */
+ service->v2gMsg.Body.isused.SessionSetupRes=1;
+
+ /* marshall the response data */
+ serialize_message(service);
+
+
+
+
+ }
+
+ /* SessionSetupRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==61)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.SessionSetupRes=1;
+
+ }
+
+ /* ServiceDiscoveryReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==48)
+ {
+
+ /* service call */
+ serviceDiscovery(&(service->v2gMsg.Body.ServiceDiscoveryReq), &(service->v2gMsg.Body.ServiceDiscoveryRes));
+
+ /* signalize the response message */
+ service->v2gMsg.Body.isused.ServiceDiscoveryRes=1;
+
+ /* marshall the response data */
+ serialize_message(service);
+
+
+
+
+ }
+
+ /* ServiceDiscoveryRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==50)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.ServiceDiscoveryRes=1;
+
+ }
+
+ /* ServicePaymentSelectionReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==53)
+ {
+
+ /* service call */
+ selectedServicePayment(&(service->v2gMsg.Body.ServicePaymentSelectionReq), &(service->v2gMsg.Body.ServicePaymentSelectionRes));
+
+ /* signalize the response message */
+ service->v2gMsg.Body.isused.ServicePaymentSelectionRes=1;
+
+ /* marshall the response data */
+ serialize_message(service);
+
+
+
+
+ }
+
+ /* ServicePaymentSelectionRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==55)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.ServicePaymentSelectionRes=1;
+
+ }
+
+ /* PaymentDetailsReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==33)
+ {
+
+ /* service call */
+ paymentDetails(&(service->v2gMsg.Body.PaymentDetailsReq), &(service->v2gMsg.Body.PaymentDetailsRes));
+
+ /* signalize the response message */
+ service->v2gMsg.Body.isused.PaymentDetailsRes=1;
+
+ /* marshall the response data */
+ serialize_message(service);
+
+
+
+
+ }
+
+ /* PaymentDetailsRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==35)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.PaymentDetailsRes=1;
+
+ }
+
+ /* PowerDiscoveryReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==41)
+ {
+
+ /* service call */
+ powerDiscovery(&(service->v2gMsg.Body.PowerDiscoveryReq), &(service->v2gMsg.Body.PowerDiscoveryRes));
+
+ /* signalize the response message */
+ service->v2gMsg.Body.isused.PowerDiscoveryRes=1;
+
+ /* marshall the response data */
+ serialize_message(service);
+
+
+
+
+ }
+
+ /* PowerDiscoveryRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==43)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.PowerDiscoveryRes=1;
+
+ }
+
+ /* LineLockReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==11)
+ {
+
+ /* service call */
+ lineLock(&(service->v2gMsg.Body.LineLockReq), &(service->v2gMsg.Body.LineLockRes));
+
+ /* signalize the response message */
+ service->v2gMsg.Body.isused.LineLockRes=1;
+
+ /* marshall the response data */
+ serialize_message(service);
+
+
+
+
+ }
+
+ /* LineLockRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==13)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.LineLockRes=1;
+
+ }
+
+ /* PowerDeliveryReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==37)
+ {
+
+ /* service call */
+ powerDelivery(&(service->v2gMsg.Body.PowerDeliveryReq), &(service->v2gMsg.Body.PowerDeliveryRes));
+
+ /* signalize the response message */
+ service->v2gMsg.Body.isused.PowerDeliveryRes=1;
+
+ /* marshall the response data */
+ serialize_message(service);
+
+
+
+
+ }
+
+ /* PowerDeliveryRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==39)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.PowerDeliveryRes=1;
+
+ }
+
+ /* MeteringStatusReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==21)
+ {
+
+ /* service call */
+ meteringStatus(&(service->v2gMsg.Body.MeteringStatusReq), &(service->v2gMsg.Body.MeteringStatusRes));
+
+ /* signalize the response message */
+ service->v2gMsg.Body.isused.MeteringStatusRes=1;
+
+ /* marshall the response data */
+ serialize_message(service);
+
+
+
+
+ }
+
+ /* MeteringStatusRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==23)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.MeteringStatusRes=1;
+
+ }
+
+ /* MeteringReceiptReq */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==17)
+ {
+
+ /* service call */
+ meteringReceipt(&(service->v2gMsg.Body.MeteringReceiptReq), &(service->v2gMsg.Body.MeteringReceiptRes));
+
+ /* signalize the response message */
+ service->v2gMsg.Body.isused.MeteringReceiptRes=1;
+
+ /* marshall the response data */
+ serialize_message(service);
+
+
+
+
+ }
+
+ /* MeteringReceiptRes */
+ else if(service->eqn.namespaceURI==4 && service->eqn.localPart==19)
+ {
+ /* is used */
+ service->v2gMsg.Body.isused.MeteringReceiptRes=1;
+
+ }
+
+ return 0;
+}
+
+
+/**
+ * Deserialize the EXI stream
+ * @return 0 = 0K; -1 = ERROR
+ */
+static int deserializeMessage(struct v2gService* service)
+{
+ int noEndOfDocument = 1; /* true */
+ int errno;
+#ifdef DEBUG
+ const char * localName;
+ const char * namespaceURI;
+#endif
+
+ do {
+ exiDecodeNextEvent(&(service->inStream), &(service->stateDecode), &(service->event));
+ if (errno < 0) {
+ printf("[ERROR] %d \n", errno);
+ return errno;
+ }
+
+ switch (service->event) {
+ case START_DOCUMENT:
+
+ errno = exiDecodeStartDocument(&(service->inStream), &(service->stateDecode));
+
+ break;
+ case END_DOCUMENT:
+
+ errno = exiDecodeEndDocument(&(service->inStream), &(service->stateDecode));
+ noEndOfDocument = 0; /* false */
+ break;
+ case START_ELEMENT:
+ errno = exiDecodeStartElement(&(service->inStream), &(service->stateDecode), &(service->eqn));
+
+ break;
+ case END_ELEMENT:
+
+ errno = exiDecodeEndElement(&(service->inStream), &(service->stateDecode), &(service->eqn));
+ errno = deserializeElementOrServiceCall(service);
+
+ break;
+ case CHARACTERS:
+ /* decode */
+ errno = exiDecodeCharacters(&(service->inStream), &(service->stateDecode), &(service->val));
+
+ /* assign data to the v2g message structure */
+ errno = deserializeElementCharacter(service);
+ break;
+ case ATTRIBUTE:
+ /* decode */
+ /* errno = exiDecodeAttribute(&isStream, &stateDecode, &eqn, &val); */
+ break;
+ default:
+ /* ERROR */
+ return -1;
+ }
+
+ } while (noEndOfDocument);
+
+ return 0;
+}
+
+
+/**
+ * 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 responseCode;
+
+ /* assign inStream data to service v2g structure */
+ service->inStream.data = inStream;
+ service->inStream.size = sizeInStream;
+ service->inStream.pos = inPos;
+ service->inStream.buffer=0;
+ service->inStream.capacity=0;
+
+
+
+ /* assign outStream data to service v2g structure */
+ service->outStream.data = outStream;
+ service->outStream.size = sizeOutStream;
+ service->outStream.pos = outPos;
+ service->outStream.buffer=0;
+ service->outStream.capacity=8;
+
+
+ /* init EXI decoder (read header, set initial state) */
+ exiInitDecoder(&(service->inStream), &(service->stateDecode));
+
+ /* init EXI encoder (write header, set initial state) */
+ exiInitEncoder(&(service->outStream), &(service->stateEncode));
+
+ /* init v2g message */
+ init_AnonType_V2G_Message(&(service->v2gMsg));
+
+ /* deserialize the input stream and call the corresponding service */
+ responseCode = deserializeMessage(service);
+
+
+
+ if(responseCode<0)
+ {
+ /* an error occurred */
+ return -1;
+ } else if(responseCode==1)
+ {
+
+ return 0;
+ }
+
+
+ return 0;
+
+}
+
+/**
+ * Init the service
+ * @return 0 = 0K; -1 = ERROR
+ */
+int init_v2gservice(struct v2gService* service, bytes_t bytes, string_ucs_t string)
+{
+
+ /* init byte array */
+ service->val.binary = bytes;
+
+ /* init string array */
+ service->val.string = string;
+
+
+ return 0;
+}
diff --git a/src/service/v2g_serviceDispatcher.h b/src/service/v2g_serviceDispatcher.h
new file mode 100644
index 0000000..bfefee1
--- /dev/null
+++ b/src/service/v2g_serviceDispatcher.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef V2GSERVER_H_
+#define V2GSERVER_H_
+
+#include "v2g_serviceDataTypes.h"
+
+
+int init_v2gservice(struct 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);
+
+#endif /* V2GSERVER_H_ */
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/service/v2g_serviceMethods.h b/src/service/v2g_serviceMethods.h
new file mode 100644
index 0000000..04f9239
--- /dev/null
+++ b/src/service/v2g_serviceMethods.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+ #ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef SERVICEMETHODS_H
+#define SERVICEMETHODS_H
+
+#include "v2g_serviceDataTypes.h"
+#include "../codec/EXITypes.h"
+
+/* service methods */
+int sessionSetup(struct SessionSetupReqType* param, struct SessionSetupResType* result);
+
+int serviceDiscovery(struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result);
+
+int selectedServicePayment(struct ServicePaymentSelectionReqType* param, struct ServicePaymentSelectionResType* result);
+
+int paymentDetails(struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result);
+
+int powerDiscovery(struct PowerDiscoveryReqType* param, struct PowerDiscoveryResType* result);
+
+int lineLock(struct LineLockReqType* param, struct LineLockResType* result);
+
+int powerDelivery(struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result);
+
+int meteringStatus(struct MeteringStatusReqType* param, struct MeteringStatusResType* result);
+
+int meteringReceipt(struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result);
+
+
+
+
+
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/test/main_codec.c b/src/test/main_codec.c
index 408ce30..01b0481 100644
--- a/src/test/main_codec.c
+++ b/src/test/main_codec.c
@@ -43,7 +43,7 @@
uint8_t data[ARRAY_SIZE_BYTES];
uint32_t codepoints[ARRAY_SIZE_STRINGS];
-int main(int argc, char *argv[]) {
+int mainX(int argc, char *argv[]) {
int errn = 0;
unsigned int i;
diff --git a/src/test/main_service.c b/src/test/main_service.c
new file mode 100644
index 0000000..5847d06
--- /dev/null
+++ b/src/test/main_service.c
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+
+
+#include "service/v2g_service.h"
+#include "service/v2g_serviceDataTypes.h"
+#include "service/v2g_serviceClientStubs.h"
+#include "codec/EXITypes.h"
+#include "codec/BitStream.h"
+
+#include
+
+#define MAX_BYTE_SIZE 128
+#define MAX_STRING_SIZE 256
+#define MAX_STREAM_SIZE 60
+
+int main(int argc, char *argv[])
+{
+
+ static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/
+ static uint32_t string_array[MAX_STRING_SIZE]; /* define MAX_STRING_SIZE before*/
+
+ /* define in and out byte stream */
+ uint8_t inStream[MAX_STREAM_SIZE]; /* define MAX_STREAM_SIZE before */
+ uint8_t outStream[MAX_STREAM_SIZE]; /* define MAX_STREAM_SIZE before */
+
+ /* service data structure */
+ struct v2gService service;
+ struct HeaderType v2gHeader;
+ struct SessionSetupReqType sessionSetup;
+ struct SessionSetupResType resultSessionSetup;
+/* struct PowerDiscoveryReqType powerDiscovery;
+ struct PowerDiscoveryResType resultPowerDiscovery;
+*/
+
+ /* BINARY memory setup */
+ bytes_t bytes = { MAX_BYTE_SIZE, byte_array, 0 };
+
+ /* STRING memory setup */
+ string_ucs_t string = { MAX_STRING_SIZE, string_array, 0 };
+
+
+
+ printf("+++Start V2G Client / Service Example+++\n\n");
+
+ /*******************
+ * Init V2G Client *
+ *******************/
+
+ init_v2gServiceClient(&service,bytes,string,inStream,MAX_STREAM_SIZE, outStream, MAX_STREAM_SIZE);
+
+ /*******************************
+ * Setup data for sessionSetup *
+ *******************************/
+
+ /* setup header information */
+ v2gHeader.SessionInformation.ServiceSessionID.arraylen.data = 0; /* no session id in the initial message -> array length = 0*/
+ v2gHeader.SessionInformation.ProtocolVersion.data[0]='1'; /* assign protocol version number*/
+ v2gHeader.SessionInformation.ProtocolVersion.arraylen.data=1; /* array string length =1 of protocol version */
+ v2gHeader.SessionInformation.isused.ProtocolVersion = 1; /* important: signalize, protocol version is used */
+ v2gHeader.isused.Notification=0; /* no notification */
+
+ /* setup sessionSetup parameter */
+ sessionSetup.isused.PEVID=1; /* no PEVID is transported */
+ sessionSetup.PEVStatus.ChargerStandby=1; /* charger standby = true */
+ sessionSetup.PEVStatus.ConnectorLocked=0; /* connector locked = false */
+
+
+ printf("PEV: call EVSE sessionSetup\n");
+ /*********************
+ * Call sessionSetup *
+ *********************/
+ call_sessionSetup(&service,&v2gHeader,&sessionSetup,&resultSessionSetup);
+
+ /* show result of the answer message of EVSE sessionSetup*/
+ printf("PEV: received response message from EVSE\n");
+ printf("\tResponseCode=%d\n",resultSessionSetup.ResponseCode);
+ printf("\tEVSEID=%d\n", resultSessionSetup.EVSEID.data[0]);
+ printf("\tEVSEStatus:\n\t\tConnectorLocked=%d\n",resultSessionSetup.EVSEStatus.ConnectorLocked);
+ printf("\t\tEVSEStandby=%d\n",resultSessionSetup.EVSEStatus.EVSEStandby);
+ printf("\t\tFatalError=%d\n",resultSessionSetup.EVSEStatus.FatalError);
+ printf("\t\tPowerSwitchClosed=%d\n",resultSessionSetup.EVSEStatus.PowerSwitchClosed);
+ printf("\t\tRCD=%d\n",resultSessionSetup.EVSEStatus.RCD);
+ printf("\t\tShutDownTime=%ld\n",resultSessionSetup.EVSEStatus.ShutDownTime);
+ printf("\tTCurrent=%ld\n",resultSessionSetup.TCurrent);
+
+ printf("\n+++Terminate V2G Client / Service Example+++");
+
+ return 0;
+}
+
diff --git a/src/test/v2g_server.c b/src/test/v2g_server.c
new file mode 100644
index 0000000..eace6cf
--- /dev/null
+++ b/src/test/v2g_server.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+#include "v2g_server.h"
+#include "service/v2g_service.h"
+#include "service/v2g_serviceDispatcher.h"
+
+#define MAX_BYTE_SIZE 128
+#define MAX_STRING_SIZE 256
+#define MAX_STREAM_SIZE 60
+
+int testV2GService(uint8_t* inStream, size_t inStreamLength, uint8_t* outStream)
+{
+ static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/
+ static uint32_t string_array[MAX_STRING_SIZE]; /* define MAX_STRING_SIZE before*/
+
+ size_t posIn, posOut;
+
+ struct v2gService service;
+
+ /* BINARY memory setup */
+ bytes_t bytes = { MAX_BYTE_SIZE, byte_array, 0 };
+
+ /* STRING memory setup */
+ string_ucs_t string = { MAX_STRING_SIZE, string_array, 0 };
+
+ /**********************************************
+ * Init V2G server and initialize array types *
+ * for the EXI decoding *
+ **********************************************/
+
+ init_v2gservice(&service, bytes, string);
+
+ /* assign the position where to read / write in the inStream / outStream */
+ posIn=0;
+ posOut=0;
+
+ /****************************************************************************
+ * Pass the received EXI message stream (inStream + inStreamLength) to the *
+ * message dispatcher. The outStream contains the response message stream. *
+ * posOut==length of outStream *
+ ****************************************************************************/
+
+ messageDispatcher(&service, inStream, inStreamLength, &posIn, outStream, MAX_STREAM_SIZE, &posOut);
+
+ return 0;
+}
diff --git a/src/test/v2g_server.h b/src/test/v2g_server.h
new file mode 100644
index 0000000..15546fb
--- /dev/null
+++ b/src/test/v2g_server.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+#ifndef V2G_SERVER_H_
+#define V2G_SERVER_H_
+
+#include "codec/EXITypes.h"
+
+int testV2GService(uint8_t* inStream, size_t inStreamLength, uint8_t* outStream);
+
+#endif /* V2G_SERVER_H_ */
diff --git a/src/test/v2g_serviceClientDataTransmitter.c b/src/test/v2g_serviceClientDataTransmitter.c
new file mode 100644
index 0000000..000bbcc
--- /dev/null
+++ b/src/test/v2g_serviceClientDataTransmitter.c
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+#include "service/v2g_serviceClientDataTransmitter.h"
+#include "v2g_server.h"
+#include "codec/Bitstream.h"
+
+/* This method has to be implemented!
+ * Send EXI stream (outStream) to EVSE and receive response stream (inStream)*/
+int serviceDataTransmitter(uint8_t* outStream, size_t outStreamLength, uint8_t* inStream)
+{
+ /* send output stream to the underlying network to the EVSE and wait for response
+ * --> here provide data to the V2G server directly*/
+
+ testV2GService(outStream, outStreamLength, inStream);
+
+ return 0;
+}
diff --git a/src/test/v2g_serviceMethods.c b/src/test/v2g_serviceMethods.c
new file mode 100644
index 0000000..068505d
--- /dev/null
+++ b/src/test/v2g_serviceMethods.c
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2007-2010 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch.EXT@siemens.com
+ * @version 0.2
+ * @contact Joerg.Heuer@siemens.com
+ *
+ ********************************************************************/
+
+#include "service/v2g_serviceMethods.h"
+#include "service/v2g_serviceDataTypes.h"
+#include
+
+int sessionSetup(struct SessionSetupReqType* param, struct SessionSetupResType* result)
+{
+
+ printf("EVSE: sessionSetup called\n" );
+ printf("\tReceived data:\n");
+ printf("\t\t PEVStatus ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
+ printf("\t\t PEVStatus ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
+
+ /* Prepare data for PEV */
+ result->ResponseCode = OK_SessionSetup;
+ result->EVSEID.data[0]='E';
+ result->EVSEID.arraylen.data=1;
+ result->EVSEStatus.ConnectorLocked=0;
+ result->EVSEStatus.EVSEStandby=1;
+ result->EVSEStatus.FatalError=0;
+ result->EVSEStatus.PowerSwitchClosed=1;
+ result->EVSEStatus.RCD=1;
+ result->EVSEStatus.ShutDownTime=12345678L;
+ result->TCurrent=12345678L;
+
+ return 0;
+
+}
+
+int serviceDiscovery(struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result)
+{
+ return 0;
+}
+
+int selectedServicePayment(struct ServicePaymentSelectionReqType* param, struct ServicePaymentSelectionResType* result)
+{
+ return 0;
+}
+
+int paymentDetails(struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result)
+{
+ return 0;
+}
+
+int powerDiscovery(struct PowerDiscoveryReqType* param, struct PowerDiscoveryResType* result)
+{
+
+ return 0;
+}
+
+int lineLock(struct LineLockReqType* param, struct LineLockResType* result)
+{
+ return 0;
+}
+
+int powerDelivery(struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result)
+{
+ return 0;
+}
+
+int meteringStatus(struct MeteringStatusReqType* param, struct MeteringStatusResType* result)
+{
+ return 0;
+}
+
+int meteringReceipt(struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result)
+{
+ return 0;
+}