From f6072e182429fc3de209c2423fb2bf4e55a8e330 Mon Sep 17 00:00:00 2001 From: daniel_peintner Date: Thu, 16 Nov 2017 07:57:50 +0000 Subject: [PATCH] extend coders with support of collapsing (same) fragment elements IF type is the same or is an extension (see https://sourceforge.net/p/openv2g/tickets/11/) git-svn-id: https://svn.code.sf.net/p/openv2g/code/trunk@108 d9f2db14-54d0-4bde-b00c-16405c910529 --- src/din/dinEXIDatatypes.c | 2 +- src/din/dinEXIDatatypes.h | 2 +- src/din/dinEXIDatatypesDecoder.c | 487 ++++++++++++++++--- src/din/dinEXIDatatypesDecoder.h | 2 +- src/din/dinEXIDatatypesEncoder.c | 466 +++++++++++++++--- src/din/dinEXIDatatypesEncoder.h | 2 +- src/iso1/iso1EXIDatatypes.c | 2 +- src/iso1/iso1EXIDatatypes.h | 2 +- src/iso1/iso1EXIDatatypesDecoder.c | 431 ++++++++++++++--- src/iso1/iso1EXIDatatypesDecoder.h | 2 +- src/iso1/iso1EXIDatatypesEncoder.c | 432 ++++++++++++++--- src/iso1/iso1EXIDatatypesEncoder.h | 2 +- src/iso2/iso2EXIDatatypes.c | 2 +- src/iso2/iso2EXIDatatypes.h | 2 +- src/iso2/iso2EXIDatatypesDecoder.c | 697 +++++++++++++++++++++++---- src/iso2/iso2EXIDatatypesDecoder.h | 2 +- src/iso2/iso2EXIDatatypesEncoder.c | 737 +++++++++++++++++++++++++---- src/iso2/iso2EXIDatatypesEncoder.h | 2 +- 18 files changed, 2848 insertions(+), 426 deletions(-) diff --git a/src/din/dinEXIDatatypes.c b/src/din/dinEXIDatatypes.c index d113f2e..668f4af 100644 --- a/src/din/dinEXIDatatypes.c +++ b/src/din/dinEXIDatatypes.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-26 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

diff --git a/src/din/dinEXIDatatypes.h b/src/din/dinEXIDatatypes.h index 6025e62..50d4156 100644 --- a/src/din/dinEXIDatatypes.h +++ b/src/din/dinEXIDatatypes.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-26 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

diff --git a/src/din/dinEXIDatatypesDecoder.c b/src/din/dinEXIDatatypesDecoder.c index 8b80111..c05452e 100644 --- a/src/din/dinEXIDatatypesDecoder.c +++ b/src/din/dinEXIDatatypesDecoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-26 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

@@ -14580,11 +14580,13 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 2: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name AC_EVSEStatus */ + errn = decode_dinAC_EVSEStatusType(stream, &exiFrag->AC_EVSEStatus); + exiFrag->AC_EVSEStatus_isUsed = 1u; break; case 3: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name AC_EVSEStatus */ + errn = decode_dinAC_EVSEStatusType(stream, &exiFrag->AC_EVSEStatus); + exiFrag->AC_EVSEStatus_isUsed = 1u; break; case 4: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body) */ @@ -14598,11 +14600,31 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 6: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name BulkChargingComplete */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->BulkChargingComplete); + exiFrag->BulkChargingComplete_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 7: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name BulkChargingComplete */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->BulkChargingComplete); + exiFrag->BulkChargingComplete_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 8: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC) */ @@ -14636,7 +14658,23 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 12: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name Certificate */ + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->Certificate.bytesLen); + if (errn == 0) { + errn = (exiFrag->Certificate.bytesLen) <= EXIFragment_Certificate_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->Certificate.bytesLen, exiFrag->Certificate.bytes); + } + exiFrag->Certificate_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 13: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq) */ @@ -14675,11 +14713,31 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 20: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ChargingComplete */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->ChargingComplete); + exiFrag->ChargingComplete_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 21: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ChargingComplete */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->ChargingComplete); + exiFrag->ChargingComplete_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 22: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile) */ @@ -14741,15 +14799,51 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 30: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractID */ + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ContractID.charactersLen); + if (errn == 0) { + if (exiFrag->ContractID.charactersLen >= 2) { + exiFrag->ContractID.charactersLen = (uint16_t)(exiFrag->ContractID.charactersLen - 2); /* string table miss */ + errn = decodeCharacters(stream, exiFrag->ContractID.charactersLen, exiFrag->ContractID.characters, EXIFragment_ContractID_CHARACTERS_SIZE); + } else { + /* string table hit */ + errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED; + } + } + exiFrag->ContractID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 31: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractSignatureCertChain */ + errn = decode_dinCertificateChainType(stream, &exiFrag->ContractSignatureCertChain); + exiFrag->ContractSignatureCertChain_isUsed = 1u; break; case 32: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractSignatureEncryptedPrivateKey */ + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ContractSignatureEncryptedPrivateKey.bytesLen); + if (errn == 0) { + errn = (exiFrag->ContractSignatureEncryptedPrivateKey.bytesLen) <= EXIFragment_ContractSignatureEncryptedPrivateKey_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->ContractSignatureEncryptedPrivateKey.bytesLen, exiFrag->ContractSignatureEncryptedPrivateKey.bytes); + } + exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 33: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Cost) */ @@ -14783,23 +14877,43 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 39: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVSEStatus */ + errn = decode_dinDC_EVSEStatusType(stream, &exiFrag->DC_EVSEStatus); + exiFrag->DC_EVSEStatus_isUsed = 1u; break; case 40: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVSEStatus */ + errn = decode_dinDC_EVSEStatusType(stream, &exiFrag->DC_EVSEStatus); + exiFrag->DC_EVSEStatus_isUsed = 1u; break; case 41: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVStatus */ + errn = decode_dinDC_EVStatusType(stream, &exiFrag->DC_EVStatus); + exiFrag->DC_EVStatus_isUsed = 1u; break; case 42: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVStatus */ + errn = decode_dinDC_EVStatusType(stream, &exiFrag->DC_EVStatus); + exiFrag->DC_EVStatus_isUsed = 1u; break; case 43: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DHParams */ + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->DHParams.bytesLen); + if (errn == 0) { + errn = (exiFrag->DHParams.bytesLen) <= EXIFragment_DHParams_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->DHParams.bytesLen, exiFrag->DHParams.bytes); + } + exiFrag->DHParams_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 44: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue) */ @@ -14808,7 +14922,17 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 45: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DateTimeNow */ + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeInteger64(stream, &exiFrag->DateTimeNow); + exiFrag->DateTimeNow_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 46: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime) */ @@ -14945,27 +15069,33 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 59: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumCurrentLimit */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVMaximumCurrentLimit); + exiFrag->EVMaximumCurrentLimit_isUsed = 1u; break; case 60: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumCurrentLimit */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVMaximumCurrentLimit); + exiFrag->EVMaximumCurrentLimit_isUsed = 1u; break; case 61: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumPowerLimit */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVMaximumPowerLimit); + exiFrag->EVMaximumPowerLimit_isUsed = 1u; break; case 62: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumPowerLimit */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVMaximumPowerLimit); + exiFrag->EVMaximumPowerLimit_isUsed = 1u; break; case 63: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumVoltageLimit */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVMaximumVoltageLimit); + exiFrag->EVMaximumVoltageLimit_isUsed = 1u; break; case 64: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumVoltageLimit */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVMaximumVoltageLimit); + exiFrag->EVMaximumVoltageLimit_isUsed = 1u; break; case 65: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMinCurrent) */ @@ -15066,7 +15196,23 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 75: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEID */ + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->EVSEID.bytesLen); + if (errn == 0) { + errn = (exiFrag->EVSEID.bytesLen) <= EXIFragment_EVSEID_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->EVSEID.bytesLen, exiFrag->EVSEID.bytes); + } + exiFrag->EVSEID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 76: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus) */ @@ -15085,11 +15231,13 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 77: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaxCurrent */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVSEMaxCurrent); + exiFrag->EVSEMaxCurrent_isUsed = 1u; break; case 78: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaxCurrent */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVSEMaxCurrent); + exiFrag->EVSEMaxCurrent_isUsed = 1u; break; case 79: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage) */ @@ -15098,27 +15246,33 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 80: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumCurrentLimit */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVSEMaximumCurrentLimit); + exiFrag->EVSEMaximumCurrentLimit_isUsed = 1u; break; case 81: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumCurrentLimit */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVSEMaximumCurrentLimit); + exiFrag->EVSEMaximumCurrentLimit_isUsed = 1u; break; case 82: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumPowerLimit */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVSEMaximumPowerLimit); + exiFrag->EVSEMaximumPowerLimit_isUsed = 1u; break; case 83: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumPowerLimit */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVSEMaximumPowerLimit); + exiFrag->EVSEMaximumPowerLimit_isUsed = 1u; break; case 84: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumVoltageLimit */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVSEMaximumVoltageLimit); + exiFrag->EVSEMaximumVoltageLimit_isUsed = 1u; break; case 85: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumVoltageLimit */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVSEMaximumVoltageLimit); + exiFrag->EVSEMaximumVoltageLimit_isUsed = 1u; break; case 86: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent) */ @@ -15137,7 +15291,18 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 89: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSENotification) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSENotification */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 2, &uint32); + exiFrag->EVSENotification = (dinEVSENotificationType) uint32; + exiFrag->EVSENotification_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 90: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple) */ @@ -15165,11 +15330,23 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 93: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEPresentVoltage */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVSEPresentVoltage); + exiFrag->EVSEPresentVoltage_isUsed = 1u; break; case 94: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEProcessing) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEProcessing */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 1, &uint32); + exiFrag->EVSEProcessing = (dinEVSEProcessingType) uint32; + exiFrag->EVSEProcessing_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 95: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus) */ @@ -15212,11 +15389,13 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 99: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetCurrent */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVTargetCurrent); + exiFrag->EVTargetCurrent_isUsed = 1u; break; case 100: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetVoltage */ + errn = decode_dinPhysicalValueType(stream, &exiFrag->EVTargetVoltage); + exiFrag->EVTargetVoltage_isUsed = 1u; break; case 101: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType) */ @@ -15347,7 +15526,26 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 109: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name GenChallenge */ + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->GenChallenge.charactersLen); + if (errn == 0) { + if (exiFrag->GenChallenge.charactersLen >= 2) { + exiFrag->GenChallenge.charactersLen = (uint16_t)(exiFrag->GenChallenge.charactersLen - 2); /* string table miss */ + errn = decodeCharacters(stream, exiFrag->GenChallenge.charactersLen, exiFrag->GenChallenge.characters, EXIFragment_GenChallenge_CHARACTERS_SIZE); + } else { + /* string table hit */ + errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED; + } + } + exiFrag->GenChallenge_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 110: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength) */ @@ -15423,7 +15621,8 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 116: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ListOfRootCertificateIDs */ + errn = decode_dinListOfRootCertificateIDsType(stream, &exiFrag->ListOfRootCertificateIDs); + exiFrag->ListOfRootCertificateIDs_isUsed = 1u; break; case 117: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Manifest) */ @@ -15455,7 +15654,8 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 119: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name MeterInfo */ + errn = decode_dinMeterInfoType(stream, &exiFrag->MeterInfo); + exiFrag->MeterInfo_isUsed = 1u; break; case 120: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading) */ @@ -15551,7 +15751,17 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 128: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NotificationMaxDelay) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name NotificationMaxDelay */ + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger32(stream, &exiFrag->NotificationMaxDelay); + exiFrag->NotificationMaxDelay_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 129: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels) */ @@ -15640,7 +15850,23 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 135: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name PGPKeyPacket */ + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->PGPKeyPacket.bytesLen); + if (errn == 0) { + errn = (exiFrag->PGPKeyPacket.bytesLen) <= EXIFragment_PGPKeyPacket_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->PGPKeyPacket.bytesLen, exiFrag->PGPKeyPacket.bytes); + } + exiFrag->PGPKeyPacket_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 136: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMax) */ @@ -15692,7 +15918,17 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 142: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ParameterSetID */ + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeInteger16(stream, &exiFrag->ParameterSetID); + exiFrag->ParameterSetID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 143: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq) */ @@ -15872,7 +16108,18 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 163: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ResponseCode */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 5, &uint32); + exiFrag->ResponseCode = (dinresponseCodeType) uint32; + exiFrag->ResponseCode_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 164: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod) */ @@ -15928,11 +16175,31 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 169: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleTupleID */ + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeInteger16(stream, &exiFrag->SAScheduleTupleID); + exiFrag->SAScheduleTupleID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 170: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleTupleID */ + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeInteger16(stream, &exiFrag->SAScheduleTupleID); + exiFrag->SAScheduleTupleID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 171: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules) */ @@ -16063,11 +16330,33 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 183: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceCategory */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 2, &uint32); + exiFrag->ServiceCategory = (dinserviceCategoryType) uint32; + exiFrag->ServiceCategory_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 184: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceCategory */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 2, &uint32); + exiFrag->ServiceCategory = (dinserviceCategoryType) uint32; + exiFrag->ServiceCategory_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 185: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge) */ @@ -16096,11 +16385,31 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 190: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceID */ + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ServiceID); + exiFrag->ServiceID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 191: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceID */ + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ServiceID); + exiFrag->ServiceID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 192: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList) */ @@ -16147,11 +16456,49 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 197: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceScope */ + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ServiceScope.charactersLen); + if (errn == 0) { + if (exiFrag->ServiceScope.charactersLen >= 2) { + exiFrag->ServiceScope.charactersLen = (uint16_t)(exiFrag->ServiceScope.charactersLen - 2); /* string table miss */ + errn = decodeCharacters(stream, exiFrag->ServiceScope.charactersLen, exiFrag->ServiceScope.characters, EXIFragment_ServiceScope_CHARACTERS_SIZE); + } else { + /* string table hit */ + errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED; + } + } + exiFrag->ServiceScope_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 198: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceScope */ + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ServiceScope.charactersLen); + if (errn == 0) { + if (exiFrag->ServiceScope.charactersLen >= 2) { + exiFrag->ServiceScope.charactersLen = (uint16_t)(exiFrag->ServiceScope.charactersLen - 2); /* string table miss */ + errn = decodeCharacters(stream, exiFrag->ServiceScope.charactersLen, exiFrag->ServiceScope.characters, EXIFragment_ServiceScope_CHARACTERS_SIZE); + } else { + /* string table hit */ + errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED; + } + } + exiFrag->ServiceScope_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 199: /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag) */ @@ -16160,11 +16507,43 @@ int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { break; case 200: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SessionID */ + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->SessionID.bytesLen); + if (errn == 0) { + errn = (exiFrag->SessionID.bytesLen) <= EXIFragment_SessionID_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->SessionID.bytesLen, exiFrag->SessionID.bytes); + } + exiFrag->SessionID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 201: /* START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SessionID */ + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->SessionID.bytesLen); + if (errn == 0) { + errn = (exiFrag->SessionID.bytesLen) <= EXIFragment_SessionID_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->SessionID.bytesLen, exiFrag->SessionID.bytes); + } + exiFrag->SessionID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 202: /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq) */ diff --git a/src/din/dinEXIDatatypesDecoder.h b/src/din/dinEXIDatatypesDecoder.h index 69d9cd6..26988c6 100644 --- a/src/din/dinEXIDatatypesDecoder.h +++ b/src/din/dinEXIDatatypesDecoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-26 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

