From b47721107e030ebd2cef7ef93618714fefaeb62a Mon Sep 17 00:00:00 2001 From: daniel_peintner Date: Tue, 12 Dec 2017 15:47:10 +0000 Subject: [PATCH] fix eMAID fragment encoding/decoding (issue reported in https://sourceforge.net/p/openv2g/tickets/11/) git-svn-id: https://svn.code.sf.net/p/openv2g/code/trunk@109 d9f2db14-54d0-4bde-b00c-16405c910529 --- src/iso1/iso1EXIDatatypes.c | 6 +- src/iso1/iso1EXIDatatypes.h | 26 ++++++++- src/iso1/iso1EXIDatatypesDecoder.c | 94 +++++++++++++++++++++++++++++- src/iso1/iso1EXIDatatypesDecoder.h | 2 +- src/iso1/iso1EXIDatatypesEncoder.c | 80 ++++++++++++++++++++++++- src/iso1/iso1EXIDatatypesEncoder.h | 2 +- 6 files changed, 201 insertions(+), 9 deletions(-) diff --git a/src/iso1/iso1EXIDatatypes.c b/src/iso1/iso1EXIDatatypes.c index 333b892..0b10164 100644 --- a/src/iso1/iso1EXIDatatypes.c +++ b/src/iso1/iso1EXIDatatypes.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-11-16 + * @version 2017-12-12 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

@@ -428,6 +428,10 @@ void init_iso1EXIFragment(struct iso1EXIFragment* exiFrag) { exiFrag->RequestedEnergyTransferMode_isUsed = 0u; exiFrag->SessionID_isUsed = 0u; } +void init_iso1EXISchemaInformedElementFragmentGrammar(struct iso1EXISchemaInformedElementFragmentGrammar* exiFrag) { + exiFrag->Id_isUsed = 0u; + exiFrag->CHARACTERS_GENERIC_isUsed = 0u; +} #endif /* DEPLOY_ISO1_CODEC_FRAGMENT */ void init_iso1MessageHeaderType(struct iso1MessageHeaderType* iso1MessageHeaderType) { diff --git a/src/iso1/iso1EXIDatatypes.h b/src/iso1/iso1EXIDatatypes.h index e4688f8..c394583 100644 --- a/src/iso1/iso1EXIDatatypes.h +++ b/src/iso1/iso1EXIDatatypes.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-11-16 + * @version 2017-12-12 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

@@ -2079,6 +2079,8 @@ struct iso1AnonType_V2G_Message { #define EXIFragment_Certificate_BYTES_SIZE 800 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,certificateType is 800 */ #define EXIFragment_X509IssuerName_CHARACTERS_SIZE 50 + EXTRA_CHAR #define EXIFragment_Modulus_BYTES_SIZE 350 +#define exiElementFrag_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define exiElementFrag_CHARACTERS_GENERIC_CHARACTERS_SIZE 50 + EXTRA_CHAR /* Global elements of EXI Document */ @@ -2265,6 +2267,24 @@ struct iso1EXIDocument { #if DEPLOY_ISO1_CODEC_FRAGMENT == SUPPORT_YES +struct iso1EXISchemaInformedElementFragmentGrammar { + /* Schema-informed Element Fragment Grammar for START_ELEMENT({urn:iso:15118:2:2013:MsgBody}eMAID) */ + /* 4 ATTRIBUTE[STRING]({urn:iso:15118:2:2013:MsgDataTypes}Id) */ + unsigned int Id_isUsed:1; + struct { + exi_string_character_t characters[exiElementFrag_Id_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Id ; + /* 247 START_ELEMENT({urn:iso:15118:2:2013:MsgBody}eMAID) */ + unsigned int CHARACTERS_GENERIC_isUsed:1; + struct { + exi_string_character_t characters[exiElementFrag_CHARACTERS_GENERIC_CHARACTERS_SIZE]; + uint16_t charactersLen; + } CHARACTERS_GENERIC ; + + + int _warning_; +}; /* Possible elements of EXI Fragment */ struct iso1EXIFragment { #if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES @@ -2494,7 +2514,8 @@ struct iso1EXIFragment { struct iso1EVStatusType EVStatus ; struct iso1SupportedEnergyTransferModeType SupportedEnergyTransferMode ; struct iso1SignedInfoType SignedInfo ; - struct iso1EMAIDType eMAID ; + /* Schema-informed Element Fragment Grammar for {urn:iso:15118:2:2013:MsgBody}eMAID */ + struct iso1EXISchemaInformedElementFragmentGrammar eMAID ; uint16_t MaxEntriesSAScheduleTuple ; iso1paymentOptionType PaymentOption ; struct iso1SubCertificatesType SubCertificates ; @@ -2839,6 +2860,7 @@ struct iso1EXIFragment { void init_iso1EXIDocument(struct iso1EXIDocument* exiDoc); #if DEPLOY_ISO1_CODEC_FRAGMENT == SUPPORT_YES void init_iso1EXIFragment(struct iso1EXIFragment* exiFrag); +void init_iso1EXISchemaInformedElementFragmentGrammar(struct iso1EXISchemaInformedElementFragmentGrammar* exiFrag); #endif /* DEPLOY_ISO1_CODEC_FRAGMENT */ void init_iso1MessageHeaderType(struct iso1MessageHeaderType* iso1MessageHeaderType); void init_iso1SignatureType(struct iso1SignatureType* iso1SignatureType); diff --git a/src/iso1/iso1EXIDatatypesDecoder.c b/src/iso1/iso1EXIDatatypesDecoder.c index 5ea3e34..6c360a5 100644 --- a/src/iso1/iso1EXIDatatypesDecoder.c +++ b/src/iso1/iso1EXIDatatypesDecoder.c @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-11-16 + * @version 2017-12-12 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

@@ -16401,6 +16401,96 @@ static int decode_iso1PGPDataType(bitstream_t* stream, struct iso1PGPDataType* i return errn; } +int decode_iso1EXISchemaInformedElementFragmentGrammar(bitstream_t* stream, struct iso1EXISchemaInformedElementFragmentGrammar* exiElementFrag) { + int grammarID = 370; + int done = 0; + + init_iso1EXISchemaInformedElementFragmentGrammar(exiElementFrag); + while(!done) { + switch(grammarID) { + case 370: + /* First(xsi:type)(xsi:nil)StartTag[ATTRIBUTE[STRING](Algorithm), ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING]({urn:iso:15118:2:2013:MsgBody}Id), ATTRIBUTE[STRING]({urn:iso:15118:2:2013:MsgDataTypes}Id), ATTRIBUTE[STRING](MimeType), ATTRIBUTE[STRING]({urn:iso:15118:2:2013:MsgDataTypes}Name), ATTRIBUTE[STRING](Target), ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), ATTRIBUTE_GENERIC, START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AuthorizationReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AuthorizationRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDef}Body), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}BodyElement), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CableCheckRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Certificate), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateInstallationReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateInstallationRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateUpdateReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateUpdateRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeProgress), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeService), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryMaxNumberOfPhasesInUse), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryMaxPower), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryStart), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingSession), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingStatusRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ConsumptionCost), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ContractSignatureCertChain), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ContractSignatureEncryptedPrivateKey), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Cost), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DC_EVStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DHpublickey), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DepartureTime), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EAmount), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EPriceLevel), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVCCID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVErrorCode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaxCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaxVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMinCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVRESSSOC), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVReady), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSECurrentLimitAchieved), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEEnergyToBeDelivered), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMinimumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMinimumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSENominalVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSENotification), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEPeakCurrentRipple), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPowerLimitAchieved), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPresentCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPresentVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEProcessing), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEStatusCode), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSETimeStamp), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEVoltageLimitAchieved), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVTargetCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVTargetVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EnergyTransferMode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Entry), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FreeService), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FullSOC), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}GenChallenge), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT({urn:iso:15118:2:2013:MsgDef}Header), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ListOfRootCertificateIDs), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Manifest), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MaxEntriesSAScheduleTuple), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeteringReceiptRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Multiplier), START_ELEMENT({urn:iso:15118:2:2013:MsgHeader}Notification), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}NotificationMaxDelay), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}NumEPriceLevels), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}OEMProvisioningCert), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}P), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMax), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMaxSchedule), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMaxScheduleEntry), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Parameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ParameterSet), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ParameterSetID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PaymentOption), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentOptionList), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentServiceSelectionReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentServiceSelectionRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ProfileEntry), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}RCD), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ReceiptRequired), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RemainingTimeToFullSoC), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RequestedEnergyTransferMode), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ResponseCode), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RetryCounter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}RootCertificateID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SAProvisioningCertificateChain), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTuple), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SASchedules), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariff), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariffEntry), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariffID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SelectedPaymentOption), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SelectedService), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SelectedServiceList), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Service), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDetailReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDetailRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceList), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceParameterList), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionID), START_ELEMENT({urn:iso:15118:2:2013:MsgHeader}SessionID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SigMeterReading), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperties), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SubCertificates), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SupportedEnergyTransferMode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}TMeter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}TimeInterval), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2013:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Value), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}WeldingDetectionRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SKI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}amount), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}amountMultiplier), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}costKind), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}duration), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}eMAID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}start), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}startValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}stringValue), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 9, &eventCode); + if (errn == 0) { + switch(eventCode) { + case 4: + errn = decodeUnsignedInteger16(stream, &exiElementFrag->Id.charactersLen); + if (errn == 0) { + if (exiElementFrag->Id.charactersLen >= 2) { + exiElementFrag->Id.charactersLen = (uint16_t)(exiElementFrag->Id.charactersLen - 2); /* string table miss */ + errn = decodeCharacters(stream, exiElementFrag->Id.charactersLen, exiElementFrag->Id.characters, exiElementFrag_Id_CHARACTERS_SIZE); + } else { + /* string table hit */ + errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED; + } + } + exiElementFrag->Id_isUsed = 1u; + grammarID = 370; + break; + case 255: + done = 1; + grammarID = 4; + break; + case 256: + errn = decodeUnsignedInteger16(stream, &exiElementFrag->CHARACTERS_GENERIC.charactersLen); + if (errn == 0) { + if (exiElementFrag->CHARACTERS_GENERIC.charactersLen >= 2) { + exiElementFrag->CHARACTERS_GENERIC.charactersLen = (uint16_t)(exiElementFrag->CHARACTERS_GENERIC.charactersLen - 2); /* string table miss */ + errn = decodeCharacters(stream, exiElementFrag->CHARACTERS_GENERIC.charactersLen, exiElementFrag->CHARACTERS_GENERIC.characters, exiElementFrag_CHARACTERS_GENERIC_CHARACTERS_SIZE); + } else { + /* string table hit */ + errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED; + } + } + exiElementFrag->CHARACTERS_GENERIC_isUsed = 1u; + grammarID = 371; + break; + default: + errn = EXI_ERROR_UNKOWN_EVENT_CODE; + break; + } + } + break; + case 371: + /* Element[START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AuthorizationReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AuthorizationRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDef}Body), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}BodyElement), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CableCheckRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Certificate), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateInstallationReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateInstallationRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateUpdateReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateUpdateRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeProgress), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeService), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryMaxNumberOfPhasesInUse), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryMaxPower), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryStart), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingSession), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingStatusRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ConsumptionCost), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ContractSignatureCertChain), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ContractSignatureEncryptedPrivateKey), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Cost), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DC_EVStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DHpublickey), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DepartureTime), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EAmount), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EPriceLevel), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVCCID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVErrorCode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaxCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaxVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMinCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVRESSSOC), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVReady), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSECurrentLimitAchieved), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEEnergyToBeDelivered), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMinimumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMinimumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSENominalVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSENotification), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEPeakCurrentRipple), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPowerLimitAchieved), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPresentCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPresentVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEProcessing), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEStatusCode), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSETimeStamp), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEVoltageLimitAchieved), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVTargetCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVTargetVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EnergyTransferMode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Entry), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FreeService), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FullSOC), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}GenChallenge), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT({urn:iso:15118:2:2013:MsgDef}Header), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ListOfRootCertificateIDs), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Manifest), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MaxEntriesSAScheduleTuple), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeteringReceiptRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Multiplier), START_ELEMENT({urn:iso:15118:2:2013:MsgHeader}Notification), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}NotificationMaxDelay), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}NumEPriceLevels), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}OEMProvisioningCert), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}P), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMax), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMaxSchedule), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMaxScheduleEntry), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Parameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ParameterSet), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ParameterSetID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PaymentOption), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentOptionList), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentServiceSelectionReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentServiceSelectionRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ProfileEntry), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}RCD), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ReceiptRequired), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RemainingTimeToFullSoC), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RequestedEnergyTransferMode), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ResponseCode), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RetryCounter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}RootCertificateID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SAProvisioningCertificateChain), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTuple), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SASchedules), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariff), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariffEntry), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariffID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SelectedPaymentOption), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SelectedService), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SelectedServiceList), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Service), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDetailReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDetailRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceList), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceParameterList), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionID), START_ELEMENT({urn:iso:15118:2:2013:MsgHeader}SessionID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SigMeterReading), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperties), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SubCertificates), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SupportedEnergyTransferMode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}TMeter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}TimeInterval), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2013:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Value), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}WeldingDetectionRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SKI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}amount), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}amountMultiplier), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}costKind), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}duration), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}eMAID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}start), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}startValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}stringValue), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + errn = decodeNBitUnsignedInteger(stream, 8, &eventCode); + if (errn == 0) { + switch(eventCode) { + case 244: + done = 1; + grammarID = 4; + break; + case 245: + errn = decodeUnsignedInteger16(stream, &exiElementFrag->CHARACTERS_GENERIC.charactersLen); + if (errn == 0) { + if (exiElementFrag->CHARACTERS_GENERIC.charactersLen >= 2) { + exiElementFrag->CHARACTERS_GENERIC.charactersLen = (uint16_t)(exiElementFrag->CHARACTERS_GENERIC.charactersLen - 2); /* string table miss */ + errn = decodeCharacters(stream, exiElementFrag->CHARACTERS_GENERIC.charactersLen, exiElementFrag->CHARACTERS_GENERIC.characters, exiElementFrag_CHARACTERS_GENERIC_CHARACTERS_SIZE); + } else { + /* string table hit */ + errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED; + } + } + exiElementFrag->CHARACTERS_GENERIC_isUsed = 1u; + grammarID = 371; + break; + default: + errn = EXI_ERROR_UNKOWN_EVENT_CODE; + break; + } + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + @@ -19183,7 +19273,7 @@ int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) break; case 236: /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}eMAID) */ - errn = decode_iso1EMAIDType(stream, &exiFrag->eMAID); + errn = decode_iso1EXISchemaInformedElementFragmentGrammar(stream, &exiFrag->eMAID); exiFrag->eMAID_isUsed = 1u; break; case 237: diff --git a/src/iso1/iso1EXIDatatypesDecoder.h b/src/iso1/iso1EXIDatatypesDecoder.h index 63b7496..2c9d791 100644 --- a/src/iso1/iso1EXIDatatypesDecoder.h +++ b/src/iso1/iso1EXIDatatypesDecoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-11-16 + * @version 2017-12-12 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer

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