diff --git a/src/din/dinEXIDatatypesEncoder.c b/src/din/dinEXIDatatypesEncoder.c index 544dd76..3904f3d 100644 --- a/src/din/dinEXIDatatypesEncoder.c +++ b/src/din/dinEXIDatatypesEncoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-26 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

@@ -10585,10 +10585,16 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->AC_EVSEStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name AC_EVSEStatus */ + errn = encodeNBitUnsignedInteger(stream, 8, 2); + if(errn == 0) { + errn = encode_dinAC_EVSEStatusType(stream, &exiFrag->AC_EVSEStatus ); + } } else if ( exiFrag->AC_EVSEStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name AC_EVSEStatus */ + errn = encodeNBitUnsignedInteger(stream, 8, 3); + if(errn == 0) { + errn = encode_dinAC_EVSEStatusType(stream, &exiFrag->AC_EVSEStatus ); + } } else if ( exiFrag->Body_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body) */ errn = encodeNBitUnsignedInteger(stream, 8, 4); @@ -10603,10 +10609,28 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->BulkChargingComplete_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name BulkChargingComplete */ + errn = encodeNBitUnsignedInteger(stream, 8, 6); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->BulkChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->BulkChargingComplete_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name BulkChargingComplete */ + errn = encodeNBitUnsignedInteger(stream, 8, 7); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->BulkChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->BulkSOC_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC) */ errn = encodeNBitUnsignedInteger(stream, 8, 8); @@ -10639,7 +10663,19 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->Certificate_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name Certificate */ + errn = encodeNBitUnsignedInteger(stream, 8, 12); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->Certificate.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->Certificate.bytes, exiFrag->Certificate.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->CertificateInstallationReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq) */ errn = encodeNBitUnsignedInteger(stream, 8, 13); @@ -10684,10 +10720,28 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->ChargingComplete_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ChargingComplete */ + errn = encodeNBitUnsignedInteger(stream, 8, 20); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->ChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ChargingComplete_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ChargingComplete */ + errn = encodeNBitUnsignedInteger(stream, 8, 21); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->ChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ChargingProfile_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile) */ errn = encodeNBitUnsignedInteger(stream, 8, 22); @@ -10750,13 +10804,41 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->ContractID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractID */ + errn = encodeNBitUnsignedInteger(stream, 8, 30); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->ContractID.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, exiFrag->ContractID.characters, exiFrag->ContractID.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ContractSignatureCertChain_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractSignatureCertChain */ + errn = encodeNBitUnsignedInteger(stream, 8, 31); + if(errn == 0) { + errn = encode_dinCertificateChainType(stream, &exiFrag->ContractSignatureCertChain ); + } } else if ( exiFrag->ContractSignatureEncryptedPrivateKey_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractSignatureEncryptedPrivateKey */ + errn = encodeNBitUnsignedInteger(stream, 8, 32); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->ContractSignatureEncryptedPrivateKey.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->ContractSignatureEncryptedPrivateKey.bytes, exiFrag->ContractSignatureEncryptedPrivateKey.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->Cost_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Cost) */ errn = encodeNBitUnsignedInteger(stream, 8, 33); @@ -10795,19 +10877,43 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->DC_EVSEStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVSEStatus */ + errn = encodeNBitUnsignedInteger(stream, 8, 39); + if(errn == 0) { + errn = encode_dinDC_EVSEStatusType(stream, &exiFrag->DC_EVSEStatus ); + } } else if ( exiFrag->DC_EVSEStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVSEStatus */ + errn = encodeNBitUnsignedInteger(stream, 8, 40); + if(errn == 0) { + errn = encode_dinDC_EVSEStatusType(stream, &exiFrag->DC_EVSEStatus ); + } } else if ( exiFrag->DC_EVStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVStatus */ + errn = encodeNBitUnsignedInteger(stream, 8, 41); + if(errn == 0) { + errn = encode_dinDC_EVStatusType(stream, &exiFrag->DC_EVStatus ); + } } else if ( exiFrag->DC_EVStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVStatus */ + errn = encodeNBitUnsignedInteger(stream, 8, 42); + if(errn == 0) { + errn = encode_dinDC_EVStatusType(stream, &exiFrag->DC_EVStatus ); + } } else if ( exiFrag->DHParams_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DHParams */ + errn = encodeNBitUnsignedInteger(stream, 8, 43); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->DHParams.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->DHParams.bytes, exiFrag->DHParams.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->DSAKeyValue_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue) */ errn = encodeNBitUnsignedInteger(stream, 8, 44); @@ -10816,7 +10922,16 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->DateTimeNow_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DateTimeNow */ + errn = encodeNBitUnsignedInteger(stream, 8, 45); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger64(stream, exiFrag->DateTimeNow); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->DepartureTime_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime) */ errn = encodeNBitUnsignedInteger(stream, 8, 46); @@ -10939,22 +11054,40 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->EVMaximumCurrentLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumCurrentLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 59); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVMaximumCurrentLimit ); + } } else if ( exiFrag->EVMaximumCurrentLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumCurrentLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 60); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVMaximumCurrentLimit ); + } } else if ( exiFrag->EVMaximumPowerLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumPowerLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 61); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVMaximumPowerLimit ); + } } else if ( exiFrag->EVMaximumPowerLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumPowerLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 62); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVMaximumPowerLimit ); + } } else if ( exiFrag->EVMaximumVoltageLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumVoltageLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 63); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVMaximumVoltageLimit ); + } } else if ( exiFrag->EVMaximumVoltageLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumVoltageLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 64); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVMaximumVoltageLimit ); + } } else if ( exiFrag->EVMinCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMinCurrent) */ errn = encodeNBitUnsignedInteger(stream, 8, 65); @@ -11047,7 +11180,19 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->EVSEID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEID */ + errn = encodeNBitUnsignedInteger(stream, 8, 75); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->EVSEID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->EVSEID.bytes, exiFrag->EVSEID.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSEIsolationStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus) */ errn = encodeNBitUnsignedInteger(stream, 8, 76); @@ -11062,10 +11207,16 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->EVSEMaxCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaxCurrent */ + errn = encodeNBitUnsignedInteger(stream, 8, 77); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVSEMaxCurrent ); + } } else if ( exiFrag->EVSEMaxCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaxCurrent */ + errn = encodeNBitUnsignedInteger(stream, 8, 78); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVSEMaxCurrent ); + } } else if ( exiFrag->EVSEMaxVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage) */ errn = encodeNBitUnsignedInteger(stream, 8, 79); @@ -11074,22 +11225,40 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->EVSEMaximumCurrentLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumCurrentLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 80); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVSEMaximumCurrentLimit ); + } } else if ( exiFrag->EVSEMaximumCurrentLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumCurrentLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 81); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVSEMaximumCurrentLimit ); + } } else if ( exiFrag->EVSEMaximumPowerLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumPowerLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 82); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVSEMaximumPowerLimit ); + } } else if ( exiFrag->EVSEMaximumPowerLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumPowerLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 83); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVSEMaximumPowerLimit ); + } } else if ( exiFrag->EVSEMaximumVoltageLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumVoltageLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 84); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVSEMaximumVoltageLimit ); + } } else if ( exiFrag->EVSEMaximumVoltageLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumVoltageLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 85); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVSEMaximumVoltageLimit ); + } } else if ( exiFrag->EVSEMinCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent) */ errn = encodeNBitUnsignedInteger(stream, 8, 86); @@ -11110,7 +11279,16 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->EVSENotification_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSENotification) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSENotification */ + errn = encodeNBitUnsignedInteger(stream, 8, 89); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, exiFrag->EVSENotification); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSEPeakCurrentRipple_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple) */ errn = encodeNBitUnsignedInteger(stream, 8, 90); @@ -11137,10 +11315,22 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->EVSEPresentVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEPresentVoltage */ + errn = encodeNBitUnsignedInteger(stream, 8, 93); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVSEPresentVoltage ); + } } else if ( exiFrag->EVSEProcessing_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEProcessing) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEProcessing */ + errn = encodeNBitUnsignedInteger(stream, 8, 94); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 1, exiFrag->EVSEProcessing); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSEStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus) */ errn = encodeNBitUnsignedInteger(stream, 8, 95); @@ -11179,10 +11369,16 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->EVTargetCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetCurrent */ + errn = encodeNBitUnsignedInteger(stream, 8, 99); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVTargetCurrent ); + } } else if ( exiFrag->EVTargetVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetVoltage */ + errn = encodeNBitUnsignedInteger(stream, 8, 100); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &exiFrag->EVTargetVoltage ); + } } else if ( exiFrag->EnergyTransferType_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType) */ errn = encodeNBitUnsignedInteger(stream, 8, 101); @@ -11285,7 +11481,20 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->GenChallenge_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name GenChallenge */ + errn = encodeNBitUnsignedInteger(stream, 8, 109); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->GenChallenge.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, exiFrag->GenChallenge.characters, exiFrag->GenChallenge.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->HMACOutputLength_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength) */ errn = encodeNBitUnsignedInteger(stream, 8, 110); @@ -11349,7 +11558,10 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->ListOfRootCertificateIDs_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ListOfRootCertificateIDs */ + errn = encodeNBitUnsignedInteger(stream, 8, 116); + if(errn == 0) { + errn = encode_dinListOfRootCertificateIDsType(stream, &exiFrag->ListOfRootCertificateIDs ); + } } else if ( exiFrag->Manifest_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Manifest) */ errn = encodeNBitUnsignedInteger(stream, 8, 117); @@ -11374,7 +11586,10 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->MeterInfo_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name MeterInfo */ + errn = encodeNBitUnsignedInteger(stream, 8, 119); + if(errn == 0) { + errn = encode_dinMeterInfoType(stream, &exiFrag->MeterInfo ); + } } else if ( exiFrag->MeterReading_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading) */ errn = encodeNBitUnsignedInteger(stream, 8, 120); @@ -11456,7 +11671,16 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->NotificationMaxDelay_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NotificationMaxDelay) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name NotificationMaxDelay */ + errn = encodeNBitUnsignedInteger(stream, 8, 128); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger32(stream, exiFrag->NotificationMaxDelay); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->NumEPriceLevels_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels) */ errn = encodeNBitUnsignedInteger(stream, 8, 129); @@ -11528,7 +11752,19 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->PGPKeyPacket_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name PGPKeyPacket */ + errn = encodeNBitUnsignedInteger(stream, 8, 135); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->PGPKeyPacket.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->PGPKeyPacket.bytes, exiFrag->PGPKeyPacket.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->PMax_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMax) */ errn = encodeNBitUnsignedInteger(stream, 8, 136); @@ -11579,7 +11815,16 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->ParameterSetID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ParameterSetID */ + errn = encodeNBitUnsignedInteger(stream, 8, 142); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, exiFrag->ParameterSetID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->PaymentDetailsReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq) */ errn = encodeNBitUnsignedInteger(stream, 8, 143); @@ -11750,7 +11995,16 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->ResponseCode_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ResponseCode */ + errn = encodeNBitUnsignedInteger(stream, 8, 163); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, exiFrag->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->RetrievalMethod_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod) */ errn = encodeNBitUnsignedInteger(stream, 8, 164); @@ -11799,10 +12053,28 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->SAScheduleTupleID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleTupleID */ + errn = encodeNBitUnsignedInteger(stream, 8, 169); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, exiFrag->SAScheduleTupleID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SAScheduleTupleID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleTupleID */ + errn = encodeNBitUnsignedInteger(stream, 8, 170); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, exiFrag->SAScheduleTupleID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SASchedules_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules) */ errn = encodeNBitUnsignedInteger(stream, 8, 171); @@ -11917,10 +12189,28 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->ServiceCategory_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceCategory */ + errn = encodeNBitUnsignedInteger(stream, 8, 183); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, exiFrag->ServiceCategory); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceCategory_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceCategory */ + errn = encodeNBitUnsignedInteger(stream, 8, 184); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, exiFrag->ServiceCategory); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceCharge_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCharge) */ errn = encodeNBitUnsignedInteger(stream, 8, 185); @@ -11953,10 +12243,28 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->ServiceID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceID */ + errn = encodeNBitUnsignedInteger(stream, 8, 190); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, exiFrag->ServiceID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceID */ + errn = encodeNBitUnsignedInteger(stream, 8, 191); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, exiFrag->ServiceID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceList_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList) */ errn = encodeNBitUnsignedInteger(stream, 8, 192); @@ -11999,10 +12307,36 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->ServiceScope_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceScope */ + errn = encodeNBitUnsignedInteger(stream, 8, 197); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->ServiceScope.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, exiFrag->ServiceScope.characters, exiFrag->ServiceScope.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceScope_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceScope */ + errn = encodeNBitUnsignedInteger(stream, 8, 198); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->ServiceScope.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, exiFrag->ServiceScope.characters, exiFrag->ServiceScope.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceTag_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag) */ errn = encodeNBitUnsignedInteger(stream, 8, 199); @@ -12011,10 +12345,34 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } } else if ( exiFrag->SessionID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SessionID */ + errn = encodeNBitUnsignedInteger(stream, 8, 200); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->SessionID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->SessionID.bytes, exiFrag->SessionID.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SessionID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SessionID */ + errn = encodeNBitUnsignedInteger(stream, 8, 201); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->SessionID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->SessionID.bytes, exiFrag->SessionID.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SessionSetupReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq) */ errn = encodeNBitUnsignedInteger(stream, 8, 202); diff --git a/src/din/dinEXIDatatypesEncoder.h b/src/din/dinEXIDatatypesEncoder.h index de112cc..f10a058 100644 --- a/src/din/dinEXIDatatypesEncoder.h +++ b/src/din/dinEXIDatatypesEncoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-26 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

diff --git a/src/iso1/iso1EXIDatatypes.c b/src/iso1/iso1EXIDatatypes.c index 60ee629..333b892 100644 --- a/src/iso1/iso1EXIDatatypes.c +++ b/src/iso1/iso1EXIDatatypes.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-19 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

diff --git a/src/iso1/iso1EXIDatatypes.h b/src/iso1/iso1EXIDatatypes.h index 4ac87cf..e4688f8 100644 --- a/src/iso1/iso1EXIDatatypes.h +++ b/src/iso1/iso1EXIDatatypes.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-19 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

diff --git a/src/iso1/iso1EXIDatatypesDecoder.c b/src/iso1/iso1EXIDatatypesDecoder.c index 29cd50a..5ea3e34 100644 --- a/src/iso1/iso1EXIDatatypesDecoder.c +++ b/src/iso1/iso1EXIDatatypesDecoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-19 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

@@ -16901,11 +16901,13 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 2: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name AC_EVSEStatus */ + errn = decode_iso1AC_EVSEStatusType(stream, &exiFrag->AC_EVSEStatus); + exiFrag->AC_EVSEStatus_isUsed = 1u; break; case 3: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name AC_EVSEStatus */ + errn = decode_iso1AC_EVSEStatusType(stream, &exiFrag->AC_EVSEStatus); + exiFrag->AC_EVSEStatus_isUsed = 1u; break; case 4: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AuthorizationReq) */ @@ -16929,11 +16931,31 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 8: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}BulkChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name BulkChargingComplete */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->BulkChargingComplete); + exiFrag->BulkChargingComplete_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 9: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}BulkChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name BulkChargingComplete */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->BulkChargingComplete); + exiFrag->BulkChargingComplete_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 10: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}BulkSOC) */ @@ -16967,7 +16989,23 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 14: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Certificate) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name Certificate */ + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->Certificate.bytesLen); + if (errn == 0) { + errn = (exiFrag->Certificate.bytesLen) <= EXIFragment_Certificate_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->Certificate.bytesLen, exiFrag->Certificate.bytes); + } + exiFrag->Certificate_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 15: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateInstallationReq) */ @@ -17021,11 +17059,31 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 23: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ChargingComplete */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->ChargingComplete); + exiFrag->ChargingComplete_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 24: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ChargingComplete */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->ChargingComplete); + exiFrag->ChargingComplete_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 25: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingProfile) */ @@ -17098,11 +17156,13 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 33: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ContractSignatureCertChain) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractSignatureCertChain */ + errn = decode_iso1CertificateChainType(stream, &exiFrag->ContractSignatureCertChain); + exiFrag->ContractSignatureCertChain_isUsed = 1u; break; case 34: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ContractSignatureEncryptedPrivateKey) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractSignatureEncryptedPrivateKey */ + errn = decode_iso1ContractSignatureEncryptedPrivateKeyType(stream, &exiFrag->ContractSignatureEncryptedPrivateKey); + exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 1u; break; case 35: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Cost) */ @@ -17136,23 +17196,28 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 41: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVSEStatus */ + errn = decode_iso1DC_EVSEStatusType(stream, &exiFrag->DC_EVSEStatus); + exiFrag->DC_EVSEStatus_isUsed = 1u; break; case 42: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVSEStatus */ + errn = decode_iso1DC_EVSEStatusType(stream, &exiFrag->DC_EVSEStatus); + exiFrag->DC_EVSEStatus_isUsed = 1u; break; case 43: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DC_EVStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVStatus */ + errn = decode_iso1DC_EVStatusType(stream, &exiFrag->DC_EVStatus); + exiFrag->DC_EVStatus_isUsed = 1u; break; case 44: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVStatus */ + errn = decode_iso1DC_EVStatusType(stream, &exiFrag->DC_EVStatus); + exiFrag->DC_EVStatus_isUsed = 1u; break; case 45: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DHpublickey) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DHpublickey */ + errn = decode_iso1DiffieHellmanPublickeyType(stream, &exiFrag->DHpublickey); + exiFrag->DHpublickey_isUsed = 1u; break; case 46: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue) */ @@ -17280,27 +17345,33 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 59: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumCurrentLimit */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVMaximumCurrentLimit); + exiFrag->EVMaximumCurrentLimit_isUsed = 1u; break; case 60: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumCurrentLimit */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVMaximumCurrentLimit); + exiFrag->EVMaximumCurrentLimit_isUsed = 1u; break; case 61: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumPowerLimit */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVMaximumPowerLimit); + exiFrag->EVMaximumPowerLimit_isUsed = 1u; break; case 62: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumPowerLimit */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVMaximumPowerLimit); + exiFrag->EVMaximumPowerLimit_isUsed = 1u; break; case 63: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumVoltageLimit */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVMaximumVoltageLimit); + exiFrag->EVMaximumVoltageLimit_isUsed = 1u; break; case 64: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumVoltageLimit */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVMaximumVoltageLimit); + exiFrag->EVMaximumVoltageLimit_isUsed = 1u; break; case 65: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMinCurrent) */ @@ -17372,7 +17443,26 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 73: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEID */ + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->EVSEID.charactersLen); + if (errn == 0) { + if (exiFrag->EVSEID.charactersLen >= 2) { + exiFrag->EVSEID.charactersLen = (uint16_t)(exiFrag->EVSEID.charactersLen - 2); /* string table miss */ + errn = decodeCharacters(stream, exiFrag->EVSEID.charactersLen, exiFrag->EVSEID.characters, EXIFragment_EVSEID_CHARACTERS_SIZE); + } else { + /* string table hit */ + errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED; + } + } + exiFrag->EVSEID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 74: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEIsolationStatus) */ @@ -17391,35 +17481,43 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 75: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaxCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaxCurrent */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaxCurrent); + exiFrag->EVSEMaxCurrent_isUsed = 1u; break; case 76: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaxCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaxCurrent */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaxCurrent); + exiFrag->EVSEMaxCurrent_isUsed = 1u; break; case 77: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumCurrentLimit */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaximumCurrentLimit); + exiFrag->EVSEMaximumCurrentLimit_isUsed = 1u; break; case 78: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumCurrentLimit */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaximumCurrentLimit); + exiFrag->EVSEMaximumCurrentLimit_isUsed = 1u; break; case 79: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumPowerLimit */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaximumPowerLimit); + exiFrag->EVSEMaximumPowerLimit_isUsed = 1u; break; case 80: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumPowerLimit */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaximumPowerLimit); + exiFrag->EVSEMaximumPowerLimit_isUsed = 1u; break; case 81: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumVoltageLimit */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaximumVoltageLimit); + exiFrag->EVSEMaximumVoltageLimit_isUsed = 1u; break; case 82: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumVoltageLimit */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaximumVoltageLimit); + exiFrag->EVSEMaximumVoltageLimit_isUsed = 1u; break; case 83: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMinimumCurrentLimit) */ @@ -17477,11 +17575,23 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 90: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPresentVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEPresentVoltage */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVSEPresentVoltage); + exiFrag->EVSEPresentVoltage_isUsed = 1u; break; case 91: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEProcessing) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEProcessing */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 2, &uint32); + exiFrag->EVSEProcessing = (iso1EVSEProcessingType) uint32; + exiFrag->EVSEProcessing_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 92: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEStatus) */ @@ -17505,7 +17615,17 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 94: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSETimeStamp) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSETimeStamp */ + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeInteger64(stream, &exiFrag->EVSETimeStamp); + exiFrag->EVSETimeStamp_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 95: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEVoltageLimitAchieved) */ @@ -17528,11 +17648,13 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 97: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVTargetCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetCurrent */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVTargetCurrent); + exiFrag->EVTargetCurrent_isUsed = 1u; break; case 98: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVTargetVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetVoltage */ + errn = decode_iso1PhysicalValueType(stream, &exiFrag->EVTargetVoltage); + exiFrag->EVTargetVoltage_isUsed = 1u; break; case 99: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EnergyTransferMode) */ @@ -17663,7 +17785,23 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 107: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}GenChallenge) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name GenChallenge */ + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->GenChallenge.bytesLen); + if (errn == 0) { + errn = (exiFrag->GenChallenge.bytesLen) <= EXIFragment_GenChallenge_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->GenChallenge.bytesLen, exiFrag->GenChallenge.bytes); + } + exiFrag->GenChallenge_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 108: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength) */ @@ -17739,7 +17877,8 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 114: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ListOfRootCertificateIDs) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ListOfRootCertificateIDs */ + errn = decode_iso1ListOfRootCertificateIDsType(stream, &exiFrag->ListOfRootCertificateIDs); + exiFrag->ListOfRootCertificateIDs_isUsed = 1u; break; case 115: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Manifest) */ @@ -17785,7 +17924,8 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 118: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeterInfo) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name MeterInfo */ + errn = decode_iso1MeterInfoType(stream, &exiFrag->MeterInfo); + exiFrag->MeterInfo_isUsed = 1u; break; case 119: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterReading) */ @@ -17989,7 +18129,23 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 134: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name PGPKeyPacket */ + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->PGPKeyPacket.bytesLen); + if (errn == 0) { + errn = (exiFrag->PGPKeyPacket.bytesLen) <= EXIFragment_PGPKeyPacket_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->PGPKeyPacket.bytesLen, exiFrag->PGPKeyPacket.bytes); + } + exiFrag->PGPKeyPacket_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 135: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMax) */ @@ -18018,7 +18174,17 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 140: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ParameterSetID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ParameterSetID */ + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeInteger16(stream, &exiFrag->ParameterSetID); + exiFrag->ParameterSetID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 141: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentDetailsReq) */ @@ -18146,7 +18312,17 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 156: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ReceiptRequired) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ReceiptRequired */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->ReceiptRequired); + exiFrag->ReceiptRequired_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 157: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference) */ @@ -18185,7 +18361,18 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 162: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ResponseCode) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ResponseCode */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 5, &uint32); + exiFrag->ResponseCode = (iso1responseCodeType) uint32; + exiFrag->ResponseCode_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 163: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod) */ @@ -18213,7 +18400,8 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 166: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SAProvisioningCertificateChain) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAProvisioningCertificateChain */ + errn = decode_iso1CertificateChainType(stream, &exiFrag->SAProvisioningCertificateChain); + exiFrag->SAProvisioningCertificateChain_isUsed = 1u; break; case 167: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleList) */ @@ -18227,11 +18415,33 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 169: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SAScheduleTupleID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleTupleID */ + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 8, &(uint32)); + exiFrag->SAScheduleTupleID = (uint8_t)(uint32 + 1); + exiFrag->SAScheduleTupleID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 170: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTupleID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleTupleID */ + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 8, &(uint32)); + exiFrag->SAScheduleTupleID = (uint8_t)(uint32 + 1); + exiFrag->SAScheduleTupleID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 171: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SASchedules) */ @@ -18363,11 +18573,33 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 183: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceCategory) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceCategory */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 2, &uint32); + exiFrag->ServiceCategory = (iso1serviceCategoryType) uint32; + exiFrag->ServiceCategory_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 184: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceCategory) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceCategory */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 2, &uint32); + exiFrag->ServiceCategory = (iso1serviceCategoryType) uint32; + exiFrag->ServiceCategory_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 185: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDetailReq) */ @@ -18391,11 +18623,31 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 189: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceID */ + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ServiceID); + exiFrag->ServiceID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 190: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceID */ + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ServiceID); + exiFrag->ServiceID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 191: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceList) */ @@ -18432,19 +18684,89 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 194: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceScope) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceScope */ + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ServiceScope.charactersLen); + if (errn == 0) { + if (exiFrag->ServiceScope.charactersLen >= 2) { + exiFrag->ServiceScope.charactersLen = (uint16_t)(exiFrag->ServiceScope.charactersLen - 2); /* string table miss */ + errn = decodeCharacters(stream, exiFrag->ServiceScope.charactersLen, exiFrag->ServiceScope.characters, EXIFragment_ServiceScope_CHARACTERS_SIZE); + } else { + /* string table hit */ + errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED; + } + } + exiFrag->ServiceScope_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 195: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceScope) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceScope */ + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ServiceScope.charactersLen); + if (errn == 0) { + if (exiFrag->ServiceScope.charactersLen >= 2) { + exiFrag->ServiceScope.charactersLen = (uint16_t)(exiFrag->ServiceScope.charactersLen - 2); /* string table miss */ + errn = decodeCharacters(stream, exiFrag->ServiceScope.charactersLen, exiFrag->ServiceScope.characters, EXIFragment_ServiceScope_CHARACTERS_SIZE); + } else { + /* string table hit */ + errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED; + } + } + exiFrag->ServiceScope_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 196: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SessionID */ + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->SessionID.bytesLen); + if (errn == 0) { + errn = (exiFrag->SessionID.bytesLen) <= EXIFragment_SessionID_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->SessionID.bytesLen, exiFrag->SessionID.bytes); + } + exiFrag->SessionID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 197: /* START_ELEMENT({urn:iso:15118:2:2013:MsgHeader}SessionID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SessionID */ + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->SessionID.bytesLen); + if (errn == 0) { + errn = (exiFrag->SessionID.bytesLen) <= EXIFragment_SessionID_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->SessionID.bytesLen, exiFrag->SessionID.bytes); + } + exiFrag->SessionID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 198: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionSetupReq) */ @@ -18861,7 +19183,8 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 236: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}eMAID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name eMAID */ + errn = decode_iso1EMAIDType(stream, &exiFrag->eMAID); + exiFrag->eMAID_isUsed = 1u; break; case 237: /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}intValue) */ diff --git a/src/iso1/iso1EXIDatatypesDecoder.h b/src/iso1/iso1EXIDatatypesDecoder.h index 369a7b2..63b7496 100644 --- a/src/iso1/iso1EXIDatatypesDecoder.h +++ b/src/iso1/iso1EXIDatatypesDecoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-19 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