Code generated by EXIdizer

@@ -11789,6 +11789,82 @@ static int encode_iso1PGPDataType(bitstream_t* stream, struct iso1PGPDataType* i return errn; } +int encode_iso1EXISchemaInformedElementFragmentGrammar(bitstream_t* stream, struct iso1EXISchemaInformedElementFragmentGrammar* exiElementFrag) { + int grammarID = 370; + int done = 0; + + while(!done) { + switch(grammarID) { + case 370: + /* First(xsi:type)(xsi:nil)StartTag[ATTRIBUTE[STRING](Algorithm), ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING]({urn:iso:15118:2:2013:MsgBody}Id), ATTRIBUTE[STRING]({urn:iso:15118:2:2013:MsgDataTypes}Id), ATTRIBUTE[STRING](MimeType), ATTRIBUTE[STRING]({urn:iso:15118:2:2013:MsgDataTypes}Name), ATTRIBUTE[STRING](Target), ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), ATTRIBUTE_GENERIC, START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AuthorizationReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AuthorizationRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDef}Body), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}BodyElement), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CableCheckRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Certificate), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateInstallationReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateInstallationRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateUpdateReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateUpdateRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeProgress), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeService), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryMaxNumberOfPhasesInUse), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryMaxPower), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryStart), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingSession), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingStatusRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ConsumptionCost), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ContractSignatureCertChain), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ContractSignatureEncryptedPrivateKey), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Cost), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DC_EVStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DHpublickey), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DepartureTime), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EAmount), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EPriceLevel), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVCCID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVErrorCode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaxCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaxVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMinCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVRESSSOC), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVReady), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSECurrentLimitAchieved), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEEnergyToBeDelivered), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMinimumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMinimumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSENominalVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSENotification), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEPeakCurrentRipple), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPowerLimitAchieved), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPresentCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPresentVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEProcessing), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEStatusCode), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSETimeStamp), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEVoltageLimitAchieved), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVTargetCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVTargetVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EnergyTransferMode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Entry), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FreeService), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FullSOC), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}GenChallenge), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT({urn:iso:15118:2:2013:MsgDef}Header), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ListOfRootCertificateIDs), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Manifest), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MaxEntriesSAScheduleTuple), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeteringReceiptRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Multiplier), START_ELEMENT({urn:iso:15118:2:2013:MsgHeader}Notification), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}NotificationMaxDelay), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}NumEPriceLevels), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}OEMProvisioningCert), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}P), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMax), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMaxSchedule), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMaxScheduleEntry), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Parameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ParameterSet), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ParameterSetID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PaymentOption), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentOptionList), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentServiceSelectionReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentServiceSelectionRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ProfileEntry), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}RCD), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ReceiptRequired), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RemainingTimeToFullSoC), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RequestedEnergyTransferMode), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ResponseCode), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RetryCounter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}RootCertificateID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SAProvisioningCertificateChain), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTuple), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SASchedules), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariff), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariffEntry), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariffID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SelectedPaymentOption), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SelectedService), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SelectedServiceList), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Service), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDetailReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDetailRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceList), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceParameterList), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionID), START_ELEMENT({urn:iso:15118:2:2013:MsgHeader}SessionID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SigMeterReading), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperties), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SubCertificates), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SupportedEnergyTransferMode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}TMeter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}TimeInterval), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2013:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Value), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}WeldingDetectionRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SKI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}amount), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}amountMultiplier), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}costKind), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}duration), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}eMAID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}start), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}startValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}stringValue), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( exiElementFrag->Id_isUsed == 1u ) { + exiElementFrag->Id_isUsed = 0u; /* hack to indicate for next loop that this has been handled already */ + errn = encodeNBitUnsignedInteger(stream, 9, 4); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiElementFrag->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, exiElementFrag->Id.characters, exiElementFrag->Id.charactersLen); + } + } + grammarID = 370; + } else if (1==0) { + errn = encodeNBitUnsignedInteger(stream, 9, 255); + if(errn == 0) { + done = 1; + } + grammarID = 4; + } else if ( exiElementFrag->CHARACTERS_GENERIC_isUsed == 1u ) { + exiElementFrag->CHARACTERS_GENERIC_isUsed = 0u; /* hack to indicate for next loop that this has been handled already */ + errn = encodeNBitUnsignedInteger(stream, 9, 256); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiElementFrag->CHARACTERS_GENERIC.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, exiElementFrag->CHARACTERS_GENERIC.characters, exiElementFrag->CHARACTERS_GENERIC.charactersLen); + } + } + grammarID = 371; + } else { + errn = encodeNBitUnsignedInteger(stream, 9, 255); /* EE */ + done = 1; + } + break; + case 371: + /* Element[START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AuthorizationReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}AuthorizationRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDef}Body), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}BodyElement), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}BulkSOC), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CableCheckRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Certificate), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateInstallationReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateInstallationRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateUpdateReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CertificateUpdateRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeProgress), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargeService), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingComplete), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryMaxNumberOfPhasesInUse), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryMaxPower), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryStart), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingSession), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ChargingStatusRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ConsumptionCost), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ContractSignatureCertChain), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ContractSignatureEncryptedPrivateKey), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Cost), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DC_EVStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DC_EVStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}DHpublickey), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}DepartureTime), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EAmount), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EPriceLevel), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVCCID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVErrorCode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaxCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaxVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVMinCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVRESSSOC), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVReady), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSECurrentLimitAchieved), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEEnergyToBeDelivered), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMinimumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEMinimumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSENominalVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSENotification), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEPeakCurrentRipple), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPowerLimitAchieved), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPresentCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEPresentVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEProcessing), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVSEStatusCode), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSETimeStamp), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVSEVoltageLimitAchieved), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EVStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVTargetCurrent), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}EVTargetVoltage), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}EnergyTransferMode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Entry), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FaultCode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FaultMsg), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FreeService), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}FullSOC), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}GenChallenge), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT({urn:iso:15118:2:2013:MsgDef}Header), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ListOfRootCertificateIDs), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Manifest), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MaxEntriesSAScheduleTuple), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}MeteringReceiptRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Multiplier), START_ELEMENT({urn:iso:15118:2:2013:MsgHeader}Notification), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}NotificationMaxDelay), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}NumEPriceLevels), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}OEMProvisioningCert), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}P), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMax), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMaxSchedule), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PMaxScheduleEntry), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Parameter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ParameterSet), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ParameterSetID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}PaymentOption), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentOptionList), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentServiceSelectionReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PaymentServiceSelectionRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ProfileEntry), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}RCD), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ReceiptRequired), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RemainingTimeToFullSoC), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RequestedEnergyTransferMode), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ResponseCode), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}RetryCounter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}RootCertificateID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SAProvisioningCertificateChain), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTuple), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SASchedules), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariff), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariffEntry), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SalesTariffID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SelectedPaymentOption), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SelectedService), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SelectedServiceList), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Service), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceCategory), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDetailReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDetailRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceList), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceParameterList), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}ServiceScope), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionID), START_ELEMENT({urn:iso:15118:2:2013:MsgHeader}SessionID), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SigMeterReading), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperties), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SubCertificates), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}SupportedEnergyTransferMode), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}TMeter), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}TimeInterval), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2013:MsgDef}V2G_Message), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}Value), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}WeldingDetectionRes), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SKI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}amount), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}amountMultiplier), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}costKind), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}duration), START_ELEMENT({urn:iso:15118:2:2013:MsgBody}eMAID), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}start), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}startValue), START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}stringValue), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (1==0) { + errn = encodeNBitUnsignedInteger(stream, 8, 244); + if(errn == 0) { + done = 1; + } + grammarID = 4; + } else if ( exiElementFrag->CHARACTERS_GENERIC_isUsed == 1u ) { + exiElementFrag->CHARACTERS_GENERIC_isUsed = 0u; /* hack to indicate for next loop that this has been handled already */ + errn = encodeNBitUnsignedInteger(stream, 8, 245); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(exiElementFrag->CHARACTERS_GENERIC.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, exiElementFrag->CHARACTERS_GENERIC.characters, exiElementFrag->CHARACTERS_GENERIC.charactersLen); + } + } + grammarID = 371; + } else { + errn = encodeNBitUnsignedInteger(stream, 8, 244); /* EE */ + done = 1; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + int encode_iso1ExiDocument(bitstream_t* stream, struct iso1EXIDocument* exiDoc) { @@ -14420,7 +14496,7 @@ int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag) /* START_ELEMENT({urn:iso:15118:2:2013:MsgBody}eMAID) */ errn = encodeNBitUnsignedInteger(stream, 8, 236); if(errn == 0) { - errn = encode_iso1EMAIDType(stream, &exiFrag->eMAID ); + errn = encode_iso1EXISchemaInformedElementFragmentGrammar(stream, &exiFrag->eMAID); } } else if ( exiFrag->intValue_isUsed == 1u ) { /* START_ELEMENT({urn:iso:15118:2:2013:MsgDataTypes}intValue) */ diff --git a/src/iso1/iso1EXIDatatypesEncoder.h b/src/iso1/iso1EXIDatatypesEncoder.h index 73140d1..c2abd37 100644 --- a/src/iso1/iso1EXIDatatypesEncoder.h +++ b/src/iso1/iso1EXIDatatypesEncoder.h @@ -18,7 +18,7 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 2017-11-16 + * @version 2017-12-12 * @contact Richard.Kuntschke@siemens.com * *

Code generated by EXIdizer