diff --git a/src/iso1/iso1EXIDatatypesEncoder.c b/src/iso1/iso1EXIDatatypesEncoder.c index 59a6d99..2b41bf1 100644 --- a/src/iso1/iso1EXIDatatypesEncoder.c +++ b/src/iso1/iso1EXIDatatypesEncoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-19 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

@@ -12339,10 +12339,16 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->AC_EVSEStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name AC_EVSEStatus */ + errn = encodeNBitUnsignedInteger(stream, 8, 2); + if(errn == 0) { + errn = encode_iso1AC_EVSEStatusType(stream, &exiFrag->AC_EVSEStatus ); + } } else if ( exiFrag->AC_EVSEStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name AC_EVSEStatus */ + errn = encodeNBitUnsignedInteger(stream, 8, 3); + if(errn == 0) { + errn = encode_iso1AC_EVSEStatusType(stream, &exiFrag->AC_EVSEStatus ); + } } else if ( exiFrag->AuthorizationReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AuthorizationReq) */ errn = encodeNBitUnsignedInteger(stream, 8, 4); @@ -12369,10 +12375,28 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->BulkChargingComplete_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}BulkChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name BulkChargingComplete */ + errn = encodeNBitUnsignedInteger(stream, 8, 8); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->BulkChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->BulkChargingComplete_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}BulkChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name BulkChargingComplete */ + errn = encodeNBitUnsignedInteger(stream, 8, 9); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->BulkChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->BulkSOC_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}BulkSOC) */ errn = encodeNBitUnsignedInteger(stream, 8, 10); @@ -12405,7 +12429,19 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->Certificate_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Certificate) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name Certificate */ + errn = encodeNBitUnsignedInteger(stream, 8, 14); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->Certificate.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->Certificate.bytes, exiFrag->Certificate.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->CertificateInstallationReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateInstallationReq) */ errn = encodeNBitUnsignedInteger(stream, 8, 15); @@ -12462,10 +12498,28 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->ChargingComplete_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ChargingComplete */ + errn = encodeNBitUnsignedInteger(stream, 8, 23); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->ChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ChargingComplete_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingComplete) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ChargingComplete */ + errn = encodeNBitUnsignedInteger(stream, 8, 24); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->ChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ChargingProfile_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingProfile) */ errn = encodeNBitUnsignedInteger(stream, 8, 25); @@ -12534,10 +12588,16 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->ContractSignatureCertChain_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ContractSignatureCertChain) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractSignatureCertChain */ + errn = encodeNBitUnsignedInteger(stream, 8, 33); + if(errn == 0) { + errn = encode_iso1CertificateChainType(stream, &exiFrag->ContractSignatureCertChain ); + } } else if ( exiFrag->ContractSignatureEncryptedPrivateKey_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ContractSignatureEncryptedPrivateKey) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractSignatureEncryptedPrivateKey */ + errn = encodeNBitUnsignedInteger(stream, 8, 34); + if(errn == 0) { + errn = encode_iso1ContractSignatureEncryptedPrivateKeyType(stream, &exiFrag->ContractSignatureEncryptedPrivateKey ); + } } else if ( exiFrag->Cost_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Cost) */ errn = encodeNBitUnsignedInteger(stream, 8, 35); @@ -12576,19 +12636,34 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->DC_EVSEStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVSEStatus */ + errn = encodeNBitUnsignedInteger(stream, 8, 41); + if(errn == 0) { + errn = encode_iso1DC_EVSEStatusType(stream, &exiFrag->DC_EVSEStatus ); + } } else if ( exiFrag->DC_EVSEStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVSEStatus */ + errn = encodeNBitUnsignedInteger(stream, 8, 42); + if(errn == 0) { + errn = encode_iso1DC_EVSEStatusType(stream, &exiFrag->DC_EVSEStatus ); + } } else if ( exiFrag->DC_EVStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DC_EVStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVStatus */ + errn = encodeNBitUnsignedInteger(stream, 8, 43); + if(errn == 0) { + errn = encode_iso1DC_EVStatusType(stream, &exiFrag->DC_EVStatus ); + } } else if ( exiFrag->DC_EVStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DC_EVStatus */ + errn = encodeNBitUnsignedInteger(stream, 8, 44); + if(errn == 0) { + errn = encode_iso1DC_EVStatusType(stream, &exiFrag->DC_EVStatus ); + } } else if ( exiFrag->DHpublickey_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DHpublickey) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DHpublickey */ + errn = encodeNBitUnsignedInteger(stream, 8, 45); + if(errn == 0) { + errn = encode_iso1DiffieHellmanPublickeyType(stream, &exiFrag->DHpublickey ); + } } else if ( exiFrag->DSAKeyValue_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue) */ errn = encodeNBitUnsignedInteger(stream, 8, 46); @@ -12705,22 +12780,40 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->EVMaximumCurrentLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumCurrentLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 59); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVMaximumCurrentLimit ); + } } else if ( exiFrag->EVMaximumCurrentLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumCurrentLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 60); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVMaximumCurrentLimit ); + } } else if ( exiFrag->EVMaximumPowerLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumPowerLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 61); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVMaximumPowerLimit ); + } } else if ( exiFrag->EVMaximumPowerLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumPowerLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 62); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVMaximumPowerLimit ); + } } else if ( exiFrag->EVMaximumVoltageLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumVoltageLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 63); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVMaximumVoltageLimit ); + } } else if ( exiFrag->EVMaximumVoltageLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumVoltageLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 64); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVMaximumVoltageLimit ); + } } else if ( exiFrag->EVMinCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMinCurrent) */ errn = encodeNBitUnsignedInteger(stream, 8, 65); @@ -12789,7 +12882,20 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->EVSEID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEID */ + errn = encodeNBitUnsignedInteger(stream, 8, 73); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->EVSEID.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, exiFrag->EVSEID.characters, exiFrag->EVSEID.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSEIsolationStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEIsolationStatus) */ errn = encodeNBitUnsignedInteger(stream, 8, 74); @@ -12804,28 +12910,52 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->EVSEMaxCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaxCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaxCurrent */ + errn = encodeNBitUnsignedInteger(stream, 8, 75); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaxCurrent ); + } } else if ( exiFrag->EVSEMaxCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaxCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaxCurrent */ + errn = encodeNBitUnsignedInteger(stream, 8, 76); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaxCurrent ); + } } else if ( exiFrag->EVSEMaximumCurrentLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumCurrentLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 77); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaximumCurrentLimit ); + } } else if ( exiFrag->EVSEMaximumCurrentLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumCurrentLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumCurrentLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 78); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaximumCurrentLimit ); + } } else if ( exiFrag->EVSEMaximumPowerLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumPowerLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 79); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaximumPowerLimit ); + } } else if ( exiFrag->EVSEMaximumPowerLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumPowerLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumPowerLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 80); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaximumPowerLimit ); + } } else if ( exiFrag->EVSEMaximumVoltageLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumVoltageLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 81); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaximumVoltageLimit ); + } } else if ( exiFrag->EVSEMaximumVoltageLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumVoltageLimit) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumVoltageLimit */ + errn = encodeNBitUnsignedInteger(stream, 8, 82); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVSEMaximumVoltageLimit ); + } } else if ( exiFrag->EVSEMinimumCurrentLimit_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMinimumCurrentLimit) */ errn = encodeNBitUnsignedInteger(stream, 8, 83); @@ -12882,10 +13012,22 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->EVSEPresentVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPresentVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEPresentVoltage */ + errn = encodeNBitUnsignedInteger(stream, 8, 90); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVSEPresentVoltage ); + } } else if ( exiFrag->EVSEProcessing_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEProcessing) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEProcessing */ + errn = encodeNBitUnsignedInteger(stream, 8, 91); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, exiFrag->EVSEProcessing); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSEStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEStatus) */ errn = encodeNBitUnsignedInteger(stream, 8, 92); @@ -12906,7 +13048,16 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->EVSETimeStamp_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSETimeStamp) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSETimeStamp */ + errn = encodeNBitUnsignedInteger(stream, 8, 94); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger64(stream, exiFrag->EVSETimeStamp); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSEVoltageLimitAchieved_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEVoltageLimitAchieved) */ errn = encodeNBitUnsignedInteger(stream, 8, 95); @@ -12927,10 +13078,16 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->EVTargetCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVTargetCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetCurrent */ + errn = encodeNBitUnsignedInteger(stream, 8, 97); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVTargetCurrent ); + } } else if ( exiFrag->EVTargetVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVTargetVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetVoltage */ + errn = encodeNBitUnsignedInteger(stream, 8, 98); + if(errn == 0) { + errn = encode_iso1PhysicalValueType(stream, &exiFrag->EVTargetVoltage ); + } } else if ( exiFrag->EnergyTransferMode_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EnergyTransferMode) */ errn = encodeNBitUnsignedInteger(stream, 8, 99); @@ -13033,7 +13190,19 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->GenChallenge_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}GenChallenge) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name GenChallenge */ + errn = encodeNBitUnsignedInteger(stream, 8, 107); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->GenChallenge.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->GenChallenge.bytes, exiFrag->GenChallenge.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->HMACOutputLength_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength) */ errn = encodeNBitUnsignedInteger(stream, 8, 108); @@ -13097,7 +13266,10 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->ListOfRootCertificateIDs_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ListOfRootCertificateIDs) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ListOfRootCertificateIDs */ + errn = encodeNBitUnsignedInteger(stream, 8, 114); + if(errn == 0) { + errn = encode_iso1ListOfRootCertificateIDsType(stream, &exiFrag->ListOfRootCertificateIDs ); + } } else if ( exiFrag->Manifest_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Manifest) */ errn = encodeNBitUnsignedInteger(stream, 8, 115); @@ -13134,7 +13306,10 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->MeterInfo_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeterInfo) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name MeterInfo */ + errn = encodeNBitUnsignedInteger(stream, 8, 118); + if(errn == 0) { + errn = encode_iso1MeterInfoType(stream, &exiFrag->MeterInfo ); + } } else if ( exiFrag->MeterReading_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterReading) */ errn = encodeNBitUnsignedInteger(stream, 8, 119); @@ -13303,7 +13478,19 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->PGPKeyPacket_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name PGPKeyPacket */ + errn = encodeNBitUnsignedInteger(stream, 8, 134); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->PGPKeyPacket.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->PGPKeyPacket.bytes, exiFrag->PGPKeyPacket.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->PMax_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMax) */ errn = encodeNBitUnsignedInteger(stream, 8, 135); @@ -13336,7 +13523,16 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->ParameterSetID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ParameterSetID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ParameterSetID */ + errn = encodeNBitUnsignedInteger(stream, 8, 140); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, exiFrag->ParameterSetID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->PaymentDetailsReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentDetailsReq) */ errn = encodeNBitUnsignedInteger(stream, 8, 141); @@ -13459,7 +13655,16 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->ReceiptRequired_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ReceiptRequired) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ReceiptRequired */ + errn = encodeNBitUnsignedInteger(stream, 8, 156); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->ReceiptRequired); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->Reference_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference) */ errn = encodeNBitUnsignedInteger(stream, 8, 157); @@ -13498,7 +13703,16 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->ResponseCode_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ResponseCode) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ResponseCode */ + errn = encodeNBitUnsignedInteger(stream, 8, 162); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, exiFrag->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->RetrievalMethod_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod) */ errn = encodeNBitUnsignedInteger(stream, 8, 163); @@ -13525,7 +13739,10 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->SAProvisioningCertificateChain_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SAProvisioningCertificateChain) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAProvisioningCertificateChain */ + errn = encodeNBitUnsignedInteger(stream, 8, 166); + if(errn == 0) { + errn = encode_iso1CertificateChainType(stream, &exiFrag->SAProvisioningCertificateChain ); + } } else if ( exiFrag->SAScheduleList_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleList) */ errn = encodeNBitUnsignedInteger(stream, 8, 167); @@ -13540,10 +13757,28 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->SAScheduleTupleID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SAScheduleTupleID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleTupleID */ + errn = encodeNBitUnsignedInteger(stream, 8, 169); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(exiFrag->SAScheduleTupleID - 1)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SAScheduleTupleID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTupleID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleTupleID */ + errn = encodeNBitUnsignedInteger(stream, 8, 170); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(exiFrag->SAScheduleTupleID - 1)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SASchedules_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SASchedules) */ errn = encodeNBitUnsignedInteger(stream, 8, 171); @@ -13658,10 +13893,28 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->ServiceCategory_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceCategory) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceCategory */ + errn = encodeNBitUnsignedInteger(stream, 8, 183); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, exiFrag->ServiceCategory); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceCategory_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceCategory) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceCategory */ + errn = encodeNBitUnsignedInteger(stream, 8, 184); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, exiFrag->ServiceCategory); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceDetailReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDetailReq) */ errn = encodeNBitUnsignedInteger(stream, 8, 185); @@ -13688,10 +13941,28 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->ServiceID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceID */ + errn = encodeNBitUnsignedInteger(stream, 8, 189); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, exiFrag->ServiceID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceID */ + errn = encodeNBitUnsignedInteger(stream, 8, 190); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, exiFrag->ServiceID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceList_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceList) */ errn = encodeNBitUnsignedInteger(stream, 8, 191); @@ -13722,16 +13993,66 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->ServiceScope_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceScope) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceScope */ + errn = encodeNBitUnsignedInteger(stream, 8, 194); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->ServiceScope.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, exiFrag->ServiceScope.characters, exiFrag->ServiceScope.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceScope_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceScope) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceScope */ + errn = encodeNBitUnsignedInteger(stream, 8, 195); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->ServiceScope.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, exiFrag->ServiceScope.characters, exiFrag->ServiceScope.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SessionID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SessionID */ + errn = encodeNBitUnsignedInteger(stream, 8, 196); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->SessionID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->SessionID.bytes, exiFrag->SessionID.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SessionID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgHeader}SessionID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SessionID */ + errn = encodeNBitUnsignedInteger(stream, 8, 197); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->SessionID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->SessionID.bytes, exiFrag->SessionID.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SessionSetupReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionSetupReq) */ errn = encodeNBitUnsignedInteger(stream, 8, 198); @@ -14097,7 +14418,10 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) } } else if ( exiFrag->eMAID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}eMAID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name eMAID */ + errn = encodeNBitUnsignedInteger(stream, 8, 236); + if(errn == 0) { + errn = encode_iso1EMAIDType(stream, &exiFrag->eMAID ); + } } else if ( exiFrag->intValue_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}intValue) */ errn = encodeNBitUnsignedInteger(stream, 8, 237); diff --git a/src/iso1/iso1EXIDatatypesEncoder.h b/src/iso1/iso1EXIDatatypesEncoder.h index c87e479..73140d1 100644 --- a/src/iso1/iso1EXIDatatypesEncoder.h +++ b/src/iso1/iso1EXIDatatypesEncoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-19 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

diff --git a/src/iso2/iso2EXIDatatypes.c b/src/iso2/iso2EXIDatatypes.c index dcc765e..221fadd 100644 --- a/src/iso2/iso2EXIDatatypes.c +++ b/src/iso2/iso2EXIDatatypes.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-26 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

diff --git a/src/iso2/iso2EXIDatatypes.h b/src/iso2/iso2EXIDatatypes.h index 2e1ef04..bc11233 100644 --- a/src/iso2/iso2EXIDatatypes.h +++ b/src/iso2/iso2EXIDatatypes.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-26 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

diff --git a/src/iso2/iso2EXIDatatypesDecoder.c b/src/iso2/iso2EXIDatatypesDecoder.c index 0aa38e2..18b3d32 100644 --- a/src/iso2/iso2EXIDatatypesDecoder.c +++ b/src/iso2/iso2EXIDatatypesDecoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-26 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

@@ -83504,7 +83504,8 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 6: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}AlignmentCheckParameters) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name AlignmentCheckParameters */ + errn = decode_iso2ParameterSetType(stream, &exiFrag->AlignmentCheckParameters); + exiFrag->AlignmentCheckParameters_isUsed = 1u; break; case 7: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}AlignmentCheckReq) */ @@ -83518,7 +83519,17 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 9: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}AlignmentOffset) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name AlignmentOffset */ + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->AlignmentOffset); + exiFrag->AlignmentOffset_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 10: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}AngleGAtoVA) */ @@ -83561,7 +83572,18 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 16: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}BulkSOC) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name BulkSOC */ + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 7, &(uint32)); + exiFrag->BulkSOC = (int8_t)(uint32 + 0); + exiFrag->BulkSOC_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 17: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}BuyBackTariff) */ @@ -83585,7 +83607,23 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 21: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}Certificate) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name Certificate */ + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->Certificate.bytesLen); + if (errn == 0) { + errn = (exiFrag->Certificate.bytesLen) <= EXIFragment_Certificate_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->Certificate.bytesLen, exiFrag->Certificate.bytes); + } + exiFrag->Certificate_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 22: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}CertificateInstallationReq) */ @@ -83712,11 +83750,13 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 39: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ContractSignatureCertChain) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractSignatureCertChain */ + errn = decode_iso2CertificateChainType(stream, &exiFrag->ContractSignatureCertChain); + exiFrag->ContractSignatureCertChain_isUsed = 1u; break; case 40: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ContractSignatureEncryptedPrivateKey) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractSignatureEncryptedPrivateKey */ + errn = decode_iso2ContractSignatureEncryptedPrivateKeyType(stream, &exiFrag->ContractSignatureEncryptedPrivateKey); + exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 1u; break; case 41: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}Cost) */ @@ -83749,7 +83789,18 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 45: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}CurrentSOC) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name CurrentSOC */ + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 7, &(uint32)); + exiFrag->CurrentSOC = (int8_t)(uint32 + 0); + exiFrag->CurrentSOC_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 46: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}DC_BidirectionalControlReq) */ @@ -83783,7 +83834,8 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 52: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}DHpublickey) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DHpublickey */ + errn = decode_iso2DiffieHellmanPublickeyType(stream, &exiFrag->DHpublickey); + exiFrag->DHpublickey_isUsed = 1u; break; case 53: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue) */ @@ -83925,7 +83977,18 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 65: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVElectricalChargingDeviceStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVElectricalChargingDeviceStatus */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 1, &uint32); + exiFrag->EVElectricalChargingDeviceStatus = (iso2electricalChargingDeviceStatusType) uint32; + exiFrag->EVElectricalChargingDeviceStatus_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 66: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVEnergyTransferParameter) */ @@ -83949,19 +84012,23 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 70: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumChargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumChargeCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumChargeCurrent); + exiFrag->EVMaximumChargeCurrent_isUsed = 1u; break; case 71: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumChargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumChargeCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumChargeCurrent); + exiFrag->EVMaximumChargeCurrent_isUsed = 1u; break; case 72: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumChargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumChargePower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumChargePower); + exiFrag->EVMaximumChargePower_isUsed = 1u; break; case 73: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumChargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumChargePower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumChargePower); + exiFrag->EVMaximumChargePower_isUsed = 1u; break; case 74: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumCurrent) */ @@ -83970,55 +84037,78 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 75: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumDischargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumDischargeCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumDischargeCurrent); + exiFrag->EVMaximumDischargeCurrent_isUsed = 1u; break; case 76: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumDischargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumDischargeCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumDischargeCurrent); + exiFrag->EVMaximumDischargeCurrent_isUsed = 1u; break; case 77: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumDischargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumDischargePower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumDischargePower); + exiFrag->EVMaximumDischargePower_isUsed = 1u; break; case 78: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumDischargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumDischargePower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumDischargePower); + exiFrag->EVMaximumDischargePower_isUsed = 1u; break; case 79: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumEnergyRequest) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumEnergyRequest */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumEnergyRequest); + exiFrag->EVMaximumEnergyRequest_isUsed = 1u; break; case 80: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumEnergyRequest) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumEnergyRequest */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumEnergyRequest); + exiFrag->EVMaximumEnergyRequest_isUsed = 1u; break; case 81: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumPower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumPower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumPower); + exiFrag->EVMaximumPower_isUsed = 1u; break; case 82: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumPower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumPower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumPower); + exiFrag->EVMaximumPower_isUsed = 1u; break; case 83: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumVoltage */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumVoltage); + exiFrag->EVMaximumVoltage_isUsed = 1u; break; case 84: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumVoltage */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumVoltage); + exiFrag->EVMaximumVoltage_isUsed = 1u; break; case 85: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMechanicalChargingDeviceStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMechanicalChargingDeviceStatus */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 2, &uint32); + exiFrag->EVMechanicalChargingDeviceStatus = (iso2mechanicalChargingDeviceStatusType) uint32; + exiFrag->EVMechanicalChargingDeviceStatus_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 86: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMinimumChargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumChargeCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumChargeCurrent); + exiFrag->EVMinimumChargeCurrent_isUsed = 1u; break; case 87: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumChargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumChargeCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumChargeCurrent); + exiFrag->EVMinimumChargeCurrent_isUsed = 1u; break; case 88: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumChargePower) */ @@ -84027,11 +84117,13 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 89: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMinimumDischargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumDischargeCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumDischargeCurrent); + exiFrag->EVMinimumDischargeCurrent_isUsed = 1u; break; case 90: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumDischargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumDischargeCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumDischargeCurrent); + exiFrag->EVMinimumDischargeCurrent_isUsed = 1u; break; case 91: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumDischargePower) */ @@ -84040,11 +84132,13 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 92: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMinimumEnergyRequest) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumEnergyRequest */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumEnergyRequest); + exiFrag->EVMinimumEnergyRequest_isUsed = 1u; break; case 93: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumEnergyRequest) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumEnergyRequest */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumEnergyRequest); + exiFrag->EVMinimumEnergyRequest_isUsed = 1u; break; case 94: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumPower) */ @@ -84053,15 +84147,28 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 95: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMinimumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumVoltage */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumVoltage); + exiFrag->EVMinimumVoltage_isUsed = 1u; break; case 96: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumVoltage */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumVoltage); + exiFrag->EVMinimumVoltage_isUsed = 1u; break; case 97: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVOperation) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVOperation */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 1, &uint32); + exiFrag->EVOperation = (iso2EVOperationType) uint32; + exiFrag->EVOperation_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 98: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVPresentActivePower) */ @@ -84075,7 +84182,18 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 100: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVProcessing) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVProcessing */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 2, &uint32); + exiFrag->EVProcessing = (iso2EVSEProcessingType) uint32; + exiFrag->EVProcessing_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 101: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSECheckOutStatus) */ @@ -84094,7 +84212,17 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 102: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSECurrentLimitAchieved) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSECurrentLimitAchieved */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->EVSECurrentLimitAchieved); + exiFrag->EVSECurrentLimitAchieved_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 103: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSECurrentRegulationTolerance) */ @@ -84103,7 +84231,18 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 104: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEElectricalChargingDeviceStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEElectricalChargingDeviceStatus */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 1, &uint32); + exiFrag->EVSEElectricalChargingDeviceStatus = (iso2electricalChargingDeviceStatusType) uint32; + exiFrag->EVSEElectricalChargingDeviceStatus_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 105: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEEnergyToBeDelivered) */ @@ -84127,23 +84266,46 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 109: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEID */ + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->EVSEID.charactersLen); + if (errn == 0) { + if (exiFrag->EVSEID.charactersLen >= 2) { + exiFrag->EVSEID.charactersLen = (uint16_t)(exiFrag->EVSEID.charactersLen - 2); /* string table miss */ + errn = decodeCharacters(stream, exiFrag->EVSEID.charactersLen, exiFrag->EVSEID.characters, EXIFragment_EVSEID_CHARACTERS_SIZE); + } else { + /* string table hit */ + errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED; + } + } + exiFrag->EVSEID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 110: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumChargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumChargeCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumChargeCurrent); + exiFrag->EVSEMaximumChargeCurrent_isUsed = 1u; break; case 111: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMaximumChargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumChargeCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumChargeCurrent); + exiFrag->EVSEMaximumChargeCurrent_isUsed = 1u; break; case 112: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumChargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumChargePower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumChargePower); + exiFrag->EVSEMaximumChargePower_isUsed = 1u; break; case 113: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMaximumChargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumChargePower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumChargePower); + exiFrag->EVSEMaximumChargePower_isUsed = 1u; break; case 114: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumCurrent) */ @@ -84152,39 +84314,58 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 115: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumDischargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumDischargeCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumDischargeCurrent); + exiFrag->EVSEMaximumDischargeCurrent_isUsed = 1u; break; case 116: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMaximumDischargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumDischargeCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumDischargeCurrent); + exiFrag->EVSEMaximumDischargeCurrent_isUsed = 1u; break; case 117: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumDischargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumDischargePower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumDischargePower); + exiFrag->EVSEMaximumDischargePower_isUsed = 1u; break; case 118: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMaximumDischargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumDischargePower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumDischargePower); + exiFrag->EVSEMaximumDischargePower_isUsed = 1u; break; case 119: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumPower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumPower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumPower); + exiFrag->EVSEMaximumPower_isUsed = 1u; break; case 120: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMaximumPower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumPower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumPower); + exiFrag->EVSEMaximumPower_isUsed = 1u; break; case 121: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumVoltage */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumVoltage); + exiFrag->EVSEMaximumVoltage_isUsed = 1u; break; case 122: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMaximumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumVoltage */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumVoltage); + exiFrag->EVSEMaximumVoltage_isUsed = 1u; break; case 123: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMechanicalChargingDeviceStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMechanicalChargingDeviceStatus */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 2, &uint32); + exiFrag->EVSEMechanicalChargingDeviceStatus = (iso2mechanicalChargingDeviceStatusType) uint32; + exiFrag->EVSEMechanicalChargingDeviceStatus_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 124: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMinimumChargeCurrent) */ @@ -84203,15 +84384,18 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 127: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMinimumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMinimumVoltage */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMinimumVoltage); + exiFrag->EVSEMinimumVoltage_isUsed = 1u; break; case 128: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMinimumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMinimumVoltage */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEMinimumVoltage); + exiFrag->EVSEMinimumVoltage_isUsed = 1u; break; case 129: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSENominalFrequency) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSENominalFrequency */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSENominalFrequency); + exiFrag->EVSENominalFrequency_isUsed = 1u; break; case 130: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSENominalVoltage) */ @@ -84245,19 +84429,42 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 134: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEPowerLimitAchieved) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEPowerLimitAchieved */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->EVSEPowerLimitAchieved); + exiFrag->EVSEPowerLimitAchieved_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 135: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEPresentCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEPresentCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEPresentCurrent); + exiFrag->EVSEPresentCurrent_isUsed = 1u; break; case 136: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEPresentVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEPresentVoltage */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSEPresentVoltage); + exiFrag->EVSEPresentVoltage_isUsed = 1u; break; case 137: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEProcessing) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEProcessing */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 2, &uint32); + exiFrag->EVSEProcessing = (iso2EVSEProcessingType) uint32; + exiFrag->EVSEProcessing_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 138: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEStatus) */ @@ -84266,7 +84473,8 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 139: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSETargetPower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSETargetPower */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVSETargetPower); + exiFrag->EVSETargetPower_isUsed = 1u; break; case 140: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSETargetReactivePower) */ @@ -84275,23 +84483,46 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 141: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSETimeStamp) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSETimeStamp */ + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeInteger64(stream, &exiFrag->EVSETimeStamp); + exiFrag->EVSETimeStamp_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 142: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEVoltageLimitAchieved) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEVoltageLimitAchieved */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->EVSEVoltageLimitAchieved); + exiFrag->EVSEVoltageLimitAchieved_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 143: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVTargetCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetCurrent */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVTargetCurrent); + exiFrag->EVTargetCurrent_isUsed = 1u; break; case 144: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVTargetEnergyRequest) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetEnergyRequest */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVTargetEnergyRequest); + exiFrag->EVTargetEnergyRequest_isUsed = 1u; break; case 145: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVTargetEnergyRequest) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetEnergyRequest */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVTargetEnergyRequest); + exiFrag->EVTargetEnergyRequest_isUsed = 1u; break; case 146: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVTargetPower) */ @@ -84300,7 +84531,8 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 147: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVTargetVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetVoltage */ + errn = decode_iso2PhysicalValueType(stream, &exiFrag->EVTargetVoltage); + exiFrag->EVTargetVoltage_isUsed = 1u; break; case 148: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EffectiveRadiatedPower) */ @@ -84381,7 +84613,17 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 158: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}FrequencyChannel) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name FrequencyChannel */ + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger32(stream, &exiFrag->FrequencyChannel); + exiFrag->FrequencyChannel_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 159: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G) */ @@ -84405,15 +84647,51 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 160: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}GAID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name GAID */ + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->GAID.charactersLen); + if (errn == 0) { + if (exiFrag->GAID.charactersLen >= 2) { + exiFrag->GAID.charactersLen = (uint16_t)(exiFrag->GAID.charactersLen - 2); /* string table miss */ + errn = decodeCharacters(stream, exiFrag->GAID.charactersLen, exiFrag->GAID.characters, EXIFragment_GAID_CHARACTERS_SIZE); + } else { + /* string table hit */ + errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED; + } + } + exiFrag->GAID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 161: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}GenChallenge) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name GenChallenge */ + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->GenChallenge.bytesLen); + if (errn == 0) { + errn = (exiFrag->GenChallenge.bytesLen) <= EXIFragment_GenChallenge_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->GenChallenge.bytesLen, exiFrag->GenChallenge.bytes); + } + exiFrag->GenChallenge_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 162: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}GenericParameters) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name GenericParameters */ + errn = decode_iso2ParameterSetType(stream, &exiFrag->GenericParameters); + exiFrag->GenericParameters_isUsed = 1u; break; case 163: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}Generic_EVFinePositioningParameters) */ @@ -84533,7 +84811,8 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 176: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ListOfRootCertificateIDs) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ListOfRootCertificateIDs */ + errn = decode_iso2ListOfRootCertificateIDsType(stream, &exiFrag->ListOfRootCertificateIDs); + exiFrag->ListOfRootCertificateIDs_isUsed = 1u; break; case 177: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}MV_EVSEFinePositioningParameters) */ @@ -84629,7 +84908,8 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 188: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}MeterInfo) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name MeterInfo */ + errn = decode_iso2MeterInfoType(stream, &exiFrag->MeterInfo); + exiFrag->MeterInfo_isUsed = 1u; break; case 189: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}MeterReadingCharged) */ @@ -84718,7 +84998,18 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 197: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}MinimumSOC) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name MinimumSOC */ + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 7, &(uint32)); + exiFrag->MinimumSOC = (int8_t)(uint32 + 0); + exiFrag->MinimumSOC_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 198: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus) */ @@ -84771,11 +85062,33 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 201: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}NumberOfSensors) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name NumberOfSensors */ + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 8, &(uint32)); + exiFrag->NumberOfSensors = (uint8_t)(uint32 + 0); + exiFrag->NumberOfSensors_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 202: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}NumberOfSignalPackages) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name NumberOfSignalPackages */ + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 8, &(uint32)); + exiFrag->NumberOfSignalPackages = (uint8_t)(uint32 + 0); + exiFrag->NumberOfSignalPackages_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 203: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}OEMProvisioningCert) */ @@ -84804,7 +85117,18 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 205: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}OperationMode) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name OperationMode */ + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 1, &uint32); + exiFrag->OperationMode = (iso2operationModeType) uint32; + exiFrag->OperationMode_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 206: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}P) */ @@ -84853,7 +85177,23 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 209: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name PGPKeyPacket */ + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->PGPKeyPacket.bytesLen); + if (errn == 0) { + errn = (exiFrag->PGPKeyPacket.bytesLen) <= EXIFragment_PGPKeyPacket_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->PGPKeyPacket.bytesLen, exiFrag->PGPKeyPacket.bytes); + } + exiFrag->PGPKeyPacket_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 210: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}PMax) */ @@ -84891,11 +85231,23 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 215: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}PackageSeparationTime) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name PackageSeparationTime */ + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 8, &(uint32)); + exiFrag->PackageSeparationTime = (uint8_t)(uint32 + 0); + exiFrag->PackageSeparationTime_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 216: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}PairingParameters) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name PairingParameters */ + errn = decode_iso2ParameterSetType(stream, &exiFrag->PairingParameters); + exiFrag->PairingParameters_isUsed = 1u; break; case 217: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}PairingReq) */ @@ -84919,7 +85271,17 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 221: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}ParameterSetID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ParameterSetID */ + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ParameterSetID); + exiFrag->ParameterSetID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 222: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ParkingMethod) */ @@ -85008,7 +85370,8 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 232: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}PowerDemandParameters) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name PowerDemandParameters */ + errn = decode_iso2ParameterSetType(stream, &exiFrag->PowerDemandParameters); + exiFrag->PowerDemandParameters_isUsed = 1u; break; case 233: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}PowerDemandReq) */ @@ -85062,7 +85425,17 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 240: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ReceiptRequired) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ReceiptRequired */ + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeBoolean(stream, &exiFrag->ReceiptRequired); + exiFrag->ReceiptRequired_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 241: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference) */ @@ -85071,7 +85444,8 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 242: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}RelativeTimeInterval) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name RelativeTimeInterval */ + errn = decode_iso2RelativeTimeIntervalType(stream, &exiFrag->RelativeTimeInterval); + exiFrag->RelativeTimeInterval_isUsed = 1u; break; case 243: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}RemainingTimeToBulkSOC) */ @@ -85164,15 +85538,18 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 251: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}SAProvisioningCertificateChain) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAProvisioningCertificateChain */ + errn = decode_iso2CertificateChainType(stream, &exiFrag->SAProvisioningCertificateChain); + exiFrag->SAProvisioningCertificateChain_isUsed = 1u; break; case 252: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}SAScheduleList) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleList */ + errn = decode_iso2SAScheduleListType(stream, &exiFrag->SAScheduleList); + exiFrag->SAScheduleList_isUsed = 1u; break; case 253: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SAScheduleList) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleList */ + errn = decode_iso2SAScheduleListType(stream, &exiFrag->SAScheduleList); + exiFrag->SAScheduleList_isUsed = 1u; break; case 254: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SAScheduleTuple) */ @@ -85181,11 +85558,33 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 255: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}SAScheduleTupleID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleTupleID */ + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 8, &(uint32)); + exiFrag->SAScheduleTupleID = (uint8_t)(uint32 + 1); + exiFrag->SAScheduleTupleID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 256: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SAScheduleTupleID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleTupleID */ + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 8, &(uint32)); + exiFrag->SAScheduleTupleID = (uint8_t)(uint32 + 1); + exiFrag->SAScheduleTupleID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 257: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData) */ @@ -85317,11 +85716,23 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 269: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SensorID */ + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 8, &(uint32)); + exiFrag->SensorID = (uint8_t)(uint32 + 0); + exiFrag->SensorID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 270: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorList) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SensorList */ + errn = decode_iso2SensorListType(stream, &exiFrag->SensorList); + exiFrag->SensorList_isUsed = 1u; break; case 271: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorMeasurements) */ @@ -85330,7 +85741,8 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 272: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorOrder) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SensorOrder */ + errn = decode_iso2SensorOrderListType(stream, &exiFrag->SensorOrder); + exiFrag->SensorOrder_isUsed = 1u; break; case 273: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorOrientation) */ @@ -85344,7 +85756,8 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 275: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorPackageList) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SensorPackageList */ + errn = decode_iso2SensorPackageListType(stream, &exiFrag->SensorPackageList); + exiFrag->SensorPackageList_isUsed = 1u; break; case 276: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorPosition) */ @@ -85377,11 +85790,31 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 282: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ServiceID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceID */ + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ServiceID); + exiFrag->ServiceID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 283: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}ServiceID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceID */ + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->ServiceID); + exiFrag->ServiceID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 284: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ServiceParameterList) */ @@ -85390,11 +85823,43 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 285: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}SessionID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SessionID */ + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->SessionID.bytesLen); + if (errn == 0) { + errn = (exiFrag->SessionID.bytesLen) <= EXIFragment_SessionID_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->SessionID.bytesLen, exiFrag->SessionID.bytes); + } + exiFrag->SessionID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 286: /* START_ELEMENT({urn:iso:15118:2:2016:MsgHeader}SessionID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SessionID */ + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeUnsignedInteger16(stream, &exiFrag->SessionID.bytesLen); + if (errn == 0) { + errn = (exiFrag->SessionID.bytesLen) <= EXIFragment_SessionID_BYTES_SIZE ? 0 : EXI_ERROR_OUT_OF_BYTE_BUFFER; + } + if (errn == 0) { + errn = decodeBytes(stream, exiFrag->SessionID.bytesLen, exiFrag->SessionID.bytes); + } + exiFrag->SessionID_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 287: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}SessionSetupReq) */ @@ -85452,11 +85917,33 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 293: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SignalPulseDuration) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SignalPulseDuration */ + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 8, &(uint32)); + exiFrag->SignalPulseDuration = (uint8_t)(uint32 + 0); + exiFrag->SignalPulseDuration_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 294: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SignalSeparationTime) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SignalSeparationTime */ + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 8, &(uint32)); + exiFrag->SignalSeparationTime = (uint8_t)(uint32 + 0); + exiFrag->SignalSeparationTime_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 295: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature) */ @@ -85557,7 +86044,18 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 309: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}TargetSOC) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name TargetSOC */ + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = decodeNBitUnsignedInteger(stream, 1, &eventCode); + if(errn == 0) { + if(eventCode == 0) { + errn = decodeNBitUnsignedInteger(stream, 7, &(uint32)); + exiFrag->TargetSOC = (int8_t)(uint32 + 0); + exiFrag->TargetSOC_isUsed = 1u; + } else { + /* Second level event (e.g., xsi:type, xsi:nil, ...) */ + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + } + } break; case 310: /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform) */ @@ -85937,7 +86435,8 @@ int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) break; case 344: /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}eMAID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name eMAID */ + errn = decode_iso2EMAIDType(stream, &exiFrag->eMAID); + exiFrag->eMAID_isUsed = 1u; break; case 345: /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}intValue) */ diff --git a/src/iso2/iso2EXIDatatypesDecoder.h b/src/iso2/iso2EXIDatatypesDecoder.h index 7f5f6c8..f0beda1 100644 --- a/src/iso2/iso2EXIDatatypesDecoder.h +++ b/src/iso2/iso2EXIDatatypesDecoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-26 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

diff --git a/src/iso2/iso2EXIDatatypesEncoder.c b/src/iso2/iso2EXIDatatypesEncoder.c index a3c7278..670755e 100644 --- a/src/iso2/iso2EXIDatatypesEncoder.c +++ b/src/iso2/iso2EXIDatatypesEncoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-26 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

@@ -59757,7 +59757,10 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->AlignmentCheckParameters_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}AlignmentCheckParameters) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name AlignmentCheckParameters */ + errn = encodeNBitUnsignedInteger(stream, 9, 6); + if(errn == 0) { + errn = encode_iso2ParameterSetType(stream, &exiFrag->AlignmentCheckParameters ); + } } else if ( exiFrag->AlignmentCheckReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}AlignmentCheckReq) */ errn = encodeNBitUnsignedInteger(stream, 9, 7); @@ -59772,7 +59775,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->AlignmentOffset_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}AlignmentOffset) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name AlignmentOffset */ + errn = encodeNBitUnsignedInteger(stream, 9, 9); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, exiFrag->AlignmentOffset); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->AngleGAtoVA_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}AngleGAtoVA) */ errn = encodeNBitUnsignedInteger(stream, 9, 10); @@ -59817,7 +59829,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->BulkSOC_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}BulkSOC) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name BulkSOC */ + errn = encodeNBitUnsignedInteger(stream, 9, 16); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(exiFrag->BulkSOC - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->BuyBackTariff_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}BuyBackTariff) */ errn = encodeNBitUnsignedInteger(stream, 9, 17); @@ -59844,7 +59865,19 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->Certificate_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}Certificate) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name Certificate */ + errn = encodeNBitUnsignedInteger(stream, 9, 21); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->Certificate.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->Certificate.bytes, exiFrag->Certificate.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->CertificateInstallationReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}CertificateInstallationReq) */ errn = encodeNBitUnsignedInteger(stream, 9, 22); @@ -59973,10 +60006,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->ContractSignatureCertChain_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ContractSignatureCertChain) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractSignatureCertChain */ + errn = encodeNBitUnsignedInteger(stream, 9, 39); + if(errn == 0) { + errn = encode_iso2CertificateChainType(stream, &exiFrag->ContractSignatureCertChain ); + } } else if ( exiFrag->ContractSignatureEncryptedPrivateKey_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ContractSignatureEncryptedPrivateKey) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ContractSignatureEncryptedPrivateKey */ + errn = encodeNBitUnsignedInteger(stream, 9, 40); + if(errn == 0) { + errn = encode_iso2ContractSignatureEncryptedPrivateKeyType(stream, &exiFrag->ContractSignatureEncryptedPrivateKey ); + } } else if ( exiFrag->Cost_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}Cost) */ errn = encodeNBitUnsignedInteger(stream, 9, 41); @@ -60009,7 +60048,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->CurrentSOC_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}CurrentSOC) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name CurrentSOC */ + errn = encodeNBitUnsignedInteger(stream, 9, 45); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(exiFrag->CurrentSOC - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->DC_BidirectionalControlReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}DC_BidirectionalControlReq) */ errn = encodeNBitUnsignedInteger(stream, 9, 46); @@ -60048,7 +60096,10 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->DHpublickey_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}DHpublickey) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name DHpublickey */ + errn = encodeNBitUnsignedInteger(stream, 9, 52); + if(errn == 0) { + errn = encode_iso2DiffieHellmanPublickeyType(stream, &exiFrag->DHpublickey ); + } } else if ( exiFrag->DSAKeyValue_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue) */ errn = encodeNBitUnsignedInteger(stream, 9, 53); @@ -60171,7 +60222,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVElectricalChargingDeviceStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVElectricalChargingDeviceStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVElectricalChargingDeviceStatus */ + errn = encodeNBitUnsignedInteger(stream, 9, 65); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 1, exiFrag->EVElectricalChargingDeviceStatus); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVEnergyTransferParameter_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVEnergyTransferParameter) */ errn = encodeNBitUnsignedInteger(stream, 9, 66); @@ -60198,16 +60258,28 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVMaximumChargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumChargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumChargeCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 70); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumChargeCurrent ); + } } else if ( exiFrag->EVMaximumChargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumChargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumChargeCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 71); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumChargeCurrent ); + } } else if ( exiFrag->EVMaximumChargePower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumChargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumChargePower */ + errn = encodeNBitUnsignedInteger(stream, 9, 72); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumChargePower ); + } } else if ( exiFrag->EVMaximumChargePower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumChargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumChargePower */ + errn = encodeNBitUnsignedInteger(stream, 9, 73); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumChargePower ); + } } else if ( exiFrag->EVMaximumCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumCurrent) */ errn = encodeNBitUnsignedInteger(stream, 9, 74); @@ -60216,43 +60288,88 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVMaximumDischargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumDischargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumDischargeCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 75); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumDischargeCurrent ); + } } else if ( exiFrag->EVMaximumDischargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumDischargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumDischargeCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 76); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumDischargeCurrent ); + } } else if ( exiFrag->EVMaximumDischargePower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumDischargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumDischargePower */ + errn = encodeNBitUnsignedInteger(stream, 9, 77); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumDischargePower ); + } } else if ( exiFrag->EVMaximumDischargePower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumDischargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumDischargePower */ + errn = encodeNBitUnsignedInteger(stream, 9, 78); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumDischargePower ); + } } else if ( exiFrag->EVMaximumEnergyRequest_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumEnergyRequest) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumEnergyRequest */ + errn = encodeNBitUnsignedInteger(stream, 9, 79); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumEnergyRequest ); + } } else if ( exiFrag->EVMaximumEnergyRequest_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumEnergyRequest) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumEnergyRequest */ + errn = encodeNBitUnsignedInteger(stream, 9, 80); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumEnergyRequest ); + } } else if ( exiFrag->EVMaximumPower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumPower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumPower */ + errn = encodeNBitUnsignedInteger(stream, 9, 81); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumPower ); + } } else if ( exiFrag->EVMaximumPower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumPower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumPower */ + errn = encodeNBitUnsignedInteger(stream, 9, 82); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumPower ); + } } else if ( exiFrag->EVMaximumVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMaximumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumVoltage */ + errn = encodeNBitUnsignedInteger(stream, 9, 83); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumVoltage ); + } } else if ( exiFrag->EVMaximumVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMaximumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMaximumVoltage */ + errn = encodeNBitUnsignedInteger(stream, 9, 84); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMaximumVoltage ); + } } else if ( exiFrag->EVMechanicalChargingDeviceStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMechanicalChargingDeviceStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMechanicalChargingDeviceStatus */ + errn = encodeNBitUnsignedInteger(stream, 9, 85); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, exiFrag->EVMechanicalChargingDeviceStatus); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVMinimumChargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMinimumChargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumChargeCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 86); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumChargeCurrent ); + } } else if ( exiFrag->EVMinimumChargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumChargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumChargeCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 87); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumChargeCurrent ); + } } else if ( exiFrag->EVMinimumChargePower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumChargePower) */ errn = encodeNBitUnsignedInteger(stream, 9, 88); @@ -60261,10 +60378,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVMinimumDischargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMinimumDischargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumDischargeCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 89); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumDischargeCurrent ); + } } else if ( exiFrag->EVMinimumDischargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumDischargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumDischargeCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 90); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumDischargeCurrent ); + } } else if ( exiFrag->EVMinimumDischargePower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumDischargePower) */ errn = encodeNBitUnsignedInteger(stream, 9, 91); @@ -60273,10 +60396,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVMinimumEnergyRequest_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMinimumEnergyRequest) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumEnergyRequest */ + errn = encodeNBitUnsignedInteger(stream, 9, 92); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumEnergyRequest ); + } } else if ( exiFrag->EVMinimumEnergyRequest_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumEnergyRequest) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumEnergyRequest */ + errn = encodeNBitUnsignedInteger(stream, 9, 93); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumEnergyRequest ); + } } else if ( exiFrag->EVMinimumPower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumPower) */ errn = encodeNBitUnsignedInteger(stream, 9, 94); @@ -60285,13 +60414,28 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVMinimumVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVMinimumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumVoltage */ + errn = encodeNBitUnsignedInteger(stream, 9, 95); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumVoltage ); + } } else if ( exiFrag->EVMinimumVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVMinimumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVMinimumVoltage */ + errn = encodeNBitUnsignedInteger(stream, 9, 96); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVMinimumVoltage ); + } } else if ( exiFrag->EVOperation_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVOperation) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVOperation */ + errn = encodeNBitUnsignedInteger(stream, 9, 97); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 1, exiFrag->EVOperation); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVPresentActivePower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVPresentActivePower) */ errn = encodeNBitUnsignedInteger(stream, 9, 98); @@ -60306,7 +60450,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVProcessing_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVProcessing) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVProcessing */ + errn = encodeNBitUnsignedInteger(stream, 9, 100); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, exiFrag->EVProcessing); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSECheckOutStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSECheckOutStatus) */ errn = encodeNBitUnsignedInteger(stream, 9, 101); @@ -60321,7 +60474,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVSECurrentLimitAchieved_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSECurrentLimitAchieved) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSECurrentLimitAchieved */ + errn = encodeNBitUnsignedInteger(stream, 9, 102); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->EVSECurrentLimitAchieved); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSECurrentRegulationTolerance_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSECurrentRegulationTolerance) */ errn = encodeNBitUnsignedInteger(stream, 9, 103); @@ -60330,7 +60492,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVSEElectricalChargingDeviceStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEElectricalChargingDeviceStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEElectricalChargingDeviceStatus */ + errn = encodeNBitUnsignedInteger(stream, 9, 104); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 1, exiFrag->EVSEElectricalChargingDeviceStatus); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSEEnergyToBeDelivered_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEEnergyToBeDelivered) */ errn = encodeNBitUnsignedInteger(stream, 9, 105); @@ -60357,19 +60528,44 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVSEID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEID */ + errn = encodeNBitUnsignedInteger(stream, 9, 109); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->EVSEID.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, exiFrag->EVSEID.characters, exiFrag->EVSEID.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSEMaximumChargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumChargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumChargeCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 110); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumChargeCurrent ); + } } else if ( exiFrag->EVSEMaximumChargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMaximumChargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumChargeCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 111); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumChargeCurrent ); + } } else if ( exiFrag->EVSEMaximumChargePower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumChargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumChargePower */ + errn = encodeNBitUnsignedInteger(stream, 9, 112); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumChargePower ); + } } else if ( exiFrag->EVSEMaximumChargePower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMaximumChargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumChargePower */ + errn = encodeNBitUnsignedInteger(stream, 9, 113); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumChargePower ); + } } else if ( exiFrag->EVSEMaximumCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumCurrent) */ errn = encodeNBitUnsignedInteger(stream, 9, 114); @@ -60378,31 +60574,64 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVSEMaximumDischargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumDischargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumDischargeCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 115); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumDischargeCurrent ); + } } else if ( exiFrag->EVSEMaximumDischargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMaximumDischargeCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumDischargeCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 116); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumDischargeCurrent ); + } } else if ( exiFrag->EVSEMaximumDischargePower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumDischargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumDischargePower */ + errn = encodeNBitUnsignedInteger(stream, 9, 117); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumDischargePower ); + } } else if ( exiFrag->EVSEMaximumDischargePower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMaximumDischargePower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumDischargePower */ + errn = encodeNBitUnsignedInteger(stream, 9, 118); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumDischargePower ); + } } else if ( exiFrag->EVSEMaximumPower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumPower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumPower */ + errn = encodeNBitUnsignedInteger(stream, 9, 119); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumPower ); + } } else if ( exiFrag->EVSEMaximumPower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMaximumPower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumPower */ + errn = encodeNBitUnsignedInteger(stream, 9, 120); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumPower ); + } } else if ( exiFrag->EVSEMaximumVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMaximumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumVoltage */ + errn = encodeNBitUnsignedInteger(stream, 9, 121); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumVoltage ); + } } else if ( exiFrag->EVSEMaximumVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMaximumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMaximumVoltage */ + errn = encodeNBitUnsignedInteger(stream, 9, 122); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMaximumVoltage ); + } } else if ( exiFrag->EVSEMechanicalChargingDeviceStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMechanicalChargingDeviceStatus) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMechanicalChargingDeviceStatus */ + errn = encodeNBitUnsignedInteger(stream, 9, 123); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, exiFrag->EVSEMechanicalChargingDeviceStatus); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSEMinimumChargeCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMinimumChargeCurrent) */ errn = encodeNBitUnsignedInteger(stream, 9, 124); @@ -60423,13 +60652,22 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVSEMinimumVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEMinimumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMinimumVoltage */ + errn = encodeNBitUnsignedInteger(stream, 9, 127); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMinimumVoltage ); + } } else if ( exiFrag->EVSEMinimumVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSEMinimumVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEMinimumVoltage */ + errn = encodeNBitUnsignedInteger(stream, 9, 128); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEMinimumVoltage ); + } } else if ( exiFrag->EVSENominalFrequency_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSENominalFrequency) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSENominalFrequency */ + errn = encodeNBitUnsignedInteger(stream, 9, 129); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSENominalFrequency ); + } } else if ( exiFrag->EVSENominalVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVSENominalVoltage) */ errn = encodeNBitUnsignedInteger(stream, 9, 130); @@ -60462,16 +60700,40 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVSEPowerLimitAchieved_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEPowerLimitAchieved) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEPowerLimitAchieved */ + errn = encodeNBitUnsignedInteger(stream, 9, 134); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->EVSEPowerLimitAchieved); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSEPresentCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEPresentCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEPresentCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 135); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEPresentCurrent ); + } } else if ( exiFrag->EVSEPresentVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEPresentVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEPresentVoltage */ + errn = encodeNBitUnsignedInteger(stream, 9, 136); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSEPresentVoltage ); + } } else if ( exiFrag->EVSEProcessing_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEProcessing) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEProcessing */ + errn = encodeNBitUnsignedInteger(stream, 9, 137); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, exiFrag->EVSEProcessing); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSEStatus_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEStatus) */ errn = encodeNBitUnsignedInteger(stream, 9, 138); @@ -60480,7 +60742,10 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVSETargetPower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSETargetPower) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSETargetPower */ + errn = encodeNBitUnsignedInteger(stream, 9, 139); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVSETargetPower ); + } } else if ( exiFrag->EVSETargetReactivePower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSETargetReactivePower) */ errn = encodeNBitUnsignedInteger(stream, 9, 140); @@ -60489,19 +60754,46 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVSETimeStamp_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSETimeStamp) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSETimeStamp */ + errn = encodeNBitUnsignedInteger(stream, 9, 141); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger64(stream, exiFrag->EVSETimeStamp); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVSEVoltageLimitAchieved_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVSEVoltageLimitAchieved) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVSEVoltageLimitAchieved */ + errn = encodeNBitUnsignedInteger(stream, 9, 142); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->EVSEVoltageLimitAchieved); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->EVTargetCurrent_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVTargetCurrent) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetCurrent */ + errn = encodeNBitUnsignedInteger(stream, 9, 143); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVTargetCurrent ); + } } else if ( exiFrag->EVTargetEnergyRequest_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVTargetEnergyRequest) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetEnergyRequest */ + errn = encodeNBitUnsignedInteger(stream, 9, 144); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVTargetEnergyRequest ); + } } else if ( exiFrag->EVTargetEnergyRequest_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EVTargetEnergyRequest) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetEnergyRequest */ + errn = encodeNBitUnsignedInteger(stream, 9, 145); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVTargetEnergyRequest ); + } } else if ( exiFrag->EVTargetPower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVTargetPower) */ errn = encodeNBitUnsignedInteger(stream, 9, 146); @@ -60510,7 +60802,10 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->EVTargetVoltage_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}EVTargetVoltage) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name EVTargetVoltage */ + errn = encodeNBitUnsignedInteger(stream, 9, 147); + if(errn == 0) { + errn = encode_iso2PhysicalValueType(stream, &exiFrag->EVTargetVoltage ); + } } else if ( exiFrag->EffectiveRadiatedPower_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}EffectiveRadiatedPower) */ errn = encodeNBitUnsignedInteger(stream, 9, 148); @@ -60585,7 +60880,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->FrequencyChannel_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}FrequencyChannel) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name FrequencyChannel */ + errn = encodeNBitUnsignedInteger(stream, 9, 158); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger32(stream, exiFrag->FrequencyChannel); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->G_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G) */ errn = encodeNBitUnsignedInteger(stream, 9, 159); @@ -60603,13 +60907,41 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->GAID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}GAID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name GAID */ + errn = encodeNBitUnsignedInteger(stream, 9, 160); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->GAID.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, exiFrag->GAID.characters, exiFrag->GAID.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->GenChallenge_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}GenChallenge) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name GenChallenge */ + errn = encodeNBitUnsignedInteger(stream, 9, 161); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->GenChallenge.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->GenChallenge.bytes, exiFrag->GenChallenge.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->GenericParameters_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}GenericParameters) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name GenericParameters */ + errn = encodeNBitUnsignedInteger(stream, 9, 162); + if(errn == 0) { + errn = encode_iso2ParameterSetType(stream, &exiFrag->GenericParameters ); + } } else if ( exiFrag->Generic_EVFinePositioningParameters_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}Generic_EVFinePositioningParameters) */ errn = encodeNBitUnsignedInteger(stream, 9, 163); @@ -60721,7 +61053,10 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->ListOfRootCertificateIDs_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ListOfRootCertificateIDs) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ListOfRootCertificateIDs */ + errn = encodeNBitUnsignedInteger(stream, 9, 176); + if(errn == 0) { + errn = encode_iso2ListOfRootCertificateIDsType(stream, &exiFrag->ListOfRootCertificateIDs ); + } } else if ( exiFrag->MV_EVSEFinePositioningParameters_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}MV_EVSEFinePositioningParameters) */ errn = encodeNBitUnsignedInteger(stream, 9, 177); @@ -60812,7 +61147,10 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->MeterInfo_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}MeterInfo) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name MeterInfo */ + errn = encodeNBitUnsignedInteger(stream, 9, 188); + if(errn == 0) { + errn = encode_iso2MeterInfoType(stream, &exiFrag->MeterInfo ); + } } else if ( exiFrag->MeterReadingCharged_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}MeterReadingCharged) */ errn = encodeNBitUnsignedInteger(stream, 9, 189); @@ -60891,7 +61229,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->MinimumSOC_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}MinimumSOC) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name MinimumSOC */ + errn = encodeNBitUnsignedInteger(stream, 9, 197); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(exiFrag->MinimumSOC - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->Modulus_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus) */ errn = encodeNBitUnsignedInteger(stream, 9, 198); @@ -60933,10 +61280,28 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->NumberOfSensors_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}NumberOfSensors) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name NumberOfSensors */ + errn = encodeNBitUnsignedInteger(stream, 9, 201); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(exiFrag->NumberOfSensors - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->NumberOfSignalPackages_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}NumberOfSignalPackages) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name NumberOfSignalPackages */ + errn = encodeNBitUnsignedInteger(stream, 9, 202); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(exiFrag->NumberOfSignalPackages - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->OEMProvisioningCert_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}OEMProvisioningCert) */ errn = encodeNBitUnsignedInteger(stream, 9, 203); @@ -60960,7 +61325,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->OperationMode_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}OperationMode) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name OperationMode */ + errn = encodeNBitUnsignedInteger(stream, 9, 205); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 1, exiFrag->OperationMode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->P_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}P) */ errn = encodeNBitUnsignedInteger(stream, 9, 206); @@ -60999,7 +61373,19 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->PGPKeyPacket_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name PGPKeyPacket */ + errn = encodeNBitUnsignedInteger(stream, 9, 209); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->PGPKeyPacket.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->PGPKeyPacket.bytes, exiFrag->PGPKeyPacket.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->PMax_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}PMax) */ errn = encodeNBitUnsignedInteger(stream, 9, 210); @@ -61038,10 +61424,22 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->PackageSeparationTime_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}PackageSeparationTime) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name PackageSeparationTime */ + errn = encodeNBitUnsignedInteger(stream, 9, 215); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(exiFrag->PackageSeparationTime - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->PairingParameters_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}PairingParameters) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name PairingParameters */ + errn = encodeNBitUnsignedInteger(stream, 9, 216); + if(errn == 0) { + errn = encode_iso2ParameterSetType(stream, &exiFrag->PairingParameters ); + } } else if ( exiFrag->PairingReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}PairingReq) */ errn = encodeNBitUnsignedInteger(stream, 9, 217); @@ -61068,7 +61466,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->ParameterSetID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}ParameterSetID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ParameterSetID */ + errn = encodeNBitUnsignedInteger(stream, 9, 221); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, exiFrag->ParameterSetID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ParkingMethod_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ParkingMethod) */ errn = encodeNBitUnsignedInteger(stream, 9, 222); @@ -61152,7 +61559,10 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->PowerDemandParameters_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}PowerDemandParameters) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name PowerDemandParameters */ + errn = encodeNBitUnsignedInteger(stream, 9, 232); + if(errn == 0) { + errn = encode_iso2ParameterSetType(stream, &exiFrag->PowerDemandParameters ); + } } else if ( exiFrag->PowerDemandReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}PowerDemandReq) */ errn = encodeNBitUnsignedInteger(stream, 9, 233); @@ -61206,7 +61616,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->ReceiptRequired_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ReceiptRequired) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ReceiptRequired */ + errn = encodeNBitUnsignedInteger(stream, 9, 240); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, exiFrag->ReceiptRequired); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->Reference_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference) */ errn = encodeNBitUnsignedInteger(stream, 9, 241); @@ -61215,7 +61634,10 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->RelativeTimeInterval_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}RelativeTimeInterval) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name RelativeTimeInterval */ + errn = encodeNBitUnsignedInteger(stream, 9, 242); + if(errn == 0) { + errn = encode_iso2RelativeTimeIntervalType(stream, &exiFrag->RelativeTimeInterval ); + } } else if ( exiFrag->RemainingTimeToBulkSOC_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}RemainingTimeToBulkSOC) */ errn = encodeNBitUnsignedInteger(stream, 9, 243); @@ -61296,13 +61718,22 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->SAProvisioningCertificateChain_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}SAProvisioningCertificateChain) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAProvisioningCertificateChain */ + errn = encodeNBitUnsignedInteger(stream, 9, 251); + if(errn == 0) { + errn = encode_iso2CertificateChainType(stream, &exiFrag->SAProvisioningCertificateChain ); + } } else if ( exiFrag->SAScheduleList_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}SAScheduleList) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleList */ + errn = encodeNBitUnsignedInteger(stream, 9, 252); + if(errn == 0) { + errn = encode_iso2SAScheduleListType(stream, &exiFrag->SAScheduleList ); + } } else if ( exiFrag->SAScheduleList_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SAScheduleList) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleList */ + errn = encodeNBitUnsignedInteger(stream, 9, 253); + if(errn == 0) { + errn = encode_iso2SAScheduleListType(stream, &exiFrag->SAScheduleList ); + } } else if ( exiFrag->SAScheduleTuple_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SAScheduleTuple) */ errn = encodeNBitUnsignedInteger(stream, 9, 254); @@ -61311,10 +61742,28 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->SAScheduleTupleID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}SAScheduleTupleID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleTupleID */ + errn = encodeNBitUnsignedInteger(stream, 9, 255); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(exiFrag->SAScheduleTupleID - 1)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SAScheduleTupleID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SAScheduleTupleID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SAScheduleTupleID */ + errn = encodeNBitUnsignedInteger(stream, 9, 256); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(exiFrag->SAScheduleTupleID - 1)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SPKIData_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData) */ errn = encodeNBitUnsignedInteger(stream, 9, 257); @@ -61429,10 +61878,22 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->SensorID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SensorID */ + errn = encodeNBitUnsignedInteger(stream, 9, 269); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(exiFrag->SensorID - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SensorList_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorList) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SensorList */ + errn = encodeNBitUnsignedInteger(stream, 9, 270); + if(errn == 0) { + errn = encode_iso2SensorListType(stream, &exiFrag->SensorList ); + } } else if ( exiFrag->SensorMeasurements_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorMeasurements) */ errn = encodeNBitUnsignedInteger(stream, 9, 271); @@ -61441,7 +61902,10 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->SensorOrder_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorOrder) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SensorOrder */ + errn = encodeNBitUnsignedInteger(stream, 9, 272); + if(errn == 0) { + errn = encode_iso2SensorOrderListType(stream, &exiFrag->SensorOrder ); + } } else if ( exiFrag->SensorOrientation_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorOrientation) */ errn = encodeNBitUnsignedInteger(stream, 9, 273); @@ -61456,7 +61920,10 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->SensorPackageList_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorPackageList) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SensorPackageList */ + errn = encodeNBitUnsignedInteger(stream, 9, 275); + if(errn == 0) { + errn = encode_iso2SensorPackageListType(stream, &exiFrag->SensorPackageList ); + } } else if ( exiFrag->SensorPosition_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SensorPosition) */ errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SensorPosition */ @@ -61492,10 +61959,28 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->ServiceID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ServiceID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceID */ + errn = encodeNBitUnsignedInteger(stream, 9, 282); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, exiFrag->ServiceID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}ServiceID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name ServiceID */ + errn = encodeNBitUnsignedInteger(stream, 9, 283); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, exiFrag->ServiceID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->ServiceParameterList_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}ServiceParameterList) */ errn = encodeNBitUnsignedInteger(stream, 9, 284); @@ -61504,10 +61989,34 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->SessionID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}SessionID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SessionID */ + errn = encodeNBitUnsignedInteger(stream, 9, 285); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->SessionID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->SessionID.bytes, exiFrag->SessionID.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SessionID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgHeader}SessionID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SessionID */ + errn = encodeNBitUnsignedInteger(stream, 9, 286); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiFrag->SessionID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, exiFrag->SessionID.bytes, exiFrag->SessionID.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SessionSetupReq_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}SessionSetupReq) */ errn = encodeNBitUnsignedInteger(stream, 9, 287); @@ -61561,10 +62070,28 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->SignalPulseDuration_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SignalPulseDuration) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SignalPulseDuration */ + errn = encodeNBitUnsignedInteger(stream, 9, 293); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(exiFrag->SignalPulseDuration - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->SignalSeparationTime_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}SignalSeparationTime) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name SignalSeparationTime */ + errn = encodeNBitUnsignedInteger(stream, 9, 294); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(exiFrag->SignalSeparationTime - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->Signature_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature) */ errn = encodeNBitUnsignedInteger(stream, 9, 295); @@ -61669,7 +62196,16 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->TargetSOC_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}TargetSOC) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name TargetSOC */ + errn = encodeNBitUnsignedInteger(stream, 9, 309); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(exiFrag->TargetSOC - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } } else if ( exiFrag->Transform_isUsed == 1u ) { /* START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform) */ errn = encodeNBitUnsignedInteger(stream, 9, 310); @@ -62002,7 +62538,10 @@ int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag) } } else if ( exiFrag->eMAID_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgBody}eMAID) */ - errn = EXI_UNSUPPORTED_FRAGMENT_ELEMENT; /* overlapping name eMAID */ + errn = encodeNBitUnsignedInteger(stream, 9, 344); + if(errn == 0) { + errn = encode_iso2EMAIDType(stream, &exiFrag->eMAID ); + } } else if ( exiFrag->intValue_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2016:MsgDataTypes}intValue) */ errn = encodeNBitUnsignedInteger(stream, 9, 345); diff --git a/src/iso2/iso2EXIDatatypesEncoder.h b/src/iso2/iso2EXIDatatypesEncoder.h index 0285d67..b6aae65 100644 --- a/src/iso2/iso2EXIDatatypesEncoder.h +++ b/src/iso2/iso2EXIDatatypesEncoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-09-26 + * @version 2017-11-16 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